Re: [PATCH v8 3/3] iommu/arm-smmu-v3: Enable CFGI/TLBI-repeat workaround on Tegra264
Nicolin Chen <[email protected]> Wed, 22 Jul 2026 12:16:22 -0700
| 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 Wed, Jul 22, 2026 at 10:20:33AM +0000, Ashish Mhetre wrote: > The host repeats only the invalidations it issues itself. On a nesting > setup the guest submits its own invalidations, either directly through > VCMDQ or via the iommufd user-invalidation path, so the guest is the one > that has to apply the workaround there. Report the erratum to user space > through the new IOMMU_HW_INFO_ARM_SMMUV3_ERRATA_REPEAT_TLBI_CFGI hw_info > flag so a VMM can confirm the guest runs a matching "nvidia,tegra264-smmu" > (or otherwise double the commands itself). The host therefore does not > repeat the guest's user-issued invalidations, which would otherwise be > doubled a second time. I think this "enable" patch is doing a bit too much. All the iommufd-related changes can be added separately I would do a cleanup: - arm-smmu-v3: Factor force_sync - arm-smmu-v3: Add arm_smmu_erratum_repeat_tlbi_cfgi_key and WAR - arm-smmu-v3-iommufd: Add IOMMU_HW_INFO_ARM_SMMUV3_ERRATA_REPEAT_TLBI_CFGI - arm-smmu-v3: Set arm_smmu_erratum_repeat_tlbi_cfgi_key > +/** > + * enum iommu_hw_info_arm_smmuv3_flags - Flags for ARM SMMUv3 hw_info > + * @IOMMU_HW_INFO_ARM_SMMUV3_ERRATA_REPEAT_TLBI_CFGI: If set, user space must > + * issue TLBI/CFGI+SYNC commands twice due to a hardware erratum T264-SMMU-3. > + * See the description at arm_smmu_erratum_repeat_tlbi_cfgi_key. You can follow the kdoc style as enum iommufd_option. Nicolin