[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 28/30] vl: exit qemu on guest panic if -no-shutdown i
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 28/30] vl: exit qemu on guest panic if -no-shutdown is not set |
Date: |
Tue, 1 Nov 2016 17:29:41 +0100 |
From: Christian Borntraeger <address@hidden>
For automated testing purposes it can be helpful to exit qemu
(poweroff) when the guest panics. Make this the default unless
-no-shutdown is specified.
For internal-errors like errors from KVM_RUN the behaviour is
not changed, in other words QEMU does not exit to allow debugging
in the QEMU monitor.
Signed-off-by: Christian Borntraeger <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
qapi-schema.json | 4 ++--
vl.c | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index 5dc96af..b0b4bf6 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4621,10 +4621,10 @@
#
# @pause: system pauses
#
-# Since: 2.1
+# Since: 2.1 (poweroff since 2.8)
##
{ 'enum': 'GuestPanicAction',
- 'data': [ 'pause' ] }
+ 'data': [ 'pause', 'poweroff' ] }
##
# @rtc-reset-reinjection
diff --git a/vl.c b/vl.c
index 368510f..319f641 100644
--- a/vl.c
+++ b/vl.c
@@ -1792,6 +1792,11 @@ void qemu_system_guest_panicked(void)
}
qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE, &error_abort);
vm_stop(RUN_STATE_GUEST_PANICKED);
+ if (!no_shutdown) {
+ qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_POWEROFF,
+ &error_abort);
+ qemu_system_shutdown_request();
+ }
}
void qemu_system_reset_request(void)
--
2.7.4
- [Qemu-devel] [PULL 16/30] nbd: Let server know when client gives up negotiation, (continued)
- [Qemu-devel] [PULL 16/30] nbd: Let server know when client gives up negotiation, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 12/30] nbd: Rename struct nbd_request and nbd_reply, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 19/30] nbd: Support shorter handshake, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 20/30] nbd: Refactor conversion to errno to silence checkpatch, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 21/30] nbd: Improve server handling of shutdown requests, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 22/30] nbd: Implement NBD_CMD_WRITE_ZEROES on server, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 23/30] nbd: Implement NBD_CMD_WRITE_ZEROES on client, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 24/30] qemu-char: do not forward events through the mux until QEMU has started, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 26/30] x86: add AVX512_4VNNIW and AVX512_4FMAPS features, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 25/30] slirp: fix CharDriver breakage, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 28/30] vl: exit qemu on guest panic if -no-shutdown is not set,
Paolo Bonzini <=
- [Qemu-devel] [PULL 27/30] checkpatch: allow spaces before parenthesis for 'coroutine_fn', Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 30/30] main-loop: Suppress I/O thread warning under qtest, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 29/30] docs/rcu.txt: Fix minor typo, Paolo Bonzini, 2016/11/01
- Re: [Qemu-devel] [PULL v2 00/30] Misc patches for 2016-10-31, no-reply, 2016/11/01
- Re: [Qemu-devel] [PULL v2 00/30] Misc patches for 2016-10-31, Peter Maydell, 2016/11/01