Re: [PATCH for-next 2/4] RDMA/hns: Add IOMMU enable support in hip08

2017-11-06 Thread Leon Romanovsky
On Tue, Nov 07, 2017 at 10:45:29AM +0800, Wei Hu (Xavier) wrote: > > > On 2017/11/1 20:26, Robin Murphy wrote: > > On 01/11/17 07:46, Wei Hu (Xavier) wrote: > >> > >> On 2017/10/12 20:59, Robin Murphy wrote: > >>> On 12/10/17 13:31, Wei Hu (Xavier) wrote: > On 2017/10/1 0:10, Leon Romanovsky w

Re: [PATCH 1/3] iommu/vt-d: Missing checks for pasid tables if allocation fails

2017-11-06 Thread Lu Baolu
Hi, On 11/07/2017 04:13 AM, Alex Williamson wrote: > On Thu, 19 Oct 2017 08:39:14 +0800 > Lu Baolu wrote: > >> intel_svm_alloc_pasid_tables() might return an error but never be >> checked by the callers. Later when intel_svm_bind_mm() is called, >> there are no checks for valid pasid tables befor

Re: [PATCH for-next 2/4] RDMA/hns: Add IOMMU enable support in hip08

2017-11-06 Thread Wei Hu (Xavier)
On 2017/11/1 20:26, Robin Murphy wrote: > On 01/11/17 07:46, Wei Hu (Xavier) wrote: >> >> On 2017/10/12 20:59, Robin Murphy wrote: >>> On 12/10/17 13:31, Wei Hu (Xavier) wrote: On 2017/10/1 0:10, Leon Romanovsky wrote: > On Sat, Sep 30, 2017 at 05:28:59PM +0800, Wei Hu (Xavier) wrote: >>

Re: [PATCH 1/3] iommu/vt-d: Missing checks for pasid tables if allocation fails

2017-11-06 Thread Alex Williamson
On Thu, 19 Oct 2017 08:39:14 +0800 Lu Baolu wrote: > intel_svm_alloc_pasid_tables() might return an error but never be > checked by the callers. Later when intel_svm_bind_mm() is called, > there are no checks for valid pasid tables before enabling them. > > Signed-off-by: Ashok Raj > Signed-off

Re: [PATCH] iommu/mediatek: Fix driver name

2017-11-06 Thread Alex Williamson
On Mon, 30 Oct 2017 12:37:55 +0100 Matthias Brugger wrote: > There exist two Mediatek iommu drivers for the two different > generations of the device. But both drivers have the same name > "mtk-iommu". This breaks the registration of the second driver: > > Error: Driver 'mtk-iommu' is already re

Re: [PATCH v5 00/09] iommu/ipmmu-vmsa: r8a7795 support V5

2017-11-06 Thread Alex Williamson
On Mon, 16 Oct 2017 21:29:14 +0900 Magnus Damm wrote: > iommu/ipmmu-vmsa: r8a7795 support V5 > > [PATCH v5 01/09] iommu/ipmmu-vmsa: Introduce features, break out alias > [PATCH v5 02/09] iommu/ipmmu-vmsa: Add optional root device feature > [PATCH v5 03/09] iommu/ipmmu-vmsa: Enable multi context

Re: [PATCH v2] iommu/iova: Use raw_cpu_ptr() instead of get_cpu_ptr() for ->fq

2017-11-06 Thread Alex Williamson
On Mon, 6 Nov 2017 16:45:11 + Robin Murphy wrote: > On 06/11/17 15:43, Alex Williamson wrote: > > [cc +robin] > > > > On Thu, 2 Nov 2017 18:33:50 +0100 > > Sebastian Andrzej Siewior wrote: > > > >> On 2017-09-21 17:21:40 [+0200], Sebastian Andrzej Siewior wrote: > >>> get_cpu_ptr() dis

Re: [PATCH 0/4] ipmmu-vmsa cleanup

