dma api errors with swiotlb

From: Thomas HellstrÃm (VMware)
Date: Wed Sep 04 2019 - 03:59:12 EST


Hi, Cristoph.

Another DMA related question before I start to post patches in this area again..

Our virtual SCSI device (which BTW is fully DMA compliant) has a large queue depth and therefore runs out of SWIOTLB space => The scsi middle layer behaves nicely and asks the driver to retry the dma mapping operation. All fine.

The problem is that while this happens, the kernel log spits out a number of dma- and SWIOTLB errors, which are really harmless.

While one could probably just say go and increase the SWIOTLB size, but on some systems that might not be doable.

We could reduce the queue depth when SEV is active, which is probably one of those hacky solutions you dislike.

We could silence the dma- and swiotlb errors? At least selectively for some devices?

Do you have any guidance into the best solution here?

Thanks,
Thomas.