At the moment, dom0 can't distinguish which devices are protected by
IOMMU and which are not. In some cases, this can cause swiotlb bounce
buffer use for DMA addresses above 32 bits, which in turn can lead
to poor performance.
Previous discussions at [1,2] agreed upon passing info about IOMMU via
device tree. This series does that in a way consistent with existing iommu bindings.
[1] https://lore.kernel.org/all/1392913234-25429-1-git-send-email-julien.grall__16109.9684810781$1392913341$gmane$org@linaro.org/
[2] https://lore.kernel.org/all/cover.1633106362.git.roman_skakun@epam.com/
Sergiy Kibrik (2):
dt-bindings: arm: xen: document Xen iommu device
arm/xen: don't use xen DMA ops when the device is protected by an
IOMMU
Documentation/devicetree/bindings/arm/xen.txt | 26 +++++++++++++++++++
arch/arm/mm/dma-mapping.c | 2 +-
arch/arm/xen/enlighten.c | 9 +++++++
arch/arm64/mm/dma-mapping.c | 2 +-
include/xen/swiotlb-xen.h | 1 +
5 files changed, 38 insertions(+), 2 deletions(-)
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Julien Grall <julien@xen.org>
Cc: Oleksandr Tyshchenko <olekstysh@gmail.com>
Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
--
2.25.1