Re: [RFC 1/3] memory: Introduce memory controller mini-framework

2019-11-01 Thread Thierry Reding
On Thu, Oct 31, 2019 at 06:11:33PM +0300, Dmitry Osipenko wrote: > 15.10.2019 19:29, Thierry Reding пишет: > > From: Thierry Reding > > > > This new framework is currently nothing more than a registry of memory > > controllers, with the goal being to order device probing. One use-case > > where t

Re: [PATCH 0/7] iommu: Permit modular builds of ARM SMMU[v3] drivers

2019-11-01 Thread John Garry
On 31/10/2019 23:34, Saravana Kannan via iommu wrote: I looked into the iommu-map property and it shouldn't be too hard to add support for it. Looks like we can simply hold off on probing the root bridge device till all the iommus in its iommu-map are probed and we should be fine. I'm also unsu

Re: [PATCH 0/7] iommu: Permit modular builds of ARM SMMU[v3] drivers

2019-11-01 Thread Jean-Philippe Brucker
On Thu, Oct 31, 2019 at 04:34:14PM -0700, Saravana Kannan wrote: > > Neat, I'm trying to do the same for virtio-iommu. It needs to be modular > > because it depends on the virtio transport, which distributions usually > > build as a module. So far I've been managing the device links in > > virtio-i

Re: [PATCH 0/7] iommu: Permit modular builds of ARM SMMU[v3] drivers

2019-11-01 Thread Lorenzo Pieralisi
On Fri, Nov 01, 2019 at 12:41:48PM +0100, Jean-Philippe Brucker wrote: [...] > > > I'm also wondering about ACPI support. > > > > I'd love to add ACPI support too, but I have zero knowledge of ACPI. > > I'd be happy to help anyone who wants to add ACPI support that allows > > ACPI to add device

Re: [PATCH] iommu/arm-smmu: avoid pathological RPM behaviour for unmaps

2019-11-01 Thread Will Deacon
On Thu, Oct 31, 2019 at 02:31:02PM -0700, Rob Clark wrote: > From: Rob Clark > > When games, browser, or anything using a lot of GPU buffers exits, there > can be many hundreds or thousands of buffers to unmap and free. If the > GPU is otherwise suspended, this can cause arm-smmu to resume/suspe

Re: [PATCHv7 0/3] QCOM smmu-500 wait-for-safe handling for sdm845

2019-11-01 Thread Will Deacon
On Fri, Sep 20, 2019 at 01:34:26PM +0530, Sai Prakash Ranjan wrote: > Previous version of the patches are at [1]: > > QCOM's implementation of smmu-500 on sdm845 adds a hardware logic called > wait-for-safe. This logic helps in meeting the invalidation requirements > from 'real-time clients', such

Re: [PATCH v2] dt-bindings: iommu: Convert Arm SMMUv3 to DT schema

2019-11-01 Thread Will Deacon
Hi Rob, On Mon, Oct 14, 2019 at 02:12:56PM -0500, Rob Herring wrote: > Convert the Arm SMMv3 binding to the DT schema format. > > Cc: Joerg Roedel > Cc: Mark Rutland > Cc: Will Deacon > Cc: Robin Murphy > Cc: iommu@lists.linux-foundation.org > Signed-off-by: Rob Herring > --- > v2: > - Refin

Re: [PATCHv7 0/3] QCOM smmu-500 wait-for-safe handling for sdm845

2019-11-01 Thread Sai Prakash Ranjan
On 2019-11-01 22:01, Will Deacon wrote: On Fri, Sep 20, 2019 at 01:34:26PM +0530, Sai Prakash Ranjan wrote: Previous version of the patches are at [1]: QCOM's implementation of smmu-500 on sdm845 adds a hardware logic called wait-for-safe. This logic helps in meeting the invalidation requirem

Re: [PATCH 0/7] iommu: Permit modular builds of ARM SMMU[v3] drivers

2019-11-01 Thread Will Deacon
Hi Jean-Philippe, Quick question while you figure out the devlink stuff with Saravana... On Thu, Oct 31, 2019 at 08:37:58PM +0100, Jean-Philippe Brucker wrote: > On Wed, Oct 30, 2019 at 05:57:44PM -0700, Saravana Kannan via iommu wrote: > > > > > Obviously you need to be careful about using IOMMU

Re: [PATCHv7 0/3] QCOM smmu-500 wait-for-safe handling for sdm845

