Re: [PATCH 2/2] iommu/vt-d: Replace intel SVM APIs with generic SVA APIs

2020-02-25 Thread Christoph Hellwig
On Mon, Feb 24, 2020 at 03:26:37PM -0800, Jacob Pan wrote: > This patch is an initial step to replace Intel SVM code with the > following IOMMU SVA ops: > intel_svm_bind_mm() => iommu_sva_bind_device() > intel_svm_unbind_mm() => iommu_sva_unbind_device() > intel_svm_is_pasid_valid() =>

Re: [PATCH] MAINTAINERS: add maintainers for uacce

2020-02-25 Thread Dave Jiang
On 2/24/20 11:17 PM, Zhangfei Gao wrote: Add Zhangfei Gao and Zhou Wang as maintainers for uacce Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 38fe2f3..22e647f 100644

Re: [PATCH 1/2] mm: move force_dma_unencrypted() to mem_encrypt.h

2020-02-25 Thread Cornelia Huck
On Mon, 24 Feb 2020 19:49:53 +0100 Halil Pasic wrote: > On Mon, 24 Feb 2020 14:33:14 +1100 > David Gibson wrote: > > > On Fri, Feb 21, 2020 at 07:07:02PM +0100, Halil Pasic wrote: > > > On Fri, 21 Feb 2020 10:48:15 -0500 > > > "Michael S. Tsirkin" wrote: > > > > > > > On Fri, Feb 21,

Re: [RFC PATCH 06/11] iommu: arm-smmu: Remove Calxeda secure mode quirk

2020-02-25 Thread Rob Herring
On Tue, Feb 18, 2020 at 11:20 AM Will Deacon wrote: > > On Tue, Feb 18, 2020 at 11:13:16AM -0600, Rob Herring wrote: > > Cc: Will Deacon > > Cc: Robin Murphy > > Cc: Joerg Roedel > > Cc: iommu@lists.linux-foundation.org > > Signed-off-by: Rob Herring > > --- > > Do not apply yet. > >

Re: [PATCH] MAINTAINERS: add maintainers for uacce

2020-02-25 Thread Dave Jiang
On 2/25/20 6:11 PM, zhangfei wrote: On 2020/2/26 上午12:02, Dave Jiang wrote: On 2/24/20 11:17 PM, Zhangfei Gao wrote: Add Zhangfei Gao and Zhou Wang as maintainers for uacce Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang ---   MAINTAINERS | 10 ++   1 file changed, 10

Re: [PATCH] MAINTAINERS: add maintainers for uacce

2020-02-25 Thread zhangfei
On 2020/2/26 上午12:02, Dave Jiang wrote: On 2/24/20 11:17 PM, Zhangfei Gao wrote: Add Zhangfei Gao and Zhou Wang as maintainers for uacce Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang ---   MAINTAINERS | 10 ++   1 file changed, 10 insertions(+) diff --git a/MAINTAINERS

Re: [RESEND,PATCH 03/13] iommu/mediatek: Add mtk_iommu_pgtable structure

2020-02-25 Thread chao hao
On Sat, 2020-02-15 at 20:17 +0800, Yong Wu wrote: > On Tue, 2019-12-31 at 17:39 +0800, chao hao wrote: > > On Mon, 2019-12-16 at 20:13 +0800, Yong Wu wrote: > > > On Mon, 2019-11-04 at 19:52 +0800, Chao Hao wrote: > > > > Start with this patch, we will change the SW architecture > > > > to support

[PATCH v2] MAINTAINERS: add maintainers for uacce

2020-02-25 Thread Zhangfei Gao
Add Zhangfei Gao and Zhou Wang as maintainers for uacce Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- Add list, suggested by Dave MAINTAINERS | 12 1 file changed, 12 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 38fe2f3..b5bdef8 100644 --- a/MAINTAINERS

Re: [PATCH v4 03/26] iommu: Add a page fault handler

