summaryrefslogtreecommitdiffstats
path: root/Documentation/kvm
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2010-03-24 21:48:30 +0100
committerAvi Kivity <avi@redhat.com>2010-05-17 12:17:10 +0300
commitad0a048b096ac819f28667602285453468a8d8f9 (patch)
tree491128ccab48eb277a5cf5919a798b0507da9859 /Documentation/kvm
parent71fbfd5f38f73515f1516a68fbe04dba198b70f0 (diff)
downloadop-kernel-dev-ad0a048b096ac819f28667602285453468a8d8f9.zip
op-kernel-dev-ad0a048b096ac819f28667602285453468a8d8f9.tar.gz
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/kvm')
-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 f9724dc..6f36235 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
by kvm. The 'data' member contains the written data if 'is_write' is
true, and should be filled by application code otherwise.
-NOTE: For KVM_EXIT_IO and KVM_EXIT_MMIO, the corresponding operations
-are complete (and guest state is consistent) only after userspace has
-re-entered the kernel with KVM_RUN. The kernel side will first finish
+NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO and KVM_EXIT_OSI, the corresponding
+operations are complete (and guest state is consistent) only after userspace
+has re-entered the kernel with KVM_RUN. The kernel side will first finish
incomplete operations and then check for pending signals. Userspace
can re-enter the guest with an unmasked signal pending to complete
pending operations.
@@ -1015,6 +1015,19 @@ s390 specific.
powerpc specific.
+ /* KVM_EXIT_OSI */
+ struct {
+ __u64 gprs[32];
+ } osi;
+
+MOL uses a special hypercall interface it calls 'OSI'. To enable it, we catch
+hypercalls and exit with this exit struct that contains all the guest gprs.
+
+If exit_reason is KVM_EXIT_OSI, then the vcpu has triggered such a hypercall.
+Userspace can now handle the hypercall and when it's done modify the gprs as
+necessary. Upon guest entry all guest GPRs will then be replaced by the values
+in this struct.
+
/* Fix the size of the union. */
char padding[256];
};
OpenPOWER on IntegriCloud