]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
KVM: Give IRQFD its own separate enabling Kconfig option
authorPaul Mackerras <paulus@samba.org>
Mon, 30 Jun 2014 10:51:13 +0000 (20:51 +1000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 5 Aug 2014 12:26:28 +0000 (14:26 +0200)
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>
arch/ia64/kvm/Kconfig
arch/powerpc/kvm/Kconfig
arch/s390/kvm/Kconfig
arch/x86/kvm/Kconfig
include/linux/kvm_host.h
virt/kvm/Kconfig
virt/kvm/eventfd.c
virt/kvm/kvm_main.c

index 990b86420cc64638b542b95dd6a9059ba8cd37f9..3d50ea955c4cf435674ced40d0ee98f33a6b2d96 100644 (file)
@@ -25,6 +25,7 @@ config KVM
        select PREEMPT_NOTIFIERS
        select ANON_INODES
        select HAVE_KVM_IRQCHIP
+       select HAVE_KVM_IRQFD
        select HAVE_KVM_IRQ_ROUTING
        select KVM_APIC_ARCHITECTURE
        select KVM_MMIO
index 8f104a6879f0856e5c116b751ed3a28cdbe400b1..d4741dba91af5a5b53d25cc05afa111885daa00b 100644 (file)
@@ -158,6 +158,7 @@ config KVM_MPIC
        bool "KVM in-kernel MPIC emulation"
        depends on KVM && E500
        select HAVE_KVM_IRQCHIP
+       select HAVE_KVM_IRQFD
        select HAVE_KVM_IRQ_ROUTING
        select HAVE_KVM_MSI
        help
index 10d529ac9821e93f7212fd6a4670c3357f96c7df..646db9c467d136d211650b0d6cdaea63ff85d2a1 100644 (file)
@@ -26,6 +26,7 @@ config KVM
        select KVM_ASYNC_PF
        select KVM_ASYNC_PF_SYNC
        select HAVE_KVM_IRQCHIP
+       select HAVE_KVM_IRQFD
        select HAVE_KVM_IRQ_ROUTING
        ---help---
          Support hosting paravirtualized guest machines using the SIE
index 287e4c85fff9f8f8acef22bb79502e28641a8d2d..f9d16ff56c6b18df942da02b08aa6fc20fbc6068 100644 (file)
@@ -27,6 +27,7 @@ config KVM
        select MMU_NOTIFIER
        select ANON_INODES
        select HAVE_KVM_IRQCHIP
+       select HAVE_KVM_IRQFD
        select HAVE_KVM_IRQ_ROUTING
        select HAVE_KVM_EVENTFD
        select KVM_APIC_ARCHITECTURE
index ddd33e1aeee1d9638f79a750b21f72399139cef0..8593d2e61cbf765ca3bb18ae6fe46a10078aafb1 100644 (file)
@@ -437,7 +437,7 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vcpu);
 int __must_check vcpu_load(struct kvm_vcpu *vcpu);
 void vcpu_put(struct kvm_vcpu *vcpu);
 
-#ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
+#ifdef CONFIG_HAVE_KVM_IRQFD
 int kvm_irqfd_init(void);
 void kvm_irqfd_exit(void);
 #else
@@ -932,20 +932,20 @@ int kvm_set_routing_entry(struct kvm_kernel_irq_routing_entry *e,
                          const struct kvm_irq_routing_entry *ue);
 void kvm_free_irq_routing(struct kvm *kvm);
 
-int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi);
-
 #else
 
 static inline void kvm_free_irq_routing(struct kvm *kvm) {}
 
 #endif
 
+int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi);
+
 #ifdef CONFIG_HAVE_KVM_EVENTFD
 
 void kvm_eventfd_init(struct kvm *kvm);
 int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args);
 
-#ifdef CONFIG_HAVE_KVM_IRQCHIP
+#ifdef CONFIG_HAVE_KVM_IRQFD
 int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args);
 void kvm_irqfd_release(struct kvm *kvm);
 void kvm_irq_routing_update(struct kvm *);
index 13f2d19793e3e65986466c90c483f84249c71cd9..fc0c5e603eb42e7404d6060e81e4c20fa0003f39 100644 (file)
@@ -6,6 +6,9 @@ config HAVE_KVM
 config HAVE_KVM_IRQCHIP
        bool
 
+config HAVE_KVM_IRQFD
+       bool
+
 config HAVE_KVM_IRQ_ROUTING
        bool
 
index 99957df69cf2962746db3488ea3d43ec4d10f679..f5f61548f60d9b74ee9c5cdd06d1dfcaa194fa19 100644 (file)
@@ -39,7 +39,7 @@
 #include "irq.h"
 #include "iodev.h"
 
-#ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
+#ifdef CONFIG_HAVE_KVM_IRQFD
 /*
  * --------------------------------------------------------------------
  * irqfd: Allows an fd to be used to inject an interrupt to the guest
@@ -450,7 +450,7 @@ out:
 void
 kvm_eventfd_init(struct kvm *kvm)
 {
-#ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
+#ifdef CONFIG_HAVE_KVM_IRQFD
        spin_lock_init(&kvm->irqfds.lock);
        INIT_LIST_HEAD(&kvm->irqfds.items);
        INIT_LIST_HEAD(&kvm->irqfds.resampler_list);
@@ -459,7 +459,7 @@ kvm_eventfd_init(struct kvm *kvm)
        INIT_LIST_HEAD(&kvm->ioeventfds);
 }
 
-#ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
+#ifdef CONFIG_HAVE_KVM_IRQFD
 /*
  * shutdown any irqfd's that match fd+gsi
  */
index 1b95cc926cfca1e212476f18f86980e14fb83970..a69a623938b862d81172ef1feed46b32b4b588cf 100644 (file)
@@ -2337,7 +2337,7 @@ static long kvm_vm_ioctl_check_extension_generic(struct kvm *kvm, long arg)
 #ifdef CONFIG_HAVE_KVM_MSI
        case KVM_CAP_SIGNAL_MSI:
 #endif
-#ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
+#ifdef CONFIG_HAVE_KVM_IRQFD
        case KVM_CAP_IRQFD_RESAMPLE:
 #endif
        case KVM_CAP_CHECK_EXTENSION_VM: