public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Baolu Lu <baolu.lu@linux.intel.com>
To: "Liu, Jingqi" <jingqi.liu@intel.com>,
	iommu@lists.linux.dev, Tian Kevin <kevin.tian@intel.com>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>
Cc: baolu.lu@linux.intel.com, linux-kernel@vger.kernel.org
Subject: Re: [PATH v3 2/3] iommu/vt-d: debugfs: Create/remove debugfs file per {device, pasid}
Date: Thu, 28 Sep 2023 17:17:08 +0800	[thread overview]
Message-ID: <f250db59-03aa-3a64-3bb7-08fbcbf41839@linux.intel.com> (raw)
In-Reply-To: <196f7651-31d8-349d-9db9-dfeaa272542e@intel.com>

On 2023/9/28 17:02, Liu, Jingqi wrote:
>> And here,
>>
>> void intel_iommu_debugfs_create_dev_pasid(struct iommu_domain *domain,
>>                       struct device *dev, u32 pasid)
>> {
>>     sprintf(dir_name, "%x", pasid);
>>     dev_pasid->debugfs_entry = debugfs_create_dir(dir_name,
>>             info->debugfs_entry);
>>
>>     debugfs_create_file("domain_translation_struct", 0444,
>>                 dev_pasid->debugfs_entry, dev_pasid,
>>                 &domain_translation_struct_fops);
>> }
>>
> Thanks.
> You mean to add 'debugfs_entry' in below structure.
>      struct dev_pasid_info *dev_pasid;
> This structure is also allocated per pair of {dev, pasid}.
> The debugfs dentry of  {dev, pasid} can be simply obtained from 
> 'dev_pasid_info'.
> 
> So the 'dev_pasid_info' can be passed as a parameter of this helper, 
> right ?
> Like this:
> void intel_iommu_debugfs_create_dev_pasid(struct iommu_domain *domain,
>                        struct dev_pasid_info *dev_pasid) ;

Yes.

Best regards,
baolu

  reply	other threads:[~2023-09-28  9:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-27 15:15 [PATH v3 0/3] iommu/vt-d: debugfs: Enhancements to IOMMU debugfs Jingqi Liu
2023-09-27 15:15 ` [PATH v3 1/3] iommu/vt-d: debugfs: Dump entry pointing to huge page Jingqi Liu
2023-09-27 15:15 ` [PATH v3 2/3] iommu/vt-d: debugfs: Create/remove debugfs file per {device, pasid} Jingqi Liu
2023-09-28  1:58   ` Baolu Lu
2023-09-28  9:02     ` Liu, Jingqi
2023-09-28  9:17       ` Baolu Lu [this message]
2023-09-27 15:15 ` [PATH v3 3/3] iommu/vt-d: debugfs: Support dumping a specified page table Jingqi Liu

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=f250db59-03aa-3a64-3bb7-08fbcbf41839@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=iommu@lists.linux.dev \
    --cc=jingqi.liu@intel.com \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.org \
    /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