put_guest_lc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ put_guest_lc(9) ✨

okay so bestie, welcome to the put_guest_lc(9) page from the Kernel API Manual β€” this one's a lil s390 KVM helper and she's lowkey iconic πŸŽ€


πŸ’– NAME πŸ’–

put_guest_lc β€” write a simple variable to a guest vcpu's lowcore 🫢


🌸 SYNOPSIS 🌸

put_guest_lc (vcpu , x , gra );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • vcpu β€” the virtual cpu, the guest's lil brain cell 🧠
  • x β€” the value to copy to guest, aka the thing we're yeeting in
  • gra β€” vcpu's destination guest real address, like the exact drop-off spot πŸ“

⭐ DESCRIPTION ⭐

So what she does: copies a simple value from kernel space into a guest vcpu's lowcore πŸ’… literally just that.

The size of the variable may be 1, 2, 4 or 8 bytes β€” pick your fighter, those are the only sizes allowed, no cap.

The destination must be located in the vcpu's lowcore. Otherwise the result is undefined 😭 like genuinely undefined, not "undefined but probably fine", so don't test her.

Returns zero on success or -EFAULT on error.


πŸŽ€ NOTE πŸŽ€

okay this part matters, pay attention bestie πŸ‘‘

An error indicates that either the kernel is out of memory or the guest memory mapping is broken. In any case the best solution would be to terminate the guest. It is wrong to inject a guest exception.

so like β€” the vibes are bad, wrap it up, guest is done for πŸ’€ don't try to be cute and inject an exception, that's wrong.


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./arch/s390/kvm/s390/gaccess.h plus her whole friend group:


and that's the page!! 🧚 mwah πŸ’‹

sign-off time: this one lives in ./arch/s390/kvm/s390 and she's dated October 2026 β€” put that in your calendar bestie, that's the whole footer, periodt πŸŒˆπŸ’œ

πŸ“¦ where this page comes from