Re: [PATCH v3 0/7] KVM: x86: More EFER.LMA vs. CR4.PAE fixes

From: Sean Christopherson

Date: Fri Nov 13 2026 - 12:32:55 EST


On Fri, 30 Oct 2026 14:27:14 -0700, Sean Christopherson wrote:
> Revert a change I made years ago to allow userspace to stuff EFER before
> configuring guest CPUID, as configuring CPUID and feature MSRs before anything
> else is now a hard requirement (though I suspect I was just a bit overzealous
> at the time). The biggest problem with that change, other than creating what
> should be impossible state, is that it also bypassed this check:
>
> if (is_paging(vcpu) &&
> (vcpu->arch.efer & EFER_LME) != (efer & EFER_LME))
> return 1;
>
> [...]

Applied to kvm-x86 misc, thanks!

[1/7] Revert "KVM: x86: Skip EFER vs. guest CPUID checks for host-initiated writes"
https://github.com/kvm-x86/linux/commit/be2456d2d8c4
[2/7] KVM: x86: Treat EFER.LMA, not EFER.LMA, as an EFER MMU role bit
https://github.com/kvm-x86/linux/commit/1db15faf1f4b
[3/7] KVM: x86: Reject clearing EFER.SVME via KVM_SYNC_X86_SREGS if L2 is active
https://github.com/kvm-x86/linux/commit/d164d4e9fb35
[4/7] KVM: nSVM: Synthesize #GP instead of SHUTDOWN if L2 attempts to clear EFER.SVME
https://github.com/kvm-x86/linux/commit/bc45c91a154c
[5/7] KVM: x86: Recompute EFER.LMA instead of inheriting the current value on EFER writes
https://github.com/kvm-x86/linux/commit/a9ec87610ccf
[6/7] KVM: selftests: Update nSVM EFER test to expect #GP when clearing SVME in L2
https://github.com/kvm-x86/linux/commit/1c7d26871fac
[7/7] KVM: selftests: Expect failure when trying to set EFER that violates vCPU model
https://github.com/kvm-x86/linux/commit/e0160d1e1d42

--
https://github.com/kvm-x86/linux/tree/next