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>,
	 Bjorn Helgaas <bhelgaas@google.com>
Subject: [PATCH v4 0/7] efi/cxl-cper: Report CPER CXL component events through trace events
Date: Fri, 15 Dec 2023 15:26:26 -0800	[thread overview]
Message-ID: <20231215-cxl-cper-v4-0-01b6dab44fcd@intel.com> (raw)

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

Smita has been a great help with this series.

Dan had a better idea for how to register the call between the efi and
cxl subsystems so this is reworked for V2-4.

Dependencies
============

NOTE this patch depends on Dan's addition of a device guard[1].
Therefore, the base commit is not a stable commit.  I've pushed a branch
with this commit included for testing if folks are interested.[2]

[1] https://lore.kernel.org/all/170250854466.1522182.17555361077409628655.stgit@dwillia2-xfh.jf.intel.com/
[2] https://github.com/weiny2/linux-kernel/tree/cxl-cper-2023-12-15

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 allows the CXL
subsystem to identify the PCI device.

Previous version considered matching the memdev differently.  However,
the most robust was to find the PCI device via Bus, Device, Function and
use the PCI device to find the 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.

In addition this series cleans up the UUID defines used between the
event processing and cxl_test code.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
---
Changes in v4:
- lkp: Fix 0day build issues
       [Functionally the same as v3]
- Link to v3: https://lore.kernel.org/r/20231213-cxl-cper-v3-0-7fd863dd0d25@intel.com

Changes in v3:
- djbw: use scope based cleanup functions
- iweiny: further clean ups
- Link to v2: https://lore.kernel.org/r/20231211-cxl-cper-v2-0-c116900ba658@intel.com

---
Ira Weiny (7):
      cxl/trace: Pass uuid explicitly to event traces
      cxl/events: Promote CXL event structures to a core header
      cxl/events: Create common event UUID defines
      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         |  93 +++++++++++------------
 drivers/cxl/core/trace.h        |  30 ++++----
 drivers/cxl/cxlmem.h            | 110 ++++++---------------------
 drivers/cxl/pci.c               |  55 +++++++++++++-
 drivers/firmware/efi/cper.c     |  15 ++++
 drivers/firmware/efi/cper_cxl.c |  46 ++++++++++++
 drivers/firmware/efi/cper_cxl.h |  29 +++++++
 include/linux/cxl-event.h       | 161 +++++++++++++++++++++++++++++++++++++++
 include/linux/pci.h             |   2 +
 tools/testing/cxl/test/mem.c    | 163 +++++++++++++++++++++++-----------------
 10 files changed, 484 insertions(+), 220 deletions(-)
---
base-commit: 6436863dfabce0d7ac416c8dc661fd513b967d39
change-id: 20230601-cxl-cper-26ffc839c6c6

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


             reply	other threads:[~2023-12-15 23:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15 23:26 Ira Weiny [this message]
2023-12-15 23:26 ` [PATCH v4 1/7] cxl/trace: Pass uuid explicitly to event traces Ira Weiny
2023-12-15 23:26 ` [PATCH v4 2/7] cxl/events: Promote CXL event structures to a core header Ira Weiny
2023-12-15 23:26 ` [PATCH v4 3/7] cxl/events: Create common event UUID defines Ira Weiny
2023-12-15 23:26 ` [PATCH v4 4/7] cxl/events: Separate UUID from event structures Ira Weiny
2023-12-15 23:26 ` [PATCH v4 5/7] cxl/events: Create a CXL event union Ira Weiny
2023-12-15 23:26 ` [PATCH v4 6/7] firmware/efi: Process CXL Component Events Ira Weiny
2023-12-18 18:13   ` Smita Koralahalli
2023-12-18 20:24     ` Dan Williams
2023-12-19 15:43       ` Ira Weiny
2023-12-19 14:24   ` Jonathan Cameron
2023-12-19 18:01     ` Ira Weiny
2023-12-15 23:26 ` [PATCH v4 7/7] cxl/memdev: Register for and process CPER events Ira Weiny
2023-12-18 18:17   ` Smita Koralahalli
2023-12-18 20:56     ` Dan Williams
2023-12-19 16:58       ` Ira Weiny
2023-12-19 17:17         ` Ira Weiny
2023-12-19 14:37   ` Jonathan Cameron
2023-12-19 23:27     ` Ira Weiny
2023-12-19 23:36       ` Dan Williams
2023-12-20  0:29         ` Ira Weiny
2024-01-03 10:41           ` Jonathan Cameron

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=20231215-cxl-cper-v4-0-01b6dab44fcd@intel.com \
    --to=ira.weiny@intel.com \
    --cc=Smita.KoralahalliChannabasappa@amd.com \
    --cc=alison.schofield@intel.com \
    --cc=ardb@kernel.org \
    --cc=bhelgaas@google.com \
    --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).