All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Annie Li <annie.li@oracle.com>
Cc: qemu-devel@nongnu.org, dave@treblig.org, mst@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 00/13] Support ACPI Control Method Sleep button
Date: Tue, 3 Jun 2025 14:18:50 +0200	[thread overview]
Message-ID: <20250603141850.27d2daf0@imammedo.users.ipa.redhat.com> (raw)
In-Reply-To: <20250528163545.2143-1-annie.li@oracle.com>

On Wed, 28 May 2025 12:35:45 -0400
Annie Li <annie.li@oracle.com> wrote:

> The ACPI sleep button can be implemented as a fixed hardware button
> or Control Method Sleep button.
> 
> The patch of implementing a fixed hardware sleep button was posted
> here 1). More discussions can be found here 2). Essentially, the
> discussion mainly focuses on whether the sleep button is implemented
> as a fixed hardware button or Control Method Sleep button. The latter
> benefits various architectures since the code can be shared among
> them.
> 
> This patch set implements Control Method Sleep button for both x86
> and microvm. The RFC V1 patch set was posted previously here 3). We
> rebase all the patches on QEMU9.1.0 and re-post RFC V2 here 4). The
> RFC V3 patch is based on QEMU 10.0.0-rc3 at 5). This patch set here
> is rebased on QEMU 10.0.1. The sleep button support for microvm is
> added, however, its support for ARM platform in V2 is removed due to
> lower interests of it and more efforts in the firmware.

here we probably need a pointer to these efforts, or some kind of description
about what's wrong with ARM/firmare

> 
> For x86, a sleep button GPE event handler is implemented, so a GPE
> event is triggered to indicate the OSPM the sleep button is pressed.
> Tests have been done for Linux guest, and Windows Server guest,
> this sleep button works as expected.
> 
> For microvm, a GED event is triggered to notify the OSPM. This GED
> event is also applicable for ARM platform, as mentioned earlier, the
> implementation for ARM platform has been removed since RFC V3 patch
> set. Tests have been run for Linux microvm guests.


> System_wakeup doesn't work for microvm for now due to the missing
> support of it. This patch set only covers system_sleep, not the
> wakeup part.

