From patchwork Mon Jul 3 15:50:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Leoshkevich X-Patchwork-Id: 13300250 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CCBE4EB64DC for ; Mon, 3 Jul 2023 15:59:49 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGLwW-0002Y5-5a; Mon, 03 Jul 2023 11:58:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qGLwU-0002RD-E9; Mon, 03 Jul 2023 11:58:22 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qGLwS-0004fy-20; Mon, 03 Jul 2023 11:58:22 -0400 Received: from pps.filterd (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 363Fls28002373; Mon, 3 Jul 2023 15:58:15 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=wqbcFyWY4s6bMrIEtEgh3SrUQl21bVa3fTDkhglOS3s=; b=HQSrC6H6EqX1yMiDV1ZjR30A/WgWnhiCQFJT3hlkq+i0nv46ufM2rTZlsGBbrrg+NQcD fia1c73hUfaXmyqDdNLRX9SCMwV9QGsUEoS3rnxb8hOfcsCjfdATHmovaPrtWNDFq6Oh s9XvCoHpaaaQaCL1gcdQCwzEU5dACL+aw5ctBl66pAvq0e0Kb35Re0g9DIuS+5ijPKeA 1kyXR5jgHF0WWS91TsiJbWzEh/+rRAqBghoRxlzdAAe+qujFBXNSvysnpEJaJjaGSqvZ CzjIfD4nWgNwo25zP5NicHxkIWTKAp01BEuORFe76S8IKYhkjbeErj+A5yGql9fC1FO+ 1Q== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rm19p06nq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jul 2023 15:58:15 +0000 Received: from m0353728.ppops.net (m0353728.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 363FooZY008393; Mon, 3 Jul 2023 15:58:14 GMT Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rm19p06n3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jul 2023 15:58:14 +0000 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 363DWsgX000309; Mon, 3 Jul 2023 15:58:12 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma04fra.de.ibm.com (PPS) with ESMTPS id 3rjbs511r5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jul 2023 15:58:12 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 363Fw9hT9634508 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Jul 2023 15:58:09 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A388B20043; Mon, 3 Jul 2023 15:58:09 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7221520040; Mon, 3 Jul 2023 15:58:09 +0000 (GMT) Received: from heavy.boeblingen.de.ibm.com (unknown [9.155.200.166]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 3 Jul 2023 15:58:09 +0000 (GMT) From: Ilya Leoshkevich To: Laurent Vivier , Richard Henderson , David Hildenbrand Cc: Thomas Huth , qemu-devel@nongnu.org, qemu-s390x@nongnu.org, Ilya Leoshkevich Subject: [PATCH 01/12] linux-user: elfload: Add more initial s390x PSW bits Date: Mon, 3 Jul 2023 17:50:27 +0200 Message-ID: <20230703155801.179167-2-iii@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230703155801.179167-1-iii@linux.ibm.com> References: <20230703155801.179167-1-iii@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 3kz4LTYAjsUO8ZSMc4FFN1B_HgYCPXSJ X-Proofpoint-ORIG-GUID: SReZKMNWj5nyJTBBM7KSk9M5afeyuPJF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-03_11,2023-06-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 lowpriorityscore=0 impostorscore=0 malwarescore=0 adultscore=0 suspectscore=0 phishscore=0 spamscore=0 priorityscore=1501 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307030141 Received-SPF: pass client-ip=148.163.156.1; envelope-from=iii@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Make the PSW look more similar to the real s390x userspace PSW. Except for being there, the newly added bits should not affect the userspace code execution. Signed-off-by: Ilya Leoshkevich Reviewed-by: David Hildenbrand --- linux-user/elfload.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 6900974c373..7935110bff4 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1635,7 +1635,9 @@ const char *elf_hwcap_str(uint32_t bit) static inline void init_thread(struct target_pt_regs *regs, struct image_info *infop) { regs->psw.addr = infop->entry; - regs->psw.mask = PSW_MASK_64 | PSW_MASK_32; + regs->psw.mask = PSW_MASK_DAT | PSW_MASK_IO | PSW_MASK_EXT | \ + PSW_MASK_MCHECK | PSW_MASK_PSTATE | PSW_MASK_64 | \ + PSW_MASK_32; regs->gprs[15] = infop->start_stack; }