On 10/2/23 13:04, Nathan Chancellor wrote: > On Mon, Sep 11, 2023 at 05:27:03PM -0700, Adam Dunlap wrote: >> Instead of setting x86_virt_bits to a possibly-correct value and then >> correcting it later, do all the necessary checks before setting it. >> >> At this point, the #VC handler references boot_cpu_data.x86_virt_bits, >> and in the previous version, it would be triggered by the cpuids between >> the point at which it is set to 48 and when it is set to the correct >> value. >> >> Suggested-by: Dave Hansen >> Signed-off-by: Adam Dunlap > Our continuous integration started seeing panics when booting ARCH=i386 > without KVM after this change landed in -tip as commit fbf6449f84bf > ("x86/sev-es: Set x86_virt_bits to the correct value straight away, > instead of a two-phase approach"): I can't reproduce this, but I'm running a gcc-built kernel and I haven't tried very hard to replicate your qemu setup. I did notice, though, that the patch in question forgot to move one assignment. Could you see if the attached patch fixes things for you?