Re: [PATCH 27/37] iommu/arm-smmu-v3: Register fault workqueue

2018-03-21 Thread Yisheng Xie
Hi Jean, On 2018/3/21 21:24, Jean-Philippe Brucker wrote: > Hi Yisheng, > > On 19/03/18 11:03, Yisheng Xie wrote: >> Hi Jean, >> >> [...] >>> @@ -3168,6 +3260,13 @@ static int arm_smmu_device_probe(struct >>> platform_device *pdev) >>> if (ret) >>> return ret; >>> >>> + if

Re: [PATCH] iommu/mediatek: Fix protect memory setting

2018-03-21 Thread Yong Wu
On Wed, 2018-03-21 at 06:14 -0500, Joerg Roedel wrote: > On Wed, Mar 21, 2018 at 01:18:24PM +0800, Yong Wu wrote: > > On Tue, 2018-03-20 at 13:57 -0500, Joerg Roedel wrote: > > > On Sun, Mar 18, 2018 at 09:52:54AM +0800, Yong Wu wrote: > > > > To avoid adding this complex macro or a new function,

Re: [PATCH v2 2/2] drivers: remove force dma flag from buses

2018-03-21 Thread Greg KH
On Wed, Mar 21, 2018 at 04:28:46PM +, Nipun Gupta wrote: > > > > -Original Message- > > From: Greg KH [mailto:gre...@linuxfoundation.org] > > Sent: Wednesday, March 21, 2018 15:05 > > To: Nipun Gupta > > Cc: robin.mur...@arm.com; h...@lst.de;

Re: [PATCH v5 0/7] vfio/type1: Add support for valid iova list management

2018-03-21 Thread Alex Williamson
On Wed, 21 Mar 2018 03:28:16 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, March 21, 2018 6:55 AM > > > > On Mon, 19 Mar 2018 08:28:32 + > > "Tian, Kevin" wrote: > > > > > > From:

Re: [PATCH v5 2/7] vfio/type1: Check reserve region conflict and update iova list

2018-03-21 Thread Alex Williamson
On Wed, 21 Mar 2018 03:30:29 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, March 21, 2018 6:38 AM > > > > On Mon, 19 Mar 2018 07:51:58 + > > "Tian, Kevin" wrote: > > > > > > From:

RE: [PATCH v2 2/2] drivers: remove force dma flag from buses

2018-03-21 Thread Nipun Gupta
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Wednesday, March 21, 2018 15:05 > To: Nipun Gupta > Cc: robin.mur...@arm.com; h...@lst.de; li...@armlinux.org.uk; > m.szyprow...@samsung.com; bhelg...@google.com; zaj...@gmail.com; >

