From 1d11a95a3e84e01289e07884de37f2eb65c21357 Mon Sep 17 00:00:00 2001 From: Wenchao Xia Date: Wed, 18 Jun 2014 08:43:38 +0200 Subject: [PATCH] qapi event: convert SUSPEND Signed-off-by: Wenchao Xia Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- docs/qmp/qmp-events.txt | 12 ------------ qapi-event.json | 10 ++++++++++ vl.c | 2 +- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/docs/qmp/qmp-events.txt b/docs/qmp/qmp-events.txt index fb26a1a39b..d0b7b990ac 100644 --- a/docs/qmp/qmp-events.txt +++ b/docs/qmp/qmp-events.txt @@ -352,18 +352,6 @@ Example: "channel-id": 0, "tls": true} }} -SUSPEND -------- - -Emitted when guest enters S3 state. - -Data: None. - -Example: - -{ "event": "SUSPEND", - "timestamp": { "seconds": 1344456160, "microseconds": 309119 } } - SUSPEND_DISK ------------ diff --git a/qapi-event.json b/qapi-event.json index ac903efec2..d45b34182d 100644 --- a/qapi-event.json +++ b/qapi-event.json @@ -47,3 +47,13 @@ # Since: 0.12.0 ## { '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' } diff --git a/vl.c b/vl.c index fb9193986d..aaa9ee5139 100644 --- a/vl.c +++ b/vl.c @@ -1869,7 +1869,7 @@ static void qemu_system_suspend(void) pause_all_vcpus(); notifier_list_notify(&suspend_notifiers, NULL); runstate_set(RUN_STATE_SUSPENDED); - monitor_protocol_event(QEVENT_SUSPEND, NULL); + qapi_event_send_suspend(&error_abort); } void qemu_system_suspend_request(void)