> From: Tian, Kevin <kevin.tian@xxxxxxxxx> > Sent: Friday, February 3, 2023 12:08 PM > > > From: Liu, Yi L <yi.l.liu@xxxxxxxxx> > > Sent: Thursday, February 2, 2023 4:02 PM > > > > > > VFIO bus drivers, such as vfio-pci make use of only a few interfaces > > into VFIO core. When devices are bound and unbound to the driver, > > -the driver should call vfio_register_group_dev() and > > -vfio_unregister_group_dev() respectively:: > > +the driver should call vfio_register_group_dev() or > > +vfio_register_emulated_iommu_dev() and vfio_unregister_group_dev() > > +respectively:: > > No need to duplicate every function name with the below list. Probably > just say that "Following interfaces are called when devices are bound > to and unbound from the driver:" Got it. > > > +in the vfio_register_group_dev() or > vfio_register_emulated_iommu_dev() > > +call above. This allows the bus driver to obtain its private data using > > +container_of(). > > +- The init/release callbacks are issued in the drivers's structure allocation > > + and put. > > "issued when vfio_device is initialized and released" Got it. > > +- The open/close_device callbacks are issued when a new file descriptor > is > > + created for a device (via VFIO_GROUP_GET_DEVICE_FD). > > +- The ioctl interface provides a direct pass through for VFIO_DEVICE_* > ioctls. > > +- The [un]bind_iommufd callbacks are issued when the device is bound to > > iommufd. > > + 'unbound' is implied if iommufd is being used. > > I didn't get what the last sentence tries to say Oops, it is a rebase error. ☹ removed. Regards, Yi Liu