Linux IOMMU Development
 help / color / mirror / Atom feed
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 08/11] iommu/vt-d: Add domain_type_is_sva helper function
Date: Mon, 19 Feb 2024 09:05:17 +0800	[thread overview]
Message-ID: <5e186ad1-8869-4a0d-b0b2-ae333dfd1c56@linux.intel.com> (raw)
In-Reply-To: <MW5PR11MB588131E52514CC9B552DCA7F89512@MW5PR11MB5881.namprd11.prod.outlook.com>

On 2/19/24 8:13 AM, Zhang, Tina wrote:
> Hi Baolu,
> 
>> -----Original Message-----
>> From: Baolu Lu<baolu.lu@linux.intel.com>
>> Sent: Wednesday, January 17, 2024 3:33 PM
>> To: Zhang, Tina<tina.zhang@intel.com>;iommu@lists.linux.dev
>> Cc:baolu.lu@linux.intel.com; Tian, Kevin<kevin.tian@intel.com>
>> Subject: Re: [PATCH 08/11] iommu/vt-d: Add domain_type_is_sva helper
>> function
>>
>> On 2024/1/16 9:11, Tina Zhang wrote:
>>> Introduce a helper function to tell if the type of a dmar_domain is
>>> sva or not. In general, comparing with normal iommu_domain, a sva
>>> domain shouldn't be special other than having a different source for
>>> the page table. Thus, this helper function should be used as little as
>>> possible (i.e. only in the cases related to handling page table source).
>>>
>>> Signed-off-by: Tina Zhang<tina.zhang@intel.com>
>>> ---
>>>    drivers/iommu/intel/iommu.c | 7 ++++++-
>>>    1 file changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
>>> index 0eec5d971315..af466ba301b7 100644
>>> --- a/drivers/iommu/intel/iommu.c
>>> +++ b/drivers/iommu/intel/iommu.c
>>> @@ -244,6 +244,11 @@ static int domain_type_is_si(struct dmar_domain
>> *domain)
>>>    	return domain->domain.type == IOMMU_DOMAIN_IDENTITY;
>>>    }
>>>
>>> +static inline bool domain_type_is_sva(struct dmar_domain *domain) {
>>> +	return domain->domain.type == IOMMU_DOMAIN_SVA; }
>> Move the helper into the header file and put appropriate comments around it.
> Is this domain_type_is_sva() helper expected to be reused by others?

I am not sure. But let's put inline helpers in the header instead of C
file.

Best regards,
baolu

  reply	other threads:[~2024-02-19  1:11 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 [this message]
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=5e186ad1-8869-4a0d-b0b2-ae333dfd1c56@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