• Z
    iommu/io-pgtable-arm: Add support for non-strict mode · 15c316e7
    Zhen Lei 提交于
    commit b6b65ca20bc93d14319f9b5cf98fd3c19a4244e3 upstream
    
    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: NZhen Lei <thunder.leizhen@huawei.com>
    [rm: tweak comment, commit message, split_blk_unmap logic and barriers]
    Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
    Signed-off-by: NWill Deacon <will.deacon@arm.com>
    Signed-off-by: NZou Cao <zoucao@linux.alibaba.com>
    Reviewed-by: NBaoyou Xie <xie.baoyou@linux.alibaba.com>
    15c316e7
io-pgtable-arm.c 31.2 KB