From nobody Mon May 6 00:25:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=de.ibm.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1529599017716764.9807457625898; Thu, 21 Jun 2018 09:36:57 -0700 (PDT) Received: from localhost ([::1]:56588 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fW2Zj-00011t-Uv for importer@patchew.org; Thu, 21 Jun 2018 12:36:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fW2Ya-0000cU-5V for qemu-devel@nongnu.org; Thu, 21 Jun 2018 12:35:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fW2YW-0005LX-VR for qemu-devel@nongnu.org; Thu, 21 Jun 2018 12:35:36 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:36130) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fW2YW-0005LO-Ml for qemu-devel@nongnu.org; Thu, 21 Jun 2018 12:35:32 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5LGYEbe143200 for ; Thu, 21 Jun 2018 12:35:31 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2jrerttmnj-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 21 Jun 2018 12:35:30 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 21 Jun 2018 17:35:27 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 21 Jun 2018 17:35:23 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w5LGZMkm35061874 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 21 Jun 2018 16:35:23 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7FCCFAE04D; Thu, 21 Jun 2018 17:24:03 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6DC91AE045; Thu, 21 Jun 2018 17:24:03 +0100 (BST) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 21 Jun 2018 17:24:03 +0100 (BST) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 25651) id 907DB20F65F; Thu, 21 Jun 2018 18:35:22 +0200 (CEST) From: Christian Borntraeger To: Cornelia Huck Date: Thu, 21 Jun 2018 18:35:22 +0200 X-Mailer: git-send-email 2.17.0 X-TM-AS-GCONF: 00 x-cbid: 18062116-4275-0000-0000-000002905D09 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18062116-4276-0000-0000-00003797AC0A Message-Id: <20180621163522.100968-1-borntraeger@de.ibm.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-06-21_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806210180 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH v2] s390/ipl: fix ipl with -no-reboot X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Janosch Frank , Thomas Huth , David Hildenbrand , Alexander Graf , Halil Pasic , qemu-devel , Christian Borntraeger , qemu-s390x , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" kexec/kdump as well as the bootloader use a subcode of diagnose 308 that is supposed to reset the subsystem but not comprise a full "reboot". With the latest refactoring this is now broken when -no-reboot is used. This for example break virt-install from iso images. We need to mark these "soft" reboots as ok for rebooting. Fixes: a30fb811cbe9 (s390x: refactor reset/reipl handling) Signed-off-by: Christian Borntraeger --- hw/s390x/ipl.c | 8 +++++++- include/sysemu/sysemu.h | 3 +++ vl.c | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index 0d67349004..ade6896af6 100644 --- a/hw/s390x/ipl.c +++ b/hw/s390x/ipl.c @@ -535,7 +535,13 @@ void s390_ipl_reset_request(CPUState *cs, enum s390_re= set reset_type) ipl->iplb_valid =3D s390_gen_initial_iplb(ipl); } } - qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); + if (reset_type =3D=3D S390_RESET_MODIFIED_CLEAR || + reset_type =3D=3D S390_RESET_LOAD_NORMAL) { + /* ignore -no-reboot */ + qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET_FORCE); + } else { + qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); + } /* as this is triggered by a CPU, make sure to exit the loop */ if (tcg_enabled()) { cpu_loop_exit(cs); diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index e893f72f3b..345369d924 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -44,6 +44,9 @@ typedef enum ShutdownCause { turns that into a shutdown */ SHUTDOWN_CAUSE_GUEST_PANIC, /* Guest panicked, and command line turns that into a shutdown */ + SHUTDOWN_CAUSE_GUEST_RESET_FORCE,/* Guest reset that should ignore + --no-reboot. This is useful for re= set + like actions as s390 kexec/kdump */ SHUTDOWN_CAUSE__MAX, } ShutdownCause; =20 diff --git a/vl.c b/vl.c index b3426e03d0..722c3b9963 100644 --- a/vl.c +++ b/vl.c @@ -1674,7 +1674,7 @@ void qemu_system_guest_panicked(GuestPanicInformation= *info) =20 void qemu_system_reset_request(ShutdownCause reason) { - if (no_reboot) { + if (no_reboot && reason !=3D SHUTDOWN_CAUSE_GUEST_RESET_FORCE) { shutdown_requested =3D reason; } else { reset_requested =3D reason; --=20 2.17.0