]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86/mmu: add support for MBEC to EPT page table walks
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Apr 2026 15:42:08 +0000 (11:42 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 10 May 2026 12:55:07 +0000 (14:55 +0200)
commitd220bcf026f0a4bc450744e427ad8fc08855f752
treea77e3cad8c26aa0c172fd49c5468532540af1840
parent9c167cb3c14c486e683fe4248a8309eb4dd3042b
KVM: x86/mmu: add support for MBEC to EPT page table walks

Extend the page walker to support moving bit 10 of the PTEs
into ACC_USER_EXEC_MASK and bit 6 of the exit qualification of
EPT violation VM exits.

Note that while mmu_has_mbec()/cr4_smep affect the interpretation of
ACC_USER_EXEC_MASK and add bit 10 as a "present bit" in guest EPT page
table entries, they do not affect how KVM operates on SPTEs.  That's
because the MMU uses explicit ACC_USER_EXEC_MASK/shadow_xu_mask even for
the non-nested EPT; the only difference is that ACC_USER_EXEC_MASK and
ACC_EXEC_MASK will always be set in tandem outside the nested scenario.

Tested-by: David Riley <d.riley@proxmox.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/paging_tmpl.h
arch/x86/kvm/mmu/spte.h
arch/x86/kvm/vmx/nested.c