summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2023-07-25 16:37:20 +0200
committerJanosch Frank <frankja@linux.ibm.com>2023-08-28 09:24:20 +0000
commitfdbeb55ebdf1d83e610303f7e5c50a4d6904b7fa (patch)
treedff6e94a95db57c8a4ec968c9c4429e8bb6a6fac /arch
parent1ad1fa820e6424ae75d3d9f59774e40c9c7ec1e5 (diff)
downloadlinux-stable-fdbeb55ebdf1d83e610303f7e5c50a4d6904b7fa.tar.gz
linux-stable-fdbeb55ebdf1d83e610303f7e5c50a4d6904b7fa.tar.bz2
linux-stable-fdbeb55ebdf1d83e610303f7e5c50a4d6904b7fa.zip
KVM: s390: interrupt: Fix single-stepping keyless mode exits
kvm_s390_skey_check_enable() does not emulate any instructions, rather, it clears CPUSTAT_KSS and arranges the instruction that caused the exit (e.g., ISKE, SSKE, RRBE or LPSWE with a keyed PSW) to run again. Therefore, skip the PER check and let the instruction execution happen. Otherwise, a debugger will see two single-step events on the same instruction. Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Message-ID: <20230725143857.228626-6-iii@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/kvm/intercept.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c
index db222c749e5e..9f64f27f086e 100644
--- a/arch/s390/kvm/intercept.c
+++ b/arch/s390/kvm/intercept.c
@@ -630,8 +630,8 @@ int kvm_handle_sie_intercept(struct kvm_vcpu *vcpu)
rc = handle_partial_execution(vcpu);
break;
case ICPT_KSS:
- rc = kvm_s390_skey_check_enable(vcpu);
- break;
+ /* Instruction will be redriven, skip the PER check. */
+ return kvm_s390_skey_check_enable(vcpu);
case ICPT_MCHKREQ:
case ICPT_INT_ENABLE:
/*