[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 08/10] ACPI ERST: create ACPI ERST table for pc/x86 machines.
From: |
Eric DeVolder |
Subject: |
[PATCH v5 08/10] ACPI ERST: create ACPI ERST table for pc/x86 machines. |
Date: |
Wed, 30 Jun 2021 15:07:19 -0400 |
This change exposes ACPI ERST support for x86 guests.
Signed-off-by: Eric DeVolder <eric.devolder@oracle.com>
---
hw/i386/acpi-build.c | 9 +++++++++
hw/i386/acpi-microvm.c | 9 +++++++++
2 files changed, 18 insertions(+)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index de98750..d2026cc 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -43,6 +43,7 @@
#include "sysemu/tpm.h"
#include "hw/acpi/tpm.h"
#include "hw/acpi/vmgenid.h"
+#include "hw/acpi/erst.h"
#include "hw/boards.h"
#include "sysemu/tpm_backend.h"
#include "hw/rtc/mc146818rtc_regs.h"
@@ -2327,6 +2328,7 @@ void acpi_build(AcpiBuildTables *tables, MachineState
*machine)
GArray *tables_blob = tables->table_data;
AcpiSlicOem slic_oem = { .id = NULL, .table_id = NULL };
Object *vmgenid_dev;
+ Object *erst_dev;
char *oem_id;
char *oem_table_id;
@@ -2388,6 +2390,13 @@ void acpi_build(AcpiBuildTables *tables, MachineState
*machine)
ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->oem_id,
x86ms->oem_table_id);
+ erst_dev = find_erst_dev();
+ if (erst_dev) {
+ acpi_add_table(table_offsets, tables_blob);
+ build_erst(tables_blob, tables->linker, erst_dev,
+ x86ms->oem_id, x86ms->oem_table_id);
+ }
+
vmgenid_dev = find_vmgenid_dev();
if (vmgenid_dev) {
acpi_add_table(table_offsets, tables_blob);
diff --git a/hw/i386/acpi-microvm.c b/hw/i386/acpi-microvm.c
index ccd3303..0099b13 100644
--- a/hw/i386/acpi-microvm.c
+++ b/hw/i386/acpi-microvm.c
@@ -30,6 +30,7 @@
#include "hw/acpi/bios-linker-loader.h"
#include "hw/acpi/generic_event_device.h"
#include "hw/acpi/utils.h"
+#include "hw/acpi/erst.h"
#include "hw/boards.h"
#include "hw/i386/fw_cfg.h"
#include "hw/i386/microvm.h"
@@ -160,6 +161,7 @@ static void acpi_build_microvm(AcpiBuildTables *tables,
X86MachineState *x86ms = X86_MACHINE(mms);
GArray *table_offsets;
GArray *tables_blob = tables->table_data;
+ Object *erst_dev;
unsigned dsdt, xsdt;
AcpiFadtData pmfadt = {
/* ACPI 5.0: 4.1 Hardware-Reduced ACPI */
@@ -209,6 +211,13 @@ static void acpi_build_microvm(AcpiBuildTables *tables,
ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->oem_id,
x86ms->oem_table_id);
+ erst_dev = find_erst_dev();
+ if (erst_dev) {
+ acpi_add_table(table_offsets, tables_blob);
+ build_erst(tables_blob, tables->linker, erst_dev,
+ x86ms->oem_id, x86ms->oem_table_id);
+ }
+
xsdt = tables_blob->len;
build_xsdt(tables_blob, tables->linker, table_offsets, x86ms->oem_id,
x86ms->oem_table_id);
--
1.8.3.1
- [PATCH v5 00/10] acpi: Error Record Serialization Table, ERST, support for QEMU, Eric DeVolder, 2021/06/30
- [PATCH v5 01/10] ACPI ERST: bios-tables-test.c steps 1 and 2, Eric DeVolder, 2021/06/30
- [PATCH v5 04/10] ACPI ERST: header file for ERST, Eric DeVolder, 2021/06/30
- [PATCH v5 02/10] ACPI ERST: specification for ERST support, Eric DeVolder, 2021/06/30
- [PATCH v5 03/10] ACPI ERST: PCI device_id for ERST, Eric DeVolder, 2021/06/30
- [PATCH v5 07/10] ACPI ERST: trace support, Eric DeVolder, 2021/06/30
- [PATCH v5 08/10] ACPI ERST: create ACPI ERST table for pc/x86 machines.,
Eric DeVolder <=
- [PATCH v5 05/10] ACPI ERST: support for ACPI ERST feature, Eric DeVolder, 2021/06/30
- [PATCH v5 06/10] ACPI ERST: build the ACPI ERST table, Eric DeVolder, 2021/06/30
- [PATCH v5 09/10] ACPI ERST: qtest for ERST, Eric DeVolder, 2021/06/30
- [PATCH v5 10/10] ACPI ERST: step 6 of bios-tables-test.c, Eric DeVolder, 2021/06/30