xe_pt_stage_bind(9)
π xe_pt_stage_bind β a Kernel API Manual moment π
okay so bestie, welcome to the xe_pt_stage_bind(9) page from the Kernel API Manual, and honestly? it's giving "let me build you a whole tree" and I'm obsessed. sit down, grab a strawberry π, we're doing page tables.
β¨ NAME β¨
xe_pt_stage_bind β literally builds a disconnected page-table tree for a given address range. that's it, that's the whole vibe π¦
π SYNOPSIS π
int xe_pt_stage_bind (struct xe_tile *tile , struct xe_vma *vma , struct
xe_svm_range *range , struct xe_vm_pgtable_update *entries , u32
*num_entries , bool clear_pt );
like, look at that signature. it ate. no cap π
π«Ά ARGUMENTS π«Ά
tileβ the tile we're building for. it's the main character here πvmaβ the vma, aka the thing indicating the address range.rangeβ the range, aka the other thing indicating the address range. yes both. iykyk.entriesβ storage for the update entries, which are used for connecting the tree to the main tree at commit time. lowkey the most important lil container ever πnum_entriesβ on output, this contains the number of entries used. so it goes in empty-ish and comes out with β¨knowledgeβ¨clear_ptβ clear the page table entries. that's the whole job, fr fr.
π DESCRIPTION π
so here's the tea, bestie π« β this function builds a disconnected page-table tree for a given address range. a whole separate tree! floating on its own! main character energy, but disconnected.
then it gets connected to the main vm tree:
- for the gpu using
xe_migrate_update_pgtables - for the cpu using
xe_pt_commit_bind
and the way it works internally is honestly so cool π β the function builds xe_vm_pgtable_update structures for already existing shared page-tables, and the non-existing shared and non-shared page-tables are built and populated directly. like, no middleman. iconic.
π return 0 on success, and a negative error code on error. that's the deal, periodt.
π§ SEE ALSO π§
the whole friend group is listed here and they're all slaying in the kernel file ./drivers/gpu/drm/xe/xe_pt.c:
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_nonshared_offsets(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)
like, go read them. they're right there. i'm not gonna gatekeep πβ¨
and that's a wrap, bestie!! this whole page lives its best life under ./drivers/gpu/drm/xe, and it was dated October 2026 β yes, the future. we're ahead of the curve π
π¦ mwah, go build some page tables, you've got this π«Άπ
π¦ 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