hyp_alloc_private_va_range(9)
π hyp_alloc_private_va_range(9) β from the Kernel API Manual, bestie
okay so picture this: you're deep in arch/arm64/kvm land and you need a private virtual address range for the hypervisor. yes. that's the whole vibe of this page. it's giving "reserve me a lil slice of VA space, please and thank you" β¨
πΈ NAME πΈ
hyp_alloc_private_va_range β literally just allocates a private VA range. no cap, that's it.
π SYNOPSIS π
int hyp_alloc_private_va_range (size_t size , unsigned long *haddr );
like look at her. two args. so clean. so iconic. π«Ά
π¦ ARGUMENTS π¦
sizeβ the size of the VA range you wanna reserve. that's the whole number, bestie, don't skimp πhaddrβ out comes the hypervisor virtual start address of the allocation. this is where you find out where your range actually landed π
β¨ DESCRIPTION β¨
so the private virtual address (VA) range gets allocated below io_map_base, and it's aligned based on the order of size. that's the whole tea π
like, that's genuinely all she does. below io_map_base, aligned by the order of size. periodt. π₯
ngl, if you're wondering about the exact alignment maths β it's "based on the order of size" and that's what the page says, so that's what you get π no extra lore from me.
π RETURN π
0on success π (we love to see it)- negative error code on failure π (she tried her best)
π SEE ALSO π
the source of all this wisdom lives in the kernel file ./arch/arm64/kvm/mmu.c β go read her, she ate π
and here's the whole friend group, all cross-referenced and everything:
kvm_arch_flush_remote_tlbs(9)__unmap_stage2_range(9)stage2_flush_vm(9)free_hyp_pgds(9)create_hyp_mappings(9)create_hyp_io_mappings(9)create_hyp_exec_mappings(9)kvm_init_stage2_mmu(9)stage2_unmap_vm(9)kvm_phys_addr_ioremap(9)kvm_stage2_wp_range(9)kvm_mmu_wp_memory_region(9)kvm_mmu_split_memory_region(9)kvm_handle_guest_abort(9)
like that's a whole squad. main character energy from every single one tbh π§
okay mwah, that's a wrap π this lil page came from ./arch/arm64/kvm and she's dated October 2026 β put that in your calendar, bestie, and go reserve yourself a private VA range. slay πβ¨
π¦ 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