gmap_1m_allowed(9)
π gmap_1m_allowed β bestie's guide to "is a 1M hugepage allowed??" π
okay so this is a page from the Kernel API Manual, and the star of the show is gmap_1m_allowed β yes, we're literally checking whether a 1M hugepage is allowed. no cap, that's the whole vibe check. π¦
β¨ NAME β¨
gmap_1m_allowed β check whether a 1M hugepage is allowed. that's it, that's the function, she's here to give you a yes or a no π
β¨ SYNOPSIS β¨
bool gmap_1m_allowed (struct gmap *gmap , struct guest_fault *f , struct
kvm_memory_slot *slot );
three arguments, returns a bool. keep it exactly like that, bestie, character for character π
β¨ ARGUMENTS β¨
gmapβ the gmap of the guest. like, the guest's whole memory map situation πfβ describes the fault that is being resolved. this is the "what just happened" of it all πslotβ the memslot the faulting address belongs to. gotta know which slot we're in fr fr πΈ
β¨ DESCRIPTION β¨
so what does she actually do? three checks, in order, and honestly it's giving "responsible older sister energy":
the function checks whether the GMAP_FLAG_ALLOW_HPAGE_1M flag is set for gmap β flag first, always π©
then it checks whether the offset of the address in the 1M virtual frame is the same as the offset in the physical 1M frame. like, the offsets gotta match, periodt β¨
and finally it checks whether the whole 1M page would fit in the given memslot. no fitting, no hugepage, that's the rule π
all three? slay. any of them failing? not today π
β¨ RETURN β¨
true if a 1M hugepage is allowed to back the faulting address, false otherwise. binary queen, she said π
β¨ SEE ALSO β¨
this is all in the kernel file ./arch/s390/kvm/gmap/gmap.c, and the whole friend group shows up here:
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_2g_allowed(9)gmap_ucas_translate(9)gmap_find_shadow(9)gmap_create_shadow(9)
iykyk π
ngl the whole page lives under ./arch/s390/kvm/gmap, and it's dated October 2026 β mark your calendars bestie ποΈπ
and that's the page!! mwah π«Άππ§
π¦ 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