From patchwork Thu Feb 16 23:15:35 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: 9578503 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 E48E760209 for ; Thu, 16 Feb 2017 23:16:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBBB828636 for ; Thu, 16 Feb 2017 23:16:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF9C628698; Thu, 16 Feb 2017 23:16:25 +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 3F28628636 for ; Thu, 16 Feb 2017 23:16:24 +0000 (UTC) Received: from localhost ([::1]:50738 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceVHj-0000SJ-KI for patchwork-qemu-devel@patchwork.kernel.org; Thu, 16 Feb 2017 18:16:23 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceVHA-0000R5-EV for qemu-devel@nongnu.org; Thu, 16 Feb 2017 18:15:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceVH9-0000ub-4c for qemu-devel@nongnu.org; Thu, 16 Feb 2017 18:15:48 -0500 Received: from mail-pg0-x234.google.com ([2607:f8b0:400e:c05::234]:33437) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceVH8-0000tp-Vd for qemu-devel@nongnu.org; Thu, 16 Feb 2017 18:15:47 -0500 Received: by mail-pg0-x234.google.com with SMTP id y6so6221678pgy.0 for ; Thu, 16 Feb 2017 15:15:46 -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=57oeOrvNjdo3rgxeMp+/qaJr9en41kB1rqT9NpkwZ90=; b=1sNkCKNPmshrAhbevjLn7N+Qd3CsSQ6YbYjflTG6/S3Fbea6TDnptZ19fewJNPLQZZ k5mxqmw9Jp5PeLPbpRrIYqFERDEJlV7cHxRToSKR+OAET/VjsZnZYaeC2bnYyP/oTo71 6NbSbNGqD2oRJqKCMnkDZrtUP6dZgztit5Rt4= 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=57oeOrvNjdo3rgxeMp+/qaJr9en41kB1rqT9NpkwZ90=; b=C+weqtBHmOeDugFUVIdNnaHPu1QyL6LULAcRITmDhTuhBnqLeRyzwSoKoR0TMgGXLi eVLupqN7VaLHyU5pYDeAAGCp/pKqjOZaGbcHxoaQtuA/jkcAbJ62iTDVmpgCc0ZLicu4 oxa/wcLuHrep8jGtU+0MYeZqHYspRc4iNam8xZch44oj8JbWRlAXaxVxgr+x2PX+yG6o VcwQt60fydL42tLizLGlUsEKLIAsN9Fug+g/UfO+mjtGZpbK4UP2BtIf8TAG+2pT0zLe 5ZvzAXeLPHlgJT3nD32TQdeF+e7mqfug/YjytpaCSOerChW+PKemZoItpTyMFoRNXQe3 FaSQ== X-Gm-Message-State: AMke39lTfUXVX8Ol3lCBzEklPOOzpWyxSWvREdfZZvK+6U6uAIbjeiCE/cC23DeKKyPsFCLX X-Received: by 10.99.36.7 with SMTP id k7mr6081612pgk.201.1487286946190; Thu, 16 Feb 2017 15:15:46 -0800 (PST) Received: from Arrow.corp.skyportsystems.com (67-207-112-138.static.wiline.com. [67.207.112.138]) by smtp.gmail.com with ESMTPSA id r74sm15455696pfb.67.2017.02.16.15.15.45 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 16 Feb 2017 15:15:45 -0800 (PST) From: ben@skyportsystems.com To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:15:35 -0800 Message-Id: <7c0c0ce878bdba95f08d3c7385e07ab2c654b9d7.1487286467.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:c05::234 Subject: [Qemu-devel] [PATCH v8 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;