qapi event: convert SUSPEND
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
591c48fbc5
commit
1d11a95a3e
|
@ -352,18 +352,6 @@ Example:
|
||||||
"channel-id": 0, "tls": true}
|
"channel-id": 0, "tls": true}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
SUSPEND
|
|
||||||
-------
|
|
||||||
|
|
||||||
Emitted when guest enters S3 state.
|
|
||||||
|
|
||||||
Data: None.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
{ "event": "SUSPEND",
|
|
||||||
"timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
|
|
||||||
|
|
||||||
SUSPEND_DISK
|
SUSPEND_DISK
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
|
|
@ -47,3 +47,13 @@
|
||||||
# Since: 0.12.0
|
# Since: 0.12.0
|
||||||
##
|
##
|
||||||
{ 'event': 'RESUME' }
|
{ 'event': 'RESUME' }
|
||||||
|
|
||||||
|
##
|
||||||
|
# @SUSPEND
|
||||||
|
#
|
||||||
|
# Emitted when guest enters a hardware suspension state, for example, S3 state,
|
||||||
|
# which is sometimes called standby state
|
||||||
|
#
|
||||||
|
# Since: 1.1
|
||||||
|
##
|
||||||
|
{ 'event': 'SUSPEND' }
|
||||||
|
|
2
vl.c
2
vl.c
|
@ -1869,7 +1869,7 @@ static void qemu_system_suspend(void)
|
||||||
pause_all_vcpus();
|
pause_all_vcpus();
|
||||||
notifier_list_notify(&suspend_notifiers, NULL);
|
notifier_list_notify(&suspend_notifiers, NULL);
|
||||||
runstate_set(RUN_STATE_SUSPENDED);
|
runstate_set(RUN_STATE_SUSPENDED);
|
||||||
monitor_protocol_event(QEVENT_SUSPEND, NULL);
|
qapi_event_send_suspend(&error_abort);
|
||||||
}
|
}
|
||||||
|
|
||||||
void qemu_system_suspend_request(void)
|
void qemu_system_suspend_request(void)
|
||||||
|
|
Loading…
Reference in New Issue