diff options
author | Amit Tomar <amittomer25@gmail.com> | 2015-11-26 10:09:43 +0000 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2015-12-14 11:30:00 +0000 |
commit | b19e6892a90e7c9d15fde0a08516ec891a4e7d54 (patch) | |
tree | fb7416f7a164ef16e0280a56288d2cc79ab696f2 /arch/arm64/kvm/handle_exit.c | |
parent | 8cdb654abe5730654d0385382c4e877a011bb8c8 (diff) | |
download | blackbird-obmc-linux-b19e6892a90e7c9d15fde0a08516ec891a4e7d54.tar.gz blackbird-obmc-linux-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/arm64/kvm/handle_exit.c')
-rw-r--r-- | arch/arm64/kvm/handle_exit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/kvm/handle_exit.c b/arch/arm64/kvm/handle_exit.c index 15f0477b0d2a..8bddae140461 100644 --- a/arch/arm64/kvm/handle_exit.c +++ b/arch/arm64/kvm/handle_exit.c @@ -39,6 +39,7 @@ static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run) trace_kvm_hvc_arm64(*vcpu_pc(vcpu), vcpu_get_reg(vcpu, 0), kvm_vcpu_hvc_get_imm(vcpu)); + vcpu->stat.hvc_exit_stat++; ret = kvm_psci_call(vcpu); if (ret < 0) { @@ -71,9 +72,11 @@ static int kvm_handle_wfx(struct kvm_vcpu *vcpu, struct kvm_run *run) { if (kvm_vcpu_get_hsr(vcpu) & ESR_ELx_WFx_ISS_WFE) { trace_kvm_wfx_arm64(*vcpu_pc(vcpu), true); + vcpu->stat.wfe_exit_stat++; kvm_vcpu_on_spin(vcpu); } else { trace_kvm_wfx_arm64(*vcpu_pc(vcpu), false); + vcpu->stat.wfi_exit_stat++; kvm_vcpu_block(vcpu); } |