RE: [PATCH 2/9] iommu/ipmmu-vmsa: Hook up R8A774E1 DT matching code

2020-07-15 Thread Yoshihiro Shimoda
Hi Geert-san, > From: Geert Uytterhoeven, Sent: Tuesday, July 14, 2020 9:40 PM > > Hi Shimoda-san, > > On Tue, Jul 14, 2020 at 1:42 PM Yoshihiro Shimoda > wrote: > > > From: Geert Uytterhoeven, Sent: Tuesday, July 14, 2020 5:42 PM > > > On Tue, Jul 14, 2020 at 10:30 AM Lad, Prabhakar > > > wro

RE: [EXT] Re: [PATCH v2 12/12] bus: fsl-mc: Add ACPI support for fsl-mc

2020-07-15 Thread Makarand Pawagi
> -Original Message- > From: Lorenzo Pieralisi > Sent: Wednesday, July 15, 2020 3:37 PM > To: Makarand Pawagi > Cc: Diana Madalina Craciun (OSS) ; Laurentiu > Tudor ; linux-arm-ker...@lists.infradead.org; > iommu@lists.linux-foundation.org; linux-a...@vger.kernel.org; > devicet...@vger

Re: [PATCH v3 2/4] iommu: Add iommu_aux_at(de)tach_group()

2020-07-15 Thread Lu Baolu
Hi Jacob, On 7/16/20 12:01 AM, Jacob Pan wrote: On Wed, 15 Jul 2020 08:47:36 +0800 Lu Baolu wrote: Hi Jacob, On 7/15/20 12:39 AM, Jacob Pan wrote: On Tue, 14 Jul 2020 13:57:01 +0800 Lu Baolu wrote: This adds two new aux-domain APIs for a use case like vfio/mdev where sub-devices deriv

Re: [PATCH v6 03/12] docs: x86: Add documentation for SVA (Shared Virtual Addressing)

2020-07-15 Thread Fenghua Yu
Hi, Yi, On Mon, Jul 13, 2020 at 08:25:20PM -0700, Liu, Yi L wrote: > > From: Fenghua Yu > > Sent: Tuesday, July 14, 2020 7:48 AM > > From: Ashok Raj Thank you for your comments! But I think we don't need to update this patch because the current text is better than suggested changes. I would ra

Re: [PATCH 1/5] iommu/arm-smmu: Make all valid stream mappings BYPASS

2020-07-15 Thread kernel test robot
Hi Bjorn, I love your patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on arm-perf/for-next/perf v5.8-rc5 next-20200715] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use

Re: [PATCH v4 1/5] docs: IOMMU user API

2020-07-15 Thread Jacob Pan
On Tue, 14 Jul 2020 13:04:12 -0600 Alex Williamson wrote: > > > The > > > mangling of the user provided argsz above makes me cringe a > > > little too for that reason, once we start modifying the user > > > values in the core it could get messy for the vendor drivers. > > > > > We do have v

Re: [PATCH 4/4] iommu/mediatek: check 4GB mode by reading infracfg

2020-07-15 Thread Matthias Brugger
On 02/07/2020 11:37, Miles Chen wrote: In previous disscusion [1] and [2], we found that it is risky to use max_pfn or totalram_pages to tell if 4GB mode is enabled. Check 4GB mode by reading infracfg register, remove the usage of the unexported symbol max_pfn. [1] https://lkml.org/lkml/2020

Re: [PATCH 1/4] dt-bindings: mediatek: add mediatek,infracfg phandle

2020-07-15 Thread Rob Herring
On Thu, Jul 02, 2020 at 05:37:17PM +0800, Miles Chen wrote: > Add a description for mediatek,infracfg. We can check if 4GB mode > is enable by reading it instead of checking the unexported > symbol "max_pfn". > > This is a step towards building mtk_iommu as a kernel module. You determined this be

Re: [PATCH 0/4] Bounced DMA support

