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.
Bjorn