diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2013-04-17 16:30:00 -0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-04-26 14:27:29 -0400 |
commit | 8e591cb7204739efa8e15967ea334eb367039dde (patch) | |
tree | 3fa76d3875c8133eeafc2e36372aaf83232fc54f /include/uapi | |
parent | 91194919a6b07d70081fe185a79b129efee84fff (diff) |
KVM: PPC: Book3S: Add infrastructure to implement kernel-side RTAS calls
For pseries machine emulation, in order to move the interrupt
controller code to the kernel, we need to intercept some RTAS
calls in the kernel itself. This adds an infrastructure to allow
in-kernel handlers to be registered for RTAS services by name.
A new ioctl, KVM_PPC_RTAS_DEFINE_TOKEN, then allows userspace to
associate token values with those service names. Then, when the
guest requests an RTAS service with one of those token values, it
will be handled by the relevant in-kernel handler rather than being
passed up to userspace as at present.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[agraf: fix warning]
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/kvm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 0ebf59b50ed0..d4005192ad6e 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h | |||
@@ -668,6 +668,7 @@ struct kvm_ppc_smmu_info { | |||
668 | #define KVM_CAP_ARM_SET_DEVICE_ADDR 88 | 668 | #define KVM_CAP_ARM_SET_DEVICE_ADDR 88 |
669 | #define KVM_CAP_DEVICE_CTRL 89 | 669 | #define KVM_CAP_DEVICE_CTRL 89 |
670 | #define KVM_CAP_IRQ_MPIC 90 | 670 | #define KVM_CAP_IRQ_MPIC 90 |
671 | #define KVM_CAP_PPC_RTAS 91 | ||
671 | 672 | ||
672 | #ifdef KVM_CAP_IRQ_ROUTING | 673 | #ifdef KVM_CAP_IRQ_ROUTING |
673 | 674 | ||
@@ -928,6 +929,8 @@ struct kvm_s390_ucas_mapping { | |||
928 | #define KVM_PPC_GET_HTAB_FD _IOW(KVMIO, 0xaa, struct kvm_get_htab_fd) | 929 | #define KVM_PPC_GET_HTAB_FD _IOW(KVMIO, 0xaa, struct kvm_get_htab_fd) |
929 | /* Available with KVM_CAP_ARM_SET_DEVICE_ADDR */ | 930 | /* Available with KVM_CAP_ARM_SET_DEVICE_ADDR */ |
930 | #define KVM_ARM_SET_DEVICE_ADDR _IOW(KVMIO, 0xab, struct kvm_arm_device_addr) | 931 | #define KVM_ARM_SET_DEVICE_ADDR _IOW(KVMIO, 0xab, struct kvm_arm_device_addr) |
932 | /* Available with KVM_CAP_PPC_RTAS */ | ||
933 | #define KVM_PPC_RTAS_DEFINE_TOKEN _IOW(KVMIO, 0xac, struct kvm_rtas_token_args) | ||
931 | 934 | ||
932 | /* ioctl for vm fd */ | 935 | /* ioctl for vm fd */ |
933 | #define KVM_CREATE_DEVICE _IOWR(KVMIO, 0xe0, struct kvm_create_device) | 936 | #define KVM_CREATE_DEVICE _IOWR(KVMIO, 0xe0, struct kvm_create_device) |