aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-12-18 12:47:18 -0500
committerAvi Kivity <avi@qumranet.com>2008-01-30 11:01:19 -0500
commitdfc5aa00cbe888d3a9ea97775bbac74cb1c1a1d8 (patch)
tree4b39394d26c4a71e9325959fd1a9b438c2e3a239
parentcaa5b8a5ed27708521e0667649699fea202043b2 (diff)
KVM: MMU: Add cache miss statistic
Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r--arch/x86/kvm/mmu.c1
-rw-r--r--arch/x86/kvm/x86.c1
-rw-r--r--include/asm-x86/kvm_host.h1
3 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 9a57e1a01449..8f12ec52ad86 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -715,6 +715,7 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu,
715 pgprintk("%s: found\n", __FUNCTION__); 715 pgprintk("%s: found\n", __FUNCTION__);
716 return sp; 716 return sp;
717 } 717 }
718 ++vcpu->kvm->stat.mmu_cache_miss;
718 sp = kvm_mmu_alloc_page(vcpu, parent_pte); 719 sp = kvm_mmu_alloc_page(vcpu, parent_pte);
719 if (!sp) 720 if (!sp)
720 return sp; 721 return sp;
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 733bff65d9a9..fa9e42c03741 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -73,6 +73,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
73 { "mmu_pde_zapped", VM_STAT(mmu_pde_zapped) }, 73 { "mmu_pde_zapped", VM_STAT(mmu_pde_zapped) },
74 { "mmu_flooded", VM_STAT(mmu_flooded) }, 74 { "mmu_flooded", VM_STAT(mmu_flooded) },
75 { "mmu_recycled", VM_STAT(mmu_recycled) }, 75 { "mmu_recycled", VM_STAT(mmu_recycled) },
76 { "mmu_cache_miss", VM_STAT(mmu_cache_miss) },
76 { "remote_tlb_flush", VM_STAT(remote_tlb_flush) }, 77 { "remote_tlb_flush", VM_STAT(remote_tlb_flush) },
77 { NULL } 78 { NULL }
78}; 79};
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h
index 28940e1a9713..ced1bebabbc8 100644
--- a/include/asm-x86/kvm_host.h
+++ b/include/asm-x86/kvm_host.h
@@ -289,6 +289,7 @@ struct kvm_vm_stat {
289 u32 mmu_pde_zapped; 289 u32 mmu_pde_zapped;
290 u32 mmu_flooded; 290 u32 mmu_flooded;
291 u32 mmu_recycled; 291 u32 mmu_recycled;
292 u32 mmu_cache_miss;
292 u32 remote_tlb_flush; 293 u32 remote_tlb_flush;
293}; 294};
294 295