iommufd: Make sw_msi_start a group global
authorJason Gunthorpe <jgg@nvidia.com>
Mon, 17 Jul 2023 18:12:03 +0000 (15:12 -0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 26 Jul 2023 13:19:42 +0000 (10:19 -0300)
commit1d149ab2e0062a98b3676d6ee0aaa34be16f4d4f
tree1b3f7c1df82c4edd948ac2331bf6a683cb660f24
parent269c5238c5b134ca8b18b98814b87ec995a59968
iommufd: Make sw_msi_start a group global

The sw_msi_start is only set by the ARM drivers and it is always constant.
Due to the way vfio/iommufd allow domains to be re-used between
devices we have a built in assumption that there is only one value
for sw_msi_start and it is global to the system.

To make replace simpler where we may not reparse the
iommu_get_resv_regions() move the sw_msi_start to the iommufd_group so it
is always available once any HWPT has been attached.

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