iommufd: Move isolated msi enforcement to iommufd_device_bind()
authorJason Gunthorpe <jgg@nvidia.com>
Mon, 17 Jul 2023 18:11:57 +0000 (15:11 -0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 26 Jul 2023 13:16:43 +0000 (10:16 -0300)
commitd525a5b8cf39791b47a3d61b36dcb43e1d6fbde8
tree9a4448e005b384d1d91dab78fe5bdbf604c1a5fe
parent41ac3c2a6be1183fe1cd5062fa0a5606f9bae320
iommufd: Move isolated msi enforcement to iommufd_device_bind()

With the recent rework this no longer needs to be done at domain
attachment time, we know if the device is usable by iommufd when we bind
it.

The value of msi_device_has_isolated_msi() is not allowed to change while
a driver is bound.

Link: https://lore.kernel.org/r/1-v8-6659224517ea+532-iommufd_alloc_jgg@nvidia.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/device.c