From patchwork Wed Feb 15 06:15:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ben@skyportsystems.com X-Patchwork-Id: 9573405 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5847A60209 for ; Wed, 15 Feb 2017 06:16:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AC7727C2D for ; Wed, 15 Feb 2017 06:16:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D20728427; Wed, 15 Feb 2017 06:16:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7B6E927C2D for ; Wed, 15 Feb 2017 06:16:43 +0000 (UTC) Received: from localhost ([::1]:38679 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdstN-00023W-HH for patchwork-qemu-devel@patchwork.kernel.org; Wed, 15 Feb 2017 01:16:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdssu-00023G-A2 for qemu-devel@nongnu.org; Wed, 15 Feb 2017 01:16:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cdsss-0007DT-Cs for qemu-devel@nongnu.org; Wed, 15 Feb 2017 01:16:12 -0500 Received: from mail-pf0-x235.google.com ([2607:f8b0:400e:c00::235]:33264) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cdsss-0007DL-6r for qemu-devel@nongnu.org; Wed, 15 Feb 2017 01:16:10 -0500 Received: by mail-pf0-x235.google.com with SMTP id c73so25593662pfb.0 for ; Tue, 14 Feb 2017 22:16:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skyportsystems.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=xI9yNj/AdNLbuKActthWBf3JikGO539hMq+RqAg0YVU=; b=39fC1LqakeTK8SohXuJ2WQkmcaDjW4bkCwZdEVXFLDf3E+si3FRcclgY2MPhHFyyuh j9OHZgMjA3+hXOFYXvxPQDxZUZw6XRadasAGIoDZWznQc24FAtVyYfgbczNsWkmgXZJg sEX1v7P4tIA3aWvvobeCuzzJNGCCxFgL9kGTQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=xI9yNj/AdNLbuKActthWBf3JikGO539hMq+RqAg0YVU=; b=cGBAgncTQ4sAIEq1afo9gwv400RneP6HeBjY9bdWmg8M/HXLc1TyAPyj1nIR1iRGSv GJ5lZnSybiHOqyWed+pzj00+68ONrndmsulCCrXI3gVr4OelDJ0YivOnjsUOKU2oWYn7 X2ASKu3tfc4ppcT4GspVlt9KBtfdVZcyaPl9ZrHGyXxBqP+QBK96ZFWr/wZy1xV00POV TH5vvP+I2212UYqKqwai39GATGwjTSnv/UVj9X6hxDu/K0n35E7yMdKonPHfqIvEEcyj /411+okUQbv7MiuU559y/2r6Sqg6q/vgbj14lJ8WMPjoMvvokPSMHSvUg34Az80cfHsu nHNA== X-Gm-Message-State: AMke39loiE5FKsqvfaXSMIXpI2qA18OGNPgTSImfiYMBAqrbZAEMLGGpwNe31H198TYaORCE X-Received: by 10.99.2.4 with SMTP id 4mr18316832pgc.5.1487139369403; Tue, 14 Feb 2017 22:16:09 -0800 (PST) Received: from Arrow.corp.skyportsystems.com (76-236-31-201.lightspeed.sntcca.sbcglobal.net. [76.236.31.201]) by smtp.gmail.com with ESMTPSA id n70sm4690150pfg.34.2017.02.14.22.16.07 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 14 Feb 2017 22:16:07 -0800 (PST) From: ben@skyportsystems.com To: qemu-devel@nongnu.org Date: Tue, 14 Feb 2017 22:15:45 -0800 Message-Id: <60b6ece3ce0a24aec79c1061627fa2e6ab058fc2.1487139038.git.ben@skyportsystems.com> X-Mailer: git-send-email 2.10.1 (Apple Git-78) In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::235 Subject: [Qemu-devel] [PATCH v6 3/7] ACPI: Add vmgenid blob storage to the build tables X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imammedo@redhat.com, lersek@redhat.com, Ben Warren , mst@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Ben Warren This allows them to be centrally initialized and destroyed The "AcpiBuildTables.vmgenid" array will be used to construct the "etc/vmgenid" fw_cfg blob. Its contents will be linked into fw_cfg after being built on the pc_machine_done() -> acpi_setup() -> acpi_build() call path, and dropped without use on the subsequent, guest triggered, acpi_build_update() -> acpi_build() call path. Signed-off-by: Ben Warren Reviewed-by: Laszlo Ersek Reviewed-by: Igor Mammedov --- hw/acpi/aml-build.c | 2 ++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 3 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index b2a1e40..c6f2032 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -1559,6 +1559,7 @@ void acpi_build_tables_init(AcpiBuildTables *tables) tables->rsdp = g_array_new(false, true /* clear */, 1); tables->table_data = g_array_new(false, true /* clear */, 1); tables->tcpalog = g_array_new(false, true /* clear */, 1); + tables->vmgenid = g_array_new(false, true /* clear */, 1); tables->linker = bios_linker_loader_init(); } @@ -1568,6 +1569,7 @@ void acpi_build_tables_cleanup(AcpiBuildTables *tables, bool mfre) g_array_free(tables->rsdp, true); g_array_free(tables->table_data, true); g_array_free(tables->tcpalog, mfre); + g_array_free(tables->vmgenid, mfre); } /* Build rsdt table */ diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index 559326c..00c21f1 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -210,6 +210,7 @@ struct AcpiBuildTables { GArray *table_data; GArray *rsdp; GArray *tcpalog; + GArray *vmgenid; BIOSLinker *linker; } AcpiBuildTables;