STRUCT DRM_I915_GEM_VM_CONTROL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct drm_i915_gem_vm_control(9) β€” from the Kernel API Manual, bestie πŸ’–

okay so this is a whole struct in the kernel API docs and it's literally the blueprint for making and unmaking a VM. like, virtual memory address space energy. let's get into it ✨


🌸 NAME 🌸

struct drm_i915_gem_vm_control β€” the structure you use to create or destroy a VM. periodt.


πŸŽ€ SYNOPSIS πŸŽ€

struct drm_i915_gem_vm_control {
    __u64 extensions;
    __u32 flags;
    __u32 vm_id;
 };

that's the whole shape of it, no cap πŸ’…


πŸ¦‹ Members πŸ¦‹

  • extensions β€” a zero-terminated chain of extensions. it's giving "linked list but make it official" πŸ”₯
  • flags β€” reserved for future usage, currently MBZ (that's "must be zero", keep it that way bestie πŸ™ˆ)
  • vm_id β€” the id of the VM that's being created or the one that's about to be destroyed πŸ’€

⭐ Description ⭐

πŸ’œ DRM_I915_GEM_VM_CREATE πŸ’œ

okay so this one creates a brand-new virtual memory address space (that's ppGTT, iykyk) for use inside a context on the same file. and the cute part? you can hand over extensions to configure exactly how that address space gets set up when it's created 🫢

the id of the new VM β€” and yes, it's bound to the fd β€” comes back to you in the outparam id, so you can use it with I915_CONTEXT_PARAM_VM later. lowkey iconic how that works ✨

you may provide an extension chain, starting at extensions and terminated by the next_extension being 0. but heads up: currently, no extensions are defined. so like, the door's open but nobody's walked through yet πŸšͺ

πŸ’€ DRM_I915_GEM_VM_DESTROY πŸ’€

this one destroys a previously created VM id, and you specify which one in vm_id. bye bestie πŸ‘‹

no extensions or flags are allowed currently, so they must be zero. fr fr, not a suggestion.

🌈 SEE ALSO 🌈

go read these too, they're all in the same lore:

  • the Kernel file ./tools/perf/trace/beauty/include/uapi/drm/i915_drm.h
  • uevents generated by i915 on its device node(9)
  • struct i915_user_extension(9)
  • enum drm_i915_gem_engine_class(9)
  • struct i915_engine_class_instance(9)
  • perf_events exposed by i915 through /sys/bus/event_sources/drivers/i915(9)
  • struct drm_i915_getparam(9)
  • drm_i915_getparam_t(9)
  • struct drm_i915_gem_mmap_offset(9)
  • struct drm_i915_gem_set_domain(9)
  • struct drm_i915_gem_exec_fence(9)
  • struct drm_i915_gem_execbuffer_ext_timeline_fences(9)
  • struct drm_i915_gem_execbuffer2(9)
  • struct drm_i915_gem_caching(9)
  • struct drm_i915_gem_context_create_ext(9)
  • struct drm_i915_gem_context_param(9)
  • Virtual Engine uAPI(9)
  • struct i915_context_engines_parallel_submit(9)
  • Context Engine Map uAPI(9)
  • struct drm_i915_gem_context_create_ext_setparam(9)
  • struct drm_i915_gem_userptr(9)
  • struct drm_i915_perf_oa_config(9)
  • struct drm_i915_query_item(9)
  • struct drm_i915_query(9)
  • struct drm_i915_query_topology_info(9)
  • Engine Discovery uAPI(9)
  • struct drm_i915_engine_info(9)
  • struct drm_i915_query_engine_info(9)
  • struct drm_i915_query_perf_config(9)
  • enum drm_i915_gem_memory_class(9)
  • struct drm_i915_gem_memory_class_instance(9)
  • struct drm_i915_memory_region_info(9)
  • struct drm_i915_query_memory_regions(9)
  • struct drm_i915_query_guc_submission_version(9)
  • GuC HWCONFIG blob uAPI(9)
  • struct drm_i915_gem_create_ext(9)
  • struct drm_i915_gem_create_ext_memory_regions(9)
  • struct drm_i915_gem_create_ext_protected_content(9)
  • struct drm_i915_gem_create_ext_set_pat(9)

and that's the whole page bestie, hope it slayed πŸ’…βœ¨ this came out of ./tools/perf/trace/beauty/incl… with a date stamp of October 2026, and it's still sitting pretty under the name struct drm_i…m_vm_control(9). mwah, go build a VM πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from