diff options
author | Avi Kivity <avi@qumranet.com> | 2007-10-10 08:03:16 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-10-13 04:18:29 -0400 |
commit | 8a45450d0a559912873428077908f9bc1411042c (patch) | |
tree | 9f643a1c6d58fcdaf9b3555131c4258d860793d2 /include/linux/kvm.h | |
parent | 0967b7bf1c22b55777aba46ff616547feed0b141 (diff) |
KVM: Replace enum by #define
Easier for existence test (#ifdef) in userspace.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include/linux/kvm.h')
-rw-r--r-- | include/linux/kvm.h | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 30a83696906c..057a7f34ee36 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -90,11 +90,9 @@ struct kvm_ioapic_state { | |||
90 | } redirtbl[KVM_IOAPIC_NUM_PINS]; | 90 | } redirtbl[KVM_IOAPIC_NUM_PINS]; |
91 | }; | 91 | }; |
92 | 92 | ||
93 | enum kvm_irqchip_id { | 93 | #define KVM_IRQCHIP_PIC_MASTER 0 |
94 | KVM_IRQCHIP_PIC_MASTER = 0, | 94 | #define KVM_IRQCHIP_PIC_SLAVE 1 |
95 | KVM_IRQCHIP_PIC_SLAVE = 1, | 95 | #define KVM_IRQCHIP_IOAPIC 2 |
96 | KVM_IRQCHIP_IOAPIC = 2, | ||
97 | }; | ||
98 | 96 | ||
99 | struct kvm_irqchip { | 97 | struct kvm_irqchip { |
100 | __u32 chip_id; | 98 | __u32 chip_id; |
@@ -106,20 +104,18 @@ struct kvm_irqchip { | |||
106 | } chip; | 104 | } chip; |
107 | }; | 105 | }; |
108 | 106 | ||
109 | enum kvm_exit_reason { | 107 | #define KVM_EXIT_UNKNOWN 0 |
110 | KVM_EXIT_UNKNOWN = 0, | 108 | #define KVM_EXIT_EXCEPTION 1 |
111 | KVM_EXIT_EXCEPTION = 1, | 109 | #define KVM_EXIT_IO 2 |
112 | KVM_EXIT_IO = 2, | 110 | #define KVM_EXIT_HYPERCALL 3 |
113 | KVM_EXIT_HYPERCALL = 3, | 111 | #define KVM_EXIT_DEBUG 4 |
114 | KVM_EXIT_DEBUG = 4, | 112 | #define KVM_EXIT_HLT 5 |
115 | KVM_EXIT_HLT = 5, | 113 | #define KVM_EXIT_MMIO 6 |
116 | KVM_EXIT_MMIO = 6, | 114 | #define KVM_EXIT_IRQ_WINDOW_OPEN 7 |
117 | KVM_EXIT_IRQ_WINDOW_OPEN = 7, | 115 | #define KVM_EXIT_SHUTDOWN 8 |
118 | KVM_EXIT_SHUTDOWN = 8, | 116 | #define KVM_EXIT_FAIL_ENTRY 9 |
119 | KVM_EXIT_FAIL_ENTRY = 9, | 117 | #define KVM_EXIT_INTR 10 |
120 | KVM_EXIT_INTR = 10, | 118 | #define KVM_EXIT_SET_TPR 11 |
121 | KVM_EXIT_SET_TPR = 11 | ||
122 | }; | ||
123 | 119 | ||
124 | /* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */ | 120 | /* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */ |
125 | struct kvm_run { | 121 | struct kvm_run { |