gmap_2g_allowed(9)
π NAME π
gmap_2g_allowed β the vibe check that tells you whether a 2G hugepage is allowed β¨
π¦ SYNOPSIS π¦
bool gmap_2g_allowed (struct gmap *gmap , struct guest_fault *f , struct
kvm_memory_slot *slot );
πΈ ARGUMENTS πΈ
gmapβ the gmap of the guest, aka whose vibes we're checking πfβ describes the fault that is being resolved, like the whole "what just happened" of it allslotβ the memslot the faulting address belongs to, iykyk
π DESCRIPTION π
okay so bestie, this function is out here doing a three-part investigation β¨
First up, it checks whether the GMAP_FLAG_ALLOW_HPAGE_2G flag is set for gmap β like, is the door even open?
Then it checks whether the offset of the address in the 2G virtual frame is the same as the offset in the physical 2G frame. lowkey the most important part ngl, the offsets gotta match π«Ά
And finally, it checks whether the whole 2G page would actually fit in the given memslot. not me making sure the 2G page doesn't get squished π
π₯ RETURN π₯
true if a 2G hugepage is allowed to back the faulting address, and false otherwise. that's it, that's the icon behavior π
π SEE ALSO π
Kernel file ./arch/s390/kvm/gmap/gmap.c β and the whole friend group: gmap_new(9), gmap_dispose(9), s390_replace_asce(9), gmap_age_gfn(9), gmap_unmap_gfn_range(9), gmap_try_fixup_minor(9), gmap_1m_allowed(9), gmap_ucas_translate(9), gmap_find_shadow(9), gmap_create_shadow(9) π
and that's a wrap on gmap_2g_allowed(9) from the Kernel API Manual, living in ./arch/s390/kvm β dated October 2026, no cap π
β¨
π¦ 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