2020-07-15 Thread Robin Murphy
On 2020-07-15 04:43, Claire Chang wrote: On Mon, Jul 13, 2020 at 7:40 PM Robin Murphy wrote: On 2020-07-13 10:12, Claire Chang wrote: This series implements mitigations for lack of DMA access control on systems without an IOMMU, which could result in the DMA accessing the system memory at une

Re: [PATCH] xen: introduce xen_vring_use_dma

2020-07-15 Thread Stefano Stabellini
On Sat, 11 Jul 2020, Michael S. Tsirkin wrote: > On Fri, Jul 10, 2020 at 10:23:22AM -0700, Stefano Stabellini wrote: > > Sorry for the late reply -- a couple of conferences kept me busy. > > > > > > On Wed, 1 Jul 2020, Michael S. Tsirkin wrote: > > > On Wed, Jul 01, 2020 at 10:34:53AM -0700, Stef

Re: [PATCH v3 2/4] iommu: Add iommu_aux_at(de)tach_group()

2020-07-15 Thread Jacob Pan
On Wed, 15 Jul 2020 08:47:36 +0800 Lu Baolu wrote: > Hi Jacob, > > On 7/15/20 12:39 AM, Jacob Pan wrote: > > On Tue, 14 Jul 2020 13:57:01 +0800 > > Lu Baolu wrote: > > > >> This adds two new aux-domain APIs for a use case like vfio/mdev > >> where sub-devices derived from an aux-domain capab

[PATCH v8 00/12] PCI: brcmstb: enable PCIe for STB chips

2020-07-15 Thread Jim Quinlan via iommu
Patchset Summary: Enhance a PCIe host controller driver. Because of its unusual design we are foced to change dev->dma_pfn_offset into a more general role allowing multiple offsets. See the 'v1' notes below for more info. v8: Commit: "device core: Introduce DMA range map, supplanting ...

