]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: nVMX: Decouple EPT RWX bits from EPT Violation protection bits
authorSean Christopherson <seanjc@google.com>
Thu, 27 Feb 2025 00:07:05 +0000 (16:07 -0800)
committerSean Christopherson <seanjc@google.com>
Fri, 28 Feb 2025 17:14:05 +0000 (09:14 -0800)
commit61146f67e4cb67064ce3003d94ee19302d314fff
tree6357fbbac84abcd34101e00a34816bfef4812283
parentfa6c8fc2d2673dcaf7333bc35eb759ab7c39b81f
KVM: nVMX: Decouple EPT RWX bits from EPT Violation protection bits

Define independent macros for the RWX protection bits that are enumerated
via EXIT_QUALIFICATION for EPT Violations, and tie them to the RWX bits in
EPT entries via compile-time asserts.  Piggybacking the EPTE defines works
for now, but it creates holes in the EPT_VIOLATION_xxx macros and will
cause headaches if/when KVM emulates Mode-Based Execution (MBEC), or any
other features that introduces additional protection information.

Opportunistically rename EPT_VIOLATION_RWX_MASK to EPT_VIOLATION_PROT_MASK
so that it doesn't become stale if/when MBEC support is added.

No functional change intended.

Cc: Jon Kohler <jon@nutanix.com>
Cc: Nikolay Borisov <nik.borisov@suse.com>
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
Link: https://lore.kernel.org/r/20250227000705.3199706-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/vmx.h
arch/x86/kvm/mmu/paging_tmpl.h
arch/x86/kvm/vmx/vmx.c