> From: Jason Gunthorpe <jgg@xxxxxxxxxx> > Sent: Thursday, November 17, 2022 5:06 AM > > This creates the iommufd_device for the physical VFIO drivers. These are > all the drivers that are calling vfio_register_group_dev() and expect the > type1 code to setup a real iommu_domain against their parent struct > device. > > The design gives the driver a choice in how it gets connected to iommufd > by providing bind_iommufd/unbind_iommufd/attach_ioas callbacks to > implement as required. The core code provides three default callbacks for > physical mode using a real iommu_domain. This is suitable for drivers > using vfio_register_group_dev() > > Tested-by: Nicolin Chen <nicolinc@xxxxxxxxxx> > Tested-by: Yi Liu <yi.l.liu@xxxxxxxxx> > Tested-by: Lixiao Yang <lixiao.yang@xxxxxxxxx> > Tested-by: Matthew Rosato <mjrosato@xxxxxxxxxxxxx> > Tested-by: Yu He <yu.he@xxxxxxxxx> > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx> Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>