write_guest_abs(9)
π 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 π
kvm_s390_real_to_abs(9)_kvm_s390_logical_to_effective(9)kvm_s390_logical_to_effective(9)put_guest_lc(9)write_guest_lc(9)read_guest_lc(9)write_guest_with_key(9)write_guest(9)read_guest_with_key(9)read_guest(9)read_guest_instr(9)read_guest_abs(9)write_guest_real(9)read_guest_real(9)
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
- 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