qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 1/2] qmp: adding 'wakeup-suspend-support' in


From: Daniel Henrique Barboza
Subject: Re: [Qemu-devel] [PATCH v2 1/2] qmp: adding 'wakeup-suspend-support' in query-target
Date: Tue, 2 Jan 2018 18:28:15 -0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0



On 01/02/2018 06:06 PM, Eric Blake wrote:
On 01/02/2018 11:09 AM, Daniel Henrique Barboza wrote:
When issuing the qmp/hmp 'system_wakeup' command, what happens in a
nutshell is:

- qmp_system_wakeup_request set runstate to RUNNING, sets a wakeup_reason
and notify the event
- in the main_loop, all vcpus are paused, a system reset is issued, all
subscribers of wakeup_notifiers receives a notification, vcpus are then
resumed and the wake up QAPI event is fired

...
With this extra tool, management can avoid situations where a guest
that does not have proper suspend/wake capabilities ends up in
inconsistent state (e.g.
https://github.com/open-power-host-os/qemu/issues/31).

Signed-off-by: Daniel Henrique Barboza <address@hidden>
---
Only an interface review:

  arch_init.c             | 1 +
  include/sysemu/sysemu.h | 1 +
  qapi-schema.json        | 3 ++-
  vl.c                    | 5 +++++
  4 files changed, 9 insertions(+), 1 deletion(-)

+++ b/qapi-schema.json
@@ -2388,11 +2388,12 @@
  # Information describing the QEMU target.
  #
  # @arch: the target architecture (eg "x86_64", "i386", etc)
+# @wakeup-suspend-support: true if the target supports wake up from suspend
Missing a '(since 2.12)' notation.

TargetInfo is marked as "Since 1.2.0".  Should I add the 2.12.0 notation to the
new parameter or change the 1.2.0 notation of TargetInfo?


  #
  # Since: 1.2.0
  ##
  { 'struct': 'TargetInfo',
-  'data': { 'arch': 'str' } }
+  'data': { 'arch': 'str', 'wakeup-suspend-support': 'bool' } }
The struct is output-only, so adding the new field unconditionally is
backwards-compatible.

I believe it's worth adding this info in the commit message.


Thanks,

Daniel




reply via email to

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