pkvm_alloc_private_va_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– pkvm_alloc_private_va_range(9) πŸ’–

okay so real talk, bestie: this is a page from the Kernel API Manual, and it's giving β€œsmall function, very specific job” energy. Let's get into it ✨


🌸 NAME 🌸

pkvm_alloc_private_va_range β€” Allocates a private VA range.

πŸ¦‹ SYNOPSIS πŸ¦‹

int pkvm_alloc_private_va_range (size_t size , unsigned long *haddr );

πŸŽ€ ARGUMENTS πŸŽ€

  • size β€” The size of the VA range to reserve. literally the amount of virtual address space we're asking for πŸ’…
  • haddr β€” The hypervisor virtual start address of the allocation. this is where the starting address gets handed back to you 🫢

✨ DESCRIPTION ✨

The private virtual address (VA) range is allocated above __io_map_next and aligned based on the order of size. that's the whole vibe: it sits above __io_map_next, and the alignment is determined by the order of size β€” no cap, that's the rule πŸ”₯

πŸ’œ RETURN πŸ’œ

0 on success or negative error code on failure. so like, zero means slay, negative means something went wrong 😭

🌈 SEE ALSO 🌈

  • Kernel file ./arch/arm64/kvm/hyp/nvhe/mm.c

mwah πŸ’‹ sign-off time: this cutie came from source/version ./arch/arm64/kvm/hyp/nvhe, dated October 2026, and the function is pkvm_alloc_private_va_range(9). periodt πŸ’…βœ¨

πŸ“¦ where this page comes from