Re: [PATCH v4 04/22] iommu/vt-d: add bind_pasid_table function

2018-05-30 Thread Jacob Pan
On Wed, 30 May 2018 12:53:53 +0100 Jean-Philippe Brucker wrote: > On 30/05/18 04:45, Tian, Kevin wrote: > >> On SMMUv3 the minimum alignment for base_ptr is 64 bytes, so > >> a > guest > >> under a vSMMU might pass a pointer that's not aligned on 4k. > >> > > PASID

Re: [PATCH 05/25] MIPS: Octeon: refactor swiotlb code

2018-05-30 Thread Paul Burton
Hi Christoph, For patches 1-4: Reviewed-by: Paul Burton Comment below for this patch though. On Fri, May 25, 2018 at 11:20:51AM +0200, Christoph Hellwig wrote: > diff --git a/arch/mips/cavium-octeon/dma-octeon.c > b/arch/mips/cavium-octeon/dma-octeon.c > index e5d00c79bd26..1e68636c9137

RE: [External] Re: [RFC PATCH v2 00/12] get rid of GFP_ZONE_TABLE/BAD

2018-05-30 Thread Huaisheng HS1 Ye
From: owner-linux...@kvack.org [mailto:owner-linux...@kvack.org] On Behalf Of Michal Hocko Sent: Monday, May 28, 2018 9:38 PM > > In my opinion, originally there shouldn't be such many wrong > > combinations of these bottom 3 bits. For any user, whether or > > driver and fs, they should make a

Re: [PATCH v5 15/23] iommu: handle page response timeout

2018-05-30 Thread Lu Baolu
Hi, On 05/30/2018 12:20 AM, Jacob Pan wrote: > On Mon, 14 May 2018 15:43:54 +0800 > Lu Baolu wrote: > >> Hi, >> >> On 05/12/2018 04:54 AM, Jacob Pan wrote: >>> When IO page faults are reported outside IOMMU subsystem, the page >>> request handler may fail for various reasons. E.g. a guest

Re: [PATCH v11 0/4] iommu/arm-smmu: Add runtime pm/sleep support

2018-05-30 Thread Vivek Gautam
Hi Robin, On Mon, May 21, 2018 at 7:12 PM, Robin Murphy wrote: > On 22/03/18 10:22, Vivek Gautam wrote: >> >> This series provides the support for turning on the arm-smmu's >> clocks/power domains using runtime pm. This is done using the >> recently introduced device links patches, which lets

