[PATCH v4 6/9] iommu/dma-iommu.c: Convert to use vm_map_pages()

2019-02-14 Thread Souptick Joarder
Convert to use vm_map_pages() to map range of kernel memory to user vma. Signed-off-by: Souptick Joarder --- drivers/iommu/dma-iommu.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index d19f3d6..bacebff

[PATCH v4 1/9] mm: Introduce new vm_map_pages() and vm_map_pages_zero() API

2019-02-14 Thread Souptick Joarder
Previouly drivers have their own way of mapping range of kernel pages/memory into user vma and this was done by invoking vm_insert_page() within a loop. As this pattern is common across different drivers, it can be generalized by creating new functions and use it across the drivers.

[PATCH v4 0/9] mm: Use vm_map_pages() and vm_map_pages_zero() API

2019-02-14 Thread Souptick Joarder
Previouly drivers have their own way of mapping range of kernel pages/memory into user vma and this was done by invoking vm_insert_page() within a loop. As this pattern is common across different drivers, it can be generalized by creating new functions and use it across the drivers.

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

2019-02-14 Thread Doug Anderson
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 disable the iommu bypass for the ARM SMMU is > > with the kernel command line parameter 'arm-smmu.disable_bypass'. > > > > In general kernel

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

2019-02-14 Thread Robin Murphy
Hi Doug, On 2019-02-14 8:44 pm, Douglas Anderson wrote: Right now the only way to disable the iommu bypass for the ARM SMMU is with the kernel command line parameter 'arm-smmu.disable_bypass'. In general kernel command line parameters make sense for things that someone would like to tweak

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

2019-02-14 Thread Douglas Anderson
Right now the only way to disable the iommu bypass for the ARM SMMU is with the kernel command line parameter 'arm-smmu.disable_bypass'. In general kernel command line parameters make sense for things that someone would like to tweak without rebuilding the kernel or for very basic communication

Re: [PATCH v6 0/9] vfio/mdev: IOMMU aware mediated device

2019-02-14 Thread Alex Williamson
On Wed, 13 Feb 2019 12:02:52 +0800 Lu Baolu wrote: > Hi, > > The Mediate Device is a framework for fine-grained physical device > sharing across the isolated domains. Currently the mdev framework > is designed to be independent of the platform IOMMU support. As the > result, the DMA isolation

Re: ARM64 boot failure on espressobin with 5.0.0-rc6 (1f947a7a011fcceb14cb912f5481a53b18f1879a)

2019-02-14 Thread John David Anglin
On 2019-02-14 12:58 p.m., Robin Murphy wrote: > Hmm, having felt brave enough to take a closer look, it might actually be as  > simple as this - Dave, are you able to give the diff below a spin? Yes. -- John David Anglin dave.ang...@bell.net ___

Re: ARM64 boot failure on espressobin with 5.0.0-rc6 (1f947a7a011fcceb14cb912f5481a53b18f1879a)

2019-02-14 Thread Robin Murphy
On 14/02/2019 17:36, Christoph Hellwig wrote: On Thu, Feb 14, 2019 at 05:27:41PM +, Robin Murphy wrote: Oh wow, that driver has possibly the most inventive way of passing a NULL device to the DMA API that I've ever seen, and on arm64 it will certainly have been failing since 4.2, but of

Re: ARM64 boot failure on espressobin with 5.0.0-rc6 (1f947a7a011fcceb14cb912f5481a53b18f1879a)

2019-02-14 Thread Christoph Hellwig
On Thu, Feb 14, 2019 at 05:27:41PM +, Robin Murphy wrote: > Oh wow, that driver has possibly the most inventive way of passing a NULL > device to the DMA API that I've ever seen, and on arm64 it will certainly > have been failing since 4.2, but of course there's also no error checking > for

Re: [PATCH 1/5] iommu/tegra-smmu: Fix domain_alloc

2019-02-14 Thread Thierry Reding
On Wed, Jan 16, 2019 at 12:50:10PM -0800, Navneet Kumar wrote: > * Allocate dma iova cookie for a domain while adding dma iommu > devices. > * Perform a stricter check for domain type parameter. > > Signed-off-by: Navneet Kumar > --- > drivers/iommu/tegra-smmu.c | 43

[PATCH v2 -next] swiotlb: drop pointless static qualifier in swiotlb_create_debugfs()

2019-02-14 Thread YueHaibing
There is no need to have the 'struct dentry *d_swiotlb_usage' variable static since new value always be assigned before use it. Signed-off-by: YueHaibing --- v2: fix patch title --- kernel/dma/swiotlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dma/swiotlb.c

Re: [PATCH -next] swiotlb: drop pointless static qualifier in swiotlb_dma_supported()

2019-02-14 Thread YueHaibing
On 2019/2/14 15:26, Christoph Hellwig wrote: > On Thu, Feb 14, 2019 at 01:41:47AM +, YueHaibing wrote: >> There is no need to have the 'struct dentry *d_swiotlb_usage' variable >> static since new value always be assigned before use it. > > FYI, this is in swiotlb_create_debugfs, not