From patchwork Wed Dec 11 11:59:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 11284795 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 0BF0914E3 for ; Wed, 11 Dec 2019 11:59:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E905B21556 for ; Wed, 11 Dec 2019 11:59:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729134AbfLKL7i (ORCPT ); Wed, 11 Dec 2019 06:59:38 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:6452 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729117AbfLKL7i (ORCPT ); Wed, 11 Dec 2019 06:59:38 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBBBqPlU011675 for ; Wed, 11 Dec 2019 06:59:37 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2wtcd1nb16-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 11 Dec 2019 06:59:36 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 11 Dec 2019 11:59:35 -0000 Received: from b06avi18626390.portsmouth.uk.ibm.com (9.149.26.192) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 11 Dec 2019 11:59:31 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xBBBwng441615780 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Dec 2019 11:58:49 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B2D8B42042; Wed, 11 Dec 2019 11:59:30 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 19FC842041; Wed, 11 Dec 2019 11:59:30 +0000 (GMT) Received: from localhost.localdomain (unknown [9.152.224.149]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 11 Dec 2019 11:59:29 +0000 (GMT) From: Janosch Frank To: kvm@vger.kernel.org Cc: thuth@redhat.com, david@redhat.com, linux-s390@vger.kernel.org Subject: [kvm-unit-tests PATCH 2/2] s390x: smp: Setup CRs from cpu 0 Date: Wed, 11 Dec 2019 06:59:23 -0500 X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191211115923.9191-1-frankja@linux.ibm.com> References: <20191211115923.9191-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19121111-0028-0000-0000-000003C78517 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19121111-0029-0000-0000-0000248ABA0F Message-Id: <20191211115923.9191-3-frankja@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-11_02:2019-12-11,2019-12-11 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 mlxscore=0 impostorscore=0 malwarescore=0 mlxlogscore=999 adultscore=0 clxscore=1015 priorityscore=1501 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912110103 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Grab the CRs (currently only 0, 1, 7, 13) from cpu 0, so we can bringup the new cpu in DAT mode or set other control options. Signed-off-by: Janosch Frank --- lib/s390x/smp.c | 5 ++++- s390x/cstart64.S | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/s390x/smp.c b/lib/s390x/smp.c index e17751a..4dfe7c6 100644 --- a/lib/s390x/smp.c +++ b/lib/s390x/smp.c @@ -191,7 +191,10 @@ int smp_cpu_setup(uint16_t addr, struct psw psw) cpu->lowcore->sw_int_grs[15] = (uint64_t)cpu->stack + (PAGE_SIZE * 4); lc->restart_new_psw.mask = 0x0000000180000000UL; lc->restart_new_psw.addr = (uint64_t)smp_cpu_setup_state; - lc->sw_int_crs[0] = 0x0000000000040000UL; + lc->sw_int_crs[0] = stctg(0); + lc->sw_int_crs[1] = stctg(1); + lc->sw_int_crs[7] = stctg(7); + lc->sw_int_crs[13] = stctg(13); /* Start processing */ rc = sigp_retry(cpu->addr, SIGP_RESTART, 0, NULL); diff --git a/s390x/cstart64.S b/s390x/cstart64.S index e6a6bdb..399ae9b 100644 --- a/s390x/cstart64.S +++ b/s390x/cstart64.S @@ -158,7 +158,7 @@ diag308_load_reset: smp_cpu_setup_state: xgr %r1, %r1 lmg %r0, %r15, GEN_LC_SW_INT_GRS - lctlg %c0, %c0, GEN_LC_SW_INT_CRS + lctlg %c0, %c15, GEN_LC_SW_INT_CRS lpswe GEN_LC_SW_INT_PSW pgm_int: