On Wed, Mar 08, 2023 at 06:25:58AM -0800, Nicolin Chen wrote:
A driver that doesn't implement ops->dma_unmap shouldn't be allowed to do vfio_pin/unpin_pages(), though it can use vfio_dma_rw() to access an iova range. Deny !ops->dma_unmap cases in vfio_pin/unpin_pages().
Suggested-by: Kevin Tian kevin.tian@intel.com Reviewed-by: Kevin Tian kevin.tian@intel.com Reviewed-by: Yi Liu yi.l.liu@intel.com Signed-off-by: Nicolin Chen nicolinc@nvidia.com
drivers/vfio/vfio_main.c | 4 ++++ 1 file changed, 4 insertions(+)
Reviewed-by: Jason Gunthorpe jgg@nvidia.com
Jason