KVM: use KVM_CAP_IRQ_ROUTING to protect the routing related code
authorMarc Zyngier <marc.zyngier@arm.com>
Fri, 15 Jun 2012 19:07:02 +0000 (15:07 -0400)
committerAvi Kivity <avi@redhat.com>
Mon, 18 Jun 2012 13:06:35 +0000 (16:06 +0300)
The KVM code sometimes uses CONFIG_HAVE_KVM_IRQCHIP to protect
code that is related to IRQ routing, which not all in-kernel
irqchips may support.

Use KVM_CAP_IRQ_ROUTING instead.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
include/linux/kvm_host.h
virt/kvm/kvm_main.c

index 27ac8a4767fab28e93097d3fe2e5abefc26e0440..c7f77876c9b34a7aefc8e6ccf84ffa13969b8de7 100644 (file)
@@ -802,7 +802,7 @@ static inline int mmu_notifier_retry(struct kvm_vcpu *vcpu, unsigned long mmu_se
 }
 #endif
 
-#ifdef CONFIG_HAVE_KVM_IRQCHIP
+#ifdef KVM_CAP_IRQ_ROUTING
 
 #define KVM_MAX_IRQ_ROUTES 1024
 
index 02cb440f802d74627e05a485b2a2dd65119acccc..636bd08bb399d55d44807bce76401e8cbe78d2aa 100644 (file)
@@ -2225,7 +2225,7 @@ static long kvm_dev_ioctl_check_extension_generic(long arg)
        case KVM_CAP_SIGNAL_MSI:
 #endif
                return 1;
-#ifdef CONFIG_HAVE_KVM_IRQCHIP
+#ifdef KVM_CAP_IRQ_ROUTING
        case KVM_CAP_IRQ_ROUTING:
                return KVM_MAX_IRQ_ROUTES;
 #endif