All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] hw/acpi, arm: Provide and use acpi_ghes_present()
@ 2021-06-03 17:12 Peter Maydell
  2021-06-03 17:12 ` [PATCH 1/3] hw/acpi: Provide stub version of acpi_ghes_record_errors() Peter Maydell
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Peter Maydell @ 2021-06-03 17:12 UTC (permalink / raw)
  To: qemu-arm, qemu-devel
  Cc: Igor Mammedov, Dongjiu Geng, Swetha, Michael S. Tsirkin

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



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-06-17 13:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03 17:12 [PATCH 0/3] hw/acpi, arm: Provide and use acpi_ghes_present() Peter Maydell
2021-06-03 17:12 ` [PATCH 1/3] hw/acpi: Provide stub version of acpi_ghes_record_errors() Peter Maydell
2021-06-03 18:52   ` Richard Henderson
2021-06-17 10:28     ` Paolo Bonzini
2021-06-17 12:25       ` Peter Maydell
2021-06-13 21:47   ` Dongjiu Geng
2021-06-03 17:12 ` [PATCH 2/3] hw/acpi: Provide function acpi_ghes_present() Peter Maydell
2021-06-03 18:55   ` Richard Henderson
2021-06-13 21:48   ` Dongjiu Geng
2021-06-03 17:12 ` [PATCH 3/3] target/arm: Use acpi_ghes_present() to see if we report ACPI memory errors Peter Maydell
2021-06-03 18:56   ` Richard Henderson
2021-06-13 21:49   ` Dongjiu Geng
2021-06-15  9:19 ` [PATCH 0/3] hw/acpi, arm: Provide and use acpi_ghes_present() Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.