On Wed, Mar 08, 2023 at 05:13:39AM -0800, Yi Liu wrote: > This harmonizes the no-DMA devices (the vfio-mdev sample drivers) with > the emulated devices (gvt-g, vfio-ap etc.). It makes it easier to add > BIND_IOMMUFD user interface which requires to return an iommufd ID to > represent the device/iommufd bond. > > Signed-off-by: Yi Liu <yi.l.liu@xxxxxxxxx> > --- > drivers/vfio/iommufd.c | 14 ++++++-------- > samples/vfio-mdev/mbochs.c | 3 +++ > samples/vfio-mdev/mdpy.c | 3 +++ > samples/vfio-mdev/mtty.c | 3 +++ > 4 files changed, 15 insertions(+), 8 deletions(-) Subject should be 'vfio/mdev: ..' > @@ -119,7 +115,8 @@ EXPORT_SYMBOL_GPL(vfio_iommufd_physical_attach_ioas); > /* > * The emulated standard ops mean that vfio_device is going to use the > * "mdev path" and will call vfio_pin_pages()/vfio_dma_rw(). Drivers using this > - * ops set should call vfio_register_emulated_iommu_dev(). > + * ops set should call vfio_register_emulated_iommu_dev(). Drivers that do > + * not call vfio_pin_pages()/vfio_dma_rw() no need to provide dma_unmap. > */ 'have no need' Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx> Jason