From patchwork Wed Dec 11 18:31:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 300284 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A6B452C00AB for ; Thu, 12 Dec 2013 05:53:01 +1100 (EST) Received: from localhost ([::1]:59525 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vqou3-0000d1-7P for incoming@patchwork.ozlabs.org; Wed, 11 Dec 2013 13:52:59 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqoVO-00056q-Ue for qemu-devel@nongnu.org; Wed, 11 Dec 2013 13:27:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqoVI-0000Ou-Uw for qemu-devel@nongnu.org; Wed, 11 Dec 2013 13:27:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:26241) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqoVI-0000Op-NQ for qemu-devel@nongnu.org; Wed, 11 Dec 2013 13:27:24 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBBIRMcJ013798 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 11 Dec 2013 13:27:22 -0500 Received: from redhat.com (vpn1-4-46.ams2.redhat.com [10.36.4.46]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id rBBIRJcL024374; Wed, 11 Dec 2013 13:27:20 -0500 Date: Wed, 11 Dec 2013 20:31:02 +0200 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <1386786509-29966-18-git-send-email-mst@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Anthony Liguori , Marcel Apfelbaum Subject: [Qemu-devel] [PULL 18/28] acpi: strip compiler info in built-in DSDT X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org IASL stores it's revision in each table header it generates. That's not nice since guests will see a change each time they move between hypervisors. We generally fill our own info for tables, but we (and seabios) forgot to do this for the built-in DSDT. Modifications in DSDT table: OEM ID: "BXPC" -> "BOCHS " OEM Table ID: "BXDSDT" -> "BXPCDSDT" Compiler ID: "INTL" -> "BXPC" Compiler Version: 0x20130823 -> 0x00000001 Tested-by: Marcel Apfelbaum Signed-off-by: Michael S. Tsirkin --- hw/i386/acpi-build.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index befc39f..48312f5 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -924,10 +924,16 @@ build_mcfg_q35(GArray *table_data, GArray *linker, AcpiMcfgInfo *info) static void build_dsdt(GArray *table_data, GArray *linker, AcpiMiscInfo *misc) { - void *dsdt; + AcpiTableHeader *dsdt; + assert(misc->dsdt_code && misc->dsdt_size); + dsdt = acpi_data_push(table_data, misc->dsdt_size); memcpy(dsdt, misc->dsdt_code, misc->dsdt_size); + + memset(dsdt, 0, sizeof *dsdt); + build_header(linker, table_data, dsdt, ACPI_DSDT_SIGNATURE, + misc->dsdt_size, 1); } /* Build final rsdt table */