diff options
author | Alexander Graf <agraf@suse.de> | 2010-03-24 16:48:30 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-05-17 05:17:10 -0400 |
commit | ad0a048b096ac819f28667602285453468a8d8f9 (patch) | |
tree | 491128ccab48eb277a5cf5919a798b0507da9859 /Documentation | |
parent | 71fbfd5f38f73515f1516a68fbe04dba198b70f0 (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.txt | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index f9724dc8d079..6f362356e738 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 | |||
958 | by kvm. The 'data' member contains the written data if 'is_write' is | 958 | by kvm. The 'data' member contains the written data if 'is_write' is |
959 | true, and should be filled by application code otherwise. | 959 | true, and should be filled by application code otherwise. |
960 | 960 | ||
961 | NOTE: For KVM_EXIT_IO and KVM_EXIT_MMIO, the corresponding operations | 961 | NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO and KVM_EXIT_OSI, the corresponding |
962 | are complete (and guest state is consistent) only after userspace has | 962 | operations are complete (and guest state is consistent) only after userspace |
963 | re-entered the kernel with KVM_RUN. The kernel side will first finish | 963 | has re-entered the kernel with KVM_RUN. The kernel side will first finish |
964 | incomplete operations and then check for pending signals. Userspace | 964 | incomplete operations and then check for pending signals. Userspace |
965 | can re-enter the guest with an unmasked signal pending to complete | 965 | can re-enter the guest with an unmasked signal pending to complete |
966 | pending operations. | 966 | pending operations. |
@@ -1015,6 +1015,19 @@ s390 specific. | |||
1015 | 1015 | ||
1016 | powerpc specific. | 1016 | powerpc specific. |
1017 | 1017 | ||
1018 | /* KVM_EXIT_OSI */ | ||
1019 | struct { | ||
1020 | __u64 gprs[32]; | ||
1021 | } osi; | ||
1022 | |||
1023 | MOL uses a special hypercall interface it calls 'OSI'. To enable it, we catch | ||
1024 | hypercalls and exit with this exit struct that contains all the guest gprs. | ||
1025 | |||
1026 | If exit_reason is KVM_EXIT_OSI, then the vcpu has triggered such a hypercall. | ||
1027 | Userspace can now handle the hypercall and when it's done modify the gprs as | ||
1028 | necessary. Upon guest entry all guest GPRs will then be replaced by the values | ||
1029 | in 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 | }; |