On Mon, Nov 07, 2022 at 11:53:24PM +0000, Tian, Kevin wrote:
Other than that, userspace can change the IOAS it wants freely, there is no harm to the kernel and it may even be useful.
it allows devices SET_CONTAINER to an same iommufd attached to different IOAS's if IOAS_SET comes in the middle. Is it desired?
Sure, if userspace does crazy things then userspace gets to keep all the pieces - it doesn't harm the kernel.
The IOAS is bound during get_device, and that is one of the key conceptual things we changed with iommufd.
Jason