STRUCT KFD_IOCTL_RUNTIME_ENABLE_ARGS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct kfd_ioctl_runtime_enable_args β€” Kernel API Manual ✨

okay so bestie, welcome to the Kernel API Manual entry for struct kfd_ioctl_runtime_enable_args πŸŽ€ (the running header truncates it all cute like struct kfd_i..._enable_args(9) β€” don't panic, it's the same struct, she's just shy in the margins 🫢). This is the little bundle of args you hand over when you're doing a runtime enable call, and yes it's giving debugger-girlie main character energy πŸ’….


🌸 NAME 🌸

struct kfd_ioctl_runtime_enable_args β€” literally the arguments for runtime enable. that's it, that's the vibe ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

struct kfd_ioctl_runtime_enable_args {
    __u64 r_debug;
    __u32 mode_mask;
    __u32 capabilities_mask;
 };

three fields, zero drama. slay πŸ’œ


πŸ’– Members πŸ’–

  • r_debug β€” a pointer to a user struct that's there so ROCr and the debugger can share info between each other 🀝 like a lil group chat for processes.
  • mode_mask β€” the mask that sets the mode πŸ”₯
    • KFD_RUNTIME_ENABLE_MODE_ENABLE_MASK β€” enable runtime for debugging, otherwise disable (yep, it's a toggle situation)
    • KFD_RUNTIME_ENABLE_MODE_TTMP_SAVE_MASK β€” enable trap temporary setup (and this one gets ignored on disable, no cap πŸ™ˆ)
  • capabilities_mask β€” the mask that notifies the runtime on what KFD actually supports πŸ‘‘ it's the "here's what I bring to the function" moment.

⭐ Description ⭐

This is the struct that coordinates debug exception signalling and debug device enablement with the runtime 🧚 it's the middleman, the mutual friend, the one who makes the plans actually happen.

Return value? 0 on SUCCESS πŸŽ‰ periodt.

  • EBUSY if the runtime enable call is already pending β€” like, bestie, you already sent that text, chill πŸ’€
  • EEXIST if user queues are already active prior to the call. and heads up: if the process is debug enabled, runtime enable will enable debug devices and then wait for the debugger process to send the runtime exception EC_PROCESS_RUNTIME to unblock it 😭 see kfd_ioctl_dbg_trap_args. yes, it really does just stand there waiting. iconic but also awkward.
ngl, that wait is real β€” the call won't come back until that exception lands πŸ™ˆ

🌈 SEE ALSO 🌈

kernel file ./include/uapi/linux/kfd_ioctl.h struct, and the whole friend group:

  • struct kfd_ioctl_criu_args(9)
  • enum kfd_ioctl_svm_op(9)
  • enum kfd_ioctl_svm_attr_type(9)
  • struct kfd_ioctl_svm_attribute(9)
  • struct kfd_ioctl_svm_args(9)
  • struct kfd_ioctl_set_xnack_mode_args(9)
  • struct kfd_ioctl_dbg_trap_enable_args(9)
  • struct kfd_ioctl_dbg_trap_send_runtime_event_args(9)
  • struct kfd_ioctl_dbg_trap_set_exceptions_enabled_args(9)
  • struct kfd_ioctl_dbg_trap_set_wave_launch_override_args(9)
  • struct kfd_ioctl_dbg_trap_set_wave_launch_mode_args(9)
  • struct kfd_ioctl_dbg_trap_suspend_queues_args(9)
  • struct kfd_ioctl_dbg_trap_resume_queues_args(9)
  • struct kfd_ioctl_dbg_trap_set_node_address_watch_args(9)
  • struct kfd_ioctl_dbg_trap_clear_node_address_watch_args(9)
  • struct kfd_ioctl_dbg_trap_set_flags_args(9)
  • struct kfd_ioctl_dbg_trap_query_debug_event_args(9)
  • struct kfd_ioctl_dbg_trap_query_exception_info_args(9)
  • struct kfd_ioctl_dbg_trap_queue_snapshot_args(9)
  • struct kfd_ioctl_dbg_trap_device_snapshot_args(9)
  • struct kfd_ioctl_dbg_trap_args(9)
  • struct kfd_ioctl_pmc_settings(9)

🌸 and that's the whole page, bestie! source file lives at ./include/uapi/linux, dated October 2026, and the footer is out here repping struct kfd_i..._enable_args(9) one last time. go forth and enable your runtimes responsibly πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from