Hi Annie,
On 4/11/25 17:44, Annie Li wrote:
Once the microvm guest requests to go to sleep state and
sets the GED register with S3 type, QEMU needs to continue
suspending the system.
Signed-off-by: Annie Li <annie...@oracle.com>
---
hw/acpi/generic_event_device.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
index 5a1ac8e362..bc53551a45 100644
--- a/hw/acpi/generic_event_device.c
+++ b/hw/acpi/generic_event_device.c
@@ -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;
Reviewed-by: Gustavo Romero <gustavo.rom...@linaro.org>
Cheers,
Gustavo