Re: [PATCH 5/9] vfio/pci: Provide a user-facing name for BAR mappings
From: Jason Gunthorpe
Date: Fri Apr 24 2026 - 14:26:28 EST
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@xxxxxxxx>
> ---
> drivers/vfio/pci/vfio_pci_dmabuf.c | 27 +++++++++++++++++++++++++--
> 1 file changed, 25 insertions(+), 2 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
Jason