Skip to content

Commit 7be4233

Browse files
LuBaolujoergroedel
authored andcommitted
iommu: Set owner token to SVA domain
Commit a9c362d ("iommu: Validate that devices match domains") added an owner token to the iommu_domain. This token is checked during domain attachment to RID or PASID through the generic iommu interfaces. The SVA domains are attached to PASIDs through those iommu interfaces. Therefore, they require the owner token to be set during allocation. Otherwise, they fail to attach. Set the owner token for SVA domains. Fixes: a9c362d ("iommu: Validate that devices match domains") Cc: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20231208015314.320663-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 1fa05c9 commit 7be4233

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/iommu/iommu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3617,6 +3617,7 @@ struct iommu_domain *iommu_sva_domain_alloc(struct device *dev,
36173617
domain->type = IOMMU_DOMAIN_SVA;
36183618
mmgrab(mm);
36193619
domain->mm = mm;
3620+
domain->owner = ops;
36203621
domain->iopf_handler = iommu_sva_handle_iopf;
36213622
domain->fault_data = mm;
36223623

0 commit comments

Comments
 (0)