Re: [PATCH v7 2/3] iommu/arm-smmu-v3: Introduce CFGI/TLBI-repeat workaround infrastructure

Ashish Mhetre <[email protected]> Wed, 22 Jul 2026 14:48:02 +0530
Newsgroups org.kernel.vger.linux-tegra,dev.linux.lists.iommu,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel
Message-ID <[email protected]>

On 7/20/2026 2:07 AM, Nicolin Chen wrote:
> On Sat, Jul 18, 2026 at 01:45:48PM -0300, Jason Gunthorpe wrote:
>> On Fri, Jul 17, 2026 at 02:16:53PM -0700, Nicolin Chen wrote:
>>> Given the use cases on Tegra264, instead of patching the iommufd
>>> path as this patch does, perhaps we should simply spit a WARN in
>>> arm_vsmmu_init():
>> Nope, in this case you need to make the errata discoverable through
>> the viommu info so the VMM can validate the right DT is used, or apply
>> the WAR itself before submitting commands to the kernel.
> OK.
>
>> Some kind of new flag in the viommu struct I guess
> struct iommu_hw_info_arm_smmuv3 has an unused "flags" field:
>
> /**
>   * enum iommu_hw_info_smmuv3_flags - Flags for ARM SMMUv3 hw_info
>   * @IOMMU_HW_INFO_SMMUV3_ERRATA_REPEAT_TLBI_CFGI: If set, user space must issue
>   *                                                TLBI/CFGI+SYNC commands twice
>   *                                                due to a hardware erratum:
>   *                                                <link-to-erratum>
>   */
> enum iommu_hw_info_smmuv3_flags {
> 	IOMMU_HW_INFO_SMMUV3_ERRATA_REPEAT_TLBI_CFGI = 1 << 0,
> };
>
> Thanks
> Nicolin

Ack, I am sending v8 addressing this.

Thanks,
Ashish Mhetre