Didn't spot this one first time around. :-) The code looks fine to me, and in my test, it does indeed fix the immediate crash.
There's still something making OVMF from Qemu 8.1 very, very unhappy even with this patch - I'm getting memory allocation errors from it and can't get anywhere near booting an OS, but I get the same result in TCG mode, or if I disable CPUID_EXT2_PDPE1GB in hvf without this patch, so that's not a regression caused by this change. I found no other problems with a quick spot check using older OVMF and a few other VMs. Reviewed-by: Phil Dennis-Jordan <p...@philjordan.eu> On Tue, 17 Oct 2023 at 22:16, Alexander Graf <ag...@csgraf.de> wrote: > > > On 21.04.23 00:52, Alexander Graf wrote: > > Hvf on x86 only supported 2MiB large pages, but never bothered to strip > > out the 1GiB page size capability from -cpu host. With QEMU 8.0.0 this > > became a problem because OVMF started to use 1GiB pages by default. > > > > Let's just unconditionally add 1GiB page walk support to the walker. > > > > With this fix applied, I can successfully run OVMF again. > > > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1603 > > Signed-off-by: Alexander Graf <ag...@csgraf.de> > > Reported-by: Akihiro Suda <akihiro.suda...@hco.ntt.co.jp> > > Reported-by: Philippe Mathieu-Daudé <phi...@linaro.org> > > > Ping. Anyone willing to pick this up? :) > > > Alex > > >