All of lore.kernel.org
 help / color / mirror / Atom feed
* [ndctl PATCH v6 0/7] Add error injection support
@ 2026-01-09 16:07 Ben Cheatham
  2026-01-09 16:07 ` [PATCH 1/7] libcxl: Add debugfs path to CXL context Ben Cheatham
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Ben Cheatham @ 2026-01-09 16:07 UTC (permalink / raw)
  To: nvdimm, alison.schofield, dave.jiang; +Cc: linux-cxl, benjamin.cheatham

v6 Changes:
	- Rebase to pending branch (Alison)
	- Drop const for ctx->debugfs (Alison)
	- Rename get_debugfs_dir() to get_cxl_debugfs_dir() and return cxl directory in debugfs
	(i.e. "/sys/kernel/debug" -> "/sys/kernel/debug/cxl")
	- Rename ctx->debugfs to ctx->cxl_debugfs
	- Fix missing free of einj path (Alison)
	- Add protocol errors in order to perrors list (Alison)
	- Use hex constants instead of BIT() for protocol errors (Alison)
	- Add symbols to LIBCXL_11 instead of LIBCXL_10 (Alison)
	- Update commit message to reflect util_cxl_dport_filter() behavior (Alison)
	- Remove EINJ_TYPES_BUF_SIZE #ifdef (Alison)
	- Fix type mismatch of addr in poison_action() (Alison)
	- Fix inject_action() to catch missing 'type' option (Alison)
	- Remove '-N' option and show the information behind that option by default when
	CXL debugfs is present (Alison)
	- Add 'protocol_injectable' attribute for dports (Alison)
	- Update inject-error man page with port injection example (Alison)
	- Add warning to inject-error man page (Alison)

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. Device poison can be
cleared using the 'clear-error' command. The 'inject-error' and
'clear-error' commands 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. cxl-list has been updated to include the possible error
types for protocol error injection (under the "bus" object) and which CXL
dports and memory devices support injection.

[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  |  69 ++++++
 Documentation/cxl/cxl-inject-error.txt | 161 ++++++++++++
 Documentation/cxl/meson.build          |   2 +
 cxl/builtin.h                          |   2 +
 cxl/cxl.c                              |   2 +
 cxl/filter.c                           |  26 ++
 cxl/filter.h                           |   2 +
 cxl/inject-error.c                     | 248 +++++++++++++++++++
 cxl/json.c                             |  38 +++
 cxl/lib/libcxl.c                       | 330 +++++++++++++++++++++++++
 cxl/lib/libcxl.sym                     |  10 +
 cxl/lib/private.h                      |  14 ++
 cxl/libcxl.h                           |  18 ++
 cxl/meson.build                        |   1 +
 14 files changed, 923 insertions(+)
 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] 19+ messages in thread
* [ndctl PATCH v7 0/7] Add error injection support
@ 2026-01-22 20:37 Ben Cheatham
  2026-01-22 20:37 ` [PATCH 1/7] libcxl: Add debugfs path to CXL context Ben Cheatham
  0 siblings, 1 reply; 19+ messages in thread
From: Ben Cheatham @ 2026-01-22 20:37 UTC (permalink / raw)
  To: nvdimm, alison.schofield, dave.jiang; +Cc: linux-cxl, benjamin.cheatham

v7 Changes:
	- Use PATH_MAX instead of strlen(ctx->cxl_debugfs) for debugfs paths (Dave)
	- Add goto for error paths to memdev poison functions in patch 3/7 (Dave)
	- Add Dave's Reviewed-by tags

v6 Changes:
	- Rebase to pending branch (Alison)
	- Drop const for ctx->debugfs (Alison)
	- Rename get_debugfs_dir() to get_cxl_debugfs_dir() and return cxl directory in debugfs
	(i.e. "/sys/kernel/debug" -> "/sys/kernel/debug/cxl")
	- Rename ctx->debugfs to ctx->cxl_debugfs
	- Fix missing free of einj path (Alison)
	- Add protocol errors in order to perrors list (Alison)
	- Use hex constants instead of BIT() for protocol errors (Alison)
	- Add symbols to LIBCXL_11 instead of LIBCXL_10 (Alison)
	- Update commit message to reflect util_cxl_dport_filter() behavior (Alison)
	- Remove EINJ_TYPES_BUF_SIZE #ifdef (Alison)
	- Fix type mismatch of addr in poison_action() (Alison)
	- Fix inject_action() to catch missing 'type' option (Alison)
	- Remove '-N' option and show the information behind that option by default when
	CXL debugfs is present (Alison)
	- Add 'protocol_injectable' attribute for dports (Alison)
	- Update inject-error man page with port injection example (Alison)
	- Add warning to inject-error man page (Alison)

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)

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. Device poison can be
cleared using the 'clear-error' command. The 'inject-error' and
'clear-error' commands 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. cxl-list has been updated to include the possible error
types for protocol error injection (under the "bus" object) and which CXL
dports and memory devices support injection.

[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  |  69 ++++++
 Documentation/cxl/cxl-inject-error.txt | 161 ++++++++++++
 Documentation/cxl/meson.build          |   2 +
 cxl/builtin.h                          |   2 +
 cxl/cxl.c                              |   2 +
 cxl/filter.c                           |  26 ++
 cxl/filter.h                           |   2 +
 cxl/inject-error.c                     | 248 +++++++++++++++++++
 cxl/json.c                             |  38 +++
 cxl/lib/libcxl.c                       | 327 +++++++++++++++++++++++++
 cxl/lib/libcxl.sym                     |  10 +
 cxl/lib/private.h                      |  14 ++
 cxl/libcxl.h                           |  18 ++
 cxl/meson.build                        |   1 +
 14 files changed, 920 insertions(+)
 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] 19+ messages in thread

end of thread, other threads:[~2026-01-22 20:57 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-09 16:07 [ndctl PATCH v6 0/7] Add error injection support Ben Cheatham
2026-01-09 16:07 ` [PATCH 1/7] libcxl: Add debugfs path to CXL context Ben Cheatham
2026-01-09 17:43   ` Dave Jiang
2026-01-09 16:07 ` [PATCH 2/7] libcxl: Add CXL protocol errors Ben Cheatham
2026-01-09 17:54   ` Dave Jiang
2026-01-12 17:20     ` Cheatham, Benjamin
2026-01-09 16:07 ` [PATCH 3/7] libcxl: Add poison injection support Ben Cheatham
2026-01-09 18:03   ` Dave Jiang
2026-01-12 17:20     ` Cheatham, Benjamin
2026-01-09 16:07 ` [PATCH 4/7] cxl: Add inject-error command Ben Cheatham
2026-01-09 21:53   ` Dave Jiang
2026-01-12 17:20     ` Cheatham, Benjamin
2026-01-09 16:07 ` [PATCH 5/7] cxl: Add clear-error command Ben Cheatham
2026-01-09 22:12   ` Dave Jiang
2026-01-09 16:07 ` [PATCH 6/7] cxl/list: Add injectable errors in output Ben Cheatham
2026-01-09 22:17   ` Dave Jiang
2026-01-09 16:07 ` [PATCH 7/7] Documentation: Add docs for inject/clear-error commands Ben Cheatham
2026-01-09 22:25   ` Dave Jiang
  -- strict thread matches above, loose matches on Subject: below --
2026-01-22 20:37 [ndctl PATCH v7 0/7] Add error injection support Ben Cheatham
2026-01-22 20:37 ` [PATCH 1/7] libcxl: Add debugfs path to CXL context Ben Cheatham

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.