kvm_mips_walk_pgd(9)
π kvm_mips_walk_pgd β the Kernel API Manual, but make it cute
okay so bestie, this is kvm_mips_walk_pgd(9) from the Kernel API Manual, and honestly? she's a little recursive queen and we're obsessed π
β¨ NAME β¨
kvm_mips_walk_pgd β walk the page table, with optional allocation. yes, optional. like showing up to the party. π
πΈ SYNOPSIS πΈ
pte_t * kvm_mips_walk_pgd (pgd_t *pgd , struct kvm_mmu_memory_cache
*cache , unsigned long addr );
π¦ ARGUMENTS π¦
pgdβ page directory pointer. the starting point, the main character of this whole walk, iykyk πcacheβ MMU page cache to allocate new page tables from, orNULL.NULLis valid, she's just in her "no new page tables" era πaddrβ address to index page table using. this is literally the address we're indexing with, fr fr π
π DESCRIPTION π
so the vibe is: walk the page tables pointed to by pgd to find the PTE corresponding to the address addr. that's the whole quest. that's the plot. π§
and here's the part that ate: if page tables don't exist for addr, they will be created from the MMU cache if cache is not NULL. no cap, she'll build them for you. if cache is NULL? no building happening, she's just looking. π«Ά
β RETURN β
- pointer to
pte_tcorresponding toaddrβ the good ending β¨ NULLif a page table doesn't exist foraddrand!cacheβ you asked her to look and not build, and there was nothing there πNULLif a page table allocation failed β she tried, bestie. she tried. π
π SEE ALSO π
kernel file ./arch/mips/kvm/mmu.c (the source of truth, the mothership π ), plus these iconic siblings:
kvm_pgd_init(9)kvm_pgd_alloc(9)kvm_mips_flush_gpa_pt(9)kvm_mips_mkclean_gpa_pt(9)kvm_arch_mmu_enable_log_dirty_pt_masked(9)_kvm_mips_map_page_fast(9)(yes the leading underscore is intentional, don't come for her π )kvm_mips_map_page(9)kvm_mips_migrate_count(9)
lowkey reminder:cachebeingNULLchanges everything about whether new page tables get made. know which mode you're in before you go walking. π«Ά
okay that's the page!! π signed off from ./arch/mips/kvm, dated October 2026, and yes the manual name at the bottom is still kvm_mips_walk_pgd(9) because some things are eternal. periodt. π
π¦ 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