Re: [PATCH v3 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-02-04 Thread Lu Baolu
On 2/5/22 1:10 PM, Fenghua Yu wrote: Hi, Baolu, On Sat, Feb 05, 2022 at 11:50:59AM +0800, Lu Baolu wrote: Hi Fenghua, On 2022/1/29 4:28, Fenghua Yu wrote: diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index 92fea3fbbb11..ef03b2176bbd 100644 --- a/drivers/iommu/intel/io

Re: [PATCH v3 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-02-04 Thread Fenghua Yu
Hi, Baolu, On Sat, Feb 05, 2022 at 11:50:59AM +0800, Lu Baolu wrote: > Hi Fenghua, > > On 2022/1/29 4:28, Fenghua Yu wrote: > > diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c > > index 92fea3fbbb11..ef03b2176bbd 100644 > > --- a/drivers/iommu/intel/iommu.c > > +++ b/drivers

Re: [PATCH v3 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-02-04 Thread Lu Baolu
Hi Fenghua, On 2022/1/29 4:28, Fenghua Yu wrote: diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index 92fea3fbbb11..ef03b2176bbd 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -4781,7 +4781,7 @@ static int aux_domain_add_dev(struct dmar_doma

Re: [PATCH v3 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-02-04 Thread Fenghua Yu
On Sat, Feb 05, 2022 at 12:56:00AM +0100, Thomas Gleixner wrote: > On Fri, Jan 28 2022 at 12:28, Fenghua Yu wrote: > > To avoid complexity of updating each thread's PASID status (e.g. sending > > IPI to update IA32_PASID MSR) on allocating and freeing PASID, once > > allocated and assigned to an mm

Re: [PATCH v3 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-02-04 Thread Thomas Gleixner
On Fri, Jan 28 2022 at 12:28, Fenghua Yu wrote: > To avoid complexity of updating each thread's PASID status (e.g. sending > IPI to update IA32_PASID MSR) on allocating and freeing PASID, once > allocated and assigned to an mm, the PASID stays with the mm for the > rest of the mm's lifetime. A refe

[PATCH v3 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-01-28 Thread Fenghua Yu
To avoid complexity of updating each thread's PASID status (e.g. sending IPI to update IA32_PASID MSR) on allocating and freeing PASID, once allocated and assigned to an mm, the PASID stays with the mm for the rest of the mm's lifetime. A reference to the PASID is taken on allocating the PASID. Bin