Re: [PATCH v2 7/8] iommu/mediatek: Enlarge the validate PA range for 4GB mode

2017-08-23 Thread kbuild test robot
Hi Yong, [auto build test WARNING on iommu/next] [also build test WARNING on next-20170823] [cannot apply to v4.13-rc6] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Yong-Wu/MT2712-IOMMU

[PATCH] iommu/mediatek: Fix a build fail of m4u_type

2017-08-23 Thread Yong Wu
The commit ("iommu/mediatek: Enlarge the validate PA range for 4GB mode") introduce the following build error: drivers/iommu/mtk_iommu.c: In function 'mtk_iommu_hw_init': >> drivers/iommu/mtk_iommu.c:536:30: error: 'const struct mtk_iommu_data' has no member named 'm4u_type'; did you mean 'm4u

Re: [PATCH v2 7/8] iommu/mediatek: Enlarge the validate PA range for 4GB mode

2017-08-23 Thread kbuild test robot
Hi Yong, [auto build test ERROR on iommu/next] [also build test ERROR on next-20170823] [cannot apply to v4.13-rc6] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Yong-Wu/MT2712-IOMMU-SUPPORT

Re: [PATCH 4/4] iommu/pamu: Add support for generic iommu-device

2017-08-23 Thread Michael Ellerman
Joerg Roedel writes: > Hello Michael, > > On Wed, Aug 23, 2017 at 10:17:39PM +1000, Michael Ellerman wrote: > >> [0.358192] Call Trace: >> [0.360624] [c000f7173680] [c000f7173710] 0xc000f7173710 >> (unreliable) >> [0.368088] [c000f7173710] [c02abf7c] >> .kern

Re: [RFC v2 2/4] iommu/arm-smmu-v3: Add tlbi_on_map option

2017-08-23 Thread Michael S. Tsirkin
On Wed, Aug 23, 2017 at 05:42:55PM +0100, Will Deacon wrote: > Hi Eric, > > On Wed, Aug 23, 2017 at 02:36:53PM +0200, Auger Eric wrote: > > On 23/08/2017 12:25, Will Deacon wrote: > > > On Tue, Aug 22, 2017 at 10:09:15PM +0300, Michael S. Tsirkin wrote: > > >> On Fri, Aug 18, 2017 at 05:49:42AM +0

Re: [PATCH v6 3/3] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801

2017-08-23 Thread John Garry
On 23/08/2017 17:43, Will Deacon wrote: On Wed, Aug 23, 2017 at 03:29:46PM +0100, John Garry wrote: On 23/08/2017 14:24, Will Deacon wrote: On Wed, Aug 23, 2017 at 02:17:24PM +0100, John Garry wrote: Signed-off-by: Shameer Kolothum --- drivers/iommu/arm-smmu-v3.c | 27 ++

Re: [PATCH v6 3/3] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801

2017-08-23 Thread Will Deacon
On Wed, Aug 23, 2017 at 03:29:46PM +0100, John Garry wrote: > On 23/08/2017 14:24, Will Deacon wrote: > >On Wed, Aug 23, 2017 at 02:17:24PM +0100, John Garry wrote: > >Signed-off-by: Shameer Kolothum > > >--- > >drivers/iommu/arm-smmu-v3.c | 27 ++- > >1

Re: [RFC v2 2/4] iommu/arm-smmu-v3: Add tlbi_on_map option

2017-08-23 Thread Will Deacon
Hi Eric, On Wed, Aug 23, 2017 at 02:36:53PM +0200, Auger Eric wrote: > On 23/08/2017 12:25, Will Deacon wrote: > > On Tue, Aug 22, 2017 at 10:09:15PM +0300, Michael S. Tsirkin wrote: > >> On Fri, Aug 18, 2017 at 05:49:42AM +0300, Michael S. Tsirkin wrote: > >>> On Thu, Aug 17, 2017 at 05:34:25PM +

Re: [PATCH v6 3/3] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801

2017-08-23 Thread John Garry
On 23/08/2017 14:24, Will Deacon wrote: On Wed, Aug 23, 2017 at 02:17:24PM +0100, John Garry wrote: Signed-off-by: Shameer Kolothum --- drivers/iommu/arm-smmu-v3.c | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-) Please can you also add a devicetree binding

[PATCH v2] iommu/ipmmu-vmsa: Rereserving a free context before setting up a pagetable

2017-08-23 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Reserving a free context is both quicker and more likely to fail (due to limited hardware resources) than setting up a pagetable. What is more the pagetable init/cleanup code could require the context to be set up. Signed-off-by: Oleksandr Tyshchenko CC: Robin Murphy

Re: [PATCH 4/4] iommu/pamu: Add support for generic iommu-device

