• Jingqi Liu's avatar
    iommu/vt-d: debugfs: Create/remove debugfs file per {device, pasid} · d87731f6
    Jingqi Liu authored
    Add a debugfs directory per pair of {device, pasid} if the mappings of
    its page table are created and destroyed by the iommu_map/unmap()
    interfaces. i.e. /sys/kernel/debug/iommu/intel/<device source id>/<pasid>.
    Create a debugfs file in the directory for users to dump the page
    table corresponding to {device, pasid}. e.g.
    /sys/kernel/debug/iommu/intel/0000:00:02.0/1/domain_translation_struct.
    For the default domain without pasid, it creates a debugfs file in the
    debugfs device directory for users to dump its page table. e.g.
    /sys/kernel/debug/iommu/intel/0000:00:02.0/domain_translation_struct.
    
    When setting a domain to a PASID of device, create a debugfs file in
    the pasid debugfs directory for users to dump the page table of the
    specified pasid. Remove the debugfs device directory of the device
    when releasing a device. e.g.
    /sys/kernel/debug/iommu/intel/0000:00:01.0
    Signed-off-by: default avatarJingqi Liu <Jingqi.liu@intel.com>
    Link: https://lore.kernel.org/r/20231013135811.73953-3-Jingqi.liu@intel.comSigned-off-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
    Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
    d87731f6
iommu.c 131 KB