__kvm_pgtable_stage2_init(9)
π __kvm_pgtable_stage2_init(9) π
okay so weβre in the Kernel API Manual, bestie, and this page is all about __kvm_pgtable_stage2_init β the glow-up ritual for a guest stage-2 page-table. sheβs giving setup era, and weβre obsessed π
β¨
πΈ NAME πΈ
__kvm_pgtable_stage2_init β initialise a guest stage-2 page-table. literally the βmake it officialβ moment for your S2 page-table π«Ά
β¨ SYNOPSIS β¨
bestie, the signature is right here β copy it exactly, no freestyling:
int __kvm_pgtable_stage2_init (struct kvm_pgtable *pgt , struct
kvm_s2_mmu *mmu , struct kvm_pgtable_mm_ops *mm_ops , enum
kvm_pgtable_stage2_flags flags , kvm_pgtable_force_pte_cb_t force_pte_cb
);
it returns an int, so yeah, success/failure energy is baked in π
π¦ ARGUMENTS π¦
pgtβ the Uninitialised page-table structure to initialise. sheβs not ready yet; this function is her main character moment πmmuβ the S2 MMU context for this S2 translation. context is everything, periodt β¨mm_opsβ memory management callbacks. the little helpers that keep the vibe functional πflagsβ Stage-2 configuration flags. choose your fighter πforce_pte_cbβ a function that returnstrueif page level mappings must be used instead of block mappings. no cap, she decides whether block mappings get to slay or not π
π₯ RETURN π₯
0 on success, negative error code on failure. thatβs it, thatβs the mood: zero is the win, negative is the βmmk bestie something went sidewaysβ π
π SEE ALSO π
go read these too, bestie β same list, no skips, iykyk π§
- 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_init(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_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)
mwah π this page lives under ./arch/arm64/include/asm, comes from the Kernel API Manual, and itβs dated October 2026. go be iconic with your page-tables, bestie π
β¨πΈ
π¦ 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