mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 00/19] ACPI: APEI: Share CPER reporting between GHES and extlog
@ 2026-11-17 11:10 Pierre Gondois
  2026-11-17 11:10 ` [PATCH v1 01/19] x86/APEI: Extract common CPER memory error reporting helper Pierre Gondois
                   ` (18 more replies)
  0 siblings, 19 replies; 22+ messages in thread
From: Pierre Gondois @ 2026-11-17 11:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ashok Raj, James Morse, Mark Brown, Pierre Gondois,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Rafael J. Wysocki, Len Brown, Tony Luck,
	Hanjun Guo, Mauro Carvalho Chehab, Shuai Xue,
	Mahesh J Salgaonkar, Oliver O'Halloran, Bjorn Helgaas,
	Maciej Wieczor-Retman, Pawel Chmielewski, Yazen Ghannam,
	Radu Rendec, Avadhut Naik, Jonathan Cameron, Kai-Heng Feng,
	Dave Jiang, Fabio M. De Francesco, Breno Leitao, Dan Williams,
	Terry Bowman, linux-acpi, linux-edac, linuxppc-dev, linux-pci,
	acpica-devel

Hello,

This patchset should be applied on top of [1].

GHES and acpi_extlog handle many of the same CPER sections, but have
separate implementations that do not always report errors in the same
way. This series brings that code together so both paths can use the
same reporting helpers.

Most of the patches prepare for that move. MCE reporting for Memory
Error Section 2 is also added. In the MCE extended-log policy, tracing
and PCIe/CXL handling no longer depend on whether a RAS daemon is
registered. Only fatal CPER records are printed to the console, as
briefly suggested at [2]. For nonfatal records,
users need tracing enabled or a subsystem handler that reports the error.

With the common helper, GHES can emit memory trace events even without
an EDAC driver registered. CXL media records that cannot be queued are
reported through the nonstandard trace event instead of being dropped.

[1] https://lore.kernel.org/lkml/20261113132600.3355836-1-pierre.gondois@arm.com/
[2] https://lore.kernel.org/lkml/20240521183913.GGZkzqUSN1hdE-_OEY@fat_crate.local/

++++++++++++
+ Testing: +
++++++++++++

Some examples of kernel logs,
tested on x86/arm64:

CPER Memory Error section:
{1}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 1
{1}[Hardware Error]: event severity: recoverable
{1}[Hardware Error]:  Error 0, type: recoverable
{1}[Hardware Error]:  fru_text: ABCDEFGHIJKLMNOPQRST
{1}[Hardware Error]:   section_type: memory error
{1}[Hardware Error]:    error_status: A read was issued to data that has been poisoned (0x00000000007f1a00)
{1}[Hardware Error]:   physical_address: 0xffffffffffffffff
{1}[Hardware Error]:   physical_address_mask: 0xffffffffffffffff
{1}[Hardware Error]:   node:65535 card:65535 module:65535 rank:65535 bank_group:255 bank_address:255 device:65535 row:262143 column:65535 bit_position:65535 requestor_id:0xffffffffffffffff responder_id:0xffffffffffffffff target_id:0xffffffffffffffff chip_id:7
{1}[Hardware Error]:   error_type: 15, physical memory map-out event
{1}[Hardware Error]:   DIMM location: not present. DMI handle: 0xfeff
$ [arm64 specific log]
EDAC MC0: 1 UE physical memory map-out event on unknown memory (node:65535 card:65535 module:65535 rank:65535 bank_group:255 bank_address:255 device:65535 row:262143 column:65535 bit_position:65535 requestor_id:0xffffffffffffffff responder_id:0xffffffffffffffff target_id:0xffffffffffffffff chip_id:7 DIMM location: not present. DMI handle: 0xfeff page:0xfffffffffffff offset:0xfff grain:1 - APEI location: node:65535 card:65535 module:65535 rank:65535 bank_group:255 bank_address:255 device:65535 row:262143 column:65535 bit_position:65535 requestor_id:0xffffffffffffffff responder_id:0xffffffffffffffff target_id:0xffffffffffffffff chip_id:7 DIMM location: not present. DMI handle: 0xfeff status(0x00000000007f1a00): A read was issued to data that has been poisoned)
Memory failure: 0xfffffffffffff: recovery action for non struct page pfn: Ignored

