Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e45efa28 authored by Thomas Huth's avatar Thomas Huth Committed by Christian Borntraeger
Browse files

KVM: s390: Add low-address protection to TEST BLOCK



TEST BLOCK is also subject to the low-address protection, so we need
to check the destination address in our handler.

Signed-off-by: default avatarThomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
parent fb34c603
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -206,6 +206,9 @@ static int handle_test_block(struct kvm_vcpu *vcpu)


	kvm_s390_get_regs_rre(vcpu, NULL, &reg2);
	kvm_s390_get_regs_rre(vcpu, NULL, &reg2);
	addr = vcpu->run->s.regs.gprs[reg2] & PAGE_MASK;
	addr = vcpu->run->s.regs.gprs[reg2] & PAGE_MASK;
	addr = kvm_s390_logical_to_effective(vcpu, addr);
	if (kvm_s390_check_low_addr_protection(vcpu, addr))
		return kvm_s390_inject_prog_irq(vcpu, &vcpu->arch.pgm);
	addr = kvm_s390_real_to_abs(vcpu, addr);
	addr = kvm_s390_real_to_abs(vcpu, addr);


	if (kvm_is_error_gpa(vcpu->kvm, addr))
	if (kvm_is_error_gpa(vcpu->kvm, addr))