cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
34b321
From 464ceecd1e9c070e613624fb896df54b7e4a3e38 Mon Sep 17 00:00:00 2001
34b321
From: Laszlo Ersek <lersek@redhat.com>
34b321
Date: Wed, 11 May 2016 12:33:42 +0200
34b321
Subject: [PATCH 03/10] acpi: strip compiler info in built-in DSDT
34b321
34b321
RH-Author: Laszlo Ersek <lersek@redhat.com>
34b321
Message-id: <1462970028-10959-2-git-send-email-lersek@redhat.com>
34b321
Patchwork-id: 70378
34b321
O-Subject: [RHEL-7.3 qemu-kvm PATCH v2 1/7] acpi: strip compiler info in built-in DSDT
34b321
Bugzilla: 1330969
34b321
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
34b321
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
34b321
RH-Acked-by: Thomas Huth <thuth@redhat.com>
34b321
34b321
From: "Michael S. Tsirkin" <mst@redhat.com>
34b321
34b321
IASL stores it's revision in each table header it generates.
34b321
That's not nice since guests will see a change each time they move
34b321
between hypervisors.  We generally fill our own info for tables, but we
34b321
(and seabios) forgot to do this for the built-in DSDT.
34b321
34b321
Modifications in DSDT table:
34b321
 OEM ID:            "BXPC" -> "BOCHS "
34b321
 OEM Table ID:      "BXDSDT" -> "BXPCDSDT"
34b321
 Compiler ID:       "INTL" -> "BXPC"
34b321
 Compiler Version:  0x20130823 -> 0x00000001
34b321
34b321
Tested-by: Marcel Apfelbaum <marcel.a@redhat.com>
34b321
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
34b321
(cherry picked from commit 53db092ad1c81c30a617f44e83e8fb9e27c001ba)
34b321
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
34b321
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
34b321
---
34b321
 hw/i386/acpi-build.c | 8 +++++++-
34b321
 1 file changed, 7 insertions(+), 1 deletion(-)
34b321
34b321
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
34b321
index 8be1286..a3a4c3b 100644
34b321
--- a/hw/i386/acpi-build.c
34b321
+++ b/hw/i386/acpi-build.c
34b321
@@ -924,10 +924,16 @@ build_mcfg_q35(GArray *table_data, GArray *linker, AcpiMcfgInfo *info)
34b321
 static void
34b321
 build_dsdt(GArray *table_data, GArray *linker, AcpiMiscInfo *misc)
34b321
 {
34b321
-    void *dsdt;
34b321
+    AcpiTableHeader *dsdt;
34b321
+
34b321
     assert(misc->dsdt_code && misc->dsdt_size);
34b321
+
34b321
     dsdt = acpi_data_push(table_data, misc->dsdt_size);
34b321
     memcpy(dsdt, misc->dsdt_code, misc->dsdt_size);
34b321
+
34b321
+    memset(dsdt, 0, sizeof *dsdt);
34b321
+    build_header(linker, table_data, dsdt, ACPI_DSDT_SIGNATURE,
34b321
+                 misc->dsdt_size, 1);
34b321
 }
34b321
 
34b321
 /* Build final rsdt table */
34b321
-- 
34b321
1.8.3.1
34b321