From nobody Mon Feb 9 22:39:19 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=1665076687; cv=none; d=zohomail.com; s=zohoarc; b=XcXHyUHmgrOG8Pr0c47UV7xzs+EQHrs/W6Ak9KKR7rPrMC+zXC6PiRj/k5pcULt0NvINIgy9Ya3eByplYW44vM3MWzBSiYVLAKRAJRLFxMvdTCIN9ZbUVuwvoX/mawhYfx/eOLvftlkL5DwTR6MRUcfz0DRrMYVg5UIsRA4teDM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665076687; 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=3KYlp9niCt61OSJPWbphR2HpAFLdUAVFlJ/zEozb2SI=; b=BjimHRsAZ3p5bZ9Wp9H0efoUEtPO6iCaOKmv2DPlwQx/hjsNGOTZh9jD8qgRLKyKuDKYTx6UbSWhNtEN5yQJ3/hWl/TwhjXTcjiNaTdi0lXzTaJR+H/tw7oxVKSc2ERPq/BFsOEDqWY2jiLEGAeyQxWWYZZE1+sPx62NvKnVRCU= 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 1665076686995972.5508879078474; Thu, 6 Oct 2022 10:18:06 -0700 (PDT) Received: from localhost ([::1]:52534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogUVZ-00080a-Pm for importer@patchew.org; Thu, 06 Oct 2022 13:18:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogTXB-0007Oq-Bd; Thu, 06 Oct 2022 12:15:42 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:25894) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogTX9-0006nZ-6u; Thu, 06 Oct 2022 12:15:40 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 296FhmeR001815; Thu, 6 Oct 2022 16:15:37 GMT Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3jxd5tmn57-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 06 Oct 2022 16:15:37 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 296FAfJo028246; Thu, 6 Oct 2022 16:15:36 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3jxc06eqaq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 06 Oct 2022 16:15:36 +0000 Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 296GFLrj001092; Thu, 6 Oct 2022 16:15:35 GMT Received: from mlluis-mac.uk.oracle.com (dhcp-10-175-170-234.vpn.oracle.com [10.175.170.234]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3jxc06eq1e-3; Thu, 06 Oct 2022 16:15:35 +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=3KYlp9niCt61OSJPWbphR2HpAFLdUAVFlJ/zEozb2SI=; b=nijCasxjYJYuUeDsWWq8nCPqTApRh+GX+oGnfFNjy+sE7LRd8I02R+b19n81kR8Lnabw //u98TONYTOV8u/ATXiFNoOmMmeedIUUCxSJOJDvbxI2fsN5EUsxOUR2NFI1gbFOgY1H 2QsEnwKhStPAskHFahWTMlRElcQ9tS1cKMLm0CeKR2aUAjWGeQVP+p8Zk2+MY73I5aKi O/l/1TmD2GbLl6NrztEPp4syed3dI+7JN/Fx2/WDjFgDdPSmoRRovGidPBF1LaKSpTzQ SiknXz6zxCHnEKzJ3S8eY4PBLTDNkyCyQ2D6rb7gHsDkeywSM8GK75YQYbi1uyqZTB/p vg== 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: [RFC PATCH 2/4] acpi: fadt: support revision 6.0 of the ACPI specification Date: Thu, 6 Oct 2022 16:14:48 +0000 Message-Id: <20221006161450.69912-3-miguel.luis@oracle.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221006161450.69912-1-miguel.luis@oracle.com> References: <20221006161450.69912-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.528,FMLib:17.11.122.1 definitions=2022-10-06_04,2022-10-06_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 malwarescore=0 adultscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210060094 X-Proofpoint-ORIG-GUID: cpAo_Gu8ZCtUxilNMK1BpbgQtI02VTOp X-Proofpoint-GUID: cpAo_Gu8ZCtUxilNMK1BpbgQtI02VTOp 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.177.32; envelope-from=miguel.luis@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_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: 1665076689041100001 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" that was missin= g. 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." Hereupon, what should a valid identifier of an Hypervisor Vendor ID be and where should QEMU provide that information? On this RFC there's the suggestion of having this information in sync by the current acceleration name. This also seems to imply that QEMU, which genera= tes the FADT table, and the FADT consumer need to be in sync with the values of= this field. Signed-off-by: Miguel Luis --- hw/acpi/aml-build.c | 14 +++++++++++--- hw/arm/virt-acpi-build.c | 10 +++++----- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index e6bfac95c7..5258c4ac64 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -31,6 +31,7 @@ #include "hw/pci/pci_bus.h" #include "hw/pci/pci_bridge.h" #include "qemu/cutils.h" +#include "qemu/accel.h" =20 static GArray *build_alloc_array(void) { @@ -2070,7 +2071,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 +2194,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 5) { + goto done; + } + + /* Hypervisor Vendor Identity */ + build_append_padded_str(tbl, current_accel_name(), 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