qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/3] qmp: introduce query-wakeup-from-suspend-su


From: Daniel Henrique Barboza
Subject: Re: [Qemu-devel] [PATCH 1/3] qmp: introduce query-wakeup-from-suspend-support command
Date: Thu, 21 Dec 2017 17:03:43 -0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

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








reply via email to

[Prev in Thread] Current Thread [Next in Thread]