From patchwork Thu Feb 16 06:18:13 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: 9576549 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 BAD6560586 for ; Thu, 16 Feb 2017 06:19:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD774285A2 for ; Thu, 16 Feb 2017 06:19:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1EC7285AA; Thu, 16 Feb 2017 06:19:05 +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 52F6E285A2 for ; Thu, 16 Feb 2017 06:19:05 +0000 (UTC) Received: from localhost ([::1]:44794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceFPE-00013o-ED for patchwork-qemu-devel@patchwork.kernel.org; Thu, 16 Feb 2017 01:19:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceFOl-00012F-Lb for qemu-devel@nongnu.org; Thu, 16 Feb 2017 01:18:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceFOk-0000R3-S9 for qemu-devel@nongnu.org; Thu, 16 Feb 2017 01:18:35 -0500 Received: from mail-ot0-x22f.google.com ([2607:f8b0:4003:c0f::22f]:36682) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceFOk-0000QU-OR for qemu-devel@nongnu.org; Thu, 16 Feb 2017 01:18:34 -0500 Received: by mail-ot0-x22f.google.com with SMTP id 32so5242614oth.3 for ; Wed, 15 Feb 2017 22:18:34 -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=FApgU5/vPQ0UeqEr9WIAwxBAQR5RlsN1w9kRL0+P994=; b=gsGCXoljg3Yyu+vXJhALWSYXj5iphOpbgLpgGjF+2qfqUvNt1e17vEAqqBdA20GUBP wIBuDzpKp1tNp+0qfX5NPwxtwtrcZXu6inyo5C45u1tOvs7VzTZWJt/DXVaufWLAoPDE uya6xdDCHIAY1aKeK1Lmw50YzZlRh5K0BY0S4= 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=FApgU5/vPQ0UeqEr9WIAwxBAQR5RlsN1w9kRL0+P994=; b=O3cUbd9Les+YtFTJ41gFi6Gd/gqF5XDZ7otg8X0vzBL0hv7UxwtT66sBlp36QMkDya Vd4yKYhS6z4drFuo7AWqiXsXpEd/bHx8AY0yVJYrb4OinOGpc6ibaD+dJtGnOZA69TaV 99LymQMbmzSFABfg2fLLAFAUxYkPEgBvwxEZMa4++yC1wSkces+UB9idoQDIrJiFKD16 Ww7nWjKYV3ixmLQRAhJMg886pN5ssITghBG645oN/HS52f/Y52y331l2JLZ6mdEzD04i 6WXW5HU9wyDuxyzR6PLt/q+XRn9HSUJFG9jSLI+BVL7g7Id7mTi4jZRUyWTi48Bd7ZiU y1ng== X-Gm-Message-State: AMke39lubToXZ+cQD6xParWsi9CRTe7xP/x6SBwyfcO/vo0eksypN0SvzUx87M8FJnNZm+FX X-Received: by 10.157.42.193 with SMTP id e59mr277758otb.127.1487225914132; Wed, 15 Feb 2017 22:18:34 -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 c7sm2556036otb.55.2017.02.15.22.18.33 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 15 Feb 2017 22:18:33 -0800 (PST) From: ben@skyportsystems.com To: qemu-devel@nongnu.org Date: Wed, 15 Feb 2017 22:18:13 -0800 Message-Id: <06770233aa4bcf873f68632f1c60c6fa91b02779.1487224954.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:4003:c0f::22f Subject: [Qemu-devel] [PATCH v7 3/8] 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_guid" 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 Tested-by: Laszlo Ersek --- 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;