Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
[cascardo/linux.git] / include / linux / vfio.h
index 049b2f4..ddb4409 100644 (file)
@@ -14,6 +14,8 @@
 
 #include <linux/iommu.h>
 #include <linux/mm.h>
+#include <linux/workqueue.h>
+#include <linux/poll.h>
 #include <uapi/linux/vfio.h>
 
 /**
@@ -110,4 +112,27 @@ static inline long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
        return -ENOTTY;
 }
 #endif /* CONFIG_EEH */
+
+/*
+ * IRQfd - generic
+ */
+struct virqfd {
+       void                    *opaque;
+       struct eventfd_ctx      *eventfd;
+       int                     (*handler)(void *, void *);
+       void                    (*thread)(void *, void *);
+       void                    *data;
+       struct work_struct      inject;
+       wait_queue_t            wait;
+       poll_table              pt;
+       struct work_struct      shutdown;
+       struct virqfd           **pvirqfd;
+};
+
+extern int vfio_virqfd_enable(void *opaque,
+                             int (*handler)(void *, void *),
+                             void (*thread)(void *, void *),
+                             void *data, struct virqfd **pvirqfd, int fd);
+extern void vfio_virqfd_disable(struct virqfd **pvirqfd);
+
 #endif /* VFIO_H */