RE: [PATCH] iommu/dma: Handle MSI mappings separately
From: Shameerali Kolothum Thodi <hidden>
Date: 2019-07-29 16:47:57
Also in:
linux-iommu
-----Original Message-----
From: linux-arm-kernel [mailto:linux-arm-kernel-bounces@lists.infradead.org]
On Behalf Of Robin Murphy
Sent: 29 July 2019 16:33
To: joro@8bytes.org
Cc: maz@kernel.org; iommu@lists.linux-foundation.org; Shameerali Kolothum
Thodi [off-list ref];
linux-arm-kernel@lists.infradead.org; Andre Przywara
[off-list ref]
Subject: [PATCH] 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: b61d271e59d7 ("iommu/dma: Move domain lookup into
__iommu_dma_{map,unmap}")
Reported-by: Shameer Kolothum <redacted>
Reported-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>Thanks. This fixes the vf assignment issue on D06 as well. FWIW, Tested-by: Shameer Kolothum <redacted> Shameer _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel