150d527f5SAlison SchofieldWhat: /sys/kernel/debug/cxl/memX/inject_poison 250d527f5SAlison SchofieldDate: April, 2023 350d527f5SAlison SchofieldKernelVersion: v6.4 450d527f5SAlison SchofieldContact: linux-cxl@vger.kernel.org 550d527f5SAlison SchofieldDescription: 650d527f5SAlison Schofield (WO) When a Device Physical Address (DPA) is written to this 750d527f5SAlison Schofield attribute, the memdev driver sends an inject poison command to 850d527f5SAlison Schofield the device for the specified address. The DPA must be 64-byte 950d527f5SAlison Schofield aligned and the length of the injected poison is 64-bytes. If 1050d527f5SAlison Schofield successful, the device returns poison when the address is 1150d527f5SAlison Schofield accessed through the CXL.mem bus. Injecting poison adds the 1250d527f5SAlison Schofield address to the device's Poison List and the error source is set 1350d527f5SAlison Schofield to Injected. In addition, the device adds a poison creation 1450d527f5SAlison Schofield event to its internal Informational Event log, updates the 1550d527f5SAlison Schofield Event Status register, and if configured, interrupts the host. 1650d527f5SAlison Schofield It is not an error to inject poison into an address that 1750d527f5SAlison Schofield already has poison present and no error is returned. The 1850d527f5SAlison Schofield inject_poison attribute is only visible for devices supporting 1950d527f5SAlison Schofield the capability. 2050d527f5SAlison Schofield 2150d527f5SAlison Schofield 2250d527f5SAlison SchofieldWhat: /sys/kernel/debug/memX/clear_poison 2350d527f5SAlison SchofieldDate: April, 2023 2450d527f5SAlison SchofieldKernelVersion: v6.4 2550d527f5SAlison SchofieldContact: linux-cxl@vger.kernel.org 2650d527f5SAlison SchofieldDescription: 2750d527f5SAlison Schofield (WO) When a Device Physical Address (DPA) is written to this 2850d527f5SAlison Schofield attribute, the memdev driver sends a clear poison command to 2950d527f5SAlison Schofield the device for the specified address. Clearing poison removes 3050d527f5SAlison Schofield the address from the device's Poison List and writes 0 (zero) 3150d527f5SAlison Schofield for 64 bytes starting at address. It is not an error to clear 3250d527f5SAlison Schofield poison from an address that does not have poison set. If the 3350d527f5SAlison Schofield device cannot clear poison from the address, -ENXIO is returned. 3450d527f5SAlison Schofield The clear_poison attribute is only visible for devices 3550d527f5SAlison Schofield supporting the capability. 368039804cSBen Cheatham 378039804cSBen CheathamWhat: /sys/kernel/debug/cxl/einj_types 388039804cSBen CheathamDate: January, 2024 398039804cSBen CheathamKernelVersion: v6.9 408039804cSBen CheathamContact: linux-cxl@vger.kernel.org 418039804cSBen CheathamDescription: 428039804cSBen Cheatham (RO) Prints the CXL protocol error types made available by 43*edc12434SDan Williams the platform in the format: 44*edc12434SDan Williams 45*edc12434SDan Williams 0x<error number> <error type> 46*edc12434SDan Williams 478039804cSBen Cheatham The possible error types are (as of ACPI v6.5): 48*edc12434SDan Williams 498039804cSBen Cheatham 0x1000 CXL.cache Protocol Correctable 508039804cSBen Cheatham 0x2000 CXL.cache Protocol Uncorrectable non-fatal 518039804cSBen Cheatham 0x4000 CXL.cache Protocol Uncorrectable fatal 528039804cSBen Cheatham 0x8000 CXL.mem Protocol Correctable 538039804cSBen Cheatham 0x10000 CXL.mem Protocol Uncorrectable non-fatal 548039804cSBen Cheatham 0x20000 CXL.mem Protocol Uncorrectable fatal 558039804cSBen Cheatham 568039804cSBen Cheatham The <error number> can be written to einj_inject to inject 578039804cSBen Cheatham <error type> into a chosen dport. 588039804cSBen Cheatham 598039804cSBen CheathamWhat: /sys/kernel/debug/cxl/$dport_dev/einj_inject 608039804cSBen CheathamDate: January, 2024 618039804cSBen CheathamKernelVersion: v6.9 628039804cSBen CheathamContact: linux-cxl@vger.kernel.org 638039804cSBen CheathamDescription: 648039804cSBen Cheatham (WO) Writing an integer to this file injects the corresponding 658039804cSBen Cheatham CXL protocol error into $dport_dev ($dport_dev will be a device 668039804cSBen Cheatham name from /sys/bus/pci/devices). The integer to type mapping for 678039804cSBen Cheatham injection can be found by reading from einj_types. If the dport 688039804cSBen Cheatham was enumerated in RCH mode, a CXL 1.1 error is injected, otherwise 698039804cSBen Cheatham a CXL 2.0 error is injected. 70