aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/virtual
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2013-04-17 16:30:00 -0400
committerAlexander Graf <agraf@suse.de>2013-04-26 14:27:29 -0400
commit8e591cb7204739efa8e15967ea334eb367039dde (patch)
tree3fa76d3875c8133eeafc2e36372aaf83232fc54f /Documentation/virtual
parent91194919a6b07d70081fe185a79b129efee84fff (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 'Documentation/virtual')
-rw-r--r--Documentation/virtual/kvm/api.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 149558b1e81e..fb308be8521b 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -2341,6 +2341,25 @@ and distributor interface, the ioctl must be called after calling
2341KVM_CREATE_IRQCHIP, but before calling KVM_RUN on any of the VCPUs. Calling 2341KVM_CREATE_IRQCHIP, but before calling KVM_RUN on any of the VCPUs. Calling
2342this ioctl twice for any of the base addresses will return -EEXIST. 2342this ioctl twice for any of the base addresses will return -EEXIST.
2343 2343
23444.82 KVM_PPC_RTAS_DEFINE_TOKEN
2345
2346Capability: KVM_CAP_PPC_RTAS
2347Architectures: ppc
2348Type: vm ioctl
2349Parameters: struct kvm_rtas_token_args
2350Returns: 0 on success, -1 on error
2351
2352Defines a token value for a RTAS (Run Time Abstraction Services)
2353service in order to allow it to be handled in the kernel. The
2354argument struct gives the name of the service, which must be the name
2355of a service that has a kernel-side implementation. If the token
2356value is non-zero, it will be associated with that service, and
2357subsequent RTAS calls by the guest specifying that token will be
2358handled by the kernel. If the token value is 0, then any token
2359associated with the service will be forgotten, and subsequent RTAS
2360calls by the guest for that service will be passed to userspace to be
2361handled.
2362
2344 2363
23455. The kvm_run structure 23645. The kvm_run structure
2346------------------------ 2365------------------------