Re: [PATCH v2 5/8] iommu/amd: Add support for device id user input

From: Srivastava, Dheeraj Kumar
Date: Wed Jan 15 2025 - 00:22:09 EST


On 11/27/2024 2:32 AM, Bjorn Helgaas wrote:
On Wed, Nov 06, 2024 at 01:16:36PM +0530, Dheeraj Kumar Srivastava wrote:
Device id user input is needed for dumping IOMMU data structures like
device table, IRT etc in AMD IOMMU debugfs.

eg.
1. # echo 0000:01:00.0 > /sys/kernel/debug/iommu/amd/devid
# cat /sys/kernel/debug/iommu/amd/devid
Output : 0000:01:00.0

2. # echo 01:00.0 > /sys/kernel/debug/iommu/amd/devid
# cat /sys/kernel/debug/iommu/amd/devid
Output : 0000:01:00.0

The corresponding Intel IOMMU debugfs support encodes the BDF in the
pathname, e.g.,

/sys/kernel/debug/iommu/intel/<bdf>/domain_translation_struct

Can you do the same? I think it would be nicer to use a similar
style, and it would also make the code simpler.


Hi, Yeah i do agree with your suggestion. But lets keep this as open question about how we want the interface to be and get more suggestions on this one. Will reiterate with all other changes suggested.


Regards
Dheeraj

Bjorn