From patchwork Tue Jun 29 13:33:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12349883 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0A64C11F68 for ; Tue, 29 Jun 2021 13:33:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 90A4361DC2 for ; Tue, 29 Jun 2021 13:33:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233191AbhF2NgE (ORCPT ); Tue, 29 Jun 2021 09:36:04 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:43172 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232844AbhF2NgD (ORCPT ); Tue, 29 Jun 2021 09:36:03 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15TDS4Ko108982; Tue, 29 Jun 2021 09:33:36 -0400 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=osdcO9R9sFWWWjLhLC3oyvg7ioGxzyZiJlb90U59a+c=; b=mJ3Qw2HMNjccL/S7SdtgV93DHju0nkjluDPMMTUhU3qJ8Vh34E6xYRxbqbcZHLv2ycUb LWvlEWWmVevcFwRfEnXOl8aazeQJJahMDt6V6Jcca1Wk947hBllr4AO/Cl6mDammJaJv cd5qBw6jLoodsazXf0v7ndhaRfrzpqrIrdfuGIlDZ9OQM554Zf+MIwjnbVfN7X/Ue+qR g1Xra6npCm5cj0S+OCSMjQVPuF5yYM11oOgvdrFmlxUkNFG1ADvG/y6Y/DORjsnzCdF5 RnLAxmyI3eXH0188eELBoQwDEo28eULRL+x9KOb6Ko75HFrvQsEVQplPnAS6dMAdWDSD zw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 39g4e7r688-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 09:33:36 -0400 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15TDSDFM109342; Tue, 29 Jun 2021 09:33:35 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 39g4e7r675-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 09:33:35 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15TDTbpJ027726; Tue, 29 Jun 2021 13:33:33 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma03ams.nl.ibm.com with ESMTP id 39duv89acr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 13:33:33 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15TDVsMC20709648 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Jun 2021 13:31:55 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1A353A40F4; Tue, 29 Jun 2021 13:33:31 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C6643A40FD; Tue, 29 Jun 2021 13:33:30 +0000 (GMT) Received: from t46lp67.lnxne.boe (unknown [9.152.108.100]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 29 Jun 2021 13:33:30 +0000 (GMT) From: Janosch Frank To: kvm@vger.kernel.org Cc: linux-s390@vger.kernel.org, imbrenda@linux.ibm.com, david@redhat.com, thuth@redhat.com, cohuck@redhat.com Subject: [kvm-unit-tests PATCH 1/5] s390x: sie: Add missing includes Date: Tue, 29 Jun 2021 13:33:18 +0000 Message-Id: <20210629133322.19193-2-frankja@linux.ibm.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210629133322.19193-1-frankja@linux.ibm.com> References: <20210629133322.19193-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: OSbmaSh5nrrgcwuP65PQoEM23BI-4DKQ X-Proofpoint-ORIG-GUID: qQB3zmNrMJx1s-jOid3LiN2nqbepAvZF X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-06-29_06:2021-06-28,2021-06-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 clxscore=1015 spamscore=0 mlxscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 adultscore=0 mlxlogscore=981 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106290088 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org arch_def.h is needed for struct psw. stdint.h is needed for the uint*_t types. Signed-off-by: Janosch Frank Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth Reviewed-by: Claudio Imbrenda --- lib/s390x/sie.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/s390x/sie.h b/lib/s390x/sie.h index db30d61..b4bb78c 100644 --- a/lib/s390x/sie.h +++ b/lib/s390x/sie.h @@ -2,6 +2,9 @@ #ifndef _S390X_SIE_H_ #define _S390X_SIE_H_ +#include +#include + #define CPUSTAT_STOPPED 0x80000000 #define CPUSTAT_WAIT 0x10000000 #define CPUSTAT_ECALL_PEND 0x08000000 From patchwork Tue Jun 29 13:33:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12349887 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3090C11F69 for ; Tue, 29 Jun 2021 13:33:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DBD1D61D4D for ; Tue, 29 Jun 2021 13:33:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234049AbhF2NgH (ORCPT ); Tue, 29 Jun 2021 09:36:07 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:38072 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233009AbhF2NgD (ORCPT ); Tue, 29 Jun 2021 09:36:03 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15TDLYWq084466; Tue, 29 Jun 2021 09:33:36 -0400 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=dB1O1qBTTIcgJAFEo2pfvY/MyHw5DQqZMN72f08pZ+A=; b=TIB+tiU7Qo7z9gxtAgElOMpVSPOjC7fOwNfZ+h1UGSSuKRs0lbw/B6YtavdJWLOPNZua BAXapMUR0pnysWXwgowyyG7OaRc1iL4JE3oKCvVK4lniviGjVVPpCMzOPP6Ek9AVxsKj eAYMoihYwVgZLso7tn5FtPlkIsdvLSA0QSWQgZuSw/y/VxMrpBIof/2qfv/Q+aKJRTv3 DRiof7aRLkL2+OnYPpc94J9ECQeqnC3mMQZx3G0GYTkxhbdJk5GuXXXREMlaP/WyrUxb tExaGH8tOqQEVR5+UnMvTsP0yQefllD1e/LwUzviM26p5pdWYiCwrvrzdpm+nRUxXAy6 tw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 39g4b70bwf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 09:33:36 -0400 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15TDLttb085761; Tue, 29 Jun 2021 09:33:35 -0400 Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0b-001b2d01.pphosted.com with ESMTP id 39g4b70bvy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 09:33:35 -0400 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15TDTVdA018169; Tue, 29 Jun 2021 13:33:34 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma01fra.de.ibm.com with ESMTP id 39fv59r46x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 13:33:33 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15TDVtjC13107628 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Jun 2021 13:31:55 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 679F3A40D8; Tue, 29 Jun 2021 13:33:31 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 29943A40C7; Tue, 29 Jun 2021 13:33:31 +0000 (GMT) Received: from t46lp67.lnxne.boe (unknown [9.152.108.100]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 29 Jun 2021 13:33:31 +0000 (GMT) From: Janosch Frank To: kvm@vger.kernel.org Cc: linux-s390@vger.kernel.org, imbrenda@linux.ibm.com, david@redhat.com, thuth@redhat.com, cohuck@redhat.com Subject: [kvm-unit-tests PATCH 2/5] s390x: sie: Fix sie.h integer types Date: Tue, 29 Jun 2021 13:33:19 +0000 Message-Id: <20210629133322.19193-3-frankja@linux.ibm.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210629133322.19193-1-frankja@linux.ibm.com> References: <20210629133322.19193-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: YYWs6VCEak2ZvdRuzNggDuUCeFbN0NJ7 X-Proofpoint-GUID: JxZgFEi0t9MXuwGcNZ8KiseLF0FNuuqx X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-06-29_06:2021-06-28,2021-06-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 mlxscore=0 suspectscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106290088 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Let's only use the uint*_t types. Signed-off-by: Janosch Frank Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth Reviewed-by: Claudio Imbrenda --- lib/s390x/sie.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/s390x/sie.h b/lib/s390x/sie.h index b4bb78c..6ba858a 100644 --- a/lib/s390x/sie.h +++ b/lib/s390x/sie.h @@ -173,9 +173,9 @@ struct kvm_s390_sie_block { } __attribute__((packed)); struct vm_save_regs { - u64 grs[16]; - u64 fprs[16]; - u32 fpc; + uint64_t grs[16]; + uint64_t fprs[16]; + uint32_t fpc; }; /* We might be able to nestle all of this into the stack frame. But @@ -191,7 +191,7 @@ struct vm { struct kvm_s390_sie_block *sblk; struct vm_save_area save_area; /* Ptr to first guest page */ - u8 *guest_mem; + uint8_t *guest_mem; }; extern void sie_entry(void); From patchwork Tue Jun 29 13:33:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12349891 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A7C3C11F66 for ; Tue, 29 Jun 2021 13:33:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6BB3261D4D for ; Tue, 29 Jun 2021 13:33:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234077AbhF2NgJ (ORCPT ); Tue, 29 Jun 2021 09:36:09 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:61918 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233665AbhF2NgE (ORCPT ); Tue, 29 Jun 2021 09:36:04 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15TDS02f108833; Tue, 29 Jun 2021 09:33:37 -0400 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=zds/YcGHqVI0AhqjqpwtXYC++z3UOiyRG/5rKyl14jE=; b=loE41f0R5ecAJ1w+haIGXRKn5XlDZDqWdFWSqKyxpDxm2Ei0xjNQhAo/VeB5sdKktsqo tcBzxWHDlHP/JA8DbVj4rLWRmPKFkJMf1cLucSoS1W41fHPkxVTjNKgHe4KMXcT7I6Lc W2mTuoJwg0FIX1d3KE4EYCoFleBHT0A30DerbIlv58sv5cuZvsWVNTtzTS7+A7bXK6eq GQlzJQtUofoWeB65kgJwUSHHbQ7csY+KI//MvKgEkBquXk7UrCWzdDt4JIXpzfABT3Sr /sDivFanp97iRbnYPr+PiOQax5mMAA80vrjlzwKYAfB/AG92DcGl8A2FIyd5gqHYrg3x BQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 39g4e7r68t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 09:33:36 -0400 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15TDTlCU116621; Tue, 29 Jun 2021 09:33:36 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 39g4e7r67k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 09:33:36 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15TDT8to027659; Tue, 29 Jun 2021 13:33:34 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma03ams.nl.ibm.com with ESMTP id 39duv89acs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 13:33:33 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15TDVtZu31850960 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Jun 2021 13:31:55 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B1E64A40E5; Tue, 29 Jun 2021 13:33:31 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7EBE6A40E9; Tue, 29 Jun 2021 13:33:31 +0000 (GMT) Received: from t46lp67.lnxne.boe (unknown [9.152.108.100]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 29 Jun 2021 13:33:31 +0000 (GMT) From: Janosch Frank To: kvm@vger.kernel.org Cc: linux-s390@vger.kernel.org, imbrenda@linux.ibm.com, david@redhat.com, thuth@redhat.com, cohuck@redhat.com Subject: [kvm-unit-tests PATCH 3/5] lib: s390x: uv: Int type cleanup Date: Tue, 29 Jun 2021 13:33:20 +0000 Message-Id: <20210629133322.19193-4-frankja@linux.ibm.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210629133322.19193-1-frankja@linux.ibm.com> References: <20210629133322.19193-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: jCjssoXk6bYMXlAAbEB3i8eUlQdMmyHD X-Proofpoint-ORIG-GUID: 74gReYoJPhI0MqJcTGY2vIX-UL0D-j8B X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-06-29_06:2021-06-28,2021-06-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 clxscore=1015 spamscore=0 mlxscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 adultscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106290088 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org These structs have largely been copied from the kernel so they still have the old uint short types which we want to avoid in favor of the uint*_t ones. Signed-off-by: Janosch Frank Reviewed-by: Cornelia Huck --- lib/s390x/asm/uv.h | 142 +++++++++++++++++++++++---------------------- 1 file changed, 72 insertions(+), 70 deletions(-) diff --git a/lib/s390x/asm/uv.h b/lib/s390x/asm/uv.h index dc3e02d..96a2a7e 100644 --- a/lib/s390x/asm/uv.h +++ b/lib/s390x/asm/uv.h @@ -12,6 +12,8 @@ #ifndef _ASMS390X_UV_H_ #define _ASMS390X_UV_H_ +#include + #define UVC_RC_EXECUTED 0x0001 #define UVC_RC_INV_CMD 0x0002 #define UVC_RC_INV_STATE 0x0003 @@ -68,73 +70,73 @@ enum uv_cmds_inst { }; struct uv_cb_header { - u16 len; - u16 cmd; /* Command Code */ - u16 rc; /* Response Code */ - u16 rrc; /* Return Reason Code */ + uint16_t len; + uint16_t cmd; /* Command Code */ + uint16_t rc; /* Response Code */ + uint16_t rrc; /* Return Reason Code */ } __attribute__((packed)) __attribute__((aligned(8))); struct uv_cb_init { struct uv_cb_header header; - u64 reserved08[2]; - u64 stor_origin; - u64 stor_len; - u64 reserved28[4]; + uint64_t reserved08[2]; + uint64_t stor_origin; + uint64_t stor_len; + uint64_t reserved28[4]; } __attribute__((packed)) __attribute__((aligned(8))); struct uv_cb_qui { struct uv_cb_header header; - u64 reserved08; - u64 inst_calls_list[4]; - u64 reserved30[2]; - u64 uv_base_stor_len; - u64 reserved48; - u64 conf_base_phys_stor_len; - u64 conf_base_virt_stor_len; - u64 conf_virt_var_stor_len; - u64 cpu_stor_len; - u32 reserved70[3]; - u32 max_num_sec_conf; - u64 max_guest_stor_addr; - u8 reserved88[158 - 136]; - u16 max_guest_cpus; - u8 reserveda0[200 - 160]; + uint64_t reserved08; + uint64_t inst_calls_list[4]; + uint64_t reserved30[2]; + uint64_t uv_base_stor_len; + uint64_t reserved48; + uint64_t conf_base_phys_stor_len; + uint64_t conf_base_virt_stor_len; + uint64_t conf_virt_var_stor_len; + uint64_t cpu_stor_len; + uint32_t reserved70[3]; + uint32_t max_num_sec_conf; + uint64_t max_guest_stor_addr; + uint8_t reserved88[158 - 136]; + uint16_t max_guest_cpus; + uint8_t reserveda0[200 - 160]; } __attribute__((packed)) __attribute__((aligned(8))); struct uv_cb_cgc { struct uv_cb_header header; - u64 reserved08[2]; - u64 guest_handle; - u64 conf_base_stor_origin; - u64 conf_var_stor_origin; - u64 reserved30; - u64 guest_stor_origin; - u64 guest_stor_len; - u64 guest_sca; - u64 guest_asce; - u64 reserved60[5]; + uint64_t reserved08[2]; + uint64_t guest_handle; + uint64_t conf_base_stor_origin; + uint64_t conf_var_stor_origin; + uint64_t reserved30; + uint64_t guest_stor_origin; + uint64_t guest_stor_len; + uint64_t guest_sca; + uint64_t guest_asce; + uint64_t reserved60[5]; } __attribute__((packed)) __attribute__((aligned(8))); struct uv_cb_csc { struct uv_cb_header header; - u64 reserved08[2]; - u64 cpu_handle; - u64 guest_handle; - u64 stor_origin; - u8 reserved30[6]; - u16 num; - u64 state_origin; - u64 reserved[4]; + uint64_t reserved08[2]; + uint64_t cpu_handle; + uint64_t guest_handle; + uint64_t stor_origin; + uint8_t reserved30[6]; + uint16_t num; + uint64_t state_origin; + uint64_t reserved[4]; } __attribute__((packed)) __attribute__((aligned(8))); struct uv_cb_unp { struct uv_cb_header header; - u64 reserved08[2]; - u64 guest_handle; - u64 gaddr; - u64 tweak[2]; - u64 reserved38[3]; + uint64_t reserved08[2]; + uint64_t guest_handle; + uint64_t gaddr; + uint64_t tweak[2]; + uint64_t reserved38[3]; } __attribute__((packed)) __attribute__((aligned(8))); /* @@ -144,42 +146,42 @@ struct uv_cb_unp { */ struct uv_cb_nodata { struct uv_cb_header header; - u64 reserved08[2]; - u64 handle; - u64 reserved20[4]; + uint64_t reserved08[2]; + uint64_t handle; + uint64_t reserved20[4]; } __attribute__((packed)) __attribute__((aligned(8))); struct uv_cb_share { struct uv_cb_header header; - u64 reserved08[3]; - u64 paddr; - u64 reserved28; + uint64_t reserved08[3]; + uint64_t paddr; + uint64_t reserved28; } __attribute__((packed)) __attribute__((aligned(8))); /* Convert to Secure */ struct uv_cb_cts { struct uv_cb_header header; - u64 reserved08[2]; - u64 guest_handle; - u64 gaddr; + uint64_t reserved08[2]; + uint64_t guest_handle; + uint64_t gaddr; } __attribute__((packed)) __attribute__((aligned(8))); /* Convert from Secure / Pin Page Shared */ struct uv_cb_cfs { struct uv_cb_header header; - u64 reserved08[2]; - u64 paddr; + uint64_t reserved08[2]; + uint64_t paddr; } __attribute__((packed)) __attribute__((aligned(8))); /* Set Secure Config Parameter */ struct uv_cb_ssc { struct uv_cb_header header; - u64 reserved08[2]; - u64 guest_handle; - u64 sec_header_origin; - u32 sec_header_len; - u32 reserved2c; - u64 reserved30[4]; + uint64_t reserved08[2]; + uint64_t guest_handle; + uint64_t sec_header_origin; + uint32_t sec_header_len; + uint32_t reserved2c; + uint64_t reserved30[4]; } __attribute__((packed)) __attribute__((aligned(8))); static inline int uv_call_once(unsigned long r1, unsigned long r2) @@ -211,7 +213,7 @@ static inline int uv_call(unsigned long r1, unsigned long r2) return cc; } -static inline int share(unsigned long addr, u16 cmd) +static inline int share(unsigned long addr, uint16_t cmd) { struct uv_cb_share uvcb = { .header.cmd = cmd, @@ -220,7 +222,7 @@ static inline int share(unsigned long addr, u16 cmd) }; int cc; - cc = uv_call(0, (u64)&uvcb); + cc = uv_call(0, (uint64_t)&uvcb); if (!cc && uvcb.header.rc == UVC_RC_EXECUTED) return 0; @@ -252,11 +254,11 @@ static inline int uv_remove_shared(unsigned long addr) struct uv_cb_cpu_set_state { struct uv_cb_header header; - u64 reserved08[2]; - u64 cpu_handle; - u8 reserved20[7]; - u8 state; - u64 reserved28[5]; + uint64_t reserved08[2]; + uint64_t cpu_handle; + uint8_t reserved20[7]; + uint8_t state; + uint64_t reserved28[5]; }; #define PV_CPU_STATE_OPR 1 From patchwork Tue Jun 29 13:33:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12349889 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC98DC11F6A for ; Tue, 29 Jun 2021 13:33:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C74E961DC4 for ; Tue, 29 Jun 2021 13:33:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234028AbhF2NgI (ORCPT ); Tue, 29 Jun 2021 09:36:08 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:44086 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233144AbhF2NgE (ORCPT ); Tue, 29 Jun 2021 09:36:04 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15TD2cCV041524; Tue, 29 Jun 2021 09:33:36 -0400 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=AY/GcUEJfxpc1O/juiL78SMFSiIgDuhdSXyoVeN8KNs=; b=Hxlet7pxfyYGcUphi97nLSx449yc6+K8t6eM761ZV2ZL/wswcIRmJJ1IwsrI4yor+XSV ixu8ZDiItJMqQrh/txphMuU5LjVYhHO7Q98aNjs6EOLPsVhYLuUBo3ALg4r0GDgNvPkR QKUkNxdkWdAZEMb1KGU9ovW79OTsUYHtSC1SFlZobKXzKmVqil1ErIdZz4+A32QKyhHL 4LYmdq74Ae6xQND8peRyWdxJjJtcHP/GfCCepTXzt2nt1HiJnGR7x6KAlrtsmJqJTbMg qph0N4LH4n02tEQJuxmxI8xgJ+EaAptpjMKF6UyruhiSQcnhlhCY1RhF1CYhGBpEbmq1 KA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 39g3fqa1b3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 09:33:36 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15TD3vFk049854; Tue, 29 Jun 2021 09:33:36 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 39g3fqa1aa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 09:33:36 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15TDTbpK027726; Tue, 29 Jun 2021 13:33:34 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma03ams.nl.ibm.com with ESMTP id 39duv89act-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 13:33:34 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15TDVw6927263232 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Jun 2021 13:31:58 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 14CEEA4101; Tue, 29 Jun 2021 13:33:32 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C861CA40FF; Tue, 29 Jun 2021 13:33:31 +0000 (GMT) Received: from t46lp67.lnxne.boe (unknown [9.152.108.100]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 29 Jun 2021 13:33:31 +0000 (GMT) From: Janosch Frank To: kvm@vger.kernel.org Cc: linux-s390@vger.kernel.org, imbrenda@linux.ibm.com, david@redhat.com, thuth@redhat.com, cohuck@redhat.com Subject: [kvm-unit-tests PATCH 4/5] lib: s390x: uv: Add offset comments to uv_query and extend it Date: Tue, 29 Jun 2021 13:33:21 +0000 Message-Id: <20210629133322.19193-5-frankja@linux.ibm.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210629133322.19193-1-frankja@linux.ibm.com> References: <20210629133322.19193-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: jjkaY9qJWPQyUnqwa3BmXnaftLBAbN4V X-Proofpoint-ORIG-GUID: yC1K1t7WTUZAhylEBVhOQDzfKK6IP2X8 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-06-29_06:2021-06-28,2021-06-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 impostorscore=0 mlxscore=0 lowpriorityscore=0 suspectscore=0 clxscore=1015 adultscore=0 mlxlogscore=999 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106290088 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The struct is getting longer, let's add offset comments so we know where we change things when we add struct members. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda --- lib/s390x/asm/uv.h | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/lib/s390x/asm/uv.h b/lib/s390x/asm/uv.h index 96a2a7e..5ff98b8 100644 --- a/lib/s390x/asm/uv.h +++ b/lib/s390x/asm/uv.h @@ -86,22 +86,23 @@ struct uv_cb_init { } __attribute__((packed)) __attribute__((aligned(8))); struct uv_cb_qui { - struct uv_cb_header header; - uint64_t reserved08; - uint64_t inst_calls_list[4]; - uint64_t reserved30[2]; - uint64_t uv_base_stor_len; - uint64_t reserved48; - uint64_t conf_base_phys_stor_len; - uint64_t conf_base_virt_stor_len; - uint64_t conf_virt_var_stor_len; - uint64_t cpu_stor_len; - uint32_t reserved70[3]; - uint32_t max_num_sec_conf; - uint64_t max_guest_stor_addr; - uint8_t reserved88[158 - 136]; - uint16_t max_guest_cpus; - uint8_t reserveda0[200 - 160]; + struct uv_cb_header header; /* 0x0000 */ + uint64_t reserved08; /* 0x0008 */ + uint64_t inst_calls_list[4]; /* 0x0010 */ + uint64_t reserved30[2]; /* 0x0030 */ + uint64_t uv_base_stor_len; /* 0x0040 */ + uint64_t reserved48; /* 0x0048 */ + uint64_t conf_base_phys_stor_len; /* 0x0050 */ + uint64_t conf_base_virt_stor_len; /* 0x0058 */ + uint64_t conf_virt_var_stor_len; /* 0x0060 */ + uint64_t cpu_stor_len; /* 0x0068 */ + uint32_t reserved70[3]; /* 0x0070 */ + uint32_t max_num_sec_conf; /* 0x007c */ + uint64_t max_guest_stor_addr; /* 0x0080 */ + uint8_t reserved88[158 - 136]; /* 0x0088 */ + uint16_t max_guest_cpus; /* 0x009e */ + uint64_t uv_feature_indications; /* 0x00a0 */ + uint8_t reserveda0[200 - 168]; /* 0x00a8 */ } __attribute__((packed)) __attribute__((aligned(8))); struct uv_cb_cgc { From patchwork Tue Jun 29 13:33:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12349893 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79B8CC11F67 for ; Tue, 29 Jun 2021 13:33:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 57CAC61DC2 for ; Tue, 29 Jun 2021 13:33:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234073AbhF2NgL (ORCPT ); Tue, 29 Jun 2021 09:36:11 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:63380 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233926AbhF2NgE (ORCPT ); Tue, 29 Jun 2021 09:36:04 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15TDXHDZ150696; Tue, 29 Jun 2021 09:33:37 -0400 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=xMYjNGIeVlFTQB1mk7gVaEiIcxTvIUgjfAYnIHgxc+Y=; b=IGpDbV8k9jvbo/IJJ4fAXIF9xyLVcjeVguzfJ8Tj6wee7NLPLo2rS/pXHfIw9D53E6yn LfL/Sqk5uHMTcWIicm9G/OLPQZxFuRTBu2YfU8TeBbic6Sza2gxNs3rfbOt0O935r3NS SFZD2hbtQrBrZKbo5+HFpw9UpYY8d6/vK+VltBLFRE8MHUesaej0VeTN2FU/y1Al8h1v 95o4zLEvyywTppOkeRsuYx5O44z4r0DFAhWxmcLyKLnz61XysqMbcy49bIOyVqyZAOQO TaoTgaszIy9AlG5u/8avpW4ZP8yymZyc7Aep27yicICiP7KvO6b7lcFRAte8LYTGxl4A 8w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 39g2k4kmsn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 09:33:37 -0400 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15TDXI1D150914; Tue, 29 Jun 2021 09:33:36 -0400 Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 39g2k4kms2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 09:33:36 -0400 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15TDT7Ak024538; Tue, 29 Jun 2021 13:33:35 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma05fra.de.ibm.com with ESMTP id 39ft8er4k8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 13:33:34 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15TDVxEW29491620 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Jun 2021 13:31:59 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6A5C9A40D8; Tue, 29 Jun 2021 13:33:32 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 212AEA40F4; Tue, 29 Jun 2021 13:33:32 +0000 (GMT) Received: from t46lp67.lnxne.boe (unknown [9.152.108.100]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 29 Jun 2021 13:33:32 +0000 (GMT) From: Janosch Frank To: kvm@vger.kernel.org Cc: linux-s390@vger.kernel.org, imbrenda@linux.ibm.com, david@redhat.com, thuth@redhat.com, cohuck@redhat.com Subject: [kvm-unit-tests PATCH 5/5] lib: s390x: Print if a pgm happened while in SIE Date: Tue, 29 Jun 2021 13:33:22 +0000 Message-Id: <20210629133322.19193-6-frankja@linux.ibm.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210629133322.19193-1-frankja@linux.ibm.com> References: <20210629133322.19193-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: C8mtNVqDCsa0V_GEjS6XbKbtsNW1FgEV X-Proofpoint-ORIG-GUID: bdLZTa7ILanCJvs8MO50YwBEsazyLk39 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-06-29_06:2021-06-28,2021-06-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 mlxlogscore=999 clxscore=1015 impostorscore=0 priorityscore=1501 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106290091 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org For debugging it helps if you know if the PGM happened while being in SIE or not. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda --- lib/s390x/interrupt.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/s390x/interrupt.c b/lib/s390x/interrupt.c index b627942..76015b1 100644 --- a/lib/s390x/interrupt.c +++ b/lib/s390x/interrupt.c @@ -141,10 +141,21 @@ static void print_int_regs(struct stack_frame_int *stack) static void print_pgm_info(struct stack_frame_int *stack) { + bool in_sie; + + in_sie = (lc->pgm_old_psw.addr >= (uintptr_t)sie_entry && + lc->pgm_old_psw.addr <= (uintptr_t)sie_exit); + printf("\n"); - printf("Unexpected program interrupt: %d on cpu %d at %#lx, ilen %d\n", - lc->pgm_int_code, stap(), lc->pgm_old_psw.addr, - lc->pgm_int_id); + if (!in_sie) + printf("Unexpected program interrupt: %d on cpu %d at %#lx, ilen %d\n", + lc->pgm_int_code, stap(), lc->pgm_old_psw.addr, + lc->pgm_int_id); + else + printf("Unexpected program interrupt in SIE: %d on cpu %d at %#lx, ilen %d\n", + lc->pgm_int_code, stap(), lc->pgm_old_psw.addr, + lc->pgm_int_id); + print_int_regs(stack); dump_stack(); report_summary();