Re: [PATCH RESEND v9 03/13] iommu/sva: Add PASID helpers

2020-09-17 Thread Jean-Philippe Brucker
On Tue, Sep 08, 2020 at 09:45:02AM +0200, Auger Eric wrote: > > +int iommu_sva_alloc_pasid(struct mm_struct *mm, ioasid_t min, ioasid_t max) > > +{ > > + int ret = 0; > > + ioasid_t pasid; > > + > > + if (min == INVALID_IOASID || max == INVALID_IOASID || > > + min == 0 || max < min) >

Re: [PATCH RESEND v9 03/13] iommu/sva: Add PASID helpers

2020-09-08 Thread Auger Eric
Hi Jean, On 8/17/20 7:15 PM, Jean-Philippe Brucker wrote: > Let IOMMU drivers allocate a single PASID per mm. Store the mm in the > IOASID set to allow refcounting and searching mm by PASID, when handling > an I/O page fault. > > Reviewed-by: Lu Baolu > Signed-off-by: Jean-Philippe Brucker >

[PATCH RESEND v9 03/13] iommu/sva: Add PASID helpers

2020-08-17 Thread Jean-Philippe Brucker
Let IOMMU drivers allocate a single PASID per mm. Store the mm in the IOASID set to allow refcounting and searching mm by PASID, when handling an I/O page fault. Reviewed-by: Lu Baolu Signed-off-by: Jean-Philippe Brucker --- drivers/iommu/Kconfig | 5 +++ drivers/iommu/Makefile