Thread (37 messages) 37 messages, 2 authors, 2026-01-27

Re: [PATCH v2 07/10] iommu/arm-smmu-v3: Pass in vsmmu to arm_smmu_domain_get_iotlb_tag()

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2026-01-26 21:20:04
Also in: linux-iommu, linux-patches, lkml

On Wed, Jan 21, 2026 at 05:24:25PM -0800, Nicolin Chen wrote:
quoted hunk ↗ jump to hunk
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
index 5a7032081553..8323f74c8923 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
@@ -3137,6 +3137,7 @@ static int __arm_smmu_domain_get_iotlb_tag(struct arm_smmu_domain *smmu_domain,
 
 int arm_smmu_domain_get_iotlb_tag(struct arm_smmu_domain *smmu_domain,
 				  struct arm_smmu_device *smmu,
+				  struct arm_vsmmu *vsmmu,
 				  struct arm_smmu_inv *tag, bool alloc)
 {
 	int ret;
This all seems too complicated, the domain passed in should have been
a iommu_domain, not a smmu_domain, then you can just do

if (domain->Type == IOMMU_DOMAIN_NESTED) {
  struct arm_smmu_nested_domain *nested = to_smmu_nested_domain(domain);
   tag->type = INV_TYPE_S2_VMID_VSMMU;
   tag->id = nested->vsmmu->vmid;
   tag->smmu = nested->vsmmu->smmu;
   return 0;
}

Here and everything is simple.

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help