STRUCT KFD_IOCTL_SET_XNACK_MODE_ARGS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ struct kfd_ioctl_set_xnack_mode_args(9) πŸŽ€

okay so bestie, welcome to the Kernel API Manual, section 9 β€” this is the page for struct kfd_ioctl_set_xnack_mode_args, and it's basically the remote control for XNACK mode. tiny struct, big consequences, let's get into it πŸ’…


✨ NAME ✨

struct kfd_ioctl_set_xnack_mode_args β€” literally just the arguments for set_xnack_mode. that's it. that's the whole name. iconic minimalism 🫢


🌸 SYNOPSIS 🌸

struct kfd_ioctl_set_xnack_mode_args {
    __s32 xnack_enabled;
 };

not me showing you the entire struct in one breath 😭 it's genuinely just the one member, we love a low-effort icon ✨


πŸ¦‹ Members πŸ¦‹

  • xnack_enabled β€” an [in/out] field, bestie, meaning it goes in and comes back out: whether to enable XNACK mode for this process πŸ‘‘

πŸ’– Description πŸ’–

so xnack_enabled tells you whether recoverable page faults should be enabled for the current process. the rules are:

  • 0 means disabled πŸ™ˆ
  • positive means enabled ✨
  • negative means leave unchanged β€” like, don't touch it, hands off, she's fine 🫢

if it's enabled, virtual address translations on GFXv9 and later AMD GPUs can return XNACK and retry the access until a valid PTE is available. and that, bestie, is how device page faults get implemented 🧚

on output, xnack_enabled returns the (new) current mode β€” so 0 or positive. which means: a negative input value is literally the hack to query the current mode without changing it. read-only mode, spy mode, no-touchy mode πŸ”₯ iykyk

real talk though, the XNACK mode fundamentally changes the way SVM managed memory works in the driver, with subtle effects on application performance and functionality. subtle. like, "you won't notice until you definitely notice" subtle πŸ’€

enabling XNACK mode requires shader programs to be compiled differently. and not all GPUs support changing the mode per-process. sooooo, changing the mode is only allowed while no user mode queues exist in the process. that's the vibe check that makes sure no shader code is running that may be compiled for the wrong mode πŸŽ€

and GPUs that cannot change to the requested mode will prevent the XNACK mode from occurring. no cap. also: all GPUs used by the process must be in the same XNACK mode. everyone matching outfits or nobody goes out 🌈

last thing β€” GFXv8 or older GPUs do not support 48 bit virtual addresses or SVM. therefore those GPUs are not considered for the XNACK mode switch. sorry bestie, not invited to the party 😭


⭐ Return ⭐

  • 0 on success πŸŽ‰
  • -errno on failure πŸ˜”

πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, bestie, they're all in the same fam:

  • 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_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_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, you ate that πŸ’œ this lil drop came from ./include/uapi/linux and it's dated October 2026 β€” mwah, slay, go enable some page faults responsibly πŸŒΈβœ¨πŸŽ€

πŸ“¦ where this page comes from