Re: Partial BAR Address Allocation

2017-03-08 Thread Sinan Kaya
On 3/6/2017 6:04 AM, Joerg Roedel wrote: > On Wed, Feb 22, 2017 at 05:39:44PM -0600, Bjorn Helgaas wrote: >> [+cc Joerg, iommu list] >> >> On Wed, Feb 22, 2017 at 03:44:53PM -0500, Sinan Kaya wrote: >>> On 2/22/2017 1:44 PM, Bjorn Helgaas wrote: There is no way for a driver to say "I only

Re: [RFC PATCH v4 28/28] x86: Add support to make use of Secure Memory Encryption

2017-03-08 Thread Borislav Petkov
On Tue, Mar 07, 2017 at 10:05:00AM -0600, Tom Lendacky wrote: > > And then you need to correct the function signature in the > > !CONFIG_AMD_MEM_ENCRYPT case, at the end of this file, too: > > > > unsigned long __init sme_enable(struct boot_params *bp) { > > return 0; } > > Yup,

Re: [PATCH v3 03/09] iommu/ipmmu-vmsa: Enable multi context support

2017-03-08 Thread Magnus Damm
Hi Robin, Thanks for your feedback! On Wed, Mar 8, 2017 at 9:21 PM, Robin Murphy wrote: > On 08/03/17 11:01, Magnus Damm wrote: >> From: Magnus Damm >> >> Add support for up to 8 contexts. Each context is mapped to one >> domain. One domain is

Re: [PATCH v3 02/09] iommu/ipmmu-vmsa: Add optional root device feature

2017-03-08 Thread Magnus Damm
Hi Geert, On Wed, Mar 8, 2017 at 10:47 PM, Geert Uytterhoeven wrote: > Hi Magnus, > > On Wed, Mar 8, 2017 at 12:01 PM, Magnus Damm wrote: >> From: Magnus Damm >> >> Add root device handling to the IPMMU driver by allowing

Re: [PATCH v3 04/09] iommu/ipmmu-vmsa: Make use of IOMMU_OF_DECLARE()

2017-03-08 Thread Magnus Damm
Hi Geert, On Wed, Mar 8, 2017 at 10:52 PM, Geert Uytterhoeven wrote: > Hi Magnus, > > On Wed, Mar 8, 2017 at 12:02 PM, Magnus Damm wrote: >> From: Magnus Damm >> >> Hook up IOMMU_OF_DECLARE() support in case

Re: [PATCH v3 01/09] iommu/ipmmu-vmsa: Introduce features, break out alias

2017-03-08 Thread Magnus Damm
Hi Robin, On Wed, Mar 8, 2017 at 8:53 PM, Robin Murphy wrote: > Hi Magnus, > > On 08/03/17 11:01, Magnus Damm wrote: >> From: Magnus Damm >> >> Introduce struct ipmmu_features to track various hardware >> and software implementation changes

Re: [PATCH v7 06/07] iommu/ipmmu-vmsa: ARM and ARM64 archdata access

2017-03-08 Thread Magnus Damm
Hi Robin, On Wed, Mar 8, 2017 at 9:48 PM, Robin Murphy wrote: > On 07/03/17 03:17, Magnus Damm wrote: >> From: Magnus Damm >> >> Not all architectures have an iommu member in their archdata, so >> use #ifdefs support build with COMPILE_TEST on

Re: [PATCH v3 09/09] iommu/ipmmu-vmsa: Hook up r8a7795 DT matching code

2017-03-08 Thread Magnus Damm
Hi Geert, On Wed, Mar 8, 2017 at 10:58 PM, Geert Uytterhoeven wrote: > Hi Magnus, > > On Wed, Mar 8, 2017 at 12:02 PM, Magnus Damm wrote: >> From: Magnus Damm >> >> Tie in r8a7795 features and update the IOMMU_OF_DECLARE

Re: [PATCH v3 06/09] iommu/ipmmu-vmsa: Write IMCTR twice

2017-03-08 Thread Magnus Damm
Hi Robin, On Wed, Mar 8, 2017 at 9:34 PM, Robin Murphy wrote: > On 08/03/17 11:02, Magnus Damm wrote: >> From: Magnus Damm >> >> Write IMCTR both in the root device and the leaf node. >> >> Signed-off-by: Magnus Damm

Re: [PATCH V8 01/11] iommu/of: Refactor of_iommu_configure() for error handling

2017-03-08 Thread Jean-Philippe Brucker
Hello, On 03/02/17 15:48, Sricharan R wrote: > From: Robin Murphy > > In preparation for some upcoming cleverness, rework the control flow in > of_iommu_configure() to minimise duplication and improve the propogation > of errors. It's also as good a time as any to switch

