aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 3060bdc35ffe..7724dcb6ff76 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -136,6 +136,12 @@ struct kvm {
136 struct list_head vm_list; 136 struct list_head vm_list;
137 struct kvm_io_bus mmio_bus; 137 struct kvm_io_bus mmio_bus;
138 struct kvm_io_bus pio_bus; 138 struct kvm_io_bus pio_bus;
139#ifdef CONFIG_HAVE_KVM_EVENTFD
140 struct {
141 spinlock_t lock;
142 struct list_head items;
143 } irqfds;
144#endif
139 struct kvm_vm_stat stat; 145 struct kvm_vm_stat stat;
140 struct kvm_arch arch; 146 struct kvm_arch arch;
141 atomic_t users_count; 147 atomic_t users_count;
@@ -525,4 +531,22 @@ static inline void kvm_free_irq_routing(struct kvm *kvm) {}
525 531
526#endif 532#endif
527 533
534#ifdef CONFIG_HAVE_KVM_EVENTFD
535
536void kvm_irqfd_init(struct kvm *kvm);
537int kvm_irqfd(struct kvm *kvm, int fd, int gsi, int flags);
538void kvm_irqfd_release(struct kvm *kvm);
539
540#else
541
542static inline void kvm_irqfd_init(struct kvm *kvm) {}
543static inline int kvm_irqfd(struct kvm *kvm, int fd, int gsi, int flags)
544{
545 return -EINVAL;
546}
547
548static inline void kvm_irqfd_release(struct kvm *kvm) {}
549
550#endif /* CONFIG_HAVE_KVM_EVENTFD */
551
528#endif 552#endif