[PATCH 3/4] iova-dbg

Chris Wilson chris at chris-wilson.co.uk
Wed Jan 13 10:37:20 UTC 2021


---
 drivers/iommu/dma-iommu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index 31cd260bc581..a6bf9a223cce 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -458,6 +458,9 @@ static dma_addr_t iommu_dma_alloc_iova(struct iommu_domain *domain,
 	if (!iova)
 		iova = alloc_iova_fast(iovad, iova_len, dma_limit >> shift,
 				       true);
+	if (!iova)
+		pr_err("iova fail, size:%zu, iova_len:%lu, dma_limit:%llu, bus_limit:%llu, aperture_end:%llu\n",
+		       size, iova_len, dma_limit, dev->bus_dma_limit, (u64)domain->geometry.aperture_end);
 
 	return (dma_addr_t)iova << shift;
 }
-- 
2.20.1



More information about the Intel-gfx-trybot mailing list