From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=QuwSfmNv; spf=pass (domain: linaro.org, ip: 209.85.221.54, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by groups.io with SMTP; Thu, 22 Aug 2019 02:24:26 -0700 Received: by mail-wr1-f54.google.com with SMTP id j16so4694556wrr.8 for ; Thu, 22 Aug 2019 02:24:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=zNlrgRzUmeHdxb6V/WUX/7XFqXE9tUpiEIkw7IoD9So=; b=QuwSfmNvUpMnlFNHztmShCAt8e2aM4W8WZDMaimJRwb/th6y0vH3nR0314i9DFI0eO rsOLMcgAlXy50PkMzsEkaFXKLqJy0ob0cX5qbk5n98qHCDKNfcc3AySJQEnF7F+XrUdE Waee2rD89N6w1IcG8xZYlFPjIZWYGmeHEhYpbUzgWJIjUNXKvWqUzoK2XRh+GuFeSwGm tJc4+Bb5gi7TSAAfeJC1QXqyAuco/BHI2uNGL0PBIF6qRKE/IZa7gZq8hhGzzPQ17KA8 IN4rDm35xzRU/ylSLpWhe5kGOsLMe5DJHYW/c4yTgDLQIiDOZIsiNnNO5HVW2egE0c1f reig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=zNlrgRzUmeHdxb6V/WUX/7XFqXE9tUpiEIkw7IoD9So=; b=PTwaRnEdoWfYx5ojJyDo/huyO2ldrLDcryQW8H1ofpAdwra5/eeUD477SS50bNJ96t i2/FS3zrBjIWz2fRByq97gUMCCpYgpsX2qTTeHjcTCPSIam+0k+C11NXZFTrlP2kfI/m EYxP8+ooDeIxA6i5TAv4No3MB/p2wp5l9qREBf+Szr0N2T5XjCzmRUps206c6GH5tLQN ER89VpQlrf6SWDZz/62TARipR2Trt8FIDgqjRO58T8EPaSX0MDfUJ0YEw+mXMOS1HlFe j/r/cMnTDl9AKLXr8cLHKjSFwya9gq3FQgCBBuN2UljorLof4vT+9Y3ap29H3SlnEq5j +xIA== X-Gm-Message-State: APjAAAWr3gdmVVC12bSzjMcmyZtGlHEhfVS0bCLMrf5hXICNvgn6+hs7 EyA9CfhkogXFjtf0dmzVE7pH8HEYs23OyDEDQDW2Lw== X-Google-Smtp-Source: APXvYqyJIeAcyPIxRsfW9C3oUkX21qh4sdn58QKz1hbOzoNzPNQY24irytu01VDuYiiqeyZXEoiLBVirX9C51ulOsts= X-Received: by 2002:a5d:5450:: with SMTP id w16mr31973996wrv.174.1566465864922; Thu, 22 Aug 2019 02:24:24 -0700 (PDT) MIME-Version: 1.0 References: <4e8a0c5f50b642538b310a8edd9ce248@huawei.com> In-Reply-To: <4e8a0c5f50b642538b310a8edd9ce248@huawei.com> From: "Ard Biesheuvel" Date: Thu, 22 Aug 2019 12:24:13 +0300 Message-ID: Subject: Re: Getting Synchronous Exception while run avocado-vt tests To: Zhanghailiang Cc: "edk2-devel@lists.01.org" , "devel@edk2.groups.io" , Guoheyi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 22 Aug 2019 at 10:40, Zhanghailiang wrote: > > Hi All, > > > > We caught an =E2=80=98Synchronous Exception=E2=80=99 error while booting = VM with uefi firmware in the avocado-vt tests. > > The Edk2 version we used is edk2-stable201905. The qemu version is qemu-4= .0.0 and kernel version is 4.19.0. > > Parts of the log we got from serial is bellow, you can get the full log f= rom attachment. > > We can easily reproduce this issue with running avocado-vt tests. Actuall= y, we tried the new edk2 from upstream, > > It is still can be reproduced. > > > > Reproduce command: > > # avocado run type_specific.io-github-autotest-qemu.qmp_event_notificatio= n --vt-type qemu --vt-guest-os Guest.Linux.Fedora.29 > > > > Qemu command is : > .. > > It reports that this is a alignment fault from log, We analyzed the calls= tack from log: > > VirtioScsiPassThru-> VirtioFlush->virtio10SetQueueNotify->Virtio10Transfe= r->PciIoMemWrite-> CpuMemoryServiceWrite-> MmioWrite32 <- here, the address= is not align. > The faulting address ends in 0x16, so the access is to the QueueSelect field in VIRTIO_PCI_COMMON_CFG. This is a UINT16 field, so the access should be 16-bit not 32-bits wide. Could you dump the instructions leading up to the first Virtio10Transfer() call in Virtio10SetQueueNotify()? (from Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/OvmfPkg/Virtio10Dxe/Virtio10/= DEBUG/Virtio10.dll) 2280: aa0103e5 mov x5, x1 2284: d2800044 mov x4, #0x2 // = #2 2288: d28002c3 mov x3, #0x16 // = #22 228c: 52800002 mov w2, #0x0 // = #0 2290: aa0003e1 mov x1, x0 2294: aa0603e0 mov x0, x6 2298: 97fffcf3 bl 1664 If the size is passed correctly here, we'll have to track down how the call gets routed to Mmio32Write instead of Mmio16Write(). Do you have any patches on top of edk2-stable-201905 ?