Re: [PATCH] KVM: x86: Clear CR3[63:32] on SMM entry from long mode

From: Sean Christopherson

Date: Mon Sep 28 2026 - 14:25:19 EST


On Mon, Sep 28, 2026, Wei Liu wrote:
> Hi Qiliang
>
> On Mon, Sep 28, 2026 at 03:25:34PM +0800, Qiliang Yuan wrote:
> > +Cc Hyper-V folks and linux-hyperv, since the failure is triggered by
> > Hyper-V's handling of VMRUN for a nested (L1) hypervisor, i.e. KVM
> > running on WSL2.
> >
> > For the Hyper-V side: the VMRUN is rejected when the guest state has
> > CR0.PG=0, EFER.LMA=0 and CR3[63:32] != 0, a combination that bare-metal
> > SVM does not reject. Is that check intentional? If it is not, a
> > Hyper-V fix would help older KVM versions as well; either way the patch
> > avoids creating that state in the first place.
> >
> > The full patch is here:
> > https://lore.kernel.org/r/20260928-kvm-smm-cr3-upper-bits-v1-1-138f52dd531e@xxxxxxxxx
>
> Please share the Windows version from `winver`.
>
> My colleague said that it had been fixed. Maybe the change needs to be ported.

Ya, I'd much prefer to get this fixed in Hyper-V. If we need to carry a KVM hack,
then at the very least it should be limited to when KVM detects that it's running
on Hyper-V.