STRUCT KFD_IOCTL_DBG_TRAP_SET_NODE_ADDRESS_WATCH_ARGS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 struct kfd_ioctl_dbg_trap_set_node_address_watch_args(9) 🌸

okay bestie, welcome to the Kernel API Manual ✨ this one's a little struct page and honestly? it's giving "small but mighty." let's get into it πŸ’…


πŸ’– NAME πŸ’–

struct kfd_ioctl_dbg_trap_set_node_address_watch_args β€” literally just the arguments for KFD_IOC_DBG_TRAP_SET_NODE_ADDRESS_WATCH. that's the whole vibe. it's the little envelope of info you hand over when you wanna set an address watch πŸŽ€


✨ SYNOPSIS ✨

struct kfd_ioctl_dbg_trap_set_node_address_watch_args {
    __u64 address;
    __u32 mode;
    __u32 mask;
    __u32 gpu_id;
    __u32 id;
 };

look at her. five fields. no notes. 🫢


πŸ¦‹ Members πŸ¦‹

so here's the breakdown of every single field, no cap:

  • address (IN) β€” the watch address you're setting. the actual address. the star of the show. πŸ‘‘
  • mode (IN) β€” the mode, and you gotta check kfd_dbg_trap_address_watch_mode for what the options are. iykyk.
  • mask (IN) β€” the watch address mask. yes bestie, there's a mask. 🌸
  • gpu_id (IN) β€” which target gpu you wanna set the watch point on. gotta know your girl. πŸ’œ
  • id (OUT) β€” the watch id that gets allocated and handed back to you. it's an OUT field so this is where the answer lands 🎁

πŸ”₯ Description πŸ”₯

sets the address watch for the device. simple as that, periodt.

generic errors apply (go peek at kfd_dbg_trap_operations for those, bestie). returns - 0 on SUCCESS. the allocated watch ID gets returned to id, which is the whole point of an OUT field, slay. ✨

here's the specific error situation, and yes we're listing them:

  • ENODEV if gpu_id not found. that gpu? doesn't exist. not found. gone. 😭
  • ENOMEM if watch IDs can be allocated β€” that's what the page says, fr fr, writing it exactly like that 🫢
ngl, keep your gpu_id valid or you're meeting ENODEV and it's not gonna be a cute moment πŸ’€

🌈 SEE ALSO 🌈

the whole extended friend group, in order, all of them, here we go:

Kernel file ./include/uapi/linux/kfd_ioctl.h 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_runtime_enable_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_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 page!! source is ./include/uapi/linux, dated October 2026 β€” mwah, kisses, go set some address watches responsibly πŸ’–πŸŽ€πŸ§š
πŸ“¦ where this page comes from