2020-02-25 Thread Xu Zaibo
Hi, On 2020/2/25 17:25, Jean-Philippe Brucker wrote: Hi Zaibo, On Tue, Feb 25, 2020 at 11:30:05AM +0800, Xu Zaibo wrote: +struct iopf_queue * +iopf_queue_alloc(const char *name, iopf_queue_flush_t flush, void *cookie) +{ + struct iopf_queue *queue; + + queue =

[PATCH v2] uacce: unmap remaining mmapping from user space

2020-02-25 Thread Zhangfei Gao
When uacce parent device module is removed, user app may still keep the mmaped area, which can be accessed unsafely. When rmmod, Parent device driver will call uacce_remove, which unmap all remaining mapping from user space for safety. VM_FAULT_SIGBUS is also reported to user space accordingly.

Re: [PATCH 2/2] iommu/vt-d: Replace intel SVM APIs with generic SVA APIs

2020-02-25 Thread Jean-Philippe Brucker
On Tue, Feb 25, 2020 at 11:10:34AM -0800, Christoph Hellwig wrote: > On Mon, Feb 24, 2020 at 03:26:37PM -0800, Jacob Pan wrote: > > This patch is an initial step to replace Intel SVM code with the > > following IOMMU SVA ops: > > intel_svm_bind_mm() => iommu_sva_bind_device() > >

Re: [PATCH] uacce: unmap remaining mmapping from user space

2020-02-25 Thread zhangfei
Hi, Zaibo On 2020/2/24 下午3:17, Xu Zaibo wrote:   @@ -585,6 +595,13 @@ void uacce_remove(struct uacce_device *uacce)   cdev_device_del(uacce->cdev, >dev);   xa_erase(_xa, uacce->dev_id);   put_device(>dev); + +    /* + * unmap remainning mapping from user space, preventing

Re: [PATCH v12 2/4] uacce: add uacce driver

2020-02-25 Thread zhangfei
Hi, Raj On 2020/2/25 上午2:22, Raj, Ashok wrote: Hi Kenneth, sorry for waking up late on this patchset. + +static int uacce_fops_open(struct inode *inode, struct file *filep) +{ + struct uacce_mm *uacce_mm = NULL; + struct uacce_device *uacce; + struct uacce_queue *q; +

Re: [PATCH 5/5] openrisc: use the generic in-place uncached DMA allocator

2020-02-25 Thread Stafford Horne
On Mon, Feb 24, 2020 at 11:44:45AM -0800, Christoph Hellwig wrote: > Switch openrisc to use the dma-direct allocator and just provide the > hooks for setting memory uncached or cached. > > Signed-off-by: Christoph Hellwig Reviewed-by: Stafford Horne I also test booted this series with linux

Re: [PATCH v4 01/26] mm/mmu_notifiers: pass private data down to alloc_notifier()

2020-02-25 Thread Jean-Philippe Brucker
On Mon, Feb 24, 2020 at 03:00:56PM -0400, Jason Gunthorpe wrote: > On Mon, Feb 24, 2020 at 07:23:36PM +0100, Jean-Philippe Brucker wrote: > > The new allocation scheme introduced by 2c7933f53f6b ("mm/mmu_notifiers: > > add a get/put scheme for the registration") provides a convenient way > > for

Re: [PATCH v4 03/26] iommu: Add a page fault handler

2020-02-25 Thread Jean-Philippe Brucker
Hi Zaibo, On Tue, Feb 25, 2020 at 11:30:05AM +0800, Xu Zaibo wrote: > > +struct iopf_queue * > > +iopf_queue_alloc(const char *name, iopf_queue_flush_t flush, void *cookie) > > +{ > > + struct iopf_queue *queue; > > + > > + queue = kzalloc(sizeof(*queue), GFP_KERNEL); > > + if (!queue) > >

Re: [PATCH 2/2] openrisc: use the generic in-place uncached DMA allocator

2020-02-25 Thread Stafford Horne
On Mon, Feb 24, 2020 at 08:45:28PM +0100, Christoph Hellwig wrote: > On Sat, Feb 22, 2020 at 07:14:47AM +0900, Stafford Horne wrote: > > On Thu, Feb 20, 2020 at 09:01:39AM -0800, Christoph Hellwig wrote: > > > Switch openrisc to use the dma-direct allocator and just provide the > > > hooks for

Re: [PATCH] uacce: unmap remaining mmapping from user space

2020-02-25 Thread Xu Zaibo
Hi, On 2020/2/25 16:33, zhangfei wrote: Hi, Zaibo On 2020/2/24 下午3:17, Xu Zaibo wrote: @@ -585,6 +595,13 @@ void uacce_remove(struct uacce_device *uacce) cdev_device_del(uacce->cdev, >dev); xa_erase(_xa, uacce->dev_id); put_device(>dev); + +/* + * unmap

Re: [PATCH V9 05/10] iommu/vt-d: Support flushing more translation cache types

2020-02-25 Thread Auger Eric
Hi Jacob, On 2/15/20 12:27 AM, Jacob Pan wrote: > Hi Eric, > > On Wed, 12 Feb 2020 13:55:25 +0100 > Auger Eric wrote: > >> Hi Jacob, >> >> On 1/29/20 7:01 AM, Jacob Pan wrote: >>> When Shared Virtual Memory is exposed to a guest via vIOMMU, >>> scalable IOTLB invalidation may be passed down

Re: take the bus_dma_limit into account on arm

2020-02-25 Thread Roger Quadros via iommu
Hi Russell, On 18/02/2020 20:41, Christoph Hellwig wrote: Hi Russell, this series fixes the arm dma coherent allocator to take the bus dma mask into account, similar to what other architectures do. Without this devices that support 64-bit mask, but are limited by the interconnect won't work

Re: [PATCH v4 01/26] mm/mmu_notifiers: pass private data down to alloc_notifier()

2020-02-25 Thread Jason Gunthorpe
On Tue, Feb 25, 2020 at 10:24:39AM +0100, Jean-Philippe Brucker wrote: > On Mon, Feb 24, 2020 at 03:00:56PM -0400, Jason Gunthorpe wrote: > > On Mon, Feb 24, 2020 at 07:23:36PM +0100, Jean-Philippe Brucker wrote: > > > The new allocation scheme introduced by 2c7933f53f6b ("mm/mmu_notifiers: > > >