RE: [PATCH v5 3/9] vfio/pci: Add a helper to look up PFNs for DMABUFs

From: Tian, Kevin

Date: Fri Jul 17 2026 - 04:05:25 EST


> From: Matt Evans <matt@xxxxxxxxxx>
> Sent: Thursday, July 16, 2026 1:47 AM
>
> Add vfio_pci_dma_buf_find_pfn(), which a VMA fault handler can use to
> find a PFN.
>
> This supports multi-range DMABUFs, which typically would be used to
> represent scattered spans but might even represent overlapping or
> aliasing spans of PFNs.
>
> Because this is intended to be used in vfio_pci_core.c, we also need
> to expose the struct vfio_pci_dma_buf in the vfio_pci_priv.h header.
>
> Signed-off-by: Matt Evans <matt@xxxxxxxxxx>

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>