[PATCH] iommu/arm-smmu: Report IOMMU_CAP_CACHE_COHERENCY even betterer

Will Deacon will at kernel.org
Tue Jan 10 03:10:50 PST 2023


On Tue, Jan 10, 2023 at 12:56:25PM +0200, Vladimir Oltean wrote:
> On Thu, Dec 15, 2022 at 04:51:55PM +0000, Robin Murphy wrote:
> > Although it's vanishingly unlikely that anyone would integrate an SMMU
> > within a coherent interconnect without also making the pagetable walk
> > interface coherent, the same effect happens if a coherent SMMU fails to
> > advertise CTTW correctly. This turns out to be the case on some popular
> > NXP SoCs, where VFIO started failing the IOMMU_CAP_CACHE_COHERENCY test,
> > even though IOMMU_CACHE *was* previously achieving the desired effect
> > anyway thanks to the underlying integration.
> > 
> > While those SoCs stand to gain some more general benefits from a
> > firmware update to override CTTW correctly in DT/ACPI, it's also easy
> > to work around this in Linux as well, to avoid imposing too much on
> > affected users - since the upstream client devices *are* correctly
> > marked as coherent, we can trivially infer their coherent paths through
> > the SMMU as well.
> > 
> > Reported-by: Vladimir Oltean <vladimir.oltean at nxp.com>
> > Fixes: df198b37e72c ("iommu/arm-smmu: Report IOMMU_CAP_CACHE_COHERENCY better")
> > Signed-off-by: Robin Murphy <robin.murphy at arm.com>
> > ---
> 
> Could someone please apply this patch?

Sorry, I missed that this was fixing a recent regression. I'll pick it up
today and send it to Joerg.

Will



More information about the linux-arm-kernel mailing list