xe_pt_walk_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… xe_pt_walk_range(9) β€” like, the Kernel API Manual era πŸ’…

okay bestie, gather round, because this one is a lil helper function from the Kernel API Manual and it's honestly serving "I do one thing and I do it well" energy. Let's get into it πŸŽ€


✨ NAME ✨

xe_pt_walk_range β€” walks a range of a gpu page table tree, and hits up a callback for every single page-table entry at all the levels. yes, all of them. no skipped levels, no cutting corners, we're thorough here πŸ’…


🌸 SYNOPSIS 🌸

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

that's the whole vibe. five args, one int coming back at you ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • parent β€” the root page table where the walk starts. like, the main character of the tree πŸ‘‘
  • level β€” the level of that root page table. gotta know where you're starting, iykyk.
  • addr β€” the virtual address start. where we begin, bestie 🌱
  • end β€” the virtual address end + 1. yes, plus one β€” it's that exclusive-end thing, don't come for me, that's just how it is πŸ™ˆ
  • walk β€” the walk info. all the walk-y details live in here 🫢

πŸ’– DESCRIPTION πŸ’–

so like… it's similar to the CPU page-table walker, right? this is a helper that walks a gpu page table and calls a callback function you provide for each entry. that's it, that's the whole job. it's giving "reliable friend who texts back" energy, fr fr ✨

no cap, that's genuinely all it does β€” you hand it a tree and a range, it strolls through and pings your callback at every entry on the way. iconic behaviour honestly 🌈


πŸ”₯ RETURN πŸ”₯

  • 0 on success β€” slay, we did it πŸ’…
  • a negative error code on error β€” and bestie, listen, that error is propagated from the callback, so if your callback throws hands, that's what you get back. also, on error the walk is terminated. like, stopped. done. no more entries. periodt πŸ’€
fr fr though: error in the callback = walk over. plan accordingly 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/gpu/drm/xe/xe_pt_walk.c GPU page-table tree walking.(9) β€” the source file itself, go read it, it's right there πŸ“
  • xe_pt_walk_shared(9) β€” its bestie, go say hi πŸ’œ

and that's the page!! 🌸 this lil drop came to you from ./drivers/gpu/drm/xe (the source/version, mwah πŸ’‹) and it's dated October 2026 β€” mark your calendars bestie, that's the era we're in β­πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from