xe_vm_lock_vma(9)
π 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β thedrm_execobject 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
- 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