kvm_unmap_gfn_range(9)
π kvm_unmap_gfn_range β a Kernel API Manual moment
okay so bestie, welcome to the glow-up of kvm_unmap_gfn_range(9), straight out of the Kernel API Manual. this one's short, it's sweet, and honestly it's giving "i do nothing and i do it flawlessly" energy. let's get into it β¨
πΈ SYNOPSIS πΈ
bool kvm_unmap_gfn_range (struct kvm *kvm , struct kvm_gfn_range *range
);
like, that's the whole signature. return type bool, two args, we move π
π ARGUMENTS π
kvmβ the kvm instance in question, the main character of this whole situation πrangeβ the range of guest page frames you're invalidating. yes, invalidating. it's a whole thing π¦
π₯ DESCRIPTION π₯
okay so here's the tea: this function always returns false. every single time. no cap. and like, it's not being lazy β it's literally by design π
the reason is that every DAT table modification has to use the appropriate DAT table manipulation instructions, and those instructions keep the TLB coherent on their own. so no additional TLB flush is ever required. none. zero. the vibe check passed before we even showed up π§
so when you call this and get false back, that's not a failure bestie, that's the function being iconic and knowing its lane π
π¦ CONTEXT π¦
called by KVM common code with the kvm mmu write lock held. so like, the lock's already held, don't go grabbing it again, that's a whole mess you don't want π«Ά
β RETURN β
false β and that's it. that's the return value. it's giving commitment π
π SEE ALSO π
- Kernel file
./arch/s390/kvm/s390/s390.cβ the source, go read it, it's lowkey fascinating kvm_s390_update_topology_change_report(9)kvm_s390_cpus_from_pv(9)kvm_s390_cpus_to_pv(9)kvm_arch_vcpu_pre_fault_memory(9)kvm_test_age_gfn(9)kvm_age_gfn(9)
ngl bestie, if you're ever confused about why nothing got flushed, re-read the DESCRIPTION. it's the whole plot twist and it's genuinely the best part of the page π
okay that's the whole page!! source is ./arch/s390/kvm/s390, date is October 2026 β mwah, tysm for reading, ily, go touch some DAT tables ππ
π¦ 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