Linux-EFI Archive mirror
 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>,
	 Shiju Jose <shiju.jose@huawei.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 0/6] efi/cxl-cper: Report CPER CXL component events through trace events
Date: Wed, 29 Nov 2023 10:00:40 -0800	[thread overview]
Message-ID: <20230601-cxl-cper-v1-0-d19f1ac18ab6@intel.com> (raw)

Series status/background
========================

Smita has been a great help with this series.  This includes testing the
last RFC version enough that I feel confident to make this a V1 with the
change suggested.[1]

[1] https://lore.kernel.org/all/7ec6d2af-c860-9b05-7eaf-c82f50f8e66e@amd.com/

Cover letter
============

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 CXL event records
are not sent directly to the host.

The CXL sub-system uniquely has DPA to HPA translation information.  It
also already has event format tracing.  Restructure the code to make
sharing the data between CPER/event logs most efficient.  Then send the
CXL CPER records to the CXL sub-system for processing.

With event logs the events interrupt the driver directly.  In the EFI
case events are wrapped with device information which needs to be
matched with memdev devices.  A number of alternatives were considered
to match the memdev with the CPER record.  The most robust was to find
the PCI device via Bus, Device, Function and match it to the memdev
driver data.

CPER records are identified with GUID's while CXL event logs contain
UUID's.  The UUID is reported for all events.  While the UUID is
redundant for the known events the UUID's are already used by rasdaemon.
To keep compatibility UUIDs are injected for CPER records based on the
record type.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
---
Changes from RFC:
- iweiny: remove RFC
- Smita: Use pragma pack for the entire cper structure
- Link to v4: https://lore.kernel.org/r/20230601-cxl-cper-v4-0-47bb901f135e@intel.com

---
Ira Weiny (6):
      cxl/trace: Pass uuid explicitly to event traces
      cxl/events: Promote CXL event structures to a core header
      cxl/events: Separate UUID from event structures
      cxl/events: Create a CXL event union
      firmware/efi: Process CXL Component Events
      cxl/memdev: Register for and process CPER events

 drivers/cxl/core/mbox.c         |  65 ++++++++++------
 drivers/cxl/core/trace.h        |  34 ++++----
 drivers/cxl/cxlmem.h            |  96 ++---------------------
 drivers/cxl/pci.c               |  58 +++++++++++++-
 drivers/firmware/efi/cper.c     |  15 ++++
 drivers/firmware/efi/cper_cxl.c |  40 ++++++++++
 drivers/firmware/efi/cper_cxl.h |  29 +++++++
 include/linux/cxl-event.h       | 164 +++++++++++++++++++++++++++++++++++++++
 tools/testing/cxl/test/mem.c    | 166 +++++++++++++++++++++++-----------------
 9 files changed, 465 insertions(+), 202 deletions(-)
---
base-commit: 7475e51b87969e01a6812eac713a1c8310372e8a
change-id: 20230601-cxl-cper-26ffc839c6c6

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


             reply	other threads:[~2023-11-29 18:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 18:00 Ira Weiny [this message]
2023-11-29 18:00 ` [PATCH 1/6] cxl/trace: Pass uuid explicitly to event traces Ira Weiny
2023-12-08  0:30   ` Dan Williams
2023-12-08 18:21     ` Ira Weiny
2023-11-29 18:00 ` [PATCH 2/6] cxl/events: Promote CXL event structures to a core header Ira Weiny
2023-11-29 18:00 ` [PATCH 3/6] cxl/events: Separate UUID from event structures Ira Weiny
2023-11-29 18:00 ` [PATCH 4/6] cxl/events: Create a CXL event union Ira Weiny
2023-11-29 18:00 ` [PATCH 5/6] firmware/efi: Process CXL Component Events Ira Weiny
2023-12-08  1:40   ` Dan Williams
2023-12-08 18:47     ` Ira Weiny
2023-12-08 21:39       ` Dan Williams
2023-11-29 18:00 ` [PATCH 6/6] cxl/memdev: Register for and process CPER events Ira Weiny
2023-12-08  2:04   ` Dan Williams
2023-12-08 19:43     ` Ira Weiny
2023-12-08 21:46       ` Dan Williams
2023-12-11 19:01         ` Ira Weiny
2023-12-11 19:16           ` Dan Williams
2023-12-11 23:01             ` 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-d19f1ac18ab6@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=shiju.jose@huawei.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).