ditto (aka what's wrong with wakeup)

> 
> 1) https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg06478.html
> 2) https://lore.kernel.org/all/20210920095316.2dd133be@redhat.com/T/#mfe24f89778020deeacfe45083f3eea3cf9f55961
> 3) https://lore.kernel.org/all/20231205002143.562-1-annie.li@oracle.com/T/
> 4) https://patchwork.kernel.org/project/qemu-devel/cover/20240927183906.1248-1-annie.li@oracle.com/
> 5) https://lore.kernel.org/all/20250411201912.2872-1-annie.li@oracle.com/
> 
> ----Changes from RFC V3----
> Improve source code and comment based on comments on RFC V3
> ---------------------------
> 
> Annie Li (12):
>   acpi: Implement control method sleep button
>   test/acpi: allow DSDT table changes for x86 platform
>   acpi: Support Control Method sleep button for x86
>   tests/qtest/bios-table-tests: Update ACPI table binaries for x86
>   acpi: Send the GPE event of sleep for x86
>   test/acpi: allow DSDT table changes for microvm
>   microvm: Add ACPI Control Method Sleep Button
>   microvm: enable sleep GED event
>   tests/qtest/bios-table-tests: Update ACPI table binaries for microvm
>   microvm: suspend the system as requested
>   microvm: enable suspend
>   acpi: hmp/qmp: Add hmp/qmp support for system_sleep
> 
> Miguel Luis (1):
>   hw/acpi: Add ACPI GED support for the sleep event
> 
>  hmp-commands.hx                               |  14 +++++++
>  hw/acpi/control_method_device.c               |  38 ++++++++++++++++++
>  hw/acpi/core.c                                |  12 ++++++
>  hw/acpi/generic_event_device.c                |  12 ++++++
>  hw/acpi/meson.build                           |   1 +
>  hw/core/machine-hmp-cmds.c                    |   5 +++
>  hw/core/machine-qmp-cmds.c                    |  11 +++++
>  hw/i386/acpi-build.c                          |  24 ++++++++++-
>  hw/i386/acpi-microvm.c                        |  13 +++++-
>  hw/i386/microvm.c                             |   4 +-
>  include/hw/acpi/acpi.h                        |   1 +
>  include/hw/acpi/acpi_dev_interface.h          |   1 +
>  include/hw/acpi/control_method_device.h       |  21 ++++++++++
>  include/hw/acpi/generic_event_device.h        |   2 +
>  include/monitor/hmp.h                         |   1 +
>  qapi/machine.json                             |  20 +++++++++
>  qapi/pragma.json                              |   1 +
>  tests/data/acpi/x86/microvm/DSDT              | Bin 365 -> 442 bytes
>  tests/data/acpi/x86/microvm/DSDT.ioapic2      | Bin 365 -> 442 bytes
>  tests/data/acpi/x86/microvm/DSDT.pcie         | Bin 3023 -> 3100 bytes
>  tests/data/acpi/x86/microvm/DSDT.rtc          | Bin 404 -> 481 bytes
>  tests/data/acpi/x86/microvm/DSDT.usb          | Bin 414 -> 491 bytes
>  tests/data/acpi/x86/pc/DSDT                   | Bin 8611 -> 8721 bytes
>  tests/data/acpi/x86/pc/DSDT.acpierst          | Bin 8522 -> 8632 bytes
>  tests/data/acpi/x86/pc/DSDT.acpihmat          | Bin 9936 -> 10046 bytes
>  tests/data/acpi/x86/pc/DSDT.bridge            | Bin 15482 -> 15592 bytes
>  tests/data/acpi/x86/pc/DSDT.cphp              | Bin 9075 -> 9185 bytes
>  tests/data/acpi/x86/pc/DSDT.dimmpxm           | Bin 10265 -> 10375 bytes
>  tests/data/acpi/x86/pc/DSDT.hpbridge          | Bin 8562 -> 8672 bytes
>  tests/data/acpi/x86/pc/DSDT.hpbrroot          | Bin 5100 -> 5210 bytes
>  tests/data/acpi/x86/pc/DSDT.ipmikcs           | Bin 8683 -> 8793 bytes
>  tests/data/acpi/x86/pc/DSDT.memhp             | Bin 9970 -> 10080 bytes
>  tests/data/acpi/x86/pc/DSDT.nohpet            | Bin 8469 -> 8579 bytes
>  tests/data/acpi/x86/pc/DSDT.numamem           | Bin 8617 -> 8727 bytes
>  tests/data/acpi/x86/pc/DSDT.roothp            | Bin 12404 -> 12514 bytes
>  tests/data/acpi/x86/q35/DSDT                  | Bin 8440 -> 8550 bytes
>  tests/data/acpi/x86/q35/DSDT.acpierst         | Bin 8457 -> 8567 bytes
>  tests/data/acpi/x86/q35/DSDT.acpihmat         | Bin 9765 -> 9875 bytes
>  .../data/acpi/x86/q35/DSDT.acpihmat-generic-x | Bin 12650 -> 12760 bytes
>  .../acpi/x86/q35/DSDT.acpihmat-noinitiator    | Bin 8719 -> 8829 bytes
>  tests/data/acpi/x86/q35/DSDT.applesmc         | Bin 8486 -> 8596 bytes
>  tests/data/acpi/x86/q35/DSDT.bridge           | Bin 12053 -> 12163 bytes
>  tests/data/acpi/x86/q35/DSDT.core-count       | Bin 12998 -> 13108 bytes
>  tests/data/acpi/x86/q35/DSDT.core-count2      | Bin 33855 -> 33965 bytes
>  tests/data/acpi/x86/q35/DSDT.cphp             | Bin 8904 -> 9014 bytes
>  tests/data/acpi/x86/q35/DSDT.cxl              | Bin 13231 -> 13341 bytes
>  tests/data/acpi/x86/q35/DSDT.dimmpxm          | Bin 10094 -> 10204 bytes
>  tests/data/acpi/x86/q35/DSDT.ipmibt           | Bin 8515 -> 8625 bytes
>  tests/data/acpi/x86/q35/DSDT.ipmismbus        | Bin 8528 -> 8638 bytes
>  tests/data/acpi/x86/q35/DSDT.ivrs             | Bin 8457 -> 8567 bytes
>  tests/data/acpi/x86/q35/DSDT.memhp            | Bin 9799 -> 9909 bytes
>  tests/data/acpi/x86/q35/DSDT.mmio64           | Bin 9570 -> 9680 bytes
>  tests/data/acpi/x86/q35/DSDT.multi-bridge     | Bin 13293 -> 13403 bytes
>  tests/data/acpi/x86/q35/DSDT.noacpihp         | Bin 8302 -> 8412 bytes
>  tests/data/acpi/x86/q35/DSDT.nohpet           | Bin 8298 -> 8408 bytes
>  tests/data/acpi/x86/q35/DSDT.numamem          | Bin 8446 -> 8556 bytes
>  tests/data/acpi/x86/q35/DSDT.pvpanic-isa      | Bin 8541 -> 8651 bytes
>  tests/data/acpi/x86/q35/DSDT.thread-count     | Bin 12998 -> 13108 bytes
>  tests/data/acpi/x86/q35/DSDT.thread-count2    | Bin 33855 -> 33965 bytes
>  tests/data/acpi/x86/q35/DSDT.tis.tpm12        | Bin 9046 -> 9156 bytes
>  tests/data/acpi/x86/q35/DSDT.tis.tpm2         | Bin 9072 -> 9182 bytes
>  tests/data/acpi/x86/q35/DSDT.type4-count      | Bin 18674 -> 18784 bytes
>  tests/data/acpi/x86/q35/DSDT.viot             | Bin 14697 -> 14807 bytes
>  tests/data/acpi/x86/q35/DSDT.xapic            | Bin 35803 -> 35913 bytes
>  64 files changed, 178 insertions(+), 3 deletions(-)
>  create mode 100644 hw/acpi/control_method_device.c
>  create mode 100644 include/hw/acpi/control_method_device.h
> 



  parent reply	other threads:[~2025-06-03 12:19 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
2025-06-02 14:22     ` Annie Li
2025-06-03 12:18 ` Igor Mammedov [this message]
2025-06-03 19:23   ` [PATCH 00/13] Support ACPI Control Method Sleep button 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=20250603141850.27d2daf0@imammedo.users.ipa.redhat.com \
    --to=imammedo@redhat.com \
    --cc=anisinha@redhat.com \
    --cc=annie.li@oracle.com \
    --cc=armbru@redhat.com \
    --cc=dave@treblig.org \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --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.