STRUCT DRM_XE_MEM_REGION(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, welcome to struct drm_xe_mem_region(9) from the Kernel API Manual β€” the page that describes some region as known to the driver. That's the whole assignment, and she understood it. ✨

✨ SYNOPSIS ✨

Here's the struct, exactly as she is, no edits, no "improvements":

struct drm_xe_mem_region {
    __u16 mem_class;
    __u16 instance;
    __u32 min_page_size;
    __u64 total_size;
    __u64 used;
    __u64 cpu_visible_size;
    __u64 cpu_visible_used;
    __u64 reserved[6];
};

🫢 Members 🫢

Now let's unpack the fields, bestie. Every single one is getting her moment. πŸ‘‘

  • mem_class β€” The memory class describing this region. See enum drm_xe_memory_class for supported values. πŸ‘‘
  • instance β€” The unique ID for this region, which serves as the index in the placement bitmask used as argument for DRM_IOCTL_XE_GEM_CREATE. πŸŽ€
  • min_page_size β€” Min page-size in bytes for this region. When the kernel allocates memory for this region, the underlying pages will be at least min_page_size in size. Buffer objects with an allowable placement in this region must be created with a size aligned to this value. GPU virtual address mappings of (parts of) buffer objects that may be placed in this region must also have their GPU virtual address and range aligned to this value. Affected IOCTLS will return -EINVAL if alignment restrictions are not met. πŸ˜­πŸ“
  • total_size β€” The usable size in bytes for this region. πŸ’–
  • used β€” Estimate of the memory used in bytes for this region. πŸ“
  • cpu_visible_size β€” How much of this region can be CPU accessed, in bytes. This will always be <= total_size, and the remainder (if any) will not be CPU accessible. If the CPU accessible part is smaller than total_size then this is referred to as a small BAR system. On systems without small BAR (full BAR), the cpu_visible_size will always equal the total_size, since all of it will be CPU accessible. Note this is only tracked for DRM_XE_MEM_REGION_CLASS_VRAM regions (for other types the value here will always equal zero). πŸ¦‹
  • cpu_visible_used β€” Estimate of CPU visible memory used, in bytes. Note this is only currently tracked for DRM_XE_MEM_REGION_CLASS_VRAM regions (for other types the value here will always be zero). 🌸
  • reserved β€” Reserved. πŸŽ€

🌈 SEE ALSO 🌈

Kernel file ./include/uapi/drm/xe_drm.h β€” plus the whole reference squad, all together, no cap: Xe Device Block Diagram(9), Xe uAPI Overview(9), Xe IOCTL Extensions(9), struct drm_xe_user_extension(9), struct drm_xe_ext_set_property(9), struct drm_xe_engine_class_instance(9), struct drm_xe_engine(9), struct drm_xe_query_engines(9), enum drm_xe_memory_class(9), struct drm_xe_query_mem_regions(9), struct drm_xe_query_config(9), struct drm_xe_gt(9), struct drm_xe_query_gt_list(9), struct drm_xe_query_topology_mask(9), struct drm_xe_query_engine_cycles(9), struct drm_xe_query_uc_fw_version(9), struct drm_xe_query_pxp_status(9), struct drm_xe_device_query(9), struct drm_xe_gem_create(9), struct drm_xe_gem_mmap_offset(9), struct drm_xe_vm_create(9), struct drm_xe_vm_destroy(9), struct drm_xe_vm_bind_op(9), struct drm_xe_vm_bind(9), struct drm_xe_vm_get_property(9), struct drm_xe_exec_queue_create(9), struct drm_xe_exec_queue_destroy(9), struct drm_xe_exec_queue_get_property(9), struct drm_xe_sync(9), struct drm_xe_exec(9), struct drm_xe_wait_user_fence(9), enum drm_xe_observation_type(9), enum drm_xe_observation_op(9), struct drm_xe_observation_param(9), enum drm_xe_observation_ioctls(9), enum drm_xe_oa_unit_type(9), struct drm_xe_oa_unit(9), struct drm_xe_query_oa_units(9), enum drm_xe_oa_format_type(9), enum drm_xe_oa_property_id(9), struct drm_xe_oa_config(9), struct drm_xe_oa_stream_status(9), struct drm_xe_oa_stream_info(9), enum drm_xe_pxp_session_type(9), enum drm_xe_eu_stall_property_id(9), struct drm_xe_query_eu_stall(9), struct drm_xe_madvise(9), struct drm_xe_mem_range_attr(9), struct drm_xe_vm_query_mem_range_attr(9), struct drm_xe_exec_queue_set_property(9), Xe DRM RAS(9), enum drm_xe_ras_error_severity(9), enum drm_xe_ras_error_component(9). πŸ’œ

mwah πŸ’‹ β€” signing off from ./include/uapi/drm, October 2026, all about struct drm_xe_mem_region(9). She's iconic, she's aligned, and she's done. Periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from