diff options
author | Jan Kiszka <jan.kiszka@web.de> | 2009-11-12 01:04:25 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-12-03 09:32:25 +0200 |
commit | 3cfc3092f40bc37c57ba556cfd8de4218f2135ab (patch) | |
tree | 562d61febfe7d3c99ea08e376b3f3c016cff613c /Documentation | |
parent | 65ac7264043740572ba804edca03c374d70427c9 (diff) | |
download | linux-3.10-3cfc3092f40bc37c57ba556cfd8de4218f2135ab.tar.gz linux-3.10-3cfc3092f40bc37c57ba556cfd8de4218f2135ab.tar.bz2 linux-3.10-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')
-rw-r--r-- | Documentation/kvm/api.txt | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index 36594ba5772..e1a11416102 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 |