diff options
author | Avi Kivity <avi@qumranet.com> | 2007-10-10 12:03:16 (GMT) |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-10-13 08:18:29 (GMT) |
commit | 8a45450d0a559912873428077908f9bc1411042c (patch) | |
tree | 9f643a1c6d58fcdaf9b3555131c4258d860793d2 /include/linux/kvm.h | |
parent | 0967b7bf1c22b55777aba46ff616547feed0b141 (diff) | |
download | linux-fsl-qoriq-8a45450d0a559912873428077908f9bc1411042c.tar.xz |
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 30a83696..057a7f3 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h @@ -90,11 +90,9 @@ struct kvm_ioapic_state { } redirtbl[KVM_IOAPIC_NUM_PINS]; }; -enum kvm_irqchip_id { - KVM_IRQCHIP_PIC_MASTER = 0, - KVM_IRQCHIP_PIC_SLAVE = 1, - KVM_IRQCHIP_IOAPIC = 2, -}; +#define KVM_IRQCHIP_PIC_MASTER 0 +#define KVM_IRQCHIP_PIC_SLAVE 1 +#define KVM_IRQCHIP_IOAPIC 2 struct kvm_irqchip { __u32 chip_id; @@ -106,20 +104,18 @@ struct kvm_irqchip { } chip; }; -enum kvm_exit_reason { - KVM_EXIT_UNKNOWN = 0, - KVM_EXIT_EXCEPTION = 1, - KVM_EXIT_IO = 2, - KVM_EXIT_HYPERCALL = 3, - KVM_EXIT_DEBUG = 4, - KVM_EXIT_HLT = 5, - KVM_EXIT_MMIO = 6, - KVM_EXIT_IRQ_WINDOW_OPEN = 7, - KVM_EXIT_SHUTDOWN = 8, - KVM_EXIT_FAIL_ENTRY = 9, - KVM_EXIT_INTR = 10, - KVM_EXIT_SET_TPR = 11 -}; +#define KVM_EXIT_UNKNOWN 0 +#define KVM_EXIT_EXCEPTION 1 +#define KVM_EXIT_IO 2 +#define KVM_EXIT_HYPERCALL 3 +#define KVM_EXIT_DEBUG 4 +#define KVM_EXIT_HLT 5 +#define KVM_EXIT_MMIO 6 +#define KVM_EXIT_IRQ_WINDOW_OPEN 7 +#define KVM_EXIT_SHUTDOWN 8 +#define KVM_EXIT_FAIL_ENTRY 9 +#define KVM_EXIT_INTR 10 +#define KVM_EXIT_SET_TPR 11 /* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */ struct kvm_run { |