kvm_mips_walk_pgd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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, or NULL. NULL is 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_t corresponding to addr β€” the good ending ✨
  • NULL if a page table doesn't exist for addr and !cache β€” you asked her to look and not build, and there was nothing there 😭
  • NULL if 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:


lowkey reminder: cache being NULL changes 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