Re: [PATCH V8 01/11] iommu/of: Refactor of_iommu_configure() for error handling

2017-03-08 Thread Robin Murphy
On 08/03/17 18:58, Jean-Philippe Brucker wrote: [...] >> static const struct iommu_ops >> -*of_pci_iommu_configure(struct pci_dev *pdev, struct device_node *bridge_np) >> +*of_pci_iommu_init(struct pci_dev *pdev, struct device_node *bridge_np) >> { >> const struct iommu_ops *ops; >>

[PATCH v3 06/09] iommu/ipmmu-vmsa: Write IMCTR twice

2017-03-08 Thread Magnus Damm
From: Magnus Damm Write IMCTR both in the root device and the leaf node. Signed-off-by: Magnus Damm --- Changes since V2: - None Changes since V1: - None drivers/iommu/ipmmu-vmsa.c | 17 ++--- 1 file changed, 14

[PATCH v3 05/09] iommu/ipmmu-vmsa: IPMMU device is 40-bit bus master

2017-03-08 Thread Magnus Damm
From: Magnus Damm The r8a7795 IPMMU supports 40-bit bus mastering. Both the coherent DMA mask and the streaming DMA mask are set to unlock the 40-bit address space for coherent allocations and streaming operations. Signed-off-by: Magnus Damm

[PATCH v3 07/09] iommu/ipmmu-vmsa: Make IMBUSCTR setup optional

2017-03-08 Thread Magnus Damm
From: Magnus Damm Introduce a feature to allow opt-out of setting up IMBUSCR. The default case is unchanged. Signed-off-by: Magnus Damm --- Changes since V2: - None Changes since V1: - Updated the commit message - Reworked patch to

Re: [PATCH v3 03/09] iommu/ipmmu-vmsa: Enable multi context support

2017-03-08 Thread Robin Murphy
On 08/03/17 11:01, Magnus Damm wrote: > From: Magnus Damm > > Add support for up to 8 contexts. Each context is mapped to one > domain. One domain is assigned one or more slave devices. Contexts > are allocated dynamically and slave devices are grouped together >

[PATCH v3 09/09] iommu/ipmmu-vmsa: Hook up r8a7795 DT matching code

2017-03-08 Thread Magnus Damm
From: Magnus Damm Tie in r8a7795 features and update the IOMMU_OF_DECLARE compat string to include the updated compat string. TODO: - Consider making use of iommu_fwspec_add_ids() for uTLB handling Needed to coexist with non-OF R-Car Gen2 somehow... - Break

[PATCH v3 08/09] iommu/ipmmu-vmsa: Allow two bit SL0

2017-03-08 Thread Magnus Damm
From: Magnus Damm Introduce support for two bit SL0 bitfield in IMTTBCR by using a separate feature flag. Signed-off-by: Magnus Damm --- Changes since V2: - None Changes since V1: - None drivers/iommu/ipmmu-vmsa.c | 15

Re: [PATCH v3 06/09] iommu/ipmmu-vmsa: Write IMCTR twice

2017-03-08 Thread Robin Murphy
On 08/03/17 11:02, Magnus Damm wrote: > From: Magnus Damm > > Write IMCTR both in the root device and the leaf node. > > Signed-off-by: Magnus Damm > --- > > Changes since V2: > - None > > Changes since V1: > - None > >

Re: [PATCH v7 06/07] iommu/ipmmu-vmsa: ARM and ARM64 archdata access

2017-03-08 Thread Robin Murphy
On 07/03/17 03:17, Magnus Damm wrote: > From: Magnus Damm > > Not all architectures have an iommu member in their archdata, so > use #ifdefs support build with COMPILE_TEST on any architecture. I have a feeling I might be repeating myself, but ipmmu_vmsa_archdata

Re: [RFC PATCH 04/30] iommu/arm-smmu-v3: Add support for PCI ATS

2017-03-08 Thread Sinan Kaya
On 2/27/2017 2:54 PM, Jean-Philippe Brucker wrote: > + ats_enabled = !arm_smmu_enable_ats(master); > + You should make ats_supported field in IORT table part of the decision process for when to enable ATS. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm

Re: [PATCH v7 05/07] iommu/ipmmu-vmsa: Add new IOMMU_DOMAIN_DMA ops

2017-03-08 Thread Robin Murphy
On 07/03/17 03:17, Magnus Damm wrote: > From: Magnus Damm > > Introduce an alternative set of iommu_ops suitable for 64-bit ARM > as well as 32-bit ARM when CONFIG_IOMMU_DMA=y. Also adjust the > Kconfig to depend on ARM or IOMMU_DMA. Initialize the device > from

Re: [PATCH v3 02/09] iommu/ipmmu-vmsa: Add optional root device feature

2017-03-08 Thread Geert Uytterhoeven
Hi Magnus, On Wed, Mar 8, 2017 at 12:01 PM, Magnus Damm wrote: > From: Magnus Damm > > Add root device handling to the IPMMU driver by allowing certain > DT compat strings to enable has_cache_leaf_nodes that in turn will > support both root

Re: [PATCH v3 04/09] iommu/ipmmu-vmsa: Make use of IOMMU_OF_DECLARE()

2017-03-08 Thread Geert Uytterhoeven
Hi Magnus, On Wed, Mar 8, 2017 at 12:02 PM, Magnus Damm wrote: > From: Magnus Damm > > Hook up IOMMU_OF_DECLARE() support in case CONFIG_IOMMU_DMA > is enabled. The only current supported case for 32-bit ARM > is disabled, however for 64-bit

Re: [PATCH v3 09/09] iommu/ipmmu-vmsa: Hook up r8a7795 DT matching code

2017-03-08 Thread Geert Uytterhoeven
Hi Magnus, On Wed, Mar 8, 2017 at 12:02 PM, Magnus Damm wrote: > From: Magnus Damm > > Tie in r8a7795 features and update the IOMMU_OF_DECLARE > compat string to include the updated compat string. > > TODO: > - Consider making use of

Re: [PATCH v7 01/07] iommu/ipmmu-vmsa: Remove platform data handling

2017-03-08 Thread Geert Uytterhoeven
On Tue, Mar 7, 2017 at 4:16 AM, Magnus Damm wrote: > From: Magnus Damm > > The IPMMU driver is using DT these days, and platform data is no longer > used by the driver. Remove unused code. > > Signed-off-by: Magnus Damm

Re: [PATCH v7 04/07] iommu/ipmmu-vmsa: Break out domain allocation code

2017-03-08 Thread Geert Uytterhoeven
On Tue, Mar 7, 2017 at 4:17 AM, Magnus Damm wrote: > From: Magnus Damm > > Break out the domain allocation code into a separate function. > This is preparation for future code sharing. > > Signed-off-by: Magnus Damm

Re: [PATCH v7 06/07] iommu/ipmmu-vmsa: ARM and ARM64 archdata access

2017-03-08 Thread Geert Uytterhoeven
Hi Magnus, On Tue, Mar 7, 2017 at 4:17 AM, Magnus Damm wrote: > From: Magnus Damm > > Not all architectures have an iommu member in their archdata, so > use #ifdefs support build with COMPILE_TEST on any architecture. to support >

Re: iommu/rockchip: Fix bugs and enable on ARM64

2017-03-08 Thread Caesar Wang
Shunqian, something is depending on these patches, can you resend these patches to solve the compile errors? -Caesar 在 2016年07月16日 00:16, Joerg Roedel 写道: On Fri, Jul 15, 2016 at 05:32:02PM +0200, Matthias Brugger wrote: The drm rockchip patches are dependent on iommu/rockchip patches, can

[PATCH v3 02/09] iommu/ipmmu-vmsa: Add optional root device feature

2017-03-08 Thread Magnus Damm
From: Magnus Damm Add root device handling to the IPMMU driver by allowing certain DT compat strings to enable has_cache_leaf_nodes that in turn will support both root devices with interrupts and leaf devices that face the actual IPMMU consumer devices.

[PATCH v3 04/09] iommu/ipmmu-vmsa: Make use of IOMMU_OF_DECLARE()

2017-03-08 Thread Magnus Damm
From: Magnus Damm Hook up IOMMU_OF_DECLARE() support in case CONFIG_IOMMU_DMA is enabled. The only current supported case for 32-bit ARM is disabled, however for 64-bit ARM usage of OF is required. Signed-off-by: Magnus Damm --- Changes

[PATCH v3 00/09] iommu/ipmmu-vmsa: r8a7795 support V3

2017-03-08 Thread Magnus Damm
iommu/ipmmu-vmsa: r8a7795 support V3 [PATCH v3 01/09] iommu/ipmmu-vmsa: Introduce features, break out alias [PATCH v3 02/09] iommu/ipmmu-vmsa: Add optional root device feature [PATCH v3 03/09] iommu/ipmmu-vmsa: Enable multi context support [PATCH v3 04/09] iommu/ipmmu-vmsa: Make use of

[PATCH v3 03/09] iommu/ipmmu-vmsa: Enable multi context support

2017-03-08 Thread Magnus Damm
From: Magnus Damm Add support for up to 8 contexts. Each context is mapped to one domain. One domain is assigned one or more slave devices. Contexts are allocated dynamically and slave devices are grouped together based on which IPMMU device they are connected to.