Re: [PATCH v4 2/6] iommu: Add a helper to do PASID lookup from domain

2022-05-23 Thread Jacob Pan
Hi Kevin, On Mon, 23 May 2022 09:14:04 +, "Tian, Kevin" wrote: > > From: Tian, Kevin > > Sent: Monday, May 23, 2022 3:55 PM > > > > > From: Jacob Pan > > > +ioasid_t iommu_get_pasid_from_domain(struct device *dev, struct > > > iommu_domain *domain) > > > +{ > > > + struct iommu_domain *t

RE: [PATCH v4 2/6] iommu: Add a helper to do PASID lookup from domain

2022-05-23 Thread Tian, Kevin
> From: Tian, Kevin > Sent: Monday, May 23, 2022 3:55 PM > > > From: Jacob Pan > > +ioasid_t iommu_get_pasid_from_domain(struct device *dev, struct > > iommu_domain *domain) > > +{ > > + struct iommu_domain *tdomain; > > + struct iommu_group *group; > > + unsigned long index; > > + ioasid

RE: [PATCH v4 2/6] iommu: Add a helper to do PASID lookup from domain

2022-05-23 Thread Tian, Kevin
> From: Jacob Pan > Sent: Thursday, May 19, 2022 2:21 AM > > IOMMU group maintains a PASID array which stores the associated IOMMU > domains. This patch introduces a helper function to do domain to PASID > look up. It will be used by TLB flush and device-PASID attach verification. > > Signed-off

Re: [PATCH v4 2/6] iommu: Add a helper to do PASID lookup from domain

2022-05-20 Thread Jacob Pan
Hi Christoph, On Wed, 18 May 2022 23:48:44 -0700, Christoph Hellwig wrote: > On Wed, May 18, 2022 at 11:21:16AM -0700, Jacob Pan wrote: > > +ioasid_t iommu_get_pasid_from_domain(struct device *dev, struct > > iommu_domain *domain) > > Overly long line here. will fix, Thanks, Jacob _

Re: [PATCH v4 2/6] iommu: Add a helper to do PASID lookup from domain

2022-05-19 Thread Jacob Pan
Hi Baolu, On Thu, 19 May 2022 14:41:06 +0800, Baolu Lu wrote: > > IOMMU group maintains a PASID array which stores the associated IOMMU > > domains. This patch introduces a helper function to do domain to PASID > > look up. It will be used by TLB flush and device-PASID attach > > verification.

Re: [PATCH v4 2/6] iommu: Add a helper to do PASID lookup from domain

2022-05-18 Thread Christoph Hellwig
On Wed, May 18, 2022 at 11:21:16AM -0700, Jacob Pan wrote: > +ioasid_t iommu_get_pasid_from_domain(struct device *dev, struct iommu_domain > *domain) Overly long line here. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfound

Re: [PATCH v4 2/6] iommu: Add a helper to do PASID lookup from domain

2022-05-18 Thread Baolu Lu
On 2022/5/19 02:21, Jacob Pan wrote: IOMMU group maintains a PASID array which stores the associated IOMMU domains. This patch introduces a helper function to do domain to PASID look up. It will be used by TLB flush and device-PASID attach verification. Do you really need this? The IOMMU drive

[PATCH v4 2/6] iommu: Add a helper to do PASID lookup from domain

2022-05-18 Thread Jacob Pan
IOMMU group maintains a PASID array which stores the associated IOMMU domains. This patch introduces a helper function to do domain to PASID look up. It will be used by TLB flush and device-PASID attach verification. Signed-off-by: Jacob Pan --- drivers/iommu/iommu.c | 22 ++