mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
1dfb4dd993
commit
f5bbfba1eb
4 changed files with 35 additions and 2 deletions
1
cpus.c
1
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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue