iommu: Add __iommu_group_domain_alloc()
authorJason Gunthorpe <jgg@nvidia.com>
Wed, 13 Sep 2023 13:43:54 +0000 (10:43 -0300)
committerJoerg Roedel <jroedel@suse.de>
Mon, 25 Sep 2023 09:41:03 +0000 (11:41 +0200)
commit8359cf39acba72606736f453f54432ac9dc28523
tree647ae3ee952ebc60c690f651f2a157cd6c7194f5
parent98ac73f99bc44fba8a14252ffb0bad02459f7008
iommu: Add __iommu_group_domain_alloc()

Allocate a domain from a group. Automatically obtains the iommu_ops to use
from the device list of the group. Convert the internal callers to use it.

Tested-by: Steven Price <steven.price@arm.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/21-v8-81230027b2fa+9d-iommu_all_defdom_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c