summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_xics.h
diff options
context:
space:
mode:
authorSuresh E. Warrier <warrier@linux.vnet.ibm.com>2015-03-20 20:39:45 +1100
committerAlexander Graf <agraf@suse.de>2015-04-21 15:21:30 +0200
commit878610fe9884a34a282cd4431237343864324d23 (patch)
treee87987f0da6ea462d6a790cebe3673fba8a6d8ff /arch/powerpc/kvm/book3s_xics.h
parenta4bd6eb07ca72d21a7a34499ad34cfef6f527d4e (diff)
downloadlinux-878610fe9884a34a282cd4431237343864324d23.tar.bz2
KVM: PPC: Book3S HV: Add guest->host real mode completion counters
Add counters to track number of times we switch from guest real mode to host virtual mode during an interrupt-related hyper call because the hypercall requires actions that cannot be completed in real mode. This will help when making optimizations that reduce guest-host transitions. It is safe to use an ordinary increment rather than an atomic operation because there is one ICP per virtual CPU and kvmppc_xics_rm_complete() only works on the ICP for the current VCPU. The counters are displayed as part of IPC and ICP state provided by /sys/debug/kernel/powerpc/kvm* for each VM. Signed-off-by: Suresh Warrier <warrier@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/book3s_xics.h')
-rw-r--r--arch/powerpc/kvm/book3s_xics.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_xics.h b/arch/powerpc/kvm/book3s_xics.h
index 73f0f2723c07..de970eca2167 100644
--- a/arch/powerpc/kvm/book3s_xics.h
+++ b/arch/powerpc/kvm/book3s_xics.h
@@ -78,6 +78,12 @@ struct kvmppc_icp {
u32 rm_reject;
u32 rm_eoied_irq;
+ /* Counters for each reason we exited real mode */
+ unsigned long n_rm_kick_vcpu;
+ unsigned long n_rm_check_resend;
+ unsigned long n_rm_reject;
+ unsigned long n_rm_notify_eoi;
+
/* Debug stuff for real mode */
union kvmppc_icp_state rm_dbgstate;
struct kvm_vcpu *rm_dbgtgt;