2017-11-06 Thread Alex Williamson
On Fri, 13 Oct 2017 19:23:38 +0100 Robin Murphy wrote: > Arnd reports a build warning[1] thanks to me missing ipmmu-vmsa's second > set of ops when converting io-pgtable-arm users to the new iommu_iotlb_* > callbacks. Rather than just treat the symptom with a point fix, this > seemed like a good

Re: [PATCH -next] iommu/ipmmu-vmsa: Fix return value check in ipmmu_find_group_dma()

2017-11-06 Thread Alex Williamson
On Tue, 17 Oct 2017 12:11:22 + Wei Yongjun wrote: > In case of error, the function iommu_group_get() returns NULL pointer > not ERR_PTR(). The IS_ERR() test in the return value check should be > replaced with NULL test. > > Fixes: 3ae47292024f ("iommu/ipmmu-vmsa: Add new IOMMU_DOMAIN_DMA ops

Re: [PATCH 0/2] iommu/ipmmu-vmsa: r8a779(70|95) support

2017-11-06 Thread Alex Williamson
On Wed, 1 Nov 2017 11:34:21 +0100 Simon Horman wrote: > Update Update the IPMMU DT binding documentation and driver implementation > to support the r8a77970 (R-Car V3M) and r8a77995 (R-Car D3). > > Based on work for r8a7796 by Magnus Damm. > > Patches based on: > * iommu/next > * [PATCH v5 00/

Re: [PATCH v2 08/16] iommu: introduce device fault data

2017-11-06 Thread Jean-Philippe Brucker
Hi Yi, Sorry for the late reply, I seem to have missed this. On 20/10/17 11:07, Liu, Yi L wrote: [...] >>> + >>> +/* Generic fault types, can be expanded IRQ remapping fault */ enum >>> +iommu_fault_type { >>> + IOMMU_FAULT_DMA_UNRECOV = 1,/* unrecoverable fault */ >>> + IOMMU_FAULT_PAGE

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-11-06 Thread Jacob Pan
On Fri, 6 Oct 2017 16:43:09 +0200 Joerg Roedel wrote: > On Tue, Oct 03, 2017 at 07:05:17PM +0100, Robin Murphy wrote: > > Now, there are indeed plenty of drivers and subsystems which do > > work on lists of explicitly single pages - anything doing some > > variant of "addr = kmap_atomic(sg_page(s

Re: [PATCH v2] iommu/iova: Use raw_cpu_ptr() instead of get_cpu_ptr() for ->fq

2017-11-06 Thread Robin Murphy
On 06/11/17 15:43, Alex Williamson wrote: > [cc +robin] > > On Thu, 2 Nov 2017 18:33:50 +0100 > Sebastian Andrzej Siewior wrote: > >> On 2017-09-21 17:21:40 [+0200], Sebastian Andrzej Siewior wrote: >>> get_cpu_ptr() disabled preemption and returns the ->fq object of the >>> current CPU. raw_cpu

Re: [PATCH v2] iommu/iova: Use raw_cpu_ptr() instead of get_cpu_ptr() for ->fq

2017-11-06 Thread Alex Williamson
[cc +robin] On Thu, 2 Nov 2017 18:33:50 +0100 Sebastian Andrzej Siewior wrote: > On 2017-09-21 17:21:40 [+0200], Sebastian Andrzej Siewior wrote: > > get_cpu_ptr() disabled preemption and returns the ->fq object of the > > current CPU. raw_cpu_ptr() does the same except that it not disable > > p

Re: [PATCH 3/4] iommu/arm-smmu-v3: Use NUMA memory allocations for stream tables and comamnd queues

2017-11-06 Thread Ganapatrao Kulkarni
On Wed, Oct 18, 2017 at 7:06 PM, Robin Murphy wrote: > On 04/10/17 14:53, Ganapatrao Kulkarni wrote: >> Hi Robin, >> >> >> On Thu, Sep 21, 2017 at 5:28 PM, Robin Murphy wrote: >>> [+Christoph and Marek] >>> >>> On 21/09/17 09:59, Ganapatrao Kulkarni wrote: Introduce smmu_alloc_coherent and s