> From: Liu, Yi L <yi.l.liu@xxxxxxxxx> > Sent: Thursday, November 24, 2022 8:27 PM > > This makes the DMA unmap callback registration to container be consistent > across the vfio iommufd compat mode and the legacy container mode. > > In the vfio iommufd compat mode, this registration is done in the > vfio_iommufd_bind() when creating access which has an unmap callback. > This > is prior to calling the open_device() op provided by mdev driver. While, > in the vfio legacy mode, the registration is done by > vfio_device_container_register() and it is after open_device(). By swapping > the order of vfio_device_container_register() and open_device(), the two > modes have the consistent order for the DMA unmap callback registration. let's mark out that existing drivers have been converted to be OK with this order swap in Jason's series. > > This also prepares for further splitting group specific code. > > Signed-off-by: Yi Liu <yi.l.liu@xxxxxxxxx> Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>