add_va_block_locked(9)
β¨ add_va_block_locked(9) β¨
okay so bestie, this is a page from the Kernel API Manual and it's all about add_va_block_locked β a function that literally adds a virtual block to the virtual addresses list. no cap, that's the whole vibe. π
πΈ NAME πΈ
add_va_block_locked β add a virtual block to the virtual addresses list. periodt. π
π¦ SYNOPSIS π¦
int add_va_block_locked (struct hl_device *hdev , struct list_head
*va_list , u64 start , u64 end );
like, that's the signature, copy it exactly or the compiler will absolutely humble you. π
π ARGUMENTS π
hdevβ pointer to the habanalabs device structure. it's giving "main character device energy" πva_listβ pointer to the virtual addresses block list. the guest list, basically. ποΈstartβ start virtual address. where the block begins, bestie. βendβ end virtual address. where it wraps up. π
π₯ DESCRIPTION π₯
This function does the following:
- Add the given block to the virtual blocks list and merge with other blocks if a contiguous virtual block can be created. lowkey iconic behavior β it doesn't just dump the block in, it merges when things line up. π«Ά
This Function should be called only whenva_listlock is taken. fr fr do not skip the lock, that's the whole point of the_lockedsuffix. π
π SEE ALSO π
Kernel file ./drivers/accel/habanalabs/common/memory.c
dma_map_host_va(9)dma_unmap_host_va(9)dram_pg_pool_do_release(9)free_phys_pg_pack(9)free_device_memory(9)clear_va_list_locked(9)print_va_list_locked(9)merge_va_blocks_locked(9)add_va_block(9)is_hint_crossing_range(9)get_va_block(9)hl_get_va_range_type(9)hl_unreserve_va_block(9)init_phys_pg_pack_from_userptr(9)map_phys_pg_pack(9)unmap_phys_pg_pack(9)map_device_va(9)unmap_device_va(9)hl_hw_block_mmap(9)export_dmabuf_from_addr(9)allocate_timestamps_buffers(9)hl_pin_host_memory(9)hl_userptr_delete_list(9)hl_userptr_is_pinned(9)va_range_init(9)va_range_fini(9)vm_ctx_init_with_ranges(9)hl_vm_ctx_fini(9)hl_vm_init(9)hl_vm_fini(9)hl_hw_block_mem_init(9)hl_hw_block_mem_fini(9)
like, the whole friend group is here. iykyk. π
and that's the tea π β this page lives under ./drivers/accel/habanalabs/common and it's dated October 2026, with the manual title add_va_block_locked(9). slay, go read the kernel source 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