svm_range_check_vm(9)
π svm_range_check_vm(9) π
okay bestie, welcome to the Kernel API Manual β today's main character is svm_range_check_vm(9), and she is literally here to check if a virtual address range is already mapped. no cap. β¨
β¨ NAME β¨
svm_range_check_vm β check if virtual address range mapped already
πΈ SYNOPSIS πΈ
int svm_range_check_vm (struct kfd_process *p , uint64_t start ,
uint64_t last , uint64_t *bo_s , uint64_t *bo_l );
π ARGUMENTS π
pβ currentkfd_processstartβ range start address, in pageslastβ range last address, in pagesbo_sβ mapping start address in pages if address range already mappedbo_lβ mapping last address in pages if address range already mapped
π¦ DESCRIPTION π¦
okay so the whole purpose here is to avoid virtual address ranges that are already allocated by the kfd_ioctl_alloc_memory_of_gpu ioctl. lowkey important. It literally looks for each pdd in the kfd_process. π
Return vibe check: returns 0 β OK, if the range is not mapped. Otherwise error code:
-EADDRINUSEβ if address is mapped already bykfd_ioctl_alloc_memory_of_gpu-ERESTARTSYSβ A wait for the buffer to become unreserved was interrupted by a signal. Release all buffer reservations and return to user-space.
π§ CONTEXT π§
Process context. periodt. π
π SEE ALSO π
Kernel file: ./drivers/gpu/drm/amd/amdkfd/kfd_svm.c
the whole SEE ALSO squad is:
svm_range_unlink(9)svm_range_add_to_svms(9)svm_range_debug_dump(9)svm_range_split_adjust(9)svm_range_split(9)svm_range_list_lock_and_flush_work(9)svm_range_evict(9)svm_range_add(9)svm_range_cpu_invalidate_pagetables(9)svm_range_from_addr(9)svm_range_is_valid(9)svm_range_best_prefetch_location(9)
mwah π this little page comes from the source/version line ./drivers/gpu/drm/amd/amdkfd and is dated October 2026; it's the svm_range_check_vm(9) entry. bye bestie, go check those ranges π«Ά
π¦ 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