kvm_vz_guest_tlb_lookup(9)
π« kvm_vz_guest_tlb_lookup(9) π«
ok so this is a page from the Kernel API Manual and honestly? it's a little baddie. it does exactly one thing and it does it well, no notes. let's get into it bestie π
πΈ NAME πΈ
kvm_vz_guest_tlb_lookup β literally just looks up a guest VZ TLB mapping. that's the whole vibe. π
β¨ SYNOPSIS β¨
int kvm_vz_guest_tlb_lookup (struct kvm_vcpu *vcpu , unsigned long gva ,
unsigned long *gpa );
yes the spacing is like that in the original, we don't touch it, we respect the ancestors π«Ά
π¦ ARGUMENTS π¦
vcpuβ your KVM VCPU pointer. the main character of this whole situation πgvaβ the original manpage says -- undescribed -- and honestly? iconic. mysterious. unbothered. no cap, it's giving "we ran out of time to write the docs" π (it's the guest virtual address, iykyk β but fr the page doesn't say, so i'm not gonna pretend it does)gpaβ a pointer to the output guest physical address, like, whatevergvamaps to. that's where the answer goes π
π DESCRIPTION π
so what does it actually DO. it converts a guest virtual address β one that lives in a guest TLB mapped segment β into a guest physical address. how? by probing the guest TLB. that's it. that's the tea β
lowkey elegant. highkey obsessed. β¨
π₯ RETURN π₯
two possible outcomes, bestie, and you gotta know which one you're in:
0β a guest TLB mapping exists forgva. slay!*gpawill have been written. π-EFAULTβ no guest TLB mapping exists forgva. sad trombone π and heads up:*gpamay not have been written. not "wasn't" β may not. so don't go reading it and acting surprised, okay? π
π SEE ALSO π
the kernel file ./arch/mips/kvm/tlb.c is out here with a whole friend group:
clear_root_gid(9)set_root_gid_to_guest_gid(9)kvm_vz_local_flush_roottlb_all_guests(9)kvm_vz_local_flush_guesttlb_all(9)kvm_vz_save_guesttlb(9)kvm_vz_load_guesttlb(9)
go read them, they're all in their TLB era π§
and that's the page!! brought to you by ./arch/mips/kvm, dated October 2026 β time traveler behavior honestly, we love to see it βπ
bye bestie, go probe that TLB π
π¦ 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