AMD General

> -----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: Add pci_domain to struct
> kfd_dbg_device_info_entry
>
> Caution: 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_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.
>
> Signed-off-by: Lancelot SIX <[email protected]>

Reviewed-by: Jonathan Kim <[email protected]>

> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 1 +
>  include/uapi/linux/kfd_ioctl.h         | 5 +++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_debug.c
> b/drivers/gpu/drm/amd/amdkfd/kfd_debug.c
> index 0dd1fd448059b..2c14b03df0781 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_debug.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_debug.c
> @@ -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;
> diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h
> index 749d196e2114b..e7908a068d3d1 100644
> --- a/include/uapi/linux/kfd_ioctl.h
> +++ b/include/uapi/linux/kfd_ioctl.h
> @@ -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 24
>
>  struct 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

Reply via email to