Skip to content

Commit fdbeb55

Browse files
iii-ifrankjaa
authored andcommitted
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 <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Signed-off-by: Ilya Leoshkevich <[email protected]> Message-ID: <[email protected]> Signed-off-by: Claudio Imbrenda <[email protected]> Signed-off-by: Janosch Frank <[email protected]>
1 parent 1ad1fa8 commit fdbeb55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/s390/kvm/intercept.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,8 @@ int kvm_handle_sie_intercept(struct kvm_vcpu *vcpu)
630630
rc = handle_partial_execution(vcpu);
631631
break;
632632
case ICPT_KSS:
633-
rc = kvm_s390_skey_check_enable(vcpu);
634-
break;
633+
/* Instruction will be redriven, skip the PER check. */
634+
return kvm_s390_skey_check_enable(vcpu);
635635
case ICPT_MCHKREQ:
636636
case ICPT_INT_ENABLE:
637637
/*

0 commit comments

Comments
 (0)