summaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2011-07-29 15:04:45 -0300
committerLuiz Capitulino <lcapitulino@redhat.com>2011-09-15 16:39:32 -0300
commitf5bbfba1ebe8c877ebfe846fc1e73e90da423884 (patch)
treecd395df17a18a35cb4e5a9a8f0d6e378027a7794 /cpus.c
parent1dfb4dd993f7122353fb2894f09dfcba894cd7d5 (diff)
RunState: Add additional states
Currently, only vm_start() and vm_stop() change the VM state. That's, the state is only changed when starting or stopping the VM. This commit adds the runstate_set() function, which makes it possible to also do state transitions when the VM is stopped or running. Additional states are also added and the current state is stored. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cpus.c b/cpus.c
index 76a79ac7d4..3444bc06e7 100644
--- a/cpus.c
+++ b/cpus.c
@@ -124,6 +124,7 @@ static void do_vm_stop(RunState state)
cpu_disable_ticks();
vm_running = 0;
pause_all_vcpus();
+ runstate_set(state);
vm_state_notify(0, state);
qemu_aio_flush();
bdrv_flush_all();