xe_ggtt_shift_nodes(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” the xe_ggtt struct 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_start should be a value between xe_wopcm_size and #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:

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