kvm_pgtable_get_leaf(9)
β¨ kvm_pgtable_get_leaf(9) β¨
okay bestie, this page is from the Kernel API Manual, and it's literally about walking a page-table and grabbing the leaf entry plus its level. no cap, it's giving "tiny but important" energy π«Άπ
πΈ NAME πΈ
kvm_pgtable_get_leaf β walk a page-table and retrieve the leaf entry with its level. periodt. β¨
π¦ SYNOPSIS π¦
int kvm_pgtable_get_leaf (struct kvm_pgtable *pgt , u64 addr , kvm_pte_t *ptep , s8 *level );
π ARGUMENTS π
pgtβ the page-table structure, already initialised bykvm_pgtable_*_initor a similar initialiser. πaddrβ the input address for the start of the walk. πptepβ pointer to storage for the retrieved PTE. πlevelβ pointer to storage for the level of the retrieved PTE. π
π₯ DESCRIPTION π₯
The offset of addr within a page is ignored. literally, that part doesn't matter here, bestie. π
The walker will walk the page-table entries corresponding to the input address specified, retrieving the leaf corresponding to this address. Invalid entries are treated as leaf entries. yes, invalid entries count as leaf entries β that's the vibe check πβ¨
π RETURN π
0 on success, negative error code on failure. that's it, that's the whole return situation π«Ά
π SEE ALSO π
Kernel file ./arch/arm64/include/asm/kvm_pgtable.h is the main-character spot. then we've got the whole friend group:
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_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_stage2_pte_prot(9)kvm_pgtable_hyp_pte_prot(9)kvm_tlb_flush_vmid_range(9)
okay that's the whole page, bestie π this one comes from the ./arch/arm64/include/asm source/version and is dated October 2026, with the manual page being kvm_pgtable_get_leaf(9). mwah π
β¨
π¦ 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