Skip to content

Commit 891f115

Browse files
shvipinsean-jc
authored andcommitted
KVM: x86/mmu: Bypass __handle_changed_spte() when aging TDP MMU SPTEs
Drop everything except the "tdp_mmu_spte_changed" tracepoint part of __handle_changed_spte() when aging SPTEs in the TDP MMU, as clearing the accessed status doesn't affect the SPTE's shadow-present status, whether or not the SPTE is a leaf, or change the PFN. I.e. none of the functional updates handled by __handle_changed_spte() are relevant. Losing __handle_changed_spte()'s sanity checks does mean that a bug could theoretical go unnoticed, but that scenario is extremely unlikely, e.g. would effectively require a misconfigured MMU or a locking bug elsewhere. Link: https://lore.kernel.org/all/Y9HcHRBShQgjxsQb@google.com Signed-off-by: Vipin Sharma <vipinsh@google.com> Reviewed-by: David Matlack <dmatlack@google.com> [sean: massage changelog] Link: https://lore.kernel.org/r/20230321220021.2119033-11-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 6141df0 commit 891f115

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/x86/kvm/mmu/tdp_mmu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,8 +1275,8 @@ static bool age_gfn_range(struct kvm *kvm, struct tdp_iter *iter,
12751275
iter->level);
12761276
}
12771277

1278-
__handle_changed_spte(kvm, iter->as_id, iter->gfn, iter->old_spte,
1279-
new_spte, iter->level, false);
1278+
trace_kvm_tdp_mmu_spte_changed(iter->as_id, iter->gfn, iter->level,
1279+
iter->old_spte, new_spte);
12801280
return true;
12811281
}
12821282

0 commit comments

Comments
 (0)