Re: [PATCH v2 2/2] iommu/arm-smmu-v3: Add support for arm,instdata-override DT property

From: Jason Gunthorpe

Date: Thu Sep 24 2026 - 19:06:15 EST


On Fri, Sep 11, 2026 at 09:21:06PM +0000, Peter Griffin wrote:
> The Google Tensor G5 SoC (Laguna) has a silicon errata with the SMMU
> integration where the AxPROT[2] signal is always 1, which makes all
> transactions appear as instructions.
>
> To avoid F_PERMISSION faults (due to the VMSAv8-64 requirement that
> unprivilieged writable buffers are treated as Privileged Execute-Never
> (PXN)), as a software workaround we make use of the INSTCFG override
> feature to force all incoming traffic to data.
>
> To enable this workaround, the "arm,instdata-override" DT property can be
> provided in the device tree entry for the SMMU, similar to how existing
> errata workarounds are handled by this driver.
>
> Note this is added for "stage-1" and "stage-2" but we intentionally leave
> out "bypass" as nothing is downstream of the SMMU that makes use of the
> Instruction/Data attribute.
>
> Signed-off-by: Pranjal Shrivastava <praan@xxxxxxxxxx>
> [peter.griffin: ported to upstream, updated commit message, remove
> feature flag]
> Signed-off-by: Peter Griffin <peter.griffin@xxxxxxxxxx>
> ---
> Changes in v2
> - Fixup incorrect bracket (Sashiko / Nicolin)
> - Add more verbose description of the issue (Will/Robin)
> - Add note about why "bypass" is not required (Nicolin)
> - Remove ARM_SMMU_FEAT_PERMS_OVR flag (Nicolin)
> - Move check closer to IDR1_ATTR_TYPES_OVR read
> ---
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 25 +++++++++++++++++++++----
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 6 ++++++
> 2 files changed, 27 insertions(+), 4 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason