xe_vm_lock_vma(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– xe_vm_lock_vma(9) β€” the kernel API manual, bestie edition πŸ’–

okay so this is a page from the Kernel API Manual (section 9, the kernel-functions girlies ✨) and it's all about xe_vm_lock_vma, no cap.

✨ NAME ✨

xe_vm_lock_vma β€” a drm_exec utility that locks a vma. that's the whole vibe. it locks the thing. slay. πŸ’…

🌸 SYNOPSIS 🌸

int xe_vm_lock_vma (struct drm_exec *exec , struct xe_vma *vma );

literally two args, a struct drm_exec * and a struct xe_vma *, returns an int. iconic signature tbh πŸŽ€

πŸ¦‹ ARGUMENTS πŸ¦‹

  • exec β€” the drm_exec object we're currently locking for. like, the lock-y context you're already in, bestie 🫢
  • vma β€” the vma for witch we want to lock the vm resv and any attached object's resv. yes it says "witch" in the original and honestly? we respect the typo, it's giving spellement energy 🧚✨ (also note: it's the vm resv and any attached object's resv β€” both, not one, not the other, both πŸ’œ)

πŸ”₯ RETURN πŸ”₯

0 on success, negative error code on error. periodt.

in particular, it may return -EDEADLK on WW transaction contention, and -EINTR if an interruptible wait is terminated by a signal. so if you see those, don't panic β€” that's just the kernel telling you what's up πŸ˜­πŸ’€

heads up bestie: negative means something went wrong, so pls actually check the return value. this is not a "vibes only" situation πŸ™ˆ

🌈 SEE ALSO 🌈

the whole friend group, in the order the page gives them, no skips (and yes we're keeping the kernel file path too):

Kernel file ./drivers/gpu/drm/xe/xe_vm.c, xe_vm_drm_exec_lock(9), xe_vm_remove_compute_exec_queue(9), xe_vm_kill(9), xe_vm_validate_rebind(9), xe_vm_bump_lru(9), xe_vm_resume_rebind_worker(9), xe_vm_add_fault_entry_pf(9), xe_vm_range_rebind(9), xe_vm_range_unbind(9), xe_vma_mem_attr_copy(9), xe_vm_create_scratch(9), xe_vm_find_vma_by_addr(9), xe_vma_has_default_mem_attrs(9), struct xe_vma_lock_and_validate_flags(9), xe_vm_bind_kernel_bo(9), xe_vm_lock(9), xe_vm_unlock(9), xe_vm_invalidate_vma_submit(9), xe_vm_invalidate_vma(9), xe_vma_need_vram_for_atomic(9), xe_vm_alloc_madvise_vma(9), xe_vm_find_cpu_addr_mirror_vma_range(9), xe_vm_alloc_cpu_addr_mirror_vma(9), xe_vm_add_exec_queue(9), xe_vm_remove_exec_queue(9)

like, that's the whole squad, go read them too πŸ’–


and that's the page!! πŸŽ€ it lives under ./drivers/gpu/drm/xe (the source tree), dated October 2026 in this version of the manual β€” mwah, go lock some vmas responsibly bestie πŸ’…πŸ‘‘

πŸ“¦ where this page comes from