All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ira Weiny <ira.weiny@intel.com>
To: Dan Williams <dan.j.williams@intel.com>,
	Jonathan Cameron <jonathan.cameron@huawei.com>,
	Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
Cc: Yazen Ghannam <yazen.ghannam@amd.com>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Dave Jiang <dave.jiang@intel.com>,
	Alison Schofield <alison.schofield@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-cxl@vger.kernel.org, Ira Weiny <ira.weiny@intel.com>
Subject: [PATCH RFC 0/2] efi/cxl-cper: Report CPER CXL component events through trace events
Date: Thu, 12 Oct 2023 23:55:18 -0700	[thread overview]
Message-ID: <20230601-cxl-cper-v1-0-99ba43f8f770@intel.com> (raw)

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>


             reply	other threads:[~2023-10-13  6:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13  6:55 Ira Weiny [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230601-cxl-cper-v1-0-99ba43f8f770@intel.com \
    --to=ira.weiny@intel.com \
    --cc=Smita.KoralahalliChannabasappa@amd.com \
    --cc=alison.schofield@intel.com \
    --cc=ardb@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vishal.l.verma@intel.com \
    --cc=yazen.ghannam@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.