From patchwork Fri Apr 1 11:16:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudio Imbrenda X-Patchwork-Id: 12798177 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 D0829C433F5 for ; Fri, 1 Apr 2022 11:17:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345469AbiDALTB (ORCPT ); Fri, 1 Apr 2022 07:19:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345441AbiDALSb (ORCPT ); Fri, 1 Apr 2022 07:18:31 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F96D186FBC for ; Fri, 1 Apr 2022 04:16:41 -0700 (PDT) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 231An34g008396 for ; Fri, 1 Apr 2022 11:16:40 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=+YUjl0r7Uz8jv0emyR1TDh9NGW4z6s5MuCruGecpzKg=; b=iShFiCy5llsPnXLKxlqLN4OpJ1YvbPwg+ZtcoW80FT6iOay1toXQxbUizsSN9Y/ZUes6 TVWvRxabLSz2E/VNMrfoDOXy4k0MiZYcJZkqcofldeeq/AQUnkK858H0WAbM1aoHwGKz 4kzYPhXa8eEC3Nn0Gf4UNXxUHVnmG79/Wr0h9oRwoUNC2GKyDLTMFJ7/4IXdRMAA76Dy qC9YMqd5PHv28il98Xes5/tMJlrbajvifFLYyyAGchoBX1oG/2GVBjFqubE7CR1rbsRF tASzrfN9Q8Fw33I1N9gOeR3vTed61/sLiaPNn0JxDSaJFJ6tQNxdh5ik8dqoPzBA+fmB ag== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3f5yyq8j5s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 01 Apr 2022 11:16:40 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 231BA7n7022173 for ; Fri, 1 Apr 2022 11:16:40 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 3f5yyq8j5d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 01 Apr 2022 11:16:40 +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 231B90DK028416; Fri, 1 Apr 2022 11:16:38 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma04ams.nl.ibm.com with ESMTP id 3f1tf94v6g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 01 Apr 2022 11:16:38 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 231BGZfi22020574 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 1 Apr 2022 11:16:35 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4BE7E4C05C; Fri, 1 Apr 2022 11:16:35 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EF5524C05E; Fri, 1 Apr 2022 11:16:34 +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:34 +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 Subject: [kvm-unit-tests GIT PULL 22/27] s390x: snippets: c: Load initial cr0 Date: Fri, 1 Apr 2022 13:16:15 +0200 Message-Id: <20220401111620.366435-23-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: O4FYaS6aZkzNDoaByoZQtNorWH-QebXj X-Proofpoint-ORIG-GUID: Hok0yxJJMhZT12K1YgwMWjc4ZyfWp9fd 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_04,2022-03-31_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 malwarescore=0 spamscore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=873 phishscore=0 priorityscore=1501 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: Janosch Frank As soon as we use C we need to set the AFP bit in cr0 so we can use all fprs. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Signed-off-by: Claudio Imbrenda --- s390x/snippets/c/cstart.S | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/s390x/snippets/c/cstart.S b/s390x/snippets/c/cstart.S index aaa5380c..a7d4cd42 100644 --- a/s390x/snippets/c/cstart.S +++ b/s390x/snippets/c/cstart.S @@ -12,6 +12,8 @@ .section .init .globl start start: + larl %r1, initial_cr0 + lctlg %c0, %c0, 0(%r1) /* XOR all registers with themselves to clear them fully. */ .irp i, 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 xgr \i,\i @@ -34,3 +36,7 @@ exit: /* For now let's only use cpu 0 in snippets so this will always work. */ xgr %r0, %r0 sigp %r2, %r0, SIGP_STOP + +initial_cr0: + /* enable AFP-register control, so FP regs (+BFP instr) can be used */ + .quad 0x0000000000040000