diff options
| author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2025-01-15 13:50:25 +0100 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2025-01-15 13:07:09 -0500 |
| commit | 48b0dcdd67d3fafbd07f6298257259dec4f541ce (patch) | |
| tree | 192d773ca1bf8b42c316382a22df116563ff086b /include | |
| parent | 2e223c5ec1146b61163d3372ac629d9240d57cb1 (diff) | |
| download | focaccia-qemu-48b0dcdd67d3fafbd07f6298257259dec4f541ce.tar.gz focaccia-qemu-48b0dcdd67d3fafbd07f6298257259dec4f541ce.zip | |
acpi/ghes: make the GHES record generation more generic
Split the code into separate functions to allow using the common CPER filling code by different error sources. The generic code was moved to ghes_record_cper_errors(), and ghes_gen_err_data_uncorrectable_recoverable() now contains only a logic to fill the Generic Error Data part of the record, as described at: ACPI 6.2: 18.3.2.7.1 Generic Error Data The remaining code to generate a memory error now belongs to acpi_ghes_record_errors() function. A further patch will give it a better name. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <68d9f787d8c4fc8d1dbc227d6902fe801e42dea9.1736945236.git.mchehab+huawei@kernel.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/hw/acpi/ghes.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/acpi/ghes.h b/include/hw/acpi/ghes.h index 9295e46be2..8859346af5 100644 --- a/include/hw/acpi/ghes.h +++ b/include/hw/acpi/ghes.h @@ -23,6 +23,7 @@ #define ACPI_GHES_H #include "hw/acpi/bios-linker-loader.h" +#include "qapi/error.h" /* * Values for Hardware Error Notification Type field @@ -73,6 +74,8 @@ void acpi_build_hest(GArray *table_data, GArray *hardware_errors, const char *oem_id, const char *oem_table_id); void acpi_ghes_add_fw_cfg(AcpiGhesState *vms, FWCfgState *s, GArray *hardware_errors); +void ghes_record_cper_errors(const void *cper, size_t len, + uint16_t source_id, Error **errp); int acpi_ghes_record_errors(uint16_t source_id, uint64_t error_physical_addr); /** |