aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2010-03-24 16:48:30 -0400
committerAvi Kivity <avi@redhat.com>2010-05-17 05:17:10 -0400
commitad0a048b096ac819f28667602285453468a8d8f9 (patch)
tree491128ccab48eb277a5cf5919a798b0507da9859 /Documentation
parent71fbfd5f38f73515f1516a68fbe04dba198b70f0 (diff)
KVM: PPC: Add OSI hypercall interface
MOL uses its own hypercall interface to call back into userspace when the guest wants to do something. So let's implement that as an exit reason, specify it with a CAP and only really use it when userspace wants us to. The only user of it so far is MOL. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/kvm/api.txt19
1 files changed, 16 insertions, 3 deletions
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
index f9724dc8d07..6f362356e73 100644
--- a/Documentation/kvm/api.txt
+++ b/Documentation/kvm/api.txt
@@ -958,9 +958,9 @@ executed a memory-mapped I/O instruction which could not be satisfied
958by kvm. The 'data' member contains the written data if 'is_write' is 958by kvm. The 'data' member contains the written data if 'is_write' is
959true, and should be filled by application code otherwise. 959true, and should be filled by application code otherwise.
960 960
961NOTE: For KVM_EXIT_IO and KVM_EXIT_MMIO, the corresponding operations 961NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO and KVM_EXIT_OSI, the corresponding
962are complete (and guest state is consistent) only after userspace has 962operations are complete (and guest state is consistent) only after userspace
963re-entered the kernel with KVM_RUN. The kernel side will first finish 963has re-entered the kernel with KVM_RUN. The kernel side will first finish
964incomplete operations and then check for pending signals. Userspace 964incomplete operations and then check for pending signals. Userspace
965can re-enter the guest with an unmasked signal pending to complete 965can re-enter the guest with an unmasked signal pending to complete
966pending operations. 966pending operations.
@@ -1015,6 +1015,19 @@ s390 specific.
1015 1015
1016powerpc specific. 1016powerpc specific.
1017 1017
1018 /* KVM_EXIT_OSI */
1019 struct {
1020 __u64 gprs[32];
1021 } osi;
1022
1023MOL uses a special hypercall interface it calls 'OSI'. To enable it, we catch
1024hypercalls and exit with this exit struct that contains all the guest gprs.
1025
1026If exit_reason is KVM_EXIT_OSI, then the vcpu has triggered such a hypercall.
1027Userspace can now handle the hypercall and when it's done modify the gprs as
1028necessary. Upon guest entry all guest GPRs will then be replaced by the values
1029in this struct.
1030
1018 /* Fix the size of the union. */ 1031 /* Fix the size of the union. */
1019 char padding[256]; 1032 char padding[256];
1020 }; 1033 };