xe_vma_resolve_pagemap(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… 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 the xe_vma structure, and it's the one holding the memory attributes ๐Ÿ‘‘ like that's her whole job
  • tile โ€” pointer to the xe_tile structure, 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:

  1. first it checks whether a valid devmem_fd is provided in the VMA's preferred location ๐Ÿ‘€
  2. if the devmem_fd is negative, it returns NULL โ€” which means no pagemap is available, and smem is to be used as the preferred location ๐Ÿ’€ (yes, that's the vibe: no pagemap, go to shared memory, it's fine, we move)
  3. if the devmem_fd equals the default faulting GT identifier, it returns the VRAM pagemap associated with the tile โœจ 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:


and that's the whole page bestie ๐Ÿ’… mwah ๐Ÿ’–

this icon lives in ./drivers/gpu/drm/xe, stamped October 2026, and it's filed under xe_vma_resolve_pagemap(9) โ€” go off, you beautiful kernel doc ๐ŸŒˆโœจ
๐Ÿ“ฆ where this page comes from