_kvm_mips_map_page_fast(9)
π _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 forgpa(written on success unlessNULL). ngl, if you passNULLshe just won't fill it in, no cap πout_buddyβ New PTE forgpa's buddy (written on success unlessNULL). 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 π
0on success β in which case we can update derived mappings and resume guest execution. slay, back to the guest π-EFAULTon 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:
kvm_pgd_init(9)kvm_pgd_alloc(9)kvm_mips_walk_pgd(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(9)kvm_mips_migrate_count(9)
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
- 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