xe_pt_walk_shared(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… xe_pt_walk_shared(9) πŸ’…

okay bestie, welcome to the Kernel API Manual glow-up for xe_pt_walk_shared(9) β€” this is the one about walking shared page tables of a page-table tree, and it's lowkey iconic for unbind-type stuff. 🫢

✨ NAME ✨

xe_pt_walk_shared β€” walk shared page tables of a page-table tree.

πŸ¦‹ SYNOPSIS πŸ¦‹

int xe_pt_walk_shared (struct xe_ptw *parent , unsigned int level , u64
       addr , u64 end , struct xe_pt_walk *walk );

🌸 ARGUMENTS 🌸

  • parent β€” root page table directory. the main-character tree root.
  • level β€” level of the root. yes bestie, the root's level.
  • addr β€” start address. where the vibe begins.
  • end β€” last address + 1. not just the last address β€” it's last address + 1; that part matters, no cap.
  • walk β€” walk info. the little info bundle that keeps the walk going.

πŸŽ€ DESCRIPTION πŸŽ€

okay so this function is similar to xe_pt_walk_range, but it skips page tables that are private to the range. slay.

and because the root (or parent) page table is typically also a shared page table, this function is different in one specific way: it calls the pt_entry callback and the post_descend callback also for the root. yes, the root gets callback attention too.

you can detect the root in the callbacks by checking whether parent == *child. that's the little root-detection vibe check.

walking only the shared page tables is common for unbind-type operations, where the page-table entries for an address range are cleared or detached from the main page-table tree. very "cleaning up the shared bits" energy.

πŸ”₯ RETURN πŸ”₯

0 on success, and a negative error code on error: if a callback returns an error, the walk will be terminated and the error returned by this function. periodt.

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/gpu/drm/xe/xe_pt_walk.c GPU page-table tree walking.(9), xe_pt_walk_range(9)

xoxo, from ./drivers/gpu/drm/xe, dated October 2026, signed with love by xe_pt_walk_shared(9) πŸ’…βœ¨

πŸ“¦ where this page comes from