Blame SOURCES/kvm-acpi-expose-oem_id-and-oem_table_id-in-build_rsdt.patch

9ae3a8
From 39f2d80c57f648afd2eab27816e8f93cf48e718d Mon Sep 17 00:00:00 2001
9ae3a8
From: Laszlo Ersek <lersek@redhat.com>
9ae3a8
Date: Wed, 11 May 2016 12:33:46 +0200
9ae3a8
Subject: [PATCH 07/10] acpi: expose oem_id and oem_table_id in build_rsdt()
9ae3a8
9ae3a8
RH-Author: Laszlo Ersek <lersek@redhat.com>
9ae3a8
Message-id: <1462970028-10959-6-git-send-email-lersek@redhat.com>
9ae3a8
Patchwork-id: 70382
9ae3a8
O-Subject: [RHEL-7.3 qemu-kvm PATCH v2 5/7] acpi: expose oem_id and oem_table_id in build_rsdt()
9ae3a8
Bugzilla: 1330969
9ae3a8
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
9ae3a8
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
9ae3a8
RH-Acked-by: Thomas Huth <thuth@redhat.com>
9ae3a8
9ae3a8
Since build_rsdt() is implemented as common utility code (in
9ae3a8
"hw/acpi/aml-build.c"), it should expose -- and forward -- the oem_id and
9ae3a8
oem_table_id parameters between board code and the generic build_header()
9ae3a8
function.
9ae3a8
9ae3a8
Cc: "Michael S. Tsirkin" <mst@redhat.com> (supporter:ACPI/SMBIOS)
9ae3a8
Cc: Igor Mammedov <imammedo@redhat.com> (supporter:ACPI/SMBIOS)
9ae3a8
Cc: Shannon Zhao <zhaoshenglong@huawei.com> (maintainer:ARM ACPI Subsystem)
9ae3a8
Cc: Paolo Bonzini <pbonzini@redhat.com> (maintainer:X86)
9ae3a8
Cc: Richard W.M. Jones <rjones@redhat.com>
9ae3a8
Cc: Aleksei Kovura <alex3kov@zoho.com>
9ae3a8
Cc: Michael Tokarev <mjt@tls.msk.ru>
9ae3a8
Cc: Steven Newbury <steve@snewbury.org.uk>
9ae3a8
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1248758
9ae3a8
LP: https://bugs.launchpad.net/qemu/+bug/1533848
9ae3a8
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
9ae3a8
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
9ae3a8
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
9ae3a8
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
9ae3a8
(cherry picked from commit 5151355898699eb66fad0a710b8b6011690a0dfc)
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
9ae3a8
Conflicts:
9ae3a8
	hw/acpi/aml-build.c
9ae3a8
	hw/arm/virt-acpi-build.c
9ae3a8
	hw/i386/acpi-build.c
9ae3a8
	include/hw/acpi/aml-build.h
9ae3a8
9ae3a8
RHEL-7 backport note: this is actually a manual reimplementation of the
9ae3a8
upstream patch, which is mostly mechanic. A clean cherry-pick would depend
9ae3a8
on a lot of reorganizatorial upstream patches (e.g., 658c27181bf3
9ae3a8
("hw/i386/acpi-build: move generic acpi building helpers into dedictated
9ae3a8
file")), and many new features that overlap with ACPI generation (e.g.,
9ae3a8
the "virt" machtype of the arm/aarch64 targets).
9ae3a8
9ae3a8
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
9ae3a8
---
9ae3a8
 hw/i386/acpi-build.c | 7 ++++---
9ae3a8
 1 file changed, 4 insertions(+), 3 deletions(-)
9ae3a8
---
9ae3a8
 hw/i386/acpi-build.c | 7 ++++---
9ae3a8
 1 file changed, 4 insertions(+), 3 deletions(-)
9ae3a8
9ae3a8
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
9ae3a8
index 4839b0e..d9433e6 100644
9ae3a8
--- a/hw/i386/acpi-build.c
9ae3a8
+++ b/hw/i386/acpi-build.c
9ae3a8
@@ -951,7 +951,8 @@ build_dsdt(GArray *table_data, GArray *linker, AcpiMiscInfo *misc)
9ae3a8
 
9ae3a8
 /* Build final rsdt table */
9ae3a8
 static void
9ae3a8
-build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets)
9ae3a8
+build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets,
9ae3a8
+           const char *oem_id, const char *oem_table_id)
9ae3a8
 {
9ae3a8
     AcpiRsdtDescriptorRev1 *rsdt;
9ae3a8
     size_t rsdt_len;
9ae3a8
@@ -970,7 +971,7 @@ build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets)
9ae3a8
                                        sizeof(uint32_t));
9ae3a8
     }
9ae3a8
     build_header(linker, table_data,
9ae3a8
-                 (void *)rsdt, "RSDT", rsdt_len, 1, NULL, NULL);
9ae3a8
+                 (void *)rsdt, "RSDT", rsdt_len, 1, oem_id, oem_table_id);
9ae3a8
 }
9ae3a8
 
9ae3a8
 static GArray *
9ae3a8
@@ -1126,7 +1127,7 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
9ae3a8
 
9ae3a8
     /* RSDT is pointed to by RSDP */
9ae3a8
     rsdt = tables->table_data->len;
9ae3a8
-    build_rsdt(tables->table_data, tables->linker, table_offsets);
9ae3a8
+    build_rsdt(tables->table_data, tables->linker, table_offsets, NULL, NULL);
9ae3a8
 
9ae3a8
     /* RSDP is in FSEG memory, so allocate it separately */
9ae3a8
     build_rsdp(tables->rsdp, tables->linker, rsdt);
9ae3a8
-- 
9ae3a8
1.8.3.1
9ae3a8