Merge tag 'vfio-v4.1-rc1' of git://github.com/awilliam/linux-vfio
Pull VFIO updates from Alex Williamson: - VFIO platform bus driver support (Baptiste Reynal, Antonios Motakis, testing and review by Eric Auger) - Split VFIO irqfd support to separate module (Alex Williamson) - vfio-pci VGA arbiter client (Alex Williamson) - New vfio-pci.ids= module option (Alex Williamson) - vfio-pci D3 power state support for idle devices (Alex Williamson) * tag 'vfio-v4.1-rc1' of git://github.com/awilliam/linux-vfio: (30 commits) vfio-pci: Fix use after free vfio-pci: Move idle devices to D3hot power state vfio-pci: Remove warning if try-reset fails vfio-pci: Allow PCI IDs to be specified as module options vfio-pci: Add VGA arbiter client vfio-pci: Add module option to disable VGA region access vgaarb: Stub vga_set_legacy_decoding() vfio: Split virqfd into a separate module for vfio bus drivers vfio: virqfd_lock can be static vfio: put off the allocation of "minor" in vfio_create_group vfio/platform: implement IRQ masking/unmasking via an eventfd vfio: initialize the virqfd workqueue in VFIO generic code vfio: move eventfd support code for VFIO_PCI to a separate file vfio: pass an opaque pointer on virqfd initialization vfio: add local lock for virqfd instead of depending on VFIO PCI vfio: virqfd: rename vfio_pci_virqfd_init and vfio_pci_virqfd_exit vfio: add a vfio_ prefix to virqfd_enable and virqfd_disable and export vfio/platform: support for level sensitive interrupts vfio/platform: trigger an interrupt via eventfd vfio/platform: initial interrupts support code ...
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user