On Fri, Apr 28, 2023 at 02:21:26PM +0800, Yi Liu wrote: > but this patch needs to use vfio_iommufd_emulated_bind() and > vfio_iommufd_emulated_unbind() for the noiommu devices when binding > to iommufd. So needs to check noiommu in the vfio_iommufd_bind() > and vfio_iommu_unbind() as well. I'm not sure this is strictly necessary, it just needs an access The emulated stuff is for mdev only, it should not be confused with no-iommu Eg if you had a no_iommu_access value to store the access it would be fine and could serve as the 'this is no_iommu' flag The only purpose of the access at this moment is to get an iommufdctx id to return to userspace. Jason