diff mbox series

[4/5] KVM: x86/mmu: Use innermost rmap zap helper when recycling rmaps

Message ID 20220712015558.1247978-5-seanjc@google.com (mailing list archive)
State New, archived
Headers show
Series KVM: x86: Clean up rmap zap helpers | expand

Commit Message

Sean Christopherson July 12, 2022, 1:55 a.m. UTC
Use ____kvm_zap_rmaps() directly when recycling rmaps instead of bouncing
through kvm_zap_rmaps() and __kvm_zap_rmaps().  Calling kvm_zap_rmaps()
is unnecessary and odd as it requires passing dummy parameters; passing
NULL for @slot when __rmap_add() already has a valid slot is especially
weird and confusing.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
---
 arch/x86/kvm/mmu/mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index fbe808bb0ce1..496672ffaf46 100644
--- a/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -1596,7 +1596,7 @@  static void __rmap_add(struct kvm *kvm,
 	rmap_count = pte_list_add(cache, spte, rmap_head);
 
 	if (rmap_count > RMAP_RECYCLE_THRESHOLD) {
-		kvm_zap_rmaps(kvm, rmap_head, NULL, gfn, sp->role.level, __pte(0));
+		____kvm_zap_rmaps(kvm, rmap_head);
 		kvm_flush_remote_tlbs_with_address(
 				kvm, sp->gfn, KVM_PAGES_PER_HPAGE(sp->role.level));
 	}