CPER Memory Error section 2:
{2}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 1
{2}[Hardware Error]: event severity: recoverable
{2}[Hardware Error]:  Error 0, type: recoverable
{2}[Hardware Error]:  fru_text: ABCDEFGHIJKLMNOPQRST
{2}[Hardware Error]:   section_type: memory error 2
{2}[Hardware Error]:   error_status: A read was issued to data that has been poisoned (0x00000000007f1a00)
{2}[Hardware Error]:   physical_address: 0xffffffffffffffff
{2}[Hardware Error]:   physical_address_mask: 0xffffffffffffffff
{2}[Hardware Error]:   node:65535 card:65535 module:65535 rank:4294967295 bank_group:255 bank_address:255 device:4294967295 row:4294967295 column:4294967295 bit_position:4294967295 requestor_id:0xffffffffffffffff responder_id:0xffffffffffffffff target_id:0xffffffffffffffff chip_id:255
{2}[Hardware Error]:   error_type: 15, physical memory map-out event
{2}[Hardware Error]:   status: 0x01
{2}[Hardware Error]:   DIMM location: not present. DMI handle: 0x0000feff
$ [arm64 specific log]
EDAC MC0: 1 UE physical memory map-out event on unknown memory (node:65535 card:65535 module:65535 rank:4294967295 bank_group:255 bank_address:255 device:4294967295 row:4294967295 column:4294967295 bit_position:4294967295 requestor_id:0xffffffffffffffff responder_id:0xffffffffffffffff target_id:0xffffffffffffffff chip_id:255 DIMM location: not present. DMI handle: 0x0000feff page:0xfffffffffffff offset:0xfff grain:1 - APEI location: node:65535 card:65535 module:65535 rank:4294967295 bank_group:255 bank_address:255 device:4294967295 row:4294967295 column:4294967295 bit_position:4294967295 requestor_id:0xffffffffffffffff responder_id:0xffffffffffffffff target_id:0xffffffffffffffff chip_id:255 DIMM location: not present. DMI handle: 0x0000feff status(0x00000000007f1a00): A read was issued to data that has been poisoned section_status:0x01)
Memory failure: 0xfffffffffffff: recovery action for non struct page pfn: Ignored

Non standard (i.e. random GUID):
{3}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 1
{3}[Hardware Error]: event severity: recoverable
{3}[Hardware Error]:  Error 0, type: recoverable
{3}[Hardware Error]:  fru_text: ABCDEFGHIJKLMNOPQRST
{3}[Hardware Error]:   section type: unknown, 12345678-1234-5678-9abc-def012345679
{3}[Hardware Error]:   section length: 0x21
{3}[Hardware Error]:   00000000: 746e7953 69746568 6f6e2063 6174736e  Synthetic nonsta
{3}[Hardware Error]:   00000010: 7261646e 50432064 65205245 746e6576  ndard CPER event
{3}[Hardware Error]:   00000020: 00                                               .

PCI:
{4}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 1
{4}[Hardware Error]: event severity: recoverable
{4}[Hardware Error]:  Error 0, type: recoverable
{4}[Hardware Error]:  fru_text: ABCDEFGHIJKLMNOPQRST
{4}[Hardware Error]:   section_type: PCIe error
{4}[Hardware Error]:   port_type: 0, PCIe end point
{4}[Hardware Error]:   device_id: 0000:01:00.0
{4}[Hardware Error]:   slot: 0
{4}[Hardware Error]:   secondary_bus: 0x00
{4}[Hardware Error]:   vendor_id: 0x1234, device_id: 0x5678
{4}[Hardware Error]:   class_code: 000000
{4}[Hardware Error]:   aer_cor_status: 0x00000000, aer_cor_mask: 0x00000000
{4}[Hardware Error]:   aer_uncor_status: 0x00004000, aer_uncor_mask: 0x00000000
{4}[Hardware Error]:   aer_uncor_severity: 0x00000000
{4}[Hardware Error]:   TLP Header: 00000000 00000000 00000000 00000000
AER: 0000:01:00.0: no pci_dev found

