Commit 8132d887 authored by Paolo Bonzini's avatar Paolo Bonzini

KVM: remove CONFIG_HAVE_KVM_EVENTFD

virt/kvm/eventfd.c is compiled unconditionally, meaning that the ioeventfds
member of struct kvm is accessed unconditionally.  CONFIG_HAVE_KVM_EVENTFD
therefore must be defined for KVM common code to compile successfully,
remove it.
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 1c3c87d7
...@@ -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_EVENTFD
select HAVE_KVM_IRQFD 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
......
...@@ -22,7 +22,6 @@ config KVM ...@@ -22,7 +22,6 @@ config KVM
depends on AS_HAS_LVZ_EXTENSION depends on AS_HAS_LVZ_EXTENSION
depends on HAVE_KVM depends on HAVE_KVM
select HAVE_KVM_DIRTY_RING_ACQ_REL select HAVE_KVM_DIRTY_RING_ACQ_REL
select HAVE_KVM_EVENTFD
select HAVE_KVM_VCPU_ASYNC_IOCTL select HAVE_KVM_VCPU_ASYNC_IOCTL
select KVM_GENERIC_DIRTYLOG_READ_PROTECT select KVM_GENERIC_DIRTYLOG_READ_PROTECT
select KVM_GENERIC_HARDWARE_ENABLING select KVM_GENERIC_HARDWARE_ENABLING
......
...@@ -22,7 +22,6 @@ config KVM ...@@ -22,7 +22,6 @@ config KVM
select EXPORT_UASM select EXPORT_UASM
select PREEMPT_NOTIFIERS select PREEMPT_NOTIFIERS
select KVM_GENERIC_DIRTYLOG_READ_PROTECT select KVM_GENERIC_DIRTYLOG_READ_PROTECT
select HAVE_KVM_EVENTFD
select HAVE_KVM_VCPU_ASYNC_IOCTL select HAVE_KVM_VCPU_ASYNC_IOCTL
select KVM_MMIO select KVM_MMIO
select KVM_GENERIC_MMU_NOTIFIER select KVM_GENERIC_MMU_NOTIFIER
......
...@@ -20,7 +20,6 @@ if VIRTUALIZATION ...@@ -20,7 +20,6 @@ if VIRTUALIZATION
config KVM config KVM
bool bool
select PREEMPT_NOTIFIERS select PREEMPT_NOTIFIERS
select HAVE_KVM_EVENTFD
select HAVE_KVM_VCPU_ASYNC_IOCTL select HAVE_KVM_VCPU_ASYNC_IOCTL
select KVM_VFIO select KVM_VFIO
select IRQ_BYPASS_MANAGER select IRQ_BYPASS_MANAGER
......
...@@ -20,7 +20,6 @@ if VIRTUALIZATION ...@@ -20,7 +20,6 @@ if VIRTUALIZATION
config KVM 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_EVENTFD
select HAVE_KVM_IRQCHIP select HAVE_KVM_IRQCHIP
select HAVE_KVM_IRQFD select HAVE_KVM_IRQFD
select HAVE_KVM_IRQ_ROUTING select HAVE_KVM_IRQ_ROUTING
......
...@@ -23,7 +23,6 @@ config KVM ...@@ -23,7 +23,6 @@ config KVM
select PREEMPT_NOTIFIERS select PREEMPT_NOTIFIERS
select HAVE_KVM_CPU_RELAX_INTERCEPT select HAVE_KVM_CPU_RELAX_INTERCEPT
select HAVE_KVM_VCPU_ASYNC_IOCTL select HAVE_KVM_VCPU_ASYNC_IOCTL
select HAVE_KVM_EVENTFD
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
......
...@@ -33,7 +33,6 @@ config KVM ...@@ -33,7 +33,6 @@ config KVM
select IRQ_BYPASS_MANAGER select IRQ_BYPASS_MANAGER
select HAVE_KVM_IRQ_BYPASS select HAVE_KVM_IRQ_BYPASS
select HAVE_KVM_IRQ_ROUTING select HAVE_KVM_IRQ_ROUTING
select HAVE_KVM_EVENTFD
select KVM_ASYNC_PF select KVM_ASYNC_PF
select USER_RETURN_NOTIFIER select USER_RETURN_NOTIFIER
select KVM_MMIO select KVM_MMIO
......
...@@ -782,7 +782,6 @@ struct kvm { ...@@ -782,7 +782,6 @@ struct kvm {
struct list_head vm_list; struct list_head vm_list;
struct mutex lock; struct mutex lock;
struct kvm_io_bus __rcu *buses[KVM_NR_BUSES]; struct kvm_io_bus __rcu *buses[KVM_NR_BUSES];
#ifdef CONFIG_HAVE_KVM_EVENTFD
struct { struct {
spinlock_t lock; spinlock_t lock;
struct list_head items; struct list_head items;
...@@ -791,7 +790,6 @@ struct kvm { ...@@ -791,7 +790,6 @@ struct kvm {
struct mutex resampler_lock; struct mutex resampler_lock;
} irqfds; } irqfds;
struct list_head ioeventfds; struct list_head ioeventfds;
#endif
struct kvm_vm_stat stat; struct kvm_vm_stat stat;
struct kvm_arch arch; struct kvm_arch arch;
refcount_t users_count; refcount_t users_count;
...@@ -2056,8 +2054,6 @@ static inline void kvm_free_irq_routing(struct kvm *kvm) {} ...@@ -2056,8 +2054,6 @@ static inline void kvm_free_irq_routing(struct kvm *kvm) {}
int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi); int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi);
#ifdef CONFIG_HAVE_KVM_EVENTFD
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);
...@@ -2082,31 +2078,7 @@ static inline bool kvm_notify_irqfd_resampler(struct kvm *kvm, ...@@ -2082,31 +2078,7 @@ static inline bool kvm_notify_irqfd_resampler(struct kvm *kvm,
{ {
return false; return false;
} }
#endif #endif /* CONFIG_HAVE_KVM_IRQFD */
#else
static inline void kvm_eventfd_init(struct kvm *kvm) {}
static inline int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args)
{
return -EINVAL;
}
static inline void kvm_irqfd_release(struct kvm *kvm) {}
#ifdef CONFIG_HAVE_KVM_IRQCHIP
static inline void kvm_irq_routing_update(struct kvm *kvm)
{
}
#endif
static inline int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args)
{
return -ENOSYS;
}
#endif /* CONFIG_HAVE_KVM_EVENTFD */
void kvm_arch_irq_routing_update(struct kvm *kvm); void kvm_arch_irq_routing_update(struct kvm *kvm);
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
config HAVE_KVM config HAVE_KVM
bool bool
select EVENTFD
config HAVE_KVM_PFNCACHE config HAVE_KVM_PFNCACHE
bool bool
...@@ -39,10 +40,6 @@ config NEED_KVM_DIRTY_RING_WITH_BITMAP ...@@ -39,10 +40,6 @@ config NEED_KVM_DIRTY_RING_WITH_BITMAP
bool bool
depends on HAVE_KVM_DIRTY_RING depends on HAVE_KVM_DIRTY_RING
config HAVE_KVM_EVENTFD
bool
select EVENTFD
config KVM_MMIO config KVM_MMIO
bool bool
......
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