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: 728945 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vPX9y07RDz9s0m for ; Fri, 17 Feb 2017 10:17:25 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=skyportsystems.com header.i=@skyportsystems.com header.b="1sNkCKNP"; dkim-atps=neutral Received: from localhost ([::1]:50743 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceVIg-0001jt-Bz for incoming@patchwork.ozlabs.org; Thu, 16 Feb 2017 18:17:22 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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;