kvm_pgtable_...ate_unlinked(9)
π kvm_pgtable_stage2_create_unlinked β Create an unlinked stage-2 paging structure π
okay bestie, welcome to the Kernel API Manual, section 9. This page is literally about kvm_pgtable_stage2_create_unlinked, and the vibe is: you're building a stage-2 page-table tree that is intentionally not hooked into the root pgd yet. main-character energy only. β¨
πΈ NAME πΈ
kvm_pgtable_stage2_create_unlinked β Create an unlinked stage-2 paging structure.
β¨ SYNOPSIS β¨
kvm_pte_t * kvm_pgtable_stage2_create_unlinked (struct kvm_pgtable *pgt
, u64 phys , s8 level , enum kvm_pgtable_prot prot , void *mc , bool
force_pte );
π ARGUMENTS π
pgtβ the page-table structure that got initialised bykvm_pgtable_stage2_init*().physβ physical address of the memory you're mapping.levelβ the starting level of the stage-2 paging structure you want created.protβ permissions and attributes for the mapping.mcβ cache of pre-allocated and zeroed memory, and that's where page-table pages get allocated from.force_pteβ force mappings toPAGE_SIZEgranularity.
π¦ DESCRIPTION π¦
okay so this function hands you back an unlinked page-table tree. It is not reachable β literally unlinked β from the root pgd, so the hardware page-table walker cannot reach it either. No TLB invalidation or CMOs are performed. none. zero. zip. π
If device attributes are not explicitly requested in prot, then the mapping will be normal and cacheable. that's the tea. π
π RETURN π
You get the fully populated stage-2 paging structure β still unlinked, bestie β or an ERR_PTR(error) if it fails. slay when it works, sad little error pointer when it doesn't. π
π SEE ALSO π
Kernel file ./arch/arm64/include/asm/kvm_pgtable.h is the spot, fr fr. Also peep these: 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_range(9), kvm_pgtable_stage2_destroy_pgd(9), kvm_pgtable_stage2_free_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).
made with π from source ./arch/arm64/include/asm, dated October 2026, for the manual page kvm_pgtable_...ate_unlinked(9). byeee, go build your unlinked tree π«Ά
π¦ 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