diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-04-17 20:31:15 +0000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-04-26 20:27:32 +0200 |
commit | e7d26f285b4be9466c9e393139e1c9cffe4cedfc (patch) | |
tree | 0afc30678671f87be82992d306cdec3b984bc6dd /arch/powerpc/kvm/book3s_xics.h | |
parent | 54695c3088a74e25474db8eb6b490b45d1aeb0ca (diff) | |
download | linux-e7d26f285b4be9466c9e393139e1c9cffe4cedfc.tar.bz2 |
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.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_xics.h b/arch/powerpc/kvm/book3s_xics.h index 58ee190de5e5..c816c5a49c90 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]; }; |