[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250515171706.GN382960@nvidia.com>
Date: Thu, 15 May 2025 14:17:06 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: kevin.tian@...el.com, corbet@....net, will@...nel.org,
bagasdotme@...il.com, robin.murphy@....com, joro@...tes.org,
thierry.reding@...il.com, vdumpa@...dia.com, jonathanh@...dia.com,
shuah@...nel.org, jsnitsel@...hat.com, nathan@...nel.org,
peterz@...radead.org, yi.l.liu@...el.com, mshavit@...gle.com,
praan@...gle.com, zhangzekun11@...wei.com, iommu@...ts.linux.dev,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-tegra@...r.kernel.org,
linux-kselftest@...r.kernel.org, patches@...ts.linux.dev,
mochs@...dia.com, alok.a.tiwari@...cle.com, vasant.hegde@....com
Subject: Re: [PATCH v4 18/23] iommu/arm-smmu-v3-iommufd: Support
implementation-defined hw_info
On Thu, May 08, 2025 at 08:02:39PM -0700, Nicolin Chen wrote:
> Repurpose the @__reserved field in the struct iommu_hw_info_arm_smmuv3,
> to an HW implementation-defined field @impl.
It would be nicer to have a tegra/cmdq specific struct and a way for
iommu_hw_info to select it. 'impl' isn't going to scale very well if
something else wants to use this.
We have out_data_type but we could have an input sub_data_type too. 0
means what we have today, then a simple enum to select another info
struct.
> @@ -726,6 +726,7 @@ struct arm_smmu_impl_ops {
> struct arm_smmu_domain *smmu_domain, struct iommufd_ctx *ictx,
> unsigned int viommu_type,
> const struct iommu_user_data *user_data);
> + u32 (*hw_info)(struct arm_smmu_device *smmu, u32 *impl);
> };
Then the dispatch here is just having a sub-struct enum # in
arm_smmu_impl_ops for dispatching.
Jason
Powered by blists - more mailing lists