2019-11-01 Thread Will Deacon
On Fri, Nov 01, 2019 at 10:49:00PM +0530, Sai Prakash Ranjan wrote: > On 2019-11-01 22:01, Will Deacon wrote: > > On Fri, Sep 20, 2019 at 01:34:26PM +0530, Sai Prakash Ranjan wrote: > > > Previous version of the patches are at [1]: > > > > > > QCOM's implementation of smmu-500 on sdm845 adds a har

Re: [PATCHv7 0/3] QCOM smmu-500 wait-for-safe handling for sdm845

2019-11-01 Thread Sai Prakash Ranjan
On 2019-11-01 22:55, Will Deacon wrote: On Fri, Nov 01, 2019 at 10:49:00PM +0530, Sai Prakash Ranjan wrote: On 2019-11-01 22:01, Will Deacon wrote: > On Fri, Sep 20, 2019 at 01:34:26PM +0530, Sai Prakash Ranjan wrote: > > Previous version of the patches are at [1]: > > > > QCOM's implementation

Re: [PATCH v7 04/11] iommu/vt-d: Replace Intel specific PASID allocator with IOASID

2019-11-01 Thread Jacob Pan
On Fri, 25 Oct 2019 13:47:25 +0800 Lu Baolu wrote: > Hi, > > On 10/25/19 3:54 AM, Jacob Pan wrote: > > Make use of generic IOASID code to manage PASID allocation, > > free, and lookup. Replace Intel specific code. > > > > Signed-off-by: Jacob Pan > > --- > > drivers/iommu/intel-iommu.c | 12

Re: [RFC 1/3] memory: Introduce memory controller mini-framework

2019-11-01 Thread Dmitry Osipenko
01.11.2019 13:18, Thierry Reding пишет: > On Thu, Oct 31, 2019 at 06:11:33PM +0300, Dmitry Osipenko wrote: >> 15.10.2019 19:29, Thierry Reding пишет: >>> From: Thierry Reding >>> >>> This new framework is currently nothing more than a registry of memory >>> controllers, with the goal being to orde

Re: [PATCH v2] dt-bindings: iommu: Convert Arm SMMUv3 to DT schema

2019-11-01 Thread Rob Herring
On Fri, Nov 1, 2019 at 12:08 PM Will Deacon wrote: > > Hi Rob, > > On Mon, Oct 14, 2019 at 02:12:56PM -0500, Rob Herring wrote: > > Convert the Arm SMMv3 binding to the DT schema format. > > > > Cc: Joerg Roedel > > Cc: Mark Rutland > > Cc: Will Deacon > > Cc: Robin Murphy > > Cc: iommu@lists.

Re: [PATCH v7 07/11] iommu/vt-d: Add nested translation helper function

2019-11-01 Thread Jacob Pan
On Fri, 25 Oct 2019 07:04:28 + "Tian, Kevin" wrote: > > From: Jacob Pan [mailto:jacob.jun@linux.intel.com] > > Sent: Friday, October 25, 2019 3:55 AM > > > > Nested translation mode is supported in VT-d 3.0 Spec.CH 3.8. > > With PASID granular translation type set to 0x11b, translation >

Re: [PATCH 0/7] iommu: Permit modular builds of ARM SMMU[v3] drivers

2019-11-01 Thread Saravana Kannan via iommu
On Fri, Nov 1, 2019 at 3:28 AM John Garry wrote: > > On 31/10/2019 23:34, Saravana Kannan via iommu wrote: > > I looked into the iommu-map property and it shouldn't be too hard to > > add support for it. Looks like we can simply hold off on probing the > > root bridge device till all the iommus in

Re: [PATCH v7 10/11] iommu/vt-d: Support flushing more translation cache types

2019-11-01 Thread Jacob Pan
On Sat, 26 Oct 2019 10:22:43 +0800 Lu Baolu wrote: > Hi, > > On 10/25/19 3:55 AM, Jacob Pan wrote: > > When Shared Virtual Memory is exposed to a guest via vIOMMU, > > scalable IOTLB invalidation may be passed down from outside IOMMU > > subsystems. This patch adds invalidation functions that ca

Re: [PATCH v7 10/11] iommu/vt-d: Support flushing more translation cache types

