Re: [PATCH v9 04/11] iommu: Add sva iommu_domain support

2022-06-28 Thread Baolu Lu
On 2022/6/29 09:54, Tian, Kevin wrote: From: Baolu Lu Sent: Tuesday, June 28, 2022 7:34 PM On 2022/6/28 16:50, Tian, Kevin wrote: From: Baolu Lu Sent: Tuesday, June 28, 2022 1:41 PM struct iommu_domain { unsigned type; const struct iommu_domain_ops *ops; unsigned l

RE: [PATCH v9 04/11] iommu: Add sva iommu_domain support

2022-06-28 Thread Tian, Kevin
> From: Baolu Lu > Sent: Tuesday, June 28, 2022 7:34 PM > > On 2022/6/28 16:50, Tian, Kevin wrote: > >> From: Baolu Lu > >> Sent: Tuesday, June 28, 2022 1:41 PM > struct iommu_domain { > unsigned type; > const struct iommu_domain_ops *ops; > unsig

Re: [PATCH v9 04/11] iommu: Add sva iommu_domain support

2022-06-28 Thread Baolu Lu
On 2022/6/28 16:50, Tian, Kevin wrote: + + mutex_lock(&group->mutex); + curr = xa_cmpxchg(&group->pasid_array, pasid, NULL, domain, GFP_KERNEL); + if (curr) + goto out_unlock; Need check xa_is_err(old). Either (1) old entry is a valid pointer, or return -EBUSY

Re: [PATCH v9 04/11] iommu: Add sva iommu_domain support

2022-06-28 Thread Baolu Lu
On 2022/6/28 16:50, Tian, Kevin wrote: From: Baolu Lu Sent: Tuesday, June 28, 2022 1:41 PM struct iommu_domain { unsigned type; const struct iommu_domain_ops *ops; unsigned long pgsize_bitmap;/* Bitmap of page sizes in use */ - iommu_fault_handler_t handler;

RE: [PATCH v9 04/11] iommu: Add sva iommu_domain support

2022-06-28 Thread Tian, Kevin
> From: Baolu Lu > Sent: Tuesday, June 28, 2022 1:41 PM > > > >> struct iommu_domain { > >>unsigned type; > >>const struct iommu_domain_ops *ops; > >>unsigned long pgsize_bitmap;/* Bitmap of page sizes in use */ > >> - iommu_fault_handler_t handler; > >> - void *handler_token;

Re: [PATCH v9 04/11] iommu: Add sva iommu_domain support

2022-06-27 Thread Baolu Lu
Hi Kevin, On 2022/6/27 16:29, Tian, Kevin wrote: From: Lu Baolu Sent: Tuesday, June 21, 2022 10:44 PM The sva iommu_domain represents a hardware pagetable that the IOMMU hardware could use for SVA translation. This adds some infrastructure to support SVA domain in the iommu common layer. It in

RE: [PATCH v9 04/11] iommu: Add sva iommu_domain support

2022-06-27 Thread Tian, Kevin
> From: Lu Baolu > Sent: Tuesday, June 21, 2022 10:44 PM > > The sva iommu_domain represents a hardware pagetable that the IOMMU > hardware could use for SVA translation. This adds some infrastructure > to support SVA domain in the iommu common layer. It includes: > > - Extend the iommu_domain t