qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/1] qmp: process system-reset event in paused state
@ 2015-12-16  9:00 Denis V. Lunev
  2015-12-16  9:12 ` Paolo Bonzini
  0 siblings, 1 reply; 12+ messages in thread
From: Denis V. Lunev @ 2015-12-16  9:00 UTC (permalink / raw)
  Cc: Denis V. Lunev, qemu-devel, Dmitry Andreev, Markus Armbruster

With pvpanic or HyperV panic devices could be moved into the paused state
with ' <on_crash>preserve</on_crash>'. In this state VM reacts only to
'virsh destroy' or 'continue'.

'virsh reset' command is usually used to force guest reset. The expectation
of the behavior of this command is that the guest will be force restarted.
This is not true at the moment.

Thus it is quite natural to process 'virh reset' aka qmp_system_reset
this way, i.e. allow to reset the guest. This behavior is similar to
one observed with 'reset' button on real hardware :)

Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Markus Armbruster <armbru@redhat.com>
CC: Dmitry Andreev <dandreev@virtuozzo.com>
---
 qmp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/qmp.c b/qmp.c
index 0a1fa19..df17a33 100644
--- a/qmp.c
+++ b/qmp.c
@@ -112,6 +112,10 @@ void qmp_stop(Error **errp)
 void qmp_system_reset(Error **errp)
 {
     qemu_system_reset_request();
+
+    if (!runstate_is_running()) {
+        vm_start();
+    }
 }
 
 void qmp_system_powerdown(Error **erp)
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-01-11 11:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-16  9:00 [Qemu-devel] [PATCH 1/1] qmp: process system-reset event in paused state Denis V. Lunev
2015-12-16  9:12 ` Paolo Bonzini
2015-12-16  9:32   ` Denis V. Lunev
2015-12-16  9:35     ` Paolo Bonzini
2015-12-16  9:50       ` Denis V. Lunev
2015-12-16  9:37     ` Peter Krempa
2015-12-16  9:50   ` Peter Krempa
2015-12-16  9:55     ` Denis V. Lunev
2015-12-16 12:02     ` Paolo Bonzini
2015-12-16 14:47       ` Denis V. Lunev
2016-01-11 10:31         ` Denis V. Lunev
2016-01-11 11:29           ` Paolo Bonzini

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).