aboutsummaryrefslogtreecommitdiff
path: root/qmp.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2012-10-29 14:55:51 +0100
committerAurelien Jarno <aurelien@aurel32.net>2012-10-29 14:55:51 +0100
commit3f4331bfd112840e94935b0fd098ee88c07beabc (patch)
tree36fd14200ceb2b73832191ae03311bcf9bd0886c /qmp.c
parent01f590d5a3385c3d79c6afda7acd66edf4bf48d3 (diff)
parent29ed72f15a4c8fd3ac106d874f76cc27b654fd25 (diff)
Merge branch 'queue/qmp' of git://repo.or.cz/qemu/qmp-unstable
* 'queue/qmp' of git://repo.or.cz/qemu/qmp-unstable: migration: go to paused state after finishing incoming migration with -S qmp: handle stop/cont in INMIGRATE state hmp: fix info cpus for sparc targets
Diffstat (limited to 'qmp.c')
-rw-r--r--qmp.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/qmp.c b/qmp.c
index 31bc3bfdd1..d8a3c00b97 100644
--- a/qmp.c
+++ b/qmp.c
@@ -85,7 +85,11 @@ void qmp_quit(Error **err)
void qmp_stop(Error **errp)
{
- vm_stop(RUN_STATE_PAUSED);
+ if (runstate_check(RUN_STATE_INMIGRATE)) {
+ autostart = 0;
+ } else {
+ vm_stop(RUN_STATE_PAUSED);
+ }
}
void qmp_system_reset(Error **errp)
@@ -144,10 +148,7 @@ void qmp_cont(Error **errp)
{
Error *local_err = NULL;
- if (runstate_check(RUN_STATE_INMIGRATE)) {
- error_set(errp, QERR_MIGRATION_EXPECTED);
- return;
- } else if (runstate_check(RUN_STATE_INTERNAL_ERROR) ||
+ if (runstate_check(RUN_STATE_INTERNAL_ERROR) ||
runstate_check(RUN_STATE_SHUTDOWN)) {
error_set(errp, QERR_RESET_REQUIRED);
return;
@@ -162,7 +163,11 @@ void qmp_cont(Error **errp)
return;
}
- vm_start();
+ if (runstate_check(RUN_STATE_INMIGRATE)) {
+ autostart = 1;
+ } else {
+ vm_start();
+ }
}
void qmp_system_wakeup(Error **errp)