From patchwork Tue Dec 5 00:23:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Annie Li X-Patchwork-Id: 1871746 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2023-11-20 header.b=dShQTg5u; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SkhB95G37z1ySh for ; Tue, 5 Dec 2023 11:24:49 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAJEg-0006mZ-Aw; Mon, 04 Dec 2023 19:24:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJEZ-0006lz-Gc for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:24:21 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJEP-0007HF-D7 for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:24:13 -0500 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B508OlM009063; Tue, 5 Dec 2023 00:24:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-11-20; bh=xLlWCVQdyKvoGB1k6nc+Rv5KTykEMJd608sRbj4o7CQ=; b=dShQTg5u4s+KHNUF/l7FwsZhLLux7S/uPuyXgv2ALj5lr0M7pjNC3qtsiWU47xwN1q5Y m05jTHub4hj4D0SargE2f/e74c01KKGXVns5LL2v7vtY+zeQt0onu95rStIGr/Gj5oZm B2mr4LhC1FnyiVzLDF1p8vKuMp0RMCTQf3nkomCnUcvtmtlwzAzZ41f4fkd4WdQ3BQX7 bKEGQf0pL/eJyB0K5c/OKmDiEwrxI7GszQ5l6wsvsT9rHiu1YpcAPA4kU24r9XKBIcS8 3Kf8thyL6gpTfMc48BnDyA7DxF4+gLhhCtHtBkw0Y8sUgT7b1aAqYgTDaMqAgIZQmq80 iw== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3uss2cg0w0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:24:04 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4MIq9r018471; Tue, 5 Dec 2023 00:24:03 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3uqu16kkya-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:24:03 +0000 Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3B50O2YV020972; Tue, 5 Dec 2023 00:24:03 GMT Received: from localhost.localdomain (dhcp-10-191-8-104.vpn.oracle.com [10.191.8.104]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 3uqu16kkx1-1; Tue, 05 Dec 2023 00:24:02 +0000 From: Annie Li To: qemu-devel@nongnu.org, imammedo@redhat.com Cc: annie.li@oracle.com, miguel.luis@oracle.com Subject: [RFC PATCH 01/11] acpi: hmp/qmp: Add hmp/qmp support for system_sleep Date: Tue, 5 Dec 2023 00:23:56 +0000 Message-Id: <20231205002356.1239-1-annie.li@oracle.com> X-Mailer: git-send-email 2.30.1.windows.1 In-Reply-To: <20231205002143.562-1-annie.li@oracle.com> References: <20231205002143.562-1-annie.li@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-04_23,2023-12-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 adultscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312050002 X-Proofpoint-GUID: Y2ii5i4XvBv6FPEHrpl1WqVG3jimkxWG X-Proofpoint-ORIG-GUID: Y2ii5i4XvBv6FPEHrpl1WqVG3jimkxWG Received-SPF: pass client-ip=205.220.165.32; envelope-from=annie.li@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Following hmp/qmp commands are implemented for pressing virtual sleep button, hmp: system_sleep qmp: { "execute": "system_sleep" } These commands put the guest into suspend or other power states depending on the power settings inside the guest. Signed-off-by: Annie Li --- hmp-commands.hx | 14 ++++++++++++++ hw/core/machine-hmp-cmds.c | 5 +++++ hw/core/machine-qmp-cmds.c | 9 +++++++++ include/monitor/hmp.h | 1 + qapi/machine.json | 18 ++++++++++++++++++ qapi/pragma.json | 1 + 6 files changed, 48 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 765349ed14..bd01e49ec5 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -652,6 +652,20 @@ SRST whether profiling is on or off. ERST + { + .name = "system_sleep", + .args_type = "", + .params = "", + .help = "send ACPI 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 = "", diff --git a/hw/core/machine-hmp-cmds.c b/hw/core/machine-hmp-cmds.c index a6ff6a4875..641a365e3e 100644 --- a/hw/core/machine-hmp-cmds.c +++ b/hw/core/machine-hmp-cmds.c @@ -185,6 +185,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); diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index 3860a50c3b..9f1e636c90 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -257,6 +257,15 @@ 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 guest"); + return; + } +} + void qmp_system_powerdown(Error **errp) { qemu_system_powerdown_request(); diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h index 13f9a2dedb..d72a3b775c 100644 --- a/include/monitor/hmp.h +++ b/include/monitor/hmp.h @@ -45,6 +45,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); diff --git a/qapi/machine.json b/qapi/machine.json index b6d634b30d..3ac69df92f 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -297,6 +297,24 @@ ## { 'command': 'system_reset' } +## +# @system_sleep: +# +# Requests that a guest perform a ACPI sleep transition by pushing a virtual +# sleep button. +# +# Notes: A guest may or may not respond to this command. This command +# returning does not indicate that a guest has accepted the request +# or that it has gone to sleep. +# +# Example: +# +# -> { "execute": "system_sleep" } +# <- { "return": {} } +# +## +{ 'command': 'system_sleep' } + ## # @system_powerdown: # diff --git a/qapi/pragma.json b/qapi/pragma.json index 0aa4eeddd3..ef15229854 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': [ From patchwork Tue Dec 5 00:26:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Annie Li X-Patchwork-Id: 1871747 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2023-11-20 header.b=VtTFiBjy; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SkhDH353nz23mj for ; Tue, 5 Dec 2023 11:26:39 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAJGT-0007Qw-JE; Mon, 04 Dec 2023 19:26:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJGQ-0007QZ-K4 for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:26:15 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJGO-0000hd-WC for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:26:14 -0500 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B503dqN007441; Tue, 5 Dec 2023 00:26:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-11-20; bh=to5ibbp6gAN/HwF6WWVXndYPBAr+vJG5Ff7IzVdx5iM=; b=VtTFiBjyeK38k+sAtUdfgPPH1QxtxohmclrZ43bi1RFp7OhJPFgURQof7+2BQG83B/hn vOSKUZnCoPYsw50L7GWRwjQdXavxYZebkCmArwzonc5hk0s3odg54Qo3wPpJzydYybok e19jGz+lw6+vd0qJtMHCSOHO0rBixQLiY4M6ZYhimpaa+h1DFdxXpJOrRKQO3QL20m2b h/yGCwnb2LKjDf5a0WpUuxLDomoMSxhhAK0hVxLH1gm2MgHW3TtCZpX08iiLj+6jKBFU R8oJz+/txLdKTS+3LigQSTRBlZj3Vo+ONfo30Y7dUggUqxRXPsCopXvvR9kOvsyASyrN 9w== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3usrvcg13w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:26:11 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4MIrVB018494; Tue, 5 Dec 2023 00:26:10 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3uqu16knn3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:26:10 +0000 Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3B50QANS027632; Tue, 5 Dec 2023 00:26:10 GMT Received: from localhost.localdomain (dhcp-10-191-8-104.vpn.oracle.com [10.191.8.104]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 3uqu16knm1-1; Tue, 05 Dec 2023 00:26:09 +0000 From: Annie Li To: qemu-devel@nongnu.org, imammedo@redhat.com Cc: annie.li@oracle.com, miguel.luis@oracle.com Subject: [RFC PATCH 02/11] acpi: Implement control method sleep button Date: Tue, 5 Dec 2023 00:26:03 +0000 Message-Id: <20231205002603.545-1-annie.li@oracle.com> X-Mailer: git-send-email 2.30.1.windows.1 In-Reply-To: <20231205002143.562-1-annie.li@oracle.com> References: <20231205002143.562-1-annie.li@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-04_23,2023-12-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 adultscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312050002 X-Proofpoint-GUID: Mf7td2tHTFE0nU2RFK2ZAGa40ecyol6F X-Proofpoint-ORIG-GUID: Mf7td2tHTFE0nU2RFK2ZAGa40ecyol6F Received-SPF: pass client-ip=205.220.177.32; envelope-from=annie.li@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The control method sleep button is added, as well as its GPE event handler. Co-Developed-by: Miguel Luis Signed-off-by: Annie Li --- hw/acpi/control_method_device.c | 49 +++++++++++++++++++++++++ hw/acpi/meson.build | 1 + include/hw/acpi/control_method_device.h | 20 ++++++++++ 3 files changed, 70 insertions(+) diff --git a/hw/acpi/control_method_device.c b/hw/acpi/control_method_device.c new file mode 100644 index 0000000000..9e4841b8e2 --- /dev/null +++ b/hw/acpi/control_method_device.c @@ -0,0 +1,49 @@ +/* + * Control method devices + * + * Copyright (C) 2023 Oracle and/or its affiliates. + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + * + */ + +#include "qemu/osdep.h" +#include "hw/acpi/control_method_device.h" +#include "hw/mem/nvdimm.h" + +void acpi_dsdt_add_sleep_button(Aml *scope) +{ + Aml *dev = aml_device("\\_SB."ACPI_SLEEP_BUTTON_DEVICE); + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0C0E"))); + Aml *pkg = aml_package(2); + aml_append(pkg, aml_int(0x01)); + aml_append(pkg, aml_int(0x04)); + aml_append(dev, aml_name_decl("_PRW", pkg)); + aml_append(dev, aml_operation_region("\\Boo", AML_SYSTEM_IO, + aml_int(0x201), 0x1)); + Aml *field = aml_field("\\Boo", AML_BYTE_ACC, AML_NOLOCK, + AML_WRITE_AS_ZEROS); + aml_append(field, aml_named_field("SBP", 1)); + aml_append(field, aml_named_field("SBW", 1)); + aml_append(dev, field); + aml_append(scope, dev); +} + +void acpi_dsdt_add_sleep_gpe_event_handler(Aml *scope) +{ + Aml *method = aml_method("_L07", 0, AML_NOTSERIALIZED); + Aml *condition = aml_if(aml_name("\\_SB.SLPB.SBP")); + aml_append(condition, aml_store(aml_int(1), aml_name("\\_SB.SLPB.SBP"))); + aml_append(condition, + aml_notify(aml_name("\\_SB."ACPI_SLEEP_BUTTON_DEVICE), + aml_int(0x80))); + aml_append(method, condition); + condition = aml_if(aml_name("\\_SB.SLPB.SBW")); + aml_append(condition, aml_store(aml_int(1), aml_name("\\_SB.SLPB.SBW"))); + aml_append(condition, + aml_notify(aml_name("\\_SB."ACPI_SLEEP_BUTTON_DEVICE), + aml_int(0x2))); + aml_append(method, condition); + aml_append(scope, method); +} diff --git a/hw/acpi/meson.build b/hw/acpi/meson.build index fc1b952379..486d28cf42 100644 --- a/hw/acpi/meson.build +++ b/hw/acpi/meson.build @@ -16,6 +16,7 @@ acpi_ss.add(when: 'CONFIG_ACPI_PCI', if_true: files('pci.c')) acpi_ss.add(when: 'CONFIG_ACPI_CXL', if_true: files('cxl.c'), if_false: files('cxl-stub.c')) acpi_ss.add(when: 'CONFIG_ACPI_VMGENID', if_true: files('vmgenid.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')) diff --git a/include/hw/acpi/control_method_device.h b/include/hw/acpi/control_method_device.h new file mode 100644 index 0000000000..bce20512c4 --- /dev/null +++ b/include/hw/acpi/control_method_device.h @@ -0,0 +1,20 @@ +/* + * Control method devices + * + * Copyright (C) 2023 Oracle and/or its affiliates. + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + * + */ + + +#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); +void acpi_dsdt_add_sleep_gpe_event_handler(Aml *scope); + +#endif From patchwork Tue Dec 5 00:26:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Annie Li X-Patchwork-Id: 1871755 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2023-11-20 header.b=JjBYFfmM; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SkhQc3645z1ySh for ; Tue, 5 Dec 2023 11:35:36 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAJP0-0004mK-AO; Mon, 04 Dec 2023 19:35:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJOy-0004mA-Gr for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:35:04 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJOw-000231-Ne for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:35:04 -0500 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B503hBN008380; Tue, 5 Dec 2023 00:35:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-11-20; bh=5zIjo85+VHk3qhtCcKk2RBn/jnMB7SzqIeo+2qt+PSE=; b=JjBYFfmMQJ8nKzA8qffUHrIyG4gVlZ3pcmdELddT60G/DGCIHTTUvByIYsanctqcQJs1 KIw6Jj0DPLfe3GufW9X3+djPtC7k70rtgtQw0kudIxVb1Ezecsn9ZXO+7CL6OTQxcBRx OX+/QnCgdGAnGBTSY1OWEElDz5aHCq7gqgzmSwz/e88kNGklVWmPCbuLF0fl9vmy1/nx noxE24ITvKVzd+R9onUtL+RO6VIabSLMKfv+MRmesBt99rXGlwah/M5MnH9GIidZlol4 7XxWa88jiNhgr14iUjceQVZ0cKCsLdNCDDoDZX/i97BWmStsXs1YNKqod98EleGAkVW3 9A== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3usrtsg1gm-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:35:01 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4MIXxv004919; Tue, 5 Dec 2023 00:26:42 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3uqu16dck2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:26:42 +0000 Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3B50Qf2k014465; Tue, 5 Dec 2023 00:26:41 GMT Received: from localhost.localdomain (dhcp-10-191-8-104.vpn.oracle.com [10.191.8.104]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3uqu16dche-1; Tue, 05 Dec 2023 00:26:41 +0000 From: Annie Li To: qemu-devel@nongnu.org, imammedo@redhat.com Cc: annie.li@oracle.com, miguel.luis@oracle.com Subject: [RFC PATCH 03/11] test/acpi: allow DSDT table changes Date: Tue, 5 Dec 2023 00:26:35 +0000 Message-Id: <20231205002635.773-1-annie.li@oracle.com> X-Mailer: git-send-email 2.30.1.windows.1 In-Reply-To: <20231205002143.562-1-annie.li@oracle.com> References: <20231205002143.562-1-annie.li@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-04_23,2023-12-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 phishscore=0 malwarescore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312050002 X-Proofpoint-GUID: T9y8hPCRqBoWHD7Iv52zkGpGqF3wOZNJ X-Proofpoint-ORIG-GUID: T9y8hPCRqBoWHD7Iv52zkGpGqF3wOZNJ Received-SPF: pass client-ip=205.220.177.32; envelope-from=annie.li@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org List various DSDT files allowed to be changed in tests/qtest/bios-tables-test-allowed-diff.h Signed-off-by: Annie Li --- tests/qtest/bios-tables-test-allowed-diff.h | 41 +++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..eb309b1493 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,42 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/pc/DSDT", +"tests/data/acpi/pc/DSDT.acpierst", +"tests/data/acpi/pc/DSDT.acpihmat", +"tests/data/acpi/pc/DSDT.bridge", +"tests/data/acpi/pc/DSDT.cphp", +"tests/data/acpi/pc/DSDT.dimmpxm", +"tests/data/acpi/pc/DSDT.hpbridge", +"tests/data/acpi/pc/DSDT.hpbrroot", +"tests/data/acpi/pc/DSDT.ipmikcs", +"tests/data/acpi/pc/DSDT.memhp", +"tests/data/acpi/pc/DSDT.nohpet", +"tests/data/acpi/pc/DSDT.numamem", +"tests/data/acpi/pc/DSDT.roothp", +"tests/data/acpi/q35/DSDT", +"tests/data/acpi/q35/DSDT.acpierst", +"tests/data/acpi/q35/DSDT.acpihmat", +"tests/data/acpi/q35/DSDT.acpihmat-noinitiator", +"tests/data/acpi/q35/DSDT.applesmc", +"tests/data/acpi/q35/DSDT.bridge", +"tests/data/acpi/q35/DSDT.core-count", +"tests/data/acpi/q35/DSDT.core-count2", +"tests/data/acpi/q35/DSDT.cphp", +"tests/data/acpi/q35/DSDT.cxl", +"tests/data/acpi/q35/DSDT.dimmpxm", +"tests/data/acpi/q35/DSDT.ipmibt", +"tests/data/acpi/q35/DSDT.ipmismbus", +"tests/data/acpi/q35/DSDT.ivrs", +"tests/data/acpi/q35/DSDT.memhp", +"tests/data/acpi/q35/DSDT.mmio64", +"tests/data/acpi/q35/DSDT.multi-bridge", +"tests/data/acpi/q35/DSDT.noacpihp", +"tests/data/acpi/q35/DSDT.nohpet", +"tests/data/acpi/q35/DSDT.numamem", +"tests/data/acpi/q35/DSDT.pvpanic-isa", +"tests/data/acpi/q35/DSDT.thread-count", +"tests/data/acpi/q35/DSDT.thread-count2", +"tests/data/acpi/q35/DSDT.tis.tpm12", +"tests/data/acpi/q35/DSDT.tis.tpm2", +"tests/data/acpi/q35/DSDT.type4-count", +"tests/data/acpi/q35/DSDT.viot", +"tests/data/acpi/q35/DSDT.xapic", From patchwork Tue Dec 5 00:27:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Annie Li X-Patchwork-Id: 1871748 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2023-11-20 header.b=G5BhGePV; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SkhFY2Jllz23mj for ; Tue, 5 Dec 2023 11:27:45 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAJHS-00089S-Iu; Mon, 04 Dec 2023 19:27:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJHS-00089I-1m for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:27:18 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJHQ-0000sf-IN for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:27:17 -0500 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4NwpNj026929; Tue, 5 Dec 2023 00:27:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-11-20; bh=8DQYeLE9GTop3qEXcvfJJI8/PQfWomnhWt5rRThfLDw=; b=G5BhGePVLRLjY8ul2/dIDeLnxWtgfZMXhTAUfbRifHnqWRBifQ3ocpNunPd1Zx89P/Jv Y9KCtO4FjQlYqHPbo/0I/NOY8DSo4BnvVNjJRLWZeAXPsWx6OLJdAc5+wsabvZDUYNOT uNt3Pom8Ix1Kh9+/7K4D8/W7BFHJ8zzjh9pye1YBKLAkK+6JQ7O//L/62xVuVwiJzhMn NbIghVLwywBC4+VhpD/ff6TW1tO/tbH9DH8GiYu01SfktiCcRmmBH6PWqIQGgDfzHKQG 4LtmQN15+JlXQmGIYJBxHifmqy8VY2Gw3LR0lCnCqTYMTtmmkna7XoHrvedB9UquxgU2 SA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3usrkrg2cy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:27:14 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4MIYvE004983; Tue, 5 Dec 2023 00:27:13 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3uqu16dd1p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:27:13 +0000 Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3B50RDGn015366; Tue, 5 Dec 2023 00:27:13 GMT Received: from localhost.localdomain (dhcp-10-191-8-104.vpn.oracle.com [10.191.8.104]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3uqu16dd07-1; Tue, 05 Dec 2023 00:27:12 +0000 From: Annie Li To: qemu-devel@nongnu.org, imammedo@redhat.com Cc: annie.li@oracle.com, miguel.luis@oracle.com Subject: [RFC PATCH 04/11] acpi: Support Control Method sleep button for x86 Date: Tue, 5 Dec 2023 00:27:07 +0000 Message-Id: <20231205002707.217-1-annie.li@oracle.com> X-Mailer: git-send-email 2.30.1.windows.1 In-Reply-To: <20231205002143.562-1-annie.li@oracle.com> References: <20231205002143.562-1-annie.li@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-04_23,2023-12-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 phishscore=0 malwarescore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312050002 X-Proofpoint-GUID: DQm6Kn40_n-YrGv-ql8OCrEp7ExnqSBy X-Proofpoint-ORIG-GUID: DQm6Kn40_n-YrGv-ql8OCrEp7ExnqSBy Received-SPF: pass client-ip=205.220.177.32; envelope-from=annie.li@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Add Control Method Sleep button and its GPE event handler for x86. Signed-off-by: Annie Li --- hw/i386/acpi-build.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 80db183b78..75985e1423 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -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 "sysemu/tpm.h" #include "hw/acpi/tpm.h" #include "hw/acpi/vmgenid.h" @@ -1537,6 +1538,14 @@ 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); + + scope = aml_scope("\\_GPE"); + acpi_dsdt_add_sleep_gpe_event_handler(scope); + aml_append(dsdt, scope); + if (pcmc->legacy_cpu_hotplug) { build_legacy_cpu_hotplug_aml(dsdt, machine, pm->cpu_hp_io_base); } else { From patchwork Tue Dec 5 00:27:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Annie Li X-Patchwork-Id: 1871749 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2023-11-20 header.b=bNXYhUNs; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SkhFz1WbRz23mj for ; Tue, 5 Dec 2023 11:28:07 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAJI3-0000QT-9y; Mon, 04 Dec 2023 19:27:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJI1-0000QF-Nn for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:27:54 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJHw-00017r-8X for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:27:53 -0500 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4Nwp3I026922; Tue, 5 Dec 2023 00:27:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-11-20; bh=t0bJRZ4iNJB6vN6S7wgnW8Mo02Lb/ImPNGuJlAtGmIc=; b=bNXYhUNsxdQNNzJ2841sh13SsjWOb2F1vlzz8W22+QphVBM1KHuw0QaswMBY+kq7IlFC L6MG46me8yfquAreO91Bh3HHH78nmNBIczq2XWTSvpujr4bV3cww0TpRB1tCHcyw/fs8 EWKval43YJO+lwGDUjsF5p2qxWo+Fy0P3FZztRK0nnjBV86u8+uGD4S6FgTyBdxsC1CL ztYggBaji6MvrpaSqMHRvBkJzYudMnAXG+4AsHH+T8Jjxi9MUJogNXn8HbjHYOHBuwvh Qqwp3NhZnz4aaRceEZmT8xbJa/URTlhPG9WifQxn7ObBMeUKXBG9F2KFOc/gwfLcI5sQ 5A== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3usrkrg2dy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:27:46 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4MIWsT004875; Tue, 5 Dec 2023 00:27:45 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3uqu16ddef-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:27:45 +0000 Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3B50Rjkb016626; Tue, 5 Dec 2023 00:27:45 GMT Received: from localhost.localdomain (dhcp-10-191-8-104.vpn.oracle.com [10.191.8.104]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3uqu16dddc-1; Tue, 05 Dec 2023 00:27:44 +0000 From: Annie Li To: qemu-devel@nongnu.org, imammedo@redhat.com Cc: annie.li@oracle.com, miguel.luis@oracle.com Subject: [RFC PATCH 05/11] tests/acpi/bios-tables-test: update DSDT tables for Control Method Sleep button Date: Tue, 5 Dec 2023 00:27:39 +0000 Message-Id: <20231205002739.1270-1-annie.li@oracle.com> X-Mailer: git-send-email 2.30.1.windows.1 In-Reply-To: <20231205002143.562-1-annie.li@oracle.com> References: <20231205002143.562-1-annie.li@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-04_23,2023-12-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 phishscore=0 malwarescore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312050002 X-Proofpoint-GUID: JCZHA9fUfR3kVzVx3BBUiX2wWoc6FGdT X-Proofpoint-ORIG-GUID: JCZHA9fUfR3kVzVx3BBUiX2wWoc6FGdT Received-SPF: pass client-ip=205.220.177.32; envelope-from=annie.li@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Update various DSDT tables and empty bios-tables-test-allowed-diff.h Following the step 5 and 6 in tests/qtest/bios-tables-test.c, the changes in the tables are: DSDT: /* * 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/pc/DSDT, Mon Dec 4 15:52:25 2023 + * Disassembly of /tmp/aml-LRMEF2, Mon Dec 4 15:52:25 2023 * * Original Table Header: * Signature "DSDT" - * Length 0x00001AAE (6830) + * Length 0x00001B64 (7012) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0x0B + * Checksum 0x14 * 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 } @@ -488,32 +488,69 @@ { Memory32Fixed (ReadOnly, 0xFED00000, // Address Base 0x00000400, // Address Length ) }) } } Scope (_GPE) { Name (_HID, "ACPI0006" /* GPE Block Device */) // _HID: Hardware ID } Scope (_SB) { + Device (\_SB.SLPB) + { + Name (_HID, EisaId ("PNP0C0E") /* Sleep Button Device */) // _HID: Hardware ID + Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake + { + One, + 0x04 + }) + OperationRegion (\B**, SystemIO, 0x0201, One) + Field (\B**, ByteAcc, NoLock, WriteAsZeros) + { + SBP, 1, + SBW, 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 + } + + If (\_SB.SLPB.SBW) + { + \_SB.SLPB.SBW = One + Notify (\_SB.SLPB, 0x02) // Device Wake + } + } + } + + 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, 0xAF00, // Range Minimum 0xAF00, // Range Maximum 0x01, // Alignment 0x0C, // Length ) }) OperationRegion (PRST, SystemIO, 0xAF00, 0x0C) Field (PRST, ByteAcc, NoLock, WriteAsZeros) Signed-off-by: Annie Li --- tests/data/acpi/pc/DSDT | Bin 6830 -> 7012 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 6741 -> 6923 bytes tests/data/acpi/pc/DSDT.acpihmat | Bin 8155 -> 8337 bytes tests/data/acpi/pc/DSDT.bridge | Bin 13701 -> 13883 bytes tests/data/acpi/pc/DSDT.cphp | Bin 7294 -> 7476 bytes tests/data/acpi/pc/DSDT.dimmpxm | Bin 8484 -> 8666 bytes tests/data/acpi/pc/DSDT.hpbridge | Bin 6781 -> 6963 bytes tests/data/acpi/pc/DSDT.hpbrroot | Bin 3337 -> 3519 bytes tests/data/acpi/pc/DSDT.ipmikcs | Bin 6902 -> 7084 bytes tests/data/acpi/pc/DSDT.memhp | Bin 8189 -> 8371 bytes tests/data/acpi/pc/DSDT.nohpet | Bin 6688 -> 6870 bytes tests/data/acpi/pc/DSDT.numamem | Bin 6836 -> 7018 bytes tests/data/acpi/pc/DSDT.roothp | Bin 10623 -> 10805 bytes tests/data/acpi/q35/DSDT | Bin 8355 -> 8537 bytes tests/data/acpi/q35/DSDT.acpierst | Bin 8372 -> 8554 bytes tests/data/acpi/q35/DSDT.acpihmat | Bin 9680 -> 9862 bytes tests/data/acpi/q35/DSDT.acpihmat-noinitiator | Bin 8634 -> 8816 bytes tests/data/acpi/q35/DSDT.applesmc | Bin 8401 -> 8583 bytes tests/data/acpi/q35/DSDT.bridge | Bin 11968 -> 12150 bytes tests/data/acpi/q35/DSDT.core-count | Bin 12913 -> 13095 bytes tests/data/acpi/q35/DSDT.core-count2 | Bin 33770 -> 33952 bytes tests/data/acpi/q35/DSDT.cphp | Bin 8819 -> 9001 bytes tests/data/acpi/q35/DSDT.cxl | Bin 9713 -> 9895 bytes tests/data/acpi/q35/DSDT.dimmpxm | Bin 10009 -> 10191 bytes tests/data/acpi/q35/DSDT.ipmibt | Bin 8430 -> 8612 bytes tests/data/acpi/q35/DSDT.ipmismbus | Bin 8443 -> 8625 bytes tests/data/acpi/q35/DSDT.ivrs | Bin 8372 -> 8554 bytes tests/data/acpi/q35/DSDT.memhp | Bin 9714 -> 9896 bytes tests/data/acpi/q35/DSDT.mmio64 | Bin 9485 -> 9667 bytes tests/data/acpi/q35/DSDT.multi-bridge | Bin 13208 -> 13390 bytes tests/data/acpi/q35/DSDT.noacpihp | Bin 8235 -> 8417 bytes tests/data/acpi/q35/DSDT.nohpet | Bin 8213 -> 8395 bytes tests/data/acpi/q35/DSDT.numamem | Bin 8361 -> 8543 bytes tests/data/acpi/q35/DSDT.pvpanic-isa | Bin 8456 -> 8638 bytes tests/data/acpi/q35/DSDT.thread-count | Bin 12913 -> 13095 bytes tests/data/acpi/q35/DSDT.thread-count2 | Bin 33770 -> 33952 bytes tests/data/acpi/q35/DSDT.tis.tpm12 | Bin 8961 -> 9143 bytes tests/data/acpi/q35/DSDT.tis.tpm2 | Bin 8987 -> 9169 bytes tests/data/acpi/q35/DSDT.type4-count | Bin 18589 -> 18771 bytes tests/data/acpi/q35/DSDT.viot | Bin 9464 -> 9646 bytes tests/data/acpi/q35/DSDT.xapic | Bin 35718 -> 35900 bytes tests/qtest/bios-tables-test-allowed-diff.h | 41 ------------------ 42 files changed, 41 deletions(-) diff --git a/tests/data/acpi/pc/DSDT b/tests/data/acpi/pc/DSDT index c93ad6b7f83a168a1833d7dba1112dd2ab8a431f..b0b15c87db646b018d8247bf2d69422ef308c731 100644 GIT binary patch delta 207 zcmZ2y`oxUOCD=WR`5%1yY!sB>>hmRvZ zAShgjm5GsyCAuNTDL+4+k(-f;F}hI@%yA5M3W#S6b_$PY6!2w>iFXfh6>(*Y_c1VM sSfCf9&kQpVq^y7uO`r{Ip&8glt_C#q;ppna<00xH%9%DRvGs@m03~@i1poj5 delta 24 fcmaE2w$7BxCD5*}6plUY`dR diff --git a/tests/data/acpi/pc/DSDT.acpierst b/tests/data/acpi/pc/DSDT.acpierst index f643fa2d034053fa07f74f095565b64f021d4290..bba488a12192b81fa73dc075fd0b8085e03bb98c 100644 GIT binary patch delta 207 zcmca=(rw1&66_MfEzQ8d7_*T}lC9pIB|g|GKDx<1Mi0aY_6cy}i1+Yx;c>jc!^aUH z5EL%N%EZXU65SBvl%F5Z$j!*a7~Loc<~RmB1;jH3JB7zH3iz_c#JdN$iny}H`xuxr rEYOS5XNDOFQdYo-CeQ}9&tFvl_2DIlIP*eN`oQNWiiCf+^3Rm7Do-p9b4 sVS!$ZJ~PZfkg@_sG=Vm-g=SzIxf;;ahoh?xkB6v-C}-NN#I{os0L{2L6#xJL delta 24 gcmbQ}c-x-KCDjc!^aUH z5EL%N%EZXU65SBvl%F5Z$j!*a7~Loc<~RmB1;jH3JB7zH3iz_c#JdN$iny}H`xuxr rEYOS5XNDOFQdYo-CeQ}9&v delta 24 fcmdm;)0)lY66_MvYRbUCD7leKl5O)%wj_N3U-1Vb diff --git a/tests/data/acpi/pc/DSDT.cphp b/tests/data/acpi/pc/DSDT.cphp index dbc0141b2bbc77a6d806ff046dc137992c59a899..7e67a101b6df7e06299ce35bc8becc7cedd87c5f 100644 GIT binary patch delta 207 zcmexovBiqZCD=WR`5%1yY!sB>>hmRvZ zAShgjm5GsyCAuNTDL+4+k(-f;F}hI@%yA5M3W#S6b_$PY6!2w>iFXfh6>(*Y_c1VM sSfCf9&kQpVq^y7uO`r{Ip&8glt_C#q;ppna<00xH%9%DRvBii10BplJGynhq delta 24 fcmdmD_0NLKCDVsHmV diff --git a/tests/data/acpi/pc/DSDT.dimmpxm b/tests/data/acpi/pc/DSDT.dimmpxm index 1294f655d418dbdccc095e0d47ab220869a61a07..3d219cb4ffd801e2c1c005625053d9ccfdedb188 100644 GIT binary patch delta 207 zcmZ4Dbjz8`CD=Yi)DB#N$6Yn12D&oo(?_*%j sus|(PJZ*BwM{ZOMI|Xd~}n2j2?&)>=WR`5%1yY!sB>>hmRvZ zAShgjm5GsyCAuNTDL+4+k(-f;F}hI@%yA5M3W#S6b_$PY6!2w>iFXfh6>(*Y_c1VM sSfCf9&kQpVq^y7uO`r{Ip&8glt_C#q;ppna<00xH%9%DRu|=Yi)DB#N$6Yn12D&oo(?_*%j sus|tFvl_2DIlIP*eN`oQNWiiCf+^3Rm7Do-p9b4 sVS!$ZJ~PZfkg@_sG=Vm-g=SzIxf;;ahoh?xkB6v-C}-NN#CAml0LfuFA^-pY delta 24 gcmZ2u{>_xjCD5*)EF!0BJ@DGXMYp diff --git a/tests/data/acpi/pc/DSDT.memhp b/tests/data/acpi/pc/DSDT.memhp index 9b442a64cf711b33d80691fe84f1d3a6256f943b..2f0398a7c3f170a0ca70b95cc366d7ccba6f19b9 100644 GIT binary patch delta 207 zcmexszuA$?CD=Yi)DB#N$6Yn12D&oo(?_*%j sus|CDtFvl_2DIlIP*eN`oQNWiiCf+^3Rm7Do-p9b4 sVS!$ZJ~PZfkg@_sG=Vm-g=SzIxf;;ahoh?xkB6v-C}-L{g|$Zn08+a;1ONa4 delta 24 fcmca+y1<0XCD=Yi)DB#N$6Yn12D&oo(?_*%j sus|=Yi)DB#N$6Yn12D&oo(?_*%j sus|5*=WR`5%1yY!sB>>hmRvZ zAShgjm5GsyCAuNTDL+4+k(-f;F}hI@%yA5M3W#S6b_$PY6!2w>iFXfh6>(*Y_c1VM sSfCf9&kQpVq^y7uO`r{Ip&8glt_C#q;ppna<00xH%9%C`NKR%407T+ADgXcg delta 24 gcmccVwAhi$CDu1FqxnWIcFE1hB`2{10AK=Yi)DB#N$6Yn12D&oo(?_*%j sus|kX*tJ0Olq+4gdfE delta 24 gcmaFmw8fFjCDOV diff --git a/tests/data/acpi/q35/DSDT.acpihmat b/tests/data/acpi/q35/DSDT.acpihmat index 61c5bd52a42242e85090934e8e45bf01642609d6..35168cd8b1af3aca861350a1fd8d6513005cb47f 100644 GIT binary patch delta 207 zcmccM-R8^X66_MvrpCa)_;({0yJWpPOMI|Xd~}n2j2?&)>=WR`5%1yY!sB>>hmRvZ zAShgjm5GsyCAuNTDL+4+k(-f;F}hI@%yA5M3W#S6b_$PY6!2w>iFXfh6>(*Y_c1VM sSfCf9&kQpVq^y7uO`r{Ip&8glt_C#q;ppna<00xH%9%C`NFLw;0PP_;IsgCw delta 24 gcmZqkz2ME|66_LkL6w1l@ykXocFE1hCHM0H0BDg2O8@`> diff --git a/tests/data/acpi/q35/DSDT.acpihmat-noinitiator b/tests/data/acpi/q35/DSDT.acpihmat-noinitiator index 3aaa2bbdf54a0d0cade14421e84c6ec5a42f96fa..66b8c54802028a1817699aa61464ff3b24f3e672 100644 GIT binary patch delta 207 zcmdnx{K19GCD=Yi)DB#N$6Yn12D&oo(?_*%j sus|kX*$90OZ~|5&!@I delta 24 gcmez1vdfvvCDjc!^aUH z5EL%N%EZXU65SBvl%F5Z$j!*a7~Loc<~RmB1;jH3JB7zH3iz_c#JdN$iny}H`xuxr sEYOS5XNDOFQdYo-CeQ}9&Q`z?;kCD)F=itdyJWpPOMI|Xd~}n2j2?&)>=WR`5%1yY!sB>>hmRvZ zAShgjm5GsyCAuNTDL+4+k(-f;F}hI@%yA5M3W#S6b_$PY6!2w>iFXfh6>(*Y_c1VM sSfCf9&kQpVq^y7uO`r{Ip&8glt_C#q;ppna<00xH%9%C`NNx}X0M`CF4gdfE delta 24 gcmewscOaI_CDOV diff --git a/tests/data/acpi/q35/DSDT.core-count b/tests/data/acpi/q35/DSDT.core-count index a24b04cbdbf09383b933a42a2a15182545543a87..8b2f64692c87800caeaddc4edefc78a3a82269f4 100644 GIT binary patch delta 207 zcmeyEvOJB;CD=Yi)DB#N$6Yn12D&oo(?_*%j sus|kW7>W0M-~d#Q*>R delta 24 fcmZ3U_A!OaCDAdUuxiV5j)#Ci@sY5F^+pz=|XzIh!)rZGJ)I*drZ5EKcl?4DKG&$!0 delta 26 icmZ3`$@Hq7iOVI}CFE5z0|O)DMlN>A&BrBgW&r?sY6$oM diff --git a/tests/data/acpi/q35/DSDT.cphp b/tests/data/acpi/q35/DSDT.cphp index 20955d0aa30120553da35d5a6640055d26255cf9..b9ff78bcf6b3ebbeabba3ddbc65ee340a00210f8 100644 GIT binary patch delta 207 zcmezDveJ#qCD=Yi)DB#N$6Yn12D&oo(?_*%j sus|kWA(T0E{d+SpWb4 delta 24 fcmZ4K_SuEYCD=Yi)DB#N$6Yn12D&oo(?_*%j sus|kbKAk0DVX}!2kdN delta 24 gcmZ4P`_Y@rCD=Yi)DB#N$6Yn12D&oo(?_*%j sus|NE4wB+X7l3#cMTsjAR diff --git a/tests/data/acpi/q35/DSDT.ipmibt b/tests/data/acpi/q35/DSDT.ipmibt index 45f911ada5645f158f3d6c0c430ec1d52cadc5d8..cf39dc40f1f4da9ba1d7eca6cfcf65ff502f12c2 100644 GIT binary patch delta 207 zcmaFoxWt*uCD=Yi)DB#N$6Yn12D&oo(?_*%j sus|ki5qZ0J*L?3jhEB delta 24 gcmZ4D{LYcfCD`WA;WacFE1hCGWBW0BDv78~^|S diff --git a/tests/data/acpi/q35/DSDT.ipmismbus b/tests/data/acpi/q35/DSDT.ipmismbus index e5d6811bee1233d74236453c49060390d74d4416..1cc3fe668839663e748a3a41de95edcdcffceb66 100644 GIT binary patch delta 207 zcmezExY3!*CDtFvl_2DIlIP*eN`oQNWiiCf+^3Rm7Do-p9b4 sVS!$ZJ~PZfkg@_sG=Vm-g=SzIxf;;ahoh?xkB6v-C}-L%Ao-dd04@SKumAu6 delta 24 gcmdn!{M(VsCD=Yi)DB#N$6Yn12D&oo(?_*%j sus|kX*tJ0Olq+4gdfE delta 24 gcmaFmw8fFjCDOV diff --git a/tests/data/acpi/q35/DSDT.memhp b/tests/data/acpi/q35/DSDT.memhp index 5ce081187a578ba7145a9ba20d30be36c13b7663..ee8f4837005d3a048f2a62bfda4a3011d4142746 100644 GIT binary patch delta 207 zcmez5y~3BvCD=Yi)DB#N$6Yn12D&oo(?_*%j sus|kbJ}g0Ht0y_W%F@ delta 24 gcmZ4C`^lTjCD=Yi)DB#N$6Yn12D&oo(?_*%j sus|ko?OH01VDKp8x;= delta 24 fcmX@?-Rs5W66_MftIEK@_;Mo`yX5BMl7F}XT;d0? diff --git a/tests/data/acpi/q35/DSDT.multi-bridge b/tests/data/acpi/q35/DSDT.multi-bridge index 1db43a69e4c2affd8bd678bbef4d3c228380288e..c7e20414146854c2c3be401dccd1c11d52a5f898 100644 GIT binary patch delta 207 zcmbP{elCN{CD=WR`5%1yY!sB>>hmRvZ zAShgjm5GsyCAuNTDL+4+k(-f;F}hI@%yA5M3W#S6b_$PY6!2w>iFXfh6>(*Y_c1VM sSfCf9&kQpVq^y7uO`r{Ip&8glt_C#q;ppna<00xH%9%C`NOnj80EPKDg#Z8m delta 24 fcmX??F(aMJCDl78;-j1FWAs3bV4nadj(87G7aqq8JbWDS z0YTwHtW1ntEYS@yPWk!qjNFV&jM0sPV2)$3Q$Rdpuv2(Eqku14OuT!5tB5OGypMr7 s!veh+eP)<}AY}!NXaa3u3(debay6i-4@XxY9uH9uQO>mauy_Us0Iml*ivR!s delta 24 fcmaFpxY~isCD=Yi)DB#N$6Yn12D&oo(?_*%j sus|=Yi)DB#N$6Yn12D&oo(?_*%j sus|keta50MleR>;M1& delta 24 gcmccbw9=8wCD=Yi)DB#N$6Yn12D&oo(?_*%j sus|ko>_80Py2Ea{vGU delta 24 fcmdnz+~LIK66_Mfp~%3%_;Mo`yX5BMlHb_@S_=n+ diff --git a/tests/data/acpi/q35/DSDT.thread-count b/tests/data/acpi/q35/DSDT.thread-count index a24b04cbdbf09383b933a42a2a15182545543a87..8b2f64692c87800caeaddc4edefc78a3a82269f4 100644 GIT binary patch delta 207 zcmeyEvOJB;CD=Yi)DB#N$6Yn12D&oo(?_*%j sus|kW7>W0M-~d#Q*>R delta 24 fcmZ3U_A!OaCDAdUuxiV5j)#Ci@sY5F^+pz=|XzIh!)rZGJ)I*drZ5EKcl?4DKG&$!0 delta 26 icmZ3`$@Hq7iOVI}CFE5z0|O)DMlN>A&BrBgW&r?sY6$oM diff --git a/tests/data/acpi/q35/DSDT.tis.tpm12 b/tests/data/acpi/q35/DSDT.tis.tpm12 index e381ce4cbf2b11f56a2d0537db4d21acc97450c9..f6028aa3db2bf393e9d8b0808031a9c5da61a1ab 100644 GIT binary patch delta 207 zcmZp4+wRWg66_MPU73M_v2Y_7yJWpPOMI|Xd~}n2j2?&)>=WR`5%1yY!sB>>hmRvZ zAShgjm5GsyCAuNTDL+4+k(-f;F}hI@%yA5M3W#S6b_$PY6!2w>iFXfh6>(*Y_c1VM sSfCf9&kQpVq^y7uO`r{Ip&8glt_C#q;ppna<00xH%9%C`NPgr50EQVj;Q#;t delta 24 fcmdn)-sr~V66_MfsLa5?n7)yVU2^kr$q$?WR1604 diff --git a/tests/data/acpi/q35/DSDT.tis.tpm2 b/tests/data/acpi/q35/DSDT.tis.tpm2 index a09253042ce4a715922027245de8a2ab7449c5b7..0f97da57b385f7603c14c9b14df5f96b75e1cdcd 100644 GIT binary patch delta 207 zcmbR3cF~>7CD=Yi)DB#N$6Yn12D&oo(?_*%j sus|kmTk90F8V&1ONa4 delta 24 fcmccUKHH7UCDRksEe diff --git a/tests/data/acpi/q35/DSDT.type4-count b/tests/data/acpi/q35/DSDT.type4-count index edc23198cdb47a981bcbc82bc8e392b815abb554..b060bcaab7df7e214d1c2a88b9dcbb92638f3383 100644 GIT binary patch delta 209 zcmbO`k@4~*MlP3Nmylpj1_s6_8@bpe>)l!6gPr1|o9tusK#X9Y04I)k4^I~!#|u1s z9Pt4`;X|JY%p^cs!$kFI!B!dw{EmD_gve ufjPqhy%>FFn1LW=1&n9{ZD0${z&3IS05e^Q4dkhv{^v1S04aYt2w9u delta 26 icmcaSiE-{kMlP3Nmyo$03=E97H*&E{ZayyAqYnUiF9^8+ diff --git a/tests/data/acpi/q35/DSDT.viot b/tests/data/acpi/q35/DSDT.viot index 64e81f571120e3eb2b8c6c9545293a78c75b7bbd..76623a06727ef11cce63c7f2abe0001199ca6896 100644 GIT binary patch delta 207 zcmez2xz3x*CDtFvl_2DIlIP*eN`oQNWiiCf+^3Rm7Do-p9b4 sVS!$ZJ~PZfkg@_sG=Vm-g=SzIxf;;ahoh?xkB6v-C}-L%Ao+qD06fMy!~g&Q delta 24 gcmZ4I{lk;XCDms_(A0;cs}GNdsD~(L+AJVhRs;ZS7di3( delta 26 icmdlpgQ;yg6PHV{OGsNc0|VpRja=-Kn~zJD76AZxDG37r diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index eb309b1493..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,42 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/pc/DSDT", -"tests/data/acpi/pc/DSDT.acpierst", -"tests/data/acpi/pc/DSDT.acpihmat", -"tests/data/acpi/pc/DSDT.bridge", -"tests/data/acpi/pc/DSDT.cphp", -"tests/data/acpi/pc/DSDT.dimmpxm", -"tests/data/acpi/pc/DSDT.hpbridge", -"tests/data/acpi/pc/DSDT.hpbrroot", -"tests/data/acpi/pc/DSDT.ipmikcs", -"tests/data/acpi/pc/DSDT.memhp", -"tests/data/acpi/pc/DSDT.nohpet", -"tests/data/acpi/pc/DSDT.numamem", -"tests/data/acpi/pc/DSDT.roothp", -"tests/data/acpi/q35/DSDT", -"tests/data/acpi/q35/DSDT.acpierst", -"tests/data/acpi/q35/DSDT.acpihmat", -"tests/data/acpi/q35/DSDT.acpihmat-noinitiator", -"tests/data/acpi/q35/DSDT.applesmc", -"tests/data/acpi/q35/DSDT.bridge", -"tests/data/acpi/q35/DSDT.core-count", -"tests/data/acpi/q35/DSDT.core-count2", -"tests/data/acpi/q35/DSDT.cphp", -"tests/data/acpi/q35/DSDT.cxl", -"tests/data/acpi/q35/DSDT.dimmpxm", -"tests/data/acpi/q35/DSDT.ipmibt", -"tests/data/acpi/q35/DSDT.ipmismbus", -"tests/data/acpi/q35/DSDT.ivrs", -"tests/data/acpi/q35/DSDT.memhp", -"tests/data/acpi/q35/DSDT.mmio64", -"tests/data/acpi/q35/DSDT.multi-bridge", -"tests/data/acpi/q35/DSDT.noacpihp", -"tests/data/acpi/q35/DSDT.nohpet", -"tests/data/acpi/q35/DSDT.numamem", -"tests/data/acpi/q35/DSDT.pvpanic-isa", -"tests/data/acpi/q35/DSDT.thread-count", -"tests/data/acpi/q35/DSDT.thread-count2", -"tests/data/acpi/q35/DSDT.tis.tpm12", -"tests/data/acpi/q35/DSDT.tis.tpm2", -"tests/data/acpi/q35/DSDT.type4-count", -"tests/data/acpi/q35/DSDT.viot", -"tests/data/acpi/q35/DSDT.xapic", From patchwork Tue Dec 5 00:28:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Annie Li X-Patchwork-Id: 1871750 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2023-11-20 header.b=JXBvaJh0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SkhGv2jkPz23mj for ; Tue, 5 Dec 2023 11:28:55 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAJIl-0001BA-8r; Mon, 04 Dec 2023 19:28:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJIh-0001AF-QO for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:28:36 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJIg-0001Bq-3N for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:28:35 -0500 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B508b96009511; Tue, 5 Dec 2023 00:28:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-11-20; bh=vJGWJpqaoGkncz2LdiHua+5A37UysX7gJKYAnyBVjcw=; b=JXBvaJh0fl9LezOHjLin5ulwxM0JkS5iPmNP7+5ZQTliIwRhVkvZT7CDmWqcYnZKHRpB mzm6Tzx4mPLWSUgFX1CayujJPppFRne8n20f9sTYpgxKtbdzEm8ZHvDoh8ggCgJSuc9i hWIXrATyTOiY1qvSRGDfWT1kFG2EKY0XkSMYbCQoMwy9QSPdQk/MClwfHea2AmTXc9X6 bZSjalBNc9zNTRkqnFRRfwfH5EGygJFgU+UOptio0X6TvuJzoDqcvk4WDoPkJPGMvIHe my0/Col59TiIwA2YaIXb0wei1VPvT6d6qx1KWdGco12yx7EGpgi693/9ardZUOBlPxl4 wA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3uss2cg13n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:28:31 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4MIWKD004832; Tue, 5 Dec 2023 00:28:31 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3uqu16ddw8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:28:31 +0000 Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3B50SUln017577; Tue, 5 Dec 2023 00:28:30 GMT Received: from localhost.localdomain (dhcp-10-191-8-104.vpn.oracle.com [10.191.8.104]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3uqu16ddv1-1; Tue, 05 Dec 2023 00:28:30 +0000 From: Annie Li To: qemu-devel@nongnu.org, imammedo@redhat.com Cc: annie.li@oracle.com, miguel.luis@oracle.com Subject: [RFC PATCH 06/11] acpi: Send the GPE event of suspend and wakeup for x86 Date: Tue, 5 Dec 2023 00:28:15 +0000 Message-Id: <20231205002815.1456-1-annie.li@oracle.com> X-Mailer: git-send-email 2.30.1.windows.1 In-Reply-To: <20231205002143.562-1-annie.li@oracle.com> References: <20231205002143.562-1-annie.li@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-04_23,2023-12-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 mlxlogscore=949 adultscore=0 phishscore=0 malwarescore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312050003 X-Proofpoint-GUID: upvkkgaQ_a1q9WmYjgWRyyeeYDf7gZar X-Proofpoint-ORIG-GUID: upvkkgaQ_a1q9WmYjgWRyyeeYDf7gZar Received-SPF: pass client-ip=205.220.165.32; envelope-from=annie.li@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The GPE event is triggered to notify the guest to suspend or wakeup itself. This patch removes the previous implementation of QEMU_WAKEUP_REASON_OTHER pretending the resume was caused by power button. Signed-off-by: Annie Li --- hw/acpi/core.c | 17 +++++++++++++---- hw/core/machine-qmp-cmds.c | 2 ++ include/hw/acpi/acpi.h | 1 + include/hw/acpi/acpi_dev_interface.h | 1 + 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/hw/acpi/core.c b/hw/acpi/core.c index ec5e127d17..e5c3ff9a54 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -354,6 +354,16 @@ int acpi_get_slic_oem(AcpiSlicOem *oem) return -1; } +void acpi_send_sleep_wakeup_event(void) +{ + Object *obj = object_resolve_path_type("", TYPE_ACPI_DEVICE_IF, NULL); + + if (obj) { + /* Send _GPE.L07 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); @@ -369,10 +379,9 @@ static void acpi_notify_wakeup(Notifier *notifier, void *data) (ACPI_BITMASK_WAKE_STATUS | ACPI_BITMASK_TIMER_STATUS); break; case QEMU_WAKEUP_REASON_OTHER: - /* ACPI_BITMASK_WAKE_STATUS should be set on resume. - Pretend that resume was caused by power button */ - ar->pm1.evt.sts |= - (ACPI_BITMASK_WAKE_STATUS | ACPI_BITMASK_POWER_BUTTON_STATUS); + /* ACPI_BITMASK_WAKE_STATUS should be set on resume. */ + ar->pm1.evt.sts |= ACPI_BITMASK_WAKE_STATUS; + acpi_send_sleep_wakeup_event(); break; default: break; diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index 9f1e636c90..d51802214b 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -9,6 +9,7 @@ #include "qemu/osdep.h" #include "hw/acpi/vmgenid.h" +#include "hw/acpi/acpi.h" #include "hw/boards.h" #include "hw/intc/intc.h" #include "hw/mem/memory-device.h" @@ -264,6 +265,7 @@ void qmp_system_sleep(Error **errp) "suspend from running is not supported by this guest"); return; } + acpi_send_sleep_wakeup_event(); } void qmp_system_powerdown(Error **errp) diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h index e0e51e85b4..07e31aa138 100644 --- a/include/hw/acpi/acpi.h +++ b/include/hw/acpi/acpi.h @@ -181,6 +181,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_wakeup_event(void); void acpi_update_sci(ACPIREGS *acpi_regs, qemu_irq irq); diff --git a/include/hw/acpi/acpi_dev_interface.h b/include/hw/acpi/acpi_dev_interface.h index 68d9d15f50..1cb050cd3a 100644 --- a/include/hw/acpi/acpi_dev_interface.h +++ b/include/hw/acpi/acpi_dev_interface.h @@ -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" From patchwork Tue Dec 5 00:28:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Annie Li X-Patchwork-Id: 1871756 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2023-11-20 header.b=FPo9YeAD; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SkhZg40kCz23mf for ; Tue, 5 Dec 2023 11:42:35 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAJVj-0006PL-Q9; Mon, 04 Dec 2023 19:42:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJVi-0006P8-9M for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:42:02 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJVg-0005pl-HN for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:42:02 -0500 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B50fmBV024212; Tue, 5 Dec 2023 00:41:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-11-20; bh=bXw7vY05SgJZn9k5OLzHMFv03tompe24tbMyQmIIQxo=; b=FPo9YeADrcKtvhzlN3pT0u/uaBo1adFfe7rZn6+VHH6dtDWLqBDQBggcmKUgua1Oj9Vh o64dmhxwlVpEdcli9e1KlYhi+yOIYA582lHk1BiTz7aYUmbHcPh8BgTo6kZq0RtUbzQH utRTRuwhbZKcjyKNxfREvnMWSyRTt/U+CNThMQQ/45fcJzfKry7HhllFu9eu2V8CW5hu ubRUf/kNJg6LaCWDHL5y3ffnjEYwLhILBhrIpJKBQi4VXi+VInz6RntwmbVdT3qDb1hN AUHmuoXk79bx+6F9kJhfNBOUIBh4qxqqDvkXGkZFZYKb6lO0QdgVnqRdLiYG+PMYH1rt qw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3uss2cg1g6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:41:58 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4MIXeq004891; Tue, 5 Dec 2023 00:28:55 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3uqu16deam-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:28:55 +0000 Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3B50StK2018734; Tue, 5 Dec 2023 00:28:55 GMT Received: from localhost.localdomain (dhcp-10-191-8-104.vpn.oracle.com [10.191.8.104]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3uqu16de96-1; Tue, 05 Dec 2023 00:28:54 +0000 From: Annie Li To: qemu-devel@nongnu.org, imammedo@redhat.com Cc: annie.li@oracle.com, miguel.luis@oracle.com Subject: [RFC PATCH 07/11] hw/acpi: Add ACPI GED support for the sleep event Date: Tue, 5 Dec 2023 00:28:49 +0000 Message-Id: <20231205002849.1691-1-annie.li@oracle.com> X-Mailer: git-send-email 2.30.1.windows.1 In-Reply-To: <20231205002143.562-1-annie.li@oracle.com> References: <20231205002143.562-1-annie.li@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-04_23,2023-12-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 phishscore=0 malwarescore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312050003 X-Proofpoint-GUID: WS2KH6HHPr_IrFBXxWAIFnwPa4jNF40a X-Proofpoint-ORIG-GUID: WS2KH6HHPr_IrFBXxWAIFnwPa4jNF40a Received-SPF: pass client-ip=205.220.165.32; envelope-from=annie.li@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Miguel Luis Add support for ACPI GED sleep event on the ACPI device interface so that HW-reduced systems can enable guests to sleep. Signed-off-by: Miguel Luis --- hw/acpi/generic_event_device.c | 9 +++++++++ include/hw/acpi/generic_event_device.h | 1 + 2 files changed, 10 insertions(+) diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c index a3d31631fe..97a6f82b35 100644 --- a/hw/acpi/generic_event_device.c +++ b/hw/acpi/generic_event_device.c @@ -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" @@ -25,6 +26,7 @@ static const uint32_t ged_supported_events[] = { ACPI_GED_MEM_HOTPLUG_EVT, ACPI_GED_PWR_DOWN_EVT, ACPI_GED_NVDIMM_HOTPLUG_EVT, + ACPI_GED_SLEEP_EVT, }; /* @@ -117,6 +119,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[] @@ -284,6 +291,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 { diff --git a/include/hw/acpi/generic_event_device.h b/include/hw/acpi/generic_event_device.h index ba84ce0214..6186bdf368 100644 --- a/include/hw/acpi/generic_event_device.h +++ b/include/hw/acpi/generic_event_device.h @@ -95,6 +95,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(AcpiGedState, ACPI_GED) #define ACPI_GED_MEM_HOTPLUG_EVT 0x1 #define ACPI_GED_PWR_DOWN_EVT 0x2 #define ACPI_GED_NVDIMM_HOTPLUG_EVT 0x4 +#define ACPI_GED_SLEEP_EVT 0x8 typedef struct GEDState { MemoryRegion evt; From patchwork Tue Dec 5 00:29:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Annie Li X-Patchwork-Id: 1871751 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2023-11-20 header.b=jeJQGNQm; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SkhJB3b8hz23mj for ; Tue, 5 Dec 2023 11:30:01 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAJJw-000214-V5; Mon, 04 Dec 2023 19:29:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJJv-00020f-Ae for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:29:51 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJJi-0001Ed-CQ for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:29:51 -0500 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B508rxS027754; Tue, 5 Dec 2023 00:29:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-11-20; bh=e563PxRpfieVE8cFiWYiyeuAtgAOuuzIth34eJG6iRo=; b=jeJQGNQmWm2ykX+lzuIDXVUtcpOXouM+XDeV+yXKSPDmQtE2VbhRFjUuUjsaCl3WAmlX jwoYxXmtq+nwKh1I7xtvQRopsOrKoOQknhNi/n+i/voeVFw1KI4dM3mFribXz5V0dKPu eB6fG4emmFHdGLQRDcp4Zr+KRgR2mljZJSuoky4EGpcXS1raKx9zdZKYUpt37c2dijog 5HW0V8YDzv3OunmxdDDg6OGKfY79y6sr6aYEZB9zyTlMY6A2tWmpig7xQm3xA2xoXgL2 eySbjxrQyf6f8AV+f5qeB9QcjEEWkdx+lrw1fKdVSZHK/jaCXQnbuzrVb+/aX3Ak7uXk kA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3uss28r13p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:29:35 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4MIXf5004891; Tue, 5 Dec 2023 00:29:33 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3uqu16desr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:29:33 +0000 Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3B50TWHa020135; Tue, 5 Dec 2023 00:29:32 GMT Received: from localhost.localdomain (dhcp-10-191-8-104.vpn.oracle.com [10.191.8.104]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3uqu16derv-1; Tue, 05 Dec 2023 00:29:32 +0000 From: Annie Li To: qemu-devel@nongnu.org, imammedo@redhat.com Cc: annie.li@oracle.com, miguel.luis@oracle.com Subject: [RFC PATCH 08/11] tests/acpi: allow FACP and DSDT table changes for arm/virt Date: Tue, 5 Dec 2023 00:29:27 +0000 Message-Id: <20231205002927.1023-1-annie.li@oracle.com> X-Mailer: git-send-email 2.30.1.windows.1 In-Reply-To: <20231205002143.562-1-annie.li@oracle.com> References: <20231205002143.562-1-annie.li@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-04_23,2023-12-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 phishscore=0 malwarescore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312050003 X-Proofpoint-ORIG-GUID: otkjVRuekycKy7GT9osExjDoeKAtPMv4 X-Proofpoint-GUID: otkjVRuekycKy7GT9osExjDoeKAtPMv4 Received-SPF: pass client-ip=205.220.165.32; envelope-from=annie.li@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Miguel Luis List changed files for FACP and DSDT table changes for the arm/virt. Signed-off-by: Miguel Luis --- tests/qtest/bios-tables-test-allowed-diff.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..83d368734c 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,8 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/virt/DSDT", +"tests/data/acpi/virt/DSDT.acpihmatvirt", +"tests/data/acpi/virt/DSDT.memhp", +"tests/data/acpi/virt/DSDT.pxb", +"tests/data/acpi/virt/DSDT.topology", +"tests/data/acpi/virt/FACP", + From patchwork Tue Dec 5 00:29:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Annie Li X-Patchwork-Id: 1871754 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2023-11-20 header.b=YWvGYi8b; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SkhQB5zq6z1ySh for ; Tue, 5 Dec 2023 11:35:14 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAJOb-0004U5-Co; Mon, 04 Dec 2023 19:34:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJOa-0004TF-Fl for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:34:40 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJOY-000206-MR for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:34:40 -0500 Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B50YZXf024891; Tue, 5 Dec 2023 00:34:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-11-20; bh=KmUIUjtXb1n+ltDZCqSdX4Qg0PXpmKV/JTMCdf5AzMk=; b=YWvGYi8b+cT6ahDUAsJDUe0dEa/tRapuJlzGYHgiZEjmIsEbda/PkMoSUdWukMSnTG5f exQGjivhEJzSpojOYBMlO9oELr7c2+G1B1xrX3mEGBUxFSg3l0tJUxwY7/KAuuCtLzVc onx6sD0f7QSd3011ft8FMqV5ldluFpQdXDVf/BBMpmfsZGKxV+hF6mzW2oMZ/SUqHoge bHgQRuuNKKPJ5dzpqBCnoFeES3+1LV5JKwmGEpi2FO4fhzRpENGCajDy/kbHbsjpR3/B Yr1xhKzT8Ecs74IA8j/bFNkEMxkuK9H6n1Kx2I1voCS+JXC6x7pQsMDgIzea/rsrBWKv 6A== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3usrvc00y5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:34:36 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4MIYYu004946; Tue, 5 Dec 2023 00:30:01 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3uqu16df21-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:30:01 +0000 Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3B50U19W021214; Tue, 5 Dec 2023 00:30:01 GMT Received: from localhost.localdomain (dhcp-10-191-8-104.vpn.oracle.com [10.191.8.104]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3uqu16df01-1; Tue, 05 Dec 2023 00:30:01 +0000 From: Annie Li To: qemu-devel@nongnu.org, imammedo@redhat.com Cc: annie.li@oracle.com, miguel.luis@oracle.com Subject: [RFC PATCH 09/11] hw/arm: enable sleep support for arm/virt Date: Tue, 5 Dec 2023 00:29:55 +0000 Message-Id: <20231205002955.367-1-annie.li@oracle.com> X-Mailer: git-send-email 2.30.1.windows.1 In-Reply-To: <20231205002143.562-1-annie.li@oracle.com> References: <20231205002143.562-1-annie.li@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-04_23,2023-12-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 phishscore=0 malwarescore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312050003 X-Proofpoint-GUID: 8rZNSSwtpuvMi0WGUJTkPY54a2A-HdCo X-Proofpoint-ORIG-GUID: 8rZNSSwtpuvMi0WGUJTkPY54a2A-HdCo Received-SPF: pass client-ip=205.220.177.32; envelope-from=annie.li@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Miguel Luis Include the ACPI control method device into arm/virt ACPI tables and the corresponding handling which enables triggering the event. Signed-off-by: Miguel Luis --- hw/arm/virt-acpi-build.c | 13 +++++++++++++ hw/arm/virt.c | 13 ++++++++++++- include/hw/arm/virt.h | 1 + 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 8bc35a483c..15e00cc5dc 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -42,6 +42,7 @@ #include "hw/acpi/pci.h" #include "hw/acpi/memory_hotplug.h" #include "hw/acpi/generic_event_device.h" +#include "hw/acpi/control_method_device.h" #include "hw/acpi/tpm.h" #include "hw/acpi/hmat.h" #include "hw/pci/pcie_host.h" @@ -816,6 +817,17 @@ static void build_fadt_rev6(GArray *table_data, BIOSLinker *linker, .rev = 6, .minor_ver = 0, .flags = 1 << ACPI_FADT_F_HW_REDUCED_ACPI, + /* ACPI 5.0: 4.8.3.7 Sleep Control and Status Registers */ + .sleep_ctl = { + .space_id = AML_AS_SYSTEM_MEMORY, + .bit_width = 8, + .address = vms->memmap[VIRT_ACPI_GED].base + ACPI_GED_REG_SLEEP_CTL, + }, + .sleep_sts = { + .space_id = AML_AS_SYSTEM_MEMORY, + .bit_width = 8, + .address = vms->memmap[VIRT_ACPI_GED].base + ACPI_GED_REG_SLEEP_STS, + }, .xdsdt_tbl_offset = &dsdt_tbl_offset, }; @@ -890,6 +902,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) } acpi_dsdt_add_power_button(scope); + acpi_dsdt_add_sleep_button(scope); #ifdef CONFIG_TPM acpi_dsdt_add_tpm(scope, vms); #endif diff --git a/hw/arm/virt.c b/hw/arm/virt.c index be2856c018..8b9a328360 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -644,7 +644,7 @@ static inline DeviceState *create_acpi_ged(VirtMachineState *vms) DeviceState *dev; MachineState *ms = MACHINE(vms); int irq = vms->irqmap[VIRT_ACPI_GED]; - uint32_t event = ACPI_GED_PWR_DOWN_EVT; + uint32_t event = ACPI_GED_PWR_DOWN_EVT | ACPI_GED_SLEEP_EVT; if (ms->ram_slots) { event |= ACPI_GED_MEM_HOTPLUG_EVT; @@ -931,6 +931,14 @@ static void create_rtc(const VirtMachineState *vms) g_free(nodename); } +static void virt_sleep_req(Notifier *n, void *opaque) +{ + VirtMachineState *s = container_of(n, VirtMachineState, sleep_notifier); + + if (s->acpi_dev) { + acpi_send_event(s->acpi_dev, ACPI_SLEEP_STATUS); + } +} static DeviceState *gpio_key_dev; static void virt_powerdown_req(Notifier *n, void *opaque) { @@ -2299,6 +2307,9 @@ static void machvirt_init(MachineState *machine) create_gpio_devices(vms, VIRT_SECURE_GPIO, secure_sysmem); } + /* connect sleep request */ + vms->sleep_notifier.notify = virt_sleep_req; + /* connect powerdown request */ vms->powerdown_notifier.notify = virt_powerdown_req; qemu_register_powerdown_notifier(&vms->powerdown_notifier); diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index f69239850e..82598c1879 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -170,6 +170,7 @@ struct VirtMachineState { DeviceState *gic; DeviceState *acpi_dev; Notifier powerdown_notifier; + Notifier sleep_notifier; PCIBus *bus; char *oem_id; char *oem_table_id; From patchwork Tue Dec 5 00:30:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Annie Li X-Patchwork-Id: 1871752 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2023-11-20 header.b=HhnHxh4g; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SkhKg5RQZz23mf for ; Tue, 5 Dec 2023 11:31:19 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAJKt-0002ZK-Qz; Mon, 04 Dec 2023 19:30:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJKr-0002UN-Tm for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:30:49 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJKp-0001aJ-Jt for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:30:49 -0500 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B508rpk027743; Tue, 5 Dec 2023 00:30:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-11-20; bh=aZBw/Sx7FTLNwV+8en4AZ/HHit6ZoFeEA3SzBFKAZGg=; b=HhnHxh4gd7lrHh3EPVRuGpG2Ab0JBrEiPou7xlV5fl1CHV+AEYnQGUtH7IYuAN9Zt+s8 1n1KfMwOvxavbGXBB85f5ulLy9kx1HyohIaiRlYKeIDO5wzdRZbZ9ExG13bw8DnlZn8O IoUZJ+CMPzNUg3T9rJMKqStL6jR8PGhnoBtrED4hKGusklgpiDSF+VBGZ68VBjHa6EhR bBVV+UO5pbxVxmFUDz0OOhlyHc8mTlH5zj0Z/XlAzfnj9W6rbkZcApYHEKVQzavj4Xdx tldvWyY3VHWP5yYTfR6E1oqs+mVb5xPyWK4KbDixQLqYnbSBTGTHes+iObvGz/OlWo3B Vw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3uss28r1eq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:30:45 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4MIXg7004891; Tue, 5 Dec 2023 00:30:45 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3uqu16dgma-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:30:44 +0000 Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3B50Ui8B024965; Tue, 5 Dec 2023 00:30:44 GMT Received: from localhost.localdomain (dhcp-10-191-8-104.vpn.oracle.com [10.191.8.104]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3uqu16dgg5-1; Tue, 05 Dec 2023 00:30:44 +0000 From: Annie Li To: qemu-devel@nongnu.org, imammedo@redhat.com Cc: annie.li@oracle.com, miguel.luis@oracle.com Subject: [RFC PATCH 10/11] tests/acpi: Update FACP and DSDT tables for sleep button Date: Tue, 5 Dec 2023 00:30:38 +0000 Message-Id: <20231205003038.1118-1-annie.li@oracle.com> X-Mailer: git-send-email 2.30.1.windows.1 In-Reply-To: <20231205002143.562-1-annie.li@oracle.com> References: <20231205002143.562-1-annie.li@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-04_23,2023-12-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 phishscore=0 malwarescore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312050003 X-Proofpoint-ORIG-GUID: eKSsQuJ6L3KLYqjuDiuWt9X45kRVpRI4 X-Proofpoint-GUID: eKSsQuJ6L3KLYqjuDiuWt9X45kRVpRI4 Received-SPF: pass client-ip=205.220.165.32; envelope-from=annie.li@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Miguel Luis * * ACPI Data Table [FACP] * * Format: [HexOffset DecimalOffset ByteLength] FieldName : FieldValue */ [000h 0000 4] Signature : "FACP" [Fixed ACPI Description Table (FADT)] [004h 0004 4] Table Length : 00000114 [008h 0008 1] Revision : 06 -[009h 0009 1] Checksum : 15 +[009h 0009 1] Checksum : E2 [00Ah 0010 6] Oem ID : "BOCHS " [010h 0016 8] Oem Table ID : "BXPC " [018h 0024 4] Oem Revision : 00000001 [01Ch 0028 4] Asl Compiler ID : "BXPC" [020h 0032 4] Asl Compiler Revision : 00000001 [024h 0036 4] FACS Address : 00000000 [028h 0040 4] DSDT Address : 00000000 [02Ch 0044 1] Model : 00 [02Dh 0045 1] PM Profile : 00 [Unspecified] [02Eh 0046 2] SCI Interrupt : 0000 [030h 0048 4] SMI Command Port : 00000000 [034h 0052 1] ACPI Enable Value : 00 [035h 0053 1] ACPI Disable Value : 00 [036h 0054 1] S4BIOS Command : 00 [037h 0055 1] P-State Control : 00 @@ -148,50 +148,50 @@ [0DCh 0220 1] Space ID : 00 [SystemMemory] [0DDh 0221 1] Bit Width : 00 [0DEh 0222 1] Bit Offset : 00 [0DFh 0223 1] Encoded Access Width : 00 [Undefined/Legacy] [0E0h 0224 8] Address : 0000000000000000 [0E8h 0232 12] GPE1 Block : [Generic Address Structure] [0E8h 0232 1] Space ID : 00 [SystemMemory] [0E9h 0233 1] Bit Width : 00 [0EAh 0234 1] Bit Offset : 00 [0EBh 0235 1] Encoded Access Width : 00 [Undefined/Legacy] [0ECh 0236 8] Address : 0000000000000000 [0F4h 0244 12] Sleep Control Register : [Generic Address Structure] [0F4h 0244 1] Space ID : 00 [SystemMemory] -[0F5h 0245 1] Bit Width : 00 +[0F5h 0245 1] Bit Width : 08 [0F6h 0246 1] Bit Offset : 00 [0F7h 0247 1] Encoded Access Width : 00 [Undefined/Legacy] -[0F8h 0248 8] Address : 0000000000000000 +[0F8h 0248 8] Address : 0000000009080000 [100h 0256 12] Sleep Status Register : [Generic Address Structure] [100h 0256 1] Space ID : 00 [SystemMemory] -[101h 0257 1] Bit Width : 00 +[101h 0257 1] Bit Width : 08 [102h 0258 1] Bit Offset : 00 [103h 0259 1] Encoded Access Width : 00 [Undefined/Legacy] -[104h 0260 8] Address : 0000000000000000 +[104h 0260 8] Address : 0000000009080001 [10Ch 0268 8] Hypervisor ID : 00000000554D4551 Raw Table Data: Length 276 (0x114) - 0000: 46 41 43 50 14 01 00 00 06 15 42 4F 43 48 53 20 // FACP......BOCHS + 0000: 46 41 43 50 14 01 00 00 06 E2 42 4F 43 48 53 20 // FACP......BOCHS 0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43 // BXPC ....BXPC 0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 0070: 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 0080: 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 00A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 00B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 00C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 00D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 00E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ - 00F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ - 0100: 00 00 00 00 00 00 00 00 00 00 00 00 51 45 4D 55 // ............QEMU + 00F0: 00 00 00 00 00 08 00 00 00 00 08 09 00 00 00 00 // ................ + 0100: 00 08 00 00 01 00 08 09 00 00 00 00 51 45 4D 55 // ............QEMU 0110: 00 00 00 00 // .... * * Original Table Header: * Signature "DSDT" - * Length 0x0000144C (5196) + * Length 0x0000149E (5278) * Revision 0x02 - * Checksum 0x9F + * Checksum 0x2B * 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 (C000) { Name (_HID, "ACPI0007" /* Processor Device */) // _HID: Hardware ID Name (_UID, Zero) // _UID: Unique ID } @@ -1876,27 +1876,48 @@ 0x00000029, } }) OperationRegion (EREG, SystemMemory, 0x09080000, 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 & 0x08) == 0x08)) + { + Notify (SLPB, 0x80) // Status Change + } } } Device (PWRB) { Name (_HID, "PNP0C0C" /* Power Button Device */) // _HID: Hardware ID Name (_UID, Zero) // _UID: Unique ID } + + Device (\_SB.SLPB) + { + Name (_HID, EisaId ("PNP0C0E") /* Sleep Button Device */) // _HID: Hardware ID + Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake + { + One, + 0x04 + }) + OperationRegion (\B**, SystemIO, 0x0201, One) + Field (\B**, ByteAcc, NoLock, WriteAsZeros) + { + SBP, 1, + SBW, 1 + } + } } } Signed-off-by: Miguel Luis --- tests/data/acpi/virt/DSDT | Bin 5196 -> 5278 bytes tests/data/acpi/virt/DSDT.acpihmatvirt | Bin 5282 -> 5364 bytes tests/data/acpi/virt/DSDT.memhp | Bin 6557 -> 6639 bytes tests/data/acpi/virt/DSDT.pxb | Bin 7679 -> 7761 bytes tests/data/acpi/virt/DSDT.topology | Bin 5398 -> 5480 bytes tests/data/acpi/virt/FACP | Bin 276 -> 276 bytes tests/qtest/bios-tables-test-allowed-diff.h | 7 ------- 7 files changed, 7 deletions(-) diff --git a/tests/data/acpi/virt/DSDT b/tests/data/acpi/virt/DSDT index c47503990715d389914fdf9c8bccb510761741ac..ca4e2949adc72f70282bd9d5d311b67ed1f5d4eb 100644 GIT binary patch delta 146 zcmX@3F;A1rCDB8f9frpPH qJ|HMuh?R+vizT`t#wkBPo{^i8i7~oS5X^B5b_$4R40Z~SX9NIW&nAEX delta 63 zcmbQIc}9cFCD0kbdzL2c#soEyoaX?Z-8HbfwO@#14n$Qrwc=LlYNX{e6UkINF`VSkK+X% sK92Z+pl~5pCPprn=!O`l{QP)EZbl}?=te;>$1&I`Af7SUDLkGL0REXLM*si- delta 66 zcmeyOxk!`CCD%GNW^&}3d{8);$%kdKn26WrLJ?b505dcU A*Z=?k diff --git a/tests/data/acpi/virt/DSDT.pxb b/tests/data/acpi/virt/DSDT.pxb index fbd78f44c4785d19759daea909fe6d6f9a6e6b01..785e3834f17f021ce0212c1b943f3d88aa3409d6 100644 GIT binary patch delta 123 zcmexwebI)?CDz9t$!j8)G*i!`jq2XAOwJsWOJsu?^(LQ?mEl_;Fu6K`i-UoS zqb=AcVDdv*ImhTG`xw3WV5fMXfD=c&ho=jV;{_f*j`)C}a3NMEMlP1!KfGC8qNE|Cppl%0G+Rz^CyNirZj$cZD~ W!_$Q~z%RhS*}$2BBR2rM9S delta 42 ycmaE%HBF1lCDl23`OF delta 30 kcmbQjG=+)F&CxkPgpq-PO>`pH>xl;99D%OBp$tF(0B1o49{>OV diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index 83d368734c..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,8 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/virt/DSDT", -"tests/data/acpi/virt/DSDT.acpihmatvirt", -"tests/data/acpi/virt/DSDT.memhp", -"tests/data/acpi/virt/DSDT.pxb", -"tests/data/acpi/virt/DSDT.topology", -"tests/data/acpi/virt/FACP", - From patchwork Tue Dec 5 00:31:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Annie Li X-Patchwork-Id: 1871753 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2023-11-20 header.b=lYXGoOT5; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SkhKn0trMz23mf for ; Tue, 5 Dec 2023 11:31:25 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAJLJ-00034R-6D; Mon, 04 Dec 2023 19:31:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJLH-00034B-Tw for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:31:15 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAJLG-0001cS-9v for qemu-devel@nongnu.org; Mon, 04 Dec 2023 19:31:15 -0500 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B508ZbL027538; Tue, 5 Dec 2023 00:31:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-11-20; bh=yMwjAub9+1KHYiieejFgLR3tmFcx5/8qKqcboFkhuks=; b=lYXGoOT5M6qHlYmNpBUgmytBwxRSCGhr6AZ1LPL3Mbz95cqcXw8K5EZZ4i+gUQHc7N82 iriZF/lpJVpxd6dYPgDuexb1xVgmQfc+ZlCAP//Tl8o/RjTFEo5ovjTt49XcR0gt3Lav HZJgx/JTwCWdYxeZahQgYshU6h9iCA/4fYc/ID3Xe1YlAkm8JWJXf9K/yKQPESu2bzlk RMbXpwjnPeeLUmFoBBkhhR8Wap0wdtgUr+5ELn1YFyUEQAGEUuVD1Ujt661flsQx/sMk keqpo45iG5o+OcT/ZIa+3vuaYV3WFPijJSaj+ZqhYKPAyVj6YtNXiDi2anN8XTmcTo7z SA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3uss28r1g7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:31:12 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4MIXgZ004891; Tue, 5 Dec 2023 00:31:12 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3uqu16dheu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Dec 2023 00:31:12 +0000 Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3B50Rjkd016626; Tue, 5 Dec 2023 00:31:11 GMT Received: from localhost.localdomain (dhcp-10-191-8-104.vpn.oracle.com [10.191.8.104]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3uqu16dhc0-1; Tue, 05 Dec 2023 00:31:11 +0000 From: Annie Li To: qemu-devel@nongnu.org, imammedo@redhat.com Cc: annie.li@oracle.com, miguel.luis@oracle.com Subject: [RFC PATCH 11/11] arm/virt: enable sleep support Date: Tue, 5 Dec 2023 00:31:06 +0000 Message-Id: <20231205003106.1297-1-annie.li@oracle.com> X-Mailer: git-send-email 2.30.1.windows.1 In-Reply-To: <20231205002143.562-1-annie.li@oracle.com> References: <20231205002143.562-1-annie.li@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-04_23,2023-12-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 phishscore=0 malwarescore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312050003 X-Proofpoint-ORIG-GUID: BIvWiSmTp9OTJPAjEEKRM47fCitC9MvF X-Proofpoint-GUID: BIvWiSmTp9OTJPAjEEKRM47fCitC9MvF Received-SPF: pass client-ip=205.220.165.32; envelope-from=annie.li@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Miguel Luis This is for reference that qmp_system_sleep relies on wakeup support delegated by qemu_wakeup_suspend_enabled() hence the need for calling qemu_register_wakeup_support(). Signed-off-by: Miguel Luis --- hw/arm/virt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 8b9a328360..6407734105 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2309,6 +2309,7 @@ static void machvirt_init(MachineState *machine) /* connect sleep request */ vms->sleep_notifier.notify = virt_sleep_req; + qemu_register_wakeup_support(); /* connect powerdown request */ vms->powerdown_notifier.notify = virt_powerdown_req;