xe_pt_nonshared_offsets(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… xe_pt_nonshared_offsets(9) β€” like, the whole Kernel API Manual page, bestie

okay so we're in the Kernel API Manual and the main character of today's episode is xe_pt_nonshared_offsets, which lowkey does exactly what it says on the tin: it figures out which entries of a shared pagetable are the non-shared ones πŸ’–


✨ SYNOPSIS ✨

bool xe_pt_nonshared_offsets (u64 addr , u64 end , unsigned int level ,
       struct xe_pt_walk *walk , enum page_walk_action *action , pgoff_t
       *offset , pgoff_t *end_offset );

yeah she's a long one, but we stan a thorough signature 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • addr β€” the start address inside the non-shared pagetable. like, where the vibe begins ✨
  • end β€” the end address inside the non-shared pagetable. where it stops, basically πŸ›‘
  • level β€” the level of the non-shared pagetable. yes, level matters, keep reading πŸ‘€
  • walk β€” walk info. and heads up: the function adjusts the walk action, so she's not just reading here, she's editing πŸ’…
  • action β€” the next action to perform (peep enum page_walk_action for the deets)
  • offset β€” ignored on input, and on output it's the first non-shared entry. so, like, a glow-up on the way out 🌸
  • end_offset β€” ignored on input, and on output it's the last non-shared entry + 1. the + 1 is giving fencepost realness, no cap πŸ”₯

πŸ¦‹ DESCRIPTION πŸ¦‹

so. a non-shared page-table has some entries that belong to the address range and some that literally do not πŸ™ˆ that's just the situation. this function's whole job is determining the entries that belong fully to the address range.

depending on level, some entries may only partially belong to the address range β€” and heads up, that can't happen at level 0 πŸ’€ so don't come for her about it.

the function detects those partial situations and adjusts the offsets so those partial entries get left out. like, not invited to the party βœ‹

and here's the tea β˜• β€” iff it does detect partial entries, we know there must be shared page tables at lower levels too, so it adjusts the walk action accordingly. the logic is connected, iykyk 🧚


⭐ RETURN ⭐

true if there were non-shared entries, false otherwise. that's it, that's the whole vibe check πŸ’–


🌈 SEE ALSO 🌈

kernel file ./drivers/gpu/drm/xe/xe_pt.c plus the whole friend group:


okay and finally, the cute lil sign-off πŸŽ€ this one lives in ./drivers/gpu/drm/xe, it's dated October 2026, and yeah, the page title is still xe_pt_nonshared_offsets(9) because some things never change, periodt πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from