walk_guest_tables(9)
π walk_guest_tables(9) β from the Kernel API Manual β¨
okay bestie, buckle up, because this one's a whole little s390 situation. we're looking at walk_guest_tables(9) β the kernel API manual page, no big deal, only iconic behavior π
π NAME π
walk_guest_tables β literally walks the guest page table and pins the dat tables. that's it, that's the whole vibe. π¦
β¨ SYNOPSIS β¨
int walk_guest_tables (struct gmap *sg , unsigned long saddr , struct
pgtwalk *w , bool wr );
like, look at her. four args, one int return, absolute main character energy π
πΈ ARGUMENTS πΈ
sgβ pointer to the shadow guest address space structure. yes bb, the shadow guest one π«Άsaddrβ the faulting address in the shadow gmap. that's the address that's out here causing drama πwβ this one gets filled with all the info on the pinned pages. she's an output param, she's booked and busy β¨wrβ indicates a write access when it's true. so like,true= we're writing, no cap βοΈ
π RETURN π
here's the vibe check on what you get back:
0in case of success β slay, we ate π- a PIC code
> 0in case the address translation fails β not us failing, the translation failing, important distinction π - an error code
< 0if other errors happen in the host β the host said no π
lowkey important: those three are different flavors, don't go treating a positive PIC code like it's just "an error" β the sign matters, fr fr.
π¦ SEE ALSO π¦
kernel file ./arch/s390/kvm/s390/gaccess.c, plus the whole friend group:
guest_translate_gva(9)guest_range_to_gpas(9)__cmpxchg_with_key(9)cmpxchg_guest_abs_with_key(9)guest_translate_address_with_key(9)check_gva_range(9)check_gpa_range(9)kvm_s390_check_low_addr_prot_real(9)__gaccess_shadow_fault(9)
go read them, iykyk π₯
k that's the page, bestie π§ this gem comes to you courtesy of ./arch/s390/kvm/s390, dated October 2026 β she's from the future and she still has her whole life together βπ
π¦ 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