KVM: Introduce __KVM_HAVE_IRQ_LINE
authorChristoffer Dall <c.dall@virtualopensystems.com>
Fri, 15 Jun 2012 19:07:13 +0000 (15:07 -0400)
committerAvi Kivity <avi@redhat.com>
Mon, 18 Jun 2012 13:06:35 +0000 (16:06 +0300)
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>
arch/ia64/include/asm/kvm.h
arch/x86/include/asm/kvm.h
include/trace/events/kvm.h

index b9f82c84f0932cff844ca97d09c3a6291c92e908..ec6c6b3012389402e9d530b305136e5c3855ad42 100644 (file)
@@ -26,6 +26,7 @@
 
 /* Select x86 specific features in <linux/kvm.h> */
 #define __KVM_HAVE_IOAPIC
+#define __KVM_HAVE_IRQ_LINE
 #define __KVM_HAVE_DEVICE_ASSIGNMENT
 
 /* Architectural interrupt line count. */
index e7d1c194d27280381ae302f9d1aac2d69a872b2e..246617efd67f5024c7686481c7c34f6f240b776a 100644 (file)
@@ -12,6 +12,7 @@
 /* Select x86 specific features in <linux/kvm.h> */
 #define __KVM_HAVE_PIT
 #define __KVM_HAVE_IOAPIC
+#define __KVM_HAVE_IRQ_LINE
 #define __KVM_HAVE_DEVICE_ASSIGNMENT
 #define __KVM_HAVE_MSI
 #define __KVM_HAVE_USER_NMI
index 3df5925fe641a8853bea04cd081f7ea3e86f85c2..7ef9e759f49907ce0ebbf2ab345ec571a0b023a0 100644 (file)
@@ -37,7 +37,7 @@ TRACE_EVENT(kvm_userspace_exit,
                  __entry->errno < 0 ? -__entry->errno : __entry->reason)
 );
 
-#if defined(__KVM_HAVE_IOAPIC)
+#if defined(__KVM_HAVE_IRQ_LINE)
 TRACE_EVENT(kvm_set_irq,
        TP_PROTO(unsigned int gsi, int level, int irq_source_id),
        TP_ARGS(gsi, level, irq_source_id),
@@ -57,7 +57,9 @@ TRACE_EVENT(kvm_set_irq,
        TP_printk("gsi %u level %d source %d",
                  __entry->gsi, __entry->level, __entry->irq_source_id)
 );
+#endif
 
+#if defined(__KVM_HAVE_IOAPIC)
 #define kvm_deliver_mode               \
        {0x0, "Fixed"},                 \
        {0x1, "LowPrio"},               \