]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries/iommu: Don't use dma_iommu_ops on secure guests
authorThiago Jung Bauermann <bauerman@linux.ibm.com>
Tue, 20 Aug 2019 02:13:23 +0000 (23:13 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 29 Aug 2019 23:55:41 +0000 (09:55 +1000)
commitc046a6d685a4ec14a20fb8d30f8a54b0b652cbb9
tree5b36c86623d7cd9128ecff8bac88ccb68557e020
parenta1112e67fcdb3a72b47db1d60a6eb0c1037ad5db
powerpc/pseries/iommu: Don't use dma_iommu_ops on secure guests

Secure guest memory is inacessible to devices so regular DMA isn't
possible.

In that case set devices' dma_map_ops to NULL so that the generic
DMA code path will use SWIOTLB to bounce buffers for DMA.

Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190820021326.6884-14-bauerman@linux.ibm.com
arch/powerpc/platforms/pseries/iommu.c