Re: [PATCH RFC 1/1] iommu: set the default iommu-dma mode as non-strict

2019-03-01 Thread Leizhen (ThunderTown)
On 2019/3/1 19:07, Jean-Philippe Brucker wrote: > Hi Leizhen, > > On 01/03/2019 04:44, Leizhen (ThunderTown) wrote: >> >> >> On 2019/2/26 20:36, Hanjun Guo wrote: >>> Hi Jean, >>> >>> On 2019/1/31 22:55, Jean-Philippe Brucker wrote: Hi, On 31/01/2019 13:52, Zhen Lei wrote: >

[PATCH RFC/RFT] dma-contiguous: Get normal pages for single-page allocations

2019-03-01 Thread Nicolin Chen
The addresses within a single page are always contiguous, so it's not so necessary to always allocate one single page from CMA area. Since the CMA area has a limited predefined size of space, it may run out of space in heavy use cases, where there might be quite a lot CMA pages being allocated for

Re: [git pull] IOMMU Fixes for Linux v5.0-rc8

2019-03-01 Thread pr-tracker-bot
The pull request you sent on Fri, 1 Mar 2019 17:57:05 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git > tags/iommu-fix-v5.0-rc8 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/a215ce8f0e00c2d707080236f1aafec337371043 Thank you! -- Deet-doot-dot

Re: [Freedreno] [RFC PATCH v1 02/15] iommu/arm-smmu: Add split pagetable support for arm-smmu-v2

2019-03-01 Thread Rob Clark
On Fri, Mar 1, 2019 at 2:38 PM Jordan Crouse wrote: > > Add support for a split pagetable (TTBR0/TTBR1) scheme for > arm-smmu-v2. If split pagetables are enabled, create a > pagetable for TTBR1 and set up the sign extension bit so > that all IOVAs with that bit set are mapped and translated > from

[PATCH] iommu/mediatek: fix semicolon code style issue

2019-03-01 Thread Yang Wei
From: Yang Wei Delete a superfluous semicolon in mtk_iommu_add_device(). Signed-off-by: Yang Wei --- drivers/iommu/mtk_iommu_v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c index 7e0df67..52b01e3 100644 --- a/

[RFC PATCH v1 03/15] iommu/io-pgtable: Allow TLB operations to be optional

2019-03-01 Thread Jordan Crouse
An upcoming change to arm-smmu will add auxiliary domains that will allow a leaf driver to create and map additional pagetables for device specific uses. By definition aux arm-smmu domains will not be allowed to touch the hardware directly so allow for the TLB operations for a given pagetable confi

[RFC PATCH v1 04/15] iommu: Add DOMAIN_ATTR_PTBASE

2019-03-01 Thread Jordan Crouse
Add an attribute to return the base address of the pagetable. This is used by auxiliary domains from arm-smmu to return the address of the pagetable to the leaf driver so that it can set the appropriate pagetable through it's own means. Signed-off-by: Jordan Crouse --- include/linux/iommu.h | 1

[RFC PATCH v1 05/15] iommu/arm-smmu: Add auxiliary domain support for arm-smmuv2

2019-03-01 Thread Jordan Crouse
Support the new auxiliary domain API for arm-smmuv2 to initialize and support multiple pagetables for a SMMU device. Since the smmu-v2 hardware doesn't have any built in support for switching the pagetable base it is left as an exercise to the caller to actually use the pagetable; aux domains in th

[RFC PATCH v1 02/15] iommu/arm-smmu: Add split pagetable support for arm-smmu-v2

2019-03-01 Thread Jordan Crouse
Add support for a split pagetable (TTBR0/TTBR1) scheme for arm-smmu-v2. If split pagetables are enabled, create a pagetable for TTBR1 and set up the sign extension bit so that all IOVAs with that bit set are mapped and translated from the TTBR1 pagetable. Signed-off-by: Jordan Crouse --- driver

[RFC PATCH v1 00/15] drm/msm: Per-instance pagetable support

2019-03-01 Thread Jordan Crouse
This is the latest incarnation of per-instance pagetable support for the MSM GPU driver. Some of these have been seen before, most recently [1]. Per-instance pagetables allow the target GPU driver to create and manage an individual pagetable for each file descriptor instance and switch between the

