STRUCT DRM_XE_VM_BIND(9)
π struct drm_xe_vm_bind(9)
okay so bestie, welcome to the Kernel API Manual β specifically the page for struct drm_xe_vm_bind, which is literally the input of &DRM_IOCTL_XE_VM_BIND. no cap, this is the glow-up struct that tells the kernel how to bind stuff into a VM. β¨
β¨ SYNOPSIS β¨
struct drm_xe_vm_bind {
__u64 extensions;
__u32 vm_id;
__u32 exec_queue_id;
__u32 pad;
__u32 num_binds;
union {
struct drm_xe_vm_bind_op bind;
__u64 vector_of_binds;
};
__u32 pad2;
__u32 num_syncs;
__u64 syncs;
__u64 reserved[2];
};
π«Ά Members π«Ά
extensionsβ pointer to the first extension struct, if any. yes bestie, the extension chain, if you've got one π«vm_idβ the ID of the VM to bind to. the actual destination, main character energy only πΈexec_queue_idβ this one's picky: it must be of classDRM_XE_ENGINE_CLASS_VM_BIND, and the exec queue must have the samevm_id. If it's zero, the default VM bind engine is used instead. so like, zero = "you pick for me", iconic πpadβ MBZ. that's "must be zero", don't be quirky with it πnum_bindsβ how many binds are in this IOCTL. the count, the vibe check of quantity π₯{unnamed_union}β anonymous. she has no name but she has range πbindβ used ifnum_binds == 1. the one-at-a-time path βvector_of_bindsβ userptr to an array ofstruct drm_xe_vm_bind_op, used ifnum_binds > 1. the whole-groupchat path πpad2β MBZ again. second verse, same as the first, zero it πnum_syncsβ amount of syncs to wait on. how many syncs we're waiting on, literally β³syncsβ pointer to astruct drm_xe_syncarray π¦reservedβ reserved. hands off, bestie π
π Description π
Below is an example of a minimal use of struct drm_xe_vm_bind to asynchronously bind the buffer data at address BIND_ADDRESS, to illustrate userptr. It can be synchronized by using the example provided for struct drm_xe_sync. so yes, minimal, asynchronous, and it works β obsessed π
data = aligned_alloc(ALIGNMENT, BO_SIZE);
struct drm_xe_vm_bind bind = {
.vm_id = vm,
.num_binds = 1,
.bind.obj = 0,
.bind.obj_offset = to_user_pointer(data),
.bind.range = BO_SIZE,
.bind.addr = BIND_ADDRESS,
.bind.op = DRM_XE_VM_BIND_OP_MAP_USERPTR,
.bind.flags = 0,
.num_syncs = 1,
.syncs = sync,
.exec_queue_id = 0,
};
ioctl(fd, DRM_IOCTL_XE_VM_BIND, bind);
π¦ SEE ALSO π¦
Kernel file ./include/uapi/drm/xe_drm.h
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_create(9)struct drm_xe_vm_destroy(9)struct drm_xe_vm_bind_op(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)
and that's the whole page, bestie β every last cross-reference, we did not skip a single one π
this lil cutie came out of the kernel file ./include/uapi/drm, stamped October 2026, and it's filed under struct drm_xe_vm_bind(9) β go bind something, ily, mwah π«Άπ
π¦ 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