Skip to content

Commit c5b31cc

Browse files
committed
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: Paolo Bonzini <pbonzini@redhat.com>
1 parent 8132d88 commit c5b31cc

11 files changed

Lines changed: 14 additions & 24 deletions

File tree

arch/arm64/kvm/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ menuconfig KVM
2929
select KVM_GENERIC_DIRTYLOG_READ_PROTECT
3030
select KVM_XFER_TO_GUEST_WORK
3131
select KVM_VFIO
32-
select HAVE_KVM_IRQFD
3332
select HAVE_KVM_DIRTY_RING_ACQ_REL
3433
select NEED_KVM_DIRTY_RING_WITH_BITMAP
3534
select HAVE_KVM_MSI

arch/powerpc/kvm/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ config KVM_MPIC
224224
bool "KVM in-kernel MPIC emulation"
225225
depends on KVM && PPC_E500
226226
select HAVE_KVM_IRQCHIP
227-
select HAVE_KVM_IRQFD
228227
select HAVE_KVM_IRQ_ROUTING
229228
select HAVE_KVM_MSI
230229
help
@@ -237,7 +236,6 @@ config KVM_XICS
237236
bool "KVM in-kernel XICS emulation"
238237
depends on KVM_BOOK3S_64 && !KVM_MPIC
239238
select HAVE_KVM_IRQCHIP
240-
select HAVE_KVM_IRQFD
241239
default y
242240
help
243241
Include support for the XICS (eXternal Interrupt Controller

arch/powerpc/kvm/powerpc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
578578
break;
579579
#endif
580580

581-
#ifdef CONFIG_HAVE_KVM_IRQFD
581+
#ifdef CONFIG_HAVE_KVM_IRQCHIP
582582
case KVM_CAP_IRQFD_RESAMPLE:
583583
r = !xive_enabled();
584584
break;

arch/riscv/kvm/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ config KVM
2121
tristate "Kernel-based Virtual Machine (KVM) support (EXPERIMENTAL)"
2222
depends on RISCV_SBI && MMU
2323
select HAVE_KVM_IRQCHIP
24-
select HAVE_KVM_IRQFD
2524
select HAVE_KVM_IRQ_ROUTING
2625
select HAVE_KVM_MSI
2726
select HAVE_KVM_VCPU_ASYNC_IOCTL

arch/s390/kvm/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ config KVM
2626
select KVM_ASYNC_PF
2727
select KVM_ASYNC_PF_SYNC
2828
select HAVE_KVM_IRQCHIP
29-
select HAVE_KVM_IRQFD
3029
select HAVE_KVM_IRQ_ROUTING
3130
select HAVE_KVM_INVALID_WAKEUPS
3231
select HAVE_KVM_NO_POLL

arch/x86/kvm/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ config KVM
2727
select KVM_GENERIC_MMU_NOTIFIER
2828
select HAVE_KVM_IRQCHIP
2929
select HAVE_KVM_PFNCACHE
30-
select HAVE_KVM_IRQFD
3130
select HAVE_KVM_DIRTY_RING_TSO
3231
select HAVE_KVM_DIRTY_RING_ACQ_REL
3332
select IRQ_BYPASS_MANAGER

include/linux/kvm_host.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -805,8 +805,7 @@ struct kvm {
805805
* Update side is protected by irq_lock.
806806
*/
807807
struct kvm_irq_routing_table __rcu *irq_routing;
808-
#endif
809-
#ifdef CONFIG_HAVE_KVM_IRQFD
808+
810809
struct hlist_head irq_ack_notifier_list;
811810
#endif
812811

@@ -996,7 +995,7 @@ static inline void kvm_arch_post_irq_routing_update(struct kvm *kvm)
996995
}
997996
#endif
998997

999-
#ifdef CONFIG_HAVE_KVM_IRQFD
998+
#ifdef CONFIG_HAVE_KVM_IRQCHIP
1000999
int kvm_irqfd_init(void);
10011000
void kvm_irqfd_exit(void);
10021001
#else
@@ -2057,7 +2056,7 @@ int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi);
20572056
void kvm_eventfd_init(struct kvm *kvm);
20582057
int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args);
20592058

2060-
#ifdef CONFIG_HAVE_KVM_IRQFD
2059+
#ifdef CONFIG_HAVE_KVM_IRQCHIP
20612060
int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args);
20622061
void kvm_irqfd_release(struct kvm *kvm);
20632062
bool kvm_notify_irqfd_resampler(struct kvm *kvm,
@@ -2078,7 +2077,7 @@ static inline bool kvm_notify_irqfd_resampler(struct kvm *kvm,
20782077
{
20792078
return false;
20802079
}
2081-
#endif /* CONFIG_HAVE_KVM_IRQFD */
2080+
#endif /* CONFIG_HAVE_KVM_IRQCHIP */
20822081

20832082
void kvm_arch_irq_routing_update(struct kvm *kvm);
20842083

include/trace/events/kvm.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ TRACE_EVENT(kvm_vcpu_wakeup,
6262
__entry->valid ? "valid" : "invalid")
6363
);
6464

65-
#if defined(CONFIG_HAVE_KVM_IRQFD)
65+
#if defined(CONFIG_HAVE_KVM_IRQCHIP)
6666
TRACE_EVENT(kvm_set_irq,
6767
TP_PROTO(unsigned int gsi, int level, int irq_source_id),
6868
TP_ARGS(gsi, level, irq_source_id),
@@ -82,7 +82,7 @@ TRACE_EVENT(kvm_set_irq,
8282
TP_printk("gsi %u level %d source %d",
8383
__entry->gsi, __entry->level, __entry->irq_source_id)
8484
);
85-
#endif /* defined(CONFIG_HAVE_KVM_IRQFD) */
85+
#endif /* defined(CONFIG_HAVE_KVM_IRQCHIP) */
8686

8787
#if defined(__KVM_HAVE_IOAPIC)
8888
#define kvm_deliver_mode \
@@ -170,7 +170,7 @@ TRACE_EVENT(kvm_msi_set_irq,
170170

171171
#endif /* defined(__KVM_HAVE_IOAPIC) */
172172

173-
#if defined(CONFIG_HAVE_KVM_IRQFD)
173+
#if defined(CONFIG_HAVE_KVM_IRQCHIP)
174174

175175
#ifdef kvm_irqchips
176176
#define kvm_ack_irq_string "irqchip %s pin %u"
@@ -197,7 +197,7 @@ TRACE_EVENT(kvm_ack_irq,
197197
TP_printk(kvm_ack_irq_string, kvm_ack_irq_parm)
198198
);
199199

200-
#endif /* defined(CONFIG_HAVE_KVM_IRQFD) */
200+
#endif /* defined(CONFIG_HAVE_KVM_IRQCHIP) */
201201

202202

203203

virt/kvm/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ config HAVE_KVM_PFNCACHE
1111
config HAVE_KVM_IRQCHIP
1212
bool
1313

14-
config HAVE_KVM_IRQFD
15-
bool
16-
1714
config HAVE_KVM_IRQ_ROUTING
1815
bool
1916

virt/kvm/eventfd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
#include <kvm/iodev.h>
3030

31-
#ifdef CONFIG_HAVE_KVM_IRQFD
31+
#ifdef CONFIG_HAVE_KVM_IRQCHIP
3232

3333
static struct workqueue_struct *irqfd_cleanup_wq;
3434

@@ -531,7 +531,7 @@ void kvm_unregister_irq_ack_notifier(struct kvm *kvm,
531531
void
532532
kvm_eventfd_init(struct kvm *kvm)
533533
{
534-
#ifdef CONFIG_HAVE_KVM_IRQFD
534+
#ifdef CONFIG_HAVE_KVM_IRQCHIP
535535
spin_lock_init(&kvm->irqfds.lock);
536536
INIT_LIST_HEAD(&kvm->irqfds.items);
537537
INIT_LIST_HEAD(&kvm->irqfds.resampler_list);
@@ -540,7 +540,7 @@ kvm_eventfd_init(struct kvm *kvm)
540540
INIT_LIST_HEAD(&kvm->ioeventfds);
541541
}
542542

543-
#ifdef CONFIG_HAVE_KVM_IRQFD
543+
#ifdef CONFIG_HAVE_KVM_IRQCHIP
544544
/*
545545
* shutdown any irqfd's that match fd+gsi
546546
*/

0 commit comments

Comments
 (0)