gmap_unmap_gfn_range(9)
π gmap_unmap_gfn_range(9)
okay bestie, so this is a page from the Kernel API Manual and today's main character is gmap_unmap_gfn_range β say it with me, it's a mouthful, but we move π
β¨ NAME β¨
gmap_unmap_gfn_range β unmaps a whole range of guest addresses. that's it, that's the vibe. unmap. range. periodt.
π¦ SYNOPSIS π¦
bool gmap_unmap_gfn_range (struct gmap *gmap , struct kvm_memory_slot
*slot , gfn_t start , gfn_t end );
π ARGUMENTS π
gmapβ the gmap we're acting on β¨ like, the actual star of the show.slotβ the memslot where this range lives. the address of the neighborhood, if you will π‘startβ the first gfn to unmap. where we start. obviously πendβ the gfn after the last one to unmap. bestie this is the classic off-by-one trap π it's not the last gfn, it's the one after it, iykyk.
πΈ CONTEXT πΈ
so this gets called with the kvm mmu write lock held. as in, you already have the lock. no cap. π«Ά
β RETURN β
returns false π that's the whole return value. false. that's it.
π SEE ALSO π
kernel file ./arch/s390/kvm/gmap/gmap.c and literally the whole friend group:
gmap_new(9), gmap_dispose(9), s390_replace_asce(9), gmap_age_gfn(9), gmap_try_fixup_minor(9), gmap_2g_allowed(9), gmap_1m_allowed(9), gmap_ucas_translate(9), gmap_find_shadow(9), gmap_create_shadow(9)
<div align=center>π okay that's the whole page, go unmap some things, stay hydrated, and remember this dropped out of ./arch/s390/kvm/gmap back in October 2026 π mwah π</div>
π¦ 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