Re: [PATCH v3 13/16] powerpc/pseries/iommu: Don't use dma_iommu_ops on secure guests

2019-08-06 Thread Thiago Jung Bauermann
Hello Christoph, Thanks for your review. Christoph Hellwig writes: > On Tue, Aug 06, 2019 at 02:22:34AM -0300, Thiago Jung Bauermann wrote: >> @@ -1318,7 +1319,10 @@ void iommu_init_early_pSeries(void) >> of_reconfig_notifier_register(_reconfig_nb); >>

Re: [PATCH v3 13/16] powerpc/pseries/iommu: Don't use dma_iommu_ops on secure guests

2019-08-05 Thread Christoph Hellwig
On Tue, Aug 06, 2019 at 02:22:34AM -0300, Thiago Jung Bauermann wrote: > @@ -1318,7 +1319,10 @@ void iommu_init_early_pSeries(void) > of_reconfig_notifier_register(_reconfig_nb); > register_memory_notifier(_mem_nb); > > - set_pci_dma_ops(_iommu_ops); > + if

[PATCH v3 13/16] powerpc/pseries/iommu: Don't use dma_iommu_ops on secure guests

2019-08-05 Thread Thiago Jung Bauermann
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 and DMA to bounce buffers. Signed-off-by: Thiago Jung Bauermann --- arch/powerpc/platforms/pseries/iommu.c | 6 +- 1