RE: [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-21 Thread Nipun Gupta
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Wednesday, March 21, 2018 15:00 > > +int dma_configure(struct device *dev) > > +{ > > + if (dev->bus->dma_configure) > > + return dev->bus->dma_configure(dev); > > + > > + return 0; > > +} >

Re: use generic dma-direct and swiotlb code for x86 V3

2018-03-21 Thread Konrad Rzeszutek Wilk
On Tue, Mar 20, 2018 at 04:16:00PM +0100, Christoph Hellwig wrote: > On Tue, Mar 20, 2018 at 11:25:21AM +, Konrad Rzeszutek Wilk wrote: > > Are you testing with swiotlb=force? > > I've done swiotlb=force testing with earlier versions, and otherwise > relied on a VM with more the 4gb of memory

Re: [PATCH 1/4] iommu: Add virtio-iommu driver

2018-03-21 Thread Robin Murphy
On 21/03/18 13:14, Jean-Philippe Brucker wrote: On 21/03/18 06:43, Tian, Kevin wrote: [...] + +#include + +#define MSI_IOVA_BASE 0x800 +#define MSI_IOVA_LENGTH0x10 this is ARM specific, and according to virtio-iommu spec isn't it better probed

Re: [PATCH 37/37] vfio: Add support for Shared Virtual Addressing

2018-03-21 Thread Jean-Philippe Brucker
On 19/03/18 09:47, Yisheng Xie wrote: > Hi Jean, > > vfio can be compiled as module, however you use some functions which are not > exported. Oh right. I remember the kbuild test robot warning about this once, I wonder why it didn't find this one. > comment inline: > > [...] >> Add two new

Re: [PATCH 27/37] iommu/arm-smmu-v3: Register fault workqueue

2018-03-21 Thread Jean-Philippe Brucker
Hi Yisheng, On 19/03/18 11:03, Yisheng Xie wrote: > Hi Jean, > > [...] >> @@ -3168,6 +3260,13 @@ static int arm_smmu_device_probe(struct >> platform_device *pdev) >> if (ret) >> return ret; >> >> +if (smmu->features & (ARM_SMMU_FEAT_STALLS | ARM_SMMU_FEAT_PRI)) { >> +

Re: [PATCH 1/4] iommu: Add virtio-iommu driver

2018-03-21 Thread Jean-Philippe Brucker
On 21/03/18 06:43, Tian, Kevin wrote: [...] >> + >> +#include >> + >> +#define MSI_IOVA_BASE 0x800 >> +#define MSI_IOVA_LENGTH 0x10 > > this is ARM specific, and according to virtio-iommu spec isn't it > better probed on the endpoint instead of

Re: [PATCH] iommu/mediatek: Fix protect memory setting

2018-03-21 Thread Joerg Roedel
On Wed, Mar 21, 2018 at 01:18:24PM +0800, Yong Wu wrote: > On Tue, 2018-03-20 at 13:57 -0500, Joerg Roedel wrote: > > On Sun, Mar 18, 2018 at 09:52:54AM +0800, Yong Wu wrote: > > > To avoid adding this complex macro or a new function, I put > > > it in the code and backup its value in the suspend

Re: [PATCH v2 2/2] drivers: remove force dma flag from buses

2018-03-21 Thread Greg KH
On Wed, Mar 21, 2018 at 12:25:23PM +0530, Nipun Gupta wrote: > With each bus implementing its own DMA configuration callback, > there is no need for bus to explicitly have force_dma in its > global structure. This patch modifies of_dma_configure API to > accept an input parameter which specifies

Re: [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-21 Thread Greg KH
On Wed, Mar 21, 2018 at 12:25:22PM +0530, Nipun Gupta wrote: > It's bus specific aspect to map a given device on the bus and > relevant firmware description of its DMA configuration. > So, this change introduces '/dma_configure/' as bus callback > giving flexibility to busses for implementing its

RE: [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-21 Thread Nipun Gupta
> -Original Message- > From: Bharat Bhushan > Sent: Wednesday, March 21, 2018 12:49 > > > > +int dma_configure(struct device *dev) > > +{ > > + if (dev->bus->dma_configure) > > + return dev->bus->dma_configure(dev); > > What if dma_common_configure() is called in case

RE: [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-21 Thread Bharat Bhushan
> -Original Message- > From: Nipun Gupta > Sent: Wednesday, March 21, 2018 12:25 PM > To: robin.mur...@arm.com; h...@lst.de; li...@armlinux.org.uk; > gre...@linuxfoundation.org; m.szyprow...@samsung.com > Cc: bhelg...@google.com; zaj...@gmail.com; andy.gr...@linaro.org; >

[PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-21 Thread Nipun Gupta
It's bus specific aspect to map a given device on the bus and relevant firmware description of its DMA configuration. So, this change introduces '/dma_configure/' as bus callback giving flexibility to busses for implementing its own dma configuration function. The change eases the addition of new

[PATCH v2 2/2] drivers: remove force dma flag from buses

2018-03-21 Thread Nipun Gupta
With each bus implementing its own DMA configuration callback, there is no need for bus to explicitly have force_dma in its global structure. This patch modifies of_dma_configure API to accept an input parameter which specifies if implicit DMA configuration is required even when it is not

RE: [PATCH 1/4] iommu: Add virtio-iommu driver

2018-03-21 Thread Tian, Kevin
> From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > Sent: Wednesday, February 14, 2018 10:54 PM > > The virtio IOMMU is a para-virtualized device, allowing to send IOMMU > requests such as map/unmap over virtio-mmio transport without > emulating > page tables. This