mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
qapi event: convert STOP
Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
a6330785f0
commit
a4e15de9a2
3 changed files with 12 additions and 13 deletions
4
cpus.c
4
cpus.c
|
@ -26,6 +26,7 @@
|
||||||
#include "config-host.h"
|
#include "config-host.h"
|
||||||
|
|
||||||
#include "monitor/monitor.h"
|
#include "monitor/monitor.h"
|
||||||
|
#include "qapi/qmp/qerror.h"
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
#include "exec/gdbstub.h"
|
#include "exec/gdbstub.h"
|
||||||
#include "sysemu/dma.h"
|
#include "sysemu/dma.h"
|
||||||
|
@ -38,6 +39,7 @@
|
||||||
#include "qemu/main-loop.h"
|
#include "qemu/main-loop.h"
|
||||||
#include "qemu/bitmap.h"
|
#include "qemu/bitmap.h"
|
||||||
#include "qemu/seqlock.h"
|
#include "qemu/seqlock.h"
|
||||||
|
#include "qapi-event.h"
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include "qemu/compatfd.h"
|
#include "qemu/compatfd.h"
|
||||||
|
@ -530,7 +532,7 @@ static int do_vm_stop(RunState state)
|
||||||
pause_all_vcpus();
|
pause_all_vcpus();
|
||||||
runstate_set(state);
|
runstate_set(state);
|
||||||
vm_state_notify(0, state);
|
vm_state_notify(0, state);
|
||||||
monitor_protocol_event(QEVENT_STOP, NULL);
|
qapi_event_send_stop(&error_abort);
|
||||||
}
|
}
|
||||||
|
|
||||||
bdrv_drain_all();
|
bdrv_drain_all();
|
||||||
|
|
|
@ -364,18 +364,6 @@ Example:
|
||||||
"channel-id": 0, "tls": true}
|
"channel-id": 0, "tls": true}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
STOP
|
|
||||||
----
|
|
||||||
|
|
||||||
Emitted when the Virtual Machine is stopped.
|
|
||||||
|
|
||||||
Data: None.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
{ "event": "STOP",
|
|
||||||
"timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
|
|
||||||
|
|
||||||
SUSPEND
|
SUSPEND
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|
|
@ -29,3 +29,12 @@
|
||||||
# Since: 0.12.0
|
# Since: 0.12.0
|
||||||
##
|
##
|
||||||
{ 'event': 'RESET' }
|
{ 'event': 'RESET' }
|
||||||
|
|
||||||
|
##
|
||||||
|
# @STOP
|
||||||
|
#
|
||||||
|
# Emitted when the virtual machine is stopped
|
||||||
|
#
|
||||||
|
# Since: 0.12.0
|
||||||
|
##
|
||||||
|
{ 'event': 'STOP' }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue