On 2019-07-29 16:32, Robin Murphy wrote:
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 <shameerali.kolothum.th...@huawei.com>
Reported-by: Andre Przywara <andre.przyw...@arm.com>
Signed-off-by: Robin Murphy <robin.mur...@arm.com>
With this patch, my TX2 is back in business with a bnx2x device passed
to a guest. FWIW:
Tested-by: Marc Zyngier <m...@kernel.org>
Thanks,
M.
--
Jazz is not dead. It just smells funny...
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu