RE: [PATCH v2 1/3] dma-mapping: introduce new dma unmap and sync api variants

2019-10-29 Thread Laurentiu Tudor
> -Original Message- > From: h...@lst.de > Sent: Monday, October 28, 2019 2:38 PM > > On Thu, Oct 24, 2019 at 12:41:41PM +, Laurentiu Tudor wrote: > > From: Laurentiu Tudor > > > > Introduce a few new dma unmap and sync variants that, on top of the > > original variants, return

[PATCH v7 0/3] Add uacce module for Accelerator

2019-10-29 Thread Zhangfei Gao
Uacce (Unified/User-space-access-intended Accelerator Framework) targets to provide Shared Virtual Addressing (SVA) between accelerators and processes. So accelerator can access any data structure of the main cpu. This differs from the data sharing between cpu and io device, which share data

Re: [PATCH v2] iommu/arm-smmu: fix "hang" when games exit

2019-10-29 Thread Rob Clark
On Mon, Oct 28, 2019 at 3:20 PM Will Deacon wrote: > > Hi Rob, > > On Mon, Oct 07, 2019 at 01:49:06PM -0700, Rob Clark wrote: > > From: Rob Clark > > > > When games, browser, or anything using a lot of GPU buffers exits, there > > can be many hundreds or thousands of buffers to unmap and free.

[PATCH v7 2/3] uacce: add uacce driver

2019-10-29 Thread Zhangfei Gao
From: Kenneth Lee Uacce (Unified/User-space-access-intended Accelerator Framework) targets to provide Shared Virtual Addressing (SVA) between accelerators and processes. So accelerator can access any data structure of the main cpu. This differs from the data sharing between cpu and io device,

[PATCH v7 1/3] uacce: Add documents for uacce

2019-10-29 Thread Zhangfei Gao
From: Kenneth Lee Uacce (Unified/User-space-access-intended Accelerator Framework) is a kernel module targets to provide Shared Virtual Addressing (SVA) between the accelerator and process. This patch add document to explain how it works. Signed-off-by: Kenneth Lee Signed-off-by: Zaibo Xu

[PATCH v7 3/3] crypto: hisilicon - register zip engine to uacce

2019-10-29 Thread Zhangfei Gao
Register qm to uacce framework for user crypto driver Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 253 ++-- drivers/crypto/hisilicon/qm.h | 13 +- drivers/crypto/hisilicon/zip/zip_main.c | 39 ++---

RE: [PATCH v7 09/11] iommu/vt-d: Add bind guest PASID support

2019-10-29 Thread Tian, Kevin
> From: Jacob Pan [mailto:jacob.jun@linux.intel.com] > Sent: Tuesday, October 29, 2019 12:03 AM > > On Mon, 28 Oct 2019 06:03:36 + > "Tian, Kevin" wrote: > > > > > > + .sva_bind_gpasid= intel_svm_bind_gpasid, > > > > > + .sva_unbind_gpasid = intel_svm_unbind_gpasid,

Re: [BUG] dma-ranges, reserved memory regions, dma_alloc_coherent: possible bug?

2019-10-29 Thread Daniele Alessandrelli
On Mon, Oct 28, 2019 at 10:59 AM Vladimir Murzin wrote: > > @Daniele, it'd be handy to know if that fix issue for you... > Apologies, I've been traveling for the last few days and haven't managed to try it yet. I'll do it later today though and let you know. Regards, Daniele

Re: [PATCH v2] iommu/arm-smmu: fix "hang" when games exit

2019-10-29 Thread Will Deacon
On Mon, Oct 28, 2019 at 10:51:53PM +, Robin Murphy wrote: > On 2019-10-28 10:38 pm, Rob Clark wrote: > > On Mon, Oct 28, 2019 at 3:20 PM Will Deacon wrote: > > > On Mon, Oct 07, 2019 at 01:49:06PM -0700, Rob Clark wrote: > > > > From: Rob Clark > > > > > > > > When games, browser, or

RE: [PATCH v7 02/11] iommu/vt-d: Enlightened PASID allocation

2019-10-29 Thread Tian, Kevin
> From: Jacob Pan [mailto:jacob.jun@linux.intel.com] > Sent: Wednesday, October 30, 2019 1:15 AM > > > > > > From: Lu Baolu > > > > > > Enabling IOMMU in a guest requires communication with the host > > > driver for certain aspects. Use of PASID ID to enable Shared Virtual > > > Addressing

RE: [PATCH v7 11/11] iommu/vt-d: Add svm/sva invalidate function

2019-10-29 Thread Tian, Kevin
> From: Jacob Pan [mailto:jacob.jun@linux.intel.com] > Sent: Tuesday, October 29, 2019 12:11 AM > > On Mon, 28 Oct 2019 06:06:33 + > "Tian, Kevin" wrote: > > > > >>> +    /* PASID based dev TLBs, only support all PASIDs or single > > > >>> PASID */ > > > >>> +    {1, 1, 0}, > > > >> > >

Re: [PATCH v7 11/11] iommu/vt-d: Add svm/sva invalidate function

2019-10-29 Thread Jacob Pan
On Tue, 29 Oct 2019 18:52:01 + "Tian, Kevin" wrote: > > From: Jacob Pan [mailto:jacob.jun@linux.intel.com] > > Sent: Tuesday, October 29, 2019 12:11 AM > > > > On Mon, 28 Oct 2019 06:06:33 + > > "Tian, Kevin" wrote: > > > > > > >>> +    /* PASID based dev TLBs, only support all

RE: [PATCH v7 09/11] iommu/vt-d: Add bind guest PASID support

2019-10-29 Thread Tian, Kevin
> From: Jacob Pan [mailto:jacob.jun@linux.intel.com] > Sent: Wednesday, October 30, 2019 12:12 AM > > On Tue, 29 Oct 2019 07:57:21 + > "Tian, Kevin" wrote: > > > > From: Jacob Pan [mailto:jacob.jun@linux.intel.com] > > > Sent: Tuesday, October 29, 2019 12:03 AM > > > > > > On Mon,

Re: [PATCH v7 09/11] iommu/vt-d: Add bind guest PASID support

2019-10-29 Thread Jacob Pan
On Tue, 29 Oct 2019 07:57:21 + "Tian, Kevin" wrote: > > From: Jacob Pan [mailto:jacob.jun@linux.intel.com] > > Sent: Tuesday, October 29, 2019 12:03 AM > > > > On Mon, 28 Oct 2019 06:03:36 + > > "Tian, Kevin" wrote: > > > > > > > > + .sva_bind_gpasid=

Re: [BUG] dma-ranges, reserved memory regions, dma_alloc_coherent: possible bug?

2019-10-29 Thread Daniele Alessandrelli
On Tue, Oct 29, 2019 at 9:43 AM Daniele Alessandrelli wrote: > > On Mon, Oct 28, 2019 at 10:59 AM Vladimir Murzin > wrote: > > > > @Daniele, it'd be handy to know if that fix issue for you... > > > > Apologies, I've been traveling for the last few days and haven't > managed to try it yet. > >

Re: [PATCH v7 02/11] iommu/vt-d: Enlightened PASID allocation

2019-10-29 Thread Jacob Pan
On Fri, 25 Oct 2019 06:19:29 + "Tian, Kevin" wrote: > > From: Jacob Pan [mailto:jacob.jun@linux.intel.com] > > Sent: Friday, October 25, 2019 3:55 AM > > > > From: Lu Baolu > > > > Enabling IOMMU in a guest requires communication with the host > > driver for certain aspects. Use of

[PATCH v4 1/2] dma-mapping: Add vmap checks to dma_map_single()

2019-10-29 Thread Kees Cook
As we've seen from USB and other areas[1], we need to always do runtime checks for DMA operating on memory regions that might be remapped. This adds vmap checks (similar to those already in USB but missing in other places) into dma_map_single() so all callers benefit from the checking. [1]

[PATCH v4 0/2] dma-mapping: Add vmap checks to dma_map_single()

2019-10-29 Thread Kees Cook
v4: use dev_WARN_ONCE() and improve report string (gregkh, robin) v3: https://lore.kernel.org/lkml/20191010222829.21940-1-keesc...@chromium.org v2: https://lore.kernel.org/lkml/201910041420.F6E55D29A@keescook v1: https://lore.kernel.org/lkml/201910021341.7819A660@keescook Duplicating patch 1

[PATCH v4 2/2] usb: core: Remove redundant vmap checks

2019-10-29 Thread Kees Cook
Now that the vmap area checks are being performed in the DMA infrastructure directly, there is no need to repeat them in USB. Signed-off-by: Kees Cook --- drivers/usb/core/hcd.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/usb/core/hcd.c