|
From: | Annie.li |
Subject: | Re: [RFC PATCH 01/11] acpi: hmp/qmp: Add hmp/qmp support for system_sleep |
Date: | Tue, 5 Dec 2023 09:43:57 -0500 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 |
Hi Philippe, On 12/5/2023 4:44 AM, Philippe Mathieu-Daudé wrote:
Hi Annie, On 5/12/23 01:23, Annie Li wrote:Following hmp/qmp commands are implemented for pressing virtual sleep button, hmp: system_sleep qmp: { "execute": "system_sleep" } These commands put the guest into suspend or other power states depending on the power settings inside the guest. Signed-off-by: Annie Li <annie.li@oracle.com> --- hmp-commands.hx | 14 ++++++++++++++ hw/core/machine-hmp-cmds.c | 5 +++++ hw/core/machine-qmp-cmds.c | 9 +++++++++ include/monitor/hmp.h | 1 + qapi/machine.json | 18 ++++++++++++++++++ qapi/pragma.json | 1 + 6 files changed, 48 insertions(+)index b6d634b30d..3ac69df92f 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -297,6 +297,24 @@ ## { 'command': 'system_reset' } +## +# @system_sleep:@since 9.0
Nod
+#+# Requests that a guest perform a ACPI sleep transition by pushing a virtual+# sleep button. +# +# Notes: A guest may or may not respond to this command. This command+# returning does not indicate that a guest has accepted the request+# or that it has gone to sleep. +# +# Example: +# +# -> { "execute": "system_sleep" } +# <- { "return": {} } +# +## +{ 'command': 'system_sleep' }Do we want a 'mode' argument, starting here with control_method?
As what has been discussed previously in the following thread, https://lore.kernel.org/all/20210920095316.2dd133be@redhat.com/T/#mfe24f89778020deeacfe45083f3eea3cf9f55961 the Control Method Sleep button can be shared among various architectures. It is very likely that there will be one type of sleep button(Control Method) implemented, so the extra argument isn't necessary. Thanks Annie
+ ## # @system_powerdown: #
[Prev in Thread] | Current Thread | [Next in Thread] |