RE: [PATCH v7 06/10] iommu/sva: Refactoring iommu_sva_bind/unbind_device()

2022-06-02 Thread Tian, Kevin
> From: Jean-Philippe Brucker > Sent: Wednesday, May 25, 2022 3:30 PM > > On Wed, May 25, 2022 at 02:04:49AM +, Tian, Kevin wrote: > > > From: Jean-Philippe Brucker > > > Sent: Tuesday, May 24, 2022 6:58 PM > > > > > > On Tue, May 24, 2022 at 10:22:28AM +, Tian, Kevin wrote: > > > > >

Re: [PATCH v7 06/10] iommu/sva: Refactoring iommu_sva_bind/unbind_device()

2022-05-25 Thread Jean-Philippe Brucker
On Wed, May 25, 2022 at 02:04:49AM +, Tian, Kevin wrote: > > From: Jean-Philippe Brucker > > Sent: Tuesday, May 24, 2022 6:58 PM > > > > On Tue, May 24, 2022 at 10:22:28AM +, Tian, Kevin wrote: > > > > From: Lu Baolu > > > > Sent: Thursday, May 19, 2022 3:21 PM > > > > > > > > The

RE: [PATCH v7 06/10] iommu/sva: Refactoring iommu_sva_bind/unbind_device()

2022-05-24 Thread Tian, Kevin
> From: Jean-Philippe Brucker > Sent: Tuesday, May 24, 2022 6:58 PM > > On Tue, May 24, 2022 at 10:22:28AM +, Tian, Kevin wrote: > > > From: Lu Baolu > > > Sent: Thursday, May 19, 2022 3:21 PM > > > > > > The existing iommu SVA interfaces are implemented by calling the SVA > > > specific

Re: [PATCH v7 06/10] iommu/sva: Refactoring iommu_sva_bind/unbind_device()

2022-05-24 Thread Jean-Philippe Brucker
On Tue, May 24, 2022 at 10:22:28AM +, Tian, Kevin wrote: > > From: Lu Baolu > > Sent: Thursday, May 19, 2022 3:21 PM > > > > The existing iommu SVA interfaces are implemented by calling the SVA > > specific iommu ops provided by the IOMMU drivers. There's no need for > > any SVA specific ops

RE: [PATCH v7 06/10] iommu/sva: Refactoring iommu_sva_bind/unbind_device()

2022-05-24 Thread Tian, Kevin
> From: Lu Baolu > Sent: Thursday, May 19, 2022 3:21 PM > > The existing iommu SVA interfaces are implemented by calling the SVA > specific iommu ops provided by the IOMMU drivers. There's no need for > any SVA specific ops in iommu_ops vector anymore as we can achieve > this through the generic

Re: [PATCH v7 06/10] iommu/sva: Refactoring iommu_sva_bind/unbind_device()

2022-05-22 Thread Baolu Lu
On 2022/5/20 19:28, Jean-Philippe Brucker wrote: On Fri, May 20, 2022 at 02:38:12PM +0800, Baolu Lu wrote: On 2022/5/20 00:39, Jean-Philippe Brucker wrote: +struct iommu_sva *iommu_sva_bind_device(struct device *dev, struct mm_struct *mm) +{ + struct iommu_sva_domain *sva_domain; +

Re: [PATCH v7 06/10] iommu/sva: Refactoring iommu_sva_bind/unbind_device()

2022-05-20 Thread Jean-Philippe Brucker
On Fri, May 20, 2022 at 02:38:12PM +0800, Baolu Lu wrote: > On 2022/5/20 00:39, Jean-Philippe Brucker wrote: > > > +struct iommu_sva *iommu_sva_bind_device(struct device *dev, struct > > > mm_struct *mm) > > > +{ > > > + struct iommu_sva_domain *sva_domain; > > > + struct iommu_domain *domain; >

Re: [PATCH v7 06/10] iommu/sva: Refactoring iommu_sva_bind/unbind_device()

2022-05-20 Thread Baolu Lu
On 2022/5/20 00:39, Jean-Philippe Brucker wrote: +struct iommu_sva *iommu_sva_bind_device(struct device *dev, struct mm_struct *mm) +{ + struct iommu_sva_domain *sva_domain; + struct iommu_domain *domain; + ioasid_t max_pasid = 0; + int ret = -EINVAL; + + /*

Re: [PATCH v7 06/10] iommu/sva: Refactoring iommu_sva_bind/unbind_device()

2022-05-19 Thread Jean-Philippe Brucker
On Thu, May 19, 2022 at 03:20:43PM +0800, Lu Baolu wrote: > The existing iommu SVA interfaces are implemented by calling the SVA > specific iommu ops provided by the IOMMU drivers. There's no need for > any SVA specific ops in iommu_ops vector anymore as we can achieve > this through the generic

[PATCH v7 06/10] iommu/sva: Refactoring iommu_sva_bind/unbind_device()

2022-05-19 Thread Lu Baolu
The existing iommu SVA interfaces are implemented by calling the SVA specific iommu ops provided by the IOMMU drivers. There's no need for any SVA specific ops in iommu_ops vector anymore as we can achieve this through the generic attach/detach_dev_pasid domain ops. This refactors the IOMMU SVA