GLOBAL GRAPHICS TRANSLATION TABLE (GGTT)(9)
π Global Graphics Translation Table (GGTT) β from the Kernel API Manual, section 9 π
okay bestie, welcome to GGTT(9) β this is the Kernel API Manual page for the Global Graphics Translation Table, and honestly? it's giving main-character memory-management energy β¨
πΈ DESCRIPTION πΈ
So the Xe GGTT is the vibe check for a Global Virtual Address space β like, it's the address space that's reserved for resources that only privileged (i.e. kernel-mode) processes get to touch, and it is not tied to any specific user-level process. Lowkey exclusive. π For example, the Graphics micro-Controller (GuC) and the Display Engine (if present) are the ones utilizing this Global address space. iykyk.
The Global GTT (GGTT) translates from the Global virtual address to a physical address that can be accessed by HW. And the GGTT itself? It's a flat, single-level table. no nesting, no drama, just vibes. π¦
Xe implements a simplified version of the GGTT that specifically manages only a certain range of it β the range that goes from the Write Once Protected Content Memory (WOPCM) Layout to a predefined GUC_GGTT_TOP. We do this on purpose, fr fr, because it avoids all the complications related to the GuC (Graphics Microcontroller) hardware limitations. π«Ά
Here's the tea on the GuC address space: it's limited on both ends of the GGTT, because the GuC shim HW redirects accesses to those addresses to other HW areas instead of going through the GGTT. Iconic of it, honestly.
- On the bottom end, the GuC can't access offsets below the WOPCM size π«
- On the top side, the limit is fixed at
GUC_GGTT_TOPπ
To keep things simple, instead of checking each object to see if they are accessed by GuC or not, we just exclude those areas from the allocator. efficiency queen πβ¨
Plus β and this is the part that ate β to simplify the driver load, we use the maximum WOPCM size in this logic instead of the programmed one, so we don't need to wait until the actual size to be programmed is determined (which requires FW fetch) before initializing the GGTT. Not me avoiding a whole blocking dependency ππ
These simplifications might waste space in the GGTT (about 20-25 MBs depending on the platform) but we can live with this. π it's fine. we're fine.
Another benefit of this: the GuC bootrom can't access anything below the WOPCM max size, so anything the bootrom needs to access (e.g. a RSA key) needs to be placed in the GGTT above the WOPCM max size. Starting the GGTT allocations above the WOPCM max gives us the correct placement for free. slay. no cap. π₯
β¨ SEE ALSO β¨
Kernel file ./drivers/gpu/drm/xe/xe_ggtt.c β go read the source, bestie, it's all in there π§
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_shift_nodes(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)
okay that's the whole page, bestie β you're officially GGTT-literate π
this lil masterpiece lives in ./drivers/gpu/drm/xe and it's dated October 2026, brought to you by the Kernel API Manual, section 9. mwah π ππ¦πΈ
π¦ 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