RE: [PATCH v9 07/11] iommu/sva: Refactoring iommu_sva_bind/unbind_device()

2022-06-28 Thread Tian, Kevin
> From: Baolu Lu > Sent: Tuesday, June 28, 2022 1:54 PM > >> +u32 iommu_sva_get_pasid(struct iommu_sva *handle) > >> +{ > >> + struct iommu_domain *domain = > >> + container_of(handle, struct iommu_domain, bond); > >> + > >> + return domain->mm->pasid; > >> +} > >>

Re: [PATCH v9 07/11] iommu/sva: Refactoring iommu_sva_bind/unbind_device()

2022-06-27 Thread Baolu Lu
On 2022/6/27 18:14, Tian, Kevin wrote: From: Lu Baolu Sent: Tuesday, June 21, 2022 10:44 PM +struct iommu_sva *iommu_sva_bind_device(struct device *dev, struct mm_struct *mm) +{ + struct iommu_domain *domain; + ioasid_t max_pasids; + int ret = -EINVAL; + + /* Allocate

RE: [PATCH v9 07/11] iommu/sva: Refactoring iommu_sva_bind/unbind_device()

2022-06-27 Thread Tian, Kevin
> From: Lu Baolu > Sent: Tuesday, June 21, 2022 10:44 PM > +struct iommu_sva *iommu_sva_bind_device(struct device *dev, struct > mm_struct *mm) > +{ > + struct iommu_domain *domain; > + ioasid_t max_pasids; > + int ret = -EINVAL; > + > + /* Allocate mm->pasid if necessary. */