Re: [PATCH] ia64: fix barrier placement for write* / dma mapping

2018-08-01 Thread Christoph Hellwig
On Tue, Jul 31, 2018 at 11:41:23PM -0700, ok...@codeaurora.org wrote: > I asked this question to Tony Luck before. If I remember right, > his answer was: > > CPU guarantees outstanding writes to be flushed when a register write > instruction is executed and an additional barrier instruction is not

Re: [PATCH] ia64: fix barrier placement for write* / dma mapping

2018-08-01 Thread Sinan Kaya
On 8/1/2018 12:29 AM, Christoph Hellwig wrote: I asked this question to Tony Luck before. If I remember right, his answer was: CPU guarantees outstanding writes to be flushed when a register write instruction is executed and an additional barrier instruction is not needed. That would be great.

[RFC PATCH 0/7] A General Accelerator Framework, WarpDrive

2018-08-01 Thread Kenneth Lee
From: Kenneth Lee WarpDrive is an accelerator framework to expose the hardware capabilities directly to the user space. It makes use of the exist vfio and vfio-mdev facilities. So the user application can send request and DMA to the hardware without interaction with the kernel. This remove the la

[RFC PATCH 1/7] vfio/spimdev: Add documents for WarpDrive framework

2018-08-01 Thread Kenneth Lee
From: Kenneth Lee WarpDrive is a common user space accelerator framework. Its main component in Kernel is called spimdev, Share Parent IOMMU Mediated Device. It exposes the hardware capabilities to the user space via vfio-mdev. So processes in user land can obtain a "queue" by open the device an

[RFC PATCH 2/7] iommu: Add share domain interface in iommu for spimdev

2018-08-01 Thread Kenneth Lee
From: Kenneth Lee This patch add sharing interface for a iommu_group. The new interface: iommu_group_share_domain() iommu_group_unshare_domain() can be used by some virtual iommu_group (such as iommu_group for spimdev) to share their parent's iommu_group. When the domain of the

[RFC PATCH 3/7] vfio: add spimdev support

2018-08-01 Thread Kenneth Lee
From: Kenneth Lee SPIMDEV is "Share Parent IOMMU Mdev". It is a vfio-mdev. But differ from the general vfio-mdev: 1. It shares its parent's IOMMU. 2. There is no hardware resource attached to the mdev is created. The hardware resource (A `queue') is allocated only when the mdev is opened. Curre

[RFC PATCH 4/7] crypto: add hisilicon Queue Manager driver

2018-08-01 Thread Kenneth Lee
From: Kenneth Lee Hisilicon QM is a general IP used by some Hisilicon accelerators. It provides a general PCIE interface for the CPU and the accelerator to share a group of queues. This commit includes a library used by the accelerator driver to access the QM hardware. Signed-off-by: Kenneth Le

[RFC PATCH 5/7] crypto: Add Hisilicon Zip driver

2018-08-01 Thread Kenneth Lee
From: Kenneth Lee The Hisilicon ZIP accelerator implements zlib and gzip algorithm support for the software. It uses Hisilicon QM as the interface to the CPU, so it is shown up as a PCIE device to the CPU with a group of queues. This commit provides PCIE driver to the accelerator and register it

[RFC PATCH 6/7] crypto: add spimdev support to Hisilicon QM

2018-08-01 Thread Kenneth Lee
From: Kenneth Lee The commit add spimdev support to the Hislicon QM driver, any accelerator that use QM can share its queues to the user space. Signed-off-by: Kenneth Lee Signed-off-by: Zhou Wang Signed-off-by: Hao Fang Signed-off-by: Zaibo Xu --- drivers/crypto/hisilicon/qm.c | 150 +++

[RFC PATCH 7/7] vfio/spimdev: add user sample for spimdev

2018-08-01 Thread Kenneth Lee
From: Kenneth Lee This is the sample code to demostrate how WrapDrive user application should be. It contains: 1. wd.[ch], the common library to provide WrapDrive interface. 2. drv/*, the user driver to access the hardware upon spimdev 3. test/*, the test application to use WrapDrive interface

DMA related cleanups for IA64

2018-08-01 Thread Christoph Hellwig
Hi all, this is a resend of the last two series plus additional cleanups. The driver of it were the odd dma barriers in the ia64 sync_single_* methods, but once I started to look into that area the fallback got bigger and bigger.. ___ iommu mailing list

[PATCH 1/9] ia64: remove the kern_mem_attribute export

2018-08-01 Thread Christoph Hellwig
No actually used anywhere. Signed-off-by: Christoph Hellwig --- arch/ia64/kernel/efi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 9c09bf390cce..f77d80edddfe 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c @@ -842,7 +8

[PATCH 2/9] ia64: remove the dead iommu_sac_force variable

2018-08-01 Thread Christoph Hellwig
Looks like copy and paste from x86 that never actually got used. Signed-off-by: Christoph Hellwig --- arch/ia64/kernel/pci-dma.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c index b5df084c0af4..50b6ad282a90 100644

[PATCH 3/9] ia64: remove iommu_dma_supported

2018-08-01 Thread Christoph Hellwig
The generic dma_direct_supported helper already used by intel-iommu on x86 does a better job than the ia64 reimplementation. Signed-off-by: Christoph Hellwig --- arch/ia64/kernel/pci-dma.c | 13 - drivers/iommu/intel-iommu.c | 2 -- 2 files changed, 15 deletions(-) diff --git a/ar

[PATCH 4/9] ia64: remove the unused bad_dma_address symbol

2018-08-01 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- arch/ia64/kernel/pci-dma.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c index 3c2884bef3d4..924966e5aa25 100644 --- a/arch/ia64/kernel/pci-dma.c +++ b/arch/ia64/kernel/pci-dma.c @@ -15,9 +15,6 @@

[PATCH 5/9] ia64: remove the unused pci_iommu_shutdown function

2018-08-01 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- arch/ia64/include/asm/iommu.h | 1 - arch/ia64/kernel/pci-dma.c| 5 - 2 files changed, 6 deletions(-) diff --git a/arch/ia64/include/asm/iommu.h b/arch/ia64/include/asm/iommu.h index 156b9d8e1932..5397e5aa3704 100644 --- a/arch/ia64/include/asm/iommu.

[PATCH 7/9] ia64/sn2: remove no-ops dma sync methods

2018-08-01 Thread Christoph Hellwig
These do nothing but duplicating an assert that would have triggered earlier on setting the dma mask, so remove them. Signed-off-by: Christoph Hellwig --- arch/ia64/sn/pci/pci_dma.c | 29 - 1 file changed, 29 deletions(-) diff --git a/arch/ia64/sn/pci/pci_dma.c b/arc

[PATCH 6/9] ia64: remove the unused iommu_dma_init function

2018-08-01 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- arch/ia64/include/asm/iommu.h | 1 - arch/ia64/kernel/pci-dma.c| 6 -- 2 files changed, 7 deletions(-) diff --git a/arch/ia64/include/asm/iommu.h b/arch/ia64/include/asm/iommu.h index 5397e5aa3704..7429a72f3f92 100644 --- a/arch/ia64/include/asm/iommu

[PATCH 9/9] intel-iommu: mark intel_dma_ops static

2018-08-01 Thread Christoph Hellwig
ia64 currently explicitly assigns it to dma_ops, but that same work is already done by intel_iommu_init a little later, so we can remove the duplicate assignment and mark the variable static. Signed-off-by: Christoph Hellwig --- arch/ia64/kernel/pci-dma.c | 4 drivers/iommu/intel-iommu.c |

[PATCH 8/9] ia64: remove machvec_dma_sync_{single,sg}

2018-08-01 Thread Christoph Hellwig
The original form of these was added (to the HP zx1 platform only) by the following bitkeeper commit (by the way of the historic.git tree): commit 66b99421d118a5ddd98a72913670b0fcf0a38d45 Author: Andrew Morton Date: Sat Mar 13 17:05:37 2004 -0800 [PATCH] DMA: Fill gaping hole in DMA API in

Re: [RFC PATCH 3/7] vfio: add spimdev support

2018-08-01 Thread Randy Dunlap
On 08/01/2018 03:22 AM, Kenneth Lee wrote: > From: Kenneth Lee > > SPIMDEV is "Share Parent IOMMU Mdev". It is a vfio-mdev. But differ from > the general vfio-mdev: > > 1. It shares its parent's IOMMU. > 2. There is no hardware resource attached to the mdev is created. The > hardware resource (A

Re: [RFC PATCH 0/7] A General Accelerator Framework, WarpDrive

2018-08-01 Thread Jerome Glisse
On Wed, Aug 01, 2018 at 06:22:14PM +0800, Kenneth Lee wrote: > From: Kenneth Lee > > WarpDrive is an accelerator framework to expose the hardware capabilities > directly to the user space. It makes use of the exist vfio and vfio-mdev > facilities. So the user application can send request and DMA

Re: use the generic dma-noncoherent code for sh V3

2018-08-01 Thread Rich Felker
On Tue, Jul 31, 2018 at 09:24:13AM +0200, Christoph Hellwig wrote: > On Tue, Jul 31, 2018 at 03:06:13PM +0900, Yoshinori Sato wrote: > > On Wed, 25 Jul 2018 18:40:38 +0900, > > Christoph Hellwig wrote: > > > > > > Hi all, > > > > > > can you review these patches to switch sh to use the generic >

[PATCH] iommu/ipmmu-vmsa: convert to SPDX identifiers

2018-08-01 Thread Kuninori Morimoto
From: Kuninori Morimoto Signed-off-by: Kuninori Morimoto --- drivers/iommu/ipmmu-vmsa.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c index ee30be1..85447ec 100644 --- a/drivers/iommu/ipmmu-vmsa.c +++ b/drivers/

RE: [RFC PATCH 0/7] A General Accelerator Framework, WarpDrive

2018-08-01 Thread Tian, Kevin
> From: Jerome Glisse > Sent: Thursday, August 2, 2018 12:57 AM > > On Wed, Aug 01, 2018 at 06:22:14PM +0800, Kenneth Lee wrote: > > From: Kenneth Lee > > > > WarpDrive is an accelerator framework to expose the hardware > capabilities > > directly to the user space. It makes use of the exist vfio

RE: [RFC PATCH 0/7] A General Accelerator Framework, WarpDrive

2018-08-01 Thread Tian, Kevin
> From: Kenneth Lee > Sent: Wednesday, August 1, 2018 6:22 PM > > From: Kenneth Lee > > WarpDrive is an accelerator framework to expose the hardware capabilities > directly to the user space. It makes use of the exist vfio and vfio-mdev > facilities. So the user application can send request and

Re: [RFC PATCH 3/7] vfio: add spimdev support

2018-08-01 Thread Kenneth Lee
On Wed, Aug 01, 2018 at 09:23:52AM -0700, Randy Dunlap wrote: > Date: Wed, 1 Aug 2018 09:23:52 -0700 > From: Randy Dunlap > To: Kenneth Lee , Jonathan Corbet , > Herbert Xu , "David S . Miller" > , Joerg Roedel , Alex Williamson > , Kenneth Lee , Hao > Fang , Zhou Wang , Zaibo Xu > , Philippe

RE: [RFC PATCH 1/7] vfio/spimdev: Add documents for WarpDrive framework

2018-08-01 Thread Tian, Kevin
> From: Kenneth Lee > Sent: Wednesday, August 1, 2018 6:22 PM > > From: Kenneth Lee > > WarpDrive is a common user space accelerator framework. Its main > component > in Kernel is called spimdev, Share Parent IOMMU Mediated Device. It Not sure whether "share parent IOMMU" is a good term here.

RE: [RFC PATCH 2/7] iommu: Add share domain interface in iommu for spimdev

2018-08-01 Thread Tian, Kevin
> From: Kenneth Lee > Sent: Wednesday, August 1, 2018 6:22 PM > > From: Kenneth Lee > > This patch add sharing interface for a iommu_group. The new interface: > > iommu_group_share_domain() > iommu_group_unshare_domain() > > can be used by some virtual iommu_group (such as iommu_gr

RE: [RFC PATCH 3/7] vfio: add spimdev support

2018-08-01 Thread Tian, Kevin
> From: Kenneth Lee > Sent: Wednesday, August 1, 2018 6:22 PM > > From: Kenneth Lee > > SPIMDEV is "Share Parent IOMMU Mdev". It is a vfio-mdev. But differ from > the general vfio-mdev: > > 1. It shares its parent's IOMMU. > 2. There is no hardware resource attached to the mdev is created. The

Re: [RFC PATCH 0/7] A General Accelerator Framework, WarpDrive

2018-08-01 Thread Kenneth Lee
On Thu, Aug 02, 2018 at 02:59:33AM +, Tian, Kevin wrote: > Date: Thu, 2 Aug 2018 02:59:33 + > From: "Tian, Kevin" > To: Kenneth Lee , Jonathan Corbet , > Herbert Xu , "David S . Miller" > , Joerg Roedel , Alex Williamson > , Kenneth Lee , Hao > Fang , Zhou Wang , Zaibo Xu > , Philippe

Re: [RFC PATCH 3/7] vfio: add spimdev support

2018-08-01 Thread Kenneth Lee
On Thu, Aug 02, 2018 at 03:21:25AM +, Tian, Kevin wrote: > Date: Thu, 2 Aug 2018 03:21:25 + > From: "Tian, Kevin" > To: Kenneth Lee , Jonathan Corbet , > Herbert Xu , "David S . Miller" > , Joerg Roedel , Alex Williamson > , Kenneth Lee , Hao > Fang , Zhou Wang , Zaibo Xu > , Philippe

Re: [RFC PATCH 0/7] A General Accelerator Framework, WarpDrive

2018-08-01 Thread Kenneth Lee
On Thu, Aug 02, 2018 at 02:33:12AM +, Tian, Kevin wrote: > Date: Thu, 2 Aug 2018 02:33:12 + > From: "Tian, Kevin" > To: Jerome Glisse , Kenneth Lee > CC: Hao Fang , Herbert Xu > , "k...@vger.kernel.org" > , Jonathan Corbet , Greg > Kroah-Hartman , "linux-...@vger.kernel.org" > , "Kuma

Re: [RFC PATCH 2/7] iommu: Add share domain interface in iommu for spimdev

2018-08-01 Thread Kenneth Lee
On Thu, Aug 02, 2018 at 03:17:03AM +, Tian, Kevin wrote: > Date: Thu, 2 Aug 2018 03:17:03 + > From: "Tian, Kevin" > To: Kenneth Lee , Jonathan Corbet , > Herbert Xu , "David S . Miller" > , Joerg Roedel , Alex Williamson > , Kenneth Lee , Hao > Fang , Zhou Wang , Zaibo Xu > , Philippe

Re: [RFC PATCH 1/7] vfio/spimdev: Add documents for WarpDrive framework

2018-08-01 Thread Kenneth Lee
On Thu, Aug 02, 2018 at 03:14:38AM +, Tian, Kevin wrote: > Date: Thu, 2 Aug 2018 03:14:38 + > From: "Tian, Kevin" > To: Kenneth Lee , Jonathan Corbet , > Herbert Xu , "David S . Miller" > , Joerg Roedel , Alex Williamson > , Kenneth Lee , Hao > Fang , Zhou Wang , Zaibo Xu > , Philippe

RE: [RFC PATCH 3/7] vfio: add spimdev support

2018-08-01 Thread Tian, Kevin
> From: Kenneth Lee [mailto:liguo...@hisilicon.com] > Sent: Thursday, August 2, 2018 11:47 AM > > > > > > From: Kenneth Lee > > > Sent: Wednesday, August 1, 2018 6:22 PM > > > > > > From: Kenneth Lee > > > > > > SPIMDEV is "Share Parent IOMMU Mdev". It is a vfio-mdev. But differ > from > > > the

RE: [RFC PATCH 0/7] A General Accelerator Framework, WarpDrive

2018-08-01 Thread Tian, Kevin
> From: Kenneth Lee > Sent: Thursday, August 2, 2018 11:40 AM > > On Thu, Aug 02, 2018 at 02:59:33AM +, Tian, Kevin wrote: > > > From: Kenneth Lee > > > Sent: Wednesday, August 1, 2018 6:22 PM > > > > > > From: Kenneth Lee > > > > > > WarpDrive is an accelerator framework to expose the hardwa

RE: [RFC PATCH 2/7] iommu: Add share domain interface in iommu for spimdev

2018-08-01 Thread Tian, Kevin
> From: Kenneth Lee > Sent: Thursday, August 2, 2018 12:16 PM > > On Thu, Aug 02, 2018 at 03:17:03AM +, Tian, Kevin wrote: > > > From: Kenneth Lee > > > Sent: Wednesday, August 1, 2018 6:22 PM > > > > > > From: Kenneth Lee > > > > > > This patch add sharing interface for a iommu_group. The ne

RE: [RFC PATCH 1/7] vfio/spimdev: Add documents for WarpDrive framework

2018-08-01 Thread Tian, Kevin
> From: Kenneth Lee > Sent: Thursday, August 2, 2018 12:23 PM > > On Thu, Aug 02, 2018 at 03:14:38AM +, Tian, Kevin wrote: > > > > > From: Kenneth Lee > > > Sent: Wednesday, August 1, 2018 6:22 PM > > > > > > From: Kenneth Lee > > > > > > WarpDrive is a common user space accelerator framework

Re: [RFC PATCH 0/7] A General Accelerator Framework, WarpDrive

2018-08-01 Thread Kenneth Lee
On Thu, Aug 02, 2018 at 04:36:52AM +, Tian, Kevin wrote: > Date: Thu, 2 Aug 2018 04:36:52 + > From: "Tian, Kevin" > To: Kenneth Lee > CC: Kenneth Lee , Herbert Xu > , "k...@vger.kernel.org" > , Jonathan Corbet , Greg > Kroah-Hartman , "linux-...@vger.kernel.org" > , "Kumar, Sanjay K"