]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86: make translate_nested_gpa vendor-specific
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Apr 2026 15:42:02 +0000 (11:42 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 10 May 2026 12:52:57 +0000 (14:52 +0200)
commitb95b398d2e6d13ed47d4ab25bce499c7240923a1
treea95392bc9eefd9ef58d6ad7b1b15ad3977242673
parent2c89d577548e5a74d417415014a14d8d7fb3518d
KVM: x86: make translate_nested_gpa vendor-specific

EPT and NPT have different rules for passing PFERR_USER_MASK to the
nested page table walk.  In particular, for final addresses EPT
uses the U bit of the guest (nGVA->nGPA) walk.

While at it, remove PFERR_USER_MASK from the VMX version of the
function, since it is actually ignored by the tables that
update_permission_bitmask() generates for EPT.

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