diff options
author | Yi Liu <yi.l.liu@intel.com> | 2024-09-08 04:42:56 -0700 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2024-09-11 20:14:07 -0300 |
commit | 79805c1bbbf9846fe91c16933d64614cbbff1dee (patch) | |
tree | b7fac4d8c54e5eb2b2222bcc597252db8b5f5841 /drivers/iommu/iommu.c | |
parent | d9dfb5e6225a0a99e08dc2a538b0c30a5a9a460c (diff) | |
download | lwn-79805c1bbbf9846fe91c16933d64614cbbff1dee.tar.gz lwn-79805c1bbbf9846fe91c16933d64614cbbff1dee.zip |
iommu: Set iommu_attach_handle->domain in core
The IOMMU core sets the iommu_attach_handle->domain for the
iommu_attach_group_handle() path, while the iommu_replace_group_handle()
sets it on the caller side. Make the two paths aligned on it.
Link: https://patch.msgid.link/r/20240908114256.979518-3-yi.l.liu@intel.com
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/iommu/iommu.c')
-rw-r--r-- | drivers/iommu/iommu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index ed6c5cb60c5a..83c8e617a2c5 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -3578,6 +3578,7 @@ int iommu_replace_group_handle(struct iommu_group *group, ret = xa_reserve(&group->pasid_array, IOMMU_NO_PASID, GFP_KERNEL); if (ret) goto err_unlock; + handle->domain = new_domain; } ret = __iommu_group_set_domain(group, new_domain); |