Support ACPI Control Method Sleep button
cover Support ACPI Control Method Sleep button
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.
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.
1) https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg06478.html
2) https://lore.kernel.org/all/[email protected]/T/#mfe24f89778020deeacfe45083f3eea3cf9f55961
3) https://lore.kernel.org/all/[email protected]/T/
4) https://patchwork.kernel.org/project/qemu-devel/cover/[email protected]/
5) https://lore.kernel.org/all/[email protected]/
----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
Signature · 1 line
2.43.5
PATCH 1/13 acpi: Implement control method sleep button
The fixed hardware sleep button isn't appropriate for hardware reduced platform. This patch implements the control method sleep button in a separate source file so that the button can be added for various platforms.
--- hw/acpi/control_method_device.c | 38 +++++++++++++++++++++++++ hw/acpi/meson.build | 1 + include/hw/acpi/control_method_device.h | 21 ++++++++++++++ 3 files changed, 60 insertions(+)
hw/acpi/control_method_device.c new file +38 -0
@@ -0,0 +1,38 @@ +/* +* Control Method Device +* +* Copyright (c) 2023 Oracle and/or its affiliates. +* +* +* Authors: +* Annie Li <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "qemu/osdep.h" +#include "hw/acpi/control_method_device.h" +#include "hw/acpi/aml-build.h" + +/* +* The control method sleep button[ACPI v6.5 Section 4.8.2.2.2.2] +* resides in generic hardware address spaces. The sleep button +* is defined as _HID("PNP0C0E") that associates with device "SLPB". +*/ +void acpi_dsdt_add_sleep_button (Aml *scope) +{ +Aml *dev =aml_device (ACPI_SLEEP_BUTTON_DEVICE ); +aml_append (dev,aml_name_decl ("_HID" ,aml_eisaid ("PNP0C0E" ))); +/* +* No _PRW, the sleep button device is always tied to GPE L07 +* event handler for x86 platform, or a GED event for other +* platforms such as virt, ARM, microvm, etc. +*/ +aml_append (dev,aml_operation_region ("\\SLP" ,AML_SYSTEM_IO , +aml_int (0x201 ),0x1 )); +Aml *field =aml_field ("\\SLP" ,AML_BYTE_ACC ,AML_NOLOCK , +AML_WRITE_AS_ZEROS ); +aml_append (field,aml_named_field ("SBP" ,1 )); +aml_append (dev, field); +aml_append (scope, dev); +}
hw/acpi/meson.build +1 -0
@@ -17,6 +17,7 @@ acpi_ss.add(when: 'CONFIG_ACPI_CXL', if_true: files('cxl.c'), if_false: files('c acpi_ss.add(when: 'CONFIG_ACPI_VMGENID', if_true: files('vmgenid.c')) acpi_ss.add(when: 'CONFIG_ACPI_VMCLOCK', if_true: files('vmclock.c')) acpi_ss.add(when: 'CONFIG_ACPI_HW_REDUCED', if_true: files('generic_event_device.c')) +acpi_ss.add(when: 'CONFIG_ACPI_HW_REDUCED', if_true: files('control_method_device.c')) acpi_ss.add(when: 'CONFIG_ACPI_HMAT', if_true: files('hmat.c')) acpi_ss.add(when: 'CONFIG_ACPI_APEI', if_true: files('ghes.c'), if_false: files('ghes-stub.c')) acpi_ss.add(when: 'CONFIG_ACPI_PIIX4', if_true: files('piix4.c'))
include/hw/acpi/control_method_device.h new file +21 -0
@@ -0,0 +1,21 @@ +/* +* Control Method Device +* +* Copyright (c) 2023 Oracle and/or its affiliates. +* +* +* Authors: +* Annie Li <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + + +#ifndef HW_ACPI_CONTROL_METHOD_DEVICE_H +#define HW_ACPI_CONTROL_NETHOD_DEVICE_H + +#define ACPI_SLEEP_BUTTON_DEVICE "SLPB" + +void acpi_dsdt_add_sleep_button (Aml *scope); + +#endif
Signature · 1 line
2.43.5
Re: [PATCH 01/13] acpi: Implement control method sleep button
hw/acpi/control_method_device.c
Quoted 14 lines · On Wed, 28 May 2025 12:38:34 -0400 Annie Li <[email protected]> wrote:
The fixed hardware sleep button isn't appropriate for hardware reduced platform. This patch implements the control method sleep button in a separate source file so that the button can be added for various platforms.
Co-developed-by Miguel Luis <[email protected]>Signed-off-by Annie Li <[email protected]>--- hw/acpi/control_method_device.c | 38 +++++++++++++++++++++++++ hw/acpi/meson.build | 1 + include/hw/acpi/control_method_device.h | 21 ++++++++++++++ 3 files changed, 60 insertions(+)hw/acpi/control_method_device.c +0
-0
sleep_button would be more to the point
Quoted 27 lines
new file mode 100644
index 0000000000..f8d691ee04hw/acpi/control_method_device.c new file +22
-0@@ -0,0 +1,38 @@ +/* +* Control Method Device +* +* Copyright (c) 2023 Oracle and/or its affiliates. +* +* +* Authors: +* Annie Li <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "qemu/osdep.h" +#include "hw/acpi/control_method_device.h" +#include "hw/acpi/aml-build.h" + +/* +* The control method sleep button[ACPI v6.5 Section 4.8.2.2.2.2] +* resides in generic hardware address spaces. The sleep button +* is defined as _HID("PNP0C0E") that associates with device "SLPB". +*/ +void acpi_dsdt_add_sleep_button (Aml *scope)
hw/acpi/control_method_device.c line 32
Quoted 10 lines
hw/acpi/control_method_device.c new file +10
-0+{ +Aml *dev =aml_device (ACPI_SLEEP_BUTTON_DEVICE ); +aml_append (dev,aml_name_decl ("_HID" ,aml_eisaid ("PNP0C0E" ))); +/* +* No _PRW, the sleep button device is always tied to GPE L07 +* event handler for x86 platform, or a GED event for other +* platforms such as virt, ARM, microvm, etc. +*/ +aml_append (dev,aml_operation_region ("\\SLP" ,AML_SYSTEM_IO , +aml_int (0x201 ),0x1 ));
^^^^^^
where does this come from?
Quoted 11 lines
hw/acpi/control_method_device.c new file +6
-0+Aml *field =aml_field ("\\SLP" ,AML_BYTE_ACC ,AML_NOLOCK , +AML_WRITE_AS_ZEROS ); +aml_append (field,aml_named_field ("SBP" ,1 )); +aml_append (dev, field); +aml_append (scope, dev); +}hw/acpi/meson.build +0
-0
hw/acpi/meson.build acpi_ss.add(when: 'CONFIG_ACPI_CXL', if_true: files('cxl.c'), if_false: files('c · line 20
Quoted 4 lines
hw/acpi/meson.build +1
-0@@ -17,6 +17,7 @@ acpi_ss.add(when: 'CONFIG_ACPI_CXL', if_true: files('cxl.c'), if_false: files('c acpi_ss.add(when: 'CONFIG_ACPI_VMGENID', if_true: files('vmgenid.c')) acpi_ss.add(when: 'CONFIG_ACPI_VMCLOCK', if_true: files('vmclock.c')) acpi_ss.add(when: 'CONFIG_ACPI_HW_REDUCED', if_true: files('generic_event_device.c')) +acpi_ss.add(when: 'CONFIG_ACPI_HW_REDUCED', if_true: files('control_method_device.c'))
that would build only for microvm + arm, and pc/q35 wouldn't get it if microvm were disabled.
Quoted 30 lines
hw/acpi/meson.build +0
-0acpi_ss.add(when: 'CONFIG_ACPI_HMAT', if_true: files('hmat.c')) acpi_ss.add(when: 'CONFIG_ACPI_APEI', if_true: files('ghes.c'), if_false: files('ghes-stub.c')) acpi_ss.add(when: 'CONFIG_ACPI_PIIX4', if_true: files('piix4.c'))include/hw/acpi/control_method_device.h new file +21
-0@@ -0,0 +1,21 @@ +/* +* Control Method Device +* +* Copyright (c) 2023 Oracle and/or its affiliates. +* +* +* Authors: +* Annie Li <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + + +#ifndef HW_ACPI_CONTROL_METHOD_DEVICE_H +#define HW_ACPI_CONTROL_NETHOD_DEVICE_H + +#define ACPI_SLEEP_BUTTON_DEVICE "SLPB" + +void acpi_dsdt_add_sleep_button (Aml *scope); + +#endif
Re: [PATCH 01/13] acpi: Implement control method sleep button
Hello Igor,
Quoted 16 lines · Igor Mammedov
Quoted 13 lines · On Wed, 28 May 2025 12:38:34 -0400 Annie Li<[email protected]> wrote:
The fixed hardware sleep button isn't appropriate for hardware reduced platform. This patch implements the control method sleep button in a separate source file so that the button can be added for various platforms.
Co-developed-by Miguel Luis<[email protected]>Signed-off-by Annie Li<[email protected]>--- hw/acpi/control_method_device.c | 38 +++++++++++++++++++++++++ hw/acpi/meson.build | 1 + include/hw/acpi/control_method_device.h | 21 ++++++++++++++ 3 files changed, 60 insertions(+)
Quoted 2 lines
hw/acpi/control_method_device.c
Quoted 1 line
hw/acpi/control_method_device.c +0
-0
sleep_buttonwould be more to the point
Was thinking of more control method devices may be added in future, so choose this general name(control_method_device) just in case. I'll rename it to control_method_sleep_button then.
Quoted 32 lines
Quoted 32 lines
new file mode 100644
index 0000000000..f8d691ee04hw/acpi/control_method_device.c new file +26
-0@@ -0,0 +1,38 @@ +/* +* Control Method Device +* +* Copyright (c) 2023 Oracle and/or its affiliates. +* +* +* Authors: +* Annie Li<[email protected]> +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "qemu/osdep.h" +#include "hw/acpi/control_method_device.h" +#include "hw/acpi/aml-build.h" + +/* +* The control method sleep button[ACPI v6.5 Section 4.8.2.2.2.2] +* resides in generic hardware address spaces. The sleep button +* is defined as _HID("PNP0C0E") that associates with device "SLPB". +*/ +void acpi_dsdt_add_sleep_button (Aml *scope) +{ +Aml *dev =aml_device (ACPI_SLEEP_BUTTON_DEVICE ); +aml_append (dev,aml_name_decl ("_HID" ,aml_eisaid ("PNP0C0E" ))); +/*
Quoted 8 lines
hw/acpi/control_method_device.c line 32
Quoted 6 lines
hw/acpi/control_method_device.c new file +6
-0+* No _PRW, the sleep button device is always tied to GPE L07 +* event handler for x86 platform, or a GED event for other +* platforms such as virt, ARM, microvm, etc. +*/ +aml_append (dev,aml_operation_region ("\\SLP" ,AML_SYSTEM_IO , +aml_int (0x201 ),0x1 ));^^^^^^
where does this come from?
Got it from an example in ACPI spec[ACPI v6.5 Section 4.8.2.2.2.2]. "• Creates an operational region for the control method sleep button’s programming model: System I/O space at 0x201." Any suggestions are welcome.
Quoted 11 lines
Quoted 11 lines
hw/acpi/control_method_device.c new file +6
-0+Aml *field =aml_field ("\\SLP" ,AML_BYTE_ACC ,AML_NOLOCK , +AML_WRITE_AS_ZEROS ); +aml_append (field,aml_named_field ("SBP" ,1 )); +aml_append (dev, field); +aml_append (scope, dev); +}hw/acpi/meson.build +0
-1--- a/hw/acpi/meson.build
Quoted 8 lines
hw/acpi/meson.build acpi_ss.add(when: 'CONFIG_ACPI_CXL', if_true: files('cxl.c'), if_false: files('c · line 20
Quoted 6 lines
+++ b/hw/acpi/meson.build
hw/acpi/meson.build +1
-0@@ -17,6 +17,7 @@ acpi_ss.add(when: 'CONFIG_ACPI_CXL', if_true: files('cxl.c'), if_false: files('c acpi_ss.add(when: 'CONFIG_ACPI_VMGENID', if_true: files('vmgenid.c')) acpi_ss.add(when: 'CONFIG_ACPI_VMCLOCK', if_true: files('vmclock.c')) acpi_ss.add(when: 'CONFIG_ACPI_HW_REDUCED', if_true: files('generic_event_device.c')) +acpi_ss.add(when: 'CONFIG_ACPI_HW_REDUCED', if_true: files('control_method_device.c'))that would build only for microvm + arm, and pc/q35 wouldn't get it if microvm were disabled.
True.
How about the following?
acpi_ss.add(files(
'acpi_interface.c',
'aml-build.c',
'bios-linker-loader.c',
'core.c',
'utils.c',
+'control_method_device.c',
))
Thanks
Annie
Quoted 31 lines
Quoted 31 lines
hw/acpi/meson.build +0
-0acpi_ss.add(when: 'CONFIG_ACPI_HMAT', if_true: files('hmat.c')) acpi_ss.add(when: 'CONFIG_ACPI_APEI', if_true: files('ghes.c'), if_false: files('ghes-stub.c')) acpi_ss.add(when: 'CONFIG_ACPI_PIIX4', if_true: files('piix4.c'))include/hw/acpi/control_method_device.h new file +21
-0@@ -0,0 +1,21 @@ +/* +* Control Method Device +* +* Copyright (c) 2023 Oracle and/or its affiliates. +* +* +* Authors: +* Annie Li<[email protected]> +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + + +#ifndef HW_ACPI_CONTROL_METHOD_DEVICE_H +#define HW_ACPI_CONTROL_NETHOD_DEVICE_H + +#define ACPI_SLEEP_BUTTON_DEVICE "SLPB" + +void acpi_dsdt_add_sleep_button (Aml *scope); + +#endif
Re: [PATCH 01/13] acpi: Implement control method sleep button
Quoted 64 lines · On Tue, 3 Jun 2025 15:08:49 -0400 Annie Li <[email protected]> wrote:
Hello Igor,
Quoted 16 lines · Igor Mammedov
Quoted 13 lines · On Wed, 28 May 2025 12:38:34 -0400 Annie Li<[email protected]> wrote:
The fixed hardware sleep button isn't appropriate for hardware reduced platform. This patch implements the control method sleep button in a separate source file so that the button can be added for various platforms.
Co-developed-by Miguel Luis<[email protected]>Signed-off-by Annie Li<[email protected]>--- hw/acpi/control_method_device.c | 38 +++++++++++++++++++++++++ hw/acpi/meson.build | 1 + include/hw/acpi/control_method_device.h | 21 ++++++++++++++ 3 files changed, 60 insertions(+)Quoted 2 lines
hw/acpi/control_method_device.c
Quoted 1 line
hw/acpi/control_method_device.c +0
-0
sleep_buttonwould be more to the pointWas thinking of more control method devices may be added in future, so choose this general
name(control_method_device)just in case. I'll rename it tocontrol_method_sleep_buttonthen.Quoted 32 lines
Quoted 32 lines
new file mode 100644
index 0000000000..f8d691ee04hw/acpi/control_method_device.c new file +26
-0@@ -0,0 +1,38 @@ +/* +* Control Method Device +* +* Copyright (c) 2023 Oracle and/or its affiliates. +* +* +* Authors: +* Annie Li<[email protected]> +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "qemu/osdep.h" +#include "hw/acpi/control_method_device.h" +#include "hw/acpi/aml-build.h" + +/* +* The control method sleep button[ACPI v6.5 Section 4.8.2.2.2.2] +* resides in generic hardware address spaces. The sleep button +* is defined as _HID("PNP0C0E") that associates with device "SLPB". +*/ +void acpi_dsdt_add_sleep_button (Aml *scope) +{ +Aml *dev =aml_device (ACPI_SLEEP_BUTTON_DEVICE ); +aml_append (dev,aml_name_decl ("_HID" ,aml_eisaid ("PNP0C0E" ))); +/* Quoted 8 lines
hw/acpi/control_method_device.c line 32
Quoted 6 lines
hw/acpi/control_method_device.c new file +6
-0+* No _PRW, the sleep button device is always tied to GPE L07 +* event handler for x86 platform, or a GED event for other +* platforms such as virt, ARM, microvm, etc. +*/ +aml_append (dev,aml_operation_region ("\\SLP" ,AML_SYSTEM_IO , +aml_int (0x201 ),0x1 ));^^^^^^
where does this come from?
Quoted 3 lines
Got it from an example in ACPI spec[ACPI v6.5 Section 4.8.2.2.2.2]. "• Creates an operational region for the control method sleep button’s programming model: System I/O space at
0x201." Any suggestions are welcome.
rather than giving answer, I'd ask
* what it's supposed to do
* does QEMU has this register or its alternative
answers to above likely will help with answering my original question or ideas how to fix patch
Quoted 19 lines
Quoted 11 lines
Quoted 11 lines
hw/acpi/control_method_device.c new file +6
-0+Aml *field =aml_field ("\\SLP" ,AML_BYTE_ACC ,AML_NOLOCK , +AML_WRITE_AS_ZEROS ); +aml_append (field,aml_named_field ("SBP" ,1 )); +aml_append (dev, field); +aml_append (scope, dev); +}hw/acpi/meson.build +0
-1--- a/hw/acpi/meson.buildQuoted 8 lines
hw/acpi/meson.build acpi_ss.add(when: 'CONFIG_ACPI_CXL', if_true: files('cxl.c'), if_false: files('c · line 20
Quoted 6 lines
+++ b/hw/acpi/meson.build
hw/acpi/meson.build +1
-0@@ -17,6 +17,7 @@ acpi_ss.add(when: 'CONFIG_ACPI_CXL', if_true: files('cxl.c'), if_false: files('c acpi_ss.add(when: 'CONFIG_ACPI_VMGENID', if_true: files('vmgenid.c')) acpi_ss.add(when: 'CONFIG_ACPI_VMCLOCK', if_true: files('vmclock.c')) acpi_ss.add(when: 'CONFIG_ACPI_HW_REDUCED', if_true: files('generic_event_device.c')) +acpi_ss.add(when: 'CONFIG_ACPI_HW_REDUCED', if_true: files('control_method_device.c'))that would build only for microvm + arm, and pc/q35 wouldn't get it if microvm were disabled.
Quoted 10 lines
True.
How about the following?
acpi_ss.add(files(
'acpi_interface.c',
'aml-build.c',
'bios-linker-loader.c',
'core.c',
'utils.c',
+'control_method_device.c',
))
perhaps this is better
Quoted 37 lines
Thanks
Annie
Quoted 31 lines
Quoted 31 lines
hw/acpi/meson.build +0
-0acpi_ss.add(when: 'CONFIG_ACPI_HMAT', if_true: files('hmat.c')) acpi_ss.add(when: 'CONFIG_ACPI_APEI', if_true: files('ghes.c'), if_false: files('ghes-stub.c')) acpi_ss.add(when: 'CONFIG_ACPI_PIIX4', if_true: files('piix4.c'))include/hw/acpi/control_method_device.h new file +21
-0@@ -0,0 +1,21 @@ +/* +* Control Method Device +* +* Copyright (c) 2023 Oracle and/or its affiliates. +* +* +* Authors: +* Annie Li<[email protected]> +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + + +#ifndef HW_ACPI_CONTROL_METHOD_DEVICE_H +#define HW_ACPI_CONTROL_NETHOD_DEVICE_H + +#define ACPI_SLEEP_BUTTON_DEVICE "SLPB" + +void acpi_dsdt_add_sleep_button (Aml *scope); + +#endif
PATCH 2/13 test/acpi: allow DSDT table changes for x86 platform
In reply to Annie LiList changed files in tests/qtest/bios-tables-test-allowed-diff.h
--- tests/qtest/bios-tables-test-allowed-diff.h | 42 +++++++++++++++++++++ 1 file changed, 42 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +42 -0
@@ -1 +1,43 @@/* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/x86/pc/DSDT" , +"tests/data/acpi/x86/pc/DSDT.acpierst" , +"tests/data/acpi/x86/pc/DSDT.acpihmat" , +"tests/data/acpi/x86/pc/DSDT.bridge" , +"tests/data/acpi/x86/pc/DSDT.cphp" , +"tests/data/acpi/x86/pc/DSDT.dimmpxm" , +"tests/data/acpi/x86/pc/DSDT.hpbridge" , +"tests/data/acpi/x86/pc/DSDT.hpbrroot" , +"tests/data/acpi/x86/pc/DSDT.ipmikcs" , +"tests/data/acpi/x86/pc/DSDT.memhp" , +"tests/data/acpi/x86/pc/DSDT.nohpet" , +"tests/data/acpi/x86/pc/DSDT.numamem" , +"tests/data/acpi/x86/pc/DSDT.roothp" , +"tests/data/acpi/x86/q35/DSDT" , +"tests/data/acpi/x86/q35/DSDT.acpierst" , +"tests/data/acpi/x86/q35/DSDT.acpihmat" , +"tests/data/acpi/x86/q35/DSDT.acpihmat-generic-x" , +"tests/data/acpi/x86/q35/DSDT.acpihmat-noinitiator" , +"tests/data/acpi/x86/q35/DSDT.applesmc" , +"tests/data/acpi/x86/q35/DSDT.bridge" , +"tests/data/acpi/x86/q35/DSDT.core-count" , +"tests/data/acpi/x86/q35/DSDT.core-count2" , +"tests/data/acpi/x86/q35/DSDT.cphp" , +"tests/data/acpi/x86/q35/DSDT.cxl" , +"tests/data/acpi/x86/q35/DSDT.dimmpxm" , +"tests/data/acpi/x86/q35/DSDT.ipmibt" , +"tests/data/acpi/x86/q35/DSDT.ipmismbus" , +"tests/data/acpi/x86/q35/DSDT.ivrs" , +"tests/data/acpi/x86/q35/DSDT.memhp" , +"tests/data/acpi/x86/q35/DSDT.mmio64" , +"tests/data/acpi/x86/q35/DSDT.multi-bridge" , +"tests/data/acpi/x86/q35/DSDT.noacpihp" , +"tests/data/acpi/x86/q35/DSDT.nohpet" , +"tests/data/acpi/x86/q35/DSDT.numamem" , +"tests/data/acpi/x86/q35/DSDT.pvpanic-isa" , +"tests/data/acpi/x86/q35/DSDT.thread-count" , +"tests/data/acpi/x86/q35/DSDT.thread-count2" , +"tests/data/acpi/x86/q35/DSDT.tis.tpm12" , +"tests/data/acpi/x86/q35/DSDT.tis.tpm2" , +"tests/data/acpi/x86/q35/DSDT.type4-count" , +"tests/data/acpi/x86/q35/DSDT.viot" , +"tests/data/acpi/x86/q35/DSDT.xapic",
Signature · 1 line
2.43.5
PATCH 3/13 acpi: Support Control Method sleep button for x86
In reply to Annie LiAdd Control Method Sleep button and its GPE event handler for x86 platform. The GPE event handler notifies OSPM when the Sleep button event is triggered.
--- hw/i386/acpi-build.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)
hw/i386/acpi-build.c +23 -1
@@ -40,6 +40,7 @@#include "hw/acpi/acpi_aml_interface.h" #include "hw/input/i8042.h" #include "hw/acpi/memory_hotplug.h" +#include "hw/acpi/control_method_device.h" #include "system/tpm.h" #include "hw/acpi/tpm.h" #include "hw/acpi/vmgenid.h"
@@ -1359,7 +1360,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, NULL);Object *q35 =object_resolve_type_unambiguous (TYPE_Q35_HOST_DEVICE ,NULL );CrsRangeEntry *entry; -Aml *dsdt, *sb_scope, *scope, *dev, *method, *field, *pkg, *crs; +Aml *dsdt, *sb_scope, *scope, *dev, *method, *field, *pkg, *crs, *condition;CrsRangeSet crs_range_set;PCMachineState *pcms =PC_MACHINE (machine);PCMachineClass *pcmc =PC_MACHINE_GET_CLASS (machine);
@@ -1465,6 +1466,27 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, }aml_append (dsdt, scope); + sb_scope =aml_scope ("_SB" ); +acpi_dsdt_add_sleep_button (sb_scope); +aml_append (dsdt, sb_scope); + +/* +* The event handler for the control method sleep button is generated +* for notifying OSPM (ACPI v6.5, Section 4.8.2.2.2.2). +*/ + scope =aml_scope ("\\_GPE" ); + method =aml_method ("_L07" ,0 ,AML_NOTSERIALIZED ); + condition =aml_if (aml_name ("\\_SB." ACPI_SLEEP_BUTTON_DEVICE ".SBP" )); +aml_append (condition, +aml_store (aml_int (1 ), +aml_name ("\\_SB." ACPI_SLEEP_BUTTON_DEVICE ".SBP" ))); +aml_append (condition, +aml_notify (aml_name ("\\_SB." ACPI_SLEEP_BUTTON_DEVICE ), +aml_int (0x80 ))); +aml_append (method, condition); +aml_append (scope, method); +aml_append (dsdt, scope); +if (pcmc->legacy_cpu_hotplug) {build_legacy_cpu_hotplug_aml (dsdt, machine, pm->cpu_hp_io_base); }else {
Signature · 1 line
2.43.5
Re: [PATCH 03/13] acpi: Support Control Method sleep button for x86
Quoted 35 lines · On Wed, 28 May 2025 12:39:17 -0400 Annie Li <[email protected]> wrote:
Add Control Method Sleep button and its GPE event handler for x86 platform. The GPE event handler notifies OSPM when the Sleep button event is triggered.
Signed-off-by Annie Li <[email protected]>--- hw/i386/acpi-build.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)hw/i386/acpi-build.c +3
-1@@ -40,6 +40,7 @@#include "hw/acpi/acpi_aml_interface.h" #include "hw/input/i8042.h" #include "hw/acpi/memory_hotplug.h" +#include "hw/acpi/control_method_device.h" #include "system/tpm.h" #include "hw/acpi/tpm.h" #include "hw/acpi/vmgenid.h" @@ -1359,7 +1360,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, NULL);Object *q35 =object_resolve_type_unambiguous (TYPE_Q35_HOST_DEVICE ,NULL );CrsRangeEntry *entry; -Aml *dsdt, *sb_scope, *scope, *dev, *method, *field, *pkg, *crs; +Aml *dsdt, *sb_scope, *scope, *dev, *method, *field, *pkg, *crs, *condition;CrsRangeSet crs_range_set;PCMachineState *pcms =PC_MACHINE (machine);PCMachineClass *pcmc =PC_MACHINE_GET_CLASS (machine);@@ -1465,6 +1466,27 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, }aml_append (dsdt, scope); + sb_scope =aml_scope ("_SB" );
hw/i386/acpi-build.c build_dsdt(GArray *table_data, BIOSLinker *linker, · line 1479
Quoted 10 lines
hw/i386/acpi-build.c +10
-0+acpi_dsdt_add_sleep_button (sb_scope); +aml_append (dsdt, sb_scope); + +/* +* The event handler for the control method sleep button is generated +* for notifying OSPM (ACPI v6.5, Section 4.8.2.2.2.2). +*/ + scope =aml_scope ("\\_GPE" ); + method =aml_method ("_L07" ,0 ,AML_NOTSERIALIZED ); + condition =aml_if (aml_name ("\\_SB." ACPI_SLEEP_BUTTON_DEVICE ".SBP" ));
s/condition/if_ctx/
also use full form 'if something == something' for condtion
hw/i386/acpi-build.c build_dsdt(GArray *table_data, BIOSLinker *linker, · line 1482
Quoted 3 lines
hw/i386/acpi-build.c +3
-0+aml_append (condition, +aml_store (aml_int (1 ), +aml_name ("\\_SB." ACPI_SLEEP_BUTTON_DEVICE ".SBP" )));
so what is handling this write on qemu side?
and why it's here to begin with? (commit says that it sends event to OSMP but nothing about this write)
Quoted 10 lines
hw/i386/acpi-build.c +7
-0+aml_append (condition, +aml_notify (aml_name ("\\_SB." ACPI_SLEEP_BUTTON_DEVICE ), +aml_int (0x80 ))); +aml_append (method, condition); +aml_append (scope, method); +aml_append (dsdt, scope); +if (pcmc->legacy_cpu_hotplug) {build_legacy_cpu_hotplug_aml (dsdt, machine, pm->cpu_hp_io_base); }else {
Re: [PATCH 03/13] acpi: Support Control Method sleep button for x86
Hi Igor,
Quoted 37 lines · Igor Mammedov
Quoted 34 lines · On Wed, 28 May 2025 12:39:17 -0400 Annie Li <[email protected]> wrote:
Add Control Method Sleep button and its GPE event handler for x86 platform. The GPE event handler notifies OSPM when the Sleep button event is triggered.
Signed-off-by Annie Li <[email protected]>--- hw/i386/acpi-build.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)hw/i386/acpi-build.c +2
-1@@ -40,6 +40,7 @@#include "hw/acpi/acpi_aml_interface.h" #include "hw/input/i8042.h" #include "hw/acpi/memory_hotplug.h" +#include "hw/acpi/control_method_device.h" #include "system/tpm.h" #include "hw/acpi/tpm.h" #include "hw/acpi/vmgenid.h" @@ -1359,7 +1360,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, NULL);Object *q35 =object_resolve_type_unambiguous (TYPE_Q35_HOST_DEVICE ,NULL );CrsRangeEntry *entry; -Aml *dsdt, *sb_scope, *scope, *dev, *method, *field, *pkg, *crs; +Aml *dsdt, *sb_scope, *scope, *dev, *method, *field, *pkg, *crs, *condition;CrsRangeSet crs_range_set;PCMachineState *pcms =PC_MACHINE (machine);PCMachineClass *pcmc =PC_MACHINE_GET_CLASS (machine);@@ -1465,6 +1466,27 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, }aml_append (dsdt, scope);
Quoted 13 lines
hw/i386/acpi-build.c build_dsdt(GArray *table_data, BIOSLinker *linker, · line 1479
Quoted 11 lines
hw/i386/acpi-build.c +11
-0+ sb_scope =aml_scope ("_SB" ); +acpi_dsdt_add_sleep_button (sb_scope); +aml_append (dsdt, sb_scope); + +/* +* The event handler for the control method sleep button is generated +* for notifying OSPM (ACPI v6.5, Section 4.8.2.2.2.2). +*/ + scope =aml_scope ("\\_GPE" ); + method =aml_method ("_L07" ,0 ,AML_NOTSERIALIZED ); + condition =aml_if (aml_name ("\\_SB." ACPI_SLEEP_BUTTON_DEVICE ".SBP" ));s/condition/if_ctx/
also use full form 'if something == something' for condtion
Implemented based on the spec, will look into it.
Quoted 5 lines
hw/i386/acpi-build.c build_dsdt(GArray *table_data, BIOSLinker *linker, · line 1482
Quoted 4 lines
hw/i386/acpi-build.c +3
-0+aml_append (condition, +aml_store (aml_int (1 ), +aml_name ("\\_SB." ACPI_SLEEP_BUTTON_DEVICE ".SBP" )));so what is handling this write on qemu side?
Qemu only triggers the GPE event for x86 or GED event for reduced hardware platforms to notify OSPM to go to sleep. However, no writing operation has been done corresponding to the above clearing.
Per the spec,
"When this bit is set it is the responsibility of the AML code to clear it ". Since GPE/GED events are being sent to notify the OSPM, I am wondering if handling this write is needed on qemu side? or just removing this clearing operation above?
Quoted 1 line
and why it's here to begin with? (commit says that it sends event to OSMP but nothing about this write)
Added this to clear sleep button status per the spec.
Thanks
Annie
Quoted 11 lines
Quoted 11 lines
hw/i386/acpi-build.c +7
-0+aml_append (condition, +aml_notify (aml_name ("\\_SB." ACPI_SLEEP_BUTTON_DEVICE ), +aml_int (0x80 ))); +aml_append (method, condition); +aml_append (scope, method); +aml_append (dsdt, scope); +if (pcmc->legacy_cpu_hotplug) {build_legacy_cpu_hotplug_aml (dsdt, machine, pm->cpu_hp_io_base); }else {
PATCH 4/13 tests/qtest/bios-table-tests: Update ACPI table binaries for x86
In reply to Annie LiFollowing is the diff generated by the step 5 and 6 in tests/qtest/bios-tables-test.c
Diff from iasl to show changes in DSDT table:
@@ -1,30 +1,30 @@
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20210604 (64-bit version)
* Copyright (c) 2000 - 2021 Intel Corporation
*
* Disassembling to symbolic ASL+ operators
*
* Disassembly of tests/data/acpi/x86/q35/DSDT, Tue May 27 15:40:59 2025 *
* Original Table Header:
* Signature "DSDT"
- * Length 0x000020F8 (8440)
+ * Length 0x00002166 (8550)
* Revision 0x01 **** 32-bit table (V1), no 64-bit math support
- * Checksum 0xBE
+ * Checksum 0x1E
* OEM ID "BOCHS "
* OEM Table ID "BXPC "
* OEM Revision 0x00000001 (1)
* Compiler ID "BXPC"
* Compiler Version 0x00000001 (1)
*/
DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ", 0x00000001)
{
Scope (\)
{
OperationRegion (DBG, SystemIO, 0x0402, One)
Field (DBG, ByteAcc, NoLock, Preserve)
{
DBGB, 8
}@@ -2852,32 +2852,57 @@
{
Memory32Fixed (ReadOnly,
0xFED00000, // Address Base
0x00000400, // Address Length
)
})
}
}
Scope (_GPE)
{
Name (_HID, "ACPI0006" /* GPE Block Device */) // _HID: Hardware ID
}
Scope (_SB)
{
+ Device (SLPB)
+ {
+ Name (_HID, EisaId ("PNP0C0E") /* Sleep Button Device */) // _HID: Hardware ID
+ OperationRegion (\SLP, SystemIO, 0x0201, One)
+ Field (\SLP, ByteAcc, NoLock, WriteAsZeros)
+ {+ SBP, 1
+ }
+ }
+ }
+
+ Scope (\_GPE)
+ {
+ Method (_L07, 0, NotSerialized) // _Lxx: Level-Triggered GPE, xx=0x00-0xFF
+ {
+ If (\_SB.SLPB.SBP)
+ {
+ \_SB.SLPB.SBP = One
+ Notify (\_SB.SLPB, 0x80) // Status Change
+ }
+ }
+ }
+
+ Scope (_SB)
+ {
Device (\_SB.PCI0.PRES)
{
Name (_HID, EisaId ("PNP0A06") /* Generic Container Device */) // _HID: Hardware ID
Name (_UID, "CPU Hotplug resources") // _UID: Unique ID
Mutex (CPLK, 0x00)
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
{
IO (Decode16,
0x0CD8, // Range Minimum
0x0CD8, // Range Maximum
0x01, // Alignment
0x0C, // Length
)
})
OperationRegion (PRST, SystemIO, 0x0CD8, 0x0C)
Field (PRST, ByteAcc, NoLock, WriteAsZeros)--- 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 tests/qtest/bios-tables-test-allowed-diff.h | 42 ------------------ 43 files changed, 42 deletions(-)
tests/data/acpi/x86/pc/DSDT binary +0 -0
tests/data/acpi/x86/pc/DSDT.acpierst binary +0 -0
tests/data/acpi/x86/pc/DSDT.acpihmat binary +0 -0
tests/data/acpi/x86/pc/DSDT.bridge binary +0 -0
tests/data/acpi/x86/pc/DSDT.cphp binary +0 -0
tests/data/acpi/x86/pc/DSDT.dimmpxm binary +0 -0
tests/data/acpi/x86/pc/DSDT.hpbridge binary +0 -0
tests/data/acpi/x86/pc/DSDT.hpbrroot binary +0 -0
tests/data/acpi/x86/pc/DSDT.ipmikcs binary +0 -0
tests/data/acpi/x86/pc/DSDT.memhp binary +0 -0
tests/data/acpi/x86/pc/DSDT.nohpet binary +0 -0
tests/data/acpi/x86/pc/DSDT.numamem binary +0 -0
tests/data/acpi/x86/pc/DSDT.roothp binary +0 -0
tests/data/acpi/x86/q35/DSDT binary +0 -0
tests/data/acpi/x86/q35/DSDT.acpierst binary +0 -0
tests/data/acpi/x86/q35/DSDT.acpihmat binary +0 -0
tests/data/acpi/x86/q35/DSDT.acpihmat-generic-x binary +0 -0
tests/data/acpi/x86/q35/DSDT.acpihmat-noinitiator binary +0 -0
tests/data/acpi/x86/q35/DSDT.applesmc binary +0 -0
tests/data/acpi/x86/q35/DSDT.bridge binary +0 -0
tests/data/acpi/x86/q35/DSDT.core-count binary +0 -0
tests/data/acpi/x86/q35/DSDT.core-count2 binary +0 -0
tests/data/acpi/x86/q35/DSDT.cphp binary +0 -0
tests/data/acpi/x86/q35/DSDT.cxl binary +0 -0
tests/data/acpi/x86/q35/DSDT.dimmpxm binary +0 -0
tests/data/acpi/x86/q35/DSDT.ipmibt binary +0 -0
tests/data/acpi/x86/q35/DSDT.ipmismbus binary +0 -0
tests/data/acpi/x86/q35/DSDT.ivrs binary +0 -0
tests/data/acpi/x86/q35/DSDT.memhp binary +0 -0
tests/data/acpi/x86/q35/DSDT.mmio64 binary +0 -0
tests/data/acpi/x86/q35/DSDT.multi-bridge binary +0 -0
tests/data/acpi/x86/q35/DSDT.noacpihp binary +0 -0
tests/data/acpi/x86/q35/DSDT.nohpet binary +0 -0
tests/data/acpi/x86/q35/DSDT.numamem binary +0 -0
tests/data/acpi/x86/q35/DSDT.pvpanic-isa binary +0 -0
tests/data/acpi/x86/q35/DSDT.thread-count binary +0 -0
tests/data/acpi/x86/q35/DSDT.thread-count2 binary +0 -0
tests/data/acpi/x86/q35/DSDT.tis.tpm12 binary +0 -0
tests/data/acpi/x86/q35/DSDT.tis.tpm2 binary +0 -0
tests/data/acpi/x86/q35/DSDT.type4-count binary +0 -0
tests/data/acpi/x86/q35/DSDT.viot binary +0 -0
tests/data/acpi/x86/q35/DSDT.xapic binary +0 -0
tests/qtest/bios-tables-test-allowed-diff.h +0 -42
43 lines not on this page · raw message
Signature · 1 line
2.43.5
PATCH 5/13 acpi: Send the GPE event of sleep for x86
In reply to Annie LiThe GPE event is triggered to notify x86 guest to sleep itself. The function acpi_send_sleep_event will also trigger GED events on HW-reduced systems where ACPI GED sleep event is supported.
--- hw/acpi/core.c | 12 ++++++++++++ include/hw/acpi/acpi.h | 1 + include/hw/acpi/acpi_dev_interface.h | 1 + 3 files changed, 14 insertions(+)
hw/acpi/core.c +12 -0
@@ -359,6 +359,18 @@ int acpi_get_slic_oem(AcpiSlicOem *oem)return -1 ; } +void acpi_send_sleep_event (void ) +{ +bool ambiguous; +Object *obj =object_resolve_path_type ("" ,TYPE_ACPI_DEVICE_IF , &ambiguous); + +assert (!ambiguous); +if (obj) { +/* Send sleep event */ +acpi_send_event (DEVICE (obj),ACPI_SLEEP_STATUS ); + } +} +static void acpi_notify_wakeup (Notifier *notifier,void *data) {ACPIREGS *ar =container_of (notifier,ACPIREGS , wakeup);
include/hw/acpi/acpi.h +1 -0
@@ -184,6 +184,7 @@ uint32_t acpi_gpe_ioport_readb(ACPIREGS *ar, uint32_t addr);void acpi_send_gpe_event (ACPIREGS *ar,qemu_irq irq,AcpiEventStatusBits status); +void acpi_send_sleep_event (void );void acpi_update_sci (ACPIREGS *acpi_regs,qemu_irq irq);
include/hw/acpi/acpi_dev_interface.h +1 -0
@@ -13,6 +13,7 @@ typedef enum {ACPI_NVDIMM_HOTPLUG_STATUS =16 ,ACPI_VMGENID_CHANGE_STATUS =32 ,ACPI_POWER_DOWN_STATUS =64 , +ACPI_SLEEP_STATUS =128 , } AcpiEventStatusBits;#define TYPE_ACPI_DEVICE_IF "acpi-device-interface"
Signature · 1 line
2.43.5
Re: [PATCH 05/13] acpi: Send the GPE event of sleep for x86
Quoted 17 lines · On Wed, 28 May 2025 12:39:52 -0400 Annie Li <[email protected]> wrote:
The GPE event is triggered to notify x86 guest to sleep itself. The function
acpi_send_sleep_eventwill also trigger GED events on HW-reduced systems where ACPI GED sleep event is supported.Signed-off-by Annie Li <[email protected]>--- hw/acpi/core.c | 12 ++++++++++++ include/hw/acpi/acpi.h | 1 + include/hw/acpi/acpi_dev_interface.h | 1 + 3 files changed, 14 insertions(+)hw/acpi/core.c +0
-0
hw/acpi/core.c int acpi_get_slic_oem(AcpiSlicOem *oem) · line 368
Quoted 10 lines
hw/acpi/core.c +7
-0@@ -359,6 +359,18 @@ int acpi_get_slic_oem(AcpiSlicOem *oem)return -1 ; } +void acpi_send_sleep_event (void ) +{ +bool ambiguous; +Object *obj =object_resolve_path_type ("" ,TYPE_ACPI_DEVICE_IF , &ambiguous); + +assert (!ambiguous); +if (obj) {
Can it ever be NULL?
If not drop condition.
Quoted 32 lines
hw/acpi/core.c +5
-0+/* Send sleep event */ +acpi_send_event (DEVICE (obj),ACPI_SLEEP_STATUS ); + } +} +static void acpi_notify_wakeup (Notifier *notifier,void *data) {ACPIREGS *ar =container_of (notifier,ACPIREGS , wakeup);include/hw/acpi/acpi.h +1
-0@@ -184,6 +184,7 @@ uint32_t acpi_gpe_ioport_readb(ACPIREGS *ar, uint32_t addr);void acpi_send_gpe_event (ACPIREGS *ar,qemu_irq irq,AcpiEventStatusBits status); +void acpi_send_sleep_event (void );void acpi_update_sci (ACPIREGS *acpi_regs,qemu_irq irq);include/hw/acpi/acpi_dev_interface.h +1
-0@@ -13,6 +13,7 @@ typedef enum {ACPI_NVDIMM_HOTPLUG_STATUS =16 ,ACPI_VMGENID_CHANGE_STATUS =32 ,ACPI_POWER_DOWN_STATUS =64 , +ACPI_SLEEP_STATUS =128 , } AcpiEventStatusBits;#define TYPE_ACPI_DEVICE_IF "acpi-device-interface"
Re: [PATCH 05/13] acpi: Send the GPE event of sleep for x86
Hi Igor,
Quoted 23 lines · Igor Mammedov
Quoted 20 lines · On Wed, 28 May 2025 12:39:52 -0400 Annie Li <[email protected]> wrote:
The GPE event is triggered to notify x86 guest to sleep itself. The function
acpi_send_sleep_eventwill also trigger GED events on HW-reduced systems where ACPI GED sleep event is supported.Signed-off-by Annie Li <[email protected]>--- hw/acpi/core.c | 12 ++++++++++++ include/hw/acpi/acpi.h | 1 + include/hw/acpi/acpi_dev_interface.h | 1 + 3 files changed, 14 insertions(+)hw/acpi/core.c +0
-0@@ -359,6 +359,18 @@ int acpi_get_slic_oem(AcpiSlicOem *oem)return -1 ; }
Quoted 9 lines
hw/acpi/core.c int acpi_get_slic_oem(AcpiSlicOem *oem) · line 368
Quoted 7 lines
hw/acpi/core.c +7
-0+void acpi_send_sleep_event (void ) +{ +bool ambiguous; +Object *obj =object_resolve_path_type ("" ,TYPE_ACPI_DEVICE_IF , &ambiguous); + +assert (!ambiguous); +if (obj) {Can it ever be NULL?
If not drop condition.
assert happens earlier if it is NULL.
will drop it.
Thanks
Annie
Quoted 33 lines
Quoted 33 lines
hw/acpi/core.c +5
-0+/* Send sleep event */ +acpi_send_event (DEVICE (obj),ACPI_SLEEP_STATUS ); + } +} +static void acpi_notify_wakeup (Notifier *notifier,void *data) {ACPIREGS *ar =container_of (notifier,ACPIREGS , wakeup);include/hw/acpi/acpi.h +1
-0@@ -184,6 +184,7 @@ uint32_t acpi_gpe_ioport_readb(ACPIREGS *ar, uint32_t addr);void acpi_send_gpe_event (ACPIREGS *ar,qemu_irq irq,AcpiEventStatusBits status); +void acpi_send_sleep_event (void );void acpi_update_sci (ACPIREGS *acpi_regs,qemu_irq irq);include/hw/acpi/acpi_dev_interface.h +1
-0@@ -13,6 +13,7 @@ typedef enum {ACPI_NVDIMM_HOTPLUG_STATUS =16 ,ACPI_VMGENID_CHANGE_STATUS =32 ,ACPI_POWER_DOWN_STATUS =64 , +ACPI_SLEEP_STATUS =128 , } AcpiEventStatusBits;#define TYPE_ACPI_DEVICE_IF "acpi-device-interface"
PATCH 6/13 test/acpi: allow DSDT table changes for microvm
In reply to Annie LiList changed files in tests/qtest/bios-tables-test-allowed-diff.h
--- tests/qtest/bios-tables-test-allowed-diff.h | 5 +++++ 1 file changed, 5 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +5 -0
@@ -1 +1,6 @@/* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/x86/microvm/DSDT" , +"tests/data/acpi/x86/microvm/DSDT.ioapic2" , +"tests/data/acpi/x86/microvm/DSDT.pcie" , +"tests/data/acpi/x86/microvm/DSDT.rtc" , +"tests/data/acpi/x86/microvm/DSDT.usb",
Signature · 1 line
2.43.5
PATCH 7/13 microvm: Add ACPI Control Method Sleep Button
In reply to Annie LiAdd the support of ACPI Control Method Sleep Button and System S3 Sleeping State for microvm.
--- hw/i386/acpi-microvm.c | 13 ++++++++++++- include/hw/acpi/generic_event_device.h | 1 + 2 files changed, 13 insertions(+), 1 deletion(-)
hw/i386/acpi-microvm.c +12 -1
@@ -32,6 +32,7 @@#include "hw/acpi/generic_event_device.h" #include "hw/acpi/utils.h" #include "hw/acpi/erst.h" +#include "hw/acpi/control_method_device.h" #include "hw/i386/fw_cfg.h" #include "hw/i386/microvm.h" #include "hw/pci/pci.h"
@@ -123,12 +124,22 @@ build_dsdt_microvm(GArray *table_data, BIOSLinker *linker,build_ged_aml (sb_scope,GED_DEVICE , x86ms->acpi_dev,GED_MMIO_IRQ ,AML_SYSTEM_MEMORY ,GED_MMIO_BASE );acpi_dsdt_add_power_button (sb_scope); +acpi_dsdt_add_sleep_button (sb_scope);acpi_dsdt_add_virtio (sb_scope, mms);acpi_dsdt_add_xhci (sb_scope, mms);acpi_dsdt_add_pci (sb_scope, mms);aml_append (dsdt, sb_scope); -/* ACPI 5.0: Table 7-209 System State Package */ +/* ACPI 6.5, Table 7.11: System State Package */ + scope =aml_scope ("\\" ); + pkg =aml_package (4 ); +aml_append (pkg,aml_int (ACPI_GED_SLP_TYP_S3 )); +aml_append (pkg,aml_int (0 ));/* ignored */ +aml_append (pkg,aml_int (0 ));/* reserved */ +aml_append (pkg,aml_int (0 ));/* reserved */ +aml_append (scope,aml_name_decl ("_S3" , pkg)); +aml_append (dsdt, scope); + scope =aml_scope ("\\" ); pkg =aml_package (4 );aml_append (pkg,aml_int (ACPI_GED_SLP_TYP_S5 ));
include/hw/acpi/generic_event_device.h +1 -0
@@ -85,6 +85,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(AcpiGedState, ACPI_GED)#define ACPI_GED_SLP_TYP_POS 0x2/* SLP_TYPx Bit Offset */ #define ACPI_GED_SLP_TYP_MASK 0x07/* SLP_TYPx 3-bit mask */ #define ACPI_GED_SLP_TYP_S5 0x05/* System _S5 State (Soft Off) */ +#define ACPI_GED_SLP_TYP_S3 0x03/* System _S3 State (Sleeping State) */ #define ACPI_GED_SLP_EN 0x20/* SLP_EN write-only bit */ #define GED_DEVICE "GED"
Signature · 1 line
2.43.5
PATCH 8/13 hw/acpi: Add ACPI GED support for the sleep event
In reply to Annie LiFrom: Miguel Luis <[email protected]>
Add support for ACPI GED sleep event on the ACPI device interface so that HW-reduced systems can enable guests to sleep.
--- hw/acpi/generic_event_device.c | 9 +++++++++ include/hw/acpi/generic_event_device.h | 1 + 2 files changed, 10 insertions(+)
hw/acpi/generic_event_device.c +9 -0
@@ -13,6 +13,7 @@#include "qapi/error.h" #include "hw/acpi/acpi.h" #include "hw/acpi/generic_event_device.h" +#include "hw/acpi/control_method_device.h" #include "hw/irq.h" #include "hw/mem/pc-dimm.h" #include "hw/mem/nvdimm.h"
@@ -26,6 +27,7 @@ static const uint32_t ged_supported_events[] = {ACPI_GED_PWR_DOWN_EVT ,ACPI_GED_NVDIMM_HOTPLUG_EVT ,ACPI_GED_CPU_HOTPLUG_EVT , + ACPI_GED_SLEEP_EVT, };/*
@@ -121,6 +123,11 @@ void build_ged_aml(Aml *table, const char *name, HotplugHandler *hotplug_dev,aml_notify (aml_name ("\\_SB.NVDR" ), aml_int(0x80)));break ; +case ACPI_GED_SLEEP_EVT : +aml_append (if_ctx, +aml_notify (aml_name (ACPI_SLEEP_BUTTON_DEVICE ), +aml_int (0x80 ))); +break ;default :/* * Please make sure all the events in ged_supported_events[]
@@ -295,6 +302,8 @@ static void acpi_ged_send_event(AcpiDeviceIf *adev, AcpiEventStatusBits ev) sel =ACPI_GED_MEM_HOTPLUG_EVT ; }else if (ev &ACPI_POWER_DOWN_STATUS ) { sel =ACPI_GED_PWR_DOWN_EVT ; + }else if (ev &ACPI_SLEEP_STATUS ) { + sel =ACPI_GED_SLEEP_EVT ; }else if (ev &ACPI_NVDIMM_HOTPLUG_STATUS ) { sel =ACPI_GED_NVDIMM_HOTPLUG_EVT ; }else if (ev &ACPI_CPU_HOTPLUG_STATUS ) {
include/hw/acpi/generic_event_device.h +1 -0
@@ -102,6 +102,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(AcpiGedState, ACPI_GED)#define ACPI_GED_PWR_DOWN_EVT 0x2#define ACPI_GED_NVDIMM_HOTPLUG_EVT 0x4#define ACPI_GED_CPU_HOTPLUG_EVT 0x8 +#define ACPI_GED_SLEEP_EVT 0x10 typedef struct GEDState { MemoryRegion evt;
Signature · 1 line
2.43.5
PATCH 9/13 microvm: enable sleep GED event
In reply to Annie LiThe sleep GED event is enabled for microvm. Also, the system suspend is enabled when the GED register is set for sleep.
--- hw/i386/microvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
hw/i386/microvm.c +2 -1
@@ -205,7 +205,8 @@ static void microvm_devices_init(MicrovmMachineState *mms)/* Optional and legacy devices */ if (x86_machine_is_acpi_enabled (x86ms)) {DeviceState *dev =qdev_new (TYPE_ACPI_GED ); -qdev_prop_set_uint32 (dev,"ged-event" ,ACPI_GED_PWR_DOWN_EVT ); +qdev_prop_set_uint32 (dev,"ged-event" , +ACPI_GED_PWR_DOWN_EVT |ACPI_GED_SLEEP_EVT );sysbus_realize (SYS_BUS_DEVICE (dev), &error_fatal);sysbus_mmio_map (SYS_BUS_DEVICE (dev),0 ,GED_MMIO_BASE );/* sysbus_mmio_map(SYS_BUS_DEVICE(dev), 1, GED_MMIO_BASE_MEMHP); */
Signature · 1 line
2.43.5
PATCH 10/13 tests/qtest/bios-table-tests: Update ACPI table binaries for microvm
In reply to Annie LiFollowing is the diff generated by the step 5 and 6 in tests/qtest/bios-tables-test.c
Diff from iasl to show changes in DSDT table:
@@ -1,30 +1,30 @@
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20210604 (64-bit version)
* Copyright (c) 2000 - 2021 Intel Corporation
*
* Disassembling to symbolic ASL+ operators
*
* Disassembly of tests/data/acpi/x86/microvm/DSDT, Tue May 27 16:20:08 2025 *
* Original Table Header:
* Signature "DSDT"
- * Length 0x0000016D (365)
+ * Length 0x000001BA (442)
* Revision 0x02
- * Checksum 0x11
+ * Checksum 0xD5
* OEM ID "BOCHS "
* OEM Table ID "BXPC "
* OEM Revision 0x00000001 (1)
* Compiler ID "BXPC"
* Compiler Version 0x00000001 (1)
*/
DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPC ", 0x00000001)
{
Scope (_SB)
{
Device (FWCF)
{
Name (_HID, "QEMU0002") // _HID: Hardware ID
Name (_STA, 0x0B) // _STA: Status
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
{
@@ -66,56 +66,82 @@
0x00000009,
}
})
OperationRegion (EREG, SystemMemory, 0xFEA00000, 0x04)
Field (EREG, DWordAcc, NoLock, WriteAsZeros)
{
ESEL, 32
}
Method (_EVT, 1, Serialized) // _EVT: Event
{
Local0 = ESEL /* \_SB_.GED_.ESEL */
If (((Local0 & 0x02) == 0x02))
{
Notify (PWRB, 0x80) // Status Change
}+
+ If (((Local0 & 0x10) == 0x10))
+ {
+ Notify (SLPB, 0x80) // Status Change
+ }
}
}
Device (PWRB)
{
Name (_HID, "PNP0C0C" /* Power Button Device */) // _HID: Hardware ID
Name (_UID, Zero) // _UID: Unique ID
}+ Device (SLPB)
+ {
+ Name (_HID, EisaId ("PNP0C0E") /* Sleep Button Device */) // _HID: Hardware ID
+ OperationRegion (\SLP, SystemIO, 0x0201, One)
+ Field (\SLP, ByteAcc, NoLock, WriteAsZeros)
+ {+ SBP, 1
+ }
+ }
+
Device (VR07)
{
Name (_HID, "LNRO0005") // _HID: Hardware ID
Name (_UID, 0x07) // _UID: Unique ID
Name (_CCA, One) // _CCA: Cache Coherency Attribute
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
{
Memory32Fixed (ReadWrite,
0xFEB00E00, // Address Base
0x00000200, // Address Length
)
Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
{
0x00000017,
}
})
}
}
Scope (\)
{
+ Name (_S3, Package (0x04) // _S3_: S3 System State
+ {
+ 0x03,
+ Zero,
+ Zero,
+ Zero+ })
+ }
+
+ Scope (\)
+ {
Name (_S5, Package (0x04) // _S5_: S5 System State
{
0x05,
Zero,
Zero,
Zero
})
}}
--- 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/qtest/bios-tables-test-allowed-diff.h | 5 ----- 6 files changed, 5 deletions(-)
tests/data/acpi/x86/microvm/DSDT binary +0 -0
tests/data/acpi/x86/microvm/DSDT.ioapic2 binary +0 -0
tests/data/acpi/x86/microvm/DSDT.pcie binary +0 -0
tests/data/acpi/x86/microvm/DSDT.rtc binary +0 -0
tests/data/acpi/x86/microvm/DSDT.usb binary +0 -0
tests/qtest/bios-tables-test-allowed-diff.h +0 -5
@@ -1,6 +1 @@/* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/x86/microvm/DSDT" , -"tests/data/acpi/x86/microvm/DSDT.ioapic2" , -"tests/data/acpi/x86/microvm/DSDT.pcie" , -"tests/data/acpi/x86/microvm/DSDT.rtc" , -"tests/data/acpi/x86/microvm/DSDT.usb",
Signature · 1 line
2.43.5
PATCH 11/13 microvm: suspend the system as requested
In reply to Annie LiOnce the microvm guest requests to go to sleep state and sets the GED register with S3 type, QEMU needs to continue suspending the system.
--- hw/acpi/generic_event_device.c | 3 +++ 1 file changed, 3 insertions(+)
hw/acpi/generic_event_device.c +3 -0
@@ -213,6 +213,9 @@ static void ged_regs_write(void *opaque, hwaddr addr, uint64_t data,if (slp_en && slp_typ ==ACPI_GED_SLP_TYP_S5 ) {qemu_system_shutdown_request (SHUTDOWN_CAUSE_GUEST_SHUTDOWN ); } +if (slp_en && slp_typ ==ACPI_GED_SLP_TYP_S3 ) { +qemu_system_suspend_request (); + }return ;case ACPI_GED_REG_SLEEP_STS :return ;
Signature · 1 line
2.43.5
PATCH 12/13 microvm: enable suspend
In reply to Annie LiThe function qemu_wakeup_suspend_enabled combines the suspend and wakeup together. However, the microvm doesn't support wakeup yet. Suspend is enabled here, but wakeup doesn't actually work for microvm now.
--- hw/i386/microvm.c | 1 + 1 file changed, 1 insertion(+)
hw/i386/microvm.c +1 -0
@@ -489,6 +489,7 @@ static void microvm_machine_state_init(MachineState *machine)qemu_add_machine_init_done_notifier (&mms->machine_done); mms->powerdown_req.notify = microvm_powerdown_req;qemu_register_powerdown_notifier (&mms->powerdown_req); +qemu_register_wakeup_support ();microvm_memory_init (mms);
Signature · 1 line
2.43.5
Re: [PATCH 12/13] microvm: enable suspend
Quoted 4 lines · On Wed, 28 May 2025 12:42:03 -0400 Annie Li <[email protected]> wrote:
The function
qemu_wakeup_suspend_enabledcombines the suspend and wakeup together. However, the microvm doesn't support wakeup yet. Suspend is enabled here, but wakeup doesn't actually work for microvm now.
why wakeup doesn't work?
Quoted 18 lines
Signed-off-by Annie Li <[email protected]>--- hw/i386/microvm.c | 1 + 1 file changed, 1 insertion(+)hw/i386/microvm.c +1
-0@@ -489,6 +489,7 @@ static void microvm_machine_state_init(MachineState *machine)qemu_add_machine_init_done_notifier (&mms->machine_done); mms->powerdown_req.notify = microvm_powerdown_req;qemu_register_powerdown_notifier (&mms->powerdown_req); +qemu_register_wakeup_support ();microvm_memory_init (mms);
Re: [PATCH 12/13] microvm: enable suspend
Hi Igor,
Quoted 8 lines · Igor Mammedov
Quoted 4 lines · On Wed, 28 May 2025 12:42:03 -0400 Annie Li <[email protected]> wrote:
The function
qemu_wakeup_suspend_enabledcombines the suspend and wakeup together. However, the microvm doesn't support wakeup yet. Suspend is enabled here, but wakeup doesn't actually work for microvm now.why wakeup doesn't work?
Microvm is missing the support for wakeup now, such as, wakeup notifier, the sleep status needs to be set, etc.
Details are in "Table 4.20: Sleep Status Register" in ACPI spec 6.5.
I've only covered the sleep support for microvm since this patch focuses on the sleep button.
Thanks
Annie
Quoted 18 lines
Quoted 18 lines
Signed-off-by Annie Li <[email protected]>--- hw/i386/microvm.c | 1 + 1 file changed, 1 insertion(+)hw/i386/microvm.c +1
-0@@ -489,6 +489,7 @@ static void microvm_machine_state_init(MachineState *machine)qemu_add_machine_init_done_notifier (&mms->machine_done); mms->powerdown_req.notify = microvm_powerdown_req;qemu_register_powerdown_notifier (&mms->powerdown_req); +qemu_register_wakeup_support ();microvm_memory_init (mms);
Re: [PATCH 12/13] microvm: enable suspend
Quoted 6 lines · On Tue, 3 Jun 2025 15:22:27 -0400 Annie Li <[email protected]> wrote:
Hi Igor,
Quoted 3 lines · Igor Mammedov
On Wed, 28 May 2025 12:42:03 -0400
Annie Li <[email protected]> wrote:
Quoted 8 lines
Quoted 5 lines
Quoted 4 lines
The function
qemu_wakeup_suspend_enabledcombines the suspend and wakeup together. However, the microvm doesn't support wakeup yet. Suspend is enabled here, but wakeup doesn't actually work for microvm now.why wakeup doesn't work?
Microvm is missing the support for wakeup now, such as, wakeup notifier, the sleep status needs to be set, etc.
Details are in "Table 4.20: Sleep Status Register" in ACPI spec 6.5.
how hard would it be to implement wakeup in microvm?
Quoted 26 lines
I've only covered the sleep support for microvm since this patch focuses on the sleep button.
Thanks
Annie
Quoted 18 lines
Quoted 18 lines
Signed-off-by Annie Li <[email protected]>--- hw/i386/microvm.c | 1 + 1 file changed, 1 insertion(+)hw/i386/microvm.c +1
-0@@ -489,6 +489,7 @@ static void microvm_machine_state_init(MachineState *machine)qemu_add_machine_init_done_notifier (&mms->machine_done); mms->powerdown_req.notify = microvm_powerdown_req;qemu_register_powerdown_notifier (&mms->powerdown_req); +qemu_register_wakeup_support ();microvm_memory_init (mms);
PATCH 13/13 acpi: hmp/qmp: Add hmp/qmp support for system_sleep
In reply to Annie LiFollowing 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.
--- hmp-commands.hx | 14 ++++++++++++++ hw/core/machine-hmp-cmds.c | 5 +++++ hw/core/machine-qmp-cmds.c | 11 +++++++++++ include/monitor/hmp.h | 1 + qapi/machine.json | 20 ++++++++++++++++++++ qapi/pragma.json | 1 + 6 files changed, 52 insertions(+)
hmp-commands.hx +14 -0
@@ -639,6 +639,20 @@ SRST whether profiling is on or off. ERST + { + .name = "system_sleep", + .args_type = "", + .params = "", + .help = "send system sleep event", + .cmd = hmp_system_sleep, + }, + +SRST +``system_sleep`` + Push the virtual sleep button; if supported, the system will enter + an ACPI sleep state. +ERST + { .name = "system_reset", .args_type = "",
hw/core/machine-hmp-cmds.c +5 -0
@@ -189,6 +189,11 @@ void hmp_system_reset(Monitor *mon, const QDict *qdict)qmp_system_reset (NULL ); } +void hmp_system_sleep (Monitor *mon,const QDict *qdict) +{ +qmp_system_sleep (NULL ); +} +void hmp_system_powerdown (Monitor *mon,const QDict *qdict) {qmp_system_powerdown (NULL );
hw/core/machine-qmp-cmds.c +11 -0
@@ -12,6 +12,7 @@#include "hw/boards.h" #include "hw/intc/intc.h" #include "hw/mem/memory-device.h" +#include "hw/acpi/acpi.h" #include "qapi/error.h" #include "qapi/qapi-builtin-visit.h" #include "qapi/qapi-commands-machine.h"
@@ -277,6 +278,16 @@ void qmp_system_reset(Error **errp)qemu_system_reset_request (SHUTDOWN_CAUSE_HOST_QMP_SYSTEM_RESET ); } +void qmp_system_sleep (Error **errp) +{ +if (!qemu_wakeup_suspend_enabled ()) { +error_setg (errp, +"suspend from running is not supported by this machine" ); +return ; + } +acpi_send_sleep_event (); +} +void qmp_system_powerdown (Error **errp) {qemu_system_powerdown_request ();
include/monitor/hmp.h +1 -0
@@ -43,6 +43,7 @@ void hmp_quit(Monitor *mon, const QDict *qdict);void hmp_stop (Monitor *mon,const QDict *qdict);void hmp_sync_profile (Monitor *mon,const QDict *qdict);void hmp_system_reset (Monitor *mon,const QDict *qdict); +void hmp_system_sleep (Monitor *mon,const QDict *qdict);void hmp_system_powerdown (Monitor *mon,const QDict *qdict);void hmp_exit_preconfig (Monitor *mon,const QDict *qdict);void hmp_announce_self (Monitor *mon,const QDict *qdict);
qapi/machine.json +20 -0
@@ -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 +# +# .. 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. +# +# .. qmp-example:: +# +# -> { "execute": "system_sleep" } +# <- { "return": {} } +# +## +{ 'command': 'system_sleep' } + ## # @system_powerdown: #
qapi/pragma.json +1 -0
@@ -23,6 +23,7 @@ 'set_password', 'system_powerdown', 'system_reset', + 'system_sleep', 'system_wakeup' ], # Commands allowed to return a non-dictionary 'command-returns-exceptions': [
Signature · 1 line
2.43.5
Re: [PATCH 13/13] acpi: hmp/qmp: Add hmp/qmp support for system_sleep
Quoted 13 lines · Annie Li
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 <[email protected]>
[...]
Quoted 5 lines
qapi/machine.json +0
-0
qapi/machine.json line 370
Quoted 10 lines
qapi/machine.json +7
-0@@ -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
qapi/machine.json line 374
Quoted 4 lines
qapi/machine.json +4
-0+# +# .. 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?
Quoted 24 lines
qapi/machine.json +9
-0+# +# .. qmp-example:: +# +# -> { "execute": "system_sleep" } +# <- { "return": {} } +# +## +{ 'command': 'system_sleep' } + ## # @system_powerdown: #qapi/pragma.json +1
-0@@ -23,6 +23,7 @@ 'set_password', 'system_powerdown', 'system_reset', + 'system_sleep', 'system_wakeup' ], # Commands allowed to return a non-dictionary 'command-returns-exceptions': [
Re: [PATCH 13/13] acpi: hmp/qmp: Add hmp/qmp support for system_sleep
Hello Markus,
Quoted 25 lines · Markus Armbruster
Quoted 13 lines · Annie Li
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 <[email protected]>[...]
Quoted 8 lines
qapi/machine.json +0
-0@@ -361,6 +361,26 @@ ## { 'command': 'system_reset' }
Quoted 8 lines
qapi/machine.json line 370
Quoted 7 lines
qapi/machine.json +7
-0+## +# @system_sleep: +# +# Requests that the guest perform a ACPI sleep transition by pushing +# the virtual sleep button. +# +# Since:10.010.1
Good catch.
Quoted 6 lines
qapi/machine.json line 374
Quoted 5 lines
qapi/machine.json +4
-0+# +# .. 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:
Nod
Quoted 8 lines
# .. 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_powerdownadditionally 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?
Very likely(but ignored indentation).
Don't recall clearly since it has been a while since RFC V1 patch :)
Thanks
Annie
Quoted 25 lines
Quoted 25 lines
qapi/machine.json +9
-0+# +# .. qmp-example:: +# +# -> { "execute": "system_sleep" } +# <- { "return": {} } +# +## +{ 'command': 'system_sleep' } + ## # @system_powerdown: #qapi/pragma.json +1
-0@@ -23,6 +23,7 @@ 'set_password', 'system_powerdown', 'system_reset', + 'system_sleep', 'system_wakeup' ], # Commands allowed to return a non-dictionary 'command-returns-exceptions': [
Quoted 10 lines · On Wed, 28 May 2025 12:35:45 -0400 Annie Li <[email protected]> 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.
Quoted 7 lines
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
Quoted 12 lines
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.
Quoted 3 lines
System_wakeupdoesn't work for microvm for now due to the missing support of it. This patch set only coverssystem_sleep, not the wakeup part.
ditto (aka what's wrong with wakeup)
Quoted 96 lines
1) https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg06478.html
2) https://lore.kernel.org/all/[email protected]/T/#mfe24f89778020deeacfe45083f3eea3cf9f55961
3) https://lore.kernel.org/all/[email protected]/T/
4) https://patchwork.kernel.org/project/qemu-devel/cover/[email protected]/
5) https://lore.kernel.org/all/[email protected]/----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 forsystem_sleepMiguel Luis (1):
hw/acpi: Add ACPI GED support for the sleep eventhmp-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
Hi Igor,
Quoted 20 lines · Igor Mammedov
Quoted 10 lines · On Wed, 28 May 2025 12:35:45 -0400 Annie Li <[email protected]> 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.
Quoted 7 lines
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.
Quoted 2 lines
here we probably need a pointer to these efforts, or some kind of description about what's wrong with ARM/firmare
will add more details.
Quoted 11 lines
Quoted 10 lines
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.
Quoted 4 lines
Quoted 3 lines
System_wakeupdoesn't work for microvm for now due to the missing support of it. This patch set only coverssystem_sleep, not the wakeup part.ditto (aka what's wrong with wakeup)
See the details in patch 12.
Thanks
Annie
Quoted 96 lines
Quoted 96 lines
1) https://urldefense.com/v3/__https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg06478.html__;!!ACWV5N9M2RV99hQ!NOUIn6Z6j3yl9_QWhIIz2b2X6I8pLEHf1biRwOvcRv2_K6VTcVq2KGJmuUE7rcF1VuVjTtLPBvCHid0$
2) https://urldefense.com/v3/__https://lore.kernel.org/all/[email protected]/T/*mfe24f89778020deeacfe45083f3eea3cf9f55961__;Iw!!ACWV5N9M2RV99hQ!NOUIn6Z6j3yl9_QWhIIz2b2X6I8pLEHf1biRwOvcRv2_K6VTcVq2KGJmuUE7rcF1VuVjTtLP4wjsOfs$
3) https://urldefense.com/v3/__https://lore.kernel.org/all/[email protected]/T/__;!!ACWV5N9M2RV99hQ!NOUIn6Z6j3yl9_QWhIIz2b2X6I8pLEHf1biRwOvcRv2_K6VTcVq2KGJmuUE7rcF1VuVjTtLPVmyXvjo$
4) https://urldefense.com/v3/__https://patchwork.kernel.org/project/qemu-devel/cover/[email protected]/__;!!ACWV5N9M2RV99hQ!NOUIn6Z6j3yl9_QWhIIz2b2X6I8pLEHf1biRwOvcRv2_K6VTcVq2KGJmuUE7rcF1VuVjTtLPuuktbj8$
5) https://urldefense.com/v3/__https://lore.kernel.org/all/[email protected]/__;!!ACWV5N9M2RV99hQ!NOUIn6Z6j3yl9_QWhIIz2b2X6I8pLEHf1biRwOvcRv2_K6VTcVq2KGJmuUE7rcF1VuVjTtLP7brAOZg$----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 forsystem_sleepMiguel Luis (1):
hw/acpi: Add ACPI GED support for the sleep eventhmp-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.ccreate mode 100644include/hw/acpi/control_method_device.h