On Fri, 11 Jun 2021 14:31:21 -0400
Eric DeVolder <eric.devolder@oracle.com> wrote:
> This change exposes ACPI ERST support for x86 guests.
>
> Signed-off-by: Eric DeVolder <eric.devolder@oracle.com>
> ---
> hw/i386/acpi-build.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index de98750..d8cae69 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"
> @@ -2388,6 +2389,10 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)
> ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->oem_id,
> x86ms->oem_table_id);
>
> + acpi_add_table(table_offsets, tables_blob);
> + build_erst(tables_blob, tables->linker,
> + x86ms->oem_id, x86ms->oem_table_id);
it should be conditional an included only if erst device is present
> vmgenid_dev = find_vmgenid_dev();
you can use this as an example of doing above
> if (vmgenid_dev) {
> acpi_add_table(table_offsets, tables_blob);