STRUCT DRM_XE_VM_CREATE(9)
π 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. avm_bindwould overwrite the scratch page mapping. this flag is mutually exclusive with theDRM_XE_VM_CREATE_FLAG_FAULT_MODEflag, 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 itsexec_queuesthat don't have an upper time limit on the job execution time. but exec submissions to these don't allow any of the sync typesDRM_XE_SYNC_TYPE_SYNCOBJ,DRM_XE_SYNC_TYPE_TIMELINE_SYNCOBJ, used as out-syncobjs, that is, together with sync flagDRM_XE_SYNC_FLAG_SIGNAL. LR VMs can be created in recoverable page-fault mode usingDRM_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 byDRM_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 alsoDRM_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 alsoDRM_XE_VM_CREATE_FLAG_FAULT_MODE. this disallows per-VM overcommit but only during aDRM_IOCTL_XE_VM_BINDoperation with theDRM_XE_VM_BIND_FLAG_IMMEDIATEflag 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms