diff options
author | Jan Kiszka <jan.kiszka@web.de> | 2009-11-11 19:04:25 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-12-03 02:32:25 -0500 |
commit | 3cfc3092f40bc37c57ba556cfd8de4218f2135ab (patch) | |
tree | 562d61febfe7d3c99ea08e376b3f3c016cff613c /Documentation/kvm/api.txt | |
parent | 65ac7264043740572ba804edca03c374d70427c9 (diff) |
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/api.txt')
-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 36594ba57723..e1a114161027 100644 --- a/Documentation/kvm/api.txt +++ b/Documentation/kvm/api.txt | |||
@@ -653,6 +653,55 @@ struct kvm_clock_data { | |||
653 | __u32 pad[9]; | 653 | __u32 pad[9]; |
654 | }; | 654 | }; |
655 | 655 | ||
656 | 4.29 KVM_GET_VCPU_EVENTS | ||
657 | |||
658 | Capability: KVM_CAP_VCPU_EVENTS | ||
659 | Architectures: x86 | ||
660 | Type: vm ioctl | ||
661 | Parameters: struct kvm_vcpu_event (out) | ||
662 | Returns: 0 on success, -1 on error | ||
663 | |||
664 | Gets currently pending exceptions, interrupts, and NMIs as well as related | ||
665 | states of the vcpu. | ||
666 | |||
667 | struct kvm_vcpu_events { | ||
668 | struct { | ||
669 | __u8 injected; | ||
670 | __u8 nr; | ||
671 | __u8 has_error_code; | ||
672 | __u8 pad; | ||
673 | __u32 error_code; | ||
674 | } exception; | ||
675 | struct { | ||
676 | __u8 injected; | ||
677 | __u8 nr; | ||
678 | __u8 soft; | ||
679 | __u8 pad; | ||
680 | } interrupt; | ||
681 | struct { | ||
682 | __u8 injected; | ||
683 | __u8 pending; | ||
684 | __u8 masked; | ||
685 | __u8 pad; | ||
686 | } nmi; | ||
687 | __u32 sipi_vector; | ||
688 | __u32 flags; /* must be zero */ | ||
689 | }; | ||
690 | |||
691 | 4.30 KVM_SET_VCPU_EVENTS | ||
692 | |||
693 | Capability: KVM_CAP_VCPU_EVENTS | ||
694 | Architectures: x86 | ||
695 | Type: vm ioctl | ||
696 | Parameters: struct kvm_vcpu_event (in) | ||
697 | Returns: 0 on success, -1 on error | ||
698 | |||
699 | Set pending exceptions, interrupts, and NMIs as well as related states of the | ||
700 | vcpu. | ||
701 | |||
702 | See KVM_GET_VCPU_EVENTS for the data structure. | ||
703 | |||
704 | |||
656 | 5. The kvm_run structure | 705 | 5. The kvm_run structure |
657 | 706 | ||
658 | Application code obtains a pointer to the kvm_run structure by | 707 | Application code obtains a pointer to the kvm_run structure by |