From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1B01DC4332F for ; Mon, 7 Nov 2022 22:51:57 +0000 (UTC) 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 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= 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 X-MC-Unique: Hek0B_vnMPqlFlszXBEBPg-1 Received: by mail-qk1-f197.google.com with SMTP id x22-20020a05620a259600b006b552a69231so11289344qko.18 for ; Mon, 07 Nov 2022 14:49:09 -0800 (PST) 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) 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) 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-Type: text/plain; charset=us-ascii 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org 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 hypervisor 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 *linker, MachineState *ms, acpi_table_end(linker, &table); } -/* 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, const AcpiFadtData *f, /* SLEEP_STATUS_REG */ build_append_gas_from_struct(tbl, &f->sleep_sts); - /* TODO: extra fields need to be added to support revisions above rev5 */ - assert(f->rev == 5); + if (f->rev == 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 == 6); 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, VirtMachineState *vms) } /* 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_offset) { - /* ACPI v5.1 */ + /* ACPI v6.0 */ AcpiFadtData fadt = { - .rev = 5, - .minor_ver = 1, + .rev = 6, + .minor_ver = 0, .flags = 1 << ACPI_FADT_F_HW_REDUCED_ACPI, .xdsdt_tbl_offset = &dsdt_tbl_offset, }; @@ -944,7 +944,7 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) /* 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); acpi_add_table(table_offsets, tables_blob); build_madt(tables_blob, tables->linker, vms); -- MST