diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2012-10-29 14:55:51 +0100 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2012-10-29 14:55:51 +0100 |
commit | 3f4331bfd112840e94935b0fd098ee88c07beabc (patch) | |
tree | 36fd14200ceb2b73832191ae03311bcf9bd0886c /qmp.c | |
parent | 01f590d5a3385c3d79c6afda7acd66edf4bf48d3 (diff) | |
parent | 29ed72f15a4c8fd3ac106d874f76cc27b654fd25 (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.c | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -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) |