Re: Feature Request: Ability to decode bus/dma address back into physical address

2017-08-02 Thread Christian König
Hi Jerome, sorry for being a bit late to the discussion and the top posting. But I think you miss a very important point here, which makes the whole discussion on how to implement completely superfluous: We already have a functionality to access the content of BOs in a process for debugging

[PATCH 2/3] iova: Use alloc_percpu_aligned()

2017-08-02 Thread Huang, Ying
From: Huang Ying To use the newly introduced alloc_percpu_aligned(), which can allocate cache line size aligned percpu memory dynamically. Signed-off-by: "Huang, Ying" Cc: Joerg Roedel Cc: iommu@lists.linux-foundation.org --- drivers/iommu/iova.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

Re: [PATCH 2/4] iommu/tegra-smmu: Add iommu_group support

2017-08-02 Thread Mikko Perttunen
Tested-by: Mikko Perttunen (Jetson TX1 / Tegra210 with Host1x/VIC behind IOMMU) On 21.07.2017 15:12, Robin Murphy wrote: As the last step to making groups mandatory, clean up the remaining drivers by adding basic support. Whilst it may not perfectly reflect the isolation capabilities of the ha

[PATCH] iommu/arm-smmu: Defer TLB flush in case of unmap op

2017-08-02 Thread Vivek Gautam
We don't want to touch the TLB when smmu is suspended. Defer it until resume. Signed-off-by: Vivek Gautam --- Hi all, Here's the small patch in response of suggestion to defer tlb operations when smmu is in suspend state. The patch stores the TLB requests in 'unmap' when the smmu device is susp

Re: [PATCH] iommu/arm-smmu: Defer TLB flush in case of unmap op

2017-08-02 Thread Robin Murphy
On 02/08/17 10:53, Vivek Gautam wrote: > We don't want to touch the TLB when smmu is suspended. > Defer it until resume. > > Signed-off-by: Vivek Gautam > --- > > Hi all, > > Here's the small patch in response of suggestion to defer tlb operations > when smmu is in suspend state. > The patch st

Re: [PATCH v4] acpi/iort: numa: Add numa node mapping for smmuv3 devices

2017-08-02 Thread Lorenzo Pieralisi
On Tue, Jul 25, 2017 at 05:13:05PM +0200, Robert Richter wrote: > On 25.07.17 10:32:37, Ganapatrao Kulkarni wrote: > > ARM IORT specification(rev. C) has added provision to define proximity > > domain in SMMUv3 IORT table. Adding required code to parse Proximity > > domain and set numa_node of smm

[PATCH -next] iommu/of: Check for valid fwspec after of_pci_iommu_init

2017-08-02 Thread Sudeep Holla
The successful return from of_pci_iommu_init doesn't ensure valid fwspec if it's IOMMU is disabled. Accessing dev->iommu_fwspec->ops without checking dev->iommu_fwspec could result in NULL pointer dereference. Unable to handle kernel NULL pointer dereference at virtual address task:

Re: [PATCH -next] iommu/of: Check for valid fwspec after of_pci_iommu_init

2017-08-02 Thread Robin Murphy
On 02/08/17 17:11, Sudeep Holla wrote: > The successful return from of_pci_iommu_init doesn't ensure valid > fwspec if it's IOMMU is disabled. > > Accessing dev->iommu_fwspec->ops without checking dev->iommu_fwspec > could result in NULL pointer dereference. > > Unable to handle kernel NULL point

Re: [PATCH -next] iommu/of: Check for valid fwspec after of_pci_iommu_init

2017-08-02 Thread Sudeep Holla
On 02/08/17 17:39, Robin Murphy wrote: > On 02/08/17 17:11, Sudeep Holla wrote: >> The successful return from of_pci_iommu_init doesn't ensure valid >> fwspec if it's IOMMU is disabled. >> >> Accessing dev->iommu_fwspec->ops without checking dev->iommu_fwspec >> could result in NULL pointer deref

Re: Feature Request: Ability to decode bus/dma address back into physical address

2017-08-02 Thread Jerome Glisse
On Wed, Aug 02, 2017 at 10:26:40AM +0200, Christian König wrote: > Hi Jerome, > > sorry for being a bit late to the discussion and the top posting. > > But I think you miss a very important point here, which makes the whole > discussion on how to implement completely superfluous: > > We already

Re: Feature Request: Ability to decode bus/dma address back into physical address

2017-08-02 Thread Christian König
Am 02.08.2017 um 18:43 schrieb Jerome Glisse: On Wed, Aug 02, 2017 at 10:26:40AM +0200, Christian König wrote: [SNIP] So to summarize you are saying you do not trust the value you get from pci_map_page() ? Well, what we don't trust is that we actually get this value correctly into our page t

Re: Feature Request: Ability to decode bus/dma address back into physical address

2017-08-02 Thread Jerome Glisse
On Wed, Aug 02, 2017 at 07:05:11PM +0200, Christian König wrote: > Am 02.08.2017 um 18:43 schrieb Jerome Glisse: > > On Wed, Aug 02, 2017 at 10:26:40AM +0200, Christian König wrote: > > > [SNIP] > > So to summarize you are saying you do not trust the value you get from > > pci_map_page() ? > > Wel

Re: Feature Request: Ability to decode bus/dma address back into physical address

2017-08-02 Thread Christian König
Am 02.08.2017 um 19:13 schrieb Jerome Glisse: On Wed, Aug 02, 2017 at 07:05:11PM +0200, Christian König wrote: Am 02.08.2017 um 18:43 schrieb Jerome Glisse: On Wed, Aug 02, 2017 at 10:26:40AM +0200, Christian König wrote: [SNIP] So to summarize you are saying you do not trust the value you ge

Re: Feature Request: Ability to decode bus/dma address back into physical address

2017-08-02 Thread Jerome Glisse
On Wed, Aug 02, 2017 at 07:23:58PM +0200, Christian König wrote: > Am 02.08.2017 um 19:13 schrieb Jerome Glisse: > > On Wed, Aug 02, 2017 at 07:05:11PM +0200, Christian König wrote: > > > Am 02.08.2017 um 18:43 schrieb Jerome Glisse: > > > > On Wed, Aug 02, 2017 at 10:26:40AM +0200, Christian König

Re: Feature Request: Ability to decode bus/dma address back into physical address

2017-08-02 Thread Christian König
Am 02.08.2017 um 19:33 schrieb Jerome Glisse: On Wed, Aug 02, 2017 at 07:23:58PM +0200, Christian König wrote: Am 02.08.2017 um 19:13 schrieb Jerome Glisse: On Wed, Aug 02, 2017 at 07:05:11PM +0200, Christian König wrote: Am 02.08.2017 um 18:43 schrieb Jerome Glisse: On Wed, Aug 02, 2017 at 1

Re: Feature Request: Ability to decode bus/dma address back into physical address

2017-08-02 Thread Jerome Glisse
On Wed, Aug 02, 2017 at 08:18:02PM +0200, Christian König wrote: > Am 02.08.2017 um 19:33 schrieb Jerome Glisse: > > On Wed, Aug 02, 2017 at 07:23:58PM +0200, Christian König wrote: > > > Am 02.08.2017 um 19:13 schrieb Jerome Glisse: > > > > On Wed, Aug 02, 2017 at 07:05:11PM +0200, Christian König

Re: Feature Request: Ability to decode bus/dma address back into physical address

2017-08-02 Thread Robin Murphy
On 02/08/17 18:05, Christian König wrote: > Am 02.08.2017 um 18:43 schrieb Jerome Glisse: >> On Wed, Aug 02, 2017 at 10:26:40AM +0200, Christian König wrote: >>> [SNIP] >> So to summarize you are saying you do not trust the value you get from >> pci_map_page() ? > > Well, what we don't trust is th

Re: Feature Request: Ability to decode bus/dma address back into physical address

2017-08-02 Thread Tom St Denis
On 02/08/17 02:42 PM, Robin Murphy wrote: FWIW I'm not aware of anything that does exactly what you want (other than some trick patches I keep around that only work for arm64), but it does come to mind that it ought to be fairly straightforward to give dma-debug the ability to dump out the infor

[PATCH] ARM: dts: rockchip: rk3288 add more iommu nodes

2017-08-02 Thread Simon Xue
Add IEP/ISP/VPU/HEVC iommu nodes Signed-off-by: Simon Xue --- arch/arm/boot/dts/rk3288.dtsi | 37 + 1 file changed, 37 insertions(+) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index 2484f11..90646a2 100644 --- a/arch/arm/boot/d

Re: [PATCH] iommu/arm-smmu: Defer TLB flush in case of unmap op

2017-08-02 Thread Vivek Gautam
Hi Robin, On 08/02/2017 05:47 PM, Robin Murphy wrote: On 02/08/17 10:53, Vivek Gautam wrote: We don't want to touch the TLB when smmu is suspended. Defer it until resume. Signed-off-by: Vivek Gautam --- Hi all, Here's the small patch in response of suggestion to defer tlb operations when