From patchwork Wed Apr 29 14:35:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 11517693 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 8BE5913B2 for ; Wed, 29 Apr 2020 14:35:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7DD5920B80 for ; Wed, 29 Apr 2020 14:35:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727779AbgD2Ofg (ORCPT ); Wed, 29 Apr 2020 10:35:36 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:56744 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727121AbgD2Off (ORCPT ); Wed, 29 Apr 2020 10:35:35 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03TEXYap100532; Wed, 29 Apr 2020 10:35:35 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 30mhq9q9pd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Apr 2020 10:35:34 -0400 Received: from m0098394.ppops.net (m0098394.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 03TEXoRj102322; Wed, 29 Apr 2020 10:35:34 -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 30mhq9q9nj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Apr 2020 10:35:34 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 03TEUdBI009594; Wed, 29 Apr 2020 14:35:32 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 30mcu5rks6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Apr 2020 14:35:32 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 03TEZTCC59638206 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 29 Apr 2020 14:35:29 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8FCB24C05A; Wed, 29 Apr 2020 14:35:29 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D70414C046; Wed, 29 Apr 2020 14:35:28 +0000 (GMT) Received: from linux01.pok.stglabs.ibm.com (unknown [9.114.17.81]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 29 Apr 2020 14:35:28 +0000 (GMT) From: Janosch Frank To: kvm@vger.kernel.org Cc: thuth@redhat.com, linux-s390@vger.kernel.org, david@redhat.com, borntraeger@de.ibm.com, cohuck@redhat.com Subject: [PATCH v3 05/10] s390x: smp: Loop if secondary cpu returns into cpu setup again Date: Wed, 29 Apr 2020 10:35:13 -0400 Message-Id: <20200429143518.1360468-6-frankja@linux.ibm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200429143518.1360468-1-frankja@linux.ibm.com> References: <20200429143518.1360468-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-29_07:2020-04-29,2020-04-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 phishscore=0 clxscore=1015 adultscore=0 suspectscore=1 spamscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 mlxlogscore=930 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004290117 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Up to now a secondary cpu could have returned from the function it was executing and ending up somewhere in cstart64.S. This was mostly circumvented by an endless loop in the function that it executed. Let's add a loop to the end of the cpu setup, so we don't have to rely on added loops in the tests. Signed-off-by: Janosch Frank Reviewed-by: Cornelia Huck Acked-by: David Hildenbrand --- s390x/cstart64.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/s390x/cstart64.S b/s390x/cstart64.S index 9af6bb3..ecffbe0 100644 --- a/s390x/cstart64.S +++ b/s390x/cstart64.S @@ -161,7 +161,9 @@ smp_cpu_setup_state: lctlg %c0, %c0, GEN_LC_SW_INT_CRS /* We should only go once through cpu setup and not for every restart */ stg %r14, GEN_LC_RESTART_NEW_PSW + 8 - br %r14 + brasl %r14, %r14 + /* If the function returns, just loop here */ +0: j 0 pgm_int: SAVE_REGS