From nobody Fri May 17 05:50:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1601977572; cv=none; d=zohomail.com; s=zohoarc; b=Oi5e6wxVFr79tHeI9LVEf2NuhNU+uxeaNyy92kPWzezA7Vzhfn99EVhTMnrqGBUCjgngjNyyk3rQuqcVU7LoL8xPomMP+yDiqfHlaD37SyLJ34EJECRXWX046GLD5A53RsNOkJhEZ0e2DYBvC8VYxHJiCByP8IR2jpVpkUcO0Fg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601977572; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4DwvKU+klFJRrmZu4dlvRVnUY3gvooEZ199bNOhdDIA=; b=iUixQfE4hZK1tAvVISLBd4kdobBL132ofB5vZ96BXPXiba2hCSIblTSHVaU7z7WRgcEw/+vMVcF9EMWmSX9VUe1C4AetctKKNa+FavwJ+zathfF1q3P14eQj+4qwv+lnALAOxgz8YAEiaOP4LeLwfaomXKKtl6IzYvT6/wYH8kQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1601977572581927.5045565101051; Tue, 6 Oct 2020 02:46:12 -0700 (PDT) Received: from localhost ([::1]:56816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPjXv-00039s-9c for importer@patchew.org; Tue, 06 Oct 2020 05:46:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPjUx-0007ZX-6n for qemu-devel@nongnu.org; Tue, 06 Oct 2020 05:43:07 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54958) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPjUu-0002Dr-28 for qemu-devel@nongnu.org; Tue, 06 Oct 2020 05:43:06 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0969Vonc193822 for ; Tue, 6 Oct 2020 05:43:01 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 340nej9k1s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 06 Oct 2020 05:43:01 -0400 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0969W3OF194814 for ; Tue, 6 Oct 2020 05:43:00 -0400 Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com with ESMTP id 340nej9k19-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Oct 2020 05:43:00 -0400 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0969R5Ec006359; Tue, 6 Oct 2020 09:42:59 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma01fra.de.ibm.com with ESMTP id 33xgx7ske7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Oct 2020 09:42:58 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0969guC617498454 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 6 Oct 2020 09:42:56 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AC67152051; Tue, 6 Oct 2020 09:42:56 +0000 (GMT) Received: from linux01.pok.stglabs.ibm.com (unknown [9.114.17.81]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 1A3725204F; Tue, 6 Oct 2020 09:42:56 +0000 (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=4DwvKU+klFJRrmZu4dlvRVnUY3gvooEZ199bNOhdDIA=; b=OPbHXdsKo1/0Mz6fYMDk52ISG6pMs8MK9+yJfZ/fAj1UaFnscHNLftQxMNI9SE7AwW1M jU6owXYKz3vtsAnbq8x/ZDsPqs18SNiofPRpdLF6cX7HUWgoJVSNP5mDZF1OaPLAUT34 qUqzQyNNgeU6c9bmMhjp6T0UhjbNdKI9aWNFL1sdfaBxlVUHxW9f0mbyJdtXIkBZnSOp g++MmgAJasU/aVHBSVupHqVsLK9D1rk/dwx+3ODOH6hzy7xGrfCJEAUJ7r8ZUZiMDrO2 EQfzMI1bzYrnv4pwZyOZgvuY26hwSHF6ndq4EorkBC9Wj4sb0wuUsHGhTDn3sFFV4Hts vA== From: Janosch Frank To: qemu-devel@nongnu.org Subject: [PATCH v4 1/4] pc-bios: s390x: Fix bootmap.c zipl component entry data handling Date: Tue, 6 Oct 2020 05:42:46 -0400 Message-Id: <20201006094249.50640-2-frankja@linux.ibm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006094249.50640-1-frankja@linux.ibm.com> References: <20201006094249.50640-1-frankja@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-06_03:2020-10-06, 2020-10-06 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 clxscore=1015 priorityscore=1501 suspectscore=1 phishscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010060058 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=frankja@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/06 05:43:01 X-ACL-Warn: Detected OS = Linux 3.x [generic] X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: borntraeger@de.ibm.com, thuth@redhat.com, cohuck@redhat.com, david@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @ibm.com) Content-Type: text/plain; charset="utf-8" The two main types of zipl component entries are execute and load/data. The last member of the component entry struct therefore denotes either a PSW or an address. Let's make this a bit more clear by introducing a union and cleaning up the code that uses that struct member. The execute type component entries written by zipl contain short PSWs, not addresses. Let's mask them and only pass the address part to jump_to_IPL_code(uint64_t address) because it expects an address as visible by the name of the argument. Signed-off-by: Janosch Frank Reviewed-by: Thomas Huth --- pc-bios/s390-ccw/bootmap.c | 5 +++-- pc-bios/s390-ccw/bootmap.h | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c index 97205674e5..8747c4ea26 100644 --- a/pc-bios/s390-ccw/bootmap.c +++ b/pc-bios/s390-ccw/bootmap.c @@ -10,6 +10,7 @@ =20 #include "libc.h" #include "s390-ccw.h" +#include "s390-arch.h" #include "bootmap.h" #include "virtio.h" #include "bswap.h" @@ -436,7 +437,7 @@ static void zipl_load_segment(ComponentEntry *entry) char *blk_no =3D &err_msg[30]; /* where to print blockno in (those ZZs= ) */ =20 blockno =3D entry->data.blockno; - address =3D entry->load_address; + address =3D entry->compdat.load_addr; =20 debug_print_int("loading segment at block", blockno); debug_print_int("addr", address); @@ -514,7 +515,7 @@ static void zipl_run(ScsiBlockPtr *pte) IPL_assert(entry->component_type =3D=3D ZIPL_COMP_ENTRY_EXEC, "No EXEC= entry"); =20 /* should not return */ - jump_to_IPL_code(entry->load_address); + jump_to_IPL_code(entry->compdat.load_psw & PSW_MASK_SHORT_ADDR); } =20 static void ipl_scsi(void) diff --git a/pc-bios/s390-ccw/bootmap.h b/pc-bios/s390-ccw/bootmap.h index 12a0166aae..3946aa3f8d 100644 --- a/pc-bios/s390-ccw/bootmap.h +++ b/pc-bios/s390-ccw/bootmap.h @@ -64,11 +64,16 @@ typedef struct BootMapTable { BootMapPointer entry[]; } __attribute__ ((packed)) BootMapTable; =20 +typedef union ComponentEntryData { + uint64_t load_psw; + uint64_t load_addr; +} ComponentEntryData; + typedef struct ComponentEntry { ScsiBlockPtr data; uint8_t pad[7]; uint8_t component_type; - uint64_t load_address; + ComponentEntryData compdat; } __attribute((packed)) ComponentEntry; =20 typedef struct ComponentHeader { --=20 2.25.1 From nobody Fri May 17 05:50:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1601977459; cv=none; d=zohomail.com; s=zohoarc; b=FzLxChUF6QUKtorrelATvrKzeLGF0qjL9FkCauIZm/i8S7y4ed0pVQYJus/gsLlaB5GBp+HG1anm5dTCNGkIarDZkZiEuZHzI0KNbrxVt+Gj8Tw95UgMZiXdKxeTeHu9ekbx+FwNberrDVp8kkL5ZXqonj7LXUd1JqmQuY+60NI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601977459; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pOYN3D6eRtOl+bQ+IMNL0ENNCvUrMDsumJMcxXKpJKU=; b=UDbAKEseQTz/0MWy75MpuGQDHO+oBIY1Y4J0rUEnX9aKrTymkIuWz0ing7EzGWFbws6V3RNy/Bu3OM64adk/grXCF9s0uIYUUqgLMVPmVIu2cbmvrqSFoN3JGIzJ/NeYO3OsFYDITsUWHbmmNUHmiYujGYlwhC+IpQvoS4pRbp0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1601977459957795.5716780021628; Tue, 6 Oct 2020 02:44:19 -0700 (PDT) Received: from localhost ([::1]:50438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPjW6-0000Q6-LO for importer@patchew.org; Tue, 06 Oct 2020 05:44:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPjUw-0007ZR-SF for qemu-devel@nongnu.org; Tue, 06 Oct 2020 05:43:06 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58454 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPjUt-0002E0-OJ for qemu-devel@nongnu.org; Tue, 06 Oct 2020 05:43:06 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0969Uc5v183518 for ; Tue, 6 Oct 2020 05:43:02 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 340n5ut357-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 06 Oct 2020 05:43:02 -0400 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0969X8Qu191696 for ; Tue, 6 Oct 2020 05:43:01 -0400 Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0b-001b2d01.pphosted.com with ESMTP id 340n5ut347-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Oct 2020 05:43:01 -0400 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0969R10E005971; Tue, 6 Oct 2020 09:42:59 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma01fra.de.ibm.com with ESMTP id 33xgx7skea-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Oct 2020 09:42:59 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0969gv4M26804548 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 6 Oct 2020 09:42:57 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6831C52059; Tue, 6 Oct 2020 09:42:57 +0000 (GMT) Received: from linux01.pok.stglabs.ibm.com (unknown [9.114.17.81]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id C8DFC52052; Tue, 6 Oct 2020 09:42:56 +0000 (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=pOYN3D6eRtOl+bQ+IMNL0ENNCvUrMDsumJMcxXKpJKU=; b=SBo9IEVhr7GMzw222ewmsQUt0BNRsAVvOQmvzZB1c/WYXl4MPHeCJANv5mGTPBTT4AWs 4vZ98UW1JHz36ftfwjfolOR9yW5BCAWZJXT7LGCY9uBZNVsz1IYVxEPVNnUG3/Q8Mpq5 cbqOZFNb0L+9f5nBSUP0VncLEph6tVilZRmbMmKudLLOfa/ED0bDAq+jiKQGeaM0hVWu mJz0BowPsM44b+2LApYnX8WSYWzF/PV1vKot4G438RpAYDT7Wh2Clhxrr9boEIQSpY2G mjgYhcc8FLcth+Q4Yy/f5V4ei5UaPIbCoYnRtkMHv/QYL9ZEkVJwPuRsE6ZZn1cxY2u0 tg== From: Janosch Frank To: qemu-devel@nongnu.org Subject: [PATCH v4 2/4] pc-bios: s390x: Save PSW rework Date: Tue, 6 Oct 2020 05:42:47 -0400 Message-Id: <20201006094249.50640-3-frankja@linux.ibm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006094249.50640-1-frankja@linux.ibm.com> References: <20201006094249.50640-1-frankja@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-06_03:2020-10-06, 2020-10-06 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 bulkscore=0 adultscore=0 suspectscore=1 impostorscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010060058 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=frankja@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/06 05:43:01 X-ACL-Warn: Detected OS = Linux 3.x [generic] X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: borntraeger@de.ibm.com, thuth@redhat.com, cohuck@redhat.com, david@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @ibm.com) Content-Type: text/plain; charset="utf-8" We don't need to save the ipl_continue variable in lowcore and have it limited to 32 bits because of the lowcore layout. Let's move it to a new 64 bit variable and get rid of the reset info struct. Signed-off-by: Janosch Frank Reviewed-by: Thomas Huth --- pc-bios/s390-ccw/jump2ipl.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/pc-bios/s390-ccw/jump2ipl.c b/pc-bios/s390-ccw/jump2ipl.c index 767012bf0c..b6aad32def 100644 --- a/pc-bios/s390-ccw/jump2ipl.c +++ b/pc-bios/s390-ccw/jump2ipl.c @@ -13,20 +13,17 @@ #define KERN_IMAGE_START 0x010000UL #define RESET_PSW_MASK (PSW_MASK_SHORTPSW | PSW_MASK_64) =20 -typedef struct ResetInfo { - uint64_t ipl_psw; - uint32_t ipl_continue; -} ResetInfo; +static uint64_t *reset_psw =3D 0, save_psw, ipl_continue; =20 -static ResetInfo save; - -static void jump_to_IPL_2(void) +static void jump_to_IPL_addr(void) { - ResetInfo *current =3D 0; + __attribute__((noreturn)) void (*ipl)(void) =3D (void *)ipl_continue; =20 - void (*ipl)(void) =3D (void *) (uint64_t) current->ipl_continue; - *current =3D save; - ipl(); /* should not return */ + /* Restore reset PSW */ + *reset_psw =3D save_psw; + + ipl(); + /* should not return */ } =20 void jump_to_IPL_code(uint64_t address) @@ -46,15 +43,11 @@ void jump_to_IPL_code(uint64_t address) * content of non-BIOS memory after we loaded the guest, so we * save the original content and restore it in jump_to_IPL_2. */ - ResetInfo *current =3D 0; - - save =3D *current; - - current->ipl_psw =3D (uint64_t) &jump_to_IPL_2; - current->ipl_psw |=3D RESET_PSW_MASK; - current->ipl_continue =3D address & PSW_MASK_SHORT_ADDR; - - debug_print_int("set IPL addr to", current->ipl_continue); + save_psw =3D *reset_psw; + *reset_psw =3D (uint64_t) &jump_to_IPL_addr; + *reset_psw |=3D RESET_PSW_MASK; + ipl_continue =3D address; + debug_print_int("set IPL addr to", ipl_continue); =20 /* Ensure the guest output starts fresh */ sclp_print("\n"); --=20 2.25.1 From nobody Fri May 17 05:50:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1601977459; cv=none; d=zohomail.com; s=zohoarc; b=fL2d5XSjyyUuHd5fw+nqsPiQrQuw/FMflprk6Rn7eQXSKGyqUmKsRV/4B3+WdCTTszRV32ZHNz1hNkeXSx6NahcUgpBZvXQyu+u/rSYSXjOkrdCaOni5/KYtrC+9geGMmUpyjI/id5df7vpQ9p4D9B+CWagvMW0jqzD91QAFnEw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601977459; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Meo3yYgoewKhZPN+zN1BhVnb0lBhWLH5mHe+wthkhpg=; b=dZa0UgW9IFeQd3D8C4+F4ZFGUcL57VH7m3E6q6vOEwPmApHeCNjD2LvKIYgMvZ+VG3punVMmI/VFVz4TwFpZy7q0jyC1ZU03mLfaGbgmiVkmdCVPR6zi9RihEIVz1Psu5tKqB4AbKiPrXD4ZX1WQhlZgyAFAZH4Mzlh9lbBXMaU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1601977459260365.20900517273014; Tue, 6 Oct 2020 02:44:19 -0700 (PDT) Received: from localhost ([::1]:50340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPjW5-0000NQ-Os for importer@patchew.org; Tue, 06 Oct 2020 05:44:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41386) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPjUv-0007ZB-Hz for qemu-devel@nongnu.org; Tue, 06 Oct 2020 05:43:05 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:19376 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPjUt-0002E7-G9 for qemu-devel@nongnu.org; Tue, 06 Oct 2020 05:43:05 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0969WGBE115185 for ; Tue, 6 Oct 2020 05:43:02 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 340nuc8mqd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 06 Oct 2020 05:43:02 -0400 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0969XM67118295 for ; Tue, 6 Oct 2020 05:43:02 -0400 Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0b-001b2d01.pphosted.com with ESMTP id 340nuc8mps-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Oct 2020 05:43:02 -0400 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0969SCJd000424; Tue, 6 Oct 2020 09:43:00 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma03fra.de.ibm.com with ESMTP id 33xgx7sk6m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Oct 2020 09:43:00 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0969gwjq31195482 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 6 Oct 2020 09:42:58 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 230CB5204F; Tue, 6 Oct 2020 09:42:58 +0000 (GMT) Received: from linux01.pok.stglabs.ibm.com (unknown [9.114.17.81]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 858B152051; Tue, 6 Oct 2020 09:42:57 +0000 (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=Meo3yYgoewKhZPN+zN1BhVnb0lBhWLH5mHe+wthkhpg=; b=Z+0UNYShPg0lioyGAp4IOkDMJQQGvlMNoHVM7i3yGnS6V3I3l+tATXfkaPDdwFuGuYut 0oEusHllT0x/8lpnDWMCQobapa2IoWeBElJ5SPTcEShSEfAgdKh6qLIQrUZhzs/jOmxu oEKInA3oe4upnL2YmjY6R+ItuNmmcNfQ6yjpbDyTO5LkYPzD0xiTLNNHcWnrjk6NiwS1 0VhoK+0R97N9d/Qhys/zlbOlas9vdFCO6/xMzGbbDzUOgwh/4DdPmd2ahsUdj9JE2zs7 OjXBD3VQmL1wlP6C1f9nFDGTN22yeQsEoPGRbGBMjWRoanU+KH3STET+tgUviVFAXFv0 5A== From: Janosch Frank To: qemu-devel@nongnu.org Subject: [PATCH v4 3/4] pc-bios: s390x: Use reset PSW if avaliable Date: Tue, 6 Oct 2020 05:42:48 -0400 Message-Id: <20201006094249.50640-4-frankja@linux.ibm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006094249.50640-1-frankja@linux.ibm.com> References: <20201006094249.50640-1-frankja@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-06_03:2020-10-06, 2020-10-06 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 suspectscore=1 bulkscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 mlxscore=0 clxscore=1015 spamscore=0 mlxlogscore=999 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010060058 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=frankja@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/06 05:43:01 X-ACL-Warn: Detected OS = Linux 3.x [generic] X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: borntraeger@de.ibm.com, thuth@redhat.com, cohuck@redhat.com, david@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @ibm.com) Content-Type: text/plain; charset="utf-8" If a blob provides a reset PSW then we should use it instead of branching to the PSW address and using our own mask. Signed-off-by: Janosch Frank Reviewed-by: Thomas Huth --- pc-bios/s390-ccw/bootmap.c | 6 ++++-- pc-bios/s390-ccw/jump2ipl.c | 26 +++++++++++++++++++------- pc-bios/s390-ccw/s390-ccw.h | 1 + 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c index 8747c4ea26..88bd12d5d7 100644 --- a/pc-bios/s390-ccw/bootmap.c +++ b/pc-bios/s390-ccw/bootmap.c @@ -273,7 +273,8 @@ static void run_eckd_boot_script(block_number_t bmt_blo= ck_nr, =20 IPL_assert(bms->entry[i].type =3D=3D BOOT_SCRIPT_EXEC, "Unknown script entry type"); - jump_to_IPL_code(bms->entry[i].address.load_address); /* no return */ + write_reset_psw(bms->entry[i].address.load_address); /* no return */ + jump_to_IPL_code(0); /* no return */ } =20 static void ipl_eckd_cdl(void) @@ -515,7 +516,8 @@ static void zipl_run(ScsiBlockPtr *pte) IPL_assert(entry->component_type =3D=3D ZIPL_COMP_ENTRY_EXEC, "No EXEC= entry"); =20 /* should not return */ - jump_to_IPL_code(entry->compdat.load_psw & PSW_MASK_SHORT_ADDR); + write_reset_psw(entry->compdat.load_psw); + jump_to_IPL_code(0); } =20 static void ipl_scsi(void) diff --git a/pc-bios/s390-ccw/jump2ipl.c b/pc-bios/s390-ccw/jump2ipl.c index b6aad32def..63afa4a349 100644 --- a/pc-bios/s390-ccw/jump2ipl.c +++ b/pc-bios/s390-ccw/jump2ipl.c @@ -12,15 +12,21 @@ =20 #define KERN_IMAGE_START 0x010000UL #define RESET_PSW_MASK (PSW_MASK_SHORTPSW | PSW_MASK_64) +#define RESET_PSW ((uint64_t)&jump_to_IPL_addr | RESET_PSW_MASK) =20 static uint64_t *reset_psw =3D 0, save_psw, ipl_continue; =20 +void write_reset_psw(uint64_t psw) +{ + *reset_psw =3D psw; +} + static void jump_to_IPL_addr(void) { __attribute__((noreturn)) void (*ipl)(void) =3D (void *)ipl_continue; =20 /* Restore reset PSW */ - *reset_psw =3D save_psw; + write_reset_psw(save_psw); =20 ipl(); /* should not return */ @@ -43,11 +49,12 @@ void jump_to_IPL_code(uint64_t address) * content of non-BIOS memory after we loaded the guest, so we * save the original content and restore it in jump_to_IPL_2. */ - save_psw =3D *reset_psw; - *reset_psw =3D (uint64_t) &jump_to_IPL_addr; - *reset_psw |=3D RESET_PSW_MASK; - ipl_continue =3D address; - debug_print_int("set IPL addr to", ipl_continue); + if (address) { + save_psw =3D *reset_psw; + write_reset_psw(RESET_PSW); + ipl_continue =3D address; + } + debug_print_int("set IPL addr to", address ? address : *reset_psw & PS= W_MASK_SHORT_ADDR); =20 /* Ensure the guest output starts fresh */ sclp_print("\n"); @@ -77,7 +84,12 @@ void jump_to_low_kernel(void) =20 /* Trying to get PSW at zero address */ if (*((uint64_t *)0) & RESET_PSW_MASK) { - jump_to_IPL_code((*((uint64_t *)0)) & PSW_MASK_SHORT_ADDR); + /* + * Surely nobody will try running directly from lowcore, so + * let's use 0 as an indication that we want to load the reset + * psw at 0x0 and not jump to the entry. + */ + jump_to_IPL_code(0); } =20 /* No other option left, so use the Linux kernel start address */ diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h index 36b884cced..7090720422 100644 --- a/pc-bios/s390-ccw/s390-ccw.h +++ b/pc-bios/s390-ccw/s390-ccw.h @@ -78,6 +78,7 @@ int virtio_read(ulong sector, void *load_addr); void zipl_load(void); =20 /* jump2ipl.c */ +void write_reset_psw(uint64_t psw); void jump_to_IPL_code(uint64_t address); void jump_to_low_kernel(void); =20 --=20 2.25.1 From nobody Fri May 17 05:50:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1601977459; cv=none; d=zohomail.com; s=zohoarc; b=f4Wj/rnyt3tLM/5VqCOtFcCXwHrwgdXyli7YZiYXdCYz0Um/uK8AUsRdvi/irePrtOHRQkasMf3w1gk/2Y1VNdDuNVSvYob3dQe0Qwy8SNLz46tuapg/IZwABq7HMmr40cRPKFYVhWdnujjwnuTWv5y7iDm7GYOTKfmcozJtzCU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601977459; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+u+yVVICuIk67PlOUdHTDLXAjBpKna4dj+jy3/sXglc=; b=PmkqobWivwvov6jvC7DKNU5jQJMuu0NDuSQSNEofW6fdWUcQTSErpEpGMp8Vt7thmHNQlIzbHNg2qIh9eqm1NAgLrhpvbS7b9Py0L9zRaytObBb5sz0TrEUeOULCFMw+EEYR9hTcEvF/ireLJQvAWd3KF3tWyN8WILceN2tQNeY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1601977459957476.2451032492279; Tue, 6 Oct 2020 02:44:19 -0700 (PDT) Received: from localhost ([::1]:50414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPjW6-0000PQ-CW for importer@patchew.org; Tue, 06 Oct 2020 05:44:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPjUx-0007Zc-C3 for qemu-devel@nongnu.org; Tue, 06 Oct 2020 05:43:07 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:32312) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPjUv-0002EG-FC for qemu-devel@nongnu.org; Tue, 06 Oct 2020 05:43:07 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0969gXce043481 for ; Tue, 6 Oct 2020 05:43:04 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 340p69808f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 06 Oct 2020 05:43:04 -0400 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0969h3Be046320 for ; Tue, 6 Oct 2020 05:43:03 -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 340p698082-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Oct 2020 05:43:03 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0969Rrm1011476; Tue, 6 Oct 2020 09:43:01 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 33xgx8b2vj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Oct 2020 09:43:01 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0969gx5J29295016 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 6 Oct 2020 09:42:59 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DE4865204F; Tue, 6 Oct 2020 09:42:58 +0000 (GMT) Received: from linux01.pok.stglabs.ibm.com (unknown [9.114.17.81]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 4177952051; Tue, 6 Oct 2020 09:42:58 +0000 (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=+u+yVVICuIk67PlOUdHTDLXAjBpKna4dj+jy3/sXglc=; b=A2E+V+1+QHIQqt2Zp2bSZDxvtWmWlbwD8XtH0BbGP01EXiFEICVlApPwZqS/Cwl1W1YZ c2ja9ALUlXFmXJgwXqMI65h37SVjuVCGwhJCyACOz/x8D+QUq8ZbKZ+heQu7CXKiRZKh HW0cKddRjAsBKvlQjAnywXSacNufNb0ciOfSCrKOLTSx7HtGqsqR4sF5Oj2A1UGSuPNV bqggbiisFP1b3Y16LMb/LHUGVxD+qyVvTf3T/s0+1XmbqYYFneoyGQclj10ePELSo9Sp n0EZibMaCv/se3/2gQG4SDsdP5el/6KoaNj3k7pm9b3nTZEYdYRjo7FCDm8LvjlRfQP8 9A== From: Janosch Frank To: qemu-devel@nongnu.org Subject: [PATCH v4 4/4] pc-bios: s390x: Go into disabled wait when encountering a PGM exception Date: Tue, 6 Oct 2020 05:42:49 -0400 Message-Id: <20201006094249.50640-5-frankja@linux.ibm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006094249.50640-1-frankja@linux.ibm.com> References: <20201006094249.50640-1-frankja@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-06_03:2020-10-06, 2020-10-06 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 suspectscore=1 malwarescore=0 phishscore=0 clxscore=1015 lowpriorityscore=0 spamscore=0 mlxlogscore=926 priorityscore=1501 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010060058 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=frankja@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/06 04:55:29 X-ACL-Warn: Detected OS = Linux 3.x [generic] [fuzzy] X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: borntraeger@de.ibm.com, thuth@redhat.com, cohuck@redhat.com, david@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @ibm.com) Content-Type: text/plain; charset="utf-8" Let's setup a PGM PSW, so we won't load 0s when a program exception happens. Instead we'll load a disabled wait PSW. Signed-off-by: Janosch Frank Reviewed-by: Christian Borntraeger Reviewed-by: Thomas Huth --- pc-bios/s390-ccw/start.S | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pc-bios/s390-ccw/start.S b/pc-bios/s390-ccw/start.S index ce519300a1..4d5ad21653 100644 --- a/pc-bios/s390-ccw/start.S +++ b/pc-bios/s390-ccw/start.S @@ -34,7 +34,10 @@ remainder: larl %r2,memsetxc ex %r3,0(%r2) done: - j main /* And call C */ + /* set up a pgm exception disabled wait psw */ + larl %r2, disabled_wait_psw + mvc 0x01d0(16), 0(%r2) + j main /* And call C */ =20 memsetxc: xc 0(1,%r1),0(%r1) --=20 2.25.1