public inbox for nvdimm@lists.linux.dev
 help / color / mirror / Atom feed
* [ndctl PATCH v5 0/7] Add error injection support
@ 2025-12-15 21:36 Ben Cheatham
  2025-12-15 21:36 ` [PATCH v5 1/7] libcxl: Add debugfs path to CXL context Ben Cheatham
                   ` (8 more replies)
  0 siblings, 9 replies; 28+ messages in thread
From: Ben Cheatham @ 2025-12-15 21:36 UTC (permalink / raw)
  To: nvdimm; +Cc: linux-cxl, alison.schofield, dave.jiang, benjamin.cheatham

v5 Changes:
	- Use setmntent()/getmntent() instead of open-coding getting the
	  debugfs path (Dave)
	- Use correct return code for sysfs_read_attr() (Dave)

v4 Changes:
	- Variable renames for clarity (Dave)
	- Use errno instead of rc for access() calls (Dave)
	- Check returns for snprintf() (Dave)
	- Add util_cxl_dport_filter() (Dave)
	- Replace printf() calls with log_info() (Dave)
	- Write correct value to debugfs during protocol error injection
	(BIT(error) vs. error)

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.c                           |  26 +++
 cxl/filter.h                           |   5 +
 cxl/inject-error.c                     | 249 ++++++++++++++++++++
 cxl/json.c                             |  30 +++
 cxl/lib/libcxl.c                       | 302 +++++++++++++++++++++++++
 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 +
 17 files changed, 891 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.52.0


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

end of thread, other threads:[~2026-01-06  4:41 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-15 21:36 [ndctl PATCH v5 0/7] Add error injection support Ben Cheatham
2025-12-15 21:36 ` [PATCH v5 1/7] libcxl: Add debugfs path to CXL context Ben Cheatham
2025-12-17  4:26   ` Alison Schofield
2025-12-17 19:55     ` Cheatham, Benjamin
2025-12-15 21:36 ` [PATCH v5 2/7] libcxl: Add CXL protocol errors Ben Cheatham
2025-12-17  4:31   ` Alison Schofield
2025-12-17 19:55     ` Cheatham, Benjamin
2025-12-19  4:38   ` Alison Schofield
2026-01-05 21:00     ` Cheatham, Benjamin
2025-12-15 21:36 ` [PATCH v5 3/7] libcxl: Add poison injection support Ben Cheatham
2025-12-15 21:36 ` [PATCH v5 4/7] cxl: Add inject-error command Ben Cheatham
2025-12-17  4:36   ` Alison Schofield
2025-12-17 19:56     ` Cheatham, Benjamin
2025-12-15 21:36 ` [PATCH v5 5/7] cxl: Add clear-error command Ben Cheatham
2025-12-17  4:39   ` Alison Schofield
2025-12-17 19:56     ` Cheatham, Benjamin
2025-12-15 21:36 ` [PATCH v5 6/7] cxl/list: Add injectable errors in output Ben Cheatham
2025-12-15 21:36 ` [PATCH v5 7/7] Documentation: Add docs for inject/clear-error commands Ben Cheatham
2025-12-17  4:42   ` Alison Schofield
2025-12-17 19:56     ` Cheatham, Benjamin
2025-12-19  4:52   ` Alison Schofield
2026-01-05 21:13     ` Cheatham, Benjamin
2026-01-06  4:41       ` Alison Schofield
2025-12-17  4:47 ` [ndctl PATCH v5 0/7] Add error injection support Alison Schofield
2025-12-17 19:56   ` Cheatham, Benjamin
2025-12-19  5:08     ` Alison Schofield
2026-01-05 21:14       ` Cheatham, Benjamin
2025-12-17  5:00 ` [ndctl PATCH] cxl/test: use inject and clear cmds in cxl-poison.sh Alison Schofield

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