kvm_pgtable_...estroy_range(9)
π kvm_pgtable_stage2_destroy_range(9) π
okay bestie, welcome to the Kernel API Manual, the vibe check you didn't know you needed π This one's about yeeting an unlinked range of addresses out of existence, and yes the page title itself is doing that dramatic thing where it's abbreviated as kvm_pgtable_...estroy_range(9) β the ... is literally the manpage being mysterious on purpose iykyk π
πΈ NAME πΈ
kvm_pgtable_stage2_destroy_range β Destroy the unlinked range of addresses. that's the whole job. iconic, focused, no notes π
β¨ SYNOPSIS β¨
void kvm_pgtable_stage2_destroy_range (struct kvm_pgtable *pgt , u64 addr , u64 size );
it returns void because it gives nothing back and owes you nothing π
π¦ ARGUMENTS π¦
pgtβ the page-table structure, and bestie it has to be one that's already been initialised bykvm_pgtable_stage2_init*(). like, don't hand it a raw struct and expect magic πaddrβ the intermediate physical address where the mapping should be placed πΊοΈsizeβ size of the mapping, fr fr, this is how much you're working with π
π DESCRIPTION π
So here's the tea π« β the page-table is assumed to be unreachable by any hardware walkers before all this freeing goes down. And because of that assumption, there is no TLB invalidation performed. none. zero. not a single flush. π
β οΈ lowkey important: that's an assumption, not a promise the kernel makes for you. If some hardware walker out there can still see this page-table, you've got a whole situation on your hands. the manual is just telling you what it presumes, not what it checks π
π§ SEE ALSO π§
a whole friend group of references, all here, all accounted for, all of them from 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_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_init(9)kvm_pgtable_stage2_destroy(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)
and that's the whole page, bestie π«Ά signed off from ./arch/arm64/include/asm, dated October 2026, and filed under the very dramatic kvm_pgtable_...estroy_range(9) β go free some unlinked ranges, love u, drink water πβ¨πΈ
π¦ 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