From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: huawei.com, ip: 45.249.212.255, mailfrom: zhang.zhanghailiang@huawei.com) Received: from huawei.com (huawei.com [45.249.212.255]) by groups.io with SMTP; Thu, 22 Aug 2019 00:40:20 -0700 Received: from DGGEMM406-HUB.china.huawei.com (unknown [172.30.72.57]) by Forcepoint Email with ESMTP id 6946E59CE042A0C00EC3; Thu, 22 Aug 2019 15:40:17 +0800 (CST) Received: from dggeme755-chm.china.huawei.com (10.3.19.101) by DGGEMM406-HUB.china.huawei.com (10.3.20.214) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 22 Aug 2019 15:40:16 +0800 Received: from dggeme756-chm.china.huawei.com (10.3.19.102) by dggeme755-chm.china.huawei.com (10.3.19.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Thu, 22 Aug 2019 15:40:16 +0800 Received: from dggeme756-chm.china.huawei.com ([10.6.80.68]) by dggeme756-chm.china.huawei.com ([10.6.80.68]) with mapi id 15.01.1591.008; Thu, 22 Aug 2019 15:40:16 +0800 From: Zhanghailiang To: "edk2-devel@lists.01.org" , "devel@edk2.groups.io" CC: Guoheyi , "ard.biesheuvel@linaro.org" Subject: Getting Synchronous Exception while run avocado-vt tests Thread-Topic: Getting Synchronous Exception while run avocado-vt tests Thread-Index: AdVYrxIM/X0gSucbSOSthzX7288VVg== Date: Thu, 22 Aug 2019 07:40:16 +0000 Message-ID: <4e8a0c5f50b642538b310a8edd9ce248@huawei.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.133.214.142] MIME-Version: 1.0 X-CFilter-Loop: Reflected Content-Language: zh-CN Content-Type: multipart/alternative; boundary="_000_4e8a0c5f50b642538b310a8edd9ce248huaweicom_" --_000_4e8a0c5f50b642538b310a8edd9ce248huaweicom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi All, We caught an 'Synchronous Exception' error while booting VM with uefi firmw= are 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 fro= m attachment. We can easily reproduce this issue with running avocado-vt tests. Actually,= 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_notification = --vt-type qemu --vt-guest-os Guest.Linux.Fedora.29 Qemu command is : /usr/libexec/qemu-kvm -name avocado-vt-vm1 -chardev file,path=3D/root/vm1_e= dk2.log,id=3Dcharseria_edk -serial chardev:charseria_edk -drive file=3D/usr= /share/AAVMF/AAVMF_CODE.fd,if=3Dpflash,format=3Draw,unit=3D0,readonly=3Don = -drive file=3D/var/lib/avocado/data/avocado-vt/images/f28-aarch64_AAVMF_VAR= S.fd,if=3Dpflash,format=3Draw,unit=3D1 -machine virt-4.0,gic-version=3D3 -n= odefaults -device virtio-gpu-pci,bus=3Dpcie.0,addr=3D0x1 -chardev socket,id= =3Dhmp_id_hmp1,path=3D/var/tmp/avocado_pwoki1gy/monitor-hmp1-20190822-14445= 6-BNpsdyCz,server,nowait -mon chardev=3Dhmp_id_hmp1,mode=3Dreadline -charde= v socket,id=3Dqmp_id_qmp1,path=3D/var/tmp/avocado_pwoki1gy/monitor-qmp1-201= 90822-144456-BNpsdyCz,server,nowait -mon chardev=3Dqmp_id_qmp1,mode=3Dcontr= ol -chardev socket,id=3Dqmp_id_qmp2,path=3D/var/tmp/avocado_pwoki1gy/monito= r-qmp2-20190822-144456-BNpsdyCz,server,nowait -mon chardev=3Dqmp_id_qmp2,mo= de=3Dcontrol -chardev socket,id=3Dhmp_id_catch_monitor,path=3D/var/tmp/avoc= ado_pwoki1gy/monitor-catch_monitor-20190822-144456-BNpsdyCz,server,nowait -= mon chardev=3Dhmp_id_catch_monitor,mode=3Dreadline -serial unix:/var/tmp/av= ocado_pwoki1gy/serial-serial0-20190822-144456-BNpsdyCz,server,nowait -devic= e pcie-root-port,id=3Dpcie.0-root-port-2,slot=3D2,chassis=3D2,addr=3D0x2,bu= s=3Dpcie.0 -device virtio-serial-pci,id=3Dvirtio_serial_pci0,bus=3Dpcie.0-r= oot-port-2,addr=3D0x0 -chardev socket,path=3D/var/tmp/avocado_pwoki1gy/virt= io_port-vc1-20190822-144456-BNpsdyCz,id=3Did8egefs,server,nowait -device vi= rtserialport,id=3DidmRzd3r,name=3Dorg.qemu.guest_agent.0,bus=3Dvirtio_seria= l_pci0.0,chardev=3Did8egefs -device pcie-root-port,id=3Dpcie.0-root-port-3,= slot=3D3,chassis=3D3,addr=3D0x3,bus=3Dpcie.0 -device qemu-xhci,id=3Dusb1,bu= s=3Dpcie.0-root-port-3,addr=3D0x0 -device pcie-root-port,id=3Dpcie.0-root-p= ort-4,slot=3D4,chassis=3D4,addr=3D0x4,bus=3Dpcie.0 -device virtio-scsi-pci,= id=3Dvirtio_scsi_pci0,bus=3Dpcie.0-root-port-4,addr=3D0x0 -drive id=3Ddrive= _image1,if=3Dnone,format=3Dqcow2,file=3D/var/lib/avocado/data/avocado-vt/im= ages/f28-aarch64.qcow2 -device scsi-hd,id=3Dimage1,drive=3Ddrive_image1 -de= vice pcie-root-port,id=3Dpcie.0-root-port-5,slot=3D5,chassis=3D5,addr=3D0x5= ,bus=3Dpcie.0 -device virtio-net-pci,mac=3D9a:44:45:46:47:48,rombar=3D0,id= =3Didqgzz84,vectors=3D4,netdev=3Did7rFJf9,bus=3Dpcie.0-root-port-5,addr=3D0= x0 -netdev tap,id=3Did7rFJf9,fd=3D22 -m 1024 -smp 2,maxcpus=3D2,cores=3D1,t= hreads=3D1,sockets=3D2 -cpu host -device usb-tablet,id=3Dusb-tablet1,bus=3D= usb1.0,port=3D1 -device usb-kbd,id=3Dusb-kbd1,bus=3Dusb1.0,port=3D2 -vnc :0= -rtc base=3Dutc,clock=3Dhost -enable-kvm -device pcie-root-port,id=3Dpcie_= extra_root_port_0,slot=3D6,chassis=3D6,addr=3D0x6,bus=3Dpcie.0 -device pcie= -root-port,id=3Dpcie_extra_root_port_1,slot=3D7,chassis=3D7,addr=3D0x7,bus= =3Dpcie.0 It reports that this is a alignment fault from log, We analyzed the callsta= ck from log: VirtioScsiPassThru-> VirtioFlush->virtio10SetQueueNotify->Virtio10Transfer-= >PciIoMemWrite-> CpuMemoryServiceWrite-> MmioWrite32 <- here, the address i= s not align. I tried to catch this case with the follow patch, but we never got the debu= g info while it happens, this is quite confused. :( } else if (OperationWidth =3D=3D EfiCpuIoWidthUint16) { + if ((Address & 1) !=3D 0) {^M + DEBUG((DEBUG_INFO, "%a: MmioWrite16 address 0x%lx Width %d!!!!= not aligh \n", __FUNCTION__, Address, Width));^M + }^M MmioWrite16 ((UINTN)Address, *((UINT16 *)Uint8Buffer)); } else if (OperationWidth =3D=3D EfiCpuIoWidthUint32) { + if ((Address & 3) !=3D 0) {^M + DEBUG((DEBUG_INFO, "%a: MmioWrite32 address 0x%lx Width %d!!!! n= ot aligh\n", __FUNCTION__, Address, Width));^M + }^M MmioWrite32 ((UINTN)Address, *((UINT32 *)Uint8Buffer)); } else if (OperationWidth =3D=3D EfiCpuIoWidthUint64) { + if ((Address & 7) !=3D 0) {^M + DEBUG((DEBUG_INFO, "%a: MmioWrite64 address 0x%lx Width %d!= !!! not aligh\n", __FUNCTION__, Address, Width));^M + }^M Mmi Any idea ? Synchronous Exception at 0x000000007BD1D318^M ^[[0m^[[37m^[[40m^M ^M Synchronous Exception at 0x000000007BD1D318^M PC 0x00007BD1D318 (0x00007BD1B000+0x00002318) [ 0] ArmPciCpuIo2Dxe.dll^M PC 0x00007BD1D164 (0x00007BD1B000+0x00002164) [ 0] ArmPciCpuIo2Dxe.dll^M PC 0x00007BD1C868 (0x00007BD1B000+0x00001868) [ 0] ArmPciCpuIo2Dxe.dll^M PC 0x00007BC7AECC (0x00007BC74000+0x00006ECC) [ 1] PciHostBridgeDxe.dll^M PC 0x0000785C301C (0x0000785B4000+0x0000F01C) [ 2] PciBusDxe.dll^M PC 0x00007859B6FC (0x00007859A000+0x000016FC) [ 3] Virtio10.dll^M PC 0x00007859C0FC (0x00007859A000+0x000020FC) [ 3] Virtio10.dll^M PC 0x00007BB76F34 (0x00007BB72000+0x00004F34) [ 4] VirtioScsiDxe.dll^M PC 0x00007BB73F1C (0x00007BB72000+0x00001F1C) [ 4] VirtioScsiDxe.dll^M PC 0x00007862DA38 (0x00007862B000+0x00002A38) [ 5] ScsiBus.dll^M PC 0x000078620BB4 (0x000078614000+0x0000CBB4) [ 6] ScsiDisk.dll^M PC 0x00007861AAC0 (0x000078614000+0x00006AC0) [ 6] ScsiDisk.dll^M PC 0x000078619E34 (0x000078614000+0x00005E34) [ 6] ScsiDisk.dll^M PC 0x0000786164D8 (0x000078614000+0x000024D8) [ 6] ScsiDisk.dll^M PC 0x00007BBDF34C (0x00007BBDC000+0x0000334C) [ 7] DiskIoDxe.dll^M PC 0x00007BBDFA74 (0x00007BBDC000+0x00003A74) [ 7] DiskIoDxe.dll^M PC 0x00007BBCD3DC (0x00007BBCB000+0x000023DC) [ 8] PartitionDxe.dll^M PC 0x00007BBDF34C (0x00007BBDC000+0x0000334C) [ 9] DiskIoDxe.dll^M PC 0x00007BBDFA74 (0x00007BBDC000+0x00003A74) [ 9] DiskIoDxe.dll^M PC 0x00007BBB7878 (0x00007BBB4000+0x00003878) [ 10] Fat.dll^M PC 0x00007BBB7628 (0x00007BBB4000+0x00003628) [ 10] Fat.dll^M PC 0x00007BBB5BC0 (0x00007BBB4000+0x00001BC0) [ 10] Fat.dll^M PC 0x00007F4C8F9C (0x00007F4BA000+0x0000EF9C) [ 11] DxeCore.dll^M PC 0x00007F4C8368 (0x00007F4BA000+0x0000E368) [ 11] DxeCore.dll^M PC 0x00007F4C86B8 (0x00007F4BA000+0x0000E6B8) [ 11] DxeCore.dll^M PC 0x00007F4C86B8 (0x00007F4BA000+0x0000E6B8) [ 11] DxeCore.dll^M PC 0x00007BC508BC (0x00007BC44000+0x0000C8BC) [ 12] BdsDxe.dll^M PC 0x00007BC5092C (0x00007BC44000+0x0000C92C) [ 12] BdsDxe.dll^M PC 0x00007BC5F3E8 (0x00007BC44000+0x0001B3E8) [ 12] BdsDxe.dll^M PC 0x00007BC46EBC (0x00007BC44000+0x00002EBC) [ 12] BdsDxe.dll^M PC 0x00007F4BC88C (0x00007F4BA000+0x0000288C) [ 13] DxeCore.dll^M PC 0x00007F4BB8C0 (0x00007F4BA000+0x000018C0) [ 13] DxeCore.dll^M PC 0x00007F4BB024 (0x00007F4BA000+0x00001024) [ 13] DxeCore.dll^M ^M [ 0] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/= DEBUG_GCC49/AARCH64/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe/DEBUG/Ar= mPciCpuIo2Dxe.dll^M [ 1] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/= DEBUG_GCC49/AARCH64/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe/= DEBUG/PciHostBridgeDxe.dll^M [ 2] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/= DEBUG_GCC49/AARCH64/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe/DEBUG/PciBusDx= e.dll^M [ 3] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/= DEBUG_GCC49/AARCH64/OvmfPkg/Virtio10Dxe/Virtio10/DEBUG/Virtio10.dll^M [ 4] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/= DEBUG_GCC49/AARCH64/OvmfPkg/VirtioScsiDxe/VirtioScsi/DEBUG/VirtioScsiDxe.dl= l^M [ 5] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/= DEBUG_GCC49/AARCH64/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe/DEBUG/ScsiB= us.dll^M [ 6] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/= DEBUG_GCC49/AARCH64/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe/DEBUG/Scs= iDisk.dll^M [ 7] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/= DEBUG_GCC49/AARCH64/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe/DEBUG/D= iskIoDxe.dll^M [ 8] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/= DEBUG_GCC49/AARCH64/MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe/D= EBUG/PartitionDxe.dll^M [ 9] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/= DEBUG_GCC49/AARCH64/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe/DEBUG/D= iskIoDxe.dll^M [ 10] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64= /DEBUG_GCC49/AARCH64/FatPkg/EnhancedFatDxe/Fat/DEBUG/Fat.dll^M [ 11] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64= /DEBUG_GCC49/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll^M [ 12] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64= /DEBUG_GCC49/AARCH64/MdeModulePkg/Universal/BdsDxe/BdsDxe/DEBUG/BdsDxe.dll^= M [ 13] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64= /DEBUG_GCC49/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll^M ^M X0 0x0000008000100016 X1 0x0000000000000002 X2 0x0000008000100016 X= 3 0x0000000000000001^M X4 0x000000007F4B96E6 X5 0x000000007BD1C798 X6 0x000000007BD23008 X= 7 0x0000000000000000^M X8 0x000000007C01F508 X9 0x0000000400000000 X10 0x00000000792DF000 X1= 1 0x000000007BA57FFF^M X12 0x0000000000000000 X13 0x0000000000000008 X14 0x0000000000000000 X15= 0x0000000000000000^M X16 0x000000007F4B9E00 X17 0x0000000000000000 X18 0x0000000000000000 X19= 0x00000000792F3C28^M X20 0x0000000000000000 X21 0x0000000000000000 X22 0x0000000000000000 X23= 0x0000000000000000^M X24 0x0000000000000000 X25 0x0000000000000000 X26 0x0000000000000000 X27= 0x0000000000000000^M X28 0x0000000000000000 FP 0x000000007F4B9540 LR 0x000000007BD1D164 ^M ^M V0 0x0000000000000000 0000000000000000 V1 0x0000000000000000 0000000000= 000000^M V2 0x0000000000000000 0000000000000000 V3 0x0000000000000000 0000000000= 000000^M V4 0x0000000000000000 0000000000000000 V5 0x0000000000000000 0000000000= 000000^M V6 0x0000000000000000 0000000000000000 V7 0x0000000000000000 0000000000= 000000^M V8 0x0000000000000000 0000000000000000 V9 0x0000000000000000 0000000000= 000000^M V10 0x0000000000000000 0000000000000000 V11 0x0000000000000000 00000000000= 00000^M V12 0x0000000000000000 0000000000000000 V13 0x0000000000000000 00000000000= 00000^M V14 0x0000000000000000 0000000000000000 V15 0x0000000000000000 00000000000= 00000^M V16 0x0000000000000000 0000000000000000 V17 0x0000000000000000 00000000000= 00000^M V18 0x0000000000000000 0000000000000000 V19 0x0000000000000000 00000000000= 00000^M V20 0x0000000000000000 0000000000000000 V21 0x0000000000000000 00000000000= 00000^M V22 0x0000000000000000 0000000000000000 V23 0x0000000000000000 00000000000= 00000^M V24 0x0000000000000000 0000000000000000 V25 0x0000000000000000 00000000000= 00000^M V26 0x0000000000000000 0000000000000000 V27 0x0000000000000000 00000000000= 00000^M V28 0x0000000000000000 0000000000000000 V29 0x0000000000000000 00000000000= 00000^M V30 0x0000000000000000 0000000000000000 V31 0x0000000000000000 00000000000= 00000^M ^M SP 0x000000007F4B9540 ELR 0x000000007BD1D318 SPSR 0x60000205 FPSR 0x00= 000000^M ESR 0x96000021 FAR 0x0000008000100016^M ^M ESR : EC 0x25 IL 0x1 ISS 0x00000021^M ^M Data abort: Alignment fault^M Thanks. --_000_4e8a0c5f50b642538b310a8edd9ce248huaweicom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi A= ll,

 

We c= aught an ‘Synchronous Exception’ error while booting VM with ue= fi firmware in the avocado-vt tests.

The = Edk2 version we used is edk2-stable201905. The qemu version is qemu-4.0.0 a= nd kernel version is 4.19.0.

Part= s of the log we got from serial is bellow, you can get the full log from at= tachment.

We c= an easily reproduce this issue with running avocado-vt tests. Actually, we = tried the new edk2 from upstream,

It i= s still can be reproduced.

 

Repr= oduce command:

# av= ocado run type_specific.io-github-autotest-qemu.qmp_event_notification --vt= -type qemu --vt-guest-os Guest.Linux.Fedora.29

 

Qemu= command is :

/usr= /libexec/qemu-kvm -name avocado-vt-vm1 -chardev file,path=3D/root/vm1_edk2.= log,id=3Dcharseria_edk -serial chardev:charseria_edk -drive file=3D/usr/sha= re/AAVMF/AAVMF_CODE.fd,if=3Dpflash,format=3Draw,unit=3D0,readonly=3Don -drive file=3D/var/lib/avocado/data/avocado-vt/images/f28-aarch64_AAVMF_VA= RS.fd,if=3Dpflash,format=3Draw,unit=3D1 -machine virt-4.0,gic-version=3D3 -= nodefaults -device virtio-gpu-pci,bus=3Dpcie.0,addr=3D0x1 -chardev socket,i= d=3Dhmp_id_hmp1,path=3D/var/tmp/avocado_pwoki1gy/monitor-hmp1-20190822-1444= 56-BNpsdyCz,server,nowait -mon chardev=3Dhmp_id_hmp1,mode=3Dreadline -chardev socket,id=3Dqmp_id_qmp= 1,path=3D/var/tmp/avocado_pwoki1gy/monitor-qmp1-20190822-144456-BNpsdyCz,se= rver,nowait -mon chardev=3Dqmp_id_qmp1,mode=3Dcontrol -chardev socket,id=3D= qmp_id_qmp2,path=3D/var/tmp/avocado_pwoki1gy/monitor-qmp2-20190822-144456-B= NpsdyCz,server,nowait -mon chardev=3Dqmp_id_qmp2,mode=3Dcontrol -chardev socket,id=3Dhmp_id_catc= h_monitor,path=3D/var/tmp/avocado_pwoki1gy/monitor-catch_monitor-20190822-1= 44456-BNpsdyCz,server,nowait -mon chardev=3Dhmp_id_catch_monitor,mode=3Drea= dline -serial unix:/var/tmp/avocado_pwoki1gy/serial-serial0-20190822-144456= -BNpsdyCz,server,nowait -device pcie-root-port,id=3Dpcie.0-root-port-2,slot=3D2,chassis=3D2,addr= =3D0x2,bus=3Dpcie.0 -device virtio-serial-pci,id=3Dvirtio_serial_pci0,bus= =3Dpcie.0-root-port-2,addr=3D0x0 -chardev socket,path=3D/var/tmp/avocado_pw= oki1gy/virtio_port-vc1-20190822-144456-BNpsdyCz,id=3Did8egefs,server,nowait -device virtserialport,id=3DidmRzd3r,name=3Dorg.qemu.guest_agent.0,bus=3Dv= irtio_serial_pci0.0,chardev=3Did8egefs -device pcie-root-port,id=3Dpcie.0-r= oot-port-3,slot=3D3,chassis=3D3,addr=3D0x3,bus=3Dpcie.0 -device qemu-xhci,i= d=3Dusb1,bus=3Dpcie.0-root-port-3,addr=3D0x0 -device pcie-root-port,id=3Dpc= ie.0-root-port-4,slot=3D4,chassis=3D4,addr=3D0x4,bus=3Dpcie.0 -device virtio-scsi-pci,id=3Dvirtio_scsi_pci0,bus=3Dpcie.0-root-port-4,add= r=3D0x0 -drive id=3Ddrive_image1,if=3Dnone,format=3Dqcow2,file=3D/var/lib/a= vocado/data/avocado-vt/images/f28-aarch64.qcow2 -device scsi-hd,id=3Dimage1= ,drive=3Ddrive_image1 -device pcie-root-port,id=3Dpcie.0-root-port-5,slot= =3D5,chassis=3D5,addr=3D0x5,bus=3Dpcie.0 -device virtio-net-pci,mac=3D9a:44:45:46:47:48,rombar=3D0,id=3Didqgzz84,ve= ctors=3D4,netdev=3Did7rFJf9,bus=3Dpcie.0-root-port-5,addr=3D0x0 -netdev tap= ,id=3Did7rFJf9,fd=3D22 -m 1024 -smp 2,maxcpus=3D2,cores=3D1,threads=3D1,soc= kets=3D2 -cpu host -device usb-tablet,id=3Dusb-tablet1,bus=3Dusb1.0,port=3D= 1 -device usb-kbd,id=3Dusb-kbd1,bus=3Dusb1.0,port=3D2 -vnc :0 -rtc base=3Dut= c,clock=3Dhost -enable-kvm -device pcie-root-port,id=3Dpcie_extra_root_port= _0,slot=3D6,chassis=3D6,addr=3D0x6,bus=3Dpcie.0 -device pcie-root-port,id= =3Dpcie_extra_root_port_1,slot=3D7,chassis=3D7,addr=3D0x7,bus=3Dpcie.0=

 

It r= eports that this is a alignment fault from log, We analyzed the callstack f= rom log:  

Virt= ioScsiPassThru-> VirtioFlush->virt= io10SetQueueNotify->Virtio10Transfer->PciIoMemWrite-> CpuMemoryServiceWrit= e-> MmioWrite32 <- he= re, the address is not align.

I tr= ied to catch this case with the follow patch, but we never got the debug in= fo while it happens, this is quite confused. L

 

&nbs= p;    } else if (OperationWidth =3D=3D EfiCpuIoWidthUint16) = {

+= ;      if ((Address & 1) !=3D 0) {^M

+= ;            DEBUG((= DEBUG_INFO, "%a: MmioWrite16 address 0x%lx Width %d!!!! not aligh \n&q= uot;, __FUNCTION__, Address, Width));^M

+= ;      }^M

&nbs= p;      MmioWrite16 ((UINTN)Address, *((UINT16 *)U= int8Buffer));

&nbs= p;    } else if (OperationWidth =3D=3D EfiCpuIoWidthUint32) = {

+= ;      if ((Address & 3) !=3D 0) {^M

+= ;          DEBUG((DEBUG_INFO, = "%a: MmioWrite32 address 0x%lx Width %d!!!! not aligh\n", __FUNCT= ION__, Address, Width));^M

+= ;      }^M

&nbs= p;      MmioWrite32 ((UINTN)Address, *((UINT32 *)U= int8Buffer));

&nbs= p;    } else if (OperationWidth =3D=3D EfiCpuIoWidthUint64) = {

+= ;       if ((Address & 7) !=3D 0) {^M

+= ;            &n= bsp;  DEBUG((DEBUG_INFO, "%a: MmioWrite64 address 0x%lx Width %d!= !!! not aligh\n", __FUNCTION__, Address, Width));^M<= /p>

+= ;       }^M

&nbs= p;      Mmi

Any = idea ?

 

Sync= hronous Exception at 0x000000007BD1D318^M

^[[0= m^[[37m^[[40m^M

^M

Sync= hronous Exception at 0x000000007BD1D318^M

PC 0= x00007BD1D318 (0x00007BD1B000+0x00002318) [ 0] ArmPciCpuIo2Dxe.dll^M

PC 0= x00007BD1D164 (0x00007BD1B000+0x00002164) [ 0] ArmPciCpuIo2Dxe.dll^M

PC 0= x00007BD1C868 (0x00007BD1B000+0x00001868) [ 0] ArmPciCpuIo2Dxe.dll^M

PC 0= x00007BC7AECC (0x00007BC74000+0x00006ECC) [ 1] PciHostBridgeDxe.dll^M

PC 0= x0000785C301C (0x0000785B4000+0x0000F01C) [ 2] PciBusDxe.dll^M

PC 0= x00007859B6FC (0x00007859A000+0x000016FC) [ 3] Virtio10.dll^M

PC 0= x00007859C0FC (0x00007859A000+0x000020FC) [ 3] Virtio10.dll^M

PC 0= x00007BB76F34 (0x00007BB72000+0x00004F34) [ 4] VirtioScsiDxe.dll^M=

PC 0= x00007BB73F1C (0x00007BB72000+0x00001F1C) [ 4] VirtioScsiDxe.dll^M=

PC 0= x00007862DA38 (0x00007862B000+0x00002A38) [ 5] ScsiBus.dll^M=

PC 0= x000078620BB4 (0x000078614000+0x0000CBB4) [ 6] ScsiDisk.dll^M

PC 0= x00007861AAC0 (0x000078614000+0x00006AC0) [ 6] ScsiDisk.dll^M

PC 0= x000078619E34 (0x000078614000+0x00005E34) [ 6] ScsiDisk.dll^M

PC 0= x0000786164D8 (0x000078614000+0x000024D8) [ 6] ScsiDisk.dll^M

PC 0= x00007BBDF34C (0x00007BBDC000+0x0000334C) [ 7] DiskIoDxe.dll^M

PC 0= x00007BBDFA74 (0x00007BBDC000+0x00003A74) [ 7] DiskIoDxe.dll^M

PC 0= x00007BBCD3DC (0x00007BBCB000+0x000023DC) [ 8] PartitionDxe.dll^M<= /o:p>

PC 0= x00007BBDF34C (0x00007BBDC000+0x0000334C) [ 9] DiskIoDxe.dll^M

PC 0= x00007BBDFA74 (0x00007BBDC000+0x00003A74) [ 9] DiskIoDxe.dll^M

PC 0= x00007BBB7878 (0x00007BBB4000+0x00003878) [ 10] Fat.dll^M

PC 0= x00007BBB7628 (0x00007BBB4000+0x00003628) [ 10] Fat.dll^M

PC 0= x00007BBB5BC0 (0x00007BBB4000+0x00001BC0) [ 10] Fat.dll^M

PC 0= x00007F4C8F9C (0x00007F4BA000+0x0000EF9C) [ 11] DxeCore.dll^M

PC 0= x00007F4C8368 (0x00007F4BA000+0x0000E368) [ 11] DxeCore.dll^M

PC 0= x00007F4C86B8 (0x00007F4BA000+0x0000E6B8) [ 11] DxeCore.dll^M

PC 0= x00007F4C86B8 (0x00007F4BA000+0x0000E6B8) [ 11] DxeCore.dll^M

PC 0= x00007BC508BC (0x00007BC44000+0x0000C8BC) [ 12] BdsDxe.dll^M=

PC 0= x00007BC5092C (0x00007BC44000+0x0000C92C) [ 12] BdsDxe.dll^M=

PC 0= x00007BC5F3E8 (0x00007BC44000+0x0001B3E8) [ 12] BdsDxe.dll^M=

PC 0= x00007BC46EBC (0x00007BC44000+0x00002EBC) [ 12] BdsDxe.dll^M=

PC 0= x00007F4BC88C (0x00007F4BA000+0x0000288C) [ 13] DxeCore.dll^M

PC 0= x00007F4BB8C0 (0x00007F4BA000+0x000018C0) [ 13] DxeCore.dll^M

PC 0= x00007F4BB024 (0x00007F4BA000+0x00001024) [ 13] DxeCore.dll^M

^M

[ 0]= /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBU= G_GCC49/AARCH64/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe/DEBUG/ArmPci= CpuIo2Dxe.dll^M

[ 1]= /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBU= G_GCC49/AARCH64/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe/DEBU= G/PciHostBridgeDxe.dll^M

[ 2]= /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBU= G_GCC49/AARCH64/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe/DEBUG/PciBusDxe.dl= l^M

[ 3]= /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBU= G_GCC49/AARCH64/OvmfPkg/Virtio10Dxe/Virtio10/DEBUG/Virtio10.dll^M

[ 4]= /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBU= G_GCC49/AARCH64/OvmfPkg/VirtioScsiDxe/VirtioScsi/DEBUG/VirtioScsiDxe.dll^M<= o:p>

[ 5]= /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBU= G_GCC49/AARCH64/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe/DEBUG/ScsiBus.d= ll^M

[ 6]= /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBU= G_GCC49/AARCH64/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe/DEBUG/ScsiDis= k.dll^M

[ 7]= /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBU= G_GCC49/AARCH64/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe/DEBUG/DiskI= oDxe.dll^M

[ 8]= /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBU= G_GCC49/AARCH64/MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe/DEBUG= /PartitionDxe.dll^M

[ 9]= /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBU= G_GCC49/AARCH64/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe/DEBUG/DiskI= oDxe.dll^M

[ 10= ] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEB= UG_GCC49/AARCH64/FatPkg/EnhancedFatDxe/Fat/DEBUG/Fat.dll^M

[ 11= ] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEB= UG_GCC49/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll^M

[ 12= ] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEB= UG_GCC49/AARCH64/MdeModulePkg/Universal/BdsDxe/BdsDxe/DEBUG/BdsDxe.dll^M

[ 13= ] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEB= UG_GCC49/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll^M

^M

&nbs= p; X0 0x0000008000100016   X1 0x0000000000000002   X2 0= x0000008000100016   X3 0x0000000000000001^M

&nbs= p; X4 0x000000007F4B96E6   X5 0x000000007BD1C798   X6 0= x000000007BD23008   X7 0x0000000000000000^M

&nbs= p; X8 0x000000007C01F508   X9 0x0000000400000000  X10 0x0000= 0000792DF000  X11 0x000000007BA57FFF^M

X12 = 0x0000000000000000  X13 0x0000000000000008  X14 0x000000000000000= 0  X15 0x0000000000000000^M

X16 = 0x000000007F4B9E00  X17 0x0000000000000000  X18 0x000000000000000= 0  X19 0x00000000792F3C28^M

X20 = 0x0000000000000000  X21 0x0000000000000000  X22 0x000000000000000= 0  X23 0x0000000000000000^M

X24 = 0x0000000000000000  X25 0x0000000000000000  X26 0x000000000000000= 0  X27 0x0000000000000000^M

X28 = 0x0000000000000000   FP 0x000000007F4B9540   LR 0x00000= 0007BD1D164  ^M

^M

&nbs= p; V0 0x0000000000000000 0000000000000000   V1 0x0000000000000000= 0000000000000000^M

&nbs= p; V2 0x0000000000000000 0000000000000000   V3 0x0000000000000000= 0000000000000000^M

&nbs= p; V4 0x0000000000000000 0000000000000000   V5 0x0000000000000000= 0000000000000000^M

&nbs= p; V6 0x0000000000000000 0000000000000000   V7 0x0000000000000000= 0000000000000000^M

&nbs= p; V8 0x0000000000000000 0000000000000000   V9 0x0000000000000000= 0000000000000000^M

V10 = 0x0000000000000000 0000000000000000  V11 0x0000000000000000 0000000000= 000000^M

V12 = 0x0000000000000000 0000000000000000  V13 0x0000000000000000 0000000000= 000000^M

V14 = 0x0000000000000000 0000000000000000  V15 0x0000000000000000 0000000000= 000000^M

V16 = 0x0000000000000000 0000000000000000  V17 0x0000000000000000 0000000000= 000000^M

V18 = 0x0000000000000000 0000000000000000  V19 0x0000000000000000 0000000000= 000000^M

V20 = 0x0000000000000000 0000000000000000  V21 0x0000000000000000 0000000000= 000000^M

V22 = 0x0000000000000000 0000000000000000  V23 0x0000000000000000 0000000000= 000000^M

V24 = 0x0000000000000000 0000000000000000  V25 0x0000000000000000 0000000000= 000000^M

V26 = 0x0000000000000000 0000000000000000  V27 0x0000000000000000 0000000000= 000000^M

V28 = 0x0000000000000000 0000000000000000  V29 0x0000000000000000 0000000000= 000000^M

V30 = 0x0000000000000000 0000000000000000  V31 0x0000000000000000 0000000000= 000000^M

^M

&nbs= p; SP 0x000000007F4B9540  ELR 0x000000007BD1D318  SPSR 0x60000205=   FPSR 0x00000000^M

ESR = 0x96000021          FAR 0x0000= 008000100016^M

^M

ESR = : EC 0x25  IL 0x1  ISS 0x00000021^M

^M

Data= abort: Alignment fault^M

 

Than= ks.

--_000_4e8a0c5f50b642538b310a8edd9ce248huaweicom_--