From nobody Mon Feb 9 16:34:05 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1665512629; cv=none; d=zohomail.com; s=zohoarc; b=IpGInPv81Pd2nkV+36FLgW+ky1tz0nvLAJcur+pr1R4nJTW06/odsPzIFKsU7DqXc5EyNaGQPTGMqpZT00D/dtYtQ/+nEbd7u1H2Ej3Lc/YokoEiBNcoOsvme1Y8Dmc8frrkMrNRVi7Rss0IyhBJVNCdFda8J0UCOiZiBtOCVYw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665512629; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=q4SCAvrzpUZp+tppEb8sYXNtOjtBTKwJQtiP2DYzA0Y=; b=OHjAz3AQFnFCJBOPOG366AO8KBdt5JTe5Ko5Oyct9o7c/jxdxcasI1IHR79PFrk54MPcT8wrvwyEZG3ZQsEWbxFONIfU+3cPZaLr/e3x9C+MJ/fwESxb1orW7F7EWf7q0geDBMtFtaGU+Dg73LTHs5mP43Bco44SW+XeSUXa/W4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1665512629162858.9900713335285; Tue, 11 Oct 2022 11:23:49 -0700 (PDT) Received: from localhost ([::1]:43302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiJut-0000nn-Aw for importer@patchew.org; Tue, 11 Oct 2022 14:23:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiJpS-0006it-5o; Tue, 11 Oct 2022 14:18:10 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:64394) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiJpQ-0003Th-AU; Tue, 11 Oct 2022 14:18:09 -0400 Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29BHTasb012021; Tue, 11 Oct 2022 18:18:03 GMT Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3k3139yhd1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 11 Oct 2022 18:18:03 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 29BIBr1J027365; Tue, 11 Oct 2022 18:18:01 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3k2ynaf4jy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 11 Oct 2022 18:18:01 +0000 Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 29BIEwgq034553; Tue, 11 Oct 2022 18:18:01 GMT Received: from mlluis-mac.uk.oracle.com (dhcp-10-175-196-28.vpn.oracle.com [10.175.196.28]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 3k2ynaf4fc-3; Tue, 11 Oct 2022 18:18:01 +0000 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 : reply-to : mime-version : content-transfer-encoding; s=corp-2022-7-12; bh=q4SCAvrzpUZp+tppEb8sYXNtOjtBTKwJQtiP2DYzA0Y=; b=Uy/4JCL8VQQerl3z0JDdgMzYHqlQlw3pjMDNRPyMLKoin4RolqtZcuAcfoT74YeKoRpH Vy1XXZzno5hFZqbA5MsKMeLa3sEkI0PraMS0qHnEK2IJUzS8Xzvk1N/Zxe3UUXiJytls ydPFu0DKP6OqmYuLTnIQ5bMQoQeaG53mi/nFEo9vTTgM8/IDPu6BKrx10Q2Nc4z0lOAi O5hYfgVUjHpt1dTU1NKO2/zjLQJOFD6AEJFEdJXIry1tNg0uZfw1j6bcXk1AlGHGR7by 8aRtsGzqjTDUhv5Y64IR8gyb5qeHwsUDL/LtJm+6dR5vIcANn35arR8MkUFMV07kK0pV Ag== From: Miguel Luis To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Cc: mst@redhat.com, imammedo@redhat.com, ani@anisinha.ca, shannon.zhaosl@gmail.com, peter.maydell@linaro.org, miguel.luis@oracle.com Subject: [PATCH 2/4] acpi: fadt: support revision 6.0 of the ACPI specification Date: Tue, 11 Oct 2022 18:17:28 +0000 Message-Id: <20221011181730.10885-3-miguel.luis@oracle.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011181730.10885-1-miguel.luis@oracle.com> References: <20221011181730.10885-1-miguel.luis@oracle.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-11_08,2022-10-11_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=0 adultscore=0 mlxscore=0 bulkscore=0 malwarescore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210110106 X-Proofpoint-GUID: edKTIFxyppXS3XYEckxeIhTHkXt2qsA5 X-Proofpoint-ORIG-GUID: edKTIFxyppXS3XYEckxeIhTHkXt2qsA5 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.220.165.32; envelope-from=miguel.luis@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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Reply-To: miguel.luis@oracle.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @oracle.com) X-ZM-MESSAGEID: 1665512629760100001 Content-Type: text/plain; charset="utf-8" Update the Fixed ACPI Description Table (FADT) to revision 6.0 of the ACPI specification adding the field "Hypervisor Vendor Identity". This field's description states the following: "64-bit identifier of hyperv= isor vendor. All bytes in this field are considered part of the vendor identity. These identifiers are defined independently by the vendors themselves, usually following the name of the hypervisor product. Version information should NOT be included in this field - this shall simply denote the vendor's name or identifier. Version information can be communicated through a supplemental vendor-specific hypervisor API. Firmware implementers would place zero bytes into this field, denoting that no hypervisor is present in the actual firmware." Signed-off-by: Miguel Luis Reviewed-by: Ani Sinha --- hw/acpi/aml-build.c | 13 ++++++++++--- hw/arm/virt-acpi-build.c | 10 +++++----- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index e6bfac95c7..42feb4d4d7 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -2070,7 +2070,7 @@ void build_pptt(GArray *table_data, BIOSLinker *linke= r, MachineState *ms, acpi_table_end(linker, &table); } =20 -/* build rev1/rev3/rev5.1 FADT */ +/* build rev1/rev3/rev5.1/rev6.0 FADT */ void build_fadt(GArray *tbl, BIOSLinker *linker, const AcpiFadtData *f, const char *oem_id, const char *oem_table_id) { @@ -2193,8 +2193,15 @@ void build_fadt(GArray *tbl, BIOSLinker *linker, con= st AcpiFadtData *f, /* SLEEP_STATUS_REG */ build_append_gas_from_struct(tbl, &f->sleep_sts); =20 - /* TODO: extra fields need to be added to support revisions above rev5= */ - assert(f->rev =3D=3D 5); + if (f->rev =3D=3D 5) { + goto done; + } + + /* Hypervisor Vendor Identity */ + build_append_padded_str(tbl, "QEMU", 8, '\0'); + + /* TODO: extra fields need to be added to support revisions above rev6= */ + assert(f->rev =3D=3D 6); =20 done: acpi_table_end(linker, &table); diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 9b3aee01bf..72bb6f61a5 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -809,13 +809,13 @@ build_madt(GArray *table_data, BIOSLinker *linker, Vi= rtMachineState *vms) } =20 /* FADT */ -static void build_fadt_rev5(GArray *table_data, BIOSLinker *linker, +static void build_fadt_rev6(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms, unsigned dsdt_tbl_offse= t) { - /* ACPI v5.1 */ + /* ACPI v6.0 */ AcpiFadtData fadt =3D { - .rev =3D 5, - .minor_ver =3D 1, + .rev =3D 6, + .minor_ver =3D 0, .flags =3D 1 << ACPI_FADT_F_HW_REDUCED_ACPI, .xdsdt_tbl_offset =3D &dsdt_tbl_offset, }; @@ -945,7 +945,7 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTa= bles *tables) =20 /* FADT MADT PPTT GTDT MCFG SPCR DBG2 pointed to by RSDT */ acpi_add_table(table_offsets, tables_blob); - build_fadt_rev5(tables_blob, tables->linker, vms, dsdt); + build_fadt_rev6(tables_blob, tables->linker, vms, dsdt); =20 acpi_add_table(table_offsets, tables_blob); build_madt(tables_blob, tables->linker, vms); --=20 2.37.3