diff options
author | Paul Mackerras <paulus@samba.org> | 2013-04-17 16:32:26 -0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-04-26 14:27:34 -0400 |
commit | 8b78645c93b5d469e8006d68dbc92edc2640c654 (patch) | |
tree | 5f558213cc4bd2677069232d7dc1a78c96aee165 /arch/powerpc/include/uapi | |
parent | d19bd86204f85d42873e07bb64a27587fc380b5b (diff) |
KVM: PPC: Book3S: Facilities to save/restore XICS presentation ctrler state
This adds the ability for userspace to save and restore the state
of the XICS interrupt presentation controllers (ICPs) via the
KVM_GET/SET_ONE_REG interface. Since there is one ICP per vcpu, we
simply define a new 64-bit register in the ONE_REG space for the ICP
state. The state includes the CPU priority setting, the pending IPI
priority, and the priority and source number of any pending external
interrupt.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/include/uapi')
-rw-r--r-- | arch/powerpc/include/uapi/asm/kvm.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/include/uapi/asm/kvm.h b/arch/powerpc/include/uapi/asm/kvm.h index eb9e25c194ad..427b9aca2a0f 100644 --- a/arch/powerpc/include/uapi/asm/kvm.h +++ b/arch/powerpc/include/uapi/asm/kvm.h | |||
@@ -390,6 +390,18 @@ struct kvm_get_htab_header { | |||
390 | __u16 n_invalid; | 390 | __u16 n_invalid; |
391 | }; | 391 | }; |
392 | 392 | ||
393 | /* Per-vcpu XICS interrupt controller state */ | ||
394 | #define KVM_REG_PPC_ICP_STATE (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x8c) | ||
395 | |||
396 | #define KVM_REG_PPC_ICP_CPPR_SHIFT 56 /* current proc priority */ | ||
397 | #define KVM_REG_PPC_ICP_CPPR_MASK 0xff | ||
398 | #define KVM_REG_PPC_ICP_XISR_SHIFT 32 /* interrupt status field */ | ||
399 | #define KVM_REG_PPC_ICP_XISR_MASK 0xffffff | ||
400 | #define KVM_REG_PPC_ICP_MFRR_SHIFT 24 /* pending IPI priority */ | ||
401 | #define KVM_REG_PPC_ICP_MFRR_MASK 0xff | ||
402 | #define KVM_REG_PPC_ICP_PPRI_SHIFT 16 /* pending irq priority */ | ||
403 | #define KVM_REG_PPC_ICP_PPRI_MASK 0xff | ||
404 | |||
393 | /* Device control API: PPC-specific devices */ | 405 | /* Device control API: PPC-specific devices */ |
394 | #define KVM_DEV_MPIC_GRP_MISC 1 | 406 | #define KVM_DEV_MPIC_GRP_MISC 1 |
395 | #define KVM_DEV_MPIC_BASE_ADDR 0 /* 64-bit */ | 407 | #define KVM_DEV_MPIC_BASE_ADDR 0 /* 64-bit */ |