Re: [PATCH] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-03-29 Thread Andrzej Hajda
On 29.03.2017 17:33, Robin Murphy wrote: > On 29/03/17 16:12, Andrzej Hajda wrote: >> On 29.03.2017 14:55, Robin Murphy wrote: >>> On 29/03/17 11:05, Andrzej Hajda wrote: In case of DMA_ATTR_FORCE_CONTIGUOUS allocations vm_area->pages is invalid. __iommu_mmap_attrs and __iommu_get_sgtable

RE: [PATCH] iommu/amd: flush IOTLB for specific domains only

2017-03-29 Thread Nath, Arindam
>-Original Message- >From: Nath, Arindam >Sent: Monday, March 27, 2017 5:57 PM >To: 'Daniel Drake' >Cc: j...@8bytes.org; Deucher, Alexander; Bridgman, John; amd- >g...@lists.freedesktop.org; iommu@lists.linux-foundation.org; Suthikulpanit, >Suravee; Linux Upstreaming Team >Subject: RE: [PAT

Re: [PATCH 5/9] iommu: add qcom_iommu

2017-03-29 Thread Archit Taneja
Hi, On 03/14/2017 08:48 PM, Rob Clark wrote: An iommu driver for Qualcomm "B" family devices which do not completely implement the ARM SMMU spec. These devices have context-bank register layout that is similar to ARM SMMU, but no global register space (or at least not one that is accessible).

Re: [RFC PATCH 1/3] of/pci: dma-ranges to account highest possible host bridge dma_mask

2017-03-29 Thread Oza Oza via iommu
On Wed, Mar 29, 2017 at 10:13 AM, Oza Oza wrote: > On Tue, Mar 28, 2017 at 7:59 PM, Robin Murphy wrote: >> On 28/03/17 06:27, Oza Oza wrote: >>> On Mon, Mar 27, 2017 at 8:16 PM, Rob Herring wrote: On Sat, Mar 25, 2017 at 12:31 AM, Oza Pawandeep wrote: > it is possible that PCI de

Re: [RFC PATCH] of: Fix DMA configuration for non-DT masters

2017-03-29 Thread Oza Oza via iommu
On Wed, Mar 29, 2017 at 11:12 PM, Robin Murphy wrote: > On 29/03/17 06:46, Oza Oza wrote: >> On Wed, Mar 29, 2017 at 10:23 AM, Oza Oza wrote: >>> On Wed, Mar 29, 2017 at 12:27 AM, Robin Murphy wrote: For PCI masters not represented in DT, we pass the OF node of their associated host br

Re: [PATCH] iommu/vt-d: Make sure IOMMUs are off when intel_iommu=off

2017-03-29 Thread Joerg Roedel
On Wed, Mar 29, 2017 at 08:51:53AM -0700, Jacob Pan wrote: > On Wed, 29 Mar 2017 17:00:39 +0200 > Joerg Roedel wrote: > > +static void intel_disable_iommus(void) > > +{ > > + struct intel_iommu *iommu = NULL; > > + struct dmar_drhd_unit *drhd; > > + > > + for_each_iommu(iommu, drhd) > > +

Re: [RFC PATCH] of: Fix DMA configuration for non-DT masters

2017-03-29 Thread Robin Murphy
On 29/03/17 06:46, Oza Oza wrote: > On Wed, Mar 29, 2017 at 10:23 AM, Oza Oza wrote: >> On Wed, Mar 29, 2017 at 12:27 AM, Robin Murphy wrote: >>> For PCI masters not represented in DT, we pass the OF node of their >>> associated host bridge to of_dma_configure(), such that they can inherit >>> th

Re: [PATCH] iommu/vt-d: Make sure IOMMUs are off when intel_iommu=off

2017-03-29 Thread Jacob Pan
On Wed, 29 Mar 2017 17:00:39 +0200 Joerg Roedel wrote: > From: Joerg Roedel > > When booting into a kexec kernel with intel_iommu=off, and > the previous kernel had intel_iommu=on, the IOMMU hardware > is still enabled and gets not disabled by the new kernel. > > This causes the boot to fail b

Re: [PATCH] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-03-29 Thread Robin Murphy
On 29/03/17 16:12, Andrzej Hajda wrote: > On 29.03.2017 14:55, Robin Murphy wrote: >> On 29/03/17 11:05, Andrzej Hajda wrote: >>> In case of DMA_ATTR_FORCE_CONTIGUOUS allocations vm_area->pages >>> is invalid. __iommu_mmap_attrs and __iommu_get_sgtable cannot use >>> it. In first case temporary pag

Re: [PATCH] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-03-29 Thread Andrzej Hajda
On 29.03.2017 14:55, Robin Murphy wrote: > On 29/03/17 11:05, Andrzej Hajda wrote: >> In case of DMA_ATTR_FORCE_CONTIGUOUS allocations vm_area->pages >> is invalid. __iommu_mmap_attrs and __iommu_get_sgtable cannot use >> it. In first case temporary pages array is passed to iommu_dma_mmap, >> in 2n

[PATCH] iommu/vt-d: Make sure IOMMUs are off when intel_iommu=off

2017-03-29 Thread Joerg Roedel
From: Joerg Roedel When booting into a kexec kernel with intel_iommu=off, and the previous kernel had intel_iommu=on, the IOMMU hardware is still enabled and gets not disabled by the new kernel. This causes the boot to fail because DMA is blocked by the hardware. Disable the IOMMUs when we find

Re: [PATCH] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-03-29 Thread Geert Uytterhoeven
Hi Andrzej, On Wed, Mar 29, 2017 at 12:05 PM, Andrzej Hajda wrote: > In case of DMA_ATTR_FORCE_CONTIGUOUS allocations vm_area->pages > is invalid. __iommu_mmap_attrs and __iommu_get_sgtable cannot use > it. In first case temporary pages array is passed to iommu_dma_mmap, > in 2nd case single entr

Re: [PATCH] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-03-29 Thread Robin Murphy
On 29/03/17 11:05, Andrzej Hajda wrote: > In case of DMA_ATTR_FORCE_CONTIGUOUS allocations vm_area->pages > is invalid. __iommu_mmap_attrs and __iommu_get_sgtable cannot use > it. In first case temporary pages array is passed to iommu_dma_mmap, > in 2nd case single entry sg table is created directl

[PATCH] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-03-29 Thread Andrzej Hajda
In case of DMA_ATTR_FORCE_CONTIGUOUS allocations vm_area->pages is invalid. __iommu_mmap_attrs and __iommu_get_sgtable cannot use it. In first case temporary pages array is passed to iommu_dma_mmap, in 2nd case single entry sg table is created directly instead of calling helper. Fixes: 44176bb ("a