walk_guest_tables(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

  • 0 in case of success β€” slay, we ate πŸ’…
  • a PIC code > 0 in case the address translation fails β€” not us failing, the translation failing, important distinction πŸ™ˆ
  • an error code < 0 if 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:

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