This is a note to let you know that I've just added the patch titled KVM: s390: VSIE: fix MVPG handling for prefixing and MSO to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: kvm-s390-vsie-fix-mvpg-handling-for-prefixing-and-mso.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From c3171e94cc1cdcc3229565244112e869f052b8d9 Mon Sep 17 00:00:00 2001 From: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx> Date: Mon, 22 Mar 2021 15:05:59 +0100 Subject: KVM: s390: VSIE: fix MVPG handling for prefixing and MSO From: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx> commit c3171e94cc1cdcc3229565244112e869f052b8d9 upstream. Prefixing needs to be applied to the guest real address to translate it into a guest absolute address. The value of MSO needs to be added to a guest-absolute address in order to obtain the host-virtual. Fixes: bdf7509bbefa ("s390/kvm: VSIE: correctly handle MVPG when in VSIE") Reported-by: Janosch Frank <frankja@xxxxxxxxxxxxx> Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx> Reviewed-by: David Hildenbrand <david@xxxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx Link: https://lore.kernel.org/r/20210322140559.500716-3-imbrenda@xxxxxxxxxxxxx [borntraeger@xxxxxxxxxx simplify mso] Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/s390/kvm/vsie.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/arch/s390/kvm/vsie.c +++ b/arch/s390/kvm/vsie.c @@ -1001,7 +1001,7 @@ static u64 vsie_get_register(struct kvm_ static int vsie_handle_mvpg(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page) { struct kvm_s390_sie_block *scb_s = &vsie_page->scb_s; - unsigned long pei_dest, pei_src, src, dest, mask; + unsigned long pei_dest, pei_src, src, dest, mask, prefix; u64 *pei_block = &vsie_page->scb_o->mcic; int edat, rc_dest, rc_src; union ctlreg0 cr0; @@ -1009,9 +1009,12 @@ static int vsie_handle_mvpg(struct kvm_v cr0.val = vcpu->arch.sie_block->gcr[0]; edat = cr0.edat && test_kvm_facility(vcpu->kvm, 8); mask = _kvm_s390_logical_to_effective(&scb_s->gpsw, PAGE_MASK); + prefix = scb_s->prefix << GUEST_PREFIX_SHIFT; dest = vsie_get_register(vcpu, vsie_page, scb_s->ipb >> 20) & mask; + dest = _kvm_s390_real_to_abs(prefix, dest) + scb_s->mso; src = vsie_get_register(vcpu, vsie_page, scb_s->ipb >> 16) & mask; + src = _kvm_s390_real_to_abs(prefix, src) + scb_s->mso; rc_dest = kvm_s390_shadow_fault(vcpu, vsie_page->gmap, dest, &pei_dest); rc_src = kvm_s390_shadow_fault(vcpu, vsie_page->gmap, src, &pei_src); Patches currently in stable-queue which might be from imbrenda@xxxxxxxxxxxxx are queue-5.10/kvm-s390-vsie-fix-mvpg-handling-for-prefixing-and-mso.patch queue-5.10/kvm-s390-vsie-correctly-handle-mvpg-when-in-vsie.patch queue-5.10/kvm-s390-split-kvm_s390_real_to_abs.patch queue-5.10/kvm-s390-split-kvm_s390_logical_to_effective.patch queue-5.10/kvm-s390-extend-kvm_s390_shadow_fault-to-return-entry-pointer.patch