summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/mmu
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2021-03-26 05:19:46 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2021-04-17 15:30:55 +0300
commitaaaac889cf63a6c2e5f4b20c20cccf5aeb78bd51 (patch)
treea32b6b8d7d8b94164a83389df67964da4e46f10a /arch/x86/kvm/mmu
parenta3f15bda46e85c33e55b23aa51dd542453f134e3 (diff)
downloadlinux-aaaac889cf63a6c2e5f4b20c20cccf5aeb78bd51.tar.xz
KVM: x86/mmu: Use leaf-only loop for walking TDP SPTEs when changing SPTE
Use the leaf-only TDP iterator when changing the SPTE in reaction to a MMU notifier. Practically speaking, this is a nop since the guts of the loop explicitly looks for 4k SPTEs, which are always leaf SPTEs. Switch the iterator to match age_gfn_range() and test_age_gfn() so that a future patch can consolidate the core iterating logic. No real functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20210326021957.1424875-8-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu')
-rw-r--r--arch/x86/kvm/mmu/tdp_mmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c
index 3608f4aa1d08..6b7a5368217b 100644
--- a/arch/x86/kvm/mmu/tdp_mmu.c
+++ b/arch/x86/kvm/mmu/tdp_mmu.c
@@ -1037,7 +1037,7 @@ static int set_tdp_spte(struct kvm *kvm, struct kvm_memory_slot *slot,
new_pfn = pte_pfn(*ptep);
- tdp_root_for_each_pte(iter, root, gfn, gfn + 1) {
+ tdp_root_for_each_leaf_pte(iter, root, gfn, gfn + 1) {
if (iter.level != PG_LEVEL_4K)
continue;