From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsWjI-0000RO-IC for qemu-devel@nongnu.org; Thu, 05 Jun 2014 08:25:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsWj9-0001UW-Ha for qemu-devel@nongnu.org; Thu, 05 Jun 2014 08:25:12 -0400 Received: from mail-pd0-x22b.google.com ([2607:f8b0:400e:c02::22b]:51287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsWj9-0001OJ-5O for qemu-devel@nongnu.org; Thu, 05 Jun 2014 08:25:03 -0400 Received: by mail-pd0-f171.google.com with SMTP id y13so1024036pdi.30 for ; Thu, 05 Jun 2014 05:25:02 -0700 (PDT) From: Wenchao Xia Date: Thu, 5 Jun 2014 05:22:08 -0700 Message-Id: <1401970944-18735-14-git-send-email-wenchaoqemu@gmail.com> In-Reply-To: <1401970944-18735-1-git-send-email-wenchaoqemu@gmail.com> References: <1401970944-18735-1-git-send-email-wenchaoqemu@gmail.com> Subject: [Qemu-devel] [PATCH V6 13/29] qapi event: convert SUSPEND List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mdroth@linux.vnet.ibm.com, armbru@redhat.com, Wenchao Xia , lcapitulino@redhat.com Signed-off-by: Wenchao Xia --- 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 cda67d4..d86a077 100644 --- a/docs/qmp/qmp-events.txt +++ b/docs/qmp/qmp-events.txt @@ -342,18 +342,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 3485985..83c4ea2 100644 --- a/qapi-event.json +++ b/qapi-event.json @@ -47,3 +47,13 @@ # Since: 2.1 ## { 'event': 'RESUME' } + +## +# @SUSPEND +# +# Emitted when guest enters a hardware suspension state, for example, S3 state, +# which is sometimes called standby state +# +# Since: 2.1 +## +{ 'event': 'SUSPEND' } diff --git a/vl.c b/vl.c index d195e50..c6cb2c1 100644 --- a/vl.c +++ b/vl.c @@ -1928,7 +1928,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(NULL); } void qemu_system_suspend_request(void) -- 1.7.1