提交 9900b4b4 编写于 作者: M Marc Zyngier 提交者: Avi Kivity

KVM: use KVM_CAP_IRQ_ROUTING to protect the routing related code

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: NMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: NChristoffer Dall <c.dall@virtualopensystems.com>
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 dcce0489
...@@ -802,7 +802,7 @@ static inline int mmu_notifier_retry(struct kvm_vcpu *vcpu, unsigned long mmu_se ...@@ -802,7 +802,7 @@ static inline int mmu_notifier_retry(struct kvm_vcpu *vcpu, unsigned long mmu_se
} }
#endif #endif
#ifdef CONFIG_HAVE_KVM_IRQCHIP #ifdef KVM_CAP_IRQ_ROUTING
#define KVM_MAX_IRQ_ROUTES 1024 #define KVM_MAX_IRQ_ROUTES 1024
......
...@@ -2225,7 +2225,7 @@ static long kvm_dev_ioctl_check_extension_generic(long arg) ...@@ -2225,7 +2225,7 @@ static long kvm_dev_ioctl_check_extension_generic(long arg)
case KVM_CAP_SIGNAL_MSI: case KVM_CAP_SIGNAL_MSI:
#endif #endif
return 1; return 1;
#ifdef CONFIG_HAVE_KVM_IRQCHIP #ifdef KVM_CAP_IRQ_ROUTING
case KVM_CAP_IRQ_ROUTING: case KVM_CAP_IRQ_ROUTING:
return KVM_MAX_IRQ_ROUTES; return KVM_MAX_IRQ_ROUTES;
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册