Re: [PATCH 5/9] vfio/pci: Provide a user-facing name for BAR mappings

Jason Gunthorpe
2026-04-24T18:26:20Z

On Thu, Apr 16, 2026 at 06:17:48AM -0700, Matt Evans wrote:
> Since converting BAR mmap()s to using DMABUFs, we lose the original
> device path in /proc/<pid>/maps, lsof, etc. Generate a debug-oriented
> synthetic 'filename' based on the cdev, plus BDF, plus resource index.
>
> This applies only to BAR mappings via the VFIO device fd, as
> explicitly-exported DMABUFs are named by userspace via the
> DMA_BUF_SET_NAME ioctl.
>
> Signed-off-by: Matt Evans <mattev@meta.com>
> ---
> drivers/vfio/pci/vfio_pci_dmabuf.c | 27 +++++++++++++++++++++++++--
> 1 file changed, 25 insertions(+), 2 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason