diff options
author | Paul Mackerras <paulus@samba.org> | 2014-06-30 06:51:13 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-08-05 08:26:28 -0400 |
commit | 297e21053a52f060944e9f0de4c64fad9bcd72fc (patch) | |
tree | 9ee54fbee84f31d76ac02db4639b044f92a24051 /virt/kvm | |
parent | e4d57e1ee1ab59f0cef0272800ac6c52e0ec814a (diff) |
KVM: Give IRQFD its own separate enabling Kconfig option
Currently, the IRQFD code is conditional on CONFIG_HAVE_KVM_IRQ_ROUTING.
So that we can have the IRQFD code compiled in without having the
IRQ routing code, this creates a new CONFIG_HAVE_KVM_IRQFD, makes
the IRQFD code conditional on it instead of CONFIG_HAVE_KVM_IRQ_ROUTING,
and makes all the platforms that currently select HAVE_KVM_IRQ_ROUTING
also select HAVE_KVM_IRQFD.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Tested-by: Eric Auger <eric.auger@linaro.org>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt/kvm')
-rw-r--r-- | virt/kvm/Kconfig | 3 | ||||
-rw-r--r-- | virt/kvm/eventfd.c | 6 | ||||
-rw-r--r-- | virt/kvm/kvm_main.c | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/virt/kvm/Kconfig b/virt/kvm/Kconfig index 13f2d19793e3..fc0c5e603eb4 100644 --- a/virt/kvm/Kconfig +++ b/virt/kvm/Kconfig | |||
@@ -6,6 +6,9 @@ config HAVE_KVM | |||
6 | config HAVE_KVM_IRQCHIP | 6 | config HAVE_KVM_IRQCHIP |
7 | bool | 7 | bool |
8 | 8 | ||
9 | config HAVE_KVM_IRQFD | ||
10 | bool | ||
11 | |||
9 | config HAVE_KVM_IRQ_ROUTING | 12 | config HAVE_KVM_IRQ_ROUTING |
10 | bool | 13 | bool |
11 | 14 | ||
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index 99957df69cf2..f5f61548f60d 100644 --- a/virt/kvm/eventfd.c +++ b/virt/kvm/eventfd.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #include "irq.h" | 39 | #include "irq.h" |
40 | #include "iodev.h" | 40 | #include "iodev.h" |
41 | 41 | ||
42 | #ifdef CONFIG_HAVE_KVM_IRQ_ROUTING | 42 | #ifdef CONFIG_HAVE_KVM_IRQFD |
43 | /* | 43 | /* |
44 | * -------------------------------------------------------------------- | 44 | * -------------------------------------------------------------------- |
45 | * irqfd: Allows an fd to be used to inject an interrupt to the guest | 45 | * irqfd: Allows an fd to be used to inject an interrupt to the guest |
@@ -450,7 +450,7 @@ out: | |||
450 | void | 450 | void |
451 | kvm_eventfd_init(struct kvm *kvm) | 451 | kvm_eventfd_init(struct kvm *kvm) |
452 | { | 452 | { |
453 | #ifdef CONFIG_HAVE_KVM_IRQ_ROUTING | 453 | #ifdef CONFIG_HAVE_KVM_IRQFD |
454 | spin_lock_init(&kvm->irqfds.lock); | 454 | spin_lock_init(&kvm->irqfds.lock); |
455 | INIT_LIST_HEAD(&kvm->irqfds.items); | 455 | INIT_LIST_HEAD(&kvm->irqfds.items); |
456 | INIT_LIST_HEAD(&kvm->irqfds.resampler_list); | 456 | INIT_LIST_HEAD(&kvm->irqfds.resampler_list); |
@@ -459,7 +459,7 @@ kvm_eventfd_init(struct kvm *kvm) | |||
459 | INIT_LIST_HEAD(&kvm->ioeventfds); | 459 | INIT_LIST_HEAD(&kvm->ioeventfds); |
460 | } | 460 | } |
461 | 461 | ||
462 | #ifdef CONFIG_HAVE_KVM_IRQ_ROUTING | 462 | #ifdef CONFIG_HAVE_KVM_IRQFD |
463 | /* | 463 | /* |
464 | * shutdown any irqfd's that match fd+gsi | 464 | * shutdown any irqfd's that match fd+gsi |
465 | */ | 465 | */ |
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 1b95cc926cfc..a69a623938b8 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -2337,7 +2337,7 @@ static long kvm_vm_ioctl_check_extension_generic(struct kvm *kvm, long arg) | |||
2337 | #ifdef CONFIG_HAVE_KVM_MSI | 2337 | #ifdef CONFIG_HAVE_KVM_MSI |
2338 | case KVM_CAP_SIGNAL_MSI: | 2338 | case KVM_CAP_SIGNAL_MSI: |
2339 | #endif | 2339 | #endif |
2340 | #ifdef CONFIG_HAVE_KVM_IRQ_ROUTING | 2340 | #ifdef CONFIG_HAVE_KVM_IRQFD |
2341 | case KVM_CAP_IRQFD_RESAMPLE: | 2341 | case KVM_CAP_IRQFD_RESAMPLE: |
2342 | #endif | 2342 | #endif |
2343 | case KVM_CAP_CHECK_EXTENSION_VM: | 2343 | case KVM_CAP_CHECK_EXTENSION_VM: |