drm/amdgpu: Add pci_domain to struct kfd_dbg_device_info_entry
Subsystems (3)
PATCH 1/1 drm/amdgpu: Add pci_domain to struct kfd_dbg_device_info_entry
The device info structure returned to the debugger via the KFD_IOC_DBG_TRAP_GET_DEVICE_SNAPSHOT ioctl contain location of the device on PCI (bus, device, function), but is missing the domain this location belongs to.
This patch adds this information to the snapshot structure. The overall size of the kfd_dbg_device_info_entry structure structure, this new field is placed in preexisting padding.
Tested using the ROCm debugger.
--- drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 1 + include/uapi/linux/kfd_ioctl.h | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_debug.c +1 -0
@@ -1129,6 +1129,7 @@ int kfd_dbg_trap_device_snapshot(struct kfd_process *target, device_info.capability = topo_dev->node_props.capability; device_info.debug_prop = topo_dev->node_props.debug_prop; device_info.capability2 = topo_dev->node_props.capability2; + device_info.pci_domain = topo_dev->node_props.domain;if (exception_clear_mask) pdd->exception_status &= ~exception_clear_mask;
include/uapi/linux/kfd_ioctl.h +3 -2
@@ -49,9 +49,10 @@* - 1.21 - Debugger support to subscribe to LDS out-of-address exceptions * - 1.22 - Add queue creation with metadata ring base address * - 1.23 - Add profiler control ioctl to enable/disable profiler on a process +* - 1.24 - Add PCI domain in kfd_dbg_device_info_entry */ #define KFD_IOCTL_MAJOR_VERSION 1 -#define KFD_IOCTL_MINOR_VERSION 23 +#define KFD_IOCTL_MINOR_VERSION 24struct kfd_ioctl_get_version_args {__u32 major_version;/* from KFD */
@@ -151,7 +152,7 @@ struct kfd_dbg_device_info_entry {__u32 capability;__u32 debug_prop;__u32 capability2; -__u32 pad; +__u32 pci_domain; };/* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */
base-commit: cf48bd0a46279f4607956cb17c71bda96ee802e3
Signature · 1 line
2.43.0
AMD General
Quoted 18 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Lancelot SIX
Sent: Thursday, September 17, 2026 2:32 PM
To: [email protected]
Cc: Six, Lancelot <[email protected]>
Subject: [PATCH] drm/amdgpu: Addpci_domainto structkfd_dbg_device_info_entryCaution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
The device info structure returned to the debugger via the
KFD_IOC_DBG_TRAP_GET_DEVICE_SNAPSHOTioctl contain location of the device on PCI (bus, device, function), but is missing the domain this location belongs to.
Quoted 7 lines
This patch adds this information to the snapshot structure. The overall size of the
kfd_dbg_device_info_entrystructure structure, this new field is placed in preexisting padding.Tested using the ROCm debugger.
Signed-off-by Lancelot SIX <[email protected]>
Quoted 48 lines
--- drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 1 + include/uapi/linux/kfd_ioctl.h | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdkfd/kfd_debug.c +1
-0@@ -1129,6 +1129,7 @@ int kfd_dbg_trap_device_snapshot(struct kfd_process *target, device_info.capability = topo_dev->node_props.capability; device_info.debug_prop = topo_dev->node_props.debug_prop; device_info.capability2 = topo_dev->node_props.capability2; + device_info.pci_domain = topo_dev->node_props.domain;if (exception_clear_mask)pdd->exception_status &= ~exception_clear_mask;include/uapi/linux/kfd_ioctl.h +3
-2@@ -49,9 +49,10 @@* - 1.21 - Debugger support to subscribe to LDS out-of-address exceptions * - 1.22 - Add queue creation with metadata ring base address * - 1.23 - Add profiler control ioctl to enable/disable profiler on a process +* - 1.24 - Add PCI domain in kfd_dbg_device_info_entry */ #define KFD_IOCTL_MAJOR_VERSION 1 -#define KFD_IOCTL_MINOR_VERSION 23 +#define KFD_IOCTL_MINOR_VERSION 24struct kfd_ioctl_get_version_args {__u32 major_version;/* from KFD */ @@ -151,7 +152,7 @@ struct kfd_dbg_device_info_entry {__u32 capability;__u32 debug_prop;__u32 capability2; -__u32 pad; +__u32 pci_domain; };/* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */ base-commit:
cf48bd0a46279f4607956cb17c71bda96ee802e3--
2.43.0