Re: [PATCH] iommu/dma-iommu: properly respect configured address space size

2016-11-10 Thread Robin Murphy
On 10/11/16 15:59, Joerg Roedel wrote: > On Tue, Nov 08, 2016 at 11:37:23AM +, Robin Murphy wrote: >> TBH I've been pondering ripping the size stuff out of dma-iommu, as it >> all stems from me originally failing to understand what dma_32bit_pfn is >> actually for. > > The point of dma_32bit_p

Re: [PATCH] iommu/dma-iommu: properly respect configured address space size

2016-11-10 Thread Joerg Roedel
On Tue, Nov 08, 2016 at 11:37:23AM +, Robin Murphy wrote: > TBH I've been pondering ripping the size stuff out of dma-iommu, as it > all stems from me originally failing to understand what dma_32bit_pfn is > actually for. The point of dma_32bit_pfn is to allocate dma-address below 4G by defaul

Re: [PATCH] iommu/dma-iommu: properly respect configured address space size

2016-11-10 Thread Robin Murphy
On 08/11/16 14:53, Marek Szyprowski wrote: > Hi Robin, > > > On 2016-11-08 15:44, Robin Murphy wrote: >> On 08/11/16 13:41, Marek Szyprowski wrote: >>> On 2016-11-08 12:37, Robin Murphy wrote: On 07/11/16 13:06, Marek Szyprowski wrote: > When one called iommu_dma_init_domain() with size

Re: [PATCH] iommu/dma-iommu: properly respect configured address space size

2016-11-08 Thread Marek Szyprowski
Hi Robin, On 2016-11-08 15:44, Robin Murphy wrote: On 08/11/16 13:41, Marek Szyprowski wrote: On 2016-11-08 12:37, Robin Murphy wrote: On 07/11/16 13:06, Marek Szyprowski wrote: When one called iommu_dma_init_domain() with size smaller than device's DMA mask, the alloc_iova() will not respec

Re: [PATCH] iommu/dma-iommu: properly respect configured address space size

2016-11-08 Thread Robin Murphy
On 08/11/16 13:41, Marek Szyprowski wrote: > Hi Robin, > > > On 2016-11-08 12:37, Robin Murphy wrote: >> On 07/11/16 13:06, Marek Szyprowski wrote: >>> When one called iommu_dma_init_domain() with size smaller than device's >>> DMA mask, the alloc_iova() will not respect it and always assume that

Re: [PATCH] iommu/dma-iommu: properly respect configured address space size

2016-11-08 Thread Marek Szyprowski
Hi Robin, On 2016-11-08 12:37, Robin Murphy wrote: On 07/11/16 13:06, Marek Szyprowski wrote: When one called iommu_dma_init_domain() with size smaller than device's DMA mask, the alloc_iova() will not respect it and always assume that all IOVA addresses will be allocated from the the (base ..

Re: [PATCH] iommu/dma-iommu: properly respect configured address space size

2016-11-08 Thread Robin Murphy
Hi Marek, On 07/11/16 13:06, Marek Szyprowski wrote: > When one called iommu_dma_init_domain() with size smaller than device's > DMA mask, the alloc_iova() will not respect it and always assume that all > IOVA addresses will be allocated from the the (base ... dev->dma_mask) range. Is that actual

[PATCH] iommu/dma-iommu: properly respect configured address space size

2016-11-07 Thread Marek Szyprowski
When one called iommu_dma_init_domain() with size smaller than device's DMA mask, the alloc_iova() will not respect it and always assume that all IOVA addresses will be allocated from the the (base ... dev->dma_mask) range. This patch fixes this issue by taking the configured address space size pa