Skip to content

cxl: CXL Inject & Clear Poison

[email protected] linux-cxl 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest10 patches 5 repliesIn review
  2. v512 patches 22 repliesSuperseded
  3. v48 patches 2 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v38 patches6 repliesSuperseded
v26 patches16 repliesSuperseded
v15 patches19 repliesSuperseded

Changes in v6 from the cover letter

- Drop patches: The deprecate, and the removal of raw access, introduced for all poison commands in v13 of CXL Poison List Retrieval & Tracing, made these 2 patches obsolete:
cxl/memdev: Make inject and clear poison cmds kernel exclusive cxl/mbox: Block inject and clear poison opcodes in raw mode

- The device always writes the write data on Clear, regardless of whether or not the address is actually poisoned. Stop stating otherwise. (Jonathan)
- Update Patch 1 commit message to refer to CXL.mem driver (DaveJ)
- __cxl_dpa_to_region() Stop the walk on a match (Jonathan)
- Set & use cxlds->poison.enabled_cmds for inject & clear
- Simplify inject payload address assignment (DaveJ)
- Use down_read_interruptible in inject/clear
- Tidy up the memdev core api for inject/clear by using cxl_memdev
- Use the available cxl_memdev rather than dev in debugfs_create_file()

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10cxl/memdev: Add support for the Inject Poison mailbox commanddrivers/cxl/core/memdev.c drivers/cxl/cxlmem.h+62 -01 reply
2/10cxl/memdev: Add support for the Clear Poison mailbox commanddrivers/cxl/core/memdev.c drivers/cxl/cxlmem.h+50 -00 replies
3/10cxl/memdev: Warn of poison inject or clear to a mapped regiondrivers/cxl/core/memdev.c+58 -02 replies
4/10cxl/memdev: Trace inject and clear poison as cxl_poison eventsdrivers/cxl/core/core.h drivers/cxl/core/memdev.c drivers/cxl/core/trace.h+22 -30 replies
5/10cxl/mem: Add debugfs attributes for poison inject and clearDocumentation/ABI/testing/debugfs-cxl drivers/cxl/mem.c+63 -00 replies
6/10tools/testing/cxl: Mock the Inject Poison mailbox commandtools/testing/cxl/test/mem.c+77 -00 replies
7/10tools/testing/cxl: Mock the Clear Poison mailbox commandtools/testing/cxl/test/mem.c+36 -00 replies
8/10tools/testing/cxl: Use injected poison for get poison listtools/testing/cxl/test/mem.c+40 -191 reply
9/10tools/testing/cxl: Add a sysfs attr to test poison inject limitstools/testing/cxl/test/mem.c+48 -40 replies
10/10tools/testing/cxl: Require CONFIG_DEBUG_FStools/testing/cxl/config_check.c+1 -00 replies

Reviews trailers per patch

All 10 patches have a Reviewed-by or Acked-by.

PatchJonathan CameronDave Jiang
SeriesT-b
1/10R-b R-b
2/10R-b
3/10R-b
4/10R-b R-b
5/10R-b
6/10R-b
7/10R-b R-b
8/10R-b
9/10R-b
10/10R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/10] cxl: CXL Inject & Clear Poison

From: Alison Schofield <[email protected]>

Built on cxl/next plus [PATCH v13 0/9] CXL Poison List Retrieval & Tracing
https://lore.kernel.org/linux-cxl/[email protected]/

Changes in v6:
- Drop patches: The deprecate, and the removal of raw access, introduced for all poison commands in v13 of CXL Poison List Retrieval & Tracing, made these 2 patches obsolete:
cxl/memdev: Make inject and clear poison cmds kernel exclusive cxl/mbox: Block inject and clear poison opcodes in raw mode

- The device always writes the write data on Clear, regardless of whether or not the address is actually poisoned. Stop stating otherwise. (Jonathan)
- Update Patch 1 commit message to refer to CXL.mem driver (DaveJ)
- __cxl_dpa_to_region() Stop the walk on a match (Jonathan)
- Set & use cxlds->poison.enabled_cmds for inject & clear
- Simplify inject payload address assignment (DaveJ)
- Use down_read_interruptible in inject/clear
- Tidy up the memdev core api for inject/clear by using cxl_memdev
- Use the available cxl_memdev rather than dev in debugfs_create_file()

Link to v5:
https://lore.kernel.org/linux-cxl/[email protected]/

Introducing Inject and Clear Poison support for CXL Devices.

These are optional commands, meaning not all CXL devices must support them. The debugfs attributes, inject_poison and clear_poison, are only visible for devices reporting support of the capability.

Example:

# echo 0x40000000 > /sys/kernel/debug/cxl/mem1/inject_poison

cxl_poison: memdev=mem1 pcidev=cxl_mem.1 trace_type=Inject region= region_uuid=00000000-0000-0000-0000-000000000000 hpa=0xffffffffffffffff dpa=0x40000000 dpa_length=0x40 source=Unknown flags= overflow_time=0

Example in which the injected poison landed in region5:

# echo 0x40000000 > /sys/kernel/debug/cxl/mem0/inject_poison

cxl_poison: memdev=mem0 host=cxl_mem.0 serial=0 trace_type=Inject region=region5 region_uuid=cfcfc13a-5290-4983-aa74-4c8465c25f26 hpa=0xf110000000 dpa=0x40000000 dpa_length=0x40 source=Unknown flags= overflow_time=0

Alison Schofield (10):
cxl/memdev: Add support for the Inject Poison mailbox command cxl/memdev: Add support for the Clear Poison mailbox command cxl/memdev: Warn of poison inject or clear to a mapped region cxl/memdev: Trace inject and clear poison as cxl_poison events cxl/mem: Add debugfs attributes for poison inject and clear tools/testing/cxl: Mock the Inject Poison mailbox command tools/testing/cxl: Mock the Clear Poison mailbox command tools/testing/cxl: Use injected poison for get poison list tools/testing/cxl: Add a sysfs attr to test poison inject limits tools/testing/cxl: Require CONFIG_DEBUG_FS

 Documentation/ABI/testing/debugfs-cxl |  35 +++++
 drivers/cxl/core/core.h               |   2 +
 drivers/cxl/core/memdev.c             | 172 ++++++++++++++++++++
 drivers/cxl/core/trace.h              |   8 +-
 drivers/cxl/cxlmem.h                  |  13 ++
 drivers/cxl/mem.c                     |  28 ++++
 tools/testing/cxl/config_check.c      |   1 +
 tools/testing/cxl/test/mem.c          | 216 +++++++++++++++++++++++---
 8 files changed, 453 insertions(+), 22 deletions(-)
 create mode 100644 Documentation/ABI/testing/debugfs-cxl
Signature · 1 line
2.37.3