I got back to this a couple days ago, here's what I've learned. I tried decoding the QEMU syndrome - but be warned, I've never done this before. I believe what it is reporting is an EPT[*] misconfiguration.
I noticed that the 5.4 -generic kernel does not reproduce the issue, while the -kvm one does. I tried comparing the configs, but there's really nothing obvious there. Disabling DYNAMIC_FTRACE did seem to cause the -generic kernel to fail, but turning it on did not fix the -kvm kernel, so that seems like a red herring. I noticed that newer guest kernels do not seem to reproduce the problem. I bisected the guest kernels and hit this commit: f1d4d47c5851 x86/setup: Always reserve the first 1M of RAM This was introduced upstream in v5.13 and appears to be a workaround for BIOSes that corrupt memory under 1M. By default, both the -generic and -kvm kernels build with CONFIG_X86_RESERVE_LOW=64, which avoids using the first 64K of memory. So this suggests that something might be getting corrupted in the 64K->1M region. There's also a kernel parameter you can use to modify this called "reservelow", and if I add "reservelow=1024k" to the cmdline, the -kvm kernel no longer crashes. It seems like some kind of corruption maybe going on - possibly by edk2/ovmf. As a next step I think I'll try to figure out if I can run the VM under GDB and have it trap writes to that memory area. [*] https://en.wikipedia.org/wiki/Second_Level_Address_Translation#Extended_Page_Tables -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1935880 Title: lxc c2-m2 focal VM causes KVM internal error during PCI init To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1935880/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
