[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4d658766-688c-cda2-b4e1-60200a60a9b3@linux.intel.com>
Date: Thu, 31 Aug 2023 10:24:31 +0800
From: Baolu Lu <baolu.lu@...ux.intel.com>
To: Tina Zhang <tina.zhang@...el.com>, Jason Gunthorpe <jgg@...pe.ca>,
Kevin Tian <kevin.tian@...el.com>,
Michael Shavit <mshavit@...gle.com>
Cc: baolu.lu@...ux.intel.com, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/5] iommu: Introduce mm_get_pasid() helper function
On 2023/8/27 16:43, Tina Zhang wrote:
> Use the helper function mm_get_pasid() to get a mm assigned pasid
> value. The motivation is to replace mm->pasid with an iommu private
> data structure that is introduced in a later patch.
>
> v2:
> - Update commit message
> - Let mm_get_enqcmd_pasid() call mm_get_pasid() to get pasid
Ditto.
> Signed-off-by: Tina Zhang<tina.zhang@...el.com>
> ---
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 12 ++++++------
> drivers/iommu/intel/svm.c | 8 ++++----
> drivers/iommu/iommu-sva.c | 14 +++++++-------
> include/linux/iommu.h | 10 +++++++++-
> 4 files changed, 26 insertions(+), 18 deletions(-)
Eventually perhaps we should have something like sva_domain_get_pasid().
But the subsystem still needs some evolution to achieve this. In the
individual iommu driver, the mm_notifier should be wrapped in the sva
domain, hence the domain could be retrieved in the mm notifier callback.
With this done, the iommu drivers call sva_domain_get_pasid() instead of
mm_get_pasid().
Finally the iommu drivers only need mm->pgd, nothing else.
Considering that this patch will make the subsequent patches simpler, I
do not object to it. Hence,
Reviewed-by: Lu Baolu <baolu.lu@...ux.intel.com>
Best regards,
baolu
Powered by blists - more mailing lists