write_guest_abs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… write_guest_abs(9) β€” the Kernel API Manual page, but make it make sense

okay so bestie, welcome to write_guest_abs(9) from the Kernel API Manual ✨ this is the little s390 KVM helper that yeets bytes from kernel space straight into guest space, absolute style. no cap, it's a whole vibe.


🌸 NAME 🌸

write_guest_abs β€” copy data from kernel space to guest space absolute 🫢


✨ SYNOPSIS ✨

int write_guest_abs (struct kvm_vcpu *vcpu , unsigned long gpa , void
*data , unsigned long len );

look at her. iconic signature. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • vcpu β€” the virtual cpu, your main character 🧚
  • gpa β€” the guest physical (absolute) address, aka where in guest-land we're dropping the data πŸ“
  • data β€” the source address, in kernel space, aka where the data is coming from πŸ’œ
  • len β€” the number of bytes to copy, the actual amount, fr fr 🌸

πŸ¦‹ DESCRIPTION πŸ¦‹

So what she does: copies len bytes from data (kernel space) over to gpa (that guest absolute address). Simple. Elegant. Slay. ✨

⚠️ but listen β€” it is up to the caller to make sure that the entire guest memory range is actually valid memory before calling this function. that's on you, bestie. not her job. πŸ’€

Also lowkey important: guest low address and key protection are not checked. like, at all. not even a little. πŸ™ˆ

Returns zero on success, or -EFAULT on error. that's the whole return situation, periodt. πŸ‘‘

And the caveat you need to keep in your notes app: if an error occurs, data may have been copied partially to guest memory. partial. so like, half the vibe got through. handle it. 😭


🌈 SEE ALSO 🌈

Kernel file ./arch/s390/kvm/s390/gaccess.h β€” go read it, iykyk πŸ’–

the whole guest-access friend group honestly, they all ate πŸ”₯


mwah πŸ’‹ this page lives in ./arch/s390/kvm/s390, dated October 2026 β€” that's the source and the date, and yes she's serving vintage-adjacent. go copy some bytes responsibly, bestie. πŸŽ€βœ¨

πŸ“¦ where this page comes from