gmap_ucas_translate(9)
π gmap_ucas_translate(9) β a Kernel API Manual moment π
okay bestie, so this is gmap_ucas_translate(9) from the Kernel API Manual and it's literally the little translator fairy you didn't know you needed π§β¨
β¨ NAME β¨
gmap_ucas_translate β translate a vcpu address into a host gmap address π¦
πΈ SYNOPSIS πΈ
int gmap_ucas_translate (struct kvm_s390_mmu_cache *mc , struct gmap
*gmap , gpa_t *gaddr );
like, that's the whole signature, no cap π
π ARGUMENTS π
mcβ the memory cache to be used for allocations. that's its whole job, it's giving "supporting character who handles the malloc vibes" π«Άgmapβ the per-cpu gmap. yes, per-cpu, she's not a global girlie πgaddrβ pointer to the address to be translated, and it will get overwritten with the translated address in case of success π₯ fr fr, it translates the per-vCPU guest address into a fake guest address, which can then be used with the fake memslots that are identity mapping userspace. and the way that's iconic? it allows ucontrol VMs to use the normal fault resolution path, like normal VMs ππ
β RETURN β
0 in case of success, otherwise -EREMOTE π (yes, -EREMOTE, she's dramatic like that)
π 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_2g_allowed(9), gmap_1m_allowed(9), gmap_find_shadow(9), gmap_create_shadow(9) π
bestie heads up: failure gives you-EREMOTE, not a generic-EINVALsituation, so don't go assuming π
okay that's the whole page, mwah π this one lives in ./arch/s390/kvm/gmap and the date on it is October 2026 β a lil sign-off from the future, slay βπΈπ
π¦ 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