[Android-virt] [PATCH v2 11/11] ARM: KVM: Add MMIO exit statistics to debugfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



MMIO exit statistics can be a very valuable information when looking
at KVM performance.

Expose them through debugfs.

Signed-off-by: Marc Zyngier <marc.zyngier at arm.com>
---
 arch/arm/kvm/mmu.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
index d63e05e..c52c145 100644
--- a/arch/arm/kvm/mmu.c
+++ b/arch/arm/kvm/mmu.c
@@ -665,6 +665,10 @@ static int io_mem_abort(struct kvm_vcpu *vcpu, struct kvm_run *run,
 	switch (run->exit_reason) {
 	case KVM_EXIT_MMIO:
 		run->mmio = mmio.mmio;
+		vcpu->stat.mmio_exits++;
+		break;
+	case KVM_EXIT_UNKNOWN:
+		vcpu->stat.kmmio_exits++;
 		break;
 	}
 
@@ -674,7 +678,6 @@ static int io_mem_abort(struct kvm_vcpu *vcpu, struct kvm_run *run,
 	 */
 	*vcpu_pc(vcpu) += instr_len;
 	kvm_adjust_itstate(vcpu);
-	vcpu->stat.mmio_exits++;
 	return run->exit_reason;
 }
 
-- 
1.7.10.3





[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux