kvm_s390_lo...to_effective(9)
π« 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:
kvm_s390_real_to_abs(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)write_guest_real(9)read_guest_real(9)
π« 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
- 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