From patchwork Thu Apr 21 10:11:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12821430 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 00014C433FE for ; Thu, 21 Apr 2022 10:14:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388216AbiDUKQr (ORCPT ); Thu, 21 Apr 2022 06:16:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388201AbiDUKQc (ORCPT ); Thu, 21 Apr 2022 06:16:32 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 747FEA1A5; Thu, 21 Apr 2022 03:13:34 -0700 (PDT) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23LA1WEa008508; Thu, 21 Apr 2022 10:13:34 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=yo4LllCFXVoNptcHN8ZjGYD0r4WoBqd6FzVYDqATqFk=; b=RkfZkAub5FwdffH+nKz766ntuwhBMqGroFzQOGvZvIGZBMOgJVA8tkacMbzi9jfyrM2s DT6l4LZXJ/rAdoizEKHzKEUfumFQqv5lnnz09Qu9NA9o6z8NI9YvsN9qr9G7w1ZfSGi/ 2iwp8LSIzLqHr1ZlqjtVq67GiF12yu6kxEuUNcLpnFiQKh8qHq25rrq9IHJq80NdJrBR Z9LfJveLgnBqbFSy7YZDl5Uf5sMCybKRJj+uzKSNXl1RIKCB1oIr0JHRaKvkBDeDXvVM Whv79zEDTR/yZKQg92meVyADPVSM9CfRAblxPCt2+5qWhyYXqFnblhegnyEFRJz8g1cz MA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjn0xj66j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:33 +0000 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 23LA8cXA010308; Thu, 21 Apr 2022 10:13:33 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjn0xj65q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:33 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23LA3CSa003013; Thu, 21 Apr 2022 10:13:31 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma04ams.nl.ibm.com with ESMTP id 3ffne97nsc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:31 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23LADRIG51773894 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Apr 2022 10:13:27 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 33A04AE045; Thu, 21 Apr 2022 10:13:27 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 67B14AE04D; Thu, 21 Apr 2022 10:13:26 +0000 (GMT) Received: from linux6.. (unknown [9.114.12.104]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 21 Apr 2022 10:13:26 +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, seiden@linux.ibm.com, nrb@linux.ibm.com Subject: [kvm-unit-tests PATCH v3 01/11] lib: s390x: hardware: Add host_is_qemu() function Date: Thu, 21 Apr 2022 10:11:20 +0000 Message-Id: <20220421101130.23107-2-frankja@linux.ibm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220421101130.23107-1-frankja@linux.ibm.com> References: <20220421101130.23107-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 4TE2kjS9-HWSg6itAAYuOG2xxqxDeobT X-Proofpoint-ORIG-GUID: 71B6rb5P2HR40TRWGHkR_SWVxOy4V0Ij X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-20_06,2022-04-20_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 bulkscore=0 impostorscore=0 suspectscore=0 mlxscore=0 spamscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 malwarescore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210056 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org In the future we'll likely need to check if we're hosted on QEMU so let's make this as easy as possible by providing a dedicated function. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Reviewed-by: Nico Boehr --- lib/s390x/hardware.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/s390x/hardware.h b/lib/s390x/hardware.h index 01eeb261..86fe873c 100644 --- a/lib/s390x/hardware.h +++ b/lib/s390x/hardware.h @@ -45,6 +45,11 @@ static inline bool host_is_lpar(void) return detect_host() == HOST_IS_LPAR; } +static inline bool host_is_qemu(void) +{ + return host_is_tcg() || host_is_kvm(); +} + static inline bool machine_is_z15(void) { uint16_t machine = get_machine_id(); From patchwork Thu Apr 21 10:11:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12821426 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 7F55CC4332F for ; Thu, 21 Apr 2022 10:13:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382731AbiDUKQj (ORCPT ); Thu, 21 Apr 2022 06:16:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388197AbiDUKQc (ORCPT ); Thu, 21 Apr 2022 06:16:32 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B68DA1A6; Thu, 21 Apr 2022 03:13:35 -0700 (PDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23L9dTmg017475; Thu, 21 Apr 2022 10:13:34 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=gTgsdvisl+iE2+03jRWfj/3Yz27I9S9qn+6js90/ncg=; b=ljwbJXN+ebnRj+X3dTg8WPF33wm0w/YzWPNz3ioptwDMw8+UQ11YHolYctBF8pDIdH5G UxSFCIK3tn1mswj7otIWXDTsOaksxZ24cVWbsBbxMyzY3yzk3E8DtTXfwVPKTA77Y5Wy UCMmOgJsE09JoVzNtMP+SC8veQfsBnJu8yVXlO6gcKMUXS9eajWqD9J+HsLvgdRoli81 +s7hFUHGO/kAKg8Oe2SdqUei7kO/qARg4l779R+nHyMqgIwhLfx17Te3Yw0d/MKsLN/w YFXbPXTAYKTQJj3VKOsF1Z+eRrA7RxyaiCZMm0QckIbmbnJot1/A06BeftBcNfrjoGbF Hw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjm2hv2yv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:34 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 23L9n184007592; Thu, 21 Apr 2022 10:13:34 GMT 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 3fjm2hv2xy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:33 +0000 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 23LA3MKL026794; Thu, 21 Apr 2022 10:13:31 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma05fra.de.ibm.com with ESMTP id 3ffne8x2vg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:31 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23LADdd754001954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Apr 2022 10:13:39 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2560CAE056; Thu, 21 Apr 2022 10:13:28 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 59725AE045; Thu, 21 Apr 2022 10:13:27 +0000 (GMT) Received: from linux6.. (unknown [9.114.12.104]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 21 Apr 2022 10:13:27 +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, seiden@linux.ibm.com, nrb@linux.ibm.com Subject: [kvm-unit-tests PATCH v3 02/11] s390x: css: Skip if we're not run by qemu Date: Thu, 21 Apr 2022 10:11:21 +0000 Message-Id: <20220421101130.23107-3-frankja@linux.ibm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220421101130.23107-1-frankja@linux.ibm.com> References: <20220421101130.23107-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: BKPn__yE6Z32VqvuBFgZADwZSbRr5vSn X-Proofpoint-ORIG-GUID: JrxKJT9nPrSzaKMKMXqr_QZGla4ML32F X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-20_06,2022-04-21_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 suspectscore=0 mlxlogscore=890 spamscore=0 bulkscore=0 phishscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210056 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org There's no guarantee that we even find a device at the address we're testing for if we're not running under QEMU. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Reviewed-by: Nico Boehr --- s390x/css.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/s390x/css.c b/s390x/css.c index a333e55a..13a1509f 100644 --- a/s390x/css.c +++ b/s390x/css.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -642,13 +643,21 @@ int main(int argc, char *argv[]) int i; report_prefix_push("Channel Subsystem"); + + /* There's no guarantee where our devices are without qemu */ + if (!host_is_qemu()) { + report_skip("Not running under QEMU"); + goto done; + } + enable_io_isc(0x80 >> IO_SCH_ISC); for (i = 0; tests[i].name; i++) { report_prefix_push(tests[i].name); tests[i].func(); report_prefix_pop(); } - report_prefix_pop(); +done: + report_prefix_pop(); return report_summary(); } From patchwork Thu Apr 21 10:11:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12821427 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 B1123C433F5 for ; Thu, 21 Apr 2022 10:13:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387209AbiDUKQm (ORCPT ); Thu, 21 Apr 2022 06:16:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388192AbiDUKQc (ORCPT ); Thu, 21 Apr 2022 06:16:32 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B0B41080; Thu, 21 Apr 2022 03:13:35 -0700 (PDT) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23L7TF4K030056; Thu, 21 Apr 2022 10:13:35 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=6kQVJE0ZSX45/9AVJGtYDJSalMqL616n0AzcHDa1EkI=; b=FGW3CzM5WF9FGa3ewfKo8WtqcJA0gLQ246/zhzaT50Mzq1+S4/AxKa1thioKdBJMvAO1 tL2NnjsgMkGP7E0Y5xM/72WcHWQaqyW24MIo+euKlVzXIZ6IlBwCzOSG6gXG5IJY54U9 pcppGUdkeKjCCnSgS5qmufpz4yhLC1+So24ni6CgZmoQHZNnsrpDsNt1Rv5pYRLAPnAo u4Y1fLfOC5dGcwHcxeJ6geBZW3Baj1EYiFM8wjdu3vJUnvH40Slt5Zp8SRiTzsGT+G9b iHpnjm3GA72hwaOOwC/LydkqVJ1xZC6JUHPxOBhoAw1JE4HCa2XXE+r23YoYWnHi2cEv /w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjdn4cwtc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:34 +0000 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 23L9gmvS015455; Thu, 21 Apr 2022 10:13:34 GMT 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 3fjdn4cwsv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:34 +0000 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 23LADMEJ024255; Thu, 21 Apr 2022 10:13:32 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 3ffne8qnau-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:32 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23LA0dso29163790 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Apr 2022 10:00:39 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0D345AE045; Thu, 21 Apr 2022 10:13:29 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4B618AE053; Thu, 21 Apr 2022 10:13:28 +0000 (GMT) Received: from linux6.. (unknown [9.114.12.104]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 21 Apr 2022 10:13:28 +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, seiden@linux.ibm.com, nrb@linux.ibm.com Subject: [kvm-unit-tests PATCH v3 03/11] s390x: diag308: Only test subcode 2 under QEMU Date: Thu, 21 Apr 2022 10:11:22 +0000 Message-Id: <20220421101130.23107-4-frankja@linux.ibm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220421101130.23107-1-frankja@linux.ibm.com> References: <20220421101130.23107-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: FsZ9UMPHydHYYHSLTXIOPBjGMHZ7EuuM X-Proofpoint-GUID: pqNv2NjQ_A_uYw9qPMNLZNMe8VwOldv0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-20_06,2022-04-21_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxscore=0 malwarescore=0 bulkscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 mlxlogscore=999 phishscore=0 lowpriorityscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210056 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Other hypervisors might implement it and therefore not send a specification exception. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Reviewed-by: Nico Boehr --- s390x/diag308.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/s390x/diag308.c b/s390x/diag308.c index c9d6c499..ea41b455 100644 --- a/s390x/diag308.c +++ b/s390x/diag308.c @@ -8,6 +8,7 @@ #include #include #include +#include /* The diagnose calls should be blocked in problem state */ static void test_priv(void) @@ -75,7 +76,7 @@ static void test_subcode6(void) /* Unsupported subcodes should generate a specification exception */ static void test_unsupported_subcode(void) { - int subcodes[] = { 2, 0x101, 0xffff, 0x10001, -1 }; + int subcodes[] = { 0x101, 0xffff, 0x10001, -1 }; int idx; for (idx = 0; idx < ARRAY_SIZE(subcodes); idx++) { @@ -85,6 +86,21 @@ static void test_unsupported_subcode(void) check_pgm_int_code(PGM_INT_CODE_SPECIFICATION); report_prefix_pop(); } + + /* + * Subcode 2 is not available under QEMU but might be on other + * hypervisors so we only check for the specification + * exception on QEMU. + */ + report_prefix_pushf("0x%04x", 2); + if (host_is_qemu()) { + expect_pgm_int(); + asm volatile ("diag %0,%1,0x308" :: "d"(0), "d"(2)); + check_pgm_int_code(PGM_INT_CODE_SPECIFICATION); + } else { + report_skip("subcode is supported"); + } + report_prefix_pop(); } static struct { From patchwork Thu Apr 21 10:11:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12821431 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 3AC6DC433EF for ; Thu, 21 Apr 2022 10:14:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388240AbiDUKQt (ORCPT ); Thu, 21 Apr 2022 06:16:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388214AbiDUKQc (ORCPT ); Thu, 21 Apr 2022 06:16:32 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEEC7B7CB; Thu, 21 Apr 2022 03:13:36 -0700 (PDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23L9BR0s017587; Thu, 21 Apr 2022 10:13:36 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=oxUwuhd5i26ivx4MkHskH9Qdx2oH2sebwjv+Uq2yqz8=; b=ONvCRnOI9YmEwM7ctffRc8KvevDFHR9wMwadnc26Vt3ncewBNxkJ0v4gHxjuIJnV8ukp fI4vth36eocrPvCzUPphYOEa5eFL8z3d2bo72LqEdfRtCsCY8voSrlR4k0hrs5Gq6eL6 hcE9xaBpZ5+CEKGTP+wyqG8aWl267EvcPQXOototOXUnvWietQW3WlBxhDmaj8YZ3/96 Slj4yNs7dR1IyKZDMalTsGUMV7JywKfY0qOOTi1C92qmAzJtvwvCFyNN7Tzy8f1AvEDH QFO3uDyj/432Scy+36qquAZk4O6D/Z7UnHUwxhWUe7p3/IK0kg44alYHVO45ih4A8Sep QA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjm2hv30g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:36 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 23L9RYJQ029106; Thu, 21 Apr 2022 10:13:35 GMT Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjm2hv2yt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:35 +0000 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23LA3vJL001680; Thu, 21 Apr 2022 10:13:33 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma04fra.de.ibm.com with ESMTP id 3ffvt9dp3u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:33 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23LADURZ41025844 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Apr 2022 10:13:30 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EA06AAE051; Thu, 21 Apr 2022 10:13:29 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3393EAE045; Thu, 21 Apr 2022 10:13:29 +0000 (GMT) Received: from linux6.. (unknown [9.114.12.104]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 21 Apr 2022 10:13:29 +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, seiden@linux.ibm.com, nrb@linux.ibm.com Subject: [kvm-unit-tests PATCH v3 04/11] s390x: pfmf: Initialize pfmf_r1 union on declaration Date: Thu, 21 Apr 2022 10:11:23 +0000 Message-Id: <20220421101130.23107-5-frankja@linux.ibm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220421101130.23107-1-frankja@linux.ibm.com> References: <20220421101130.23107-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: XFyunxp8p_xbi6XQumzeQEZv3VNzjpVo X-Proofpoint-ORIG-GUID: J5wMkrwLHZQu9qqtnFEsUh8_QZFu7or6 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-20_06,2022-04-21_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 spamscore=0 bulkscore=0 phishscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210056 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Let's make this test look a bit nicer. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Reviewed-by: Thomas Huth --- s390x/pfmf.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/s390x/pfmf.c b/s390x/pfmf.c index aa130529..178abb5a 100644 --- a/s390x/pfmf.c +++ b/s390x/pfmf.c @@ -28,7 +28,11 @@ static void test_priv(void) static void test_4k_key(void) { - union pfmf_r1 r1; + union pfmf_r1 r1 = { + .reg.sk = 1, + .reg.fsc = PFMF_FSC_4K, + .reg.key = 0x30, + }; union skey skey; report_prefix_push("4K"); @@ -36,10 +40,6 @@ static void test_4k_key(void) report_skip("storage key removal facility is active"); goto out; } - r1.val = 0; - r1.reg.sk = 1; - r1.reg.fsc = PFMF_FSC_4K; - r1.reg.key = 0x30; pfmf(r1.val, pagebuf); skey.val = get_storage_key(pagebuf); skey.val &= SKEY_ACC | SKEY_FP; @@ -52,18 +52,19 @@ static void test_1m_key(void) { int i; bool rp = true; - union pfmf_r1 r1; union skey skey; + union pfmf_r1 r1 = { + .reg.fsc = PFMF_FSC_1M, + .reg.key = 0x30, + .reg.sk = 1, + }; report_prefix_push("1M"); if (test_facility(169)) { report_skip("storage key removal facility is active"); goto out; } - r1.val = 0; - r1.reg.sk = 1; - r1.reg.fsc = PFMF_FSC_1M; - r1.reg.key = 0x30; + pfmf(r1.val, pagebuf); for (i = 0; i < 256; i++) { skey.val = get_storage_key(pagebuf + i * PAGE_SIZE); @@ -80,11 +81,10 @@ out: static void test_4k_clear(void) { - union pfmf_r1 r1; - - r1.val = 0; - r1.reg.cf = 1; - r1.reg.fsc = PFMF_FSC_4K; + union pfmf_r1 r1 = { + .reg.cf = 1, + .reg.fsc = PFMF_FSC_4K, + }; report_prefix_push("4K"); memset(pagebuf, 42, PAGE_SIZE); @@ -97,13 +97,12 @@ static void test_4k_clear(void) static void test_1m_clear(void) { int i; - union pfmf_r1 r1; + union pfmf_r1 r1 = { + .reg.cf = 1, + .reg.fsc = PFMF_FSC_1M, + }; unsigned long sum = 0; - r1.val = 0; - r1.reg.cf = 1; - r1.reg.fsc = PFMF_FSC_1M; - report_prefix_push("1M"); memset(pagebuf, 42, PAGE_SIZE * 256); pfmf(r1.val, pagebuf); From patchwork Thu Apr 21 10:11:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12821433 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 DA50EC433EF for ; Thu, 21 Apr 2022 10:14:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388221AbiDUKQy (ORCPT ); Thu, 21 Apr 2022 06:16:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388213AbiDUKQc (ORCPT ); Thu, 21 Apr 2022 06:16:32 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A30F8B7CE; Thu, 21 Apr 2022 03:13:37 -0700 (PDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23L9ivj9017186; Thu, 21 Apr 2022 10:13:37 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=zYpnu2Mol32tcA3TcTlE1tf7qr23StNEAfsnHMwwm9c=; b=KFUqYPsa6ZPyK9r0/mYjfuxLp420kK62S9XTKP0yIpqUci3Tl0aXQMUbPYFVKa1DMDRH KdbwMgPAT7g6oG0iEVYG+dOmIDO23k4PBE8OM/tes+tRCIqMMYsQSaTMMb7f0nIa1+Ff 4T1SPtsFhGzmbs8TXeIN+q5UH7c5gbhricj0KD6GRckpphggBjZ2NUSK1mCasIpe/IjE a0D6E+Bo3VUqMZzw831cj3lTKocDf8MS/he2GnqW/lJdLam+oHxYg06S1YBW3kRc89Cx svrvFsGIgAfrhnJDPFMyp+9jcOlUkaRPAcLD+cNp9/8PyP7QQJNElpsUzVjARKFHDF4a eg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjm2hv30r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:37 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 23L9UmMw012630; Thu, 21 Apr 2022 10:13:36 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjm2hv304-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:36 +0000 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23LA3J8j025620; Thu, 21 Apr 2022 10:13:34 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma02fra.de.ibm.com with ESMTP id 3fgu6u4hb4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:34 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23LADUvA34275590 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Apr 2022 10:13:30 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D3311AE055; Thu, 21 Apr 2022 10:13:30 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1C3DEAE051; Thu, 21 Apr 2022 10:13:30 +0000 (GMT) Received: from linux6.. (unknown [9.114.12.104]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 21 Apr 2022 10:13:29 +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, seiden@linux.ibm.com, nrb@linux.ibm.com Subject: [kvm-unit-tests PATCH v3 05/11] s390x: snippets: asm: Add license and copyright headers Date: Thu, 21 Apr 2022 10:11:24 +0000 Message-Id: <20220421101130.23107-6-frankja@linux.ibm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220421101130.23107-1-frankja@linux.ibm.com> References: <20220421101130.23107-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: IrhBYDYtaGLaW63z40JLDeQQhxjwEocI X-Proofpoint-ORIG-GUID: nAzuL2mxAEY5Ev6FknTZjxsf3_w_rB60 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-20_06,2022-04-21_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 spamscore=0 bulkscore=0 phishscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210056 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Time for some cleanup of the snippets to make them look like any other test file. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda --- s390x/snippets/asm/snippet-pv-diag-288.S | 9 +++++++++ s390x/snippets/asm/snippet-pv-diag-500.S | 9 +++++++++ s390x/snippets/asm/snippet-pv-diag-yield.S | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/s390x/snippets/asm/snippet-pv-diag-288.S b/s390x/snippets/asm/snippet-pv-diag-288.S index e3e63121..aaee3cd1 100644 --- a/s390x/snippets/asm/snippet-pv-diag-288.S +++ b/s390x/snippets/asm/snippet-pv-diag-288.S @@ -1,3 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Diagnose 0x288 snippet used for PV interception testing. + * + * Copyright (c) 2021 IBM Corp + * + * Authors: + * Janosch Frank + */ #include .section .text diff --git a/s390x/snippets/asm/snippet-pv-diag-500.S b/s390x/snippets/asm/snippet-pv-diag-500.S index 50c06779..8dd66bd9 100644 --- a/s390x/snippets/asm/snippet-pv-diag-500.S +++ b/s390x/snippets/asm/snippet-pv-diag-500.S @@ -1,3 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Diagnose 0x500 snippet used for PV interception tests + * + * Copyright (c) 2021 IBM Corp + * + * Authors: + * Janosch Frank + */ #include .section .text diff --git a/s390x/snippets/asm/snippet-pv-diag-yield.S b/s390x/snippets/asm/snippet-pv-diag-yield.S index 5795cf0f..78a5b07a 100644 --- a/s390x/snippets/asm/snippet-pv-diag-yield.S +++ b/s390x/snippets/asm/snippet-pv-diag-yield.S @@ -1,3 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Diagnose 0x44 and 0x9c snippet used for PV interception tests + * + * Copyright (c) 2021 IBM Corp + * + * Authors: + * Janosch Frank + */ .section .text xgr %r0, %r0 From patchwork Thu Apr 21 10:11:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12821428 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 C1269C43219 for ; Thu, 21 Apr 2022 10:13:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388188AbiDUKQo (ORCPT ); Thu, 21 Apr 2022 06:16:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388204AbiDUKQc (ORCPT ); Thu, 21 Apr 2022 06:16:32 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22B0CB7D5; Thu, 21 Apr 2022 03:13:38 -0700 (PDT) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23L9j1nR012166; Thu, 21 Apr 2022 10:13:37 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=kycaE6IqT8OH0UM6uHvkjrBf5dDdAuTHuMCvsG6vyTg=; b=NtNIpXPH6P9OcH1eAY4SCKEpcd69i9wNa0R69De2Cqg27gpVQuZ1h9hOvoZL9lfd137x OL/QWSuniKnzrRPU5aLbEBzuYBJINymxY0o6XveK5rMO7dKZ1FqXThppNnppA/tmNPPN ygH4EjGx+c3jlA1JD56iJNeOTPvia+16HfJ+DVQ23lDKF0qVGTGrdkvyKeiaJe2cTrvu yv/AGGHhjvdQJcF5dYEc33mbyL6r8lkFa04GSV2JGbQapF9W/rGWTEoM9AflaWJl3CLY ithX58ULiW5REwWp2ZCUxWS/zUr9DCmcqkblxVsJ6B4+2zFgCi7gBl/rSlj8zAeoywzq ig== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjn0xj67w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:37 +0000 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 23L9jFLK015264; Thu, 21 Apr 2022 10:13:37 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjn0xj675-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:37 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23LA3Fl7003025; Thu, 21 Apr 2022 10:13:34 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma04ams.nl.ibm.com with ESMTP id 3ffne97nsk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:34 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23LADVgj48824614 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Apr 2022 10:13:31 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C4759AE055; Thu, 21 Apr 2022 10:13:31 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 04773AE04D; Thu, 21 Apr 2022 10:13:31 +0000 (GMT) Received: from linux6.. (unknown [9.114.12.104]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 21 Apr 2022 10:13: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, seiden@linux.ibm.com, nrb@linux.ibm.com Subject: [kvm-unit-tests PATCH v3 06/11] s390x: pv-diags: Cleanup includes Date: Thu, 21 Apr 2022 10:11:25 +0000 Message-Id: <20220421101130.23107-7-frankja@linux.ibm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220421101130.23107-1-frankja@linux.ibm.com> References: <20220421101130.23107-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: i-4nuVdPWKqNpUkWgvebteX2I0Mm2svN X-Proofpoint-ORIG-GUID: NvHGzrqPgMnw2QzLOPuu9StsUTEa983o X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-20_06,2022-04-20_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=901 bulkscore=0 impostorscore=0 suspectscore=0 mlxscore=0 spamscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 malwarescore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210056 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org This file has way too much includes. Time to remove some. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Reviewed-by: Thomas Huth --- s390x/pv-diags.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/s390x/pv-diags.c b/s390x/pv-diags.c index 6899b859..9ced68c7 100644 --- a/s390x/pv-diags.c +++ b/s390x/pv-diags.c @@ -8,23 +8,10 @@ * Janosch Frank */ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include +#include +#include static struct vm vm; From patchwork Thu Apr 21 10:11:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12821429 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 5A6E1C433EF for ; Thu, 21 Apr 2022 10:13:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388204AbiDUKQp (ORCPT ); Thu, 21 Apr 2022 06:16:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356293AbiDUKQc (ORCPT ); Thu, 21 Apr 2022 06:16:32 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C34B3B874; Thu, 21 Apr 2022 03:13:39 -0700 (PDT) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23L9Urjq030106; Thu, 21 Apr 2022 10:13:39 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=yoE9kcQPGUlgdmj2KwuWhbykIPpOygwu/bc5gzbl5eQ=; b=ce41oDW1PooD39GWDWwxsxTf+T4U6zOG6IIneSB3377zsbaSTvMWqZ7BwbcWD8kyfxRf CNbb4nUZWBPnpptHag5BA2+3yZlSJFUt7RuP8luGiFG9oQgR8Nf7+5Yv4FSuaE9jKCSl 12cPXIZCSfbC1ohj+BSLKVlbBQNwHvPXA6rmxoUQuGnA8yir2wKqGb89z+r5f6k1Up+Z zhNgXxGgjEwwea/TVFh69cNfbs+bkZOZ980chokCy38zdQQ6ez6jNXcBIqnDVXmXz2ih QlcCXL6aqMOwbQZftPngZAFCrrbqTYblUAQgrRx20IT3EqEVftLLrpR3T7uB+s0VtlPB Iw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjdn4cwuq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:39 +0000 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 23LA9wIR020012; Thu, 21 Apr 2022 10:13:39 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjdn4cwu5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:38 +0000 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23LA3Yg1025697; Thu, 21 Apr 2022 10:13:36 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma02fra.de.ibm.com with ESMTP id 3fgu6u4hb9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:36 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23LADWPE52232542 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Apr 2022 10:13:32 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B7853AE056; Thu, 21 Apr 2022 10:13:32 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EAF53AE04D; Thu, 21 Apr 2022 10:13:31 +0000 (GMT) Received: from linux6.. (unknown [9.114.12.104]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 21 Apr 2022 10:13: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, seiden@linux.ibm.com, nrb@linux.ibm.com Subject: [kvm-unit-tests PATCH v3 07/11] s390x: css: Cleanup includes Date: Thu, 21 Apr 2022 10:11:26 +0000 Message-Id: <20220421101130.23107-8-frankja@linux.ibm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220421101130.23107-1-frankja@linux.ibm.com> References: <20220421101130.23107-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: SHm2xAmxNAuVp-Aeo3KzuxW2RyNiVZZj X-Proofpoint-GUID: QxufR6lJIEiRyZQue42sMNHF9l8zj_-u X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-20_06,2022-04-21_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxscore=0 malwarescore=0 bulkscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 mlxlogscore=863 phishscore=0 lowpriorityscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210056 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Most includes were related to allocation but that's done in the io allocation library so having them in the test doesn't make sense. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda --- s390x/css.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/s390x/css.c b/s390x/css.c index 13a1509f..fabe5237 100644 --- a/s390x/css.c +++ b/s390x/css.c @@ -9,17 +9,14 @@ */ #include -#include -#include -#include #include -#include -#include #include +#include +#include + #include #include -#include #define DEFAULT_CU_TYPE 0x3832 /* virtio-ccw */ static unsigned long cu_type = DEFAULT_CU_TYPE; From patchwork Thu Apr 21 10:11:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12821434 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 89BABC433F5 for ; Thu, 21 Apr 2022 10:14:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388242AbiDUKQ4 (ORCPT ); Thu, 21 Apr 2022 06:16:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388159AbiDUKQd (ORCPT ); Thu, 21 Apr 2022 06:16:33 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E32E3BC0F; Thu, 21 Apr 2022 03:13:39 -0700 (PDT) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23L9j5Dj013696; Thu, 21 Apr 2022 10:13:39 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=pU1351TxxgaKcsdGEtePqvQruDptxNcj9mnpNTf7+Rg=; b=CTQvujgR3d9HhVmO+pO88E25W9GjOJw/zzwvoNXXSXEbPvzCadY3tJPkPEjdQ+9KbSg+ b4SmO3qsv5jDChfGM1wYfh/zDRZrvDg07MAcjoEjffxUuVPAMy0NWuj+REVLORmqUTDj lRtfYUTAIU/aeWZMdZrxIgKhgO7RGRJzsCBkbxniOfCjDXC8U5/4xhgpp9qHeDGy/xt7 qvHhtN91UEcg75g2sFaSd/eMLBqIqQkONE07hDnXd+Vd+aFYoCdZ256UFsGHITpZHM9u mviGfjk5iB6Xf1Y2T/GoUfr4MmmedN68FBPO929YXlBW3R10OOXYBg4Of5zJiIDTTwxu kw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjn0xj68u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:39 +0000 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 23LADNWq026564; Thu, 21 Apr 2022 10:13:39 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjn0xj67s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:38 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23LA3CSd003013; Thu, 21 Apr 2022 10:13:36 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma04ams.nl.ibm.com with ESMTP id 3ffne97nsp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:36 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23LADXkC38273292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Apr 2022 10:13:33 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A931FAE051; Thu, 21 Apr 2022 10:13:33 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DDA52AE04D; Thu, 21 Apr 2022 10:13:32 +0000 (GMT) Received: from linux6.. (unknown [9.114.12.104]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 21 Apr 2022 10:13: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, seiden@linux.ibm.com, nrb@linux.ibm.com Subject: [kvm-unit-tests PATCH v3 08/11] s390x: iep: Cleanup includes Date: Thu, 21 Apr 2022 10:11:27 +0000 Message-Id: <20220421101130.23107-9-frankja@linux.ibm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220421101130.23107-1-frankja@linux.ibm.com> References: <20220421101130.23107-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: LErJ-tcqZ4UEL6OLXsnh7LFBA40oQDQI X-Proofpoint-ORIG-GUID: guO3BntxJN5CXnhP4ybKPYoALitnLvu4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-20_06,2022-04-20_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=848 bulkscore=0 impostorscore=0 suspectscore=0 mlxscore=0 spamscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 malwarescore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210056 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org We don't use barriers so let's remove the include. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda --- s390x/iep.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/s390x/iep.c b/s390x/iep.c index 8d5e044b..4b3e09a7 100644 --- a/s390x/iep.c +++ b/s390x/iep.c @@ -9,11 +9,10 @@ */ #include #include +#include #include #include -#include #include -#include static void test_iep(void) { From patchwork Thu Apr 21 10:11:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12821432 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 D1220C433F5 for ; Thu, 21 Apr 2022 10:14:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388201AbiDUKQw (ORCPT ); Thu, 21 Apr 2022 06:16:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388217AbiDUKQd (ORCPT ); Thu, 21 Apr 2022 06:16:33 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF1D52635; Thu, 21 Apr 2022 03:13:40 -0700 (PDT) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23L8nLq6025313; Thu, 21 Apr 2022 10:13:40 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=NDeB37/1KcYxqA3vWagZwD/m0C4f6IfTjz9xT9i4vXY=; b=hUTGQXpszEmizoRkwqi43KV+VyRakvv67AGkIsl07LWrcaR/ddOwpHG7n/ShxXB0E9ZW IVPBwQy9wFUbWgc9NhRnNA3mc9ty7bZZ3+mq5dztcEQPClZNn32SYbQ+ONcrRO9b/AtR eSwcYY1DwV3Uar219K3fS0BR8xWxViSNaik7yEacDdCP7XePIJRuE1jpGNRxm76YgwDY kdvnFtio/oQ/Q2gJjUUN06W+b2BE/l/cKKswSUm4PZIRETUpOPeyIs7VeM+JUzoMHQGC ODi+nehQYGa69MX4xTdV25NyOaI2r8Z5pVZvhgDQzqZQjGgbHscdPehD7YdqeTOJXMl8 Mg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3fjf52ka4p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:39 +0000 Received: from m0098416.ppops.net (m0098416.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 23LA5xvQ014461; Thu, 21 Apr 2022 10:13:39 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0b-001b2d01.pphosted.com with ESMTP id 3fjf52ka3c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:39 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23LA4GhV023651; Thu, 21 Apr 2022 10:13:37 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma06ams.nl.ibm.com with ESMTP id 3ffn2hyp99-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:37 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23LADY8817629550 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Apr 2022 10:13:34 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9B2B1AE04D; Thu, 21 Apr 2022 10:13:34 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CFB33AE053; Thu, 21 Apr 2022 10:13:33 +0000 (GMT) Received: from linux6.. (unknown [9.114.12.104]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 21 Apr 2022 10:13:33 +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, seiden@linux.ibm.com, nrb@linux.ibm.com Subject: [kvm-unit-tests PATCH v3 09/11] s390x: mvpg: Cleanup includes Date: Thu, 21 Apr 2022 10:11:28 +0000 Message-Id: <20220421101130.23107-10-frankja@linux.ibm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220421101130.23107-1-frankja@linux.ibm.com> References: <20220421101130.23107-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: GgJeJd9zHionXmRFqoIWYzXIg4RX2iF5 X-Proofpoint-ORIG-GUID: IhBvCnoDAWMunK9zHNdLfQ3C5Y32ZbHi X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-20_06,2022-04-20_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 spamscore=0 phishscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 mlxlogscore=732 malwarescore=0 mlxscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210056 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Time to remove unneeded includes. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda --- s390x/mvpg.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/s390x/mvpg.c b/s390x/mvpg.c index 62f0fc5a..04e5218f 100644 --- a/s390x/mvpg.c +++ b/s390x/mvpg.c @@ -9,15 +9,12 @@ */ #include #include -#include #include #include #include #include #include #include -#include -#include #include #include #include From patchwork Thu Apr 21 10:11:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12821435 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 81833C433F5 for ; Thu, 21 Apr 2022 10:14:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388271AbiDUKRC (ORCPT ); Thu, 21 Apr 2022 06:17:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388218AbiDUKQd (ORCPT ); Thu, 21 Apr 2022 06:16:33 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4AADDF43; Thu, 21 Apr 2022 03:13:41 -0700 (PDT) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23L96HmE025366; Thu, 21 Apr 2022 10:13:41 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=QsVEsz5SgQ99QTPxLEgFCNG+nb0Tr2kuWWogZlt6kRw=; b=PnXQ5KkRzqrDqCXkCs2pj0iF+scENYfymNDv6/A3mqUTIg5VqAfLcIeiuUOaFhw3T45T iSkoUMa63Ic3iT7d3mJXmMAbBTrsnnfGTcqJyumw/sTr/IPueoJcvRNUF4itiJmPD1CT uWcv3kCZr76Ihmep2xT7G+4VPI3DhuyIHyrk3wPGI83WYaqsFofI94Y9HuC1XoqDwOiF xqRypZT7YWdU9naZSaxSUaQyWkN2csm+Hgti0mXnTL2bgdZckwc9eUjXAju1sHLm2UzA yzuKxUNs85gF7uSSKMGT+ulqnmF44k96Bd0mmVk8kl+csBSFg/T2yitRpA2uoraeA8sZ Pg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3fjf52ka51-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:40 +0000 Received: from m0098416.ppops.net (m0098416.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 23LAA9qn003060; Thu, 21 Apr 2022 10:13:40 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0b-001b2d01.pphosted.com with ESMTP id 3fjf52ka4h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:40 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23LA3U7G013552; Thu, 21 Apr 2022 10:13:38 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma06fra.de.ibm.com with ESMTP id 3ffn2hx2ev-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:38 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23LADk3L54460884 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Apr 2022 10:13:46 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 82FECAE04D; Thu, 21 Apr 2022 10:13:35 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C14B6AE056; Thu, 21 Apr 2022 10:13:34 +0000 (GMT) Received: from linux6.. (unknown [9.114.12.104]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 21 Apr 2022 10:13:34 +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, seiden@linux.ibm.com, nrb@linux.ibm.com Subject: [kvm-unit-tests PATCH v3 10/11] s390x: uv-host: Fix pgm tests Date: Thu, 21 Apr 2022 10:11:29 +0000 Message-Id: <20220421101130.23107-11-frankja@linux.ibm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220421101130.23107-1-frankja@linux.ibm.com> References: <20220421101130.23107-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: FYYmOxqDht9S8lRFGq4AyMNaiuqlwfPZ X-Proofpoint-ORIG-GUID: jGBZSiG82JxSKSszIYDg2oL6e4u-WtxH X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-20_06,2022-04-20_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 spamscore=0 phishscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210056 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org We don't want to re-enter the UV call on a cc > 1 for this test. Signed-off-by: Janosch Frank Reviewed-by: Nico Boehr --- s390x/uv-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s390x/uv-host.c b/s390x/uv-host.c index d3018e3c..5ac8a32c 100644 --- a/s390x/uv-host.c +++ b/s390x/uv-host.c @@ -76,7 +76,7 @@ static void test_priv(void) uvcb.cmd = cmds[i].cmd; uvcb.len = cmds[i].len; enter_pstate(); - uv_call(0, (uint64_t)&uvcb); + uv_call_once(0, (uint64_t)&uvcb); pgm = clear_pgm_int(); report(pgm == PGM_INT_CODE_PRIVILEGED_OPERATION, "%s", cmds[i].name); } From patchwork Thu Apr 21 10:11:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12821436 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 DFA61C433F5 for ; Thu, 21 Apr 2022 10:14:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388249AbiDUKRN (ORCPT ); Thu, 21 Apr 2022 06:17:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388170AbiDUKQe (ORCPT ); Thu, 21 Apr 2022 06:16:34 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8AC3E0D1; Thu, 21 Apr 2022 03:13:42 -0700 (PDT) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23L9Urjt030106; Thu, 21 Apr 2022 10:13:42 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=pdgXxv0+VCuXjqXpq6OOi2OhFQbz4E7VV/VHS8VNUxM=; b=KvwiPAUn/hL6//tU+3ShbtElEcT8jqv8vG6dblZYgu+kDNXyKQN5k7+FZSaPMRl6gnqA 0K6SjWrjVtg8u9xa7pZ7a2Nqy/FVmLJscmHrWW69uzDO/8omVB2i9CLVknF7lhOJ74NM +TDys5/P4U3aEBe9J6CQZwQW0/6dFh8Guh6b6RBmhUxImSTiBlGxSX1XspymohINJ4DQ 5dW5vkWJrYPGw48fRU8GxSDyT25Lug0CwJZVv+gtYsIFKobS1ErmJw0wqLApu6wNU3sy pHouNXoO4hMbWwf59jkAWVJKnMAQVMVyEjgHOIS2zECT7ovui4Zw4HaewKbECw0zBerq vA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjdn4cww3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:42 +0000 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 23L9t6F1025508; Thu, 21 Apr 2022 10:13:42 GMT 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 3fjdn4cwv5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:41 +0000 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 23LADQrL024264; Thu, 21 Apr 2022 10:13:39 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 3ffne8qnb0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 10:13:39 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23LA0k3m52887970 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Apr 2022 10:00:46 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 747A9AE053; Thu, 21 Apr 2022 10:13:36 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B2E6CAE04D; Thu, 21 Apr 2022 10:13:35 +0000 (GMT) Received: from linux6.. (unknown [9.114.12.104]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 21 Apr 2022 10:13:35 +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, seiden@linux.ibm.com, nrb@linux.ibm.com Subject: [kvm-unit-tests PATCH v3 11/11] s390x: Restore registers in diag308_load_reset() error path Date: Thu, 21 Apr 2022 10:11:30 +0000 Message-Id: <20220421101130.23107-12-frankja@linux.ibm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220421101130.23107-1-frankja@linux.ibm.com> References: <20220421101130.23107-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 37YfNc4rmd88ftf1ww-E_Duaufwiq6fW X-Proofpoint-GUID: kYM_BbMyBHY0mL5MYEgvkpHQ6kUIUkn8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-20_06,2022-04-21_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxscore=0 malwarescore=0 bulkscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 mlxlogscore=999 phishscore=0 lowpriorityscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210056 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org In case of an error we'll currently return with the wrong values in gr0 and gr1. Let's fix that by restoring the registers before setting the return value and branching to the return address. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda --- s390x/cpu.S | 1 + 1 file changed, 1 insertion(+) diff --git a/s390x/cpu.S b/s390x/cpu.S index 82b5e25d..0bd8c0e3 100644 --- a/s390x/cpu.S +++ b/s390x/cpu.S @@ -34,6 +34,7 @@ diag308_load_reset: stg %r15, GEN_LC_SW_INT_GRS + 15 * 8 /* Do the reset */ diag %r0,%r2,0x308 + RESTORE_REGS_STACK /* Failure path */ xgr %r2, %r2 br %r14