qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 1/1] qmp.c: system_wakeup: adding RUN_STATE_S


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 1/1] qmp.c: system_wakeup: adding RUN_STATE_SUSPENDED check before proceeding
Date: Tue, 15 May 2018 09:20:55 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 05/14/2018 04:50 PM, Daniel Henrique Barboza wrote:
The qmp/hmp command 'system_wakeup' is simply a direct call to
'qemu_system_wakeup_request' from vl.c. This function verifies if
runstate is SUSPENDED and if the wake up reason is valid before
proceeding.

However, no error or warning is thrown if any of those
pre-requirements isn't met. There is no way for the caller to
differentiate between a successful wakeup or an error state caused
when trying to wake up a guest that wasn't suspended.

This would be the ideal place to also mention...


This patch changes qmp_system_wakeup to make the runstate verification
before proceeding to call qemu_system_wakeup_request, firing up
an error message if the user tries to wake up a machine that
isn't in SUSPENDED state. The change isn't made inside
qemu_system_wakeup_request because it is used in migration,
ACPI and others where this usage might be valid.

Signed-off-by: Daniel Henrique Barboza <address@hidden>
CC: Markus Armbruster <address@hidden>
CC: Dr. David Alan Gilbert <address@hidden>
CC: Eric Blake <address@hidden>
---

This is a v2 of a patch that got buried:

http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg00092.html

The changes in this version was all in the wording of the commit,
reflecting the understanding reached in that discusssion:

...this text:

silent
failure should be interpreted as a bug and there is no API break
in fixing this behavior - applications that didn't check the result
will remain broken, the ones that check will have a chance to deal
with it.


With the commit message further improved,
Reviewed-by: Eric Blake <address@hidden>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

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