From nobody Tue Feb 10 20:28:40 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1667406276; cv=none; d=zohomail.com; s=zohoarc; b=KWZEIJO8Cerxrng+YVg+zm8fkALdb2zOBrfc2A3aoJ5/C03uWCZNIBf+zJ1JEOS8VQnShjg4gIAe8JhvEc+AwEXHyPO1M9B1vxrXubuz5kvjJO9E+rCY74jHRwmsMenIYhrr5qJ2lPaCrXnMvDFBuboZDPfC1dS6dU14W/OLJ24= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667406276; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jDPHfFPBmUiBzVFQbV+4l1hgXmVtWz7Ck3nwksImP0A=; b=K6R1U1YkGCBZyANq7XxrWC6vl4upF6TkjztV7HCVzGEYLVEl4QeyGLC2M90Ot0cDIpqEH2KdCO91rOgMHapHmWI6f986DR/k2k2S1ldyW/jBApOmeCqOO9UYT5lcuXj5cHAJ6+uEql3vvSMwEtBhY0ua9WElWktzoHowSdWl8wQ= 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 1667406276052250.3893465357296; Wed, 2 Nov 2022 09:24:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqGJD-0004AJ-A5; Wed, 02 Nov 2022 12:09:43 -0400 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 1oqGJ0-0003c5-WA for qemu-devel@nongnu.org; Wed, 02 Nov 2022 12:09:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqGIz-0002Rm-GI for qemu-devel@nongnu.org; Wed, 02 Nov 2022 12:09:30 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-66-h5w05AV2OsmIFc2j_MckxQ-1; Wed, 02 Nov 2022 12:09:27 -0400 Received: by mail-wm1-f71.google.com with SMTP id p14-20020a05600c204e00b003cf4cce4da5so650193wmg.0 for ; Wed, 02 Nov 2022 09:09:27 -0700 (PDT) Received: from redhat.com ([2.52.15.189]) by smtp.gmail.com with ESMTPSA id cy2-20020a056000400200b0022afedf3c87sm13410422wrb.105.2022.11.02.09.09.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 09:09:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667405368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jDPHfFPBmUiBzVFQbV+4l1hgXmVtWz7Ck3nwksImP0A=; b=PrpfCEaz8HyLLm3QAZ4W2h5uzjoUhVOTnSLLfbsc/fSA+qLFX8vyLuD55B0pumW+Kx9NkM vRktFkhm1/u6+st7FiyEcRb/urAoBbnQzIRkeEPiKLkL6gxaUfPlsyhapQu4CRdcSK91hK iM7QR10CxfnhD+UMIy0BSkHoyIyeU/4= X-MC-Unique: h5w05AV2OsmIFc2j_MckxQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jDPHfFPBmUiBzVFQbV+4l1hgXmVtWz7Ck3nwksImP0A=; b=isHL5JTgvDEntf6cKm3MOJZAEB9tLwsbRtKXP8+fw6o7v01yuzZYgEeBrGWgZFr1Kh M1YsgOLq4mbdtChwBVWAT+sPa/rnb4D8nbWFmonN4wDYjnsmk1ipEPUZtyBRNJQ0aprc ZKz2EcgpZYMkidM2qUevS4IA9NEg53/pbgaQfX6rBFR4puz97OEtwcj1pB+zo4En1DgJ a/WtrXMytk6/Lmn25X8wiTytC2XvWMp0at8tYRAORSCGroa6fXX15i08ey0UYUtPdKKp T97htA4G6I7gCl6vm6kz1qF3GQ7N1bMxb74QLenjij4uSXgk+xi/0Xi4s7dDtFJkG+uk 7DaA== X-Gm-Message-State: ACrzQf00ZD8SPnJTCE82EAj+zHMxaH+M6wOF1O8Wq9+LAzEySKl/MXeu /EIbZcCPdxDh6l1+kfP6tKY6kZNfI8pBhFSkQna5fgu1RQak1Wwm7urlhhV8mszvTsf6Bi41Aei 3tu1AmmVPcQv7nqtpJDwRmRWPFqqJO3TijWz5pZ3moEyCtCHGnJ9+Jx7RLkkB X-Received: by 2002:adf:c082:0:b0:236:d057:3fff with SMTP id d2-20020adfc082000000b00236d0573fffmr9822528wrf.206.1667405366484; Wed, 02 Nov 2022 09:09:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6CHCrSTqjJQxWj9tA8/iRgap7tanuxZnm51GsJmDTnfk8KtgfLma8Z7yPkXqhKAimtQpEMzA== X-Received: by 2002:adf:c082:0:b0:236:d057:3fff with SMTP id d2-20020adfc082000000b00236d0573fffmr9822483wrf.206.1667405366021; Wed, 02 Nov 2022 09:09:26 -0700 (PDT) Date: Wed, 2 Nov 2022 12:09:23 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Miguel Luis , Ani Sinha , Igor Mammedov , Shannon Zhao , qemu-arm@nongnu.org Subject: [PULL v2 23/82] acpi: fadt: support revision 6.0 of the ACPI specification Message-ID: <20221102160336.616599-24-mst@redhat.com> References: <20221102160336.616599-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221102160336.616599-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent 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=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.048, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667406277131100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Miguel Luis 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 Message-Id: <20221011181730.10885-3-miguel.luis@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- 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 13c6e3e468..e5377744f3 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -808,13 +808,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, }; @@ -944,7 +944,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 MST