From: Cornelia Huck <cohuck@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
Alexander Graf <agraf@suse.de>,
Richard Henderson <rth@twiddle.net>,
David Hildenbrand <david@redhat.com>,
Thomas Huth <thuth@redhat.com>,
qemu-s390x@nongnu.org, qemu-devel@nongnu.org,
Cornelia Huck <cohuck@redhat.com>
Subject: [Qemu-devel] [PULL 01/15] s390/ipl: fix ipl with -no-reboot
Date: Mon, 2 Jul 2018 13:17:23 +0200 [thread overview]
Message-ID: <20180702111737.18970-2-cohuck@redhat.com> (raw)
In-Reply-To: <20180702111737.18970-1-cohuck@redhat.com>
From: Christian Borntraeger <borntraeger@de.ibm.com>
kexec/kdump as well as the bootloader use a subcode of diagnose 308
that is supposed to reset the I/O subsystem but not comprise a full
"reboot". With the latest refactoring this is now broken when
-no-reboot is used or when libvirt acts on a reboot QMP event, for
example a virt-install from iso images.
We need to mark these "subsystem resets" as special.
Fixes: a30fb811cbe9 (s390x: refactor reset/reipl handling)
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20180622102928.173420-1-borntraeger@de.ibm.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
hw/s390x/ipl.c | 8 +++++++-
include/sysemu/sysemu.h | 4 ++++
vl.c | 4 ++--
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index 0d67349004..f278036fa7 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -535,7 +535,13 @@ void s390_ipl_reset_request(CPUState *cs, enum s390_reset reset_type)
ipl->iplb_valid = s390_gen_initial_iplb(ipl);
}
}
- qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
+ if (reset_type == S390_RESET_MODIFIED_CLEAR ||
+ reset_type == S390_RESET_LOAD_NORMAL) {
+ /* ignore -no-reboot, send no event */
+ qemu_system_reset_request(SHUTDOWN_CAUSE_SUBSYSTEM_RESET);
+ } 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 b921c6f3b7..76ef6196a7 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -44,6 +44,10 @@ typedef enum ShutdownCause {
turns that into a shutdown */
SHUTDOWN_CAUSE_GUEST_PANIC, /* Guest panicked, and command line turns
that into a shutdown */
+ SHUTDOWN_CAUSE_SUBSYSTEM_RESET,/* Partial guest reset that does not trigger
+ QMP events and ignores --no-reboot. This
+ is useful for sanitize hypercalls on s390
+ that are used during kexec/kdump/boot */
SHUTDOWN_CAUSE__MAX,
} ShutdownCause;
diff --git a/vl.c b/vl.c
index ef6cfcec40..9442beee21 100644
--- a/vl.c
+++ b/vl.c
@@ -1645,7 +1645,7 @@ void qemu_system_reset(ShutdownCause reason)
} else {
qemu_devices_reset();
}
- if (reason) {
+ if (reason != SHUTDOWN_CAUSE_SUBSYSTEM_RESET) {
qapi_event_send_reset(shutdown_caused_by_guest(reason),
&error_abort);
}
@@ -1691,7 +1691,7 @@ void qemu_system_guest_panicked(GuestPanicInformation *info)
void qemu_system_reset_request(ShutdownCause reason)
{
- if (no_reboot) {
+ if (no_reboot && reason != SHUTDOWN_CAUSE_SUBSYSTEM_RESET) {
shutdown_requested = reason;
} else {
reset_requested = reason;
--
2.14.4
next prev parent reply other threads:[~2018-07-02 11:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-02 11:17 [Qemu-devel] [PULL 00/15] s390x patches for 3.0 Cornelia Huck
2018-07-02 11:17 ` Cornelia Huck [this message]
2018-07-02 11:17 ` [Qemu-devel] [PULL 02/15] loader: Check access size when calling rom_ptr() to avoid crashes Cornelia Huck
2018-07-02 11:17 ` [Qemu-devel] [PULL 03/15] s390x/cpumodel: default enable bpb and ppa15 for z196 and later Cornelia Huck
2018-07-02 11:17 ` [Qemu-devel] [PULL 04/15] s390x/tcg: avoid overflows in time2tod/tod2time Cornelia Huck
2018-07-02 11:17 ` [Qemu-devel] [PULL 05/15] s390x/kvm: pass values instead of pointers to kvm_s390_set_clock_*() Cornelia Huck
2018-07-02 11:17 ` [Qemu-devel] [PULL 06/15] s390x/tod: factor out TOD into separate device Cornelia Huck
2018-10-11 12:15 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2018-10-11 12:32 ` Cornelia Huck
2018-10-11 12:35 ` David Hildenbrand
2018-07-02 11:17 ` [Qemu-devel] [PULL 07/15] s390x/tcg: drop tod_basetime Cornelia Huck
2018-07-02 11:17 ` [Qemu-devel] [PULL 08/15] s390x/tcg: properly implement the TOD Cornelia Huck
2018-07-02 11:17 ` [Qemu-devel] [PULL 09/15] s390x/tcg: SET CLOCK COMPARATOR can clear CKC interrupts Cornelia Huck
2018-07-02 11:17 ` [Qemu-devel] [PULL 10/15] s390x/tcg: implement SET CLOCK Cornelia Huck
2018-07-02 11:17 ` [Qemu-devel] [PULL 11/15] s390x/tcg: rearm the CKC timer during migration Cornelia Huck
2018-07-02 11:17 ` [Qemu-devel] [PULL 12/15] s390x/tcg: fix CPU hotplug with single-threaded TCG Cornelia Huck
2018-07-02 11:17 ` [Qemu-devel] [PULL 13/15] s390x/kvm: legacy_s390_alloc() only supports one allocation Cornelia Huck
2018-07-02 11:17 ` [Qemu-devel] [PULL 14/15] s390x/kvm: indicate alignment in legacy_s390_alloc() Cornelia Huck
2018-07-02 11:17 ` [Qemu-devel] [PULL 15/15] s390x/tcg: fix locking problem with tcg_s390_tod_updated Cornelia Huck
2018-07-02 15:07 ` [Qemu-devel] [PULL 00/15] s390x patches for 3.0 Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180702111737.18970-2-cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).