Skip to content

Commit 6141df0

Browse files
shvipinsean-jc
authored andcommitted
KVM: x86/mmu: Drop unnecessary dirty log checks when aging TDP MMU SPTEs
Drop the unnecessary call to handle dirty log updates when aging TDP MMU SPTEs, as neither clearing the Accessed bit nor marking a SPTE for access tracking can _set_ the Writable bit, i.e. can't trigger marking a gfn dirty in its memslot. The access tracking path can _clear_ the Writable bit, e.g. if the XCHG races with fast_page_fault() and writes the stale value without the Writable bit set, but clearing the Writable bit outside of mmu_lock is not allowed, i.e. access tracking can't spuriously set the Writable bit. Signed-off-by: Vipin Sharma <vipinsh@google.com> [sean: split to separate patch, apply to dirty path, write changelog] Link: https://lore.kernel.org/r/20230321220021.2119033-10-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 7ee131e commit 6141df0

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

arch/x86/kvm/mmu/tdp_mmu.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,8 +1277,6 @@ static bool age_gfn_range(struct kvm *kvm, struct tdp_iter *iter,
12771277

12781278
__handle_changed_spte(kvm, iter->as_id, iter->gfn, iter->old_spte,
12791279
new_spte, iter->level, false);
1280-
handle_changed_spte_dirty_log(kvm, iter->as_id, iter->gfn,
1281-
iter->old_spte, new_spte, iter->level);
12821280
return true;
12831281
}
12841282

0 commit comments

Comments
 (0)