Tracing:
x86:
extlog_mem_event: {1} recoverable error: physical memory map-out event physical addr: ffffffffffffffff (mask lsb: 0) node:65535 card:65535 module:65535 rank:65535 bank_group:255 bank_address:255 device:65535 row:262143 column:65535 bit_position:65535 requestor_id:0xffffffffffffffff responder_id:0xffffffffffffffff target_id:0xffffffffffffffff chip_id:7 DIMM location: not present. DMI handle: 0xfeff FRU: 00000000-0000-0000-0000-000000000000 ABCDEFGHIJKLMNOPQRST
mce_record: CPU: 0, MCGc/s: 100010a/0, MC255: bc0000000000009f, IPID: 0000000000000000, ADDR: ffffffffffffffff, MISC: 0000000000000080, SYND: 0000000000000000, RIP: 00:<0000000000000000>, TSC: 0, PPIN: 0, vendor: 2, CPUID: 663, time: 1794906879, socket: 0, APIC: 0, microcode: 1000065, vendor data: {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}
extlog_mem2_event: {2} recoverable error: validation_bits: 0x3fffbf error_status: 0x7f1a00 physical_addr: 0xffffffffffffffff physical_addr_mask: 0xffffffffffffffff node: 65535 card: 65535 module: 65535 bank: 65535 device: 4294967295 row: 4294967295 column: 4294967295 rank: 4294967295 bit_pos: 4294967295 chip_id: 255 error_type: 15 status: 0x1 requestor_id: 0xffffffffffffffff responder_id: 0xffffffffffffffff target_id: 0xffffffffffffffff mem_array_handle: 0xfeff mem_dev_handle: 0xfeff FRU: 00000000-0000-0000-0000-000000000000 ABCDEFGHIJKLMNOPQRST
mce_record: CPU: 0, MCGc/s: 100010a/0, MC255: bc0000000000009f, IPID: 0000000000000000, ADDR: ffffffffffffffff, MISC: 0000000000000080, SYND: 0000000000000000, RIP: 00:<0000000000000000>, TSC: 0, PPIN: 0, vendor: 2, CPUID: 663, time: 1794906882, socket: 0, APIC: 0, microcode: 1000065, vendor data: {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}
non_standard_event: severity: 2; sec type:78563412-3412-7856-9abc-def012345679; FRU: 00000000-0000-0000-0000-000000000000 ABCDEFGHIJKLMNOPQRST; data len:33; raw data:53 79 6e 74 68 65 74 69 63 20 6e 6f 6e 73 74 61 6e 64 61 72 64 20 43 50 45 52 20 65 76 65 6e 74 00

arm64:
extlog_mem_event: {1} recoverable error: physical memory map-out event physical addr: ffffffffffffffff (mask lsb: 0) node:65535 card:65535 module:65535 rank:65535 bank_group:255 bank_address:255 device:65535 row:262143 column:65535 bit_position:65535 requestor_id:0xffffffffffffffff responder_id:0xffffffffffffffff target_id:0xffffffffffffffff chip_id:7 DIMM location: not present. DMI handle: 0xfeff FRU: 00000000-0000-0000-0000-000000000000 ABCDEFGHIJKLMNOPQRST
mc_event: 1 Uncorrected error: physical memory map-out event on unknown memory (mc:0 location:-1:-1:-1 address:0xffffffffffffffff grain:1 syndrome:0x00000000 APEI location: node:65535 card:65535 module:65535 rank:65535 bank_group:255 bank_address:255 device:65535 row:262143 column:65535 bit_position:65535 requestor_id:0xffffffffffffffff responder_id:0xffffffffffffffff target_id:0xffffffffffffffff chip_id:7 DIMM location: not present. DMI handle: 0xfeff status(0x00000000007f1a00): A read was issued to data that has been poisoned)
memory_failure_event: pfn 0xfffffffffffff: recovery action for non struct page pfn: Ignored
extlog_mem2_event: {2} recoverable error: validation_bits: 0x3fffbf error_status: 0x7f1a00 physical_addr: 0xffffffffffffffff physical_addr_mask: 0xffffffffffffffff node: 65535 card: 65535 module: 65535 bank: 65535 device: 4294967295 row: 4294967295 column: 4294967295 rank: 4294967295 bit_pos: 4294967295 chip_id: 255 error_type: 15 status: 0x1 requestor_id: 0xffffffffffffffff responder_id: 0xffffffffffffffff target_id: 0xffffffffffffffff mem_array_handle: 0xfeff mem_dev_handle: 0xfeff FRU: 00000000-0000-0000-0000-000000000000 ABCDEFGHIJKLMNOPQRST
mc_event: 1 Uncorrected error: physical memory map-out event on unknown memory (mc:0 location:-1:-1:-1 address:0xffffffffffffffff grain:1 syndrome:0x00000000 APEI location: node:65535 card:65535 module:65535 rank:4294967295 bank_group:255 bank_address:255 device:4294967295 row:4294967295 column:4294967295 bit_position:4294967295 requestor_id:0xffffffffffffffff responder_id:0xffffffffffffffff target_id:0xffffffffffffffff chip_id:255 DIMM location: not present. DMI handle: 0x0000feff status(0x00000000007f1a00): A read was issued to data that has been poisoned section_status:0x01)
memory_failure_event: pfn 0xfffffffffffff: recovery action for non struct page pfn: Ignored
non_standard_event: severity: 2; sec type:78563412-3412-7856-9abc-def012345679; FRU: 00000000-0000-0000-0000-000000000000 ABCDEFGHIJKLMNOPQRST; data len:33; raw data:53 79 6e 74 68 65 74 69 63 20 6e 6f 6e 73 74 61 6e 64 61 72 64 20 43 50 45 52 20 65 76 65 6e 74 00