[RFC PATCH v1 01/15] iommu: Add DOMAIN_ATTR_SPLIT_TABLES

2019-03-01 Thread Jordan Crouse
Add a new domain attribute to enable split pagetable support for devices devices that support it. Signed-off-by: Jordan Crouse --- include/linux/iommu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index e90da6b..3f2250b 100644 --- a/include/

[PATCH v2] iommu/arm-smmu: Break insecure users by disabling bypass by default

2019-03-01 Thread Douglas Anderson
If you're bisecting why your peripherals stopped working, it's probably this CL. Specifically if you see this in your dmesg: Unexpected global fault, this could be serious ...then it's almost certainly this CL. Running your IOMMU-enabled peripherals with the IOMMU in bypass mode is insecure and

Re: [PATCH] iommu/arm-smmu: Allow disabling bypass via kernel config

2019-03-01 Thread Doug Anderson
Hi, On Fri, Feb 15, 2019 at 2:37 PM Rob Clark wrote: > > On Thu, Feb 14, 2019 at 7:40 PM Doug Anderson wrote: > > > > Hi, > > > > On Thu, Feb 14, 2019 at 1:32 PM Robin Murphy wrote: > > > > > > Hi Doug, > > > > > > On 2019-02-14 8:44 pm, Douglas Anderson wrote: > > > > Right now the only way to

[git pull] IOMMU Fixes for Linux v5.0-rc8

2019-03-01 Thread Joerg Roedel
Hi Linus, The following changes since commit 8950dcd83ae7d62bdc2a60507949acebd85399f2: iommu/vt-d: Leave scalable mode default off (2019-01-30 17:23:58 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git tags/iommu-fix-v5.0-rc8 for y

Re: [PATCH v2] iommu: io-pgtable: Add ARM Mali midgard MMU page table format

2019-03-01 Thread Robin Murphy
On 27/02/2019 23:22, Rob Herring wrote: ARM Mali midgard GPU page tables are similar to standard 64-bit stage 1 page tables, but have a few differences. Add a new format type to represent the format. The input address size is 48-bits and the output address size is 40-bits (and possibly less?). No

Re: [PATCH RFC 1/1] iommu: set the default iommu-dma mode as non-strict

2019-03-01 Thread Jean-Philippe Brucker
Hi Leizhen, On 01/03/2019 04:44, Leizhen (ThunderTown) wrote: > > > On 2019/2/26 20:36, Hanjun Guo wrote: >> Hi Jean, >> >> On 2019/1/31 22:55, Jean-Philippe Brucker wrote: >>> Hi, >>> >>> On 31/01/2019 13:52, Zhen Lei wrote: Currently, many peripherals are faster than before. For example,

Re: [PATCH 0/4] iommu/vt-d: Several fixes for 5.1

2019-03-01 Thread Joerg Roedel
On Fri, Mar 01, 2019 at 11:23:09AM +0800, Lu Baolu wrote: > Hi Joerg, > > This includes several small fixes. All are stable kernel irrelated. > Please consider it for 5.1-rc1. > > Best regards, > Lu Baolu > > Lu Baolu (4): > iommu/vt-d: Disable ATS support on untrusted devices > iommu/vt-d:

Re: [PATCH 2/5] iommu/arm-smmu-v3: make smmu can be enabled in kdump kernel

2019-03-01 Thread Leizhen (ThunderTown)
It seems that the picture is too big, I change it from jpg to png. On 2019/3/1 17:02, Leizhen (ThunderTown) wrote: > Hi All, > I drew a flowchart, hope this can help you to understand my method. > > On 2019/2/19 15:54, Zhen Lei wrote: >> To reduce the risk of further crash, the device_shutdo

Re: [PATCH] iommu/mediatek: fix semicolon code style issue

2019-03-01 Thread Joerg Roedel
On Thu, Feb 28, 2019 at 10:45:01PM +0800, Yang Wei wrote: > From: Yang Wei > > Delete a superfluous semicolon in mtk_iommu_add_device(). > > Signed-off-by: Yang Wei > --- > drivers/iommu/mtk_iommu_v1.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks. _