From: Qinxin Xia <xiaqinxin@huawei.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: <will@kernel.org>, <robin.murphy@arm.com>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <iommu@lists.linux.dev>,
<yangyicong@huawei.com>, <wangzhou1@hisilicon.com>,
<prime.zeng@hisilicon.com>, <xuwei5@huawei.com>,
<fanghao11@huawei.com>, <jonathan.cameron@huawei.com>,
<linuxarm@huawei.com>
Subject: Re: [PATCH 0/2] iommu: Add io_ptdump debug interface for iommu
Date: Sat, 18 Oct 2025 18:39:38 +0800 [thread overview]
Message-ID: <e04eb4c8-3344-4a3b-bf00-c9221be5fe86@huawei.com> (raw)
In-Reply-To: <20250915162810.GI882933@ziepe.ca>
On 2025/9/16 00:28:10, Jason Gunthorpe <jgg@ziepe.ca> wrote:
> On Thu, Sep 11, 2025 at 10:08:55PM +0800, Qinxin Xia wrote:
>>
>>
>> On 2025/9/10 22:15:47, Jason Gunthorpe <jgg@ziepe.ca> wrote:
>>> On Wed, Sep 10, 2025 at 11:20:08AM +0800, Qinxin Xia wrote:
>>>> Ok, I see, my colleague Wang Zhou also released a version of io_ptdump
>>>> a long time ago, which is implemented in smmu debugfs. Will recommends that
>>>> io_ptdump be implemented in a way similar to CPU page table dump. Using
>>>> debugfs to expose the data and using format-specific callbacks to implement
>>>> specific data dumps, I'll talk to him about this as well.
>>>
>>> I feel we should have a iommu subsystem debugfs and per-iommu_domain
>>> directories to dump the page tables.
>>>
>>> The smmu debugfs can report what iommu_domains each STE/CD is
>>> referencing.
>>>
>>> This also needs RCU freeing of page table levels as a locking
>>> strategy.
>>
>> Thanks, I'll add RCU in the next version, but there's some
>> confusion,
>
> Please don't, RCU is quite complicated, I don't really want to see
> attempts to retrofit it into the existing page table code. This is why
> I've said debugging like this needs to go along with the new iommu pt
> work to consolidate the page table code.
>
>> Do you
>> mean to create a directory for each domain? like:
>>
>> /sys/kernel/debug/io_page_tables/domain_xxxx (xxxx=domain addr)
>
> Something like this could be a reasonable option.
>
>> tree domain_xxxx like:
>> domain_xxxx
>> └── group x
>> │ └── device
>
> Though I would probably not include this information..
>
Users could be difficult to map domain to devices, so I think maybe
we should provide the device information contained in the domain.>> └──
DebugFS file: /sys/kernel/debug/io_page_tables
>> └── Operation: Reading this file triggers the entire debug information
>> collection process
>
> I don't think we want to dump every page table in the system in one
> file.
>
>> Do you mean that the interface in io-pgtable-arm.c is directly invoked
>> during the process of obtaining page table information without passing
>> through arm-smmu-v3.c?
>
> Yes, this is what iommu pt brings.
>
> Jason
prev parent reply other threads:[~2025-10-18 10:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-14 9:30 [PATCH 0/2] iommu: Add io_ptdump debug interface for iommu Qinxin Xia
2025-08-14 9:30 ` [PATCH 1/2] iommu/debug: Add IOMMU page table dump debug facility Qinxin Xia
2025-08-15 6:47 ` kernel test robot
2025-08-15 9:57 ` kernel test robot
2025-09-09 13:06 ` Will Deacon
2025-09-10 2:58 ` Qinxin Xia
2025-09-11 14:58 ` Will Deacon
2025-08-14 9:30 ` [PATCH 2/2] iommu/io-pgtable: Add ARM SMMUv3 page table dump support Qinxin Xia
2025-08-15 9:14 ` kernel test robot
2025-09-02 16:10 ` [PATCH 0/2] iommu: Add io_ptdump debug interface for iommu Jason Gunthorpe
2025-09-10 3:20 ` Qinxin Xia
2025-09-10 14:15 ` Jason Gunthorpe
2025-09-11 14:08 ` Qinxin Xia
2025-09-15 16:28 ` Jason Gunthorpe
2025-10-18 10:39 ` Qinxin Xia [this message]
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=e04eb4c8-3344-4a3b-bf00-c9221be5fe86@huawei.com \
--to=xiaqinxin@huawei.com \
--cc=fanghao11@huawei.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=jonathan.cameron@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=prime.zeng@hisilicon.com \
--cc=robin.murphy@arm.com \
--cc=wangzhou1@hisilicon.com \
--cc=will@kernel.org \
--cc=xuwei5@huawei.com \
--cc=yangyicong@huawei.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