2019-11-01 Thread Jacob Pan
On Fri, 25 Oct 2019 07:21:29 + "Tian, Kevin" wrote: > > From: Jacob Pan [mailto:jacob.jun@linux.intel.com] > > Sent: Friday, October 25, 2019 3:55 AM > > > > When Shared Virtual Memory is exposed to a guest via vIOMMU, > > scalable IOTLB invalidation may be passed down from outside IOMMU

Re: [PATCH 0/7] iommu: Permit modular builds of ARM SMMU[v3] drivers

2019-11-01 Thread Saravana Kannan via iommu
On Fri, Nov 1, 2019 at 5:28 AM Lorenzo Pieralisi wrote: > > On Fri, Nov 01, 2019 at 12:41:48PM +0100, Jean-Philippe Brucker wrote: > > [...] > > > > > I'm also wondering about ACPI support. > > > > > > I'd love to add ACPI support too, but I have zero knowledge of ACPI. > > > I'd be happy to help

switch xtensa over to the generic DMA remap / uncached segment code

2019-11-01 Thread Christoph Hellwig
Hi all, this series switches over xtensa to use the generic DMA remap and uncached code. Xtensa is a little special because it uses an uncached segment by default, but can still use page table bits for remapping highmem. To facilitate that there is some major refactoring in the common DMA code t

[PATCH 2/5] dma-direct: remove the dma_handle argument to __dma_direct_alloc_pages

2019-11-01 Thread Christoph Hellwig
The argument isn't used anywhere, so stop passing it. Signed-off-by: Christoph Hellwig --- include/linux/dma-direct.h | 2 +- kernel/dma/direct.c| 4 ++-- kernel/dma/remap.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/dma-direct.h b/includ

[PATCH 4/5] dma-mapping: merge the generic remapping helpers into dma-direct

2019-11-01 Thread Christoph Hellwig
Integrate the generic dma remapping implementation into the main flow. This prepares for architectures like xtensa that use an uncached segment for pages in the kernel mapping, but can also remap highmem from CMA. To simplify that implementation we now always deduct the page from the physical addr

[PATCH 3/5] dma-direct: provide mmap and get_sgtable method overrides

2019-11-01 Thread Christoph Hellwig
For dma-direct we know that the DMA address is an encoding of the physical address that we can trivially decode. Use that fact to provide implementations that do not need the arch_dma_coherent_to_pfn architecture hook. Note that we still can only support mmap of non-coherent memory only if the ar

[PATCH 1/5] dma-direct: remove __dma_direct_free_pages

2019-11-01 Thread Christoph Hellwig
We can just call dma_free_contiguous directly instead of wrapping it. Signed-off-by: Christoph Hellwig --- include/linux/dma-direct.h | 1 - kernel/dma/direct.c| 11 +++ kernel/dma/remap.c | 4 ++-- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/include

[PATCH 5/5] xtensa: use the generic uncached segment support

2019-11-01 Thread Christoph Hellwig
Switch xtensa over to use the generic uncached support, and thus the generic implementations of dma_alloc_* and dma_alloc_*, which also gains support for mmaping DMA memory. The non-working nommu DMA support has been disabled, but could be re-enabled easily if platforms that actually have an uncac

RE: [PATCH] video: hyperv: hyperv_fb: Use physical memory for fb on HyperV Gen 1 VMs.

2019-11-01 Thread Michael Kelley via iommu
From: Wei Hu Sent: Tuesday, October 22, 2019 4:11 AM > > On Hyper-V, Generation 1 VMs can directly use VM's physical memory for > their framebuffers. This can improve the efficiency of framebuffer and > overall performence for VM. The physical memory assigned to framebuffer > must be contiguous.

[PATCH 1/1] MAINTAINERS: Update for INTEL IOMMU (VT-d) entry

2019-11-01 Thread Lu Baolu
Update the INTEL IOMMU (VT-d) entry and add myself as the co-maintainer. I have several years of VT-d development experience and have actively contributed to Intel VT-d driver during recent two years. I volunteer to take this rule. With this role, I can better help review and test patches. Cc: Dav

Re: switch xtensa over to the generic DMA remap / uncached segment code

2019-11-01 Thread Max Filippov
On Fri, Nov 1, 2019 at 3:02 PM Christoph Hellwig wrote: > this series switches over xtensa to use the generic DMA remap and > uncached code. Xtensa is a little special because it uses an uncached > segment by default, but can still use page table bits for remapping > highmem. To facilitate that