]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: nVMX: Add consistency checks for CR0.WP and CR4.CET
authorChao Gao <chao.gao@intel.com>
Fri, 19 Sep 2025 22:32:39 +0000 (15:32 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 23 Sep 2025 16:24:35 +0000 (09:24 -0700)
commit8060b2bd2dd05a19ad7ec248489d374f2bd2b057
tree58c0018ac909761fa70976bf904f871339c95bee
parent625884996bff1b25a39834fa4935d695d71ef1b1
KVM: nVMX: Add consistency checks for CR0.WP and CR4.CET

Add consistency checks for CR4.CET and CR0.WP in guest-state or host-state
area in the VMCS12. This ensures that configurations with CR4.CET set and
CR0.WP not set result in VM-entry failure, aligning with architectural
behavior.

Tested-by: Mathias Krause <minipli@grsecurity.net>
Tested-by: John Allen <john.allen@amd.com>
Tested-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
Signed-off-by: Chao Gao <chao.gao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com>
Link: https://lore.kernel.org/r/20250919223258.1604852-33-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/nested.c