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

Xia, Chenbo chenbo.xia at intel.com
Thu Jun 8 03:33:24 CEST 2023


Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon <thomas at monjalon.net>
> Sent: Thursday, June 8, 2023 12:31 AM
> To: Li, Miao <miao.li at intel.com>
> Cc: dev at dpdk.org; skori at marvell.com; david.marchand at redhat.com;
> ferruh.yigit at amd.com; Xia, Chenbo <chenbo.xia at intel.com>; Cao, Yahui
> <yahui.cao at intel.com>
> Subject: Re: [PATCH v4 0/4] Support VFIO sparse mmap in PCI bus
> 
> 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?

Yes, we will send patches to let Intel drivers use them soon. Other
drivers could start to use when they want to support sparse mmap.

Thanks,
Chenbo 

> 



More information about the dev mailing list