Re: [RFCv2 PATCH 21/36] iommu/arm-smmu-v3: Implement process operations

2017-11-08 Thread Yisheng Xie
Hi Jean, On 2017/10/6 21:31, Jean-Philippe Brucker wrote: > Hook process operations to support PASID and page table sharing with the > SMMUv3: > > + > +static void arm_smmu_process_exit(struct iommu_domain *domain, > + struct iommu_process *process) > +{ > +

Re: [PATCH for-next 2/4] RDMA/hns: Add IOMMU enable support in hip08

2017-11-08 Thread Wei Hu (Xavier)
On 2017/11/1 20:26, Robin Murphy wrote: > On 01/11/17 07:46, Wei Hu (Xavier) wrote: >> >> On 2017/10/12 20:59, Robin Murphy wrote: >>> On 12/10/17 13:31, Wei Hu (Xavier) wrote: On 2017/10/1 0:10, Leon Romanovsky wrote: > On Sat, Sep 30, 2017 at 05:28:59PM +0800, Wei Hu (Xavier) wrote:

Re: [PATCH for-next 2/4] RDMA/hns: Add IOMMU enable support in hip08

2017-11-08 Thread Wei Hu (Xavier)
On 2017/11/7 23:48, Jason Gunthorpe wrote: > On Tue, Nov 07, 2017 at 10:45:29AM +0800, Wei Hu (Xavier) wrote: > >> We reconstruct the code as below: >> It replaces dma_alloc_coherent with __get_free_pages and >> dma_map_single functions. So, we can vmap serveral ptrs returned by

Re: [PATCH for-next 2/4] RDMA/hns: Add IOMMU enable support in hip08

2017-11-08 Thread Wei Hu (Xavier)
On 2017/11/7 23:58, Christoph Hellwig wrote: > On Tue, Nov 07, 2017 at 08:48:38AM -0700, Jason Gunthorpe wrote: >> Can't you just use vmalloc and dma_map that? Other drivers follow that >> approach.. > You can't easily due to the flushing requirements. We used to do that > in XFS and it led to

Re: [PATCH for-next 2/4] RDMA/hns: Add IOMMU enable support in hip08

2017-11-08 Thread Wei Hu (Xavier)
On 2017/11/7 14:32, Leon Romanovsky wrote: > On Tue, Nov 07, 2017 at 10:45:29AM +0800, Wei Hu (Xavier) wrote: >> >> On 2017/11/1 20:26, Robin Murphy wrote: >>> On 01/11/17 07:46, Wei Hu (Xavier) wrote: On 2017/10/12 20:59, Robin Murphy wrote: > On 12/10/17 13:31, Wei Hu (Xavier) wrote:

RE: [RFCv2 PATCH 01/36] iommu: Keep track of processes and PASIDs

2017-11-08 Thread Bharat Kumar Gogada
Hi Jean, +static struct iommu_process * +iommu_process_alloc(struct iommu_domain *domain, struct task_struct +*task) { + int err; + int pasid; + struct iommu_process *process; + + if (WARN_ON(!domain->ops->process_alloc || !domain->ops->process_free)) +

Re: [RFCv2 PATCH 00/36] Process management for IOMMU + SVM for SMMUv3

2017-11-08 Thread Jean-Philippe Brucker
Hi Liubo, On 08/11/17 01:21, Bob Liu wrote: > Hi Jean, > > On 2017/10/12 20:55, Jean-Philippe Brucker wrote: >> On 12/10/17 13:05, Yisheng Xie wrote: >> [...] >> * An iommu_process can be bound to multiple domains, and a domain can >> have >> multiple iommu_process. > when