2017-08-23 Thread Joerg Roedel
Hello Michael, On Wed, Aug 23, 2017 at 10:17:39PM +1000, Michael Ellerman wrote: > [0.358192] Call Trace: > [0.360624] [c000f7173680] [c000f7173710] 0xc000f7173710 > (unreliable) > [0.368088] [c000f7173710] [c02abf7c] > .kernfs_find_and_get_ns+0x4c/0x7c > [

Re: [RFC v2 2/4] iommu/arm-smmu-v3: Add tlbi_on_map option

2017-08-23 Thread Michael S. Tsirkin
On Wed, Aug 23, 2017 at 02:36:53PM +0200, Auger Eric wrote: > Hi Will, > > On 23/08/2017 12:25, Will Deacon wrote: > > On Tue, Aug 22, 2017 at 10:09:15PM +0300, Michael S. Tsirkin wrote: > >> On Fri, Aug 18, 2017 at 05:49:42AM +0300, Michael S. Tsirkin wrote: > >>> On Thu, Aug 17, 2017 at 05:34:25

Re: [RFC v2 2/4] iommu/arm-smmu-v3: Add tlbi_on_map option

2017-08-23 Thread Michael S. Tsirkin
On Wed, Aug 23, 2017 at 11:25:17AM +0100, Will Deacon wrote: > On Tue, Aug 22, 2017 at 10:09:15PM +0300, Michael S. Tsirkin wrote: > > On Fri, Aug 18, 2017 at 05:49:42AM +0300, Michael S. Tsirkin wrote: > > > On Thu, Aug 17, 2017 at 05:34:25PM +0100, Will Deacon wrote: > > > > On Fri, Aug 11, 2017

Re: [PATCH v1] iommu/ipmmu-vmsa: Set context_id to non-existent value if allocation failed

2017-08-23 Thread Oleksandr Tyshchenko
Hi, Laurent On Wed, Aug 23, 2017 at 4:46 PM, Laurent Pinchart wrote: > Hi Oleksandr, > > On Wednesday, 23 August 2017 14:58:47 EEST Oleksandr Tyshchenko wrote: >> On Wed, Aug 23, 2017 at 1:05 PM, Robin Murphy wrote: >> > On 23/08/17 10:36, Oleksandr Tyshchenko wrote: >> >> On Wed, Aug 23, 2017 at

Re: [virtio-dev] [RFC] virtio-iommu version 0.4

2017-08-23 Thread Auger Eric
Hi Jean-Philippe, On 04/08/2017 20:19, Jean-Philippe Brucker wrote: > This is the continuation of my proposal for virtio-iommu, the para- > virtualized IOMMU. Here is a summary of the changes since last time [1]: > > * The virtio-iommu document now resembles an actual specification. It is > spl

Re: [PATCH] iommu: qcom: annotate PM functions as __maybe_unused

2017-08-23 Thread Rob Clark
On Wed, Aug 23, 2017 at 9:42 AM, Arnd Bergmann wrote: > The qcom_iommu_disable_clocks() function is only called from PM > code that is hidden in an #ifdef, causing a harmless warning without > CONFIG_PM: > > drivers/iommu/qcom_iommu.c:601:13: error: 'qcom_iommu_disable_clocks' defined > but not u

[PATCH 1/2] iommu/amd: Rename a few flush functions

2017-08-23 Thread Joerg Roedel
From: Joerg Roedel Rename a few iommu cache-flush functions that start with iommu_ to start with amd_iommu now. This is to prevent name collisions with generic iommu code later on. Signed-off-by: Joerg Roedel --- drivers/iommu/amd_iommu.c | 16 1 file changed, 8 insertions(+),

[PATCH 2/2] iommu: Introduce Interface for IOMMU TLB Flushing

2017-08-23 Thread Joerg Roedel
From: Joerg Roedel With the current IOMMU-API the hardware TLBs have to be flushed in every iommu_ops->unmap() call-back. For unmapping large amounts of address space, like it happens when a KVM domain with assigned devices is destroyed, this causes thousands of unnecessary TLB flushes in the IO

[PATCH 0/2 v2] Introduce IOMMU-API TLB Flushing Interface

2017-08-23 Thread Joerg Roedel
Hi, here is the second version of the patch-set to introduce an explicit TLB-flushing interface to the IOMMU-API. This version changed the interface quite a lot compared to the first version. This version does not change the semantics of the iommu_map() and iommu_unmap() functions anymore. The re

Re: [PATCH v1] iommu/ipmmu-vmsa: Set context_id to non-existent value if allocation failed

2017-08-23 Thread Laurent Pinchart
Hi Oleksandr, On Wednesday, 23 August 2017 14:58:47 EEST Oleksandr Tyshchenko wrote: > On Wed, Aug 23, 2017 at 1:05 PM, Robin Murphy wrote: > > On 23/08/17 10:36, Oleksandr Tyshchenko wrote: > >> On Wed, Aug 23, 2017 at 12:25 AM, Laurent Pinchart wrote: > >>> On Monday, 21 August 2017 15:40:41 EES

[PATCH] iommu: qcom: annotate PM functions as __maybe_unused

2017-08-23 Thread Arnd Bergmann
The qcom_iommu_disable_clocks() function is only called from PM code that is hidden in an #ifdef, causing a harmless warning without CONFIG_PM: drivers/iommu/qcom_iommu.c:601:13: error: 'qcom_iommu_disable_clocks' defined but not used [-Werror=unused-function] static void qcom_iommu_disable_cloc

Re: [PATCH v6 3/3] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801

2017-08-23 Thread Will Deacon
On Wed, Aug 23, 2017 at 02:17:24PM +0100, John Garry wrote: > >>>Signed-off-by: Shameer Kolothum > >> > >>>--- > >>> drivers/iommu/arm-smmu-v3.c | 27 ++- > >>> 1 file changed, 22 insertions(+), 5 deletions(-) > >> > >>Please can you also add a devicetree binding with corresp

Re: [PATCH v6 3/3] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801

2017-08-23 Thread John Garry
Signed-off-by: Shameer Kolothum --- drivers/iommu/arm-smmu-v3.c | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-) Please can you also add a devicetree binding with corresponding documentation to enable this workaround on non-ACPI based systems too? It should

