Linux IOMMU Development
 help / color / mirror / Atom feed
From: Baolu Lu <baolu.lu@linux.intel.com>
To: Tina Zhang <tina.zhang@intel.com>, iommu@lists.linux.dev
Cc: baolu.lu@linux.intel.com, Kevin Tian <kevin.tian@intel.com>
Subject: Re: [PATCH 04/11] iommu/vt-d: Retire struct intel_svm_dev
Date: Wed, 17 Jan 2024 15:20:58 +0800	[thread overview]
Message-ID: <e0bd9c46-f4c8-4082-b0f3-3f841d04b7df@linux.intel.com> (raw)
In-Reply-To: <20240116011146.18645-5-tina.zhang@intel.com>

On 2024/1/16 9:11, Tina Zhang wrote:
> The struct dev_pasid_info is used by IOMMU domain to keep pasid info of
> attached device. For sva domain, there is another structure which keeps
> info of attached device, named intel_svm_dev. Instead of using two structs
> for the same purpose, the struct dev_pasid_info can work for both sva
> domain and IOMMU domain. As a result, struct intel_svm_dev gets retired.
> 
> The rcu/did/sid/qdep fields of struct intel_svm_dev are moved from struct
> intel_svm_dev into struct dev_pasid_info. Besides, the names of functions
> which are related to struct intel_svm_dev get changed to dev_pasid_info.
> 
> Signed-off-by: Tina Zhang<tina.zhang@intel.com>
> ---
>   drivers/iommu/intel/iommu.h |  11 +---
>   drivers/iommu/intel/svm.c   | 110 ++++++++++++++++++------------------
>   2 files changed, 57 insertions(+), 64 deletions(-)

I like the direction that this patch is taking. I agree that
intel_svm_dev should be replaced with dev_pasid_info. However, since
dev_pasid_info is protected by domain->lock and intel_svm_dev is
protected by RCU, I recommend splitting this change into two patches:

- The first patch would modify the code to use domain->lock to protect
   intel_svm_dev.
- The second patch would then perform the actual replacement of
   intel_svm_dev with dev_pasid_info.

Best regards,
baolu

  reply	other threads:[~2024-01-17  7:21 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-16  1:11 [PATCH 00/11] iommu/vt-d: Remove superfluous IOMMU IOTLB invalidations Tina Zhang
2024-01-16  1:11 ` [PATCH 01/11] iommu/vt-d: Retire the treatment for revoking PASIDs with pending pgfaults Tina Zhang
2024-01-16  1:11 ` [PATCH 02/11] iommu/vt-d: Remove initialization for dynamically heap-allocated rcu_head Tina Zhang
2024-01-16  1:11 ` [PATCH 03/11] iommu/vt-d: Refactor intel_svm_set_dev_pasid function Tina Zhang
2024-01-16  1:11 ` [PATCH 04/11] iommu/vt-d: Retire struct intel_svm_dev Tina Zhang
2024-01-17  7:20   ` Baolu Lu [this message]
2024-01-30  3:04     ` Zhang, Tina
2024-02-16  3:28       ` Zhang, Tina
2024-01-16  1:11 ` [PATCH 05/11] iommu: Add ops->domain_alloc_sva() Tina Zhang
2024-01-16  1:11 ` [PATCH 06/11] iommu/vt-d: Retire struct intel_svm Tina Zhang
2024-01-16  1:11 ` [PATCH 07/11] iommu/vt-d: Use RCU for dev_pasids list updates in set/remove_dev_pasid() Tina Zhang
2024-01-17  7:30   ` Baolu Lu
2024-01-16  1:11 ` [PATCH 08/11] iommu/vt-d: Add domain_type_is_sva helper function Tina Zhang
2024-01-17  7:32   ` Baolu Lu
2024-02-19  0:13     ` Zhang, Tina
2024-02-19  1:05       ` Baolu Lu
2024-01-16  1:11 ` [PATCH 09/11] iommu/vt-d: Reuse intel_iommu_set_dev_pasid function Tina Zhang
2024-01-17  7:40   ` Baolu Lu
2024-02-19  1:01     ` Zhang, Tina
2024-02-19  1:17       ` Baolu Lu
2024-01-16  1:11 ` [PATCH 10/11] iommu/vt-d: Retire intel_svm_remove_dev_pasid function Tina Zhang
2024-01-16  1:11 ` [PATCH 11/11] iommu/vt-d: Remove superfluous IOMMU IOTLB invalidations Tina Zhang
2024-01-17  7:59   ` Baolu Lu
2024-02-16  5:38     ` Zhang, Tina
2024-02-18  9:19       ` Baolu Lu
2024-02-18 13:09         ` Zhang, Tina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e0bd9c46-f4c8-4082-b0f3-3f841d04b7df@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=iommu@lists.linux.dev \
    --cc=kevin.tian@intel.com \
    --cc=tina.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox