Skip to content

Add H/W Debugger module support to amdkfd

Oded Gabbay dri-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11drm/radeon: Add H/W debugger kfd->kgd functionsdrivers/gpu/drm/amd/include/kgd_kfd_interface.h drivers/gpu/drm/radeon/cik_reg.h drivers/gpu/drm/radeon/radeon_kfd.c+181 -10 replies
2/11drm/amdkfd: add H/W debugger IOCTL set definitionsdrivers/gpu/drm/amd/amdkfd/kfd_chardev.c include/uapi/linux/kfd_ioctl.h+95 -20 replies
3/11drm/amdkfd: Add static user-mode queues supportdrivers/gpu/drm/amd/amdkfd/kfd_device.c drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h +4 more+97 -190 replies
4/11drm/amdkfd: Add skeleton H/W debugger module supportdrivers/gpu/drm/amd/amdkfd/Makefile drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h +6 more+1058 -20 replies
5/11drm/amdkfd: Add wave control operation to debuggerdrivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.h +2 more+430 -20 replies
6/11drm/amdkfd: Add address watch operation to debuggerdrivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.h+295 -00 replies
7/11drm/amdkfd: Implement (un)register debugger IOCTLsdrivers/gpu/drm/amd/amdkfd/kfd_chardev.c+70 -20 replies
8/11drm/amdkfd: Implement wave control debugger IOCTLdrivers/gpu/drm/amd/amdkfd/kfd_chardev.c+87 -10 replies
9/11drm/amdkfd: Implement address watch debugger IOCTLdrivers/gpu/drm/amd/amdkfd/kfd_chardev.c+103 -10 replies
10/11drm/radeon: Add ATC VMID<-->PASID functions to kfd->kgddrivers/gpu/drm/amd/include/kgd_kfd_interface.h drivers/gpu/drm/radeon/cikd.h drivers/gpu/drm/radeon/radeon_kfd.c+50 -50 replies
11/11drm/amdkfd: Enforce kill all waves on process terminationdrivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c drivers/gpu/drm/amd/amdkfd/kfd_priv.h +1 more+87 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/11] Add H/W Debugger module support to amdkfd

This patch-set adds the H/W debugger module support to amdkfd. The H/W debugger module support enables a userspace debugger, e.g gdb, to debug GPU kernels running in HSA mode.

The available operations in this patch-set are setting watchpoints in the GPU kernel and controlling wave-fronts.

It is important to mention that due to security reasons, the userspace process can only debug itself. This means that the process should contain an "agent" that could be connected to remotely by a debugger, which will provide the front-end to the user.

There is ongoing work inside AMD to provide such a tool via gdb extensions.

In addition, this patch-set enables amdkfd to "kill" all running waves, in case of an infinite GPU kernel (due to bug or malicious attack), by using the debugger infrastructure. This provides greater control to the kernel level, which is always a good thing, IMO.

More data is inside the individual commit messages.

Please review.

Thanks,

Oded

Alexey Skidanov (1):
drm/radeon: Add ATC VMID<-->PASID functions to kfd->kgd

Ben Goz (1):
drm/amdkfd: Enforce kill all waves on process termination

Yair Shachar (9):
drm/radeon: Add H/W debugger kfd->kgd functions drm/amdkfd: add H/W debugger IOCTL set definitions drm/amdkfd: Add static user-mode queues support drm/amdkfd: Add skeleton H/W debugger module support drm/amdkfd: Add wave control operation to debugger drm/amdkfd: Add address watch operation to debugger drm/amdkfd: Implement (un)register debugger IOCTLs drm/amdkfd: Implement wave control debugger IOCTL drm/amdkfd: Implement address watch debugger IOCTL

 drivers/gpu/drm/amd/amdkfd/Makefile                |   3 +-
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c           | 310 +++++++
 drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c            | 886 +++++++++++++++++++++
 drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h            | 193 +++++
 drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c            | 168 ++++
 drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.h            | 294 +++++++
 drivers/gpu/drm/amd/amdkfd/kfd_device.c            |   5 +
 .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c  |  48 +-
 .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.h  |   6 +
 drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c    |  46 +-
 drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers.h       |   6 +-
 drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_diq.h   | 290 +++++++
 drivers/gpu/drm/amd/amdkfd/kfd_priv.h              |  18 +
 drivers/gpu/drm/amd/amdkfd/kfd_process.c           |   8 +
 .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c |  18 +-
 drivers/gpu/drm/amd/include/kgd_kfd_interface.h    |  21 +
 drivers/gpu/drm/radeon/cik_reg.h                   |  56 +-
 drivers/gpu/drm/radeon/cikd.h                      |   9 +-
 drivers/gpu/drm/radeon/radeon_kfd.c                | 151 +++-
 include/uapi/linux/kfd_ioctl.h                     |  43 +-
 20 files changed, 2548 insertions(+), 31 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c
 create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h
 create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c
 create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.h
 create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_diq.h
Signature · 6 lines
2.1.0

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel