]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
iommu/io-pgtable-arm: Add support for non-strict mode
authorZhen Lei <thunder.leizhen@huawei.com>
Thu, 20 Sep 2018 16:10:24 +0000 (17:10 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
commitdd4f208835f1d19945f4cd89d9a6c0ea30fcea86
tree1647aa57cb5755f04c6d4b0e9202fdba6972ca18
parent3f11a03bfa3a8006c126cdc1c4e73a617e52eaa1
iommu/io-pgtable-arm: Add support for non-strict mode

BugLink: https://bugs.launchpad.net/bugs/1806488
Non-strict mode is simply a case of skipping 'regular' leaf TLBIs, since
the sync is already factored out into ops->iotlb_sync at the core API
level. Non-leaf invalidations where we change the page table structure
itself still have to be issued synchronously in order to maintain walk
caches correctly.

To save having to reason about it too much, make sure the invalidation
in arm_lpae_split_blk_unmap() just performs its own unconditional sync
to minimise the window in which we're technically violating the break-
before-make requirement on a live mapping. This might work out redundant
with an outer-level sync for strict unmaps, but we'll never be splitting
blocks on a DMA fastpath anyway.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
[rm: tweak comment, commit message, split_blk_unmap logic and barriers]
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit b6b65ca20bc93d14319f9b5cf98fd3c19a4244e3)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/iommu/io-pgtable-arm.c
drivers/iommu/io-pgtable.h