diff options
| author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2025-09-23 09:04:00 +0200 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2025-10-04 10:53:38 -0400 |
| commit | 2c5a2616ed047e9d5e70970af5c4b2a54e9fa290 (patch) | |
| tree | fdc721d027494c009776700fa68a0d4b12ac59fd /hw/arm/virt-acpi-build.c | |
| parent | b74d843f7bf43f5e7e1e5b9c34da2034d622cf78 (diff) | |
| download | focaccia-qemu-2c5a2616ed047e9d5e70970af5c4b2a54e9fa290.tar.gz focaccia-qemu-2c5a2616ed047e9d5e70970af5c4b2a54e9fa290.zip | |
acpi/ghes: don't hard-code the number of sources for HEST table
The current code is actually dependent on having just one error structure with a single source, as any change there would cause migration issues. As the number of sources should be arch-dependent, as it will depend on what kind of notifications will exist, and how many errors can be reported at the same time, change the logic to be more flexible, allowing the number of sources to be defined when building the HEST table by the caller. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <1698680848c11d6f26368426f1657e14faaf55c4.1758610789.git.mchehab+huawei@kernel.org> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/arm/virt-acpi-build.c')
| -rw-r--r-- | hw/arm/virt-acpi-build.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index bbe83fab9a..c856d293c6 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -1125,6 +1125,10 @@ static void acpi_align_size(GArray *blob, unsigned align) g_array_set_size(blob, ROUND_UP(acpi_data_len(blob), align)); } +static const AcpiNotificationSourceId hest_ghes_notify[] = { + { ACPI_HEST_SRC_ID_SYNC, ACPI_GHES_NOTIFY_SEA }, +}; + static void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) { @@ -1189,7 +1193,9 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) if (ags) { acpi_add_table(table_offsets, tables_blob); acpi_build_hest(ags, tables_blob, tables->hardware_errors, - tables->linker, vms->oem_id, vms->oem_table_id); + tables->linker, hest_ghes_notify, + ARRAY_SIZE(hest_ghes_notify), + vms->oem_id, vms->oem_table_id); } } |