]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: VMX: Use kvm_mmu_page role to construct EPTP, not current vCPU state
authorSean Christopherson <seanjc@google.com>
Fri, 19 Sep 2025 00:59:50 +0000 (17:59 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 17 Oct 2025 22:11:26 +0000 (15:11 -0700)
commit2f723a86342355fee85574352a165e8bf6fa5372
tree96ed2b645cce3b1a5c2c32f2d4fe3a513f3492d7
parenta10f5cc3ac9b05c764e87ae13de9a716ff519903
KVM: VMX: Use kvm_mmu_page role to construct EPTP, not current vCPU state

Use the role for the to-be-loaded/invalidated EPT root to compute the
root's level and A/D enablement instead of pulling the information from
the vCPU (e.g. by passing in the root level and querying vmcs12).  Not
making unnecessary assumptions about the root will allow invalidating
arbitrary EPT roots (which sadly requires a full EPTP) at any given time.

No functional change intended (the end result should be the same).

Link: https://lore.kernel.org/r/20250919005955.1366256-5-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/vmx.c