• Will Deacon's avatar
    iommu/arm-smmu-v3: Fix ATC invalidation ordering wrt main TLBs · 353e3cf8
    Will Deacon authored
    When invalidating the ATC for an PCIe endpoint using ATS, we must take
    care to complete invalidation of the main SMMU TLBs beforehand, otherwise
    the device could immediately repopulate its ATC with stale translations.
    
    Hooking the ATC invalidation into ->unmap() as we currently do does the
    exact opposite: it ensures that the ATC is invalidated *before*  the
    main TLBs, which is bogus.
    
    Move ATC invalidation into the actual (leaf) invalidation routines so
    that it is always called after completing main TLB invalidation.
    Reviewed-by: default avatarRobin Murphy <robin.murphy@arm.com>
    Signed-off-by: default avatarWill Deacon <will@kernel.org>
    353e3cf8
arm-smmu-v3.c 95.8 KB