summaryrefslogtreecommitdiff
path: root/arch/arm/kvm/mmio.c
diff options
context:
space:
mode:
authorAmit Tomar <amittomer25@gmail.com>2015-11-26 10:09:43 +0000
committerMarc Zyngier <marc.zyngier@arm.com>2015-12-14 11:30:00 +0000
commitb19e6892a90e7c9d15fde0a08516ec891a4e7d54 (patch)
treefb7416f7a164ef16e0280a56288d2cc79ab696f2 /arch/arm/kvm/mmio.c
parent8cdb654abe5730654d0385382c4e877a011bb8c8 (diff)
downloadlwn-b19e6892a90e7c9d15fde0a08516ec891a4e7d54.tar.gz
lwn-b19e6892a90e7c9d15fde0a08516ec891a4e7d54.zip
KVM: arm/arm64: Count guest exit due to various reasons
It would add guest exit statistics to debugfs, this can be helpful while measuring KVM performance. [ Renamed some of the field names - Christoffer ] Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch/arm/kvm/mmio.c')
-rw-r--r--arch/arm/kvm/mmio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/kvm/mmio.c b/arch/arm/kvm/mmio.c
index 3a10c9f1d0a4..7f33b2056ae6 100644
--- a/arch/arm/kvm/mmio.c
+++ b/arch/arm/kvm/mmio.c
@@ -210,8 +210,11 @@ int io_mem_abort(struct kvm_vcpu *vcpu, struct kvm_run *run,
if (!ret) {
/* We handled the access successfully in the kernel. */
+ vcpu->stat.mmio_exit_kernel++;
kvm_handle_mmio_return(vcpu, run);
return 1;
+ } else {
+ vcpu->stat.mmio_exit_user++;
}
run->exit_reason = KVM_EXIT_MMIO;