[PATCH v3 0/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping

2018-05-30 Thread Thierry Reding
From: Thierry Reding An unfortunate interaction between the 32-bit ARM DMA/IOMMU mapping code and Tegra SMMU driver changes to support IOMMU groups introduced a boot- time regression on Tegra124. This was caught very late because none of the standard configurations that are tested on Tegra

[PATCH v3 1/2] ARM: dma-mapping: Implement arm_dma_iommu_detach_device()

2018-05-30 Thread Thierry Reding
From: Thierry Reding Implement this function to enable drivers from detaching from any IOMMU domains that architecture code might have attached them to so that they can take exclusive control of the IOMMU via the IOMMU API. Signed-off-by: Thierry Reding --- Changes in v3: - make API 32-bit ARM

Re: [External] Re: [RFC PATCH v2 00/12] get rid of GFP_ZONE_TABLE/BAD

2018-05-30 Thread Christoph Hellwig
On Wed, May 30, 2018 at 09:02:13AM +, Huaisheng HS1 Ye wrote: > > I don't quite understand that. I think those, mostly drivers, need to > get the correct zone they want. ZONE_DMA32 is an example, if drivers can be > satisfied with a low mem zone, why they mark the gfp flags as >

Re: [External] Re: [RFC PATCH v2 00/12] get rid of GFP_ZONE_TABLE/BAD

2018-05-30 Thread Michal Hocko
On Wed 30-05-18 09:02:13, Huaisheng HS1 Ye wrote: > From: owner-linux...@kvack.org [mailto:owner-linux...@kvack.org] On Behalf Of > Michal Hocko > Sent: Monday, May 28, 2018 9:38 PM > > > In my opinion, originally there shouldn't be such many wrong > > > combinations of these bottom 3 bits. For

Re: [PATCH v3 1/2] ARM: dma-mapping: Implement arm_dma_iommu_detach_device()

2018-05-30 Thread Robin Murphy
On 30/05/18 09:03, Thierry Reding wrote: From: Thierry Reding Implement this function to enable drivers from detaching from any IOMMU domains that architecture code might have attached them to so that they can take exclusive control of the IOMMU via the IOMMU API. Signed-off-by: Thierry

[PATCH v3 2/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping

2018-05-30 Thread Thierry Reding
From: Thierry Reding Depending on the kernel configuration, early ARM architecture setup code may have attached the GPU to a DMA/IOMMU mapping that transparently uses the IOMMU to back the DMA API. Tegra requires special handling for IOMMU backed buffers (a special bit in the GPU's MMU page

Re: [PATCH v3 2/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping

2018-05-30 Thread Robin Murphy
On 30/05/18 09:03, Thierry Reding wrote: From: Thierry Reding Depending on the kernel configuration, early ARM architecture setup code may have attached the GPU to a DMA/IOMMU mapping that transparently uses the IOMMU to back the DMA API. Tegra requires special handling for IOMMU backed

Re: [PATCH v4 04/22] iommu/vt-d: add bind_pasid_table function

2018-05-30 Thread Jean-Philippe Brucker
On 30/05/18 04:45, Tian, Kevin wrote: >> On SMMUv3 the minimum alignment for base_ptr is 64 bytes, so a guest >> under a vSMMU might pass a pointer that's not aligned on 4k. >> > PASID table pointer for VT-d is 4K aligned. >> Maybe this information could be part of the

Re: [PATCH v3 2/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping

2018-05-30 Thread Robin Murphy
On 30/05/18 14:41, Thierry Reding wrote: On Wed, May 30, 2018 at 02:30:51PM +0100, Robin Murphy wrote: On 30/05/18 14:00, Thierry Reding wrote: On Wed, May 30, 2018 at 11:30:25AM +0100, Robin Murphy wrote: On 30/05/18 09:03, Thierry Reding wrote: From: Thierry Reding Depending on the

Re: [PATCH v3 1/2] ARM: dma-mapping: Implement arm_dma_iommu_detach_device()

2018-05-30 Thread Thierry Reding
On Wed, May 30, 2018 at 10:59:30AM +0100, Robin Murphy wrote: > On 30/05/18 09:03, Thierry Reding wrote: > > From: Thierry Reding > > > > Implement this function to enable drivers from detaching from any IOMMU > > domains that architecture code might have attached them to so that they > > can

Re: [PATCH v3 1/2] ARM: dma-mapping: Implement arm_dma_iommu_detach_device()

2018-05-30 Thread Thierry Reding
On Wed, May 30, 2018 at 02:54:46PM +0200, Thierry Reding wrote: > On Wed, May 30, 2018 at 10:59:30AM +0100, Robin Murphy wrote: > > On 30/05/18 09:03, Thierry Reding wrote: > > > From: Thierry Reding > > > > > > Implement this function to enable drivers from detaching from any IOMMU > > >

Re: [PATCH v3 2/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping

2018-05-30 Thread Robin Murphy
On 30/05/18 14:00, Thierry Reding wrote: On Wed, May 30, 2018 at 11:30:25AM +0100, Robin Murphy wrote: On 30/05/18 09:03, Thierry Reding wrote: From: Thierry Reding Depending on the kernel configuration, early ARM architecture setup code may have attached the GPU to a DMA/IOMMU mapping that

Re: [PATCH v3 2/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping

2018-05-30 Thread Thierry Reding
On Wed, May 30, 2018 at 02:30:51PM +0100, Robin Murphy wrote: > On 30/05/18 14:00, Thierry Reding wrote: > > On Wed, May 30, 2018 at 11:30:25AM +0100, Robin Murphy wrote: > > > On 30/05/18 09:03, Thierry Reding wrote: > > > > From: Thierry Reding > > > > > > > > Depending on the kernel

Re: [PATCH v3 1/2] ARM: dma-mapping: Implement arm_dma_iommu_detach_device()

2018-05-30 Thread Robin Murphy
On 30/05/18 14:12, Thierry Reding wrote: On Wed, May 30, 2018 at 02:54:46PM +0200, Thierry Reding wrote: On Wed, May 30, 2018 at 10:59:30AM +0100, Robin Murphy wrote: On 30/05/18 09:03, Thierry Reding wrote: From: Thierry Reding Implement this function to enable drivers from detaching from

Re: [PATCH v3 2/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping

2018-05-30 Thread Thierry Reding
On Wed, May 30, 2018 at 11:30:25AM +0100, Robin Murphy wrote: > On 30/05/18 09:03, Thierry Reding wrote: > > From: Thierry Reding > > > > Depending on the kernel configuration, early ARM architecture setup code > > may have attached the GPU to a DMA/IOMMU mapping that transparently uses > > the

[PATCH v4 0/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping

2018-05-30 Thread Thierry Reding
From: Thierry Reding An unfortunate interaction between the 32-bit ARM DMA/IOMMU mapping code and Tegra SMMU driver changes to support IOMMU groups introduced a boot- time regression on Tegra124. This was caught very late because none of the standard configurations that are tested on Tegra

[PATCH v4 2/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping

2018-05-30 Thread Thierry Reding
From: Thierry Reding Depending on the kernel configuration, early ARM architecture setup code may have attached the GPU to a DMA/IOMMU mapping that transparently uses the IOMMU to back the DMA API. Tegra requires special handling for IOMMU backed buffers (a special bit in the GPU's MMU page

[PATCH v4 1/2] ARM: dma-mapping: Set proper DMA ops in arm_iommu_detach_device()

2018-05-30 Thread Thierry Reding
From: Thierry Reding Instead of setting the DMA ops pointer to NULL, set the correct, non-IOMMU ops depending on the device's coherency setting. Signed-off-by: Thierry Reding --- Changes in v4: - new patch to fix existing arm_iommu_detach_device() to do what we need arch/arm/mm/dma-mapping.c

Re: [PATCH v3 1/2] ARM: dma-mapping: Implement arm_dma_iommu_detach_device()

2018-05-30 Thread Thierry Reding
On Wed, May 30, 2018 at 02:42:50PM +0100, Robin Murphy wrote: > On 30/05/18 14:12, Thierry Reding wrote: > > On Wed, May 30, 2018 at 02:54:46PM +0200, Thierry Reding wrote: > > > On Wed, May 30, 2018 at 10:59:30AM +0100, Robin Murphy wrote: > > > > On 30/05/18 09:03, Thierry Reding wrote: > > > >