xe_vm_bind_kernel_bo(9)
π xe_vm_bind_kernel_bo(9) β from the Kernel API Manual, bestie
okay so picture this: it's a Tuesday, you're deep in ./drivers/gpu/drm/xe, and you need to glue a kernel BO into a kernel VM. that's literally this function. no cap, it's the whole gig. β¨
β¨ NAME β¨
xe_vm_bind_kernel_bo β bind a kernel BO to a VM π«Ά
πΈ SYNOPSIS πΈ
struct dma_fence * xe_vm_bind_kernel_bo (struct xe_vm *vm , struct xe_bo
*bo , struct xe_exec_queue *q , u64 addr , enum xe_cache_level cache_lvl
);
like yes she takes five arguments and yes she returns a struct dma_fence * β we'll get to that π
π ARGUMENTS π
vmβ the VM you're binding the BO to. the destination, the vibe, the home πboβ the BO being bound. she's the main character here πqβ the exec queue to use for the bind. it's optional, so no pressure bestie πaddrβ the address where the BO gets bound. pick a spot, any spot πcache_lvlβ the PAT cache level to use. this is anenum xe_cache_level, so use the enum, not vibes π§
π₯ DESCRIPTION π₯
so what she actually does: she executes a VM bind map operation on a kernel-owned BO, and that's how it gets bound into a kernel-owned VM. kernel BO rights π«Ά
she returns a dma_fence so you can track when the binding completes β but ONLY if the job to do so was successfully submitted. otherwise? error pointer. π so fr fr, check your return value, don't just assume it slayed.
ngl the sentence above is the entire contract: dma_fence = job submitted, error pointer = it did not. that's it, that's the tea π
β SEE ALSO β
Kernel file ./drivers/gpu/drm/xe/xe_vm.c β and the whole extended friend group of VM functions, in the exact order the manpage lists them, because we do not skip anyone at this table:
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_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_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)
all of them. every single one. we ate and left no crumbs π
and that's the whole page, bestie β courtesy of the kernel docs living at ./drivers/gpu/drm/xe, dated October 2026, under the manual page name xe_vm_bind_kernel_bo(9). go bind something iconic ππβ¨
π¦ 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