STRUCT DRM_XE_VM_CREATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct drm_xe_vm_create(9) πŸ’–

okay bestie, welcome to the Kernel API Manual page for struct drm_xe_vm_create(9) β€” this is the input struct for the DRM_IOCTL_XE_VM_CREATE ioctl, and it's lowkey the blueprint for making a VM. no cap, it's giving "small struct, big responsibilities" energy πŸ’…


🌸 NAME 🌸

struct drm_xe_vm_create β€” literally the input of &DRM_IOCTL_XE_VM_CREATE, fr fr.


✨ SYNOPSIS ✨

       struct drm_xe_vm_create {
           __u64 extensions;
         #define DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE      (1 << 0);
         #define DRM_XE_VM_CREATE_FLAG_LR_MODE           (1 << 1);
         #define DRM_XE_VM_CREATE_FLAG_FAULT_MODE        (1 << 2);
         #define DRM_XE_VM_CREATE_FLAG_NO_VM_OVERCOMMIT  (1 << 3);
           __u32 flags;
           __u32 vm_id;
           __u64 reserved[2];
        };

🧩 Members 🧩

  • extensions β€” pointer to the first extension struct, if any. very "optional add-ons" of it all ✨
  • flags β€” flags. yes bestie, that's the whole description, it's iconic in its brevity πŸŽ€
  • vm_id β€” returned VM ID πŸ‘‘
  • reserved β€” reserved. hands off, bestie πŸ™ˆ

πŸ”₯ Description πŸ”₯

the flags can be:

  • DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE β€” map the whole virtual address space of the VM to scratch page. a vm_bind would overwrite the scratch page mapping. this flag is mutually exclusive with the DRM_XE_VM_CREATE_FLAG_FAULT_MODE flag, with an exception on Xe2 and Xe3 platforms. so like, mostly they do not coexist, but Xe2 and Xe3 said "exception, bestie" πŸ’€
  • DRM_XE_VM_CREATE_FLAG_LR_MODE β€” an LR, or Long Running VM accepts exec submissions to its exec_queues that don't have an upper time limit on the job execution time. but exec submissions to these don't allow any of the sync types DRM_XE_SYNC_TYPE_SYNCOBJ, DRM_XE_SYNC_TYPE_TIMELINE_SYNCOBJ, used as out-syncobjs, that is, together with sync flag DRM_XE_SYNC_FLAG_SIGNAL. LR VMs can be created in recoverable page-fault mode using DRM_XE_VM_CREATE_FLAG_FAULT_MODE, if the device supports it. if that flag is omitted, the UMD can not rely on the slightly different per-VM overcommit semantics that are enabled by DRM_XE_VM_CREATE_FLAG_FAULT_MODE (see below), but KMD may still enable recoverable pagefaults if supported by the device. periodt, that's the whole tea πŸ“
  • DRM_XE_VM_CREATE_FLAG_FAULT_MODE β€” requires also DRM_XE_VM_CREATE_FLAG_LR_MODE. it allows memory to be allocated on demand when accessed, and also allows per-VM overcommit of memory. the xe driver internally uses recoverable pagefaults to implement this. so like, memory said "I'll be there when you need me" ✨
  • DRM_XE_VM_CREATE_FLAG_NO_VM_OVERCOMMIT β€” requires also DRM_XE_VM_CREATE_FLAG_FAULT_MODE. this disallows per-VM overcommit but only during a DRM_IOCTL_XE_VM_BIND operation with the DRM_XE_VM_BIND_FLAG_IMMEDIATE flag set. this may be useful for user-space naively probing the amount of available memory. ngl, that's kind of a mood πŸ”
bestie, the "requires also" bits are not optional vibes β€” they are requirements, and ignoring them is not the move 😭

🌈 SEE ALSO 🌈

kernel file ./include/uapi/drm/xe_drm.h β€” plus the whole friend group:

  • 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_mem_region(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_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)

okay that's the whole page, bestie 🫢 this one lives in ./include/uapi/drm, dated October 2026, and the page itself is struct drm_xe_vm_create(9) β€” slay, periodt βœ¨πŸ‘‘

πŸ“¦ where this page comes from