From nobody Sun May 19 02:38:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1594806183; cv=none; d=zohomail.com; s=zohoarc; b=BeX2mvsXHkByL1XPHJmNJqgfel3O0hc2b8235WQuhq2qImPu3c2dpyCfZxVolmvdF3Ux3MUelmmyBdcg4AA1PATWgixT4q5ZQP7y15Jhxq+1NMrLjBZImPzTjWQExPN4W03N6Ow2GVffm/jC8D+IxizJt8nNMXXCDnKomk2ToXw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594806183; 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=A+8af/rlZfFsqr883HQ+KODRhRbNipe3unI0d+d+4q0=; b=BpRN0vx+BW9qnFO3eNDJDSWCS/jqCnMcZ8q8tq3uXUbD2+FHZLE45qM322ItfFHw626tymNs46KTjjxAsBToEmvX1HSf03NAB5L0Da/2cI5dyWyWLN7dfPpBUnmTnomZKxRrgJUTC/bVeeuy5orW8GVHIU+DjDgQdGHdwWEWYFY= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=fail 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 1594806183951362.74005730222825; Wed, 15 Jul 2020 02:43:03 -0700 (PDT) Received: from localhost ([::1]:36740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvdwL-0001QY-PB for importer@patchew.org; Wed, 15 Jul 2020 05:43:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvdul-0008F9-KX for qemu-devel@nongnu.org; Wed, 15 Jul 2020 05:41:23 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:31548) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvduj-0006FS-Je for qemu-devel@nongnu.org; Wed, 15 Jul 2020 05:41:23 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06F9Y0aM092135 for ; Wed, 15 Jul 2020 05:41:20 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 329d9hxn3w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 15 Jul 2020 05:41:20 -0400 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06F9eppJ130693 for ; Wed, 15 Jul 2020 05:41:20 -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 329d9hxn3e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jul 2020 05:41:20 -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 06F9Yien028454; Wed, 15 Jul 2020 09:41:18 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 327527v939-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jul 2020 09:41:18 +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 06F9fGrA44761408 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Jul 2020 09:41:16 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 28A2B4C052; Wed, 15 Jul 2020 09:41:16 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8920D4C040; Wed, 15 Jul 2020 09:41:15 +0000 (GMT) Received: from linux01.pok.stglabs.ibm.com (unknown [9.114.17.81]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 15 Jul 2020 09:41:15 +0000 (GMT) From: Janosch Frank To: qemu-devel@nongnu.org Subject: [PATCH 1/7] pc-bios: s390x: Fix bootmap.c zipl component entry data handling Date: Wed, 15 Jul 2020 05:40:39 -0400 Message-Id: <20200715094045.381984-2-frankja@linux.ibm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200715094045.381984-1-frankja@linux.ibm.com> References: <20200715094045.381984-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-07-15_07:2020-07-15, 2020-07-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxlogscore=999 suspectscore=1 malwarescore=0 adultscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 spamscore=0 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007150077 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/07/15 05:27:14 X-ACL-Warn: Detected OS = Linux 3.x [generic] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, 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" 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 Sun May 19 02:38:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1594806470; cv=none; d=zohomail.com; s=zohoarc; b=hIYC6GFaiXcM/wiDwlhr+fmcV7VIh/8I0Hk36nLSEYpr9Zl3XYKI4V0Kyzy18KsgSj53QO3cqhH2xEkj9WNVN/8P2DEb8GazG/pIX85Ep+pfcHYsahjmdW7jbdh5oYMOd5e6MqJ0T2T1zMym5ywklNU9/18IJE0uC8GBPbYMcsM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594806470; 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=Kzli16euGL0AwQhdcDTWZbg7T6X3XOwvmMxSiLLnSQ0=; b=Py4dmvVv2XcW2qewI218J+33u8Dc/H9fBCw1hgwILbHed/g6bPra6eh6JN6x2wOSMS1VhwFfznay/SWt79v8ped/O0diEq5myEXpS3ItbGL0A1HSxqwzVvG/QhlrL0LKCZ1E6Iz6n8P/VyR/SImevZ4UxI4nHIKSvjs7ftHvJTs= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=fail 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 1594806470333991.1129588164525; Wed, 15 Jul 2020 02:47:50 -0700 (PDT) Received: from localhost ([::1]:52046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jve0y-0007xa-Qb for importer@patchew.org; Wed, 15 Jul 2020 05:47:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvdvz-0001nf-CJ for qemu-devel@nongnu.org; Wed, 15 Jul 2020 05:42:39 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52382 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 1jvdvx-0006Xl-H4 for qemu-devel@nongnu.org; Wed, 15 Jul 2020 05:42:39 -0400 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 06F9Y0cx156063 for ; Wed, 15 Jul 2020 05:42:36 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 329r1hmb68-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 15 Jul 2020 05:42:36 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06F9Z6Uj161885 for ; Wed, 15 Jul 2020 05:42:36 -0400 Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0b-001b2d01.pphosted.com with ESMTP id 329r1hmb5h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jul 2020 05:42:36 -0400 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06F9ZRgJ011998; Wed, 15 Jul 2020 09:42:34 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma02fra.de.ibm.com with ESMTP id 327527vc0n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jul 2020 09:42:34 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06F9dsbS57147796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Jul 2020 09:39:54 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E7F764C040; Wed, 15 Jul 2020 09:41:16 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4E9654C046; Wed, 15 Jul 2020 09:41:16 +0000 (GMT) Received: from linux01.pok.stglabs.ibm.com (unknown [9.114.17.81]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 15 Jul 2020 09:41:16 +0000 (GMT) From: Janosch Frank To: qemu-devel@nongnu.org Subject: [PATCH 2/7] pc-bios: s390x: Cleanup jump to ipl code Date: Wed, 15 Jul 2020 05:40:40 -0400 Message-Id: <20200715094045.381984-3-frankja@linux.ibm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200715094045.381984-1-frankja@linux.ibm.com> References: <20200715094045.381984-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-07-15_07:2020-07-15, 2020-07-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 priorityscore=1501 spamscore=0 mlxlogscore=999 lowpriorityscore=0 impostorscore=0 adultscore=0 mlxscore=0 bulkscore=0 phishscore=0 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007150077 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/07/15 05:27:14 X-ACL-Warn: Detected OS = Linux 3.x [generic] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, 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" Content-Type: text/plain; charset="utf-8" jump_to_IPL_code takes a 64 bit address, masks it with the short psw address mask and later branches to it using a full 64 bit register. * As the masking is not necessary, let's remove it * Without the mask we can save the ipl address to a static 64 bit function ptr as we later branch to it * Let's also clean up the variable names and remove the now unneeded ResetInfo Signed-off-by: Janosch Frank Acked-by: Thomas Huth --- pc-bios/s390-ccw/jump2ipl.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/pc-bios/s390-ccw/jump2ipl.c b/pc-bios/s390-ccw/jump2ipl.c index 767012bf0c..aef37cea76 100644 --- a/pc-bios/s390-ccw/jump2ipl.c +++ b/pc-bios/s390-ccw/jump2ipl.c @@ -13,20 +13,15 @@ #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 ResetInfo save; +static void (*ipl_continue)(void); +static uint64_t psw_save; =20 static void jump_to_IPL_2(void) { - ResetInfo *current =3D 0; + uint64_t *psw_current =3D 0; =20 - void (*ipl)(void) =3D (void *) (uint64_t) current->ipl_continue; - *current =3D save; - ipl(); /* should not return */ + *psw_current =3D psw_save; + ipl_continue(); /* should not return */ } =20 void jump_to_IPL_code(uint64_t address) @@ -46,15 +41,15 @@ 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; + uint64_t *psw_current =3D 0; =20 - save =3D *current; + psw_save =3D *psw_current; =20 - 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; + *psw_current =3D (uint64_t) &jump_to_IPL_2; + *psw_current |=3D RESET_PSW_MASK; + ipl_continue =3D (void *)address; =20 - debug_print_int("set IPL addr to", current->ipl_continue); + debug_print_int("set IPL addr to", (uint64_t)ipl_continue); =20 /* Ensure the guest output starts fresh */ sclp_print("\n"); --=20 2.25.1 From nobody Sun May 19 02:38:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1594806187; cv=none; d=zohomail.com; s=zohoarc; b=Hmci93oxHYEadAMgXmCd1yGrLDE8voH39kV1drAcgQRrDJpV5oR2m9p4mRJw74T6hMZ4GzcKjjxbgutjo8205YtfCez+nYTsUA9eZqYzSrmhkylnLOA7f1dYUQZPZYzi0xl1k99zKJLlym2hJAVgSwqSWZOPANoUYW/DB81ZscA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594806187; 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=smGUUAG4DWeGZ7mi5o8dYgjMKNPTV2erE6cD2koXzNk=; b=HCJWs7RjtYm4ZkOGLnQa5xlCOC/qQziAJmmJDPz4CLiD7ZbjEFVsMysFnZeBXpL/fONgZB5zsTSmXxAohGsHdmNxsH3v/To362YLK2SVgqihWWI6UX0+czr8C+2u1ANcajdfMYOk6IZxrlwREm5Iocp6MPQoDCSkT1YetiTVqq4= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=fail 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 1594806187221218.5040979495759; Wed, 15 Jul 2020 02:43:07 -0700 (PDT) Received: from localhost ([::1]:37106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvdwP-0001ZY-Q7 for importer@patchew.org; Wed, 15 Jul 2020 05:43:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvdun-0008GH-Vx for qemu-devel@nongnu.org; Wed, 15 Jul 2020 05:41:25 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:27440) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvdum-0006Fz-6y for qemu-devel@nongnu.org; Wed, 15 Jul 2020 05:41:25 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06F9Y2VZ019932 for ; Wed, 15 Jul 2020 05:41:22 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 32991ffut2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 15 Jul 2020 05:41:22 -0400 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06F9cZKN045706 for ; Wed, 15 Jul 2020 05:41:22 -0400 Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 32991ffus7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jul 2020 05:41:22 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06F9bN4r031494; Wed, 15 Jul 2020 09:41:20 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma06ams.nl.ibm.com with ESMTP id 3274pgv57b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jul 2020 09:41:19 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06F9dtsn65339660 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Jul 2020 09:39:55 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B0E8F4C058; Wed, 15 Jul 2020 09:41:17 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1A24A4C04E; Wed, 15 Jul 2020 09:41:17 +0000 (GMT) Received: from linux01.pok.stglabs.ibm.com (unknown [9.114.17.81]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 15 Jul 2020 09:41:16 +0000 (GMT) From: Janosch Frank To: qemu-devel@nongnu.org Subject: [PATCH 3/7] pc-bios: s390x: Remove unneeded dasd-ipl.c reset psw mask changes Date: Wed, 15 Jul 2020 05:40:41 -0400 Message-Id: <20200715094045.381984-4-frankja@linux.ibm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200715094045.381984-1-frankja@linux.ibm.com> References: <20200715094045.381984-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-07-15_07:2020-07-15, 2020-07-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 suspectscore=1 spamscore=0 impostorscore=0 mlxscore=0 clxscore=1015 malwarescore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007150077 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/07/15 05:41:23 X-ACL-Warn: Detected OS = Linux 3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, 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" Content-Type: text/plain; charset="utf-8" jump_to_low_kernel() and the functions that it calls will already or 64 bit addressing into the reset psw mask when executing jump_to_IPL_2() after the diag308 subcode 1. The kernel proper is then branched to rather than doing a full PSW change. Signed-off-by: Janosch Frank Acked-by: Thomas Huth --- pc-bios/s390-ccw/dasd-ipl.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/pc-bios/s390-ccw/dasd-ipl.c b/pc-bios/s390-ccw/dasd-ipl.c index 0fc879bb8e..e8f2846740 100644 --- a/pc-bios/s390-ccw/dasd-ipl.c +++ b/pc-bios/s390-ccw/dasd-ipl.c @@ -206,7 +206,6 @@ static void run_ipl2(SubChannelId schid, uint16_t cutyp= e, uint32_t addr) */ void dasd_ipl(SubChannelId schid, uint16_t cutype) { - PSWLegacy *pswl =3D (PSWLegacy *) 0x00; uint32_t ipl2_addr; =20 /* Construct Read IPL CCW and run it to read IPL1 from boot disk */ @@ -229,7 +228,5 @@ void dasd_ipl(SubChannelId schid, uint16_t cutype) run_ipl2(schid, cutype, ipl2_addr); =20 /* Transfer control to the guest operating system */ - pswl->mask |=3D PSW_MASK_EAMODE; /* Force z-mode */ - pswl->addr |=3D PSW_MASK_BAMODE; /* ... */ jump_to_low_kernel(); } --=20 2.25.1 From nobody Sun May 19 02:38:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1594806396; cv=none; d=zohomail.com; s=zohoarc; b=XdD3WnoNVjpp+UhoZnwEAoqqFtBwpeM6LQMKOqCfJLY62Jieg3Siuuj22KNYJMV1KXIu0bNEF7Z3rbJHkepH/+nZ2VopFtlPVVZ9ZuHbhGP7HnSLATwQ79DacZLULYvEMwaI3Ju3rItOoLvS5JtOcr+ZohlMxU/DYk5Bnkq3KZ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594806396; 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=1SDdmQ3HvqKq74s312fh1O5W/XcdjVwM7z1L+s2/4fI=; b=nd26l3R9Xr47vapj80ZS2a3M80OHvU4R0qpig3NnHswdW6CiETjMz5LgAO/+7Ya8yyCyfGA32JyZnHvaMU0kGAwXdCUSZRrbXq0XUqyqpP/IMZGihpbmSwo8BhSrQMytbsItfbJrwlWPAaAahd0+dKlixMzWoKrgJNae88EZRtw= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=fail 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 159480639666940.56498194651215; Wed, 15 Jul 2020 02:46:36 -0700 (PDT) Received: from localhost ([::1]:49302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvdzn-0006lL-EV for importer@patchew.org; Wed, 15 Jul 2020 05:46:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvdus-0008OY-2P for qemu-devel@nongnu.org; Wed, 15 Jul 2020 05:41:30 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54284) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvduo-0006Gn-7c for qemu-devel@nongnu.org; Wed, 15 Jul 2020 05:41:29 -0400 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06F9VSqw070696 for ; Wed, 15 Jul 2020 05:41:25 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 327u1jeqj7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 15 Jul 2020 05:41:24 -0400 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06F9VXZ6070921 for ; Wed, 15 Jul 2020 05:41:23 -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 327u1jeqh7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jul 2020 05:41:23 -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 06F9YjDG028744; Wed, 15 Jul 2020 09:41:20 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma03ams.nl.ibm.com with ESMTP id 327527v93a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jul 2020 09:41:20 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06F9fIIB63701204 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Jul 2020 09:41:18 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8F9354C052; Wed, 15 Jul 2020 09:41:18 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E6F044C040; Wed, 15 Jul 2020 09:41:17 +0000 (GMT) Received: from linux01.pok.stglabs.ibm.com (unknown [9.114.17.81]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 15 Jul 2020 09:41:17 +0000 (GMT) From: Janosch Frank To: qemu-devel@nongnu.org Subject: [PATCH 4/7] pc-bios: s390x: Rework data initialization Date: Wed, 15 Jul 2020 05:40:42 -0400 Message-Id: <20200715094045.381984-5-frankja@linux.ibm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200715094045.381984-1-frankja@linux.ibm.com> References: <20200715094045.381984-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-07-15_07:2020-07-15, 2020-07-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 spamscore=0 priorityscore=1501 clxscore=1015 mlxlogscore=946 suspectscore=1 phishscore=0 bulkscore=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007150077 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/07/15 05:27:14 X-ACL-Warn: Detected OS = Linux 3.1-3.10 X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, 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" Content-Type: text/plain; charset="utf-8" Sometimes a memset is nicer to read than multiple struct->data =3D 0; Signed-off-by: Janosch Frank Reviewed-by: Pierre Morel --- pc-bios/s390-ccw/dasd-ipl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pc-bios/s390-ccw/dasd-ipl.c b/pc-bios/s390-ccw/dasd-ipl.c index e8f2846740..0543334ed4 100644 --- a/pc-bios/s390-ccw/dasd-ipl.c +++ b/pc-bios/s390-ccw/dasd-ipl.c @@ -167,16 +167,13 @@ static void ipl1_fixup(void) ccwSeek->cda =3D ptr2u32(seekData); ccwSeek->chain =3D 1; ccwSeek->count =3D sizeof(*seekData); - seekData->reserved =3D 0x00; - seekData->cyl =3D 0x00; - seekData->head =3D 0x00; + memset(seekData, 0, sizeof(*seekData)); =20 ccwSearchID->cmd_code =3D CCW_CMD_DASD_SEARCH_ID_EQ; ccwSearchID->cda =3D ptr2u32(searchData); ccwSearchID->chain =3D 1; ccwSearchID->count =3D sizeof(*searchData); - searchData->cyl =3D 0; - searchData->head =3D 0; + memset(searchData, 0, sizeof(*searchData)); searchData->record =3D 2; =20 /* Go back to Search CCW if correct record not yet found */ --=20 2.25.1 From nobody Sun May 19 02:38:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1594806302; cv=none; d=zohomail.com; s=zohoarc; b=RkbETyrHlBId0PSTBHskGaxyII12MB33FjDyVhEMNQ4VemRVg0hORPm7n2IKxPAsk/QF3wi+a6CqAZCDJJ3ZPIFvkV9st2ORApKFKhZ0kk9hGPWzMQP73PXEUxXDuJTdnDgcyKCO6mrOXMd3zByAdOqQqXup4j1H2xb44tdpqCk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594806302; 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=2CkyJOgJL+4tAHl0x9Vi2JgubAJqp8hom6riVugXdNE=; b=iPJbBET58M5c1qJdiJFwwwPimZioyE7ZY0ZXTCUwP0KvPTSpAeOw0UPC76ZAGXifLW32vpCAU5R42j9EWwq4G3gueRWKu6d1bvffWn/QUKCwfEaL+43yJeHPBD/McJx3ot9UvqMCKokKtRyzBOBXs6IpNnopMoWNE+zSbzFZcXo= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=fail 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 1594806302914339.3909960417826; Wed, 15 Jul 2020 02:45:02 -0700 (PDT) Received: from localhost ([::1]:45128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvdyH-0004wA-Nt for importer@patchew.org; Wed, 15 Jul 2020 05:45:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvdup-0008Jx-PQ for qemu-devel@nongnu.org; Wed, 15 Jul 2020 05:41:27 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:20246) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvduo-0006Gg-3J for qemu-devel@nongnu.org; Wed, 15 Jul 2020 05:41:27 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06F9Yjx2019385 for ; Wed, 15 Jul 2020 05:41:25 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 329cuk8ea8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 15 Jul 2020 05:41:24 -0400 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06F9YpJ9019945 for ; Wed, 15 Jul 2020 05:41:24 -0400 Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 329cuk8e8k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jul 2020 05:41:24 -0400 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06F9ZLQH014274; Wed, 15 Jul 2020 09:41:21 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma05fra.de.ibm.com with ESMTP id 327q2y1t9q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jul 2020 09:41:21 +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 06F9fJX158065092 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Jul 2020 09:41:19 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5BABD4C052; Wed, 15 Jul 2020 09:41:19 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B4C794C040; Wed, 15 Jul 2020 09:41:18 +0000 (GMT) Received: from linux01.pok.stglabs.ibm.com (unknown [9.114.17.81]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 15 Jul 2020 09:41:18 +0000 (GMT) From: Janosch Frank To: qemu-devel@nongnu.org Subject: [PATCH 5/7] pc-bios: s390x: Replace lowcore offsets with pointers in dasd-ipl.c Date: Wed, 15 Jul 2020 05:40:43 -0400 Message-Id: <20200715094045.381984-6-frankja@linux.ibm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200715094045.381984-1-frankja@linux.ibm.com> References: <20200715094045.381984-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-07-15_07:2020-07-15, 2020-07-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 adultscore=0 spamscore=0 priorityscore=1501 phishscore=0 malwarescore=0 suspectscore=1 mlxlogscore=857 mlxscore=0 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007150077 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/07/15 05:41:23 X-ACL-Warn: Detected OS = Linux 3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, 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" Content-Type: text/plain; charset="utf-8" Let's replace some more constant offsets with references into the lowcore for better readability. Signed-off-by: Janosch Frank Reviewed-by: Thomas Huth --- pc-bios/s390-ccw/dasd-ipl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pc-bios/s390-ccw/dasd-ipl.c b/pc-bios/s390-ccw/dasd-ipl.c index 0543334ed4..9ab9a0fa12 100644 --- a/pc-bios/s390-ccw/dasd-ipl.c +++ b/pc-bios/s390-ccw/dasd-ipl.c @@ -120,8 +120,8 @@ static void run_readipl(SubChannelId schid, uint16_t cu= type) */ static void check_ipl1(void) { - Ccw0 *ccwread =3D (Ccw0 *)0x08; - Ccw0 *ccwtic =3D (Ccw0 *)0x10; + Ccw0 *ccwread =3D (Ccw0 *) &lowcore->ccw1; + Ccw0 *ccwtic =3D (Ccw0 *) &lowcore->ccw2; =20 if (ccwread->cmd_code !=3D CCW_CMD_DASD_READ || ccwtic->cmd_code !=3D CCW_CMD_TIC) { @@ -143,15 +143,15 @@ static void check_ipl2(uint32_t ipl2_addr) =20 static uint32_t read_ipl2_addr(void) { - Ccw0 *ccwtic =3D (Ccw0 *)0x10; + Ccw0 *ccwtic =3D (Ccw0 *)&lowcore->ccw2; =20 return ccwtic->cda; } =20 static void ipl1_fixup(void) { - Ccw0 *ccwSeek =3D (Ccw0 *) 0x08; - Ccw0 *ccwSearchID =3D (Ccw0 *) 0x10; + Ccw0 *ccwSeek =3D (Ccw0 *) &lowcore->ccw1; + Ccw0 *ccwSearchID =3D (Ccw0 *) &lowcore->ccw2; Ccw0 *ccwSearchTic =3D (Ccw0 *) 0x18; Ccw0 *ccwRead =3D (Ccw0 *) 0x20; CcwSeekData *seekData =3D (CcwSeekData *) 0x30; --=20 2.25.1 From nobody Sun May 19 02:38:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1594806189; cv=none; d=zohomail.com; s=zohoarc; b=iXatUdVI5iiG5aZt1KpkEAyaRcmQ91+gc/iSRxAzIj0WDus9Cyz0GwKmQsuSqx8hJmL7+Wjw6QAqu/yfCJoHOfgGF0ahZV5owULVR0ZMfCVFZbzkw7sKCNscBKee7oEMvxOWsdIGbd3sFgeChMbpnuwDmoSQlzi2Kvz4vv6Xz7g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594806189; 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=MLb4EEZt9f/d27bH7Pdq8X7J0mNYjyKkD0z3FnKH6E4=; b=UQs8+IZN7bD7LD8YvwaONqwFOpS2FcWHc3UXKEV04mA1mOTwjya2pZJTPAuIi5UnLzRbgFWS184pVA2qCB44G/MG0injSGMS8d7IPCp+Jt3O6DOL2vhNtC/NBu06xgYQOCGnE7SrbSU1l21ds5g3nt8Qd6it3sItPEz+nDB5AGg= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=fail 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 1594806189444744.4168181858083; Wed, 15 Jul 2020 02:43:09 -0700 (PDT) Received: from localhost ([::1]:37332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvdwS-0001f2-5c for importer@patchew.org; Wed, 15 Jul 2020 05:43:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvdup-0008JL-DG for qemu-devel@nongnu.org; Wed, 15 Jul 2020 05:41:27 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:45256 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 1jvdun-0006Gc-L5 for qemu-devel@nongnu.org; Wed, 15 Jul 2020 05:41:27 -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 06F9Y6B2007619 for ; Wed, 15 Jul 2020 05:41:24 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 329dhwx0kv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 15 Jul 2020 05:41:24 -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 06F9YJdB008709 for ; Wed, 15 Jul 2020 05:41:24 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 329dhwx0jx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jul 2020 05:41:24 -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 06F9Yieo028454; Wed, 15 Jul 2020 09:41:22 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03ams.nl.ibm.com with ESMTP id 327527v93b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jul 2020 09:41:22 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06F9fKJf30212562 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Jul 2020 09:41:20 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 22E764C04E; Wed, 15 Jul 2020 09:41:20 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8398B4C040; Wed, 15 Jul 2020 09:41:19 +0000 (GMT) Received: from linux01.pok.stglabs.ibm.com (unknown [9.114.17.81]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 15 Jul 2020 09:41:19 +0000 (GMT) From: Janosch Frank To: qemu-devel@nongnu.org Subject: [PATCH 6/7] pc-bios: s390x: Use PSW constants in start.S Date: Wed, 15 Jul 2020 05:40:44 -0400 Message-Id: <20200715094045.381984-7-frankja@linux.ibm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200715094045.381984-1-frankja@linux.ibm.com> References: <20200715094045.381984-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-07-15_07:2020-07-15, 2020-07-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 malwarescore=0 mlxscore=0 suspectscore=1 impostorscore=0 spamscore=0 lowpriorityscore=0 mlxlogscore=803 clxscore=1015 adultscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007150077 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/07/15 05:27:14 X-ACL-Warn: Detected OS = Linux 3.x [generic] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, 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" Content-Type: text/plain; charset="utf-8" Let's decrease the number of magic numbers. Signed-off-by: Janosch Frank Reviewed-by: Pierre Morel --- pc-bios/s390-ccw/s390-arch.h | 25 +++++++++++++++---------- pc-bios/s390-ccw/start.S | 9 +++++---- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/pc-bios/s390-ccw/s390-arch.h b/pc-bios/s390-ccw/s390-arch.h index 6da44d4436..d450c096d0 100644 --- a/pc-bios/s390-ccw/s390-arch.h +++ b/pc-bios/s390-ccw/s390-arch.h @@ -11,6 +11,20 @@ #ifndef S390_ARCH_H #define S390_ARCH_H =20 +/* s390 psw bit masks */ +#define PSW_MASK_EXT 0x0100000000000000UL +#define PSW_MASK_IOINT 0x0200000000000000ULL +#define PSW_MASK_SHORTPSW 0x0008000000000000ULL +#define PSW_MASK_WAIT 0x0002000000000000ULL +#define PSW_MASK_EAMODE 0x0000000100000000ULL +#define PSW_MASK_BAMODE 0x0000000080000000ULL +#define PSW_MASK_SHORT_ADDR 0x000000007fffffffULL +#define PSW_MASK_64 (PSW_MASK_EAMODE | PSW_MASK_BAMODE) +#define PSW_MASK_DWAIT (PSW_MASK_64 | PSW_MASK_WAIT) +#define PSW_MASK_EWAIT (PSW_MASK_DWAIT | PSW_MASK_IOINT | PSW_MASK_EX= T) + +#ifndef __ASSEMBLER__ + typedef struct PSW { uint64_t mask; uint64_t addr; @@ -24,15 +38,6 @@ typedef struct PSWLegacy { } __attribute__ ((aligned(8))) PSWLegacy; _Static_assert(sizeof(struct PSWLegacy) =3D=3D 8, "PSWLegacy size incorrec= t"); =20 -/* s390 psw bit masks */ -#define PSW_MASK_IOINT 0x0200000000000000ULL -#define PSW_MASK_SHORTPSW 0x0008000000000000ULL -#define PSW_MASK_WAIT 0x0002000000000000ULL -#define PSW_MASK_EAMODE 0x0000000100000000ULL -#define PSW_MASK_BAMODE 0x0000000080000000ULL -#define PSW_MASK_SHORT_ADDR 0x000000007fffffffULL -#define PSW_MASK_64 (PSW_MASK_EAMODE | PSW_MASK_BAMODE) - /* Low core mapping */ typedef struct LowCore { /* prefix area: defined by architecture */ @@ -107,5 +112,5 @@ static inline uint32_t store_prefix(void) asm volatile("stpx %0" : "=3Dm" (address)); return address; } - +#endif /* !__ASSEMBLER__ */ #endif diff --git a/pc-bios/s390-ccw/start.S b/pc-bios/s390-ccw/start.S index ce519300a1..01c4c21b26 100644 --- a/pc-bios/s390-ccw/start.S +++ b/pc-bios/s390-ccw/start.S @@ -9,6 +9,7 @@ * your option) any later version. See the COPYING file in the top-level * directory. */ +#include "s390-arch.h" =20 .globl _start _start: @@ -108,10 +109,10 @@ io_new_code: =20 .align 8 disabled_wait_psw: - .quad 0x0002000180000000,0x0000000000000000 + .quad PSW_MASK_DWAIT, 0x0000000000000000 enabled_wait_psw: - .quad 0x0302000180000000,0x0000000000000000 + .quad PSW_MASK_EWAIT, 0x0000000000000000 external_new_mask: - .quad 0x0000000180000000 + .quad PSW_MASK_64 io_new_mask: - .quad 0x0000000180000000 + .quad PSW_MASK_64 --=20 2.25.1 From nobody Sun May 19 02:38:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1594806268; cv=none; d=zohomail.com; s=zohoarc; b=XrUuo5BMY4ChFErizaH3EZ5vzuipLHG8Mv/2BMrHT8KhhBgBRI9seww9yfijsCOUtj9D67gB4QQYlnDEMmtwI4QF7n3OPi1NGN2ftlqUTj+uzo7m6AwdKtT+rq46CIgieTgqeXuyfEujSfow+Cgg157OVhDukVQIzaRZUACP37o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594806268; 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=BodYOyKDQKPeL9bTj5bwLbfHBhNVckwf2Po9UIcm+WE=; b=VVAZhXZLIA61UlQExn9QP7SOU6aDxoKqHbb1MeHyZjWOjyNJ0YvtGBVK8BT0Fz5U55rraIs6ZwUc670NU5Z2WMXhRFnOsiAp+QIcbp2g7eXNYCkpLeY0r24MXioDhV4xuI9oGknMq6aWLQB6QmMELUmPUiBfFPAi068ckEsSfMY= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=fail 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 1594806268613968.1548520681216; Wed, 15 Jul 2020 02:44:28 -0700 (PDT) Received: from localhost ([::1]:43498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvdxi-0004F7-BJ for importer@patchew.org; Wed, 15 Jul 2020 05:44:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvduq-0008Lg-Nq for qemu-devel@nongnu.org; Wed, 15 Jul 2020 05:41:28 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:37950 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 1jvduo-0006H5-Jq for qemu-devel@nongnu.org; Wed, 15 Jul 2020 05:41:28 -0400 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 06F9XsBN155645 for ; Wed, 15 Jul 2020 05:41:25 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 329r1hma5m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 15 Jul 2020 05:41:25 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06F9fP2E192048 for ; Wed, 15 Jul 2020 05:41:25 -0400 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 329r1hma4v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jul 2020 05:41:24 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06F9ZokG023486; Wed, 15 Jul 2020 09:41:23 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma04ams.nl.ibm.com with ESMTP id 329nmygfq8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jul 2020 09:41:23 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06F9fL0S21889490 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Jul 2020 09:41:21 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DD9BD4C05A; Wed, 15 Jul 2020 09:41:20 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 474074C040; Wed, 15 Jul 2020 09:41:20 +0000 (GMT) Received: from linux01.pok.stglabs.ibm.com (unknown [9.114.17.81]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 15 Jul 2020 09:41:20 +0000 (GMT) From: Janosch Frank To: qemu-devel@nongnu.org Subject: [PATCH 7/7] pc-bios: s390x: Setup io and ext new psws only once Date: Wed, 15 Jul 2020 05:40:45 -0400 Message-Id: <20200715094045.381984-8-frankja@linux.ibm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200715094045.381984-1-frankja@linux.ibm.com> References: <20200715094045.381984-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-07-15_07:2020-07-15, 2020-07-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 priorityscore=1501 spamscore=0 mlxlogscore=731 lowpriorityscore=0 impostorscore=0 adultscore=0 mlxscore=0 bulkscore=0 phishscore=0 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007150077 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/07/15 05:27:14 X-ACL-Warn: Detected OS = Linux 3.x [generic] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, 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" Content-Type: text/plain; charset="utf-8" Absolutely no need to set them up every time before we enable our interrupt masks. Signed-off-by: Janosch Frank --- pc-bios/s390-ccw/start.S | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/pc-bios/s390-ccw/start.S b/pc-bios/s390-ccw/start.S index 01c4c21b26..0059a15d21 100644 --- a/pc-bios/s390-ccw/start.S +++ b/pc-bios/s390-ccw/start.S @@ -34,6 +34,12 @@ loop: remainder: larl %r2,memsetxc ex %r3,0(%r2) + /* Store io new PSW */ + larl %r1,io_new_psw + mvc 0x1f0(16),0(%r1) + /* Store ext new PSW */ + larl %r1,external_new_psw + mvc 0x1b0(16),0(%r1) done: j main /* And call C */ =20 @@ -64,11 +70,6 @@ consume_sclp_int: stctg %c0,%c0,0(%r15) oi 6(%r15),0x2 lctlg %c0,%c0,0(%r15) - /* prepare external call handler */ - larl %r1, external_new_code - stg %r1, 0x1b8 - larl %r1, external_new_mask - mvc 0x1b0(8),0(%r1) /* load enabled wait PSW */ larl %r1, enabled_wait_psw lpswe 0(%r1) @@ -81,14 +82,9 @@ consume_sclp_int: .globl consume_io_int consume_io_int: /* enable I/O interrupts in cr6 */ - stctg %c6,%c6,0(%r15) - oi 4(%r15), 0xff - lctlg %c6,%c6,0(%r15) - /* prepare i/o call handler */ - larl %r1, io_new_code - stg %r1, 0x1f8 - larl %r1, io_new_mask - mvc 0x1f0(8),0(%r1) + stctg %c6, %c6, 0(%r15) + oi 4(%r15), 0xff + lctlg %c6, %c6, 0(%r15) /* load enabled wait PSW */ larl %r1, enabled_wait_psw lpswe 0(%r1) @@ -112,7 +108,7 @@ disabled_wait_psw: .quad PSW_MASK_DWAIT, 0x0000000000000000 enabled_wait_psw: .quad PSW_MASK_EWAIT, 0x0000000000000000 -external_new_mask: - .quad PSW_MASK_64 -io_new_mask: - .quad PSW_MASK_64 +external_new_psw: + .quad PSW_MASK_64, external_new_code +io_new_psw: + .quad PSW_MASK_64, io_new_code --=20 2.25.1