summaryrefslogtreecommitdiffstats
path: root/Documentation/kvm
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@web.de>2009-11-12 01:04:25 +0100
committerAvi Kivity <avi@redhat.com>2009-12-03 09:32:25 +0200
commit3cfc3092f40bc37c57ba556cfd8de4218f2135ab (patch)
tree562d61febfe7d3c99ea08e376b3f3c016cff613c /Documentation/kvm
parent65ac7264043740572ba804edca03c374d70427c9 (diff)
downloadblackbird-op-linux-3cfc3092f40bc37c57ba556cfd8de4218f2135ab.tar.gz
blackbird-op-linux-3cfc3092f40bc37c57ba556cfd8de4218f2135ab.zip
KVM: x86: Add KVM_GET/SET_VCPU_EVENTS
This new IOCTL exports all yet user-invisible states related to exceptions, interrupts, and NMIs. Together with appropriate user space changes, this fixes sporadic problems of vmsave/restore, live migration and system reset. [avi: future-proof abi by adding a flags field] Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'Documentation/kvm')
-rw-r--r--Documentation/kvm/api.txt49
1 files changed, 49 insertions, 0 deletions
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
index 36594ba57723..e1a114161027 100644
--- a/Documentation/kvm/api.txt
+++ b/Documentation/kvm/api.txt
@@ -653,6 +653,55 @@ struct kvm_clock_data {
__u32 pad[9];
};
+4.29 KVM_GET_VCPU_EVENTS
+
+Capability: KVM_CAP_VCPU_EVENTS
+Architectures: x86
+Type: vm ioctl
+Parameters: struct kvm_vcpu_event (out)
+Returns: 0 on success, -1 on error
+
+Gets currently pending exceptions, interrupts, and NMIs as well as related
+states of the vcpu.
+
+struct kvm_vcpu_events {
+ struct {
+ __u8 injected;
+ __u8 nr;
+ __u8 has_error_code;
+ __u8 pad;
+ __u32 error_code;
+ } exception;
+ struct {
+ __u8 injected;
+ __u8 nr;
+ __u8 soft;
+ __u8 pad;
+ } interrupt;
+ struct {
+ __u8 injected;
+ __u8 pending;
+ __u8 masked;
+ __u8 pad;
+ } nmi;
+ __u32 sipi_vector;
+ __u32 flags; /* must be zero */
+};
+
+4.30 KVM_SET_VCPU_EVENTS
+
+Capability: KVM_CAP_VCPU_EVENTS
+Architectures: x86
+Type: vm ioctl
+Parameters: struct kvm_vcpu_event (in)
+Returns: 0 on success, -1 on error
+
+Set pending exceptions, interrupts, and NMIs as well as related states of the
+vcpu.
+
+See KVM_GET_VCPU_EVENTS for the data structure.
+
+
5. The kvm_run structure
Application code obtains a pointer to the kvm_run structure by
OpenPOWER on IntegriCloud