mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 05:32:00 +00:00
591209c798
The CXL driver provides a debugfs interface offering users the ability to inject and clear poison to a memdev. Once a user has injected up to the devices limit further injection requests fail with ENXIO until a clear poison is issued. Users may not have device specs in hand or may want to intentionally hit the limit and then clear. Replace the usual ENXIO return status with EBUSY so users can recognize this failure. Signed-off-by: Alison Schofield <alison.schofield@intel.com> Tested-by: Xingtao Yao <yaoxt.fnst@fujitsu.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://patch.msgid.link/825bd4c67fb55a4373c4182d999ad49d4e6b4fe7.1720316188.git.alison.schofield@intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
71 lines
2.9 KiB
Plaintext
71 lines
2.9 KiB
Plaintext
What: /sys/kernel/debug/cxl/memX/inject_poison
|
|
Date: April, 2023
|
|
KernelVersion: v6.4
|
|
Contact: linux-cxl@vger.kernel.org
|
|
Description:
|
|
(WO) When a Device Physical Address (DPA) is written to this
|
|
attribute, the memdev driver sends an inject poison command to
|
|
the device for the specified address. The DPA must be 64-byte
|
|
aligned and the length of the injected poison is 64-bytes. If
|
|
successful, the device returns poison when the address is
|
|
accessed through the CXL.mem bus. Injecting poison adds the
|
|
address to the device's Poison List and the error source is set
|
|
to Injected. In addition, the device adds a poison creation
|
|
event to its internal Informational Event log, updates the
|
|
Event Status register, and if configured, interrupts the host.
|
|
It is not an error to inject poison into an address that
|
|
already has poison present and no error is returned. If the
|
|
device returns 'Inject Poison Limit Reached' an -EBUSY error
|
|
is returned to the user. The inject_poison attribute is only
|
|
visible for devices supporting the capability.
|
|
|
|
|
|
What: /sys/kernel/debug/memX/clear_poison
|
|
Date: April, 2023
|
|
KernelVersion: v6.4
|
|
Contact: linux-cxl@vger.kernel.org
|
|
Description:
|
|
(WO) When a Device Physical Address (DPA) is written to this
|
|
attribute, the memdev driver sends a clear poison command to
|
|
the device for the specified address. Clearing poison removes
|
|
the address from the device's Poison List and writes 0 (zero)
|
|
for 64 bytes starting at address. It is not an error to clear
|
|
poison from an address that does not have poison set. If the
|
|
device cannot clear poison from the address, -ENXIO is returned.
|
|
The clear_poison attribute is only visible for devices
|
|
supporting the capability.
|
|
|
|
What: /sys/kernel/debug/cxl/einj_types
|
|
Date: January, 2024
|
|
KernelVersion: v6.9
|
|
Contact: linux-cxl@vger.kernel.org
|
|
Description:
|
|
(RO) Prints the CXL protocol error types made available by
|
|
the platform in the format:
|
|
|
|
0x<error number> <error type>
|
|
|
|
The possible error types are (as of ACPI v6.5):
|
|
|
|
0x1000 CXL.cache Protocol Correctable
|
|
0x2000 CXL.cache Protocol Uncorrectable non-fatal
|
|
0x4000 CXL.cache Protocol Uncorrectable fatal
|
|
0x8000 CXL.mem Protocol Correctable
|
|
0x10000 CXL.mem Protocol Uncorrectable non-fatal
|
|
0x20000 CXL.mem Protocol Uncorrectable fatal
|
|
|
|
The <error number> can be written to einj_inject to inject
|
|
<error type> into a chosen dport.
|
|
|
|
What: /sys/kernel/debug/cxl/$dport_dev/einj_inject
|
|
Date: January, 2024
|
|
KernelVersion: v6.9
|
|
Contact: linux-cxl@vger.kernel.org
|
|
Description:
|
|
(WO) Writing an integer to this file injects the corresponding
|
|
CXL protocol error into $dport_dev ($dport_dev will be a device
|
|
name from /sys/bus/pci/devices). The integer to type mapping for
|
|
injection can be found by reading from einj_types. If the dport
|
|
was enumerated in RCH mode, a CXL 1.1 error is injected, otherwise
|
|
a CXL 2.0 error is injected.
|