kvm_pgtable_stage2_split(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ kvm_pgtable_stage2_split(9) β€” a Kernel API Manual moment πŸŽ€

okay bestie, welcome to the Kernel API Manual page for kvm_pgtable_stage2_split. this one is lowkey iconic: it takes big huge-page ranges and tries to split them into little leaf PTEs that point at PAGE_SIZE guest pages. no cap, it’s giving page-table surgery πŸ’…βœ¨


🌸 NAME 🌸

kvm_pgtable_stage2_split β€” Split a range of huge pages into leaf PTEs pointing to PAGE_SIZE guest pages.


✨ SYNOPSIS ✨

int kvm_pgtable_stage2_split (struct kvm_pgtable *pgt , u64 addr , u64 size , struct kvm_mmu_memory_cache *mc );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • pgt β€” Page-table structure initialised by kvm_pgtable_stage2_init.
  • addr β€” Intermediate physical address from which to split.
  • size β€” Size of the range.
  • mc β€” Cache of pre-allocated and zeroed memory from which to allocate page-table pages.

πŸ’œ DESCRIPTION πŸ’œ

The function tries to split any level 1 or 2 entry that overlaps with the input range (given by addr and size).

like, it’s literally looking at the range you handed it and going β€œokay bestie, which of these bigger entries can we break down?” 🫢


πŸ”₯ RETURN πŸ”₯

0 on success, negative error code on failure. Note that kvm_pgtable_stage2_split is best effort: it tries to break as many blocks in the input range as allowed by mc_capacity.

so yeah, it’s not out here promising perfection β€” it’s best effort, periodt. πŸ’€

🌈 SEE ALSO 🌈


bye bestie πŸ’– this page is from ./arch/arm64/include/asm, dated October 2026, and the footer name is still kvm_pgtable_stage2_split(9). slay πŸŽ€βœ¨

πŸ“¦ where this page comes from