[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/3] hw/acpi, arm: Provide and use acpi_ghes_present()
From: |
Peter Maydell |
Subject: |
[PATCH 0/3] hw/acpi, arm: Provide and use acpi_ghes_present() |
Date: |
Thu, 3 Jun 2021 18:12:56 +0100 |
Currently the Arm code in target/arm/kvm64.c which decides whether
it should report memory errors via the ACPI GHES table works
only with the 'virt' board; in fact it won't even link if the
virt board is configured out of the QEMU binary.
This patchset replaces those virt-specific checks with a single
new acpi_ghes_present() function which tells the caller whether
it's OK to report errors by calling acpi_ghes_record_errors().
The mechanism we use is a simple flag in the AcpiGhesState
which gets sent if the board calls acpi_ghes_add_fw_cfg() to
set up the GHES stuff.
We need also to provide 'stub' versions of both acpi_ghes_present()
and acpi_ghes_record_errors() so that we can link even if no
board using ACPI GHES has been configured into the binary.
(You can test that this series is necessary by commenting out the
'CONFIG_ARM_VIRT=y' line in default-configs/devices/arm-softmmu.mak
and building with KVM enabled on an AArch64 host.)
I have tested with 'make' and 'make check' but nothing beyond
that; testing by somebody who has a guest setup that uses GHES
would be helpful just to check I haven't accidentally broken it.
thanks
-- PMM
Peter Maydell (3):
hw/acpi: Provide stub version of acpi_ghes_record_errors()
hw/acpi: Provide function acpi_ghes_present()
target/arm: Use acpi_ghes_present() to see if we report ACPI memory
errors
include/hw/acpi/ghes.h | 9 +++++++++
hw/acpi/ghes-stub.c | 22 ++++++++++++++++++++++
hw/acpi/ghes.c | 17 +++++++++++++++++
target/arm/kvm64.c | 6 +-----
hw/acpi/meson.build | 6 +++---
5 files changed, 52 insertions(+), 8 deletions(-)
create mode 100644 hw/acpi/ghes-stub.c
--
2.20.1