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 <[email protected]>
---
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