STRUCT XE_VMA_MEM_ATTR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct xe_vma_mem_attr(9) ✨

okay bestie, welcome to the Kernel API Manual page for struct xe_vma_mem_attr β€” yes, it’s the memory-attributes-associated-with-vma situation, and we’re gonna go through every single field together. no cap, not one skipped. πŸ’–

πŸŽ€ NAME πŸŽ€

struct xe_vma_mem_attr β€” memory attributes associated with vma

🌈 SYNOPSIS 🌈

okay so the struct is literally this, and I’m keeping it exactly as-is because we do not mess with code, periodt:

       struct xe_vma_mem_attr {
           struct xe_vma_preferred_loc {
             u32 migration_policy;
             u32 devmem_fd;
             struct drm_pagemap *dpagemap;
           } preferred_loc;
           u32 atomic_access;
           u16 default_pat_index;
           u16 pat_index;
           u32 purgeable_state;
        };

πŸ’… Members πŸ’…

here’s the member-by-member breakdown, bestie. every field is main character and we are not skipping a single one:

  • preferred_loc β€” preferred memory_location
    • preferred_loc.migration_policy β€” Pages migration policy
    • preferred_loc.devmem_fd β€” used for determining pagemap_fd requested by user. DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM and DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE mean system memory or closest device memory respectively.
    • preferred_loc.dpagemap β€” Reference-counted pointer to the drm_pagemap preferred for migration on a SVM page-fault. The pointer is protected by the vm lock, and is NULL if devmem_fd should be consulted for special values.
  • atomic_access β€” The atomic access type for the vma. See DRM_XE_VMA_ATOMIC_UNDEFINED, DRM_XE_VMA_ATOMIC_DEVICE, DRM_XE_VMA_ATOMIC_GLOBAL, and DRM_XE_VMA_ATOMIC_CPU for possible values. These are defined in uapi/drm/xe_drm.h.
  • default_pat_index β€” The pat index for VMA set during first bind by user.
  • pat_index β€” The pat index to use when encoding the PTEs for this vma. same as default_pat_index unless overwritten by madvise.
  • purgeable_state β€” Purgeable hint for this VMA mapping
    • Per-VMA purgeable state from madvise. Valid states are WILLNEED (0) or DONTNEED (1). Shared BOs require all VMAs to be DONTNEED before the BO can be purged. PURGED state exists only at BO level.
    • Protected by BO dma-resv lock. Set via DRM_IOCTL_XE_MADVISE.

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./drivers/gpu/drm/xe/xe_vm_types.h
  • struct xe_userptr_vma(9)
  • struct xe_vm_fault_entry(9)

okay that’s the whole page, bestie 🫢 this came from ./drivers/gpu/drm/xe, dated October 2026. xoxo, stay slay, and don’t forget the vm lock πŸ’…βœ¨

πŸ“¦ where this page comes from