xref: /linux/Documentation/ABI/testing/debugfs-cxl (revision 75f4d93ee8faf08546f3cc4c3d96c866b24358c8)
1What:		/sys/kernel/debug/cxl/memX/inject_poison
2Date:		April, 2023
3KernelVersion:	v6.4
4Contact:	linux-cxl@vger.kernel.org
5Description:
6		(WO) When a Device Physical Address (DPA) is written to this
7		attribute, the memdev driver sends an inject poison command to
8		the device for the specified address. The DPA must be 64-byte
9		aligned and the length of the injected poison is 64-bytes. If
10		successful, the device returns poison when the address is
11		accessed through the CXL.mem bus. Injecting poison adds the
12		address to the device's Poison List and the error source is set
13		to Injected. In addition, the device adds a poison creation
14		event to its internal Informational Event log, updates the
15		Event Status register, and if configured, interrupts the host.
16		It is not an error to inject poison into an address that
17		already has poison present and no error is returned. The
18		inject_poison attribute is only visible for devices supporting
19		the capability.
20
21
22What:		/sys/kernel/debug/memX/clear_poison
23Date:		April, 2023
24KernelVersion:	v6.4
25Contact:	linux-cxl@vger.kernel.org
26Description:
27		(WO) When a Device Physical Address (DPA) is written to this
28		attribute, the memdev driver sends a clear poison command to
29		the device for the specified address. Clearing poison removes
30		the address from the device's Poison List and writes 0 (zero)
31		for 64 bytes starting at address. It is not an error to clear
32		poison from an address that does not have poison set. If the
33		device cannot clear poison from the address, -ENXIO is returned.
34		The clear_poison attribute is only visible for devices
35		supporting the capability.
36
37What:		/sys/kernel/debug/cxl/einj_types
38Date:		January, 2024
39KernelVersion:	v6.9
40Contact:	linux-cxl@vger.kernel.org
41Description:
42		(RO) Prints the CXL protocol error types made available by
43		the platform in the format "0x<error number>	<error type>".
44		The possible error types are (as of ACPI v6.5):
45			0x1000	CXL.cache Protocol Correctable
46			0x2000	CXL.cache Protocol Uncorrectable non-fatal
47			0x4000	CXL.cache Protocol Uncorrectable fatal
48			0x8000	CXL.mem Protocol Correctable
49			0x10000	CXL.mem Protocol Uncorrectable non-fatal
50			0x20000	CXL.mem Protocol Uncorrectable fatal
51
52		The <error number> can be written to einj_inject to inject
53		<error type> into a chosen dport.
54
55What:		/sys/kernel/debug/cxl/$dport_dev/einj_inject
56Date:		January, 2024
57KernelVersion:	v6.9
58Contact:	linux-cxl@vger.kernel.org
59Description:
60		(WO) Writing an integer to this file injects the corresponding
61		CXL protocol error into $dport_dev ($dport_dev will be a device
62		name from /sys/bus/pci/devices). The integer to type mapping for
63		injection can be found by reading from einj_types. If the dport
64		was enumerated in RCH mode, a CXL 1.1 error is injected, otherwise
65		a CXL 2.0 error is injected.
66