From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: mprivozn@redhat.com, aliguori@us.ibm.com, eblake@redhat.com,
jcody@redhat.com, lcapitulino@redhat.com
Subject: [Qemu-devel] [PATCH 05/13] qemu-ga: guest-suspend-ram: don't emit a success response
Date: Tue, 15 May 2012 09:48:51 -0500 [thread overview]
Message-ID: <1337093339-10786-6-git-send-email-mdroth@linux.vnet.ibm.com> (raw)
In-Reply-To: <1337093339-10786-1-git-send-email-mdroth@linux.vnet.ibm.com>
From: Luiz Capitulino <lcapitulino@redhat.com>
Today, qemu-ga may not be able to emit a success response when
guest-suspend-ram completes. This happens because the VM may
suspend before qemu-ga is able to emit a response.
This semantic is a bit confusing, as it's not clear for clients if
they should wait for a response or how they should check for success.
This commit solves that problem by changing guest-suspend-ram to
never emit a success response and suggests in the documentation
what clients should do to check for success.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
qapi-schema-guest.json | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/qapi-schema-guest.json b/qapi-schema-guest.json
index 88b165c..50e2815 100644
--- a/qapi-schema-guest.json
+++ b/qapi-schema-guest.json
@@ -395,17 +395,21 @@
# command. Thus, it's *required* to query QEMU for the presence of the
# 'system_wakeup' command before issuing guest-suspend-ram.
#
-# Returns: nothing on success
+# This command does NOT return a response on success. There are two options
+# to check for success:
+# 1. Wait for the SUSPEND QMP event from QEMU
+# 2. Issue the query-status QMP command to confirm the VM status is
+# "suspended"
+#
+# The following errors may be returned:
# If suspend to ram is not supported, Unsupported
#
-# Notes: o This is an asynchronous request. There's no guarantee a response
-# will be sent
-# o It's strongly recommended to issue the guest-sync command before
-# sending commands when the guest resumes
+# Notes: It's strongly recommended to issue the guest-sync command before
+# sending commands when the guest resumes
#
# Since: 1.1
##
-{ 'command': 'guest-suspend-ram' }
+{ 'command': 'guest-suspend-ram', 'success-response': 'no' }
##
# @guest-suspend-hybrid
--
1.7.4.1
next prev parent reply other threads:[~2012-05-15 14:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-15 14:48 [Qemu-devel] [PULL] qemu-ga fixes for 1.1 Michael Roth
2012-05-15 14:48 ` [Qemu-devel] [PATCH 01/13] qapi: add support for command options Michael Roth
2012-05-15 14:48 ` [Qemu-devel] [PATCH 02/13] qemu-ga: don't warn on no command return Michael Roth
2012-05-15 14:48 ` [Qemu-devel] [PATCH 03/13] qemu-ga: guest-shutdown: don't emit a success response Michael Roth
2012-05-15 14:48 ` [Qemu-devel] [PATCH 04/13] qemu-ga: guest-suspend-disk: " Michael Roth
2012-05-15 14:48 ` Michael Roth [this message]
2012-05-15 14:48 ` [Qemu-devel] [PATCH 06/13] qemu-ga: guest-suspend-hybrid: " Michael Roth
2012-05-15 14:48 ` [Qemu-devel] [PATCH 07/13] qemu-ga: make reopen_fd_to_null() public Michael Roth
2012-05-15 14:48 ` [Qemu-devel] [PATCH 08/13] qemu-ga: become_daemon(): reopen standard fds to /dev/null Michael Roth
2012-05-15 14:48 ` [Qemu-devel] [PATCH 09/13] qemu-ga: guest-suspend: make the API synchronous Michael Roth
2012-05-15 14:48 ` [Qemu-devel] [PATCH 10/13] qemu-ga: guest-shutdown: become synchronous Michael Roth
2012-05-15 14:48 ` [Qemu-devel] [PATCH 11/13] qemu-ga: guest-shutdown: use only async-signal-safe functions Michael Roth
2012-05-15 14:48 ` [Qemu-devel] [PATCH 12/13] qemu-ga: fix segv after failure to open log file Michael Roth
2012-05-15 14:48 ` [Qemu-devel] [PATCH 13/13] qemu-ga: align versioning with QEMU_VERSION Michael Roth
2012-05-21 16:51 ` [Qemu-devel] [PULL] qemu-ga fixes for 1.1 Luiz Capitulino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337093339-10786-6-git-send-email-mdroth@linux.vnet.ibm.com \
--to=mdroth@linux.vnet.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=eblake@redhat.com \
--cc=jcody@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mprivozn@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).