XE IOCTL EXTENSIONS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… Xe IOCTL Extensions

okay so before we get into the IOCTLs and all their structs, bestie, there is one thing you literally have to know first: every IOCTL in Xe is extensible. every single one. no cap. ✨

πŸ¦‹ the whole extensibility vibe

interfaces gotta grow, right? that's just the way that it is. most of the time we can simply extend the struct and have userspace pass in more data. but there's another option too β€” the one Vulkan does for forward and backward compatibility β€” where you use a list of optional structs to carry all those extra details. πŸ‘‘

the key advantage of using an extension chain is that it lets us redefine the interface way more easily than some ever-growing struct of increasing complexity, and it lets large parts of that interface be entirely optional. the downside? more pointer chasing 😭 β€” chasing across the __user boundary with pointers encapsulated inside u64. yes, inside a u64. that's the trade, babe.


πŸŽ€ Example chaining

struct drm_xe_user_extension ext3 {
        .next_extension = 0, // end
        .name = ...,
};
struct drm_xe_user_extension ext2 {
        .next_extension = (uintptr_t)ext3,
        .name = ...,
};
struct drm_xe_user_extension ext1 {
        .next_extension = (uintptr_t)ext2,
        .name = ...,
};

typically the struct drm_xe_user_extension would be embedded in some uAPI struct, and in that case we'd feed it the head of the chain (i.e. ext1), which would then apply all of the above extensions. like passing the aux cord to the first person in the group and letting the playlist cascade. πŸ”₯


✨ SEE ALSO ✨

so many icons in the references, bestie, look at this lineup:

  • kernel file ./include/uapi/drm/xe_drm.h β€” the actual source of truth, go read it 🫢
  • Xe Device Block Diagram(9)
  • Xe uAPI Overview(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_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 πŸ’‹ that's the page! this lil gem lives under ./include/uapi/drm, dated October 2026 β€” screenshot it, cite it, cite it again, you're welcome, iykyk πŸŒΈπŸ’œ

πŸ“¦ where this page comes from