• Robin Murphy's avatar
    iommu/dma: Handle IOMMU API reserved regions · 7c1b058c
    Robin Murphy authored
    Now that it's simple to discover the necessary reservations for a given
    device/IOMMU combination, let's wire up the appropriate handling. Basic
    reserved regions and direct-mapped regions we simply have to carve out
    of IOVA space (the IOMMU core having already mapped the latter before
    attaching the device). For hardware MSI regions, we also pre-populate
    the cookie with matching msi_pages. That way, irqchip drivers which
    normally assume MSIs to require mapping at the IOMMU can keep working
    without having to special-case their iommu_dma_map_msi_msg() hook, or
    indeed be aware at all of quirks preventing the IOMMU from translating
    certain addresses.
    Reviewed-by: default avatarEric Auger <eric.auger@redhat.com>
    Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
    Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
    7c1b058c
dma-iommu.c 25.3 KB