Re: [RFC v2 2/4] iommu/arm-smmu-v3: Add tlbi_on_map option

2017-08-23 Thread Auger Eric
Hi Will, On 23/08/2017 12:25, Will Deacon wrote: > On Tue, Aug 22, 2017 at 10:09:15PM +0300, Michael S. Tsirkin wrote: >> On Fri, Aug 18, 2017 at 05:49:42AM +0300, Michael S. Tsirkin wrote: >>> On Thu, Aug 17, 2017 at 05:34:25PM +0100, Will Deacon wrote: On Fri, Aug 11, 2017 at 03:45:28PM +02

Re: [PATCH 4/4] iommu/pamu: Add support for generic iommu-device

2017-08-23 Thread Michael Ellerman
Joerg Roedel writes: > From: Joerg Roedel > > This patch adds a global iommu-handle to the pamu driver and > initializes it at probe time. Also link devices added to the > iommu to this handle. > > Signed-off-by: Joerg Roedel > --- > drivers/iommu/fsl_pamu.c| 17 + > dr

Re: [PATCH 00/13] Introduce IOMMU-API TLB Flushing Interface

2017-08-23 Thread Joerg Roedel
On Thu, Aug 17, 2017 at 05:22:20PM +0200, Joerg Roedel wrote: > What I absolutly don't want is that the whole explicit TLB flushing > of the IOMMU-API (as introduced in this patch-set) is considered some > optional part of the API, as it would be when I just introduce _async > versions of map/unmap

Re: [PATCH v1] iommu/ipmmu-vmsa: Set context_id to non-existent value if allocation failed

2017-08-23 Thread Oleksandr Tyshchenko
Hi, Robin On Wed, Aug 23, 2017 at 1:05 PM, Robin Murphy wrote: > On 23/08/17 10:36, Oleksandr Tyshchenko wrote: >> Hi, Laurent. >> >> On Wed, Aug 23, 2017 at 12:25 AM, Laurent Pinchart >> wrote: >>> Hi Oleksandr, >>> >>> Thank you for the patch. >>> >>> On Monday, 21 August 2017 15:40:41 EEST Ol

Re: [RFC v2 2/4] iommu/arm-smmu-v3: Add tlbi_on_map option

2017-08-23 Thread Will Deacon
On Tue, Aug 22, 2017 at 10:09:15PM +0300, Michael S. Tsirkin wrote: > On Fri, Aug 18, 2017 at 05:49:42AM +0300, Michael S. Tsirkin wrote: > > On Thu, Aug 17, 2017 at 05:34:25PM +0100, Will Deacon wrote: > > > On Fri, Aug 11, 2017 at 03:45:28PM +0200, Eric Auger wrote: > > > > When running a virtual

Re: [PATCH v1] iommu/ipmmu-vmsa: Set context_id to non-existent value if allocation failed

2017-08-23 Thread Robin Murphy
On 23/08/17 10:36, Oleksandr Tyshchenko wrote: > Hi, Laurent. > > On Wed, Aug 23, 2017 at 12:25 AM, Laurent Pinchart > wrote: >> Hi Oleksandr, >> >> Thank you for the patch. >> >> On Monday, 21 August 2017 15:40:41 EEST Oleksandr Tyshchenko wrote: >>> From: Oleksandr Tyshchenko >>> >>> In ipmmu_

Re: [RFC] virtio-iommu version 0.4

2017-08-23 Thread Jean-Philippe Brucker
On 04/08/17 19:19, Jean-Philippe Brucker wrote: > Other extensions are in preparation. I won't detail them here because v0.4 > already is a lot to digest, but in short, building on top of PROBE: > > * First, since the IOMMU is paravirtualized, the device can expose some > properties of the physi

Re: [PATCH v1] iommu/ipmmu-vmsa: Set context_id to non-existent value if allocation failed

2017-08-23 Thread Oleksandr Tyshchenko
Hi, Laurent. On Wed, Aug 23, 2017 at 12:25 AM, Laurent Pinchart wrote: > Hi Oleksandr, > > Thank you for the patch. > > On Monday, 21 August 2017 15:40:41 EEST Oleksandr Tyshchenko wrote: >> From: Oleksandr Tyshchenko >> >> In ipmmu_domain_init_context() we are trying to allocate context and >>