[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 19/31] acpi/ghes: add a notifier to notify when error data is rea
From: |
Mauro Carvalho Chehab |
Subject: |
[PATCH 19/31] acpi/ghes: add a notifier to notify when error data is ready |
Date: |
Fri, 6 Dec 2024 18:12:41 +0100 |
Some error injection notify methods are async, like GPIO
notify. Add a notifier to be used when the error record is
ready to be sent to the guest OS.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
hw/acpi/ghes.c | 5 ++++-
include/hw/acpi/ghes.h | 3 +++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c
index c9295a3b0db7..7035b76fd222 100644
--- a/hw/acpi/ghes.c
+++ b/hw/acpi/ghes.c
@@ -510,6 +510,9 @@ static void get_ghes_source_offsets(uint16_t source_id,
uint64_t hest_addr,
*read_ack_start_addr = le64_to_cpu(*read_ack_start_addr);
}
+NotifierList acpi_generic_error_notifiers =
+ NOTIFIER_LIST_INITIALIZER(error_device_notifiers);
+
void ghes_record_cper_errors(const void *cper, size_t len,
uint16_t source_id, Error **errp)
{
@@ -565,7 +568,7 @@ void ghes_record_cper_errors(const void *cper, size_t len,
/* Write the generic error data entry into guest memory */
cpu_physical_memory_write(cper_addr, cper, len);
- return;
+ notifier_list_notify(&acpi_generic_error_notifiers, NULL);
}
int acpi_ghes_memory_errors(uint16_t source_id, uint64_t physical_address)
diff --git a/include/hw/acpi/ghes.h b/include/hw/acpi/ghes.h
index 164ed8b0f9a3..2e8405edfe27 100644
--- a/include/hw/acpi/ghes.h
+++ b/include/hw/acpi/ghes.h
@@ -24,6 +24,9 @@
#include "hw/acpi/bios-linker-loader.h"
#include "qapi/error.h"
+#include "qemu/notify.h"
+
+extern NotifierList acpi_generic_error_notifiers;
/*
* Values for Hardware Error Notification Type field
--
2.47.1
- [PATCH 04/31] acpi/ghes: better handle source_id and notification, (continued)
- [PATCH 04/31] acpi/ghes: better handle source_id and notification, Mauro Carvalho Chehab, 2024/12/06
- [PATCH 06/31] acpi/ghes: Remove a duplicated out of bounds check, Mauro Carvalho Chehab, 2024/12/06
- [PATCH 12/31] acpi/ghes: rename etc/hardware_error file macros, Mauro Carvalho Chehab, 2024/12/06
- [PATCH 10/31] acpi/ghes: better name GHES memory error function, Mauro Carvalho Chehab, 2024/12/06
- [PATCH 15/31] acpi/ghes: add a firmware file with HEST address, Mauro Carvalho Chehab, 2024/12/06
- [PATCH 08/31] acpi/ghes: don't check if physical_address is not zero, Mauro Carvalho Chehab, 2024/12/06
- [PATCH 05/31] acpi/ghes: Fix acpi_ghes_record_errors() argument, Mauro Carvalho Chehab, 2024/12/06
- [PATCH 29/31] HACK: use GPIO as source ID for virt-9.1 machines, Mauro Carvalho Chehab, 2024/12/06
- [PATCH 03/31] acpi/ghes: simplify the per-arch caller to build HEST table, Mauro Carvalho Chehab, 2024/12/06
- [PATCH 16/31] acpi/ghes: Use HEST table offsets when preparing GHES records, Mauro Carvalho Chehab, 2024/12/06
- [PATCH 19/31] acpi/ghes: add a notifier to notify when error data is ready,
Mauro Carvalho Chehab <=
- [PATCH 07/31] acpi/ghes: Change the type for source_id, Mauro Carvalho Chehab, 2024/12/06
- [PATCH 11/31] acpi/ghes: don't crash QEMU if ghes GED is not found, Mauro Carvalho Chehab, 2024/12/06
- [PATCH 18/31] acpi/generic_event_device: add logic to detect if HEST addr is available, Mauro Carvalho Chehab, 2024/12/06
- [PATCH 31/31] FIXME: acpi/ghes: properly set data record size, Mauro Carvalho Chehab, 2024/12/06
- [PATCH 21/31] arm/virt: Wire up a GED error device for ACPI / GHES, Mauro Carvalho Chehab, 2024/12/06
- [PATCH 27/31] DEBUG, Mauro Carvalho Chehab, 2024/12/06