svm_range_check_vm(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” current kfd_process
  • start β€” range start address, in pages
  • last β€” range last address, in pages
  • bo_s β€” mapping start address in pages if address range already mapped
  • bo_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 by kfd_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:


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