kvm_s390_lo...to_effective(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« kvm_s390_logical_to_effective(9) πŸ’«

ok so we're in the Kernel API Manual today bestie, and this little function is genuinely iconic β€” it's the glow-up translator for s390 guest addresses. let's get into it πŸŽ€


✨ NAME ✨

kvm_s390_logical_to_effective β€” convert guest logical to effective address

like, it takes your guest's logical address and hands you back the effective one. it's giving translator era πŸ’…


🌸 SYNOPSIS 🌸

unsigned long kvm_s390_logical_to_effective (struct kvm_vcpu *vcpu ,
unsigned long ga );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • vcpu β€” guest virtual cpu. the main character of this whole operation πŸ’–
  • ga β€” guest logical address. the address we're about to makeover ✨

πŸ‘‘ DESCRIPTION πŸ‘‘

ok so here's the tea β˜• β€” this function converts a guest vcpu logical address into a guest vcpu effective address by applying the rules of the vcpu's addressing mode, and that mode is defined by PSW bits 31 and 32 (extendended/basic addressing mode). yes bestie, the addressing mode lives in the PSW, that's just how it is 🫢

and depending on what addressing mode the vcpu is in, some of those upper bits of ga get zeroed out, and whatever's left is what you get back:

  • upper 40 bits get zeroed in 24 bit addressing mode πŸ’€
  • upper 33 bits get zeroed in 31 bit addressing mode 🌈
  • no bits get zeroed in 64 bit addressing mode β€” full address, no notes, main character energy πŸ‘‘

the remaining bits are returned. periodt. πŸŽ€


πŸ’œ SEE ALSO πŸ’œ

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


πŸ’« and that's the whole page, bestie πŸ’«

this little gem lives in ./arch/s390/kvm/s390, dropped October 2026, and it answers to the name kvm_s390_lo...to_effective(9) (yes the header truncates it like that, we don't make the rules 😭). mwah, go zero some bits responsibly πŸ“πŸ§šπŸ’œ

πŸ“¦ where this page comes from