[PATCH 0/4 v2] Make ELOG log and trace consistently with GHES

Fabio M. De Francesco
2025-04-29T17:21:20Z

When Firmware First is enabled, BIOS handles errors first and then it
makes them available to the kernel via the Common Platform Error Record
(CPER) sections (UEFI 2.10 Appendix N). Linux parses the CPER sections
via one of two similar paths, either ELOG or GHES.

Currently, ELOG and GHES show some inconsistencies in how they print to
the kernel log as well as in how they report to userspace via trace
events.

Make the two mentioned paths act similarly for what relates to logging
and tracing.

--- Changes for v2 ---

- Add a patch to pass log levels to pci_print_aer() (Dan)
- Add a patch to trace CPER CXL Protocol Errors
- Rework commit messages (Dan)
- Use log_non_standard_event() (Bjorn)

--- Changes for v1 ---

- Drop the RFC prefix and restart from PATCH v1
- Drop patch 3/3 because a discussion on it has not yet been
settled
- Drop namespacing in export of pci_print_aer while() (Dan)
- Don't use '#ifdef' in *.c files (Dan)
- Drop a reference on pdev after operation is complete (Dan)
- Don't log an error message if pdev is NULL (Dan)

--- Changes for RFC v2 ---

- 0/3: rework the subject line and the letter.
- 1/3: no changes.
- 2/3: trace CPER PCIe Section only if CONFIG_ACPI_APEI_PCIEAER
is defined; the kernel test robot reported the use of two
undefined symbols because the test for the config option was
missing; rewrite the subject line and part of commit message.
- 3/3: no changes.

Fabio M. De Francesco (4):
ACPI: extlog: Trace CPER Non-standard Section Body
PCI/AER: Modify pci_print_aer() to take log level
ACPI: extlog: Trace CPER PCI Express Error Section
ACPI: extlog: Trace CPER CXL Protocol Errors

drivers/acpi/acpi_extlog.c | 96 ++++++++++++++++++++++++++++++++++++++
drivers/cxl/core/pci.c | 2 +-
drivers/cxl/core/ras.c | 6 +++
drivers/pci/pcie/aer.c | 18 +++----
drivers/ras/ras.c | 1 +
include/cxl/event.h | 2 +
include/linux/aer.h | 13 +++++-
7 files changed, 126 insertions(+), 12 deletions(-)

--
2.48.1