__kvm_pgtable_stage2_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ __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 returns true if 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 🧚


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