Skip to content

Commit 2c212e1

Browse files
Janis Schoetterl-Glauschborntraeger
authored andcommitted
KVM: s390: Return error on SIDA memop on normal guest
Refuse SIDA memops on guests which are not protected. For normal guests, the secure instruction data address designation, which determines the location we access, is not under control of KVM. Fixes: 19e1227 (KVM: S390: protvirt: Introduce instruction data area bounce buffer) Signed-off-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com> Cc: stable@vger.kernel.org Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
1 parent 9f7fb8d commit 2c212e1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/s390/kvm/kvm-s390.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4667,6 +4667,8 @@ static long kvm_s390_guest_sida_op(struct kvm_vcpu *vcpu,
46674667
return -EINVAL;
46684668
if (mop->size + mop->sida_offset > sida_size(vcpu->arch.sie_block))
46694669
return -E2BIG;
4670+
if (!kvm_s390_pv_cpu_is_protected(vcpu))
4671+
return -EINVAL;
46704672

46714673
switch (mop->op) {
46724674
case KVM_S390_MEMOP_SIDA_READ:

0 commit comments

Comments
 (0)