Skip to content
Commit 8af23fad authored by Robin Murphy's avatar Robin Murphy Committed by Joerg Roedel
Browse files

iommu/dma: Handle MSI mappings separately



MSI pages must always be mapped into a device's *current* domain, which
*might* be the default DMA domain, but might instead be a VFIO domain
with its own MSI cookie. This subtlety got accidentally lost in the
streamlining of __iommu_dma_map(), but rather than reintroduce more
complexity and/or special-casing, it turns out neater to just split this
path out entirely.

Since iommu_dma_get_msi_page() already duplicates much of what
__iommu_dma_map() does, it can easily just make the allocation and
mapping calls directly as well. That way we can further streamline the
helper back to exclusively operating on DMA domains.

Fixes: b61d271e ("iommu/dma: Move domain lookup into __iommu_dma_{map,unmap}")
Reported-by: default avatarShameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reported-by: default avatarAndre Przywara <andre.przywara@arm.com>
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Tested-by: default avatarMarc Zyngier <maz@kernel.org>
Tested-by: default avatarAndre Przywara <andre.przywara@arm.com>
Tested-by: default avatarShameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent e21a712a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment