shadow_crycb(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

shadow_crycb β€” create a shadow copy of the crycb block. Okay bestie, this is page shadow_crycb(9) from the Kernel API Manual, and we are gonna get through it together, no cap πŸ’–


✨ SYNOPSIS ✨

int shadow_crycb (struct kvm_vcpu *vcpu , struct vsie_page *vsie_page );

That’s the whole signature, exactly as it appears. Slay.


πŸŽ€ ARGUMENTS πŸŽ€

  • vcpu β€” a pointer to the virtual CPU. Literally just a pointer to the vCPU, bestie.
  • vsie_page β€” a pointer to internal date used for the vSIE. Yes, the page says β€œdate” β€” we’re keeping it exactly like that πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

So what this function does is create a shadow copy of the crycb block and setup key wrapping, if requested for guest 3 and enabled for guest 2. That’s the whole vibe.

We accept format-1 or format-2, but we convert format-1 into format-2 in the shadow CRYCB. Using format-2 enables the firmware to choose the right format when scheduling the SIE. And format-0? There is nothing to do for format-0. Cute, honestly.

This function is also the one that handles the issuing of set_validity_icpt for all the subfunctions working on the crycb β€” it centralizes that, fr fr. So all the crycb subfunctions don’t have to each go off and do their own thing. Iconic behavior.


πŸ”₯ RETURN πŸ”₯

  • 0 if shadowed or nothing to do.
  • > 0 if control has to be given to guest 2.

That’s it. Short, sweet, and very much giving β€œread the return value.”


🌈 SEE ALSO 🌈

Kernel file ./arch/s390/kvm/s390/vsie.c β€” setup_apcb00(9), setup_apcb11(9), setup_apcb(9).

Go look at those if you want the full lore, iykyk πŸ‘‘


xoxo, your kernel bestie πŸ’– this page ships from ./arch/s390/kvm/s390, dated October 2026, and it’s literally shadow_crycb(9) 🫢✨

πŸ“¦ where this page comes from