Re: [PATCH 07/20] iommu/amd: Remove special mapping code for dma_ops path

2016-07-12 Thread Joerg Roedel
Hi Robin, On Tue, Jul 12, 2016 at 12:42:59PM +0100, Robin Murphy wrote: > Ah, that's the angle I was missing, yes. So if, say, someone is mapping > a page at IOVA 0x while someone else is mapping a page at 0x1000, > there could still be a race between both callers writing the non-leaf > PTEs,

Re: [PATCH 07/20] iommu/amd: Remove special mapping code for dma_ops path

2016-07-12 Thread Robin Murphy
On 12/07/16 12:08, Joerg Roedel wrote: > Hi Robin, > > On Tue, Jul 12, 2016 at 11:55:39AM +0100, Robin Murphy wrote: >>> start = address; >>> for (i = 0; i < pages; ++i) { >>> - ret = dma_ops_domain_map(dma_dom, start, paddr, dir); >>> - if (ret == DMA_ERROR_CODE) >>>

Re: [PATCH 07/20] iommu/amd: Remove special mapping code for dma_ops path

2016-07-12 Thread Joerg Roedel
Hi Robin, On Tue, Jul 12, 2016 at 11:55:39AM +0100, Robin Murphy wrote: > > start = address; > > for (i = 0; i < pages; ++i) { > > - ret = dma_ops_domain_map(dma_dom, start, paddr, dir); > > - if (ret == DMA_ERROR_CODE) > > + ret =