public inbox for nvdimm@lists.linux.dev
 help / color / mirror / Atom feed
From: Ben Cheatham <Benjamin.Cheatham@amd.com>
To: <nvdimm@lists.linux.dev>
Cc: <linux-cxl@vger.kernel.org>, <alison.schofield@intel.com>,
	Ben Cheatham <Benjamin.Cheatham@amd.com>
Subject: [ndctl PATCH v3 0/7] Add error injection support
Date: Tue, 21 Oct 2025 13:31:17 -0500	[thread overview]
Message-ID: <20251021183124.2311-1-Benjamin.Cheatham@amd.com> (raw)

v3 Changes:
	- Rebase on v83 release
	- Fix whitespace errors (Alison)

v2 Changes:
	- Make the --clear option of 'inject-error' its own command (Alison)
	- Debugfs is now found using the /proc/mount entry instead of
	providing the path using a --debugfs option
	- Man page added for 'clear-error'
	- Reword commit descriptions for clarity

This series adds support for injecting CXL protocol (CXL.cache/mem)
errors[1] into CXL RCH Downstream ports and VH root ports[2] and
poison into CXL memory devices through the CXL debugfs. Errors are
injected using a new 'inject-error' command, while errors are reported
using a new cxl-list "-N"/"--injectable-errors" option. Device poison
can be cleared using the 'clear-error' command.

The 'inject-error'/'clear-error' commands and "-N" option of cxl-list all
require access to the CXL driver's debugfs.

The documentation for the new cxl-inject-error command shows both usage
and the possible device/error types, as well as how to retrieve them
using cxl-list. The documentation for cxl-list has also been updated to
show the usage of the new injectable errors option.

[1]: ACPI v6.5 spec, section 18.6.4
[2]: ACPI v6.5 spec, table 18.31

Ben Cheatham (7):
  libcxl: Add debugfs path to CXL context
  libcxl: Add CXL protocol errors
  libcxl: Add poison injection support
  cxl: Add inject-error command
  cxl: Add clear-error command
  cxl/list: Add injectable errors in output
  Documentation: Add docs for inject/clear-error commands

 Documentation/cxl/cxl-clear-error.txt  |  67 ++++++
 Documentation/cxl/cxl-inject-error.txt | 129 ++++++++++++
 Documentation/cxl/cxl-list.txt         |  35 +++-
 Documentation/cxl/meson.build          |   2 +
 cxl/builtin.h                          |   2 +
 cxl/cxl.c                              |   2 +
 cxl/filter.h                           |   3 +
 cxl/inject-error.c                     | 253 +++++++++++++++++++++++
 cxl/json.c                             |  30 +++
 cxl/lib/libcxl.c                       | 274 +++++++++++++++++++++++++
 cxl/lib/libcxl.sym                     |   8 +
 cxl/lib/private.h                      |  14 ++
 cxl/libcxl.h                           |  16 ++
 cxl/list.c                             |   3 +
 cxl/meson.build                        |   1 +
 util/json.h                            |   1 +
 16 files changed, 839 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/cxl/cxl-clear-error.txt
 create mode 100644 Documentation/cxl/cxl-inject-error.txt
 create mode 100644 cxl/inject-error.c

-- 
2.34.1


             reply	other threads:[~2025-10-21 18:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21 18:31 Ben Cheatham [this message]
2025-10-21 18:31 ` [ndctl PATCH v3 1/7] libcxl: Add debugfs path to CXL context Ben Cheatham
2025-10-21 22:55   ` Dave Jiang
2025-10-23 20:15     ` Cheatham, Benjamin
2025-10-21 18:31 ` [ndctl PATCH v3 2/7] libcxl: Add CXL protocol errors Ben Cheatham
2025-10-21 23:15   ` Dave Jiang
2025-10-23 20:15     ` Cheatham, Benjamin
2025-10-23 22:50       ` Dave Jiang
2025-10-21 18:31 ` [ndctl PATCH v3 3/7] libcxl: Add poison injection support Ben Cheatham
2025-10-21 23:44   ` Dave Jiang
2025-10-23 20:15     ` Cheatham, Benjamin
2025-10-21 18:31 ` [ndctl PATCH v3 4/7] cxl: Add inject-error command Ben Cheatham
2025-10-22 17:06   ` Dave Jiang
2025-10-23 20:15     ` Cheatham, Benjamin
2025-10-23 22:51       ` Dave Jiang
2025-10-21 18:31 ` [ndctl PATCH v3 5/7] cxl: Add clear-error command Ben Cheatham
2025-10-21 18:31 ` [ndctl PATCH v3 6/7] cxl/list: Add injectable errors in output Ben Cheatham
2025-10-22 17:18   ` Dave Jiang
2025-10-21 18:31 ` [ndctl PATCH v3 7/7] Documentation: Add docs for inject/clear-error commands Ben Cheatham
2025-10-22 17:22   ` Dave Jiang

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=20251021183124.2311-1-Benjamin.Cheatham@amd.com \
    --to=benjamin.cheatham@amd.com \
    --cc=alison.schofield@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=nvdimm@lists.linux.dev \
    /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