On Thu, 17 Oct 2024 at 13:13, Catalin Marinas catalin.marinas@arm.com wrote:
On Thu, Oct 17, 2024 at 12:50:42PM +0100, Peter Maydell wrote:
On Thu, 17 Oct 2024 at 12:34, Catalin Marinas catalin.marinas@arm.com wrote:
At least the boot log is shown (for this email, others point to missing pages). However, it looks more like a Qemu bug, something about SME it doesn't like:
ERROR:target/arm/internals.h:923:regime_is_user: code should not be reached Bail out! ERROR:target/arm/internals.h:923:regime_is_user: code should not be reached
I tried Qemu 7.2.0 and 8.2.4, both from Debian (stable and unstable). Adding Peter, maybe he has any idea.
Yeah, we shouldn't be hitting asserts (to state the obvious).
If you can provide the QEMU command line and the kernel/etc files needed to run it, I can have a look.
The kernel defconfig should be sufficient to trigger it. It must be the for-kernelci branch from here:
https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/
My qemu command line is:
qemu-system-aarch64 \ -machine virt,gic_version=3,mte=on \ -cpu max \ -smp 2 -m 2G \ -kernel </path/to/Image> \ -semihosting -nographic \ -serial mon:stdio \ -monitor tcp:0.0.0.0:4000,server,nowait \ -netdev user,id=net0,hostfwd=tcp:0.0.0.0:4022-:22 \ -device virtio-net-device,netdev=net0 \ -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-pci,rng=rng0 \ -append 'console=ttyAMA0 earlycon=pl011,0x9000000 loglevel=9 ip=dhcp root=/dev/nfs rw nfsroot=<ip-addr>:/srv/nfs/debian-arm64,tcp,v4 kasan.mode=sync'
Thanks. This turns out to be a bug in our FEAT_E0PD emulation which you'll hit if the guest enables E0PD by setting th TCR_ELx bits. The fix is straightforward and I've just sent a patch to qemu-devel:
https://lore.kernel.org/qemu-devel/20241017172331.822587-1-peter.maydell@lin...
-- PMM