Skip to content

RFC VFIO: capability chains

Alex Williamson kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3vfio: Define capability chainsinclude/uapi/linux/vfio.h+27 -00 replies
2/3vfio: Define sparse mmap capability for regionsinclude/uapi/linux/vfio.h+25 -10 replies
3/3vfio/pci: Include sparse mmap capability for MSI-X table regionsdrivers/vfio/pci/vfio_pci.c+100 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] VFIO: capability chains

Please see the commit log and comments in patch 1 for a general explanation of the problems that this series tries to address. The general problem is that we have several cases where we want to expose variable sized information to the user, whether it's sparse mmaps for a region, as implemented here, or DMA mapping ranges of an IOMMU, or reserved MSI mapping ranges, etc. Extending data structures is hard; extending them to report variable sized data is really hard. After considering several options, I think the best approach is to copy how PCI does capabilities. This allows the ioctl to only expose the capabilities that are relevant for them, avoids data structures that are too complicated to parse, and avoids creating a new ioctl each time we think of something else that we'd like to report. This method also doesn't preclude extensions to the fixed structure since the offset of these capabilities is entirely dynamic.

Comments welcome, I'll also follow-up to the QEMU and KVM lists with an RFC making use of this for mmaps skipping over the MSI-X table. Thanks,

Alex

---

Alex Williamson (3):
vfio: Define capability chains
vfio: Define sparse mmap capability for regions vfio/pci: Include sparse mmap capability for MSI-X table regions

 drivers/vfio/pci/vfio_pci.c |  101 +++++++++++++++++++++++++++++++++++++++++++
 include/uapi/linux/vfio.h   |   53 ++++++++++++++++++++++-
 2 files changed, 152 insertions(+), 2 deletions(-)