From patchwork Fri Apr 1 11:16:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudio Imbrenda X-Patchwork-Id: 12798169 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 6FDF3C433EF for ; Fri, 1 Apr 2022 11:17:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345458AbiDALSr (ORCPT ); Fri, 1 Apr 2022 07:18:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345421AbiDALS1 (ORCPT ); Fri, 1 Apr 2022 07:18:27 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3D81185962 for ; Fri, 1 Apr 2022 04:16:38 -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 2319o9l1010848 for ; Fri, 1 Apr 2022 11:16:38 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=rbdd2JKDv/q1Tp0c9JcKHrSe+ByYif2HQEyyg++1lps=; b=hr0/8wZCbvlUodtX2zQdp+j7Po7+07wqjUe28ysEZT55d3OTaD8tdzVBFJg4zits6VFi 9Gphdr6jyt/t4wucPOK+XLOGj7JHIlZUUjYuTf1inCC5fIxTmxVriwsOlJtzwYyYQST3 T8aEgJlT3eUPuMC/fFActjySO34d7QW6p7R/99BkbCvvXW1dSlVnVT0dhEdTuZZ9hdkm /tY7voZd1tE+uFDLo80YSRCkcEuGwgWzzkw5mGWe8G8wy8fyNDYDd9OVz+cIQw3pc4Qm RpxDk6Rf6YUd+RU1tJUcnpOr17VGOqne9A7m1W/3AzYDOZDdsZliGOL0qC9jDel2qHXU EA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3f5y3y1rpy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 01 Apr 2022 11:16:38 +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 231AtwAA005110 for ; Fri, 1 Apr 2022 11:16:38 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 3f5y3y1rp4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 01 Apr 2022 11:16: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 231B90DI028416; Fri, 1 Apr 2022 11:16:35 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 3f1tf94v6d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 01 Apr 2022 11:16:35 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 231B4SFT51183986 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 1 Apr 2022 11:04:28 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A58BF4C05E; Fri, 1 Apr 2022 11:16:32 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 55BD14C066; Fri, 1 Apr 2022 11:16:32 +0000 (GMT) Received: from localhost.localdomain (unknown [9.145.3.73]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 1 Apr 2022 11:16:32 +0000 (GMT) From: Claudio Imbrenda To: pbonzini@redhat.com Cc: kvm@vger.kernel.org, borntraeger@de.ibm.com, frankja@linux.ibm.com, thuth@redhat.com, Nico Boehr Subject: [kvm-unit-tests GIT PULL 16/27] s390x: smp: stop already stopped CPU Date: Fri, 1 Apr 2022 13:16:09 +0200 Message-Id: <20220401111620.366435-17-imbrenda@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220401111620.366435-1-imbrenda@linux.ibm.com> References: <20220401111620.366435-1-imbrenda@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: pc_GSo31daHc1M70isj9S35kfVOxacrQ X-Proofpoint-ORIG-GUID: Cp94BAgw-R5FCgixWEf9d3HeJj79yARc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-04-01_03,2022-03-31_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 adultscore=0 spamscore=0 phishscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204010050 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Nico Boehr As per the PoP, the SIGP STOP order is only effective when the CPU is in the operating state. Hence, we should have a test which tries to stop an already stopped CPU. Even though the SIGP order might be processed asynchronously, we assert the CPU stays stopped. Signed-off-by: Nico Boehr Reviewed-by: Claudio Imbrenda Reviewed-by: Janosch Frank Signed-off-by: Claudio Imbrenda --- s390x/smp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/s390x/smp.c b/s390x/smp.c index cfced18a..fcced84f 100644 --- a/s390x/smp.c +++ b/s390x/smp.c @@ -140,6 +140,11 @@ static void test_stop(void) report(!rc, "return code"); 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"); + report_prefix_pop(); + report_prefix_pop(); }