aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2013-01-04 12:12:48 -0500
committerAlexander Graf <agraf@suse.de>2013-01-10 07:42:31 -0500
commit1c810636556c8d53a37406b34a64d9b9b0161aa6 (patch)
treeb163d427c9dcff066330d4ac13de529a9831a044 /Documentation
parent37ecb257f68ce4fb7c7048a1123bbcbbe36d9575 (diff)
KVM: PPC: BookE: Implement EPR exit
The External Proxy Facility in FSL BookE chips allows the interrupt controller to automatically acknowledge an interrupt as soon as a core gets its pending external interrupt delivered. Today, user space implements the interrupt controller, so we need to check on it during such a cycle. This patch implements logic for user space to enable EPR exiting, disable EPR exiting and EPR exiting itself, so that user space can acknowledge an interrupt when an external interrupt has successfully been delivered into the guest vcpu. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/virtual/kvm/api.txt40
1 files changed, 38 insertions, 2 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 4fc2bfcb16d5..a98ed09269d7 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -2246,8 +2246,8 @@ executed a memory-mapped I/O instruction which could not be satisfied
2246by kvm. The 'data' member contains the written data if 'is_write' is 2246by kvm. The 'data' member contains the written data if 'is_write' is
2247true, and should be filled by application code otherwise. 2247true, and should be filled by application code otherwise.
2248 2248
2249NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_DCR 2249NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_DCR,
2250 and KVM_EXIT_PAPR the corresponding 2250 KVM_EXIT_PAPR and KVM_EXIT_EPR the corresponding
2251operations are complete (and guest state is consistent) only after userspace 2251operations are complete (and guest state is consistent) only after userspace
2252has re-entered the kernel with KVM_RUN. The kernel side will first finish 2252has re-entered the kernel with KVM_RUN. The kernel side will first finish
2253incomplete operations and then check for pending signals. Userspace 2253incomplete operations and then check for pending signals. Userspace
@@ -2366,6 +2366,25 @@ interrupt for the target subchannel has been dequeued and subchannel_id,
2366subchannel_nr, io_int_parm and io_int_word contain the parameters for that 2366subchannel_nr, io_int_parm and io_int_word contain the parameters for that
2367interrupt. ipb is needed for instruction parameter decoding. 2367interrupt. ipb is needed for instruction parameter decoding.
2368 2368
2369 /* KVM_EXIT_EPR */
2370 struct {
2371 __u32 epr;
2372 } epr;
2373
2374On FSL BookE PowerPC chips, the interrupt controller has a fast patch
2375interrupt acknowledge path to the core. When the core successfully
2376delivers an interrupt, it automatically populates the EPR register with
2377the interrupt vector number and acknowledges the interrupt inside
2378the interrupt controller.
2379
2380In case the interrupt controller lives in user space, we need to do
2381the interrupt acknowledge cycle through it to fetch the next to be
2382delivered interrupt vector using this exit.
2383
2384It gets triggered whenever both KVM_CAP_PPC_EPR are enabled and an
2385external interrupt has just been delivered into the guest. User space
2386should put the acknowledged interrupt vector into the 'epr' field.
2387
2369 /* Fix the size of the union. */ 2388 /* Fix the size of the union. */
2370 char padding[256]; 2389 char padding[256];
2371 }; 2390 };
@@ -2501,3 +2520,20 @@ handled in-kernel, while the other I/O instructions are passed to userspace.
2501 2520
2502When this capability is enabled, KVM_EXIT_S390_TSCH will occur on TEST 2521When this capability is enabled, KVM_EXIT_S390_TSCH will occur on TEST
2503SUBCHANNEL intercepts. 2522SUBCHANNEL intercepts.
2523
25246.5 KVM_CAP_PPC_EPR
2525
2526Architectures: ppc
2527Parameters: args[0] defines whether the proxy facility is active
2528Returns: 0 on success; -1 on error
2529
2530This capability enables or disables the delivery of interrupts through the
2531external proxy facility.
2532
2533When enabled (args[0] != 0), every time the guest gets an external interrupt
2534delivered, it automatically exits into user space with a KVM_EXIT_EPR exit
2535to receive the topmost interrupt vector.
2536
2537When disabled (args[0] == 0), behavior is as if this facility is unsupported.
2538
2539When this capability is enabled, KVM_EXIT_EPR can occur.