[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 01/11] acpi: hmp/qmp: Add hmp/qmp support for system_slee
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [RFC PATCH 01/11] acpi: hmp/qmp: Add hmp/qmp support for system_sleep |
Date: |
Tue, 5 Dec 2023 10:44:15 +0100 |
User-agent: |
Mozilla Thunderbird |
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
+#
+# 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?
+
##
# @system_powerdown:
#
[RFC PATCH 02/11] acpi: Implement control method sleep button, Annie Li, 2023/12/04
[RFC PATCH 04/11] acpi: Support Control Method sleep button for x86, Annie Li, 2023/12/04
[RFC PATCH 05/11] tests/acpi/bios-tables-test: update DSDT tables for Control Method Sleep button, Annie Li, 2023/12/04
[RFC PATCH 06/11] acpi: Send the GPE event of suspend and wakeup for x86, Annie Li, 2023/12/04
[RFC PATCH 08/11] tests/acpi: allow FACP and DSDT table changes for arm/virt, Annie Li, 2023/12/04