STRUCT DRM_GPUSVM_PAGES(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct drm_gpusvm_pages(9) ✨

okay so bestie, we're in the Kernel API Manual today and this page is literally all about one little struct that holds a GPU SVM mapped pages situation. no cap, it's giving "small struct, big responsibilities" πŸ’…


πŸŽ€ NAME πŸŽ€

struct drm_gpusvm_pages β€” the structure that represents a GPU SVM mapped pages. yes that's the whole name, she's not wordy, she's just iconic 🫢


🌸 SYNOPSIS 🌸

struct drm_gpusvm_pages {
    struct drm_device *drm;
    struct drm_pagemap_addr *dma_addr;
    struct drm_pagemap *dpagemap;
    struct dma_iova_state state;
    unsigned long state_offset;
    unsigned long notifier_seq;
    struct drm_gpusvm_pages_flags flags;
 };

like, look at her. seven fields. every one of them pulling her weight πŸ’–


πŸ¦‹ Members πŸ¦‹

  • drm β€” the struct drm_device that owns the dma mappings. she's the main character whose name is on the lease 🏠
  • dma_addr β€” the device address array. it's literally an array. of device addresses. slay ✨
  • dpagemap β€” the struct drm_pagemap of the device pages we're dma-mapping. heads up tho: this here is assuming only one drm_pagemap per range is allowed. that's the rule, don't come for me, i don't make the rules 😌
  • state β€” the DMA IOVA state for mapping. the vibe of the mapping, if you will πŸ”₯
  • state_offset β€” the DMA IOVA offset for mapping. she's the state's little offset bestie πŸ₯°
  • notifier_seq β€” the notifier sequence number of the range's pages. it counts, it sequences, it ate πŸ‘‘
  • flags β€” the flags for the range; see struct drm_gpusvm_pages_flags for what's actually in there. go look, i'll wait πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./include/drm/drm_gpusvm.h β€” and like, the whole extended friend group:

struct drm_gpusvm_ops(9), struct drm_gpusvm_notifier(9), struct drm_gpusvm_pages_flags(9), struct drm_gpusvm_range_flags(9), struct drm_gpusvm_range(9), struct drm_gpusvm(9), struct drm_gpusvm_ctx(9), drm_gpusvm_init_pages(9), enum drm_gpusvm_scan_result(9), drm_gpusvm_driver_set_lock(9), drm_gpusvm_notifier_lock(9), drm_gpusvm_notifier_unlock(9), drm_gpusvm_range_start(9), drm_gpusvm_range_end(9), drm_gpusvm_range_size(9), drm_gpusvm_notifier_start(9), drm_gpusvm_notifier_end(9), drm_gpusvm_notifier_size(9), __drm_gpusvm_range_next(9), drm_gpusvm_for_each_range(9), drm_gpusvm_for_each_range_safe(9), __drm_gpusvm_notifier_next(9), drm_gpusvm_for_each_notifier(9), drm_gpusvm_for_each_notifier_safe(9)

that's the whole group chat, fr fr. go say hi 🧚


k that's the page!! sourced from ./include/drm, dated October 2026, and yes she's still serving struct drm_gpusvm_pages(9) realness. love that for her πŸ’œπŸ“

πŸ“¦ where this page comes from