Hello, On 02.10.24 10:17, Ahmad Fatoum wrote: > I am building for MACHINE = "qemuarm64" already, but something else catches > my eye: QEMU_USE_KVM = 'True' > > I wasn't aware that I need to manually set this. I do this now and it fails > for other reasons: qemu-system-aarch64: KVM does not support GICv3 emulation > > I'll look into how to resolve this and maybe I am lucky and can reproduce > this issue, once KVM is enabled.
Good news: I managed to reproduce this issue and write a few lines long reproducer that I sent in a bug report to the KVM/QEMU development mailing lists: https://lore.kernel.org/all/89f184d6-5b61-4c77-9f3b-c0a8f6a75...@pengutronix.de/ I will look after any fixes that may result. As far as this series here is concerned, both barebox and U-Boot function correctly with KVM disabled, so could we just disable KVM for only the U-Boot/barebox runqemu tests to unblock merge of this series? Some more info on my debugging below. I managed to reproduce by enabling KVM and changing: -QB_CPU_KVM = "-cpu host -machine gic-version=3" +QB_CPU_KVM = "-cpu host -machine virt" and by disabling migration across the big-little cluster with taskset -a --cpu-list 2-5 I even got a U-Boot crash register dump: Flash: 64 MiB Loading Environment from Flash... *** Warning - bad CRC, using default environment In: serial,usbkbd Out: serial,vidconsole Err: serial,vidconsole Bus xhci_pci: Register 8001040 NbrPorts 8 Starting the controller "Synchronous Abort" handler, esr 0x96000010, far 0x10090040 elr: 0000000000055114 lr : 00000000000550f8 (reloc) elr: 000000004f724114 lr : 000000004f7240f8 x0 : 0000000010090040 x1 : 0000000000000001 x2 : 0000000000000000 x3 : 0000000000003e80 x4 : 0000000000000038 x5 : 000000004e58e7a2 x6 : 0000000000000000 x7 : 0000000000000000 x8 : 000000004e58ec30 x9 : 00000000ffffffd8 x10: 000000000000000d x11: 0000000000000006 x12: 000000004e58ea88 x13: 000000004e58ed90 x14: 0000000000000000 x15: 000000004e58e7a2 x16: 000000004f716d84 x17: 0000000000000000 x18: 000000004e68ed90 x19: 000000004e695b00 x20: 0000000000000000 x21: 0000000010090040 x22: 0000000010090000 x23: 000000004f79553c x24: 0000000000000000 x25: 0000000000000000 Removing -enable-kvm makes the issue disappear. barebox also reaches the shell normally when -enable-kvm is omitted. Given that I am more familiar with barebox (and the stack traces there actually walk the stack and contain symbols if the data abort happens after the vector table is installed), I debugged the issue there and narrowed it down to a specific encoding of the LDR instruction operating on an MMIO peripheral. More information about that in the bug report linked above. Cheers, Ahmad > > Can you share what SoC is used for the ARM CI server? I assume it doesn't > run into this problem, because it has a GIC >= v3. Mine is a GIC-400, > which apparently only implements GICv2. > > Cheers, > Ahmad > >> >> Cheers, >> >> Richard >> >> >> > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#205225): https://lists.openembedded.org/g/openembedded-core/message/205225 Mute This Topic: https://lists.openembedded.org/mt/108760082/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-