[PATCH 3/3] arm64: dts: Add dts node for hi6220 smmu driver

2015-11-17 Thread Chen Feng
Add iommu node for hi6220 SoC platform Signed-off-by: Chen Feng --- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi index

Re: [PATCH v6 1/3] iommu: Implement common IOMMU ops for DMA mapping

2015-11-17 Thread Marek Szyprowski
Hello, I'm really sorry do late joining this discussion, but I was terribly busy with other things. On 2015-10-30 02:17, Daniel Kurtz wrote: +linux-media & VIDEOBUF2 FRAMEWORK maintainers since this is about the v4l2-contig's usage of the DMA API. Hi Robin, On Tue, Oct 27, 2015 at 12:55

[PATCH RFC 0/3] Add iommu support for hi6220 HiKey board

2015-11-17 Thread Chen Feng
The patch sets add iommu support for Hi6220 SoC. Current testing and support board is Hikey which is one of 96boards. It is an arm64 open source board. For more information about this board, please access https://www.96boards.org. The Architecture of SMMU on Hi6220 SoC:

Re: [RFC V3] iommu: arm-smmu: correct group reference count

2015-11-17 Thread Will Deacon
On Tue, Nov 10, 2015 at 09:56:26AM +0800, Peng Fan wrote: > The basic flow for add a device: > arm_smmu_add_device > |->iommu_group_get_for_dev > |->iommu_group_get > return group; (1) > |->ops->device_group : Init/increase reference count

[PATCH 0/4 v2] Implement access checks in iommu page fault paths

2015-11-17 Thread Joerg Roedel
Hi, here is the second version of the patch-set to implement proper access checks into the io-page-fault handlers of the AMD IOMMU and Intel VT-d drivers. Two additional patches clean up the AMD part a bit further. Since I can't test this this code myself due to lack of hardware or software that

[PATCH 3/4] iommu/amd: Cleanup error handling in do_fault()

2015-11-17 Thread Joerg Roedel
From: Joerg Roedel Get rid of the three error paths that look the same and move error handling to a single place. Signed-off-by: Joerg Roedel --- drivers/iommu/amd_iommu_v2.c | 24 1 file changed, 8 insertions(+), 16 deletions(-)

[PATCH 2/4] iommu/amd: Correctly set flags for handle_mm_fault call

2015-11-17 Thread Joerg Roedel
From: Joerg Roedel Instead of just checking for a write access, calculate the flags that are passed to handle_mm_fault() more precisly and use the pre-defined macros. Signed-off-by: Joerg Roedel --- drivers/iommu/amd_iommu_v2.c | 14 +- 1 file

[PATCH 4/4] iommu/vt-d: Do access checks before calling handle_mm_fault()

2015-11-17 Thread Joerg Roedel
From: Joerg Roedel Not doing so is a bug and might trigger a BUG_ON in handle_mm_fault(). So add the proper permission checks before calling into mm code. Signed-off-by: Joerg Roedel --- drivers/iommu/intel-svm.c | 20 1 file changed, 20

[PATCH 1/4] iommu/amd: Do proper access checking before calling handle_mm_fault()

2015-11-17 Thread Joerg Roedel
From: Joerg Roedel The handle_mm_fault function expects the caller to do the access checks. Not doing so and calling the function with wrong permissions is a bug (catched by a BUG_ON). So fix this bug by adding proper access checking to the io page-fault code in the AMD IOMMUv2

[PATCH 2/3] iommu/hisilicon: Add hi6220-SoC smmu driver

2015-11-17 Thread Chen Feng
Add iommu driver for hi6220 SoC platform.The smmu on hi6220 SoC is for media system.And the media IP use the same page-table. It supports only one-to-one mapping from iova to phys address. Signed-off-by: Chen Feng --- drivers/iommu/Kconfig| 11 +

Re: [RFC/PATCH] media: omap3isp: Set maximum DMA segment size

2015-11-17 Thread Marek Szyprowski
Hi Laurent, I really have no idea how this problem should be addressed. I've already proposed to handle it in videobuf2-dc, but this has been rejected. Maybe the only way will be to add dma_set_max_seg_size(isp->dev, DMA_BIT_MASK(32)) to every v4l2 driver, which use videobuf2-dc and add a

[PATCH] iommu/arm-smmu: Convert DMA buffer allocations to the managed API

2015-11-17 Thread Will Deacon
The ARM SMMUv3 driver uses dma_{alloc,free}_coherent to manage its queues and configuration data structures. This patch converts the driver to the managed (dmam_*) API, so that resources are freed automatically on device teardown. This greatly simplifies the failure paths and allows us to remove

[PATCH] IOMMU: arm-smmu-v3: Use STE.S1STALLD only when supported

2015-11-17 Thread pmallapp
From: Prem Mallappa Also fix the STALLD check. Signed-off-by: Prem Mallappa --- drivers/iommu/arm-smmu-v3.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c

Re: [PATCH 1/3] docs: iommu: Documentation for iommu in hi6220 SoC

2015-11-17 Thread Rob Herring
On Tue, Nov 17, 2015 at 5:57 AM, Chen Feng wrote: > Documentation for hi6220 iommu driver. Please use get_maintainers.pl and re-send to correct lists (devicet...@vger.kernel.org). > > Signed-off-by: Chen Feng > --- >

Re: [PATCH] IOMMU: arm-smmu-v3: Use STE.S1STALLD only when supported

2015-11-17 Thread Will Deacon
Hi Prem, Thanks for the patch. Just a few minor comments... On Mon, Nov 16, 2015 at 02:18:20PM +0530, pmall...@broadcom.com wrote: > From: Prem Mallappa > > Also fix the STALLD check. Can you extend the commit message please to explain that it is ILLEGAL to set

Re: KVM PCI passthrough problems after kernel v4.2

2015-11-17 Thread Juhani Rautiainen
Hi! Thanks a lot for the help. I switched to vfio and got NIC working again. Now I just have to figure out what I have to change to get this to persist through the host boots. To tell the truth I couldn't quite parse from that commit message that my device would stop working:). The error messages

Re: [PATCH v2] iommu/ipmmu-vmsa: Include SoC part number in DT binding docs

2015-11-17 Thread Rob Herring
On Tue, Nov 17, 2015 at 12:53:20PM +0900, Magnus Damm wrote: > From: Magnus Damm > > Add part numbers for APE6 and current set of R-Car Gen2 SoCs to the > IPMMU DT binding documentation. The example is also updated to show > how the generic compatible string may be

Re: [Patch v2 0/9] Fix AMD IOMMU faults in kdump kernel

2015-11-17 Thread Baoquan He
Hi Joerg, Could you please help have a look and give some suggestions on this issue? Or any one else who is familiar with AMD IOMMU have any idea about this? Thanks Baoquan On 11/06/15 at 08:10pm, Baoquan He wrote: > This is v2 draft patch set. It mainly functions as the following steps: > >