amdgpu_vm_bo_replace_map(9)
π amdgpu_vm_bo_replace_map(9) β Kernel API Manual π
okay so bestie, welcome to the amdgpu_vm_bo_replace_map(9) page π
this is straight out of the Kernel API Manual and it's genuinely such a mood. grab a strawberry π and let's get into it.
β¨ NAME β¨
amdgpu_vm_bo_replace_map β map a BO inside a VM, but like, replacing the mappings that are already chilling there π
π¦ SYNOPSIS π¦
int amdgpu_vm_bo_replace_map (struct amdgpu_device *adev , struct
amdgpu_bo_va *bo_va , uint64_t saddr , uint64_t offset , uint64_t size ,
uint32_t flags );
π ARGUMENTS π
adevβ amdgpu_device pointer, i.e. the whole device situation π₯οΈbo_vaβ the bo_va that's gonna store the address, lowkey the main character heresaddrβ where to map the BO πoffsetβ the offset you're requesting in the BOsizeβ BO size in bytes, fr frflagsβ attributes of the pages (read/write/valid/etc.) π·οΈ
πΈ DESCRIPTION πΈ
so what it does: it adds a mapping of the BO at the specified addr into the VM β¨ and because it's an icon, it replaces the existing mappings while it's at it. like, out with the old, in with the new, no cap.
β οΈ bestie listen β the object has to be reserved and unreserved outside! that's not optional, that's the vibe check. don't come for this function without doing that first π«Ά
β RETURN β
0 for success, error for failure. that's it, that's the whole mood ππ
π SEE ALSO π
Kernel file ./drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c β and honestly the whole extended universe, because this page has so many friends π§ββοΈ:
GPUVM(9)struct amdgpu_prt_cb(9)struct amdgpu_vm_tlb_seq_struct(9)amdgpu_vm_assert_locked(9)amdgpu_vm_is_bo_always_valid(9)amdgpu_vm_bo_evicted(9)amdgpu_vm_bo_needs_update(9)amdgpu_vm_bo_idle(9)amdgpu_vm_bo_reset_state_machine(9)amdgpu_vm_update_shared(9)amdgpu_vm_bo_update_shared(9)amdgpu_vm_update_stats_locked(9)amdgpu_vm_update_stats(9)amdgpu_vm_bo_base_init(9)amdgpu_vm_lock_pd(9)amdgpu_vm_lock_individual(9)amdgpu_vm_move_to_lru_tail(9)amdgpu_vm_generation(9)amdgpu_vm_validate(9)amdgpu_vm_ready(9)amdgpu_vm_check_compute_bug(9)amdgpu_vm_need_pipeline_sync(9)amdgpu_vm_flush(9)amdgpu_vm_bo_find(9)amdgpu_vm_map_gart(9)amdgpu_vm_update_pdes(9)amdgpu_vm_tlb_seq_cb(9)amdgpu_vm_tlb_flush(9)amdgpu_vm_update_range(9)amdgpu_vm_bo_update(9)amdgpu_vm_update_prt_state(9)amdgpu_vm_prt_get(9)amdgpu_vm_prt_put(9)amdgpu_vm_prt_cb(9)amdgpu_vm_add_prt_cb(9)amdgpu_vm_free_mapping(9)amdgpu_vm_prt_fini(9)amdgpu_vm_clear_freed(9)amdgpu_vm_handle_moved(9)amdgpu_vm_flush_compute_tlb(9)amdgpu_vm_bo_add(9)amdgpu_vm_bo_insert_map(9)amdgpu_vm_bo_map(9)amdgpu_vm_bo_unmap(9)amdgpu_vm_bo_clear_mappings(9)amdgpu_vm_bo_lookup_mapping(9)amdgpu_vm_bo_trace_cs(9)amdgpu_vm_bo_del(9)amdgpu_vm_evictable(9)amdgpu_vm_bo_invalidate(9)amdgpu_vm_bo_move(9)amdgpu_vm_get_block_size(9)amdgpu_vm_adjust_size(9)amdgpu_vm_wait_idle(9)amdgpu_vm_put_task_info(9)amdgpu_vm_get_task_info_vm(9)amdgpu_vm_get_task_info_pasid(9)amdgpu_vm_set_task_info(9)amdgpu_vm_init(9)amdgpu_vm_make_compute(9)amdgpu_vm_fini(9)amdgpu_vm_manager_init(9)amdgpu_vm_manager_fini(9)amdgpu_vm_ioctl(9)amdgpu_vm_lock_by_pasid(9)amdgpu_vm_handle_fault(9)amdgpu_debugfs_vm_bo_info(9)amdgpu_vm_update_fault_cache(9)
like I said. so many friends. ate π π₯
and that's the page bestie!! go forth and replace those mappings β¨π¦
kisses from the ./drivers/gpu/drm/amd/amdgpu crew β this one's dated October 2026, so yes she's from the future and yes she's 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