From: Jason Gunthorpe jgg@nvidia.com Sent: Tuesday, November 8, 2022 8:49 AM
Add the four functions external drivers need to connect physical DMA to the IOMMUFD:
iommufd_device_bind() / iommufd_device_unbind() Register the device with iommufd and establish security isolation.
iommufd_device_attach() / iommufd_device_detach() Connect a bound device to a page table
Binding a device creates a device object ID in the uAPI, however the generic API provides no IOCTLs to manipulate them.
Tested-by: Nicolin Chen nicolinc@nvidia.com Signed-off-by: Jason Gunthorpe jgg@nvidia.com
Reviewed-by: Kevin Tian kevin.tian@intel.com