gmap_2g_allowed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 all
  • slot β€” 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