summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_xics.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-04-17 20:31:15 +0000
committerAlexander Graf <agraf@suse.de>2013-04-26 20:27:32 +0200
commite7d26f285b4be9466c9e393139e1c9cffe4cedfc (patch)
tree0afc30678671f87be82992d306cdec3b984bc6dd /arch/powerpc/kvm/book3s_xics.h
parent54695c3088a74e25474db8eb6b490b45d1aeb0ca (diff)
KVM: PPC: Book3S HV: Add support for real mode ICP in XICS emulation
This adds an implementation of the XICS hypercalls in real mode for HV KVM, which allows us to avoid exiting the guest MMU context on all threads for a variety of operations such as fetching a pending interrupt, EOI of messages, IPIs, etc. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> 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.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_xics.h b/arch/powerpc/kvm/book3s_xics.h
index 58ee190de5e..c816c5a49c9 100644
--- a/arch/powerpc/kvm/book3s_xics.h
+++ b/arch/powerpc/kvm/book3s_xics.h
@@ -64,6 +64,20 @@ struct kvmppc_icp {
unsigned long server_num;
union kvmppc_icp_state state;
unsigned long resend_map[ICP_RESEND_MAP_SIZE];
+
+ /* Real mode might find something too hard, here's the action
+ * it might request from virtual mode
+ */
+#define XICS_RM_KICK_VCPU 0x1
+#define XICS_RM_CHECK_RESEND 0x2
+#define XICS_RM_REJECT 0x4
+ u32 rm_action;
+ struct kvm_vcpu *rm_kick_target;
+ u32 rm_reject;
+
+ /* Debug stuff for real mode */
+ union kvmppc_icp_state rm_dbgstate;
+ struct kvm_vcpu *rm_dbgtgt;
};
struct kvmppc_ics {
@@ -76,6 +90,8 @@ struct kvmppc_xics {
struct kvm *kvm;
struct dentry *dentry;
u32 max_icsid;
+ bool real_mode;
+ bool real_mode_dbg;
struct kvmppc_ics *ics[KVMPPC_XICS_MAX_ICS_ID + 1];
};