Commit c5b31cc2 authored by Paolo Bonzini's avatar Paolo Bonzini

KVM: remove CONFIG_HAVE_KVM_IRQFD

All platforms with a kernel irqchip have support for irqfd.  Unify the
two configuration items so that userspace can expect to use irqfd to
inject interrupts into the irqchip.
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 8132d887
...@@ -29,7 +29,6 @@ menuconfig KVM ...@@ -29,7 +29,6 @@ menuconfig KVM
select KVM_GENERIC_DIRTYLOG_READ_PROTECT select KVM_GENERIC_DIRTYLOG_READ_PROTECT
select KVM_XFER_TO_GUEST_WORK select KVM_XFER_TO_GUEST_WORK
select KVM_VFIO select KVM_VFIO
select HAVE_KVM_IRQFD
select HAVE_KVM_DIRTY_RING_ACQ_REL select HAVE_KVM_DIRTY_RING_ACQ_REL
select NEED_KVM_DIRTY_RING_WITH_BITMAP select NEED_KVM_DIRTY_RING_WITH_BITMAP
select HAVE_KVM_MSI select HAVE_KVM_MSI
......
...@@ -224,7 +224,6 @@ config KVM_MPIC ...@@ -224,7 +224,6 @@ config KVM_MPIC
bool "KVM in-kernel MPIC emulation" bool "KVM in-kernel MPIC emulation"
depends on KVM && PPC_E500 depends on KVM && PPC_E500
select HAVE_KVM_IRQCHIP select HAVE_KVM_IRQCHIP
select HAVE_KVM_IRQFD
select HAVE_KVM_IRQ_ROUTING select HAVE_KVM_IRQ_ROUTING
select HAVE_KVM_MSI select HAVE_KVM_MSI
help help
...@@ -237,7 +236,6 @@ config KVM_XICS ...@@ -237,7 +236,6 @@ config KVM_XICS
bool "KVM in-kernel XICS emulation" bool "KVM in-kernel XICS emulation"
depends on KVM_BOOK3S_64 && !KVM_MPIC depends on KVM_BOOK3S_64 && !KVM_MPIC
select HAVE_KVM_IRQCHIP select HAVE_KVM_IRQCHIP
select HAVE_KVM_IRQFD
default y default y
help help
Include support for the XICS (eXternal Interrupt Controller Include support for the XICS (eXternal Interrupt Controller
......
...@@ -578,7 +578,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) ...@@ -578,7 +578,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
break; break;
#endif #endif
#ifdef CONFIG_HAVE_KVM_IRQFD #ifdef CONFIG_HAVE_KVM_IRQCHIP
case KVM_CAP_IRQFD_RESAMPLE: case KVM_CAP_IRQFD_RESAMPLE:
r = !xive_enabled(); r = !xive_enabled();
break; break;
......
...@@ -21,7 +21,6 @@ config KVM ...@@ -21,7 +21,6 @@ config KVM
tristate "Kernel-based Virtual Machine (KVM) support (EXPERIMENTAL)" tristate "Kernel-based Virtual Machine (KVM) support (EXPERIMENTAL)"
depends on RISCV_SBI && MMU depends on RISCV_SBI && MMU
select HAVE_KVM_IRQCHIP select HAVE_KVM_IRQCHIP
select HAVE_KVM_IRQFD
select HAVE_KVM_IRQ_ROUTING select HAVE_KVM_IRQ_ROUTING
select HAVE_KVM_MSI select HAVE_KVM_MSI
select HAVE_KVM_VCPU_ASYNC_IOCTL select HAVE_KVM_VCPU_ASYNC_IOCTL
......
...@@ -26,7 +26,6 @@ config KVM ...@@ -26,7 +26,6 @@ config KVM
select KVM_ASYNC_PF select KVM_ASYNC_PF
select KVM_ASYNC_PF_SYNC select KVM_ASYNC_PF_SYNC
select HAVE_KVM_IRQCHIP select HAVE_KVM_IRQCHIP
select HAVE_KVM_IRQFD
select HAVE_KVM_IRQ_ROUTING select HAVE_KVM_IRQ_ROUTING
select HAVE_KVM_INVALID_WAKEUPS select HAVE_KVM_INVALID_WAKEUPS
select HAVE_KVM_NO_POLL select HAVE_KVM_NO_POLL
......
...@@ -27,7 +27,6 @@ config KVM ...@@ -27,7 +27,6 @@ config KVM
select KVM_GENERIC_MMU_NOTIFIER select KVM_GENERIC_MMU_NOTIFIER
select HAVE_KVM_IRQCHIP select HAVE_KVM_IRQCHIP
select HAVE_KVM_PFNCACHE select HAVE_KVM_PFNCACHE
select HAVE_KVM_IRQFD
select HAVE_KVM_DIRTY_RING_TSO select HAVE_KVM_DIRTY_RING_TSO
select HAVE_KVM_DIRTY_RING_ACQ_REL select HAVE_KVM_DIRTY_RING_ACQ_REL
select IRQ_BYPASS_MANAGER select IRQ_BYPASS_MANAGER
......
...@@ -805,8 +805,7 @@ struct kvm { ...@@ -805,8 +805,7 @@ struct kvm {
* Update side is protected by irq_lock. * Update side is protected by irq_lock.
*/ */
struct kvm_irq_routing_table __rcu *irq_routing; struct kvm_irq_routing_table __rcu *irq_routing;
#endif
#ifdef CONFIG_HAVE_KVM_IRQFD
struct hlist_head irq_ack_notifier_list; struct hlist_head irq_ack_notifier_list;
#endif #endif
...@@ -996,7 +995,7 @@ static inline void kvm_arch_post_irq_routing_update(struct kvm *kvm) ...@@ -996,7 +995,7 @@ static inline void kvm_arch_post_irq_routing_update(struct kvm *kvm)
} }
#endif #endif
#ifdef CONFIG_HAVE_KVM_IRQFD #ifdef CONFIG_HAVE_KVM_IRQCHIP
int kvm_irqfd_init(void); int kvm_irqfd_init(void);
void kvm_irqfd_exit(void); void kvm_irqfd_exit(void);
#else #else
...@@ -2057,7 +2056,7 @@ int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi); ...@@ -2057,7 +2056,7 @@ int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi);
void kvm_eventfd_init(struct kvm *kvm); void kvm_eventfd_init(struct kvm *kvm);
int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args); int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args);
#ifdef CONFIG_HAVE_KVM_IRQFD #ifdef CONFIG_HAVE_KVM_IRQCHIP
int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args); int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args);
void kvm_irqfd_release(struct kvm *kvm); void kvm_irqfd_release(struct kvm *kvm);
bool kvm_notify_irqfd_resampler(struct kvm *kvm, bool kvm_notify_irqfd_resampler(struct kvm *kvm,
...@@ -2078,7 +2077,7 @@ static inline bool kvm_notify_irqfd_resampler(struct kvm *kvm, ...@@ -2078,7 +2077,7 @@ static inline bool kvm_notify_irqfd_resampler(struct kvm *kvm,
{ {
return false; return false;
} }
#endif /* CONFIG_HAVE_KVM_IRQFD */ #endif /* CONFIG_HAVE_KVM_IRQCHIP */
void kvm_arch_irq_routing_update(struct kvm *kvm); void kvm_arch_irq_routing_update(struct kvm *kvm);
......
...@@ -62,7 +62,7 @@ TRACE_EVENT(kvm_vcpu_wakeup, ...@@ -62,7 +62,7 @@ TRACE_EVENT(kvm_vcpu_wakeup,
__entry->valid ? "valid" : "invalid") __entry->valid ? "valid" : "invalid")
); );
#if defined(CONFIG_HAVE_KVM_IRQFD) #if defined(CONFIG_HAVE_KVM_IRQCHIP)
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),
...@@ -82,7 +82,7 @@ TRACE_EVENT(kvm_set_irq, ...@@ -82,7 +82,7 @@ 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 /* defined(CONFIG_HAVE_KVM_IRQFD) */ #endif /* defined(CONFIG_HAVE_KVM_IRQCHIP) */
#if defined(__KVM_HAVE_IOAPIC) #if defined(__KVM_HAVE_IOAPIC)
#define kvm_deliver_mode \ #define kvm_deliver_mode \
...@@ -170,7 +170,7 @@ TRACE_EVENT(kvm_msi_set_irq, ...@@ -170,7 +170,7 @@ TRACE_EVENT(kvm_msi_set_irq,
#endif /* defined(__KVM_HAVE_IOAPIC) */ #endif /* defined(__KVM_HAVE_IOAPIC) */
#if defined(CONFIG_HAVE_KVM_IRQFD) #if defined(CONFIG_HAVE_KVM_IRQCHIP)
#ifdef kvm_irqchips #ifdef kvm_irqchips
#define kvm_ack_irq_string "irqchip %s pin %u" #define kvm_ack_irq_string "irqchip %s pin %u"
...@@ -197,7 +197,7 @@ TRACE_EVENT(kvm_ack_irq, ...@@ -197,7 +197,7 @@ TRACE_EVENT(kvm_ack_irq,
TP_printk(kvm_ack_irq_string, kvm_ack_irq_parm) TP_printk(kvm_ack_irq_string, kvm_ack_irq_parm)
); );
#endif /* defined(CONFIG_HAVE_KVM_IRQFD) */ #endif /* defined(CONFIG_HAVE_KVM_IRQCHIP) */
......
...@@ -11,9 +11,6 @@ config HAVE_KVM_PFNCACHE ...@@ -11,9 +11,6 @@ config HAVE_KVM_PFNCACHE
config HAVE_KVM_IRQCHIP config HAVE_KVM_IRQCHIP
bool bool
config HAVE_KVM_IRQFD
bool
config HAVE_KVM_IRQ_ROUTING config HAVE_KVM_IRQ_ROUTING
bool bool
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <kvm/iodev.h> #include <kvm/iodev.h>
#ifdef CONFIG_HAVE_KVM_IRQFD #ifdef CONFIG_HAVE_KVM_IRQCHIP
static struct workqueue_struct *irqfd_cleanup_wq; static struct workqueue_struct *irqfd_cleanup_wq;
...@@ -531,7 +531,7 @@ void kvm_unregister_irq_ack_notifier(struct kvm *kvm, ...@@ -531,7 +531,7 @@ void kvm_unregister_irq_ack_notifier(struct kvm *kvm,
void void
kvm_eventfd_init(struct kvm *kvm) kvm_eventfd_init(struct kvm *kvm)
{ {
#ifdef CONFIG_HAVE_KVM_IRQFD #ifdef CONFIG_HAVE_KVM_IRQCHIP
spin_lock_init(&kvm->irqfds.lock); spin_lock_init(&kvm->irqfds.lock);
INIT_LIST_HEAD(&kvm->irqfds.items); INIT_LIST_HEAD(&kvm->irqfds.items);
INIT_LIST_HEAD(&kvm->irqfds.resampler_list); INIT_LIST_HEAD(&kvm->irqfds.resampler_list);
...@@ -540,7 +540,7 @@ kvm_eventfd_init(struct kvm *kvm) ...@@ -540,7 +540,7 @@ kvm_eventfd_init(struct kvm *kvm)
INIT_LIST_HEAD(&kvm->ioeventfds); INIT_LIST_HEAD(&kvm->ioeventfds);
} }
#ifdef CONFIG_HAVE_KVM_IRQFD #ifdef CONFIG_HAVE_KVM_IRQCHIP
/* /*
* shutdown any irqfd's that match fd+gsi * shutdown any irqfd's that match fd+gsi
*/ */
......
...@@ -1273,7 +1273,7 @@ static struct kvm *kvm_create_vm(unsigned long type, const char *fdname) ...@@ -1273,7 +1273,7 @@ static struct kvm *kvm_create_vm(unsigned long type, const char *fdname)
if (r) if (r)
goto out_err_no_disable; goto out_err_no_disable;
#ifdef CONFIG_HAVE_KVM_IRQFD #ifdef CONFIG_HAVE_KVM_IRQCHIP
INIT_HLIST_HEAD(&kvm->irq_ack_notifier_list); INIT_HLIST_HEAD(&kvm->irq_ack_notifier_list);
#endif #endif
...@@ -4826,7 +4826,7 @@ static int kvm_vm_ioctl_check_extension_generic(struct kvm *kvm, long arg) ...@@ -4826,7 +4826,7 @@ static int kvm_vm_ioctl_check_extension_generic(struct kvm *kvm, long arg)
#ifdef CONFIG_HAVE_KVM_MSI #ifdef CONFIG_HAVE_KVM_MSI
case KVM_CAP_SIGNAL_MSI: case KVM_CAP_SIGNAL_MSI:
#endif #endif
#ifdef CONFIG_HAVE_KVM_IRQFD #ifdef CONFIG_HAVE_KVM_IRQCHIP
case KVM_CAP_IRQFD: case KVM_CAP_IRQFD:
#endif #endif
case KVM_CAP_IOEVENTFD_ANY_LENGTH: case KVM_CAP_IOEVENTFD_ANY_LENGTH:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment