Re: [RFC 0/2] arm-smmu-v3 tlbi-on-map option

2017-07-13 Thread Michael S. Tsirkin
On Thu, Jul 13, 2017 at 10:29:42AM +0100, Jean-Philippe Brucker wrote: > On 12/07/17 23:07, Michael S. Tsirkin wrote: > [...] > > I think using hardware support for nesting is the right final > > solution. It will take some time though. Given this, what should > > we do meanwhile? > > > >

Re: [PATCH V4 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2017-07-13 Thread Sricharan R
Hi, On 7/13/2017 5:20 PM, Rob Clark wrote: > On Thu, Jul 13, 2017 at 1:35 AM, Sricharan R wrote: >> Hi Vivek, >> >> On 7/13/2017 10:43 AM, Vivek Gautam wrote: >>> Hi Stephen, >>> >>> >>> On 07/13/2017 04:24 AM, Stephen Boyd wrote: On 07/06, Vivek Gautam wrote:

Re: [PATCH V4 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2017-07-13 Thread Vivek Gautam
On Thu, Jul 13, 2017 at 7:27 PM, Vivek Gautam wrote: > On Thu, Jul 13, 2017 at 11:05 AM, Sricharan R > wrote: >> Hi Vivek, >> >> On 7/13/2017 10:43 AM, Vivek Gautam wrote: >>> Hi Stephen, >>> >>> >>> On 07/13/2017 04:24 AM, Stephen Boyd

Re: [PATCH V4 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2017-07-13 Thread Vivek Gautam
On Thu, Jul 13, 2017 at 11:05 AM, Sricharan R wrote: > Hi Vivek, > > On 7/13/2017 10:43 AM, Vivek Gautam wrote: >> Hi Stephen, >> >> >> On 07/13/2017 04:24 AM, Stephen Boyd wrote: >>> On 07/06, Vivek Gautam wrote: @@ -1231,12 +1237,18 @@ static int

Re: [PATCH V4 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2017-07-13 Thread Rob Clark
On Thu, Jul 13, 2017 at 9:53 AM, Sricharan R wrote: > Hi, > > On 7/13/2017 5:20 PM, Rob Clark wrote: >> On Thu, Jul 13, 2017 at 1:35 AM, Sricharan R >> wrote: >>> Hi Vivek, >>> >>> On 7/13/2017 10:43 AM, Vivek Gautam wrote: Hi Stephen,

Re: [RFC 0/2] arm-smmu-v3 tlbi-on-map option

2017-07-13 Thread Jean-Philippe Brucker
On 13/07/17 18:44, Michael S. Tsirkin wrote: > On Thu, Jul 13, 2017 at 10:29:42AM +0100, Jean-Philippe Brucker wrote: >> On 12/07/17 23:07, Michael S. Tsirkin wrote: >> [...] >>> I think using hardware support for nesting is the right final >>> solution. It will take some time though. Given this,

Re: [RFC 0/2] arm-smmu-v3 tlbi-on-map option

2017-07-13 Thread Michael S. Tsirkin
On Thu, Jul 13, 2017 at 08:17:49PM +0100, Jean-Philippe Brucker wrote: > But it is now mostly obsolete. Lots of things had to change while writing > a prototype and following public discussions. At the moment my focus is on > tidying up the base, but I will send another RFC afterwards. Thanks!

Re: [PATCH V4 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2017-07-13 Thread Stephen Boyd
On 07/13, Vivek Gautam wrote: > Hi Stephen, > > > On 07/13/2017 04:24 AM, Stephen Boyd wrote: > >On 07/06, Vivek Gautam wrote: > >>@@ -1231,12 +1237,18 @@ static int arm_smmu_map(struct iommu_domain > >>*domain, unsigned long iova, > >> static size_t arm_smmu_unmap(struct iommu_domain *domain,

Re: IOMMU - DMA debugging

2017-07-13 Thread Federico Vaga
On Wednesday, July 12, 2017 8:02:42 PM CEST Robin Murphy wrote: > On 12/07/17 18:20, Federico Vaga wrote: > > On Wednesday, July 12, 2017 2:15:34 PM CEST Federico Vaga wrote: > >> Thank you Robin > >> > >> (inline comments) > >> > >> On Wednesday, July 12, 2017 1:10:51 PM CEST Robin Murphy

Re: [RFC 0/2] arm-smmu-v3 tlbi-on-map option

2017-07-13 Thread Jean-Philippe Brucker
On 12/07/17 23:07, Michael S. Tsirkin wrote: [...] > I think using hardware support for nesting is the right final > solution. It will take some time though. Given this, what should > we do meanwhile? > > Assuming that's the final destination, a simple quirk like this > seems to be preferable to

Re: [PATCH V4 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2017-07-13 Thread Rob Clark
On Thu, Jul 13, 2017 at 5:50 AM, Robin Murphy wrote: > On 13/07/17 07:48, Stephen Boyd wrote: >> On 07/13, Vivek Gautam wrote: >>> Hi Stephen, >>> >>> >>> On 07/13/2017 04:24 AM, Stephen Boyd wrote: On 07/06, Vivek Gautam wrote: > @@ -1231,12 +1237,18 @@ static int

[RESEND PATCH 3/4] iommu: add qcom_iommu

2017-07-13 Thread Rob Clark
An iommu driver for Qualcomm "B" family devices which do implement the ARM SMMU spec, but not in a way that is compatible with how the arm-smmu driver is designed. It seems SMMU_SCR1.GASRAE=1 so the global register space is not accessible. This means it needs to get configuration from devicetree

[RESEND PATCH 2/4] iommu: arm-smmu: split out register defines

2017-07-13 Thread Rob Clark
I want to re-use some of these for qcom_iommu, which has (roughly) the same context-bank registers. Signed-off-by: Rob Clark --- drivers/iommu/arm-smmu-regs.h | 227 ++ drivers/iommu/arm-smmu.c | 203

[RESEND PATCH 1/4] Docs: dt: document qcom iommu bindings

2017-07-13 Thread Rob Clark
Cc: devicet...@vger.kernel.org Signed-off-by: Rob Clark Reviewed-by: Rob Herring --- .../devicetree/bindings/iommu/qcom,iommu.txt | 121 + 1 file changed, 121 insertions(+) create mode 100644

[RESEND PATCH 4/4] iommu: qcom: initialize secure page table

2017-07-13 Thread Rob Clark
From: Stanimir Varbanov This basically gets the secure page table size, allocates memory for secure pagetables and passes the physical address to the trusted zone. Signed-off-by: Stanimir Varbanov Signed-off-by: Rob Clark

[RESEND PATCH 0/4] iommu: add qcom_iommu for early "B" family devices

2017-07-13 Thread Rob Clark
An iommu driver for Qualcomm "B" family devices which do implement the ARM SMMU spec, but not in a way that arm-smmu can support. (I initially added support to arm-smmu, but it was decided that approach was too intrusive and it would be cleaner to have a separate driver.) I should note that all

Re: [PATCH V4 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2017-07-13 Thread Rob Clark
On Thu, Jul 13, 2017 at 1:35 AM, Sricharan R wrote: > Hi Vivek, > > On 7/13/2017 10:43 AM, Vivek Gautam wrote: >> Hi Stephen, >> >> >> On 07/13/2017 04:24 AM, Stephen Boyd wrote: >>> On 07/06, Vivek Gautam wrote: @@ -1231,12 +1237,18 @@ static int

Re: [PATCH V4 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2017-07-13 Thread Marek Szyprowski
Hi All, On 2017-07-13 13:50, Rob Clark wrote: On Thu, Jul 13, 2017 at 1:35 AM, Sricharan R wrote: On 7/13/2017 10:43 AM, Vivek Gautam wrote: On 07/13/2017 04:24 AM, Stephen Boyd wrote: On 07/06, Vivek Gautam wrote: @@ -1231,12 +1237,18 @@ static int

Re: [PATCH V4 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2017-07-13 Thread Rob Clark
On Thu, Jul 13, 2017 at 8:02 AM, Marek Szyprowski wrote: > Hi All, > > On 2017-07-13 13:50, Rob Clark wrote: >> >> On Thu, Jul 13, 2017 at 1:35 AM, Sricharan R >> wrote: >>> >>> On 7/13/2017 10:43 AM, Vivek Gautam wrote: On 07/13/2017

Re: [PATCH V4 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2017-07-13 Thread Marek Szyprowski
Hi Rob, On 2017-07-13 14:10, Rob Clark wrote: On Thu, Jul 13, 2017 at 8:02 AM, Marek Szyprowski wrote: On 2017-07-13 13:50, Rob Clark wrote: On Thu, Jul 13, 2017 at 1:35 AM, Sricharan R wrote: On 7/13/2017 10:43 AM, Vivek Gautam wrote: