All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Annie Li <annie.li@oracle.com>
Cc: qemu-devel@nongnu.org,  dave@treblig.org,  mst@redhat.com,
	imammedo@redhat.com,  anisinha@redhat.com,  eduardo@habkost.net,
	marcel.apfelbaum@gmail.com,  philmd@linaro.org,
	 wangyanan55@huawei.com, zhao1.liu@intel.com,
	 pbonzini@redhat.com,  richard.henderson@linaro.org,
	slp@redhat.com,  eblake@redhat.com,  armbru@redhat.com,
	miguel.luis@oracle.com
Subject: Re: [PATCH 13/13] acpi: hmp/qmp: Add hmp/qmp support for system_sleep
Date: Mon, 02 Jun 2025 11:32:43 +0200	[thread overview]
Message-ID: <87wm9ujxok.fsf@pond.sub.org> (raw)
In-Reply-To: <20250528164219.2247-1-annie.li@oracle.com> (Annie Li's message of "Wed, 28 May 2025 12:42:18 -0400")

Annie Li <annie.li@oracle.com> writes:

> 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.
>
> These hmp/qmp command are in '*_*' format, it is intended to do
> so to align to existing 'system_*' commands.
>
> Signed-off-by: Annie Li <annie.li@oracle.com>

[...]

> diff --git a/qapi/machine.json b/qapi/machine.json
> index a6b8795b09..3efaf82f7d 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -361,6 +361,26 @@
>  ##
>  { 'command': 'system_reset' }
>  
> +##
> +# @system_sleep:
> +#
> +# Requests that the guest perform a ACPI sleep transition by pushing
> +# the virtual sleep button.
> +#
> +# Since:10.0

10.1

> +#
> +# .. note:: 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.

Please indent like this for consistency:

   # .. note:: 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.

The same note on system_powerdown additionally has "Many guests will respond to
this command by prompting the user in some way."  I guess you did not
copy this part, because it's not true here.  Correct?

> +#
> +# .. qmp-example::
> +#
> +# -> { "execute": "system_sleep" }
> +# <- { "return": {} }
> +#
> +##
> +{ 'command': 'system_sleep' }
> +
>  ##
>  # @system_powerdown:
>  #
> diff --git a/qapi/pragma.json b/qapi/pragma.json
> index 023a2ef7bc..285ce82e9b 100644
> --- a/qapi/pragma.json
> +++ b/qapi/pragma.json
> @@ -23,6 +23,7 @@
>          'set_password',
>          'system_powerdown',
>          'system_reset',
> +        'system_sleep',
>          'system_wakeup' ],
>      # Commands allowed to return a non-dictionary
>      'command-returns-exceptions': [



  reply	other threads:[~2025-06-02  9:33 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-28 16:35 [PATCH 00/13] Support ACPI Control Method Sleep button Annie Li
2025-05-28 16:38 ` [PATCH 01/13] acpi: Implement control method sleep button Annie Li
2025-06-03 12:31   ` Igor Mammedov
2025-06-03 19:08     ` Annie Li
2025-08-11 11:58       ` Igor Mammedov
2025-05-28 16:38 ` [PATCH 02/13] test/acpi: allow DSDT table changes for x86 platform Annie Li
2025-05-28 16:39 ` [PATCH 03/13] acpi: Support Control Method sleep button for x86 Annie Li
2025-06-03 12:52   ` Igor Mammedov
2025-06-03 19:19     ` Annie Li
2025-05-28 16:39 ` [PATCH 04/13] tests/qtest/bios-table-tests: Update ACPI table binaries " Annie Li
2025-05-28 16:39 ` [PATCH 05/13] acpi: Send the GPE event of sleep " Annie Li
2025-06-03 12:34   ` Igor Mammedov
2025-06-03 19:21     ` Annie Li
2025-05-28 16:40 ` [PATCH 06/13] test/acpi: allow DSDT table changes for microvm Annie Li
2025-05-28 16:40 ` [PATCH 07/13] microvm: Add ACPI Control Method Sleep Button Annie Li
2025-05-28 16:40 ` [PATCH 08/13] hw/acpi: Add ACPI GED support for the sleep event Annie Li
2025-05-28 16:41 ` [PATCH 09/13] microvm: enable sleep GED event Annie Li
2025-05-28 16:41 ` [PATCH 10/13] tests/qtest/bios-table-tests: Update ACPI table binaries for microvm Annie Li
2025-05-28 16:41 ` [PATCH 11/13] microvm: suspend the system as requested Annie Li
2025-05-28 16:42 ` [PATCH 12/13] microvm: enable suspend Annie Li
2025-06-03 13:03   ` Igor Mammedov
2025-06-03 19:22     ` Annie Li
2025-08-11 12:06       ` Igor Mammedov
2025-05-28 16:42 ` [PATCH 13/13] acpi: hmp/qmp: Add hmp/qmp support for system_sleep Annie Li
2025-06-02  9:32   ` Markus Armbruster [this message]
2025-06-02 14:22     ` Annie Li
2025-06-03 12:18 ` [PATCH 00/13] Support ACPI Control Method Sleep button Igor Mammedov
2025-06-03 19:23   ` Annie Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wm9ujxok.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=anisinha@redhat.com \
    --cc=annie.li@oracle.com \
    --cc=dave@treblig.org \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=imammedo@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=miguel.luis@oracle.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=slp@redhat.com \
    --cc=wangyanan55@huawei.com \
    --cc=zhao1.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.