Re: [RFC PATCH 3/7] vfio/pci: Support mmap() of a DMABUF
From: Alex Mastro
Date: Fri Feb 27 2026 - 16:52:52 EST
On Fri, Feb 27, 2026 at 03:48:07PM -0400, Jason Gunthorpe wrote:
> > > I actually would like to go the other way and have VFIO always have a
> > > DMABUF under the VMA's it mmaps because that will make it easy to
> > > finish the type1 emulation which requires finding dmabufs for the
> > > VMAs.
>
> This is a still better idea since it avoid duplicating the VMA flow
> into two parts..
I suppose this would also compose with your idea to use dma-buf for
iommufd_compat support of VFIO_IOMMU_MAP_DMA of vfio device fd-backed mmap()s
[1]? Instead of needing to materialize a new dma-buf, you could use the existing
backing one?
[1] https://lore.kernel.org/all/20260108141044.GC545276@xxxxxxxx/