[PATCH v8 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-15 Thread Jim Quinlan via iommu
The new field 'dma_range_map' in struct device is used to facilitate the use of single or multiple offsets between mapping regions of cpu addrs and dma addrs. It subsumes the role of "dev->dma_pfn_offset" which was only capable of holding a single uniform offset and had no region bounds checking.

Re: [PATCH v2 11/12] bus/fsl-mc: Refactor the MSI domain creation in the DPRC driver

2020-07-15 Thread Marc Zyngier
On 2020-06-19 09:20, Lorenzo Pieralisi wrote: From: Diana Craciun The DPRC driver is not taking into account the msi-map property and assumes that the icid is the same as the stream ID. Although this assumption is correct, generalize the code to include a translation between icid and streamID.

Re: [PATCH 4/9] dt-bindings: dma: renesas,rcar-dmac: Document R8A774E1 bindings

2020-07-15 Thread Vinod Koul
On 13-07-20, 22:35, Lad Prabhakar wrote: > Renesas RZ/G2H (R8A774E1) SoC also has the R-Car gen3 compatible > DMA controllers, therefore document RZ/G2H specific bindings. Applied, thanks -- ~Vinod ___ iommu mailing list iommu@lists.linux-foundation.or

Re: [PATCH v4 3/4] dt-bindings: arm-smmu: add compatible string for Marvell Armada-AP806 SMMU-500

2020-07-15 Thread Robin Murphy
On 2020-07-15 08:06, Tomasz Nowicki wrote: Add specific compatible string for Marvell usage due to errata of accessing 64bits registers of ARM SMMU, in AP806. AP806 SoC uses the generic ARM-MMU500, and there's no specific implementation of Marvell, this compatible is used for errata only. Revi

Re: [PATCH v4 2/4] iommu/arm-smmu: Workaround for Marvell Armada-AP806 SoC erratum #582743

2020-07-15 Thread Robin Murphy
On 2020-07-15 08:06, Tomasz Nowicki wrote: From: Hanna Hawa Due to erratum #582743, the Marvell Armada-AP806 can't access 64bit to ARM SMMUv2 registers. Provide implementation relevant hooks: - split the writeq/readq to two accesses of writel/readl. - mask the MMU_IDR2.PTFSv8 fields to not use

Re: [PATCH 9/9] arm64: dts: renesas: r8a774e1: Add Ethernet AVB node

2020-07-15 Thread Geert Uytterhoeven
On Mon, Jul 13, 2020 at 11:36 PM Lad Prabhakar wrote: > From: Marian-Cristian Rotariu > > This patch adds the SoC specific part of the Ethernet AVB > device tree node. > > Signed-off-by: Marian-Cristian Rotariu > > Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven i.e. will queue

Re: [PATCH 7/9] arm64: dts: renesas: r8a774e1: Add GPIO device nodes

2020-07-15 Thread Geert Uytterhoeven
On Mon, Jul 13, 2020 at 11:35 PM Lad Prabhakar wrote: > From: Marian-Cristian Rotariu > > Add GPIO device nodes to the DT of the r8a774e1 SoC. > > Signed-off-by: Marian-Cristian Rotariu > > Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven i.e. will queue in renesas-devel for v5.9

Re: [PATCH v4 1/4] iommu/arm-smmu: Call configuration impl hook before consuming features

2020-07-15 Thread Robin Murphy
On 2020-07-15 08:06, Tomasz Nowicki wrote: 'cfg_probe' hook is called at the very end of configuration probing procedure and therefore features override and workaround may become complex like for ID register fixups. In preparation for adding Marvell errata move 'cfg_probe' a bit earlier to have c

Re: [PATCH 5/9] arm64: dts: renesas: r8a774e1: Add SYS-DMAC device nodes

2020-07-15 Thread Geert Uytterhoeven
On Mon, Jul 13, 2020 at 11:35 PM Lad Prabhakar wrote: > From: Marian-Cristian Rotariu > > Add sys-dmac[0-2] device nodes for RZ/G2H (R8A774E1) SoC. > > Signed-off-by: Marian-Cristian Rotariu > > Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven i.e. will queue in renesas-devel for

Re: [PATCH 3/9] arm64: dts: renesas: r8a774e1: Add IPMMU device nodes

2020-07-15 Thread Geert Uytterhoeven
On Mon, Jul 13, 2020 at 11:35 PM Lad Prabhakar wrote: > From: Marian-Cristian Rotariu > > Add RZ/G2H (R8A774E1) IPMMU nodes. > > Signed-off-by: Marian-Cristian Rotariu > > Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven i.e. will queue in renesas-devel for v5.9. Gr{oetje,eeting

Re: [EXT] Re: [PATCH v2 12/12] bus: fsl-mc: Add ACPI support for fsl-mc

2020-07-15 Thread Lorenzo Pieralisi
On Thu, Jul 09, 2020 at 10:52:52AM +, Makarand Pawagi wrote: [...] > > fsl_mc_bus_probe(struct platform_device *pdev) > > >> struct fsl_mc_io *mc_io = NULL; > > >> int container_id; > > >> phys_addr_t mc_portal_phys_addr; > > >> - u32 mc_portal_size; > >

Re: [PATCH 2/2] iommu/ipmmu-vmsa: Add an entry for r8a77961 in soc_rcar_gen3[]

2020-07-15 Thread Geert Uytterhoeven
On Tue, Jul 14, 2020 at 12:21 PM Lad Prabhakar wrote: > Add an entry for r8a77961 in soc_rcar_gen3[] list so that we dont > enable iommu unconditionally. > > Fixes: 17fe161816398 ("iommu/renesas: Add support for r8a77961") > Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Gr{oetje

Re: [PATCH 1/2] iommu/ipmmu-vmsa: Hook up R8A774E1 DT matching code

2020-07-15 Thread Geert Uytterhoeven
On Tue, Jul 14, 2020 at 12:21 PM Lad Prabhakar wrote: > From: Marian-Cristian Rotariu > > Add support for RZ/G2H (R8A774E1) SoC IPMMUs. > > Signed-off-by: Marian-Cristian Rotariu > > Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Gr{oetje,eeting}s, Gee

Re: [PATCH v2 03/12] ACPI/IORT: Make iort_msi_map_rid() PCI agnostic

2020-07-15 Thread Lorenzo Pieralisi
On Fri, Jun 19, 2020 at 09:20:04AM +0100, Lorenzo Pieralisi wrote: > There is nothing PCI specific in iort_msi_map_rid(). > > Rename the function using a bus protocol agnostic name, > iort_msi_map_id(), and convert current callers to it. > > Signed-off-by: Lorenzo Pieralisi > Cc: Will Deacon >

Re: [PATCH v2 05/12] ACPI/IORT: Add an input ID to acpi_dma_configure()

2020-07-15 Thread Lorenzo Pieralisi
On Thu, Jul 09, 2020 at 10:35:14AM +0100, Lorenzo Pieralisi wrote: > On Fri, Jun 19, 2020 at 09:20:06AM +0100, Lorenzo Pieralisi wrote: > > Some HW devices are created as child devices of proprietary busses, > > that have a bus specific policy defining how the child devices > > wires representing t

Re: [PATCH 1/4] dma-mapping: Add bounced DMA ops

2020-07-15 Thread Claire Chang
On Wed, Jul 15, 2020 at 11:46 AM Claire Chang wrote: > > On Tue, Jul 14, 2020 at 7:01 PM Christoph Hellwig wrote: > > > > On Mon, Jul 13, 2020 at 12:55:43PM +0100, Robin Murphy wrote: > > > On 2020-07-13 10:12, Claire Chang wrote: > > >> The bounced DMA ops provide an implementation of DMA ops th

Re: [PATCH v2 0/4] dma-pool: Fix atomic pool selection

2020-07-15 Thread Christoph Hellwig
On Tue, Jul 14, 2020 at 02:39:24PM +0200, Nicolas Saenz Julienne wrote: > This is my attempt at fixing one of the regressions we've seen[1] after > the introduction of per-zone atomic pools. > > This combined with "dma-pool: Do not allocate pool memory from CMA"[2] > should fix the boot issues on

[PATCH v4 4/4] arm64: dts: marvell: add SMMU support

2020-07-15 Thread Tomasz Nowicki
From: Marcin Wojtas Add IOMMU node for Marvell AP806 based SoCs together with platform and PCI device Stream ID mapping. Signed-off-by: Marcin Wojtas Signed-off-by: Tomasz Nowicki --- arch/arm64/boot/dts/marvell/armada-7040.dtsi | 28 + arch/arm64/boot/dts/marvell/armada-8040.dts

[PATCH v4 3/4] dt-bindings: arm-smmu: add compatible string for Marvell Armada-AP806 SMMU-500

2020-07-15 Thread Tomasz Nowicki
Add specific compatible string for Marvell usage due to errata of accessing 64bits registers of ARM SMMU, in AP806. AP806 SoC uses the generic ARM-MMU500, and there's no specific implementation of Marvell, this compatible is used for errata only. Reviewed-by: Rob Herring Signed-off-by: Hanna Haw

[PATCH v4 1/4] iommu/arm-smmu: Call configuration impl hook before consuming features

2020-07-15 Thread Tomasz Nowicki
'cfg_probe' hook is called at the very end of configuration probing procedure and therefore features override and workaround may become complex like for ID register fixups. In preparation for adding Marvell errata move 'cfg_probe' a bit earlier to have chance to adjust the detected features before

[PATCH v4 2/4] iommu/arm-smmu: Workaround for Marvell Armada-AP806 SoC erratum #582743

2020-07-15 Thread Tomasz Nowicki
From: Hanna Hawa Due to erratum #582743, the Marvell Armada-AP806 can't access 64bit to ARM SMMUv2 registers. Provide implementation relevant hooks: - split the writeq/readq to two accesses of writel/readl. - mask the MMU_IDR2.PTFSv8 fields to not use AArch64 format (but only AARCH32_L) since wi

[PATCH v4 0/4] Add system mmu support for Armada-806

2020-07-15 Thread Tomasz Nowicki
The series is meant to support SMMU for AP806 and a workaround for accessing ARM SMMU 64bit registers is the gist of it. For the record, AP-806 can't access SMMU registers with 64bit width. This patches split the readq/writeq into two 32bit accesses instead and update DT bindings. The series was