diff options
author | Suresh E. Warrier <warrier@linux.vnet.ibm.com> | 2015-03-20 10:39:45 +0100 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2015-04-21 15:21:30 +0200 |
commit | 878610fe9884a34a282cd4431237343864324d23 (patch) | |
tree | e87987f0da6ea462d6a790cebe3673fba8a6d8ff /arch/powerpc/kvm/book3s_xics.h | |
parent | KVM: PPC: Book3S HV: Add helpers for lock/unlock hpte (diff) | |
download | linux-878610fe9884a34a282cd4431237343864324d23.tar.xz linux-878610fe9884a34a282cd4431237343864324d23.zip |
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.h | 6 |
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; |