xe_ggtt_shift_nodes(9)
π xe_ggtt_shift_nodes(9) β a Kernel API Manual moment πΈ
okay bestie, buckle up, this one is from the Kernel API Manual (yes, the whole manual, we're fancy now π) and it's genuinely such a neat little function. it's called xe_ggtt_shift_nodes, and the vibes are: the address space moved, so everybody scooch over. π¦
β¨ NAME β¨
xe_ggtt_shift_nodes β shift GGTT nodes so they line up with a change in the usable address range. like musical chairs but for memory mappings, no cap π
π SYNOPSIS π
void xe_ggtt_shift_nodes (struct xe_ggtt *ggtt , u64 new_start );
it takes a struct xe_ggtt * and a u64, and it returns void. nothing back, it just does the thing. main character energy fr fr β¨
π ARGUMENTS π
ggttβ thexe_ggttstruct instance. this is your girl, the actual GGTT object you're operating on π«Άnew_startβ the new location of the area provisioned for the current VF. so like, where the whole party is relocating to π¦
π DESCRIPTION π
so here's the tea: this function makes sure that all the struct xe_ggtt_nodes get moved to the new_start base address β and it does that by changing the base offset of the GGTT itself. no dragging each node around by hand, we just change the base and everyone follows. iconic behavior honestly π
this function may be called multiple times during recovery, which sounds stressful but it's fine β because if new_start is unchanged from the current base, it's a noop. literally nothing happens. a little nap. zero effort. we love a function that knows when to chill π΄
π¨ heads up bestie:new_startshould be a value betweenxe_wopcm_sizeand#GUC_GGTT_TOP. that's the valid window, don't go outside it, okay? π
π¦ SEE ALSO π¦
okay this part is a whole friend group, I'm obsessed. here's literally everyone:
- Kernel file
./drivers/gpu/drm/xe/xe_ggtt.c - Global Graphics Translation Table (GGTT)(9)
struct xe_ggtt_node(9)struct xe_ggtt_pt_ops(9)struct xe_ggtt(9)xe_ggtt_start(9)xe_ggtt_size(9)xe_ggtt_alloc(9)xe_ggtt_init_early(9)xe_ggtt_node_remove(9)xe_ggtt_init(9)xe_ggtt_insert_node(9)xe_ggtt_node_pt_size(9)xe_ggtt_map_bo(9)xe_ggtt_map_bo_unlocked(9)xe_ggtt_insert_node_transform(9)xe_ggtt_insert_bo_at(9)xe_ggtt_insert_bo(9)xe_ggtt_remove_bo(9)xe_ggtt_largest_hole(9)xe_ggtt_assign(9)xe_ggtt_node_save(9)xe_ggtt_node_load(9)xe_ggtt_dump(9)xe_ggtt_print_holes(9)xe_ggtt_encode_pte_flags(9)xe_ggtt_read_pte(9)xe_ggtt_node_addr(9)xe_ggtt_node_size(9)
like, the whole squad showed up to the group chat. iykyk π§
kk that's the whole page bestie π this little gem lives over in ./drivers/gpu/drm/xe and the manual's date stamp says October 2026 β so she's fresh, she's current, she slayed. go shift some nodes. 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