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

2019-02-15 Thread Rob Clark
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 disable the iommu bypass for the ARM SMMU is > > > with the kernel command

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

2019-02-15 Thread Jean-Philippe Brucker
On 14/02/2019 20:14, Alex Williamson wrote: >> This patch series extends both IOMMU and vfio components to support >> mdev device passing through when it could be isolated and protected >> by the IOMMU units. The first part of this series (PATCH 1/09~6/09) >> adds the interfaces and implementation

[PATCH] dma-contiguous: do not allocate a single page from CMA area

2019-02-15 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: [PATCH 4/5] sparc64/pci_sun4v: allow large DMA masks

2019-02-15 Thread David Miller
From: Christoph Hellwig Date: Fri, 15 Feb 2019 15:45:58 +0100 > We've been moving to a model where the device just sets the DMA mask > supported by it, instead of having to fallback to something it thinks > the platform might support. Sparc64 is the remaining holdout forcing > drivers to supply

Re: [PATCH 3/5] sparc64/iommu: allow large DMA masks

2019-02-15 Thread David Miller
From: Christoph Hellwig Date: Fri, 15 Feb 2019 15:45:57 +0100 > We've been moving to a model where the device just sets the DMA mask > supported by it, instead of having to fallback to something it thinks > the platform might support. Sparc64 is the remaining holdout forcing > drivers to supply

Re: [RFC PATCH 1/5] iommu: Add APIs for IOMMU PASID management

2019-02-15 Thread Jean-Philippe Brucker
Hi Jacob, Lu, On 30/01/2019 19:05, Jacob Pan wrote: > On Mon, 12 Nov 2018 14:44:57 +0800 > Lu Baolu wrote: > >> This adds APIs for IOMMU drivers and device drivers to manage >> the PASIDs used for DMA transfer and translation. It bases on >> I/O ASID allocator for PASID namespace management and

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

2019-02-15 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? > > Robin. > > ->8- > diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c > index 

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

2019-02-15 Thread John David Anglin
On 2019-02-15 10:22 a.m., John David Anglin wrote: > 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? > Still crashes but in slightly different spot:

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

2019-02-15 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? Still crashes but in slightly different spot: [    0.00] Booting Linux on physical CPU

[PATCH 5/5] Documentation/DMA-API-HOWTO: update dma_mask sections

2019-02-15 Thread Christoph Hellwig
We don't require drivers to guess a DMA mask that might actually match the system capabilities any more, so fix up the documentation to clear this up. Signed-off-by: Christoph Hellwig --- Documentation/DMA-API-HOWTO.txt | 121 +++- 1 file changed, 41 insertions(+),

[PATCH 2/5] sparc64: refactor the ali DMA quirk

2019-02-15 Thread Christoph Hellwig
Do the quirk first in the dma_supported routines, as we don't need any of the other checks for it, and remove the duplicate mask checking that is already done by the callers. Signed-off-by: Christoph Hellwig --- arch/sparc/kernel/iommu.c | 7 +++--- arch/sparc/kernel/kernel.h| 6 -

allow larger than require DMA masks

2019-02-15 Thread Christoph Hellwig
Hi all, this series finishes off converting our dma mask model to split between device capabilities (dev->dma_mask and dev->coherent_dma_mask) and system limitations (dev->bus_dma_mask). We already accept larger than required masks in most dma_map_ops implementation, in case of x86 and

[PATCH 4/5] sparc64/pci_sun4v: allow large DMA masks

2019-02-15 Thread Christoph Hellwig
We've been moving to a model where the device just sets the DMA mask supported by it, instead of having to fallback to something it thinks the platform might support. Sparc64 is the remaining holdout forcing drivers to supply a matching mask. Change dma_4v_supported to just check if the supplied

[PATCH 1/5] ccio: allow large DMA masks

2019-02-15 Thread Christoph Hellwig
There is no harm in setting a 64-bit mask even if we don't need it, and the current ccio code is one of the few place in the kernel still rejecting larger than required DMA masks. Signed-off-by: Christoph Hellwig --- drivers/parisc/ccio-dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 3/5] sparc64/iommu: allow large DMA masks

2019-02-15 Thread Christoph Hellwig
We've been moving to a model where the device just sets the DMA mask supported by it, instead of having to fallback to something it thinks the platform might support. Sparc64 is the remaining holdout forcing drivers to supply a matching mask. Change dma_4u_supported to just check if the supplied

Re: [PATCH] iommu/ipmmu-vmsa: fix device reference leaks

2019-02-15 Thread Wen Yang
Hi > > > diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c > > > index 7a4529c..cebf56d 100644 > > > --- a/drivers/iommu/ipmmu-vmsa.c > > > +++ b/drivers/iommu/ipmmu-vmsa.c > > > @@ -756,6 +756,9 @@ static int ipmmu_init_platform_device(struct device > > > *dev, > > > > > >