Skip to content

Support VFIO sparse mmap in PCI bus

Miao Li dpdk-dev 4 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 8 repliesApplied
  2. v34 patches 9 repliesSuperseded
  3. v24 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches3 repliesSuperseded

Changes in v4 from the cover letter

1. add sparse mmap information allocation and release
2. add release note for BAR access APIs

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/4bus/pci: introduce an internal representation of PCI devicedrivers/bus/pci/bsd/pci.c drivers/bus/pci/linux/pci.c drivers/bus/pci/pci_common.c +2 more+52 -290 replies
2/4bus/pci: avoid depending on private value in kernel sourcedrivers/bus/pci/linux/pci.c drivers/bus/pci/linux/pci_init.h drivers/bus/pci/linux/pci_vfio.c +2 more+159 -560 replies
3/4bus/pci: introduce helper for MMIO read and writedoc/guides/rel_notes/release_23_07.rst drivers/bus/pci/bsd/pci.c drivers/bus/pci/linux/pci.c +5 more+192 -00 replies
4/4bus/pci: add VFIO sparse mmap supportdrivers/bus/pci/linux/pci_vfio.c drivers/bus/pci/private.h+122 -180 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchSunil Kumar KoriYahui Cao
1/4A-b A-b
2/4A-b A-b
3/4A-b A-b
4/4A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/4] Support VFIO sparse mmap in PCI bus

This series introduces a VFIO standard capability, called sparse mmap to PCI bus. In linux kernel, it's defined as VFIO_REGION_INFO_CAP_SPARSE_MMAP. Sparse mmap means instead of mmap whole BAR region into DPDK process, only mmap part of the BAR region after getting sparse mmap information from kernel. For the rest of BAR region that is not mmap-ed, DPDK process can use pread/pwrite system calls to access. Sparse mmap is useful when kernel does not want userspace to mmap whole BAR region, or kernel wants to control over access to specific BAR region. Vendors can choose to enable this feature or not for their devices in their specific kernel modules.

In this patchset:

Patch 1-3 is mainly for introducing BAR access APIs so that driver could use them to access specific BAR using pread/pwrite system calls when part of the BAR is not mmap-able. Patch 4 adds the VFIO sparse mmap support finally.

v4:
1. add sparse mmap information allocation and release
2. add release note for BAR access APIs

v3:
fix variable 'pdev' and 'info' uninitialized error

v2:
1. add PCI device internal structure in bus/pci/windows/pci.c
2. fix parameter type error

Chenbo Xia (3):
bus/pci: introduce an internal representation of PCI device bus/pci: avoid depending on private value in kernel source bus/pci: introduce helper for MMIO read and write

Miao Li (1):
bus/pci: add VFIO sparse mmap support

 doc/guides/rel_notes/release_23_07.rst |   5 +
 drivers/bus/pci/bsd/pci.c              |  35 ++-
 drivers/bus/pci/linux/pci.c            |  78 +++++-
 drivers/bus/pci/linux/pci_init.h       |  14 +-
 drivers/bus/pci/linux/pci_uio.c        |  22 ++
 drivers/bus/pci/linux/pci_vfio.c       | 371 ++++++++++++++++++++-----
 drivers/bus/pci/pci_common.c           |  12 +-
 drivers/bus/pci/private.h              |  25 +-
 drivers/bus/pci/rte_bus_pci.h          |  48 ++++
 drivers/bus/pci/version.map            |   3 +
 drivers/bus/pci/windows/pci.c          |  14 +-
 lib/eal/include/rte_vfio.h             |   1 -
 12 files changed, 525 insertions(+), 103 deletions(-)
Signature · 1 line
2.25.1