gmap_create_shadow(9)
π¦ gmap_create_shadow π
okay so this is gmap_create_shadow(9) from the Kernel API Manual, and it's literally the function that creates or finds you a shadow guest address space. yes bestie, both. it's giving multitasking icon energy β¨
πΈ NAME πΈ
gmap_create_shadow β Create/find a shadow guest address space. periodt.
π SYNOPSIS π
struct gmap * gmap_create_shadow (struct kvm_s390_mmu_cache *mc , struct
gmap *parent , union asce asce , int edat_level );
like, look at that signature. she's got range. π«Ά
β ARGUMENTS β
mcβ the cache you're gonna use to allocate the dat tables. that's her whole job, no cap.parentβ pointer to the parent gmap. the mother ship, if you will πasceβ the ASCE that this shadow table is being created for.edat_levelβ the Edat level to use for the shadow translation. lowkey important.
π DESCRIPTION π
so here's the tea π β the pages of the top level page table that the asce parameter refers to get set to read-only and marked in the PGSTEs of the kvm process. yup.
and the shadow table? she gets removed automatically on any change to the PTE mapping for the source table. no manual cleanup era, we love a self-cleaning queen π§
also, the returned shadow gmap comes back with one extra reference. don't forget to deal with that, bestie π
π₯ RETURN π₯
- a guest address space structure π (the good ending)
ERR_PTR(-ENOMEM)if out of memory πERR_PTR(-EAGAIN)if the caller has to retry πERR_PTR(-EFAULT)if the parent gmap table could not be protected π
π SEE ALSO π
Kernel file ./arch/s390/kvm/gmap/gmap.c β and honestly 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_2g_allowed(9)gmap_1m_allowed(9)gmap_ucas_translate(9)gmap_find_shadow(9)
and that's the whole page, diva. this one lives in ./arch/s390/kvm/gmap, dated October 2026, from the Kernel API Manual. go forth and shadow-translate responsibly πβ¨
π¦ 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