[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aFlvLw0SHgYiA614@google.com>
Date: Mon, 23 Jun 2025 15:13:51 +0000
From: Pranjal Shrivastava <praan@...gle.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: Jason Gunthorpe <jgg@...dia.com>, 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, 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,
dwmw2@...radead.org, baolu.lu@...ux.intel.com
Subject: Re: [PATCH v6 20/25] iommu/arm-smmu-v3-iommufd: Add hw_info to
impl_ops
On Fri, Jun 20, 2025 at 10:36:56PM -0700, Nicolin Chen wrote:
> On Fri, Jun 20, 2025 at 03:32:19AM +0000, Pranjal Shrivastava wrote:
> > My point is that in-case someone passed INTEL_VTD type, we would end up
> > calling impl_ops->hw_info and then the impl_ops->hw_info shall check for
> > the type to return -EOPNOTSUPP. Either we should clearly mention that
> > each impl_op implementing hw_info *must* add another type and check for
> > it
>
> Let's add this:
>
> @@ -721,6 +721,11 @@ struct arm_smmu_impl_ops {
> int (*init_structures)(struct arm_smmu_device *smmu);
> struct arm_smmu_cmdq *(*get_secondary_cmdq)(
> struct arm_smmu_device *smmu, struct arm_smmu_cmdq_ent *ent);
> + /*
> + * An implementation should define its own type other than the default
> + * IOMMU_HW_INFO_TYPE_ARM_SMMUV3. And it must validate the input @type
> + * to return its own structure.
> + */
> void *(*hw_info)(struct arm_smmu_device *smmu, u32 *length, u32 *type);
> const size_t vsmmu_size;
> const enum iommu_viommu_type vsmmu_type;
>
> And I found that we could have another patch changing "u32 *type"
> to "enum iommufd_hw_info_flags *type" to avoid some duplications
> in the kdocs.
>
Yea, that sounds good. Thanks!
> Thanks
> Nicolin
Powered by blists - more mailing lists