[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/5] qmp: process system-reset event in paused state
From: |
Denis V. Lunev |
Subject: |
[Qemu-devel] [PATCH 1/5] qmp: process system-reset event in paused state |
Date: |
Fri, 8 Jan 2016 17:00:06 +0300 |
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 <address@hidden>
CC: Markus Armbruster <address@hidden>
CC: Dmitry Andreev <address@hidden>
---
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
- [Qemu-devel] [PATCH v3 0/5] QMP wrappers for VM snapshot operations, Denis V. Lunev, 2016/01/08
- [Qemu-devel] [PATCH 1/5] qmp: process system-reset event in paused state,
Denis V. Lunev <=
- [Qemu-devel] [PATCH 3/5] qmp: create qmp_delvm command, Denis V. Lunev, 2016/01/08
- [Qemu-devel] [PATCH 2/5] qmp: create qmp_savevm command, Denis V. Lunev, 2016/01/08
- [Qemu-devel] [PATCH 5/5] qmp: create QMP implementation of loadvm command, Denis V. Lunev, 2016/01/08
- [Qemu-devel] [PATCH 4/5] migration: improve error reporting for load_vmstate, Denis V. Lunev, 2016/01/08
- Re: [Qemu-devel] [PATCH v3 0/5] QMP wrappers for VM snapshot operations, Denis V. Lunev, 2016/01/08