From patchwork Tue Mar 24 08:12:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 11454761 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D1B6139A for ; Tue, 24 Mar 2020 08:13:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6933320842 for ; Tue, 24 Mar 2020 08:13:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727149AbgCXINK (ORCPT ); Tue, 24 Mar 2020 04:13:10 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:63646 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727116AbgCXINJ (ORCPT ); Tue, 24 Mar 2020 04:13:09 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02O82VIR072312 for ; Tue, 24 Mar 2020 04:13:08 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ywf2gp8ff-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 24 Mar 2020 04:13:08 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Mar 2020 08:13:04 -0000 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 24 Mar 2020 08:13:02 -0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 02O8D3EV43057410 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Mar 2020 08:13:03 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 66936A4054; Tue, 24 Mar 2020 08:13:03 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6562EA405C; Tue, 24 Mar 2020 08:13:02 +0000 (GMT) Received: from localhost.localdomain (unknown [9.145.9.40]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 24 Mar 2020 08:13:02 +0000 (GMT) From: Janosch Frank To: kvm@vger.kernel.org Cc: thuth@redhat.com, linux-s390@vger.kernel.org, david@redhat.com Subject: [kvm-unit-tests PATCH 03/10] s390x: smp: Test stop and store status on a running and stopped cpu Date: Tue, 24 Mar 2020 04:12:44 -0400 X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200324081251.28810-1-frankja@linux.ibm.com> References: <20200324081251.28810-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 20032408-4275-0000-0000-000003B1F872 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20032408-4276-0000-0000-000038C73170 Message-Id: <20200324081251.28810-4-frankja@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.645 definitions=2020-03-24_01:2020-03-23,2020-03-24 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 suspectscore=1 adultscore=0 priorityscore=1501 spamscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003240039 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Let's also test the stop portion of the "stop and store status" sigp order. Signed-off-by: Janosch Frank Reviewed-by: Cornelia Huck --- s390x/smp.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/s390x/smp.c b/s390x/smp.c index 95df8c49d2495391..8a6cd1d8b17d76c6 100644 --- a/s390x/smp.c +++ b/s390x/smp.c @@ -76,12 +76,26 @@ static void test_stop_store_status(void) struct lowcore *lc = (void *)0x0; report_prefix_push("stop store status"); + report_prefix_push("running"); + smp_cpu_restart(1); lc->prefix_sa = 0; lc->grs_sa[15] = 0; smp_cpu_stop_store_status(1); mb(); report(lc->prefix_sa == (uint32_t)(uintptr_t)cpu->lowcore, "prefix"); report(lc->grs_sa[15], "stack"); + report(smp_cpu_stopped(1), "cpu stopped"); + report_prefix_pop(); + + report_prefix_push("stopped"); + lc->prefix_sa = 0; + lc->grs_sa[15] = 0; + smp_cpu_stop_store_status(1); + mb(); + report(lc->prefix_sa == (uint32_t)(uintptr_t)cpu->lowcore, "prefix"); + report(lc->grs_sa[15], "stack"); + report_prefix_pop(); + report_prefix_pop(); }