aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJonathan Kim <jonathan.kim@amd.com>2025-06-23 14:12:58 -0400
committerAlex Deucher <alexander.deucher@amd.com>2025-12-16 13:23:17 -0500
commite83f63da2ac776fbc30861e4ce8b798df6ee8a7a (patch)
tree17f35dccc671eb0a55a640351dc234983eefdeb2 /include
parentbf2951e967fc241804613208268a14f493e9c3d7 (diff)
drm/amdkfd: allow debug subscription to lds violations on gfx 1250
GFX 1250 allows the debugger to subcribe to LDS out-of-range read/write memory violations. Bump IOCTL minor version and flag KFD capabilities for enablement hint. Signed-off-by: Jonathan Kim <jonathan.kim@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/kfd_ioctl.h4
-rw-r--r--include/uapi/linux/kfd_sysfs.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h
index 4d0c1a53f9d5..6e91875c10ba 100644
--- a/include/uapi/linux/kfd_ioctl.h
+++ b/include/uapi/linux/kfd_ioctl.h
@@ -46,9 +46,10 @@
* - 1.18 - Rename pad in set_memory_policy_args to misc_process_flag
* - 1.19 - Add a new ioctl to craete secondary kfd processes
* - 1.20 - Trap handler support for expert scheduling mode available
+ * - 1.21 - Debugger support to subscribe to LDS out-of-address exceptions
*/
#define KFD_IOCTL_MAJOR_VERSION 1
-#define KFD_IOCTL_MINOR_VERSION 20
+#define KFD_IOCTL_MINOR_VERSION 21
struct kfd_ioctl_get_version_args {
__u32 major_version; /* from KFD */
@@ -947,6 +948,7 @@ enum kfd_dbg_trap_address_watch_mode {
enum kfd_dbg_trap_flags {
KFD_DBG_TRAP_FLAG_SINGLE_MEM_OP = 1,
KFD_DBG_TRAP_FLAG_SINGLE_ALU_OP = 2,
+ KFD_DBG_TRAP_FLAG_LDS_OUT_OF_ADDR_RANGE = 4
};
/* Trap exceptions */
diff --git a/include/uapi/linux/kfd_sysfs.h b/include/uapi/linux/kfd_sysfs.h
index 1125fe47959f..0b6ce2f3c887 100644
--- a/include/uapi/linux/kfd_sysfs.h
+++ b/include/uapi/linux/kfd_sysfs.h
@@ -64,7 +64,8 @@
#define HSA_CAP_RESERVED 0x000f8000
#define HSA_CAP2_PER_SDMA_QUEUE_RESET_SUPPORTED 0x00000001
-#define HSA_CAP2_RESERVED 0xfffffffe
+#define HSA_CAP2_TRAP_DEBUG_LDS_OUT_OF_ADDR_RANGE_SUPPORTED 0x00000002
+#define HSA_CAP2_RESERVED 0xfffffffc
/* debug_prop bits in node properties */
#define HSA_DBG_WATCH_ADDR_MASK_LO_BIT_MASK 0x0000000f