History

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.

Jonathan Kim committed 1 year ago

Commit e83f63d1 parent bf2951e4 files · +16 −2Browse files

Showing the changes to include/uapi (2 of 4 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/kfd_ioctl.h +3 −1
  2. include/uapi/linux/kfd_sysfs.h +2 −1
include/uapi/linux/kfd_ioctl.h+3−1
@@ -46,9 +46,10 @@ · 45 unmodified lines
4646 * - 1.18 - Rename pad in set_memory_policy_args to misc_process_flag
4747 * - 1.19 - Add a new ioctl to craete secondary kfd processes
4848 * - 1.20 - Trap handler support for expert scheduling mode available
49+ * - 1.21 - Debugger support to subscribe to LDS out-of-address exceptions
4950 */
5051 #define KFD_IOCTL_MAJOR_VERSION 1
51−#define KFD_IOCTL_MINOR_VERSION 20
52+#define KFD_IOCTL_MINOR_VERSION 21
5253
5354 struct kfd_ioctl_get_version_args {
5455 __u32 major_version; /* from KFD */
@@ -947,6 +948,7 @@ enum kfd_dbg_trap_address_watch_mode { · 892 unmodified lines
947948 enum kfd_dbg_trap_flags {
948949 KFD_DBG_TRAP_FLAG_SINGLE_MEM_OP = 1,
949950 KFD_DBG_TRAP_FLAG_SINGLE_ALU_OP = 2,
951+ KFD_DBG_TRAP_FLAG_LDS_OUT_OF_ADDR_RANGE = 4
950952 };
951953
952954 /* Trap exceptions */
include/uapi/linux/kfd_sysfs.h+2−1
@@ -64,7 +64,8 @@ · 63 unmodified lines
6464 #define HSA_CAP_RESERVED 0x000f8000
6565
6666 #define HSA_CAP2_PER_SDMA_QUEUE_RESET_SUPPORTED 0x00000001
67−#define HSA_CAP2_RESERVED 0xfffffffe
67+#define HSA_CAP2_TRAP_DEBUG_LDS_OUT_OF_ADDR_RANGE_SUPPORTED 0x00000002
68+#define HSA_CAP2_RESERVED 0xfffffffc
6869
6970 /* debug_prop bits in node properties */
7071 #define HSA_DBG_WATCH_ADDR_MASK_LO_BIT_MASK 0x0000000f