vfio/pci: ioeventfd support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 9 repliesIn review
Changes in v1 from the cover letter
* An arbitrary limit is added for the number of ioeventfds supported per device. The intention is to set this high enough to allow any reasonable use case, but limit malicious user behavior.
* Split patches, including adding a patch for endian neutral io reads and writes. This should be a nop for little-endian and avoid redundant swap on big-endian, and hopefully resolves Alexey's comments regarding the endian nature of this interface.
* Rebase to v4.16-rc3
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | vfio/pci: Pull BAR mapping setup from read-write pathdrivers/ | +27 | 2 replies | |
| 2/3 | vfio/pci: Use endian neutral helpersdrivers/ | +26 | 0 replies | |
| 3/3 | vfio/pci: Add ioeventfd supportdrivers/ drivers/ drivers/ +1 more | +194 | 4 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Peter Xu | Eric Auger |
|---|---|---|
| 1/3 | R-b | R-b |
| 2/3 | ||
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] vfio/pci: ioeventfd support
A vfio ioeventfd will perform the pre-specified device write on triggering of an eventfd. When coupled with KVM ioeventfds, this feature allows a VM to trap a device page for virtualization, while also registering targeted ioeventfds to maintain performance of high frequency register writes within the trapped range. Much like the existing interrupt eventfd/irqfd coupling, such writes can be handled entirely in the host kernel.
The new VFIO device ioctl may be supported by any vfio bus driver, including mdev drivers, but the implementation here only enables vfio-pci. This is intended as an acceleration path, bus drivers may choose which regions to support and userspace should always intend to fall back to non-accelerated handling when unavailable.
RFC->v1:
* An arbitrary limit is added for the number of ioeventfds supported per device. The intention is to set this high enough to allow any reasonable use case, but limit malicious user behavior.
* Split patches, including adding a patch for endian neutral io reads and writes. This should be a nop for little-endian and avoid redundant swap on big-endian, and hopefully resolves Alexey's comments regarding the endian nature of this interface.
* Rebase to v4.16-rc3
Thanks,
Alex
---
Alex Williamson (3):
vfio/pci: Pull BAR mapping setup from read-write path vfio/pci: Use endian neutral helpers vfio/pci: Add ioeventfd support
drivers/vfio/pci/vfio_pci.c | 34 ++++++ drivers/vfio/pci/vfio_pci_private.h | 18 +++ drivers/vfio/pci/vfio_pci_rdwr.c | 188 +++++++++++++++++++++++++++++++---- include/uapi/linux/vfio.h | 27 +++++ 4 files changed, 247 insertions(+), 20 deletions(-)