31/05/2023 07:37, Miao Li: > 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
Applied, thanks. Is there some drivers which may reuse the new MMIO helpers?