From patchwork Thu Apr 21 08:50:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Boehr X-Patchwork-Id: 12821335 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 5ACB4C433FE for ; Thu, 21 Apr 2022 08:50:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386941AbiDUIxW (ORCPT ); Thu, 21 Apr 2022 04:53:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386937AbiDUIxV (ORCPT ); Thu, 21 Apr 2022 04:53:21 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0ED21CB3A; Thu, 21 Apr 2022 01:50:28 -0700 (PDT) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23L6jIQ7011662; Thu, 21 Apr 2022 08:50:28 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=OCevSBTVZLO9hybnaROiU4MfB5/63o3++UYROEzYc1w=; b=DyfHTt2AADNZmnNJNiRb6iVBSDidLzduwpH4dN0Eq2TmXH9YyrWD/G+9Nye0QJlhCQIO mvyvfIIJ39vBkWdRmnn80pmupfLAL8a2KHpHP4x7Dr51FlDMDJs3M8Mbv29NRweKI4w2 Qz8D8gQdJ3rWBiJELINMPnvyRTrFs37OXrFb52epbEjfwXjNRRjvpOhU44skUHRk81Wo pt6b1Chtxg9l8pQJvimiwWsR12XlWp2wh80tES7f2/IDO6Y92A2G3gpCPqJkZ8vb5O0F qfnoXBbBw7Fq7bTujO5RlENYVEb6ADZQKPnYbIC7f0Lm/s8RA+ASg4kiL1/kkcYFEBdP Zg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjff3gsnc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 08:50:28 +0000 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 23L8jK3O013336; Thu, 21 Apr 2022 08:50:28 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 3fjff3gsmk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 08:50:27 +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 23L8S6qk015752; Thu, 21 Apr 2022 08:50:25 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma04fra.de.ibm.com with ESMTP id 3ffvt9dk4b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 08:50:25 +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 23L8bWB144761464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Apr 2022 08:37:32 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7B364A4051; Thu, 21 Apr 2022 08:50:22 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 32476A4053; Thu, 21 Apr 2022 08:50:22 +0000 (GMT) Received: from t46lp57.lnxne.boe (unknown [9.152.108.100]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 21 Apr 2022 08:50:22 +0000 (GMT) From: Nico Boehr To: kvm@vger.kernel.org, linux-s390@vger.kernel.org Cc: frankja@linux.ibm.com, imbrenda@linux.ibm.com, thuth@redhat.com, farman@linux.ibm.com Subject: [kvm-unit-tests PATCH v2 1/3] s390x: epsw: fix report_pop_prefix() when running under non-QEMU Date: Thu, 21 Apr 2022 10:50:19 +0200 Message-Id: <20220421085021.1651688-2-nrb@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220421085021.1651688-1-nrb@linux.ibm.com> References: <20220421085021.1651688-1-nrb@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 5zB65PVo_uPKjA00f_Oisnuxz_kEQ5Eq X-Proofpoint-ORIG-GUID: _9dj-qu410BpOJI8My6ABoe7JhpufF6g 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 mlxlogscore=999 adultscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 bulkscore=0 phishscore=0 suspectscore=0 priorityscore=1501 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210048 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org When we don't run in QEMU, we didn't push a prefix, hence pop won't work. Fix this by pushing the prefix before the QEMU check. Signed-off-by: Nico Boehr Reviewed-by: Thomas Huth Reviewed-by: Eric Farman --- s390x/epsw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/s390x/epsw.c b/s390x/epsw.c index 5b73f4b3db6c..d8090d95a486 100644 --- a/s390x/epsw.c +++ b/s390x/epsw.c @@ -97,13 +97,13 @@ static void test_epsw(void) int main(int argc, char **argv) { + report_prefix_push("epsw"); + if (!host_is_kvm() && !host_is_tcg()) { report_skip("Not running under QEMU"); goto done; } - report_prefix_push("epsw"); - test_epsw(); done: From patchwork Thu Apr 21 08:50:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Boehr X-Patchwork-Id: 12821336 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 7F0A3C433EF for ; Thu, 21 Apr 2022 08:50:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386939AbiDUIxY (ORCPT ); Thu, 21 Apr 2022 04:53:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386932AbiDUIxV (ORCPT ); Thu, 21 Apr 2022 04:53:21 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75FEFDEDB; Thu, 21 Apr 2022 01:50:30 -0700 (PDT) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23L6jBmc002668; Thu, 21 Apr 2022 08:50:30 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=pfMdYvFFCrhWk8ag/FKteO217Rz48d7za6nzd1UlVyY=; b=O8cK7UpOoEkBQr+798F4rzbabwoYZqPak9GG/tTmQgghlbBjz/MwtggEMud3a9uDw1Oa aXbbn1yXb8bweCZ/8UKhjXxrMJ1MNswcytaSgdqHwaXnHu0VFRattxAi7Ojfm1kAz78E BXCyFFlcWOWzD4w7ogy5uF0tmYIpNDfdHMCcTHgScVe1kMp+JPwaNEJpgYWnMUByHDR2 jQFpbTzu7bL5Yv8NyyWdvyHuW1KrZg+CiXjCtB3q4tCBXasbCsHOkOZ30GoqhYZFQJAV NU5dXU6moG6dAyWwqOFaOLYGq9EQgAMGzdWXSNLeNC5AnYBkEjS4/XkhGvSRL9xrwjYQ rg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fhxh8xr5a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 08:50:29 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 23L8W3Vt029377; Thu, 21 Apr 2022 08:50:28 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 3fhxh8xr4v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 08:50:28 +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 23L8RG3T015164; Thu, 21 Apr 2022 08:50:26 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma04ams.nl.ibm.com with ESMTP id 3ffne97j1w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 08:50:25 +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 23L8bXCL34406796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Apr 2022 08:37:33 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CDF90A4053; Thu, 21 Apr 2022 08:50:22 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 85C8EA4057; Thu, 21 Apr 2022 08:50:22 +0000 (GMT) Received: from t46lp57.lnxne.boe (unknown [9.152.108.100]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 21 Apr 2022 08:50:22 +0000 (GMT) From: Nico Boehr To: kvm@vger.kernel.org, linux-s390@vger.kernel.org Cc: frankja@linux.ibm.com, imbrenda@linux.ibm.com, thuth@redhat.com, farman@linux.ibm.com Subject: [kvm-unit-tests PATCH v2 2/3] s390x: tprot: use lib include for mmu.h Date: Thu, 21 Apr 2022 10:50:20 +0200 Message-Id: <20220421085021.1651688-3-nrb@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220421085021.1651688-1-nrb@linux.ibm.com> References: <20220421085021.1651688-1-nrb@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: H3JgW0tNJsmqMfZ9vtMHRedf-YXFRZbr X-Proofpoint-GUID: k-Dekv4a8lfDkeVZ7ueOJDthJCRe62Ib 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 suspectscore=0 spamscore=0 mlxscore=0 impostorscore=0 bulkscore=0 malwarescore=0 mlxlogscore=894 phishscore=0 lowpriorityscore=0 adultscore=0 clxscore=1015 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210048 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org mmu.h should come from the library includes Signed-off-by: Nico Boehr Reviewed-by: Thomas Huth Reviewed-by: Janosch Frank --- s390x/tprot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s390x/tprot.c b/s390x/tprot.c index 460a0db7ffcf..760e7ecdf914 100644 --- a/s390x/tprot.c +++ b/s390x/tprot.c @@ -12,7 +12,7 @@ #include #include #include -#include "mmu.h" +#include #include #include From patchwork Thu Apr 21 08:50:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Boehr X-Patchwork-Id: 12821337 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 1F12AC433F5 for ; Thu, 21 Apr 2022 08:50:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386928AbiDUIx0 (ORCPT ); Thu, 21 Apr 2022 04:53:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386942AbiDUIxX (ORCPT ); Thu, 21 Apr 2022 04:53:23 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFD5A1EAF5; Thu, 21 Apr 2022 01:50:29 -0700 (PDT) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23L8iL8T014917; Thu, 21 Apr 2022 08:50:29 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=cA99gfnWqwjdSC01xE3f+fIaCuXCXI+txA0ehxbl8K8=; b=rZPzqKiEnzloY6oIiUcN6fTwCYPSjxNrTK482epV9ReK7ACPZuH2S0EJmGBKVsVBD5V4 ghkzeYYfs5Vzgb6FFMTywxMzy8sB1mHMR25MQQ0oiSgGe8IzMbhCxs2n+YbIyN2QW0fu gBvM63kwc8uXpCNBEuBJoPU1GtDXQhoCrXvqaAJl5L//d5tCTZ2M5wvqODuwav/LjpQ3 6gIoSHPZeCxsMX08o/b4Co1EqawFIRHDewJZ7SdpiAsrS6jkFcnVZD1dYUxnDrQJcIAQ wfwfW7L0Em9C1i5IhHS8Yvjky+5cCoaVx8hOZ+i21ij7a+TQWnBTV2uzFIqP3ye7uJAo oQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3fk413g3q3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 08:50:28 +0000 Received: from m0098414.ppops.net (m0098414.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 23L8jPEp017240; Thu, 21 Apr 2022 08:50:28 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0b-001b2d01.pphosted.com with ESMTP id 3fk413g3pj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 08:50:28 +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 23L8ROWe007649; Thu, 21 Apr 2022 08:50:26 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma02fra.de.ibm.com with ESMTP id 3fgu6u4ec7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 08:50:26 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23L8oNcU42795366 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Apr 2022 08:50:23 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2CCD8A4053; Thu, 21 Apr 2022 08:50:23 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D8BD1A4051; Thu, 21 Apr 2022 08:50:22 +0000 (GMT) Received: from t46lp57.lnxne.boe (unknown [9.152.108.100]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 21 Apr 2022 08:50:22 +0000 (GMT) From: Nico Boehr To: kvm@vger.kernel.org, linux-s390@vger.kernel.org Cc: frankja@linux.ibm.com, imbrenda@linux.ibm.com, thuth@redhat.com, farman@linux.ibm.com Subject: [kvm-unit-tests PATCH v2 3/3] s390x: smp: make stop stopped cpu look the same as the running case Date: Thu, 21 Apr 2022 10:50:21 +0200 Message-Id: <20220421085021.1651688-4-nrb@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220421085021.1651688-1-nrb@linux.ibm.com> References: <20220421085021.1651688-1-nrb@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: bYGO8D13jRbbHNfdc6pIbQgjM7tHb-rZ X-Proofpoint-GUID: 9flubUzVpUrKiSWyNye20zzxWABSVs3n 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 priorityscore=1501 suspectscore=0 malwarescore=0 bulkscore=0 mlxscore=0 phishscore=0 mlxlogscore=953 spamscore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210048 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Adjust the stop stopped CPU case such that it looks the same as the stop running CPU case: use the nowait variant, handle the error code in the same way and make the report messages look the same. Signed-off-by: Nico Boehr Reviewed-by: Janosch Frank --- s390x/smp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/s390x/smp.c b/s390x/smp.c index 5257852c35a7..de3aba71c956 100644 --- a/s390x/smp.c +++ b/s390x/smp.c @@ -144,8 +144,9 @@ static void test_stop(void) report(smp_cpu_stopped(1), "cpu stopped"); report_prefix_push("stop stopped CPU"); - report(!smp_cpu_stop(1), "STOP succeeds"); - report(smp_cpu_stopped(1), "CPU is stopped"); + rc = smp_cpu_stop_nowait(1); + report(!rc, "return code"); + report(smp_cpu_stopped(1), "cpu stopped"); report_prefix_pop(); report_prefix_pop();