[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260126212000.GC1134360@nvidia.com>
Date: Mon, 26 Jan 2026 17:20:00 -0400
From: Jason Gunthorpe <jgg@...dia.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: will@...nel.org, robin.murphy@....com, joro@...tes.org, jpb@...nel.org,
praan@...gle.com, miko.lenczewski@....com,
linux-arm-kernel@...ts.infradead.org, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org, patches@...ts.linux.dev
Subject: Re: [PATCH v2 07/10] iommu/arm-smmu-v3: Pass in vsmmu to
arm_smmu_domain_get_iotlb_tag()
On Wed, Jan 21, 2026 at 05:24:25PM -0800, Nicolin Chen wrote:
> 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
Powered by blists - more mailing lists