iommu/arm-smmu: Invalidate TLBs properly
authorRobin Murphy <robin.murphy@arm.com>
Mon, 7 Dec 2015 18:18:52 +0000 (18:18 +0000)
committerWill Deacon <will.deacon@arm.com>
Thu, 17 Dec 2015 12:05:35 +0000 (12:05 +0000)
commit75df1386557c25188bd2383bbe8dd14a5ac81c06
tree95850b0e6af3a2e4c5e15333922aba99f254542e
parent06c610e8f32ba2fe41d57e1718611c2ec5024878
iommu/arm-smmu: Invalidate TLBs properly

When invalidating an IOVA range potentially spanning multiple pages,
such as when removing an entire intermediate-level table, we currently
only issue an invalidation for the first IOVA of that range. Since the
architecture specifies that address-based TLB maintenance operations
target a single entry, an SMMU could feasibly retain live entries for
subsequent pages within that unmapped range, which is not good.

Make sure we hit every possible entry by iterating over the whole range
at the granularity provided by the pagetable implementation.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
[will: added missing semicolons...]
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu-v3.c
drivers/iommu/arm-smmu.c