From patchwork Fri Jul 21 11:57:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Leoshkevich X-Patchwork-Id: 13321930 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F5D8EB64DD for ; Fri, 21 Jul 2023 12:01:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231218AbjGUMBV (ORCPT ); Fri, 21 Jul 2023 08:01:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231145AbjGUMBI (ORCPT ); Fri, 21 Jul 2023 08:01:08 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82799172A; Fri, 21 Jul 2023 05:01:04 -0700 (PDT) Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36LBiItU026021; Fri, 21 Jul 2023 12:01:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=haS1/JtIn5L1OldOdob1ZefVsDLZEPmrE/UqLxy+AEU=; b=UfSSL5XHP1rakG48O18lpRadM4x2RZYlInHQDoTLotB3pMy4rtuJ7UpxvmKME6D0p9Wd 7jHXGjXiN9MFBMi61K1v546pMHM8b06Af475Th8iG7U5xgs6Uvv7b9Q1aDoiUbelejyb iK60w97xv1sG/vOiOTEz7dv3Z48HHoHQZc9+qxo3g4iMcSAZ3SrjJqfXzjCY3/2aM2OU +X2hNhhtyMvfSZh6RwNshWCd+kxiLRB7z0wb9xMuDC5ZAFoD4jhKW16XW7tCao0Zs64D WNXGP4G2z1nUA8rhOpFxkS3uhKq9GNYOtFhzTqIn1BJxJBPXverj79FEipk6WkE2VGaL zA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rycb8yx95-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jul 2023 12:01:03 +0000 Received: from m0360072.ppops.net (m0360072.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 36LBjFNn028936; Fri, 21 Jul 2023 12:01:03 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rycb8yx89-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jul 2023 12:01:02 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 36LBGGiW029129; Fri, 21 Jul 2023 12:01:01 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3rv6smx93d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jul 2023 12:01:01 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 36LC0wjp24642280 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 21 Jul 2023 12:00:58 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B31EE2004E; Fri, 21 Jul 2023 12:00:58 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6D1052004B; Fri, 21 Jul 2023 12:00:58 +0000 (GMT) Received: from heavy.boeblingen.de.ibm.com (unknown [9.155.200.166]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 21 Jul 2023 12:00:58 +0000 (GMT) From: Ilya Leoshkevich To: Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Heiko Carstens , Vasily Gorbik , Alexander Gordeev Cc: David Hildenbrand , Sven Schnelle , kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Jens Freimann , Ilya Leoshkevich Subject: [PATCH v2 5/6] KVM: s390: interrupt: Fix single-stepping ISKE Date: Fri, 21 Jul 2023 13:57:58 +0200 Message-ID: <20230721120046.2262291-6-iii@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230721120046.2262291-1-iii@linux.ibm.com> References: <20230721120046.2262291-1-iii@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: AreWtlaqwleiu0lspKfaps1Q52xCIvZg X-Proofpoint-ORIG-GUID: 1Rx0wTAJLMb-PFiT_aIQc36-GAe1egMY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-21_07,2023-07-20_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxlogscore=859 clxscore=1015 spamscore=0 suspectscore=0 phishscore=0 mlxscore=0 priorityscore=1501 bulkscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307210104 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org kvm_s390_skey_check_enable() does not emulate any instructions, rather, it clears CPUSTAT_KSS and arranges for ISKE to run again. Therefore, skip the PER check and let ISKE run happen. Otherwise a debugger will see two single-step events on the same ISKE. Signed-off-by: Ilya Leoshkevich Reviewed-by: Christian Borntraeger Reviewed-by: David Hildenbrand --- arch/s390/kvm/intercept.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c index d2f7940c5d03..8793cec066a6 100644 --- a/arch/s390/kvm/intercept.c +++ b/arch/s390/kvm/intercept.c @@ -630,8 +630,7 @@ 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; + return kvm_s390_skey_check_enable(vcpu); case ICPT_MCHKREQ: case ICPT_INT_ENABLE: /*