xe_vm_range_unbind(9)
π xe_vm_range_unbind(9) β or, "how to say bye to a VM range" π
okay bestie, buckle up, because we're diving into the Kernel API Manual and this one's a little function with a big job. it lives in xe_vm_range_unbind(9) and honestly? it's giving "cleanup crew, but make it GPU" β¨
πΈ NAME πΈ
xe_vm_range_unbind β VM range unbind. that's it, that's the whole vibe. short, sweet, and it does exactly what it says on the tin π
β¨ SYNOPSIS β¨
here's the signature, character for character, no cap:
struct dma_fence * xe_vm_range_unbind (struct xe_vm *vm , struct
xe_svm_range *range );
so you hand it a vm and a range, and it hands you back a struct dma_fence *. iconic behavior π«Ά
π¦ ARGUMENTS π¦
two lil' parameters, both essential, neither optional:
vmβ the VM which the range belongs to. it's the range's home base, its main character, the whole reason we're here π«rangeβ the SVM range to rebind. (yes, the page says rebind even though the function is called unbind β we don't make the rules, we just document them π)
π DESCRIPTION π
okay so here's what actually goes down: this bad boy unbinds an SVM range, which removes the GPU page tables for that range. poof π¨ gone. the page tables said "not today" and left the chat.
literally it's the cleanup step. the "you don't live here anymore" moment. and honestly? slay π₯
β RETURN β
what do you get back, you ask? glad you asked bestie:
- on success β a
dma fencefor the unbind, so you can signal completion. yes queen, asynchronous and polite π - on failure β an
ERR_PTR. π that's your signal that something went sideways, check it before you dereference, fr fr.
π SEE ALSO π
okay this is the part where the manpage goes FULL group-chat-adds-everyone mode. the kernel file in question is:
./drivers/gpu/drm/xe/xe_vm.c
and here's the whole squad, no one left behind, we're all in this thread π§:
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_vma_mem_attr_copy(9)xe_vm_lock_vma(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 I said. everyone. and yes, struct xe_vma_lock_and_validate_flags(9) is written exactly like that β we're not touching it, we're not questioning it, we're just passing it along π
pro tip from me to you π«Ά β xe_vm_range_rebind(9) is right there in the list, so if you ever unbind and then get the urge to rebind... the kernel already thought of that. iykyk β¨
and that's the page, bestie π this gem came out of ./drivers/gpu/drm/xe, dated October 2026, and it's filed under xe_vm_range_unbind(9) in the Kernel API Manual. go forth, unbind responsibly, and remember: the page tables were never yours to keep πΈπ
π¦ 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