diff options
Diffstat (limited to 'include/linux/kvm.h')
-rw-r--r-- | include/linux/kvm.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 9151ebfa22e9..57f47ef93829 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <asm/types.h> | 11 | #include <asm/types.h> |
12 | #include <linux/ioctl.h> | 12 | #include <linux/ioctl.h> |
13 | 13 | ||
14 | #define KVM_API_VERSION 7 | 14 | #define KVM_API_VERSION 8 |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * Architectural interrupt line count, and the size of the bitmap needed | 17 | * Architectural interrupt line count, and the size of the bitmap needed |
@@ -34,9 +34,6 @@ struct kvm_memory_region { | |||
34 | #define KVM_MEM_LOG_DIRTY_PAGES 1UL | 34 | #define KVM_MEM_LOG_DIRTY_PAGES 1UL |
35 | 35 | ||
36 | 36 | ||
37 | #define KVM_EXIT_TYPE_FAIL_ENTRY 1 | ||
38 | #define KVM_EXIT_TYPE_VM_EXIT 2 | ||
39 | |||
40 | enum kvm_exit_reason { | 37 | enum kvm_exit_reason { |
41 | KVM_EXIT_UNKNOWN = 0, | 38 | KVM_EXIT_UNKNOWN = 0, |
42 | KVM_EXIT_EXCEPTION = 1, | 39 | KVM_EXIT_EXCEPTION = 1, |
@@ -47,6 +44,7 @@ enum kvm_exit_reason { | |||
47 | KVM_EXIT_MMIO = 6, | 44 | KVM_EXIT_MMIO = 6, |
48 | KVM_EXIT_IRQ_WINDOW_OPEN = 7, | 45 | KVM_EXIT_IRQ_WINDOW_OPEN = 7, |
49 | KVM_EXIT_SHUTDOWN = 8, | 46 | KVM_EXIT_SHUTDOWN = 8, |
47 | KVM_EXIT_FAIL_ENTRY = 9, | ||
50 | }; | 48 | }; |
51 | 49 | ||
52 | /* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */ | 50 | /* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */ |
@@ -57,12 +55,11 @@ struct kvm_run { | |||
57 | __u8 padding1[3]; | 55 | __u8 padding1[3]; |
58 | 56 | ||
59 | /* out */ | 57 | /* out */ |
60 | __u32 exit_type; | ||
61 | __u32 exit_reason; | 58 | __u32 exit_reason; |
62 | __u32 instruction_length; | 59 | __u32 instruction_length; |
63 | __u8 ready_for_interrupt_injection; | 60 | __u8 ready_for_interrupt_injection; |
64 | __u8 if_flag; | 61 | __u8 if_flag; |
65 | __u16 padding2; | 62 | __u8 padding2[6]; |
66 | 63 | ||
67 | /* in (pre_kvm_run), out (post_kvm_run) */ | 64 | /* in (pre_kvm_run), out (post_kvm_run) */ |
68 | __u64 cr8; | 65 | __u64 cr8; |
@@ -71,8 +68,12 @@ struct kvm_run { | |||
71 | union { | 68 | union { |
72 | /* KVM_EXIT_UNKNOWN */ | 69 | /* KVM_EXIT_UNKNOWN */ |
73 | struct { | 70 | struct { |
74 | __u32 hardware_exit_reason; | 71 | __u64 hardware_exit_reason; |
75 | } hw; | 72 | } hw; |
73 | /* KVM_EXIT_FAIL_ENTRY */ | ||
74 | struct { | ||
75 | __u64 hardware_entry_failure_reason; | ||
76 | } fail_entry; | ||
76 | /* KVM_EXIT_EXCEPTION */ | 77 | /* KVM_EXIT_EXCEPTION */ |
77 | struct { | 78 | struct { |
78 | __u32 exception; | 79 | __u32 exception; |