Re: [PATCH v3 0/5] KVM: nVMX: Honor L1-owned CR0 bits for LMSW

From: Sean Christopherson

Date: Fri Nov 13 2026 - 10:33:30 EST


On Fri, 30 Oct 2026 14:37:42 -0700, Sean Christopherson wrote:
> Fix a bug where KVM ignores vmcs12's CR0 guest/host mask when emulating an
> LMSW from L2, i.e. an LMSW tha exits to L0 but not to L1.
>
> v3:
> - Handle the read_shadow in handle_set_cr0() (and for CR4, because why not).
> - Kill off kvm_lmsw() entirely.
> - Add a bunch of comments to the selftest to explain the dangers of running
> with CR0.TS=1.
> - Test MOV CR0 as well as LMSW.
> - Add a patch to take full ownership of the must-be-1 CR0 and CR4 bits.
>
> [...]

Applied to kvm-x86 vmx, thanks!

[1/5] KVM: nVMX: Preserve L1-owned bits in CR{0,4} read shadows
https://github.com/kvm-x86/linux/commit/3193e9153882
[2/5] KVM: nVMX: Honor L1-owned CR0 bits when emulating intercepted LMSW for L2
https://github.com/kvm-x86/linux/commit/7e538a7bb16b
[3/5] KVM: nVMX: Synthesize #GP if L2 writes a "bad" CR0 value via LMSW
https://github.com/kvm-x86/linux/commit/7672fa397f00
[4/5] KVM: nVMX: Take full ownership of the post-VMXON CR{0,4} must-be-1 bits
https://github.com/kvm-x86/linux/commit/565c14684d6f
[5/5] KVM: selftests: Verify KVM handling of L1-owned CR0 bits on writes from L2
https://github.com/kvm-x86/linux/commit/798e54a8c0bc

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