From: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: armbru@redhat.com, mdroth@linux.vnet.ibm.com, dgilbert@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/3] qmp: introduce query-wakeup-from-suspend-support command
Date: Thu, 21 Dec 2017 17:03:43 -0200 [thread overview]
Message-ID: <0b41344b-c35a-92a8-67e9-348e37ccfa44@linux.vnet.ibm.com> (raw)
In-Reply-To: <7379da29-1f3e-fe61-6216-67c8839bb8a4@linux.vnet.ibm.com>
Hi,
On 12/06/2017 01:50 PM, Daniel Henrique Barboza wrote:
>
>
> On 12/06/2017 12:26 PM, Eric Blake wrote:
>> On 12/06/2017 06:02 AM, Daniel Henrique Barboza wrote:
>>> When issuing the qmp/hmp 'system_wakeup' command, what happens in a
>>> nutshell is:
>>>
>>> This patch implements a new QMP command called
>>> 'query-wakeup-from-suspend-support' that allows the caller to query
>>> if the guest supports wake up from suspend via system_wakeup. It
>>> goes over the subscribers of the wake up event and, if it's empty,
>>> it assumes that the guest does not support wake up from suspend
>>> (and thus, pm-suspend itself).
>>>
>>> This is the expected output of the command when running a x86 guest:
>>>
>>> {"execute" : "query-wakeup-from-suspend-support"}
>>> {"return": {"enabled": true}}
>> Do we really need a new command, or can we add it as an additional field
>> to an existing command (for example, in MachineInfo under
>> query-machines, or TargetInfo under query-target)?
>
> A new QMP command was the first idea that crossed my mind but yeah,
> adding
> the info to an existing command is also valid IMO.
After investigating, I think that it's simpler to hook the wakeup
support info into TargetInfo
than MachineInfo, given that the detection I'm using for this new
property is based
on the current runtime state. Hooking into MachineInfo would require to
change the
MachineClass to add a new property, then setting it up for the machines
that have
the wakeup support (only x86 so far). Definitely doable, but if we don't
have any
favorites between MachineInfo and TargetInfo I'd rather pick the simpler
route.
So, if no one objects, I'll rework this series by putting the logic
inside query-target
instead of a new API.
Daniel
>
>
> Daniel
>
>>
>
>
next prev parent reply other threads:[~2017-12-21 19:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-06 12:02 [Qemu-devel] [PATCH 0/3] qmp/hmp: wakeup-from-suspend-support command Daniel Henrique Barboza
2017-12-06 12:02 ` [Qemu-devel] [PATCH 1/3] qmp: introduce query-wakeup-from-suspend-support command Daniel Henrique Barboza
2017-12-06 14:26 ` Eric Blake
2017-12-06 15:50 ` Daniel Henrique Barboza
2017-12-21 19:03 ` Daniel Henrique Barboza [this message]
2017-12-06 12:02 ` [Qemu-devel] [PATCH 2/3] hmp: introduce wakeup-from-suspend-support command Daniel Henrique Barboza
2017-12-06 12:02 ` [Qemu-devel] [PATCH 3/3] qga: update guest-suspend-ram and guest-suspend-hybrid descriptions Daniel Henrique Barboza
2017-12-21 19:23 ` [Qemu-devel] [PATCH 0/3] qmp/hmp: wakeup-from-suspend-support command no-reply
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=0b41344b-c35a-92a8-67e9-348e37ccfa44@linux.vnet.ibm.com \
--to=danielhb@linux.vnet.ibm.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=mdroth@linux.vnet.ibm.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).