public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: x86: count number of zapped pages for tdp_mmu
@ 2024-01-03 12:39 Liang Chen
  2024-01-03 15:25 ` Sean Christopherson
  0 siblings, 1 reply; 5+ messages in thread
From: Liang Chen @ 2024-01-03 12:39 UTC (permalink / raw)
  To: pbonzini, seanjc; +Cc: kvm, liangchen.linux

Count the number of zapped pages of tdp_mmu for vm stat.

Signed-off-by: Liang Chen <liangchen.linux@gmail.com>
---
 arch/x86/kvm/mmu/tdp_mmu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c
index 6cd4dd631a2f..7f8bc1329aac 100644
--- a/arch/x86/kvm/mmu/tdp_mmu.c
+++ b/arch/x86/kvm/mmu/tdp_mmu.c
@@ -325,6 +325,7 @@ static void handle_removed_pt(struct kvm *kvm, tdp_ptep_t pt, bool shared)
 	int i;
 
 	trace_kvm_mmu_prepare_zap_page(sp);
+	++kvm->stat.mmu_shadow_zapped;
 
 	tdp_mmu_unlink_sp(kvm, sp, shared);
 
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-01-05  1:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-03 12:39 [PATCH] KVM: x86: count number of zapped pages for tdp_mmu Liang Chen
2024-01-03 15:25 ` Sean Christopherson
2024-01-04  4:14   ` Liang Chen
2024-01-04 18:29     ` David Matlack
2024-01-05  1:47       ` Liang Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox