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

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

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; > > + > > +

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

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.

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

[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

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, >

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

[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

RE: [RFC PATCH 29/30] vfio: Add support for Shared Virtual Memory

2017-03-29 Thread Liu, Yi L
> -Original Message- > From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > Sent: Monday, March 27, 2017 6:14 PM > To: Liu, Yi L ; Alex Williamson > > Cc: Shanker Donthineni ; k...@vger.kernel.org;