Linux CXL
 help / color / mirror / Atom feed
* [PATCH RFC 0/2] efi/cxl-cper: Report CPER CXL component events through trace events
@ 2023-10-13  6:55 Ira Weiny
  2023-10-13  6:55 ` [PATCH RFC 1/2] firmware/efi: Process CXL Component Events Ira Weiny
  2023-10-13  6:55 ` [PATCH RFC 2/2] cxl/memdev: Register for and process CPER events Ira Weiny
  0 siblings, 2 replies; 6+ messages in thread
From: Ira Weiny @ 2023-10-13  6:55 UTC (permalink / raw)
  To: Dan Williams, Jonathan Cameron, Smita Koralahalli
  Cc: Yazen Ghannam, Davidlohr Bueso, Dave Jiang, Alison Schofield,
	Vishal Verma, Ard Biesheuvel, linux-efi, linux-kernel, linux-cxl,
	Ira Weiny

I know that Smita has taken the initiative[1] on this but I had a
skeleton of using notifiers to allow the CXL code to process the CPER
records via the standard tracing code like Dan mentioned.[2]

So here is a slightly polished version of that code.  This is compile
tested with only.  Smita, feel free to use this any way you see fit.

CXL Component Events, as defined by EFI 2.10 Section N.2.14, wrap a
mostly CXL event payload in an EFI (Common Platform Error Record) CPER
record.  If a device is configured for firmware first these CPER event
records can be processed instead of reading the CXL Event logs directly
from the device.

A number of alternatives were considered to match the memdev with the
CPER record.  For now a simple comparison with the serial number is used
to match a CPER record with a specific device.  Other fields in the CPER
record could be used as well.

[1] https://lore.kernel.org/all/20231012230301.58500-1-Smita.KoralahalliChannabasappa@amd.com/
[2] https://lore.kernel.org/all/6528808cef2ba_780ef294c5@dwillia2-xfh.jf.intel.com.notmuch/

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
---
Ira Weiny (2):
      firmware/efi: Process CXL Component Events
      cxl/memdev: Register for and process CPER events

 drivers/cxl/core/mbox.c         |  7 +++--
 drivers/cxl/cxlmem.h            |  5 +++
 drivers/cxl/pci.c               | 70 ++++++++++++++++++++++++++++++++++++++++-
 drivers/firmware/efi/cper.c     | 16 ++++++++++
 drivers/firmware/efi/cper_cxl.c | 39 +++++++++++++++++++++++
 drivers/firmware/efi/cper_cxl.h | 29 +++++++++++++++++
 include/linux/efi.h             | 49 +++++++++++++++++++++++++++++
 7 files changed, 211 insertions(+), 4 deletions(-)
---
base-commit: 1c8b86a3799f7e5be903c3f49fcdaee29fd385b5
change-id: 20230601-cxl-cper-26ffc839c6c6

Best regards,
-- 
Ira Weiny <ira.weiny@intel.com>


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

end of thread, other threads:[~2023-10-18  2:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-13  6:55 [PATCH RFC 0/2] efi/cxl-cper: Report CPER CXL component events through trace events Ira Weiny
2023-10-13  6:55 ` [PATCH RFC 1/2] firmware/efi: Process CXL Component Events Ira Weiny
2023-10-18  2:37   ` Ira Weiny
2023-10-18  2:43     ` Ira Weiny
2023-10-18  2:41   ` Ira Weiny
2023-10-13  6:55 ` [PATCH RFC 2/2] cxl/memdev: Register for and process CPER events Ira Weiny

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