summaryrefslogtreecommitdiffstats
path: root/hw/s390x/ipl.c
diff options
context:
space:
mode:
authorChristian Borntraeger2018-06-22 12:29:28 +0200
committerCornelia Huck2018-07-02 10:37:38 +0200
commit76ed4b18debfe597329d1f6a9eb2ec9ffa751ecd (patch)
tree7a05efba9a105ba959c87b5cf1ac96f402da147e /hw/s390x/ipl.c
parentMerge remote-tracking branch 'remotes/xtensa/tags/20180630-xtensa' into staging (diff)
downloadqemu-76ed4b18debfe597329d1f6a9eb2ec9ffa751ecd.tar.gz
qemu-76ed4b18debfe597329d1f6a9eb2ec9ffa751ecd.tar.xz
qemu-76ed4b18debfe597329d1f6a9eb2ec9ffa751ecd.zip
s390/ipl: fix ipl with -no-reboot
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>
Diffstat (limited to 'hw/s390x/ipl.c')
-rw-r--r--hw/s390x/ipl.c8
1 files changed, 7 insertions, 1 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);