提交 a1e4ccb9 编写于 作者: C Christoffer Dall 提交者: Avi Kivity

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: NChristoffer Dall <c.dall@virtualopensystems.com>
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 9900b4b4
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
/* Select x86 specific features in <linux/kvm.h> */ /* Select x86 specific features in <linux/kvm.h> */
#define __KVM_HAVE_IOAPIC #define __KVM_HAVE_IOAPIC
#define __KVM_HAVE_IRQ_LINE
#define __KVM_HAVE_DEVICE_ASSIGNMENT #define __KVM_HAVE_DEVICE_ASSIGNMENT
/* Architectural interrupt line count. */ /* Architectural interrupt line count. */
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
/* Select x86 specific features in <linux/kvm.h> */ /* Select x86 specific features in <linux/kvm.h> */
#define __KVM_HAVE_PIT #define __KVM_HAVE_PIT
#define __KVM_HAVE_IOAPIC #define __KVM_HAVE_IOAPIC
#define __KVM_HAVE_IRQ_LINE
#define __KVM_HAVE_DEVICE_ASSIGNMENT #define __KVM_HAVE_DEVICE_ASSIGNMENT
#define __KVM_HAVE_MSI #define __KVM_HAVE_MSI
#define __KVM_HAVE_USER_NMI #define __KVM_HAVE_USER_NMI
......
...@@ -37,7 +37,7 @@ TRACE_EVENT(kvm_userspace_exit, ...@@ -37,7 +37,7 @@ TRACE_EVENT(kvm_userspace_exit,
__entry->errno < 0 ? -__entry->errno : __entry->reason) __entry->errno < 0 ? -__entry->errno : __entry->reason)
); );
#if defined(__KVM_HAVE_IOAPIC) #if defined(__KVM_HAVE_IRQ_LINE)
TRACE_EVENT(kvm_set_irq, TRACE_EVENT(kvm_set_irq,
TP_PROTO(unsigned int gsi, int level, int irq_source_id), TP_PROTO(unsigned int gsi, int level, int irq_source_id),
TP_ARGS(gsi, level, irq_source_id), TP_ARGS(gsi, level, irq_source_id),
...@@ -57,7 +57,9 @@ TRACE_EVENT(kvm_set_irq, ...@@ -57,7 +57,9 @@ TRACE_EVENT(kvm_set_irq,
TP_printk("gsi %u level %d source %d", TP_printk("gsi %u level %d source %d",
__entry->gsi, __entry->level, __entry->irq_source_id) __entry->gsi, __entry->level, __entry->irq_source_id)
); );
#endif
#if defined(__KVM_HAVE_IOAPIC)
#define kvm_deliver_mode \ #define kvm_deliver_mode \
{0x0, "Fixed"}, \ {0x0, "Fixed"}, \
{0x1, "LowPrio"}, \ {0x1, "LowPrio"}, \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册