_kvm_mips_map_page_fast(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… _kvm_mips_map_page_fast(9) πŸ’…

okay so this is from the Kernel API Manual, and bestie, it's literally the fast lane for guest page faults on MIPS KVM. buckle up πŸŽ€


✨ NAME ✨

_kvm_mips_map_page_fast β€” the Fast path GPA fault handler. yes, "fast" is right there in the name, it's giving main character energy ⚑


πŸ¦‹ SYNOPSIS πŸ¦‹

int _kvm_mips_map_page_fast (struct kvm_vcpu *vcpu , unsigned long gpa ,
bool write_fault , pte_t *out_entry , pte_t *out_buddy );

🌸 ARGUMENTS 🌸

  • vcpu β€” the VCPU pointer. your little virtual cpu baby 🫢
  • gpa β€” Guest physical address of fault. like, where the fault happened, address-wise πŸ’«
  • write_fault β€” Whether the fault was due to a write. write or nah, that's the question ✍️
  • out_entry β€” New PTE for gpa (written on success unless NULL). ngl, if you pass NULL she just won't fill it in, no cap πŸ™ˆ
  • out_buddy β€” New PTE for gpa's buddy (written on success unless NULL). yes, the page has a buddy, they're besties too πŸ’–

πŸ”₯ DESCRIPTION πŸ”₯

So the whole vibe here is: perform fast path GPA fault handling, doing all that can be done without calling into KVM. like, we're handling this ourselves, no need to bother the big kernel about it, periodt πŸ’…

What does it actually do on this fast path? two iconic jobs:

  • marking old pages young (for idle page tracking) β€” glow-up era ⭐
  • dirtying of clean pages (for dirty page logging) β€” messy era πŸ’€

that's it, that's the whole fast path. in and out, no KVM phone call needed.


🌈 RETURN 🌈

  • 0 on success β€” in which case we can update derived mappings and resume guest execution. slay, back to the guest πŸŽ‰
  • -EFAULT on failure due to absent GPA mapping or write to read-only page β€” in which case KVM must be consulted. yeah, this one's out of our hands, gotta escalate πŸ™ˆ
fr fr, -EFAULT is the "not me, go ask KVM" signal. don't try to handle it yourself.

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./arch/mips/kvm/mmu.c plus all these icons:


okay that's the whole page bestie, you ate it πŸ’–βœ¨

source: ./arch/mips/kvm Β· dated October 2026 Β· this was _kvm_mips_map_page_fast(9), manual name Kernel API Manual β€” mwah, go read the SEE ALSO list, iykyk πŸ§šβ€β™€οΈπŸŽ€

πŸ“¦ where this page comes from