kvm_pgtable_hyp_init(9)
π kvm_pgtable_hyp_init(9) β like, the hypervisor stage-1 page-table glow-up π
Okay bestie, welcome to the Kernel API Manual β¨ β this is kvm_pgtable_hyp_init(9) and she is the moment your hypervisor stage-1 page-table gets born. Think of it as the birth announcement, but for page tables. Iconic.
πΈ NAME πΈ
kvm_pgtable_hyp_init β initialises a hypervisor stage-1 page-table. That's it, that's the whole personality. π
β¨ SYNOPSIS β¨
int kvm_pgtable_hyp_init (struct kvm_pgtable *pgt , u32 va_bits , struct
kvm_pgtable_mm_ops *mm_ops );
Yes the spacing is like that. We don't fix it, we respect it. π
π¦ ARGUMENTS π¦
pgtβ the uninitialised page-table structure you're about to bring to life. She starts empty, bestie, and it's your job to initialise her. Main character energy fr fr.va_bitsβ maximum virtual address bits. That's the ceiling, the limit, the "how much address space are we working with" number. π«Άmm_opsβ memory management callbacks. The little crew of functions that handles the memory stuff for you. No cap, you gotta supply them.
π₯ RETURN π₯
0on success π β everything slayed, page-table initialised.- A negative error code on failure π β something went sideways, check the code.
π SEE ALSO π
The whole extended friend group π«Ά β all these live in the kernel file ./arch/arm64/include/asm/kvm_pgtable.h:
struct kvm_pgtable_mm_ops(9)enum kvm_pgtable_stage2_flags(9)enum kvm_pgtable_prot(9)enum kvm_pgtable_walk_flags(9)struct kvm_pgtable_walker(9)struct kvm_pgtable(9)kvm_pgtable_hyp_destroy(9)kvm_pgtable_hyp_map(9)kvm_pgtable_hyp_unmap(9)kvm_get_vtcr(9)kvm_pgtable_stage2_pgd_size(9)__kvm_pgtable_stage2_init(9)kvm_pgtable_stage2_destroy(9)kvm_pgtable_stage2_destroy_range(9)kvm_pgtable_stage2_destroy_pgd(9)kvm_pgtable_stage2_free_unlinked(9)kvm_pgtable_stage2_create_unlinked(9)kvm_pgtable_stage2_map(9)kvm_pgtable_stage2_annotate(9)kvm_pgtable_stage2_unmap(9)kvm_pgtable_stage2_wrprotect(9)kvm_pgtable_stage2_mkyoung(9)kvm_pgtable_stage2_test_clear_young(9)kvm_pgtable_stage2_relax_perms(9)kvm_pgtable_stage2_split(9)kvm_pgtable_walk(9)kvm_pgtable_get_leaf(9)kvm_pgtable_stage2_pte_prot(9)kvm_pgtable_hyp_pte_prot(9)kvm_tlb_flush_vmid_range(9)
That's thirty entries. We listed all thirty. Obsessed with our consistency. πβ¨
π Quick vibe check: pgt has to be uninitialised when you hand it over β this function does the initialising. Don't double-init, bestie, that's not the move. π
And that's the whole page, bestie β brought to you by ./arch/arm64/include/asm π§, dated October 2026 β, and signed off by kvm_pgtable_hyp_init(9) herself π. Go initialise something beautiful. Periodt. π
π
π¦ 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