diff options
author | Christoffer Dall <c.dall@virtualopensystems.com> | 2012-06-15 15:07:13 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-06-18 09:06:35 -0400 |
commit | a1e4ccb990447df0fe83d164d9a7bc2e6c4b7db7 (patch) | |
tree | 2068a67dbcf1d34455956c9ecd416aa2a3e2b1e1 | |
parent | 9900b4b48b095895cf962054e45aafa49ef70f74 (diff) |
KVM: Introduce __KVM_HAVE_IRQ_LINE
This is a preparatory patch for the KVM/ARM implementation. KVM/ARM will use
the KVM_IRQ_LINE ioctl, which is currently conditional on
__KVM_HAVE_IOAPIC, but ARM obviously doesn't have any IOAPIC support and we
need a separate define.
Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r-- | arch/ia64/include/asm/kvm.h | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/kvm.h | 1 | ||||
-rw-r--r-- | include/trace/events/kvm.h | 4 |
3 files changed, 5 insertions, 1 deletions
diff --git a/arch/ia64/include/asm/kvm.h b/arch/ia64/include/asm/kvm.h index b9f82c84f093..ec6c6b301238 100644 --- a/arch/ia64/include/asm/kvm.h +++ b/arch/ia64/include/asm/kvm.h | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | /* Select x86 specific features in <linux/kvm.h> */ | 27 | /* Select x86 specific features in <linux/kvm.h> */ |
28 | #define __KVM_HAVE_IOAPIC | 28 | #define __KVM_HAVE_IOAPIC |
29 | #define __KVM_HAVE_IRQ_LINE | ||
29 | #define __KVM_HAVE_DEVICE_ASSIGNMENT | 30 | #define __KVM_HAVE_DEVICE_ASSIGNMENT |
30 | 31 | ||
31 | /* Architectural interrupt line count. */ | 32 | /* Architectural interrupt line count. */ |
diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h index e7d1c194d272..246617efd67f 100644 --- a/arch/x86/include/asm/kvm.h +++ b/arch/x86/include/asm/kvm.h | |||
@@ -12,6 +12,7 @@ | |||
12 | /* Select x86 specific features in <linux/kvm.h> */ | 12 | /* Select x86 specific features in <linux/kvm.h> */ |
13 | #define __KVM_HAVE_PIT | 13 | #define __KVM_HAVE_PIT |
14 | #define __KVM_HAVE_IOAPIC | 14 | #define __KVM_HAVE_IOAPIC |
15 | #define __KVM_HAVE_IRQ_LINE | ||
15 | #define __KVM_HAVE_DEVICE_ASSIGNMENT | 16 | #define __KVM_HAVE_DEVICE_ASSIGNMENT |
16 | #define __KVM_HAVE_MSI | 17 | #define __KVM_HAVE_MSI |
17 | #define __KVM_HAVE_USER_NMI | 18 | #define __KVM_HAVE_USER_NMI |
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h index 3df5925fe641..7ef9e759f499 100644 --- a/include/trace/events/kvm.h +++ b/include/trace/events/kvm.h | |||
@@ -37,7 +37,7 @@ TRACE_EVENT(kvm_userspace_exit, | |||
37 | __entry->errno < 0 ? -__entry->errno : __entry->reason) | 37 | __entry->errno < 0 ? -__entry->errno : __entry->reason) |
38 | ); | 38 | ); |
39 | 39 | ||
40 | #if defined(__KVM_HAVE_IOAPIC) | 40 | #if defined(__KVM_HAVE_IRQ_LINE) |
41 | TRACE_EVENT(kvm_set_irq, | 41 | TRACE_EVENT(kvm_set_irq, |
42 | TP_PROTO(unsigned int gsi, int level, int irq_source_id), | 42 | TP_PROTO(unsigned int gsi, int level, int irq_source_id), |
43 | TP_ARGS(gsi, level, irq_source_id), | 43 | TP_ARGS(gsi, level, irq_source_id), |
@@ -57,7 +57,9 @@ TRACE_EVENT(kvm_set_irq, | |||
57 | TP_printk("gsi %u level %d source %d", | 57 | TP_printk("gsi %u level %d source %d", |
58 | __entry->gsi, __entry->level, __entry->irq_source_id) | 58 | __entry->gsi, __entry->level, __entry->irq_source_id) |
59 | ); | 59 | ); |
60 | #endif | ||
60 | 61 | ||
62 | #if defined(__KVM_HAVE_IOAPIC) | ||
61 | #define kvm_deliver_mode \ | 63 | #define kvm_deliver_mode \ |
62 | {0x0, "Fixed"}, \ | 64 | {0x0, "Fixed"}, \ |
63 | {0x1, "LowPrio"}, \ | 65 | {0x1, "LowPrio"}, \ |