write_guest_real(9)
β¨ write_guest_real(9) β¨
okay so bestie, this one's from the Kernel API Manual and it's literally about yeeting bytes from kernel space into guest real memory π like, it's giving "delivery service but for memory" fr fr.
πΈ NAME πΈ
write_guest_real β copy data from kernel space to guest space real π
β¨ SYNOPSIS β¨
int write_guest_real (struct kvm_vcpu *vcpu , unsigned long gra , void
*data , unsigned long len );
that's the whole vibe. four things in, one int out. no cap. π¦
π ARGUMENTS π
vcpuβ the virtual cpu, aka the main character of this whole operation πgraβ the guest real address, where the data's headed πdataβ the source address in kernel space, where the data's coming from π§³lenβ number of bytes to copy, the actual amount of stuff we're hauling over π¦
π DESCRIPTION π
so here's what it does: copy len bytes from data (kernel space) over to gra (guest real address). simple as that. π«Ά
π important caveat bestie: guest low address and key protection are not checked. like, at all. so don't be surprised, okay?
Returns zero on success π β but if things go sideways:
-EFAULTwhen copying fromdatafailed πPGM_ADRESSINGin casegrais outside a memslot π«
in that PGM_ADRESSING situation, pgm check info is also stored, so you can inject it into the guest (if applicable) using kvm_s390_inject_prog_cond. iykyk π
β οΈ and like, real talk: if an error occurs, data may have been copied partially to guest memory. so the job might be half-done. no refunds, no takebacks. π
π SEE ALSO π
Kernel file ./arch/s390/kvm/s390/gaccess.h β plus literally all these besties:
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)write_guest_abs(9)read_guest_abs(9)read_guest_real(9)
π§ okay that's the whole page, slay. it lives in ./arch/s390/kvm/s390 and it's dated October 2026. go forth and copy those 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