xe_vma_resolve_pagemap(9)
๐
xe_vma_resolve_pagemap โ from the Kernel API Manual, bestie ๐ซถ
okay so this one is literally about answering the question "which pagemap does this VMA get??" and honestly? it's giving matchmaker energy โจ
โจ NAME โจ
xe_vma_resolve_pagemap โ resolve the appropriate DRM pagemap for a VMA ๐
๐ธ SYNOPSIS ๐ธ
struct drm_pagemap * xe_vma_resolve_pagemap (struct xe_vma *vma , struct
xe_tile *tile );
๐ ARGUMENTS ๐
vmaโ pointer to thexe_vmastructure, and it's the one holding the memory attributes ๐ like that's her whole jobtileโ pointer to thexe_tilestructure, and it's used as the fallback for VRAM mapping ๐ฆ (the understudy, the safety net, the "if plan A ghosted us" option)
๐ DESCRIPTION ๐
so the whole point of this function is determining the correct DRM pagemap to use for a given VMA, periodt ๐ฅ
here's the sequence, no cap:
- first it checks whether a valid
devmem_fdis provided in the VMA's preferred location ๐ - if the
devmem_fdis negative, it returnsNULLโ which means no pagemap is available, andsmemis to be used as the preferred location ๐ (yes, that's the vibe: no pagemap, go to shared memory, it's fine, we move) - if the
devmem_fdequals the default faulting GT identifier, it returns the VRAM pagemap associated with thetileโจ slay, match made in heaven
and a lil peek into the future ๐ฎ โ future support for multi-device configurations may use drm_pagemap_from_fd to resolve pagemaps from arbitrary file descriptors. that's not a thing yet, it's just the roadmap, iykyk ๐ง
โญ RETURN โญ
a pointer to the resolved drm_pagemap ๐ โ or NULL if none is applicable. that's it, that's the answer, no crumbs left behind ๐
๐ฆ SEE ALSO ๐ฆ
kernel file ./drivers/gpu/drm/xe/xe_svm.c, plus drm_pagemap reference-counting in xe:(9) โ and honestly the whole friend group showed up for this one:
xe_svm_init(9)xe_svm_close(9)xe_svm_fini(9)xe_svm_range_validate(9)xe_svm_find_vma_start(9)xe_svm_range_needs_migrate_to_vram(9)xe_svm_handle_pagefault(9)xe_svm_has_mapping(9)xe_svm_unmap_address_range(9)xe_svm_bo_evict(9)xe_svm_range_find_or_insert(9)xe_svm_range_get_pages(9)xe_svm_ranges_zap_ptes_in_range(9)xe_svm_alloc_vram(9)xe_pagemap_create(9)xe_pagemap_find_or_create(9)xe_pagemap_shrinker_create(9)xe_pagemap_cache_create(9)xe_drm_pagemap_from_fd(9)xe_svm_flush(9)
and that's the whole page bestie ๐ mwah ๐
this icon lives in./drivers/gpu/drm/xe, stamped October 2026, and it's filed underxe_vma_resolve_pagemap(9)โ go off, you beautiful kernel doc ๐โจ
๐ฆ 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