Pierre Gondois (19):
  x86/APEI: Extract common CPER memory error reporting helper
  x86/APEI: Report Memory Error Section 2 through MCE
  ras: Bound CPER FRU strings in trace events
  ACPI: APEI: Use empty FRU values if valid bit is absent
  PCI/AER: Embed aer_capability_regs copy in struct aer_recover_entry
  ACPI: APEI: Remove aer allocation in ghes_handle_aer()
  ACPI: extlog: Provide HEST generic data to extlog_print_pcie()
  ACPI: extlog: Align extlog_print_pcie() and ghes_handle_aer()
  ACPI: extlog: Report errors independently of RAS consumers
  ACPI: extlog: Simplify fatal record printing
  RAS: Remove unused ras_userspace_consumers()
  ACPI: extlog: Extract CPER reporting from acpi_extlog
  ACPI: APEI: Share helpers with the common CPER reporter
  ACPI: APEI: Return status from cxl_cper_post_event()
  ACPI: APEI: Extend common CPER reporting for GHES section types
  ACPI: extlog: Report error severity using GHES bindings in MCE
  ACPI: APEI: Share the extlog PCIe handler with GHES
  ACPI: APEI: Route GHES section reporting through extlog
  PCI/ERR: Avoid NULL bridge pointer

 arch/x86/include/asm/mce.h        |   5 +-
 arch/x86/kernel/acpi/apei.c       |   7 +
 arch/x86/kernel/cpu/mce/apei.c    |  43 ++++--
 drivers/acpi/acpi_extlog.c        | 138 ++---------------
 drivers/acpi/apei/Makefile        |   2 +-
 drivers/acpi/apei/apei-base.c     |   5 +
 drivers/acpi/apei/apei-internal.h |   7 +
 drivers/acpi/apei/extlog.c        | 236 ++++++++++++++++++++++++++++++
 drivers/acpi/apei/ghes.c          | 168 +++------------------
 drivers/pci/pcie/aer.c            |  34 ++---
 drivers/pci/pcie/err.c            |   5 +
 drivers/ras/debugfs.c             |  10 --
 drivers/ras/ras.c                 |   2 +-
 include/acpi/apei.h               |   1 +
 include/acpi/ghes.h               |   4 -
 include/linux/aer.h               |   2 +-
 include/linux/ras.h               |   2 -
 include/ras/ras_event.h           |   8 +-
 18 files changed, 345 insertions(+), 334 deletions(-)
 create mode 100644 drivers/acpi/apei/extlog.c

--
2.43.0

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

end of thread, other threads:[~2026-11-17 11:50 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-17 11:10 [PATCH v1 00/19] ACPI: APEI: Share CPER reporting between GHES and extlog Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 01/19] x86/APEI: Extract common CPER memory error reporting helper Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 02/19] x86/APEI: Report Memory Error Section 2 through MCE Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 03/19] ras: Bound CPER FRU strings in trace events Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 04/19] ACPI: APEI: Use empty FRU values if valid bit is absent Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 05/19] PCI/AER: Embed aer_capability_regs copy in struct aer_recover_entry Pierre Gondois
2026-11-17 11:44   ` Lukas Wunner
2026-11-17 11:10 ` [PATCH v1 06/19] ACPI: APEI: Remove aer allocation in ghes_handle_aer() Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 07/19] ACPI: extlog: Provide HEST generic data to extlog_print_pcie() Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 08/19] ACPI: extlog: Align extlog_print_pcie() and ghes_handle_aer() Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 09/19] ACPI: extlog: Report errors independently of RAS consumers Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 10/19] ACPI: extlog: Simplify fatal record printing Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 11/19] RAS: Remove unused ras_userspace_consumers() Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 12/19] ACPI: extlog: Extract CPER reporting from acpi_extlog Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 13/19] ACPI: APEI: Share helpers with the common CPER reporter Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 14/19] ACPI: APEI: Return status from cxl_cper_post_event() Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 15/19] ACPI: APEI: Extend common CPER reporting for GHES section types Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 16/19] ACPI: extlog: Report error severity using GHES bindings in MCE Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 17/19] ACPI: APEI: Share the extlog PCIe handler with GHES Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 18/19] ACPI: APEI: Route GHES section reporting through extlog Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 19/19] PCI/ERR: Avoid NULL bridge pointer Pierre Gondois
2026-11-17 11:50   ` Lukas Wunner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®