summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorAmit Shah2008-02-20 20:30:30 +0100
committerAvi Kivity2008-04-27 10:53:24 +0200
commitf11c3a8d84d7bf091bf963edd7104dd4ba6416c3 (patch)
treee297b6cee55b06c8ec40fe00998deef7cfe4a7ce /arch/x86/kvm/x86.c
parentKVM: Use x86's segment descriptor struct instead of private definition (diff)
downloadkernel-qcow2-linux-f11c3a8d84d7bf091bf963edd7104dd4ba6416c3.tar.gz
kernel-qcow2-linux-f11c3a8d84d7bf091bf963edd7104dd4ba6416c3.tar.xz
kernel-qcow2-linux-f11c3a8d84d7bf091bf963edd7104dd4ba6416c3.zip
KVM: Add stat counter for hypercalls
Signed-off-by: Amit Shah <amit.shah@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index a063f449a12e..15bba5d37931 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -72,6 +72,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
{ "irq_window", VCPU_STAT(irq_window_exits) },
{ "halt_exits", VCPU_STAT(halt_exits) },
{ "halt_wakeup", VCPU_STAT(halt_wakeup) },
+ { "hypercalls", VCPU_STAT(hypercalls) },
{ "request_irq", VCPU_STAT(request_irq_exits) },
{ "irq_exits", VCPU_STAT(irq_exits) },
{ "host_state_reload", VCPU_STAT(host_state_reload) },
@@ -2405,6 +2406,7 @@ int kvm_emulate_hypercall(struct kvm_vcpu *vcpu)
}
vcpu->arch.regs[VCPU_REGS_RAX] = ret;
kvm_x86_ops->decache_regs(vcpu);
+ ++vcpu->stat.hypercalls;
return 0;
}
EXPORT_SYMBOL_GPL(kvm_emulate_hypercall);