From nobody Sun Dec 14 06:32:16 2025 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=1667861511; cv=none; d=zohomail.com; s=zohoarc; b=Px46x66V3ZP8OZIAMy+gnv/oRefiWzkrSp6mrl2NcAlLyuhj6d+QRqDO8D5xvTknZsWIbhlO0gN5rLlJqdPEkIsPGlIsdAys+lsfjxkitZejaMfCx062TIU7ovXu90XDrG2l3oLvuWQHeLk7KiBjQ5FJzBYOsMtQINYMmjAp9jU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667861511; 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=YTQQa267FEb2mhWix5yH2wS4HRW/gV7CccWSCgNjRuRW5MPUfC9WrD8ELS4+v3KDCIeZMRsT491RtE0b73UtvPMf0mdi5KJ5HwrcIMf7MgMbLLHw0bsQdYvzQdTRBLgTTkVIEi6P/2n9gIgO2FoP04MCtNs+cf2jkM2a7J44Oq4= 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 1667861511287485.96115690522083; Mon, 7 Nov 2022 14:51:51 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osAvb-0007Db-Aj; Mon, 07 Nov 2022 17:49:15 -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 1osAvY-00079q-QN for qemu-devel@nongnu.org; Mon, 07 Nov 2022 17:49:12 -0500 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 1osAvX-0001kE-7L for qemu-devel@nongnu.org; Mon, 07 Nov 2022 17:49:12 -0500 Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-192-Hek0B_vnMPqlFlszXBEBPg-1; Mon, 07 Nov 2022 17:49:09 -0500 Received: by mail-qk1-f197.google.com with SMTP id x22-20020a05620a259600b006b552a69231so11289344qko.18 for ; Mon, 07 Nov 2022 14:49:09 -0800 (PST) Received: from redhat.com ([87.249.138.11]) by smtp.gmail.com with ESMTPSA id az36-20020a05620a172400b006ce9e880c6fsm7959843qkb.111.2022.11.07.14.49.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 14:49:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667861350; 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=P8ofswXUJ9pwDMDmZcrEGB1hJq8+tKQdB6lIUTegdSKqVTgFkiwmm/6bPlTfLN91+kc7qX P3gLnTcchPJ+HAKi3sYORV8aFNW9PP6YCsU3Yq6VQTKlYhSSLHJVhOZj6wRluGWWyniaOr Vbm5kQ73iWhUC36Biclf3gke09vPl/g= X-MC-Unique: Hek0B_vnMPqlFlszXBEBPg-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=tkeVmh4x/Xo31hMEEV9JgHIgKh5bHQ4YMJOwyLHgmu4CqlzR7cOWdpmwyJUDn+GHAJ 7wSZmvIGn7Ja3nlwIPCA7Tp3SE4PMXtHWkkhnTGnZ5DAGoGq2CXxLukzz5APBUGUpZJ1 dYKKHV5Zuq+rGVqNwQaPuvabFDF9C61t0iSE0BaV8FNImUjV9/FzyYkAi3H4IxhvQd1d xp9uI8kJk+Gp3Kc0sD3xCoEOQob9dEi0xwNkkXKz7Rrc3Gu2iQdSMwP/aXDzzg5V+rpO iqQsumWQa0aRBEAANorzFkySe4TWOPdem0/enG/4bdJp7fHqSR7CMDS+DRs+W4Hr9Zlh chhg== X-Gm-Message-State: ACrzQf2YmaC+XTLqscQ0s4h1/OKCCxFfBnUR1AM20u3dlFQNwvHQzuvz 8Dy4FUuW2mlojsOkdaaEW9YkhmRHRV4dkbePjxKiSyI+XF8lDf4CPg2DwsasOD879X+SrqTL21l /kQYC3AEn7gJ9K0F2ggKpmpCnhkRbhGccP5/7n5mFxjBTjIMj7JHmE2u4TRvB X-Received: by 2002:ac8:664d:0:b0:3a5:68b6:887f with SMTP id j13-20020ac8664d000000b003a568b6887fmr13956999qtp.458.1667861349126; Mon, 07 Nov 2022 14:49:09 -0800 (PST) X-Google-Smtp-Source: AMsMyM5suwU/1CDhijc/FGT+CO0Ib5H7cIhttsJyqMbmRvEtHv8wIx578OnbHSX29Stjr5WuNTbSyw== X-Received: by 2002:ac8:664d:0:b0:3a5:68b6:887f with SMTP id j13-20020ac8664d000000b003a568b6887fmr13956980qtp.458.1667861348817; Mon, 07 Nov 2022 14:49:08 -0800 (PST) Date: Mon, 7 Nov 2022 17:49:03 -0500 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 v4 18/83] acpi: fadt: support revision 6.0 of the ACPI specification Message-ID: <20221107224600.934080-19-mst@redhat.com> References: <20221107224600.934080-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221107224600.934080-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667861512589100009 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