xe_pt_nonshared_offsets(9)
π 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 (peepenum page_walk_actionfor 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+ 1is 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:
xe_pt_create(9)xe_pt_populate_empty(9)xe_pt_shift(9)xe_pt_destroy(9)xe_pt_clear(9)Pagetable building(9)struct xe_pt_stage_bind_walk(9)xe_pt_stage_bind(9)xe_pt_zap_ptes(9)xe_pt_zap_ptes_range(9)xe_pt_stage_unbind(9)xe_pt_update_ops_prepare(9)xe_pt_update_ops_run(9)xe_pt_update_ops_fini(9)xe_pt_update_ops_abort(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms