From: Baolu Lu <baolu.lu@linux.intel.com>
To: "Zhang, Tina" <tina.zhang@intel.com>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>
Cc: baolu.lu@linux.intel.com, "Tian, Kevin" <kevin.tian@intel.com>
Subject: Re: [PATCH 09/11] iommu/vt-d: Reuse intel_iommu_set_dev_pasid function
Date: Mon, 19 Feb 2024 09:17:13 +0800 [thread overview]
Message-ID: <11a7fa60-ee7f-4acc-ac17-70f63ecd2d4b@linux.intel.com> (raw)
In-Reply-To: <MW5PR11MB5881593A3C0398E97F6B07A589512@MW5PR11MB5881.namprd11.prod.outlook.com>
On 2/19/24 9:01 AM, Zhang, Tina wrote:
>>> + if (ret)
>>> + goto out_free;
>>> +
>>> + ret = domain_attach_iommu(dmar_domain, iommu);
>> The same here.
>>
>> The domain_attach_iommu() is called to setup the relationship between a
>> domain and an iommu. You should make it compatible with sva domain as
>> well.
> The problem is whether we need struct iommu_domain_info for sva domain. I didn't see any necessary to allocate struct iommu_domain_info instance for sva domain, as all the fields of struct iommu_domain_info can be gotten from dev_pasids.
>
> Since we want to make the domain_attach_iommu() generic (i.e., all domains, no matter what type they are, need to call this function), I think we can check the domain type within the function and add comments there to tell that we didn't see any necessary to let sva domain have a struct iommu_domain_info and therefore the function returns immediately if it meets a sva domain. What do you think?
The SVA domain is nothing special compared to other types of domains.
The ultimate goal is that we should have a common attach-detach
implementation for all.
The iommu_domain_info structure stores the relationship between a domain
and IOMMU, mainly for the cache tag information, also known as the
domain ID. It's a bit outdated if we consider SVA and nested domains. As
I told in another thread, I am working on a solution to address
this. Let's sync our efforts to avoid duplication of efforts.
Best regards,
baolu
next prev parent reply other threads:[~2024-02-19 1:23 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
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 [this message]
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=11a7fa60-ee7f-4acc-ac17-70f63ecd2d4b@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