[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: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/2] qmp: adding 'wakeup-suspend-support' in query-target |
Date: |
Tue, 2 Jan 2018 14:06:03 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
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.
> #
> # 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.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature