18dd2bc0fSBen WidawskyWhat: /sys/bus/cxl/flush 28dd2bc0fSBen WidawskyDate: Januarry, 2022 38dd2bc0fSBen WidawskyKernelVersion: v5.18 48dd2bc0fSBen WidawskyContact: linux-cxl@vger.kernel.org 58dd2bc0fSBen WidawskyDescription: 68dd2bc0fSBen Widawsky (WO) If userspace manually unbinds a port the kernel schedules 78dd2bc0fSBen Widawsky all descendant memdevs for unbind. Writing '1' to this attribute 88dd2bc0fSBen Widawsky flushes that work. 98dd2bc0fSBen Widawsky 106b625b2bSDan Williams 11b39cb105SDan WilliamsWhat: /sys/bus/cxl/devices/memX/firmware_version 12b39cb105SDan WilliamsDate: December, 2020 13b39cb105SDan WilliamsKernelVersion: v5.12 14b39cb105SDan WilliamsContact: linux-cxl@vger.kernel.org 15b39cb105SDan WilliamsDescription: 16b39cb105SDan Williams (RO) "FW Revision" string as reported by the Identify 17b39cb105SDan Williams Memory Device Output Payload in the CXL-2.0 18b39cb105SDan Williams specification. 19b39cb105SDan Williams 206b625b2bSDan Williams 21b39cb105SDan WilliamsWhat: /sys/bus/cxl/devices/memX/ram/size 22b39cb105SDan WilliamsDate: December, 2020 23b39cb105SDan WilliamsKernelVersion: v5.12 24b39cb105SDan WilliamsContact: linux-cxl@vger.kernel.org 25b39cb105SDan WilliamsDescription: 26b39cb105SDan Williams (RO) "Volatile Only Capacity" as bytes. Represents the 27b39cb105SDan Williams identically named field in the Identify Memory Device Output 28b39cb105SDan Williams Payload in the CXL-2.0 specification. 29b39cb105SDan Williams 306b625b2bSDan Williams 31b39cb105SDan WilliamsWhat: /sys/bus/cxl/devices/memX/pmem/size 32b39cb105SDan WilliamsDate: December, 2020 33b39cb105SDan WilliamsKernelVersion: v5.12 34b39cb105SDan WilliamsContact: linux-cxl@vger.kernel.org 35b39cb105SDan WilliamsDescription: 36b39cb105SDan Williams (RO) "Persistent Only Capacity" as bytes. Represents the 37b39cb105SDan Williams identically named field in the Identify Memory Device Output 38b39cb105SDan Williams Payload in the CXL-2.0 specification. 394812be97SDan Williams 406b625b2bSDan Williams 41bcc79ea3SDan WilliamsWhat: /sys/bus/cxl/devices/memX/serial 42bcc79ea3SDan WilliamsDate: January, 2022 43bcc79ea3SDan WilliamsKernelVersion: v5.18 44bcc79ea3SDan WilliamsContact: linux-cxl@vger.kernel.org 45bcc79ea3SDan WilliamsDescription: 46bcc79ea3SDan Williams (RO) 64-bit serial number per the PCIe Device Serial Number 47bcc79ea3SDan Williams capability. Mandatory for CXL devices, see CXL 2.0 8.1.12.2 48bcc79ea3SDan Williams Memory Device PCIe Capabilities and Extended Capabilities. 49bcc79ea3SDan Williams 506b625b2bSDan Williams 51cf1f6877SDan WilliamsWhat: /sys/bus/cxl/devices/memX/numa_node 52cf1f6877SDan WilliamsDate: January, 2022 53cf1f6877SDan WilliamsKernelVersion: v5.18 54cf1f6877SDan WilliamsContact: linux-cxl@vger.kernel.org 55cf1f6877SDan WilliamsDescription: 56cf1f6877SDan Williams (RO) If NUMA is enabled and the platform has affinitized the 57cf1f6877SDan Williams host PCI device for this memory device, emit the CPU node 58cf1f6877SDan Williams affinity for this device. 59cf1f6877SDan Williams 606b625b2bSDan Williams 619968c9ddSDavidlohr BuesoWhat: /sys/bus/cxl/devices/memX/security/state 629968c9ddSDavidlohr BuesoDate: June, 2023 639968c9ddSDavidlohr BuesoKernelVersion: v6.5 649968c9ddSDavidlohr BuesoContact: linux-cxl@vger.kernel.org 659968c9ddSDavidlohr BuesoDescription: 669968c9ddSDavidlohr Bueso (RO) Reading this file will display the CXL security state for 67*48dcdbb1SDavidlohr Bueso that device. Such states can be: 'disabled', 'sanitize', when 68*48dcdbb1SDavidlohr Bueso a sanitization is currently underway; or those available only 69*48dcdbb1SDavidlohr Bueso for persistent memory: 'locked', 'unlocked' or 'frozen'. This 70*48dcdbb1SDavidlohr Bueso sysfs entry is select/poll capable from userspace to notify 71*48dcdbb1SDavidlohr Bueso upon completion of a sanitize operation. 72*48dcdbb1SDavidlohr Bueso 73*48dcdbb1SDavidlohr Bueso 74*48dcdbb1SDavidlohr BuesoWhat: /sys/bus/cxl/devices/memX/security/sanitize 75*48dcdbb1SDavidlohr BuesoDate: June, 2023 76*48dcdbb1SDavidlohr BuesoKernelVersion: v6.5 77*48dcdbb1SDavidlohr BuesoContact: linux-cxl@vger.kernel.org 78*48dcdbb1SDavidlohr BuesoDescription: 79*48dcdbb1SDavidlohr Bueso (WO) Write a boolean 'true' string value to this attribute to 80*48dcdbb1SDavidlohr Bueso sanitize the device to securely re-purpose or decommission it. 81*48dcdbb1SDavidlohr Bueso This is done by ensuring that all user data and meta-data, 82*48dcdbb1SDavidlohr Bueso whether it resides in persistent capacity, volatile capacity, 83*48dcdbb1SDavidlohr Bueso or the LSA, is made permanently unavailable by whatever means 84*48dcdbb1SDavidlohr Bueso is appropriate for the media type. This functionality requires 85*48dcdbb1SDavidlohr Bueso the device to be not be actively decoding any HPA ranges. 869968c9ddSDavidlohr Bueso 879968c9ddSDavidlohr Bueso 884812be97SDan WilliamsWhat: /sys/bus/cxl/devices/*/devtype 894812be97SDan WilliamsDate: June, 2021 904812be97SDan WilliamsKernelVersion: v5.14 914812be97SDan WilliamsContact: linux-cxl@vger.kernel.org 924812be97SDan WilliamsDescription: 9386677a4eSDan Williams (RO) CXL device objects export the devtype attribute which 9486677a4eSDan Williams mirrors the same value communicated in the DEVTYPE environment 9586677a4eSDan Williams variable for uevents for devices on the "cxl" bus. 964812be97SDan Williams 976b625b2bSDan Williams 9883fbdbe4SDan WilliamsWhat: /sys/bus/cxl/devices/*/modalias 9983fbdbe4SDan WilliamsDate: December, 2021 10083fbdbe4SDan WilliamsKernelVersion: v5.18 10183fbdbe4SDan WilliamsContact: linux-cxl@vger.kernel.org 10283fbdbe4SDan WilliamsDescription: 10386677a4eSDan Williams (RO) CXL device objects export the modalias attribute which 10486677a4eSDan Williams mirrors the same value communicated in the MODALIAS environment 10586677a4eSDan Williams variable for uevents for devices on the "cxl" bus. 10683fbdbe4SDan Williams 1076b625b2bSDan Williams 1084812be97SDan WilliamsWhat: /sys/bus/cxl/devices/portX/uport 1094812be97SDan WilliamsDate: June, 2021 1104812be97SDan WilliamsKernelVersion: v5.14 1114812be97SDan WilliamsContact: linux-cxl@vger.kernel.org 1124812be97SDan WilliamsDescription: 11386677a4eSDan Williams (RO) CXL port objects are enumerated from either a platform 11486677a4eSDan Williams firmware device (ACPI0017 and ACPI0016) or PCIe switch upstream 11586677a4eSDan Williams port with CXL component registers. The 'uport' symlink connects 11686677a4eSDan Williams the CXL portX object to the device that published the CXL port 1174812be97SDan Williams capability. 1187d4b5ca2SDan Williams 1196b625b2bSDan Williams 120172738bbSDan WilliamsWhat: /sys/bus/cxl/devices/{port,endpoint}X/parent_dport 121172738bbSDan WilliamsDate: January, 2023 122172738bbSDan WilliamsKernelVersion: v6.3 123172738bbSDan WilliamsContact: linux-cxl@vger.kernel.org 124172738bbSDan WilliamsDescription: 125172738bbSDan Williams (RO) CXL port objects are instantiated for each upstream port in 126172738bbSDan Williams a CXL/PCIe switch, and for each endpoint to map the 127172738bbSDan Williams corresponding memory device into the CXL port hierarchy. When a 128172738bbSDan Williams descendant CXL port (switch or endpoint) is enumerated it is 129172738bbSDan Williams useful to know which 'dport' object in the parent CXL port 130172738bbSDan Williams routes to this descendant. The 'parent_dport' symlink points to 131172738bbSDan Williams the device representing the downstream port of a CXL switch that 132172738bbSDan Williams routes to {port,endpoint}X. 133172738bbSDan Williams 134172738bbSDan Williams 1357d4b5ca2SDan WilliamsWhat: /sys/bus/cxl/devices/portX/dportY 1367d4b5ca2SDan WilliamsDate: June, 2021 1377d4b5ca2SDan WilliamsKernelVersion: v5.14 1387d4b5ca2SDan WilliamsContact: linux-cxl@vger.kernel.org 1397d4b5ca2SDan WilliamsDescription: 14086677a4eSDan Williams (RO) CXL port objects are enumerated from either a platform 14186677a4eSDan Williams firmware device (ACPI0017 and ACPI0016) or PCIe switch upstream 14286677a4eSDan Williams port with CXL component registers. The 'dportY' symlink 14386677a4eSDan Williams identifies one or more downstream ports that the upstream port 14486677a4eSDan Williams may target in its decode of CXL memory resources. The 'Y' 14586677a4eSDan Williams integer reflects the hardware port unique-id used in the 14686677a4eSDan Williams hardware decoder target list. 14740ba17afSDan Williams 1486b625b2bSDan Williams 14940ba17afSDan WilliamsWhat: /sys/bus/cxl/devices/decoderX.Y 15040ba17afSDan WilliamsDate: June, 2021 15140ba17afSDan WilliamsKernelVersion: v5.14 15240ba17afSDan WilliamsContact: linux-cxl@vger.kernel.org 15340ba17afSDan WilliamsDescription: 15486677a4eSDan Williams (RO) CXL decoder objects are enumerated from either a platform 15540ba17afSDan Williams firmware description, or a CXL HDM decoder register set in a 15640ba17afSDan Williams PCIe device (see CXL 2.0 section 8.2.5.12 CXL HDM Decoder 15740ba17afSDan Williams Capability Structure). The 'X' in decoderX.Y represents the 15840ba17afSDan Williams cxl_port container of this decoder, and 'Y' represents the 15940ba17afSDan Williams instance id of a given decoder resource. 16040ba17afSDan Williams 1616b625b2bSDan Williams 16240ba17afSDan WilliamsWhat: /sys/bus/cxl/devices/decoderX.Y/{start,size} 16340ba17afSDan WilliamsDate: June, 2021 16440ba17afSDan WilliamsKernelVersion: v5.14 16540ba17afSDan WilliamsContact: linux-cxl@vger.kernel.org 16640ba17afSDan WilliamsDescription: 16786677a4eSDan Williams (RO) The 'start' and 'size' attributes together convey the 16886677a4eSDan Williams physical address base and number of bytes mapped in the 16986677a4eSDan Williams decoder's decode window. For decoders of devtype 17086677a4eSDan Williams "cxl_decoder_root" the address range is fixed. For decoders of 17186677a4eSDan Williams devtype "cxl_decoder_switch" the address is bounded by the 17286677a4eSDan Williams decode range of the cxl_port ancestor of the decoder's cxl_port, 17386677a4eSDan Williams and dynamically updates based on the active memory regions in 17486677a4eSDan Williams that address space. 17540ba17afSDan Williams 1766b625b2bSDan Williams 17740ba17afSDan WilliamsWhat: /sys/bus/cxl/devices/decoderX.Y/locked 17840ba17afSDan WilliamsDate: June, 2021 17940ba17afSDan WilliamsKernelVersion: v5.14 18040ba17afSDan WilliamsContact: linux-cxl@vger.kernel.org 18140ba17afSDan WilliamsDescription: 18286677a4eSDan Williams (RO) CXL HDM decoders have the capability to lock the 18386677a4eSDan Williams configuration until the next device reset. For decoders of 18486677a4eSDan Williams devtype "cxl_decoder_root" there is no standard facility to 18586677a4eSDan Williams unlock them. For decoders of devtype "cxl_decoder_switch" a 18686677a4eSDan Williams secondary bus reset, of the PCIe bridge that provides the bus 18786677a4eSDan Williams for this decoders uport, unlocks / resets the decoder. 18840ba17afSDan Williams 1896b625b2bSDan Williams 19040ba17afSDan WilliamsWhat: /sys/bus/cxl/devices/decoderX.Y/target_list 19140ba17afSDan WilliamsDate: June, 2021 19240ba17afSDan WilliamsKernelVersion: v5.14 19340ba17afSDan WilliamsContact: linux-cxl@vger.kernel.org 19440ba17afSDan WilliamsDescription: 19586677a4eSDan Williams (RO) Display a comma separated list of the current decoder 19686677a4eSDan Williams target configuration. The list is ordered by the current 19786677a4eSDan Williams configured interleave order of the decoder's dport instances. 19886677a4eSDan Williams Each entry in the list is a dport id. 19940ba17afSDan Williams 2006b625b2bSDan Williams 20140ba17afSDan WilliamsWhat: /sys/bus/cxl/devices/decoderX.Y/cap_{pmem,ram,type2,type3} 20240ba17afSDan WilliamsDate: June, 2021 20340ba17afSDan WilliamsKernelVersion: v5.14 20440ba17afSDan WilliamsContact: linux-cxl@vger.kernel.org 20540ba17afSDan WilliamsDescription: 20686677a4eSDan Williams (RO) When a CXL decoder is of devtype "cxl_decoder_root", it 20740ba17afSDan Williams represents a fixed memory window identified by platform 20840ba17afSDan Williams firmware. A fixed window may only support a subset of memory 20940ba17afSDan Williams types. The 'cap_*' attributes indicate whether persistent 21040ba17afSDan Williams memory, volatile memory, accelerator memory, and / or expander 21140ba17afSDan Williams memory may be mapped behind this decoder's memory window. 21240ba17afSDan Williams 2136b625b2bSDan Williams 21440ba17afSDan WilliamsWhat: /sys/bus/cxl/devices/decoderX.Y/target_type 21540ba17afSDan WilliamsDate: June, 2021 21640ba17afSDan WilliamsKernelVersion: v5.14 21740ba17afSDan WilliamsContact: linux-cxl@vger.kernel.org 21840ba17afSDan WilliamsDescription: 21986677a4eSDan Williams (RO) When a CXL decoder is of devtype "cxl_decoder_switch", it 22086677a4eSDan Williams can optionally decode either accelerator memory (type-2) or 22186677a4eSDan Williams expander memory (type-3). The 'target_type' attribute indicates 22286677a4eSDan Williams the current setting which may dynamically change based on what 22340ba17afSDan Williams memory regions are activated in this decode hierarchy. 224c9700604SIra Weiny 2256b625b2bSDan Williams 226c9700604SIra WeinyWhat: /sys/bus/cxl/devices/endpointX/CDAT 227c9700604SIra WeinyDate: July, 2022 2288752efd2SDan WilliamsKernelVersion: v6.0 229c9700604SIra WeinyContact: linux-cxl@vger.kernel.org 230c9700604SIra WeinyDescription: 231c9700604SIra Weiny (RO) If this sysfs entry is not present no DOE mailbox was 232c9700604SIra Weiny found to support CDAT data. If it is present and the length of 233c9700604SIra Weiny the data is 0 reading the CDAT data failed. Otherwise the CDAT 234c9700604SIra Weiny data is reported. 2352c866903SDan Williams 2362c866903SDan Williams 2372c866903SDan WilliamsWhat: /sys/bus/cxl/devices/decoderX.Y/mode 2382c866903SDan WilliamsDate: May, 2022 2398752efd2SDan WilliamsKernelVersion: v6.0 2402c866903SDan WilliamsContact: linux-cxl@vger.kernel.org 2412c866903SDan WilliamsDescription: 242cf880423SDan Williams (RW) When a CXL decoder is of devtype "cxl_decoder_endpoint" it 2432c866903SDan Williams translates from a host physical address range, to a device local 2442c866903SDan Williams address range. Device-local address ranges are further split 2452c866903SDan Williams into a 'ram' (volatile memory) range and 'pmem' (persistent 2462c866903SDan Williams memory) range. The 'mode' attribute emits one of 'ram', 'pmem', 2472c866903SDan Williams 'mixed', or 'none'. The 'mixed' indication is for error cases 2482c866903SDan Williams when a decoder straddles the volatile/persistent partition 2492c866903SDan Williams boundary, and 'none' indicates the decoder is not actively 2502c866903SDan Williams decoding, or no DPA allocation policy has been set. 251cf880423SDan Williams 252cf880423SDan Williams 'mode' can be written, when the decoder is in the 'disabled' 253cf880423SDan Williams state, with either 'ram' or 'pmem' to set the boundaries for the 254cf880423SDan Williams next allocation. 255cf880423SDan Williams 256cf880423SDan Williams 257cf880423SDan WilliamsWhat: /sys/bus/cxl/devices/decoderX.Y/dpa_resource 258cf880423SDan WilliamsDate: May, 2022 2598752efd2SDan WilliamsKernelVersion: v6.0 260cf880423SDan WilliamsContact: linux-cxl@vger.kernel.org 261cf880423SDan WilliamsDescription: 262cf880423SDan Williams (RO) When a CXL decoder is of devtype "cxl_decoder_endpoint", 263cf880423SDan Williams and its 'dpa_size' attribute is non-zero, this attribute 264cf880423SDan Williams indicates the device physical address (DPA) base address of the 265cf880423SDan Williams allocation. 266cf880423SDan Williams 267cf880423SDan Williams 268cf880423SDan WilliamsWhat: /sys/bus/cxl/devices/decoderX.Y/dpa_size 269cf880423SDan WilliamsDate: May, 2022 2708752efd2SDan WilliamsKernelVersion: v6.0 271cf880423SDan WilliamsContact: linux-cxl@vger.kernel.org 272cf880423SDan WilliamsDescription: 273cf880423SDan Williams (RW) When a CXL decoder is of devtype "cxl_decoder_endpoint" it 274cf880423SDan Williams translates from a host physical address range, to a device local 275cf880423SDan Williams address range. The range, base address plus length in bytes, of 276cf880423SDan Williams DPA allocated to this decoder is conveyed in these 2 attributes. 277cf880423SDan Williams Allocations can be mutated as long as the decoder is in the 278cf880423SDan Williams disabled state. A write to 'dpa_size' releases the previous DPA 279cf880423SDan Williams allocation and then attempts to allocate from the free capacity 280cf880423SDan Williams in the device partition referred to by 'decoderX.Y/mode'. 281cf880423SDan Williams Allocate and free requests can only be performed on the highest 282cf880423SDan Williams instance number disabled decoder with non-zero size. I.e. 283cf880423SDan Williams allocations are enforced to occur in increasing 'decoderX.Y/id' 284cf880423SDan Williams order and frees are enforced to occur in decreasing 285cf880423SDan Williams 'decoderX.Y/id' order. 286538831f1SBen Widawsky 287538831f1SBen Widawsky 288538831f1SBen WidawskyWhat: /sys/bus/cxl/devices/decoderX.Y/interleave_ways 289538831f1SBen WidawskyDate: May, 2022 2908752efd2SDan WilliamsKernelVersion: v6.0 291538831f1SBen WidawskyContact: linux-cxl@vger.kernel.org 292538831f1SBen WidawskyDescription: 293538831f1SBen Widawsky (RO) The number of targets across which this decoder's host 294538831f1SBen Widawsky physical address (HPA) memory range is interleaved. The device 295538831f1SBen Widawsky maps every Nth block of HPA (of size == 296538831f1SBen Widawsky 'interleave_granularity') to consecutive DPA addresses. The 297538831f1SBen Widawsky decoder's position in the interleave is determined by the 298538831f1SBen Widawsky device's (endpoint or switch) switch ancestry. For root 299538831f1SBen Widawsky decoders their interleave is specified by platform firmware and 300538831f1SBen Widawsky they only specify a downstream target order for host bridges. 301538831f1SBen Widawsky 302538831f1SBen Widawsky 303538831f1SBen WidawskyWhat: /sys/bus/cxl/devices/decoderX.Y/interleave_granularity 304538831f1SBen WidawskyDate: May, 2022 3058752efd2SDan WilliamsKernelVersion: v6.0 306538831f1SBen WidawskyContact: linux-cxl@vger.kernel.org 307538831f1SBen WidawskyDescription: 308538831f1SBen Widawsky (RO) The number of consecutive bytes of host physical address 309538831f1SBen Widawsky space this decoder claims at address N before the decode rotates 310538831f1SBen Widawsky to the next target in the interleave at address N + 311538831f1SBen Widawsky interleave_granularity (assuming N is aligned to 312538831f1SBen Widawsky interleave_granularity). 313779dd20cSBen Widawsky 314779dd20cSBen Widawsky 3156e099264SDan WilliamsWhat: /sys/bus/cxl/devices/decoderX.Y/create_{pmem,ram}_region 3166e099264SDan WilliamsDate: May, 2022, January, 2023 3176e099264SDan WilliamsKernelVersion: v6.0 (pmem), v6.3 (ram) 318779dd20cSBen WidawskyContact: linux-cxl@vger.kernel.org 319779dd20cSBen WidawskyDescription: 320779dd20cSBen Widawsky (RW) Write a string in the form 'regionZ' to start the process 3216e099264SDan Williams of defining a new persistent, or volatile memory region 3226e099264SDan Williams (interleave-set) within the decode range bounded by root decoder 3236e099264SDan Williams 'decoderX.Y'. The value written must match the current value 3246e099264SDan Williams returned from reading this attribute. An atomic compare exchange 3256e099264SDan Williams operation is done on write to assign the requested id to a 3266e099264SDan Williams region and allocate the region-id for the next creation attempt. 3276e099264SDan Williams EBUSY is returned if the region name written does not match the 3286e099264SDan Williams current cached value. 329779dd20cSBen Widawsky 330779dd20cSBen Widawsky 331779dd20cSBen WidawskyWhat: /sys/bus/cxl/devices/decoderX.Y/delete_region 332779dd20cSBen WidawskyDate: May, 2022 3338752efd2SDan WilliamsKernelVersion: v6.0 334779dd20cSBen WidawskyContact: linux-cxl@vger.kernel.org 335779dd20cSBen WidawskyDescription: 336779dd20cSBen Widawsky (WO) Write a string in the form 'regionZ' to delete that region, 337779dd20cSBen Widawsky provided it is currently idle / not bound to a driver. 338dd5ba0ebSBen Widawsky 339dd5ba0ebSBen Widawsky 340dd5ba0ebSBen WidawskyWhat: /sys/bus/cxl/devices/regionZ/uuid 341dd5ba0ebSBen WidawskyDate: May, 2022 3428752efd2SDan WilliamsKernelVersion: v6.0 343dd5ba0ebSBen WidawskyContact: linux-cxl@vger.kernel.org 344dd5ba0ebSBen WidawskyDescription: 345dd5ba0ebSBen Widawsky (RW) Write a unique identifier for the region. This field must 346dd5ba0ebSBen Widawsky be set for persistent regions and it must not conflict with the 347a8e7d558SDan Williams UUID of another region. For volatile ram regions this 348a8e7d558SDan Williams attribute is a read-only empty string. 34980d10a6cSBen Widawsky 35080d10a6cSBen Widawsky 35180d10a6cSBen WidawskyWhat: /sys/bus/cxl/devices/regionZ/interleave_granularity 35280d10a6cSBen WidawskyDate: May, 2022 3538752efd2SDan WilliamsKernelVersion: v6.0 35480d10a6cSBen WidawskyContact: linux-cxl@vger.kernel.org 35580d10a6cSBen WidawskyDescription: 35680d10a6cSBen Widawsky (RW) Set the number of consecutive bytes each device in the 35780d10a6cSBen Widawsky interleave set will claim. The possible interleave granularity 35880d10a6cSBen Widawsky values are determined by the CXL spec and the participating 35980d10a6cSBen Widawsky devices. 36080d10a6cSBen Widawsky 36180d10a6cSBen Widawsky 36280d10a6cSBen WidawskyWhat: /sys/bus/cxl/devices/regionZ/interleave_ways 36380d10a6cSBen WidawskyDate: May, 2022 3648752efd2SDan WilliamsKernelVersion: v6.0 36580d10a6cSBen WidawskyContact: linux-cxl@vger.kernel.org 36680d10a6cSBen WidawskyDescription: 36780d10a6cSBen Widawsky (RW) Configures the number of devices participating in the 36880d10a6cSBen Widawsky region is set by writing this value. Each device will provide 36980d10a6cSBen Widawsky 1/interleave_ways of storage for the region. 37023a22cd1SDan Williams 37123a22cd1SDan Williams 37223a22cd1SDan WilliamsWhat: /sys/bus/cxl/devices/regionZ/size 37323a22cd1SDan WilliamsDate: May, 2022 3748752efd2SDan WilliamsKernelVersion: v6.0 37523a22cd1SDan WilliamsContact: linux-cxl@vger.kernel.org 37623a22cd1SDan WilliamsDescription: 37723a22cd1SDan Williams (RW) System physical address space to be consumed by the region. 37823a22cd1SDan Williams When written trigger the driver to allocate space out of the 37923a22cd1SDan Williams parent root decoder's address space. When read the size of the 38023a22cd1SDan Williams address space is reported and should match the span of the 38123a22cd1SDan Williams region's resource attribute. Size shall be set after the 38223a22cd1SDan Williams interleave configuration parameters. Once set it cannot be 38323a22cd1SDan Williams changed, only freed by writing 0. The kernel makes no guarantees 38423a22cd1SDan Williams that data is maintained over an address space freeing event, and 38523a22cd1SDan Williams there is no guarantee that a free followed by an allocate 38623a22cd1SDan Williams results in the same address being allocated. 38723a22cd1SDan Williams 38823a22cd1SDan Williams 3897d505f98SDan WilliamsWhat: /sys/bus/cxl/devices/regionZ/mode 3907d505f98SDan WilliamsDate: January, 2023 3917d505f98SDan WilliamsKernelVersion: v6.3 3927d505f98SDan WilliamsContact: linux-cxl@vger.kernel.org 3937d505f98SDan WilliamsDescription: 3947d505f98SDan Williams (RO) The mode of a region is established at region creation time 3957d505f98SDan Williams and dictates the mode of the endpoint decoder that comprise the 3967d505f98SDan Williams region. For more details on the possible modes see 3977d505f98SDan Williams /sys/bus/cxl/devices/decoderX.Y/mode 3987d505f98SDan Williams 3997d505f98SDan Williams 40023a22cd1SDan WilliamsWhat: /sys/bus/cxl/devices/regionZ/resource 40123a22cd1SDan WilliamsDate: May, 2022 4028752efd2SDan WilliamsKernelVersion: v6.0 40323a22cd1SDan WilliamsContact: linux-cxl@vger.kernel.org 40423a22cd1SDan WilliamsDescription: 40523a22cd1SDan Williams (RO) A region is a contiguous partition of a CXL root decoder 40623a22cd1SDan Williams address space. Region capacity is allocated by writing to the 40723a22cd1SDan Williams size attribute, the resulting physical address space determined 40823a22cd1SDan Williams by the driver is reflected here. It is therefore not useful to 40923a22cd1SDan Williams read this before writing a value to the size attribute. 410b9686e8cSDan Williams 411b9686e8cSDan Williams 412b9686e8cSDan WilliamsWhat: /sys/bus/cxl/devices/regionZ/target[0..N] 413b9686e8cSDan WilliamsDate: May, 2022 4148752efd2SDan WilliamsKernelVersion: v6.0 415b9686e8cSDan WilliamsContact: linux-cxl@vger.kernel.org 416b9686e8cSDan WilliamsDescription: 417b9686e8cSDan Williams (RW) Write an endpoint decoder object name to 'targetX' where X 418b9686e8cSDan Williams is the intended position of the endpoint device in the region 419b9686e8cSDan Williams interleave and N is the 'interleave_ways' setting for the 420b9686e8cSDan Williams region. ENXIO is returned if the write results in an impossible 421b9686e8cSDan Williams to map decode scenario, like the endpoint is unreachable at that 422b9686e8cSDan Williams position relative to the root decoder interleave. EBUSY is 423b9686e8cSDan Williams returned if the position in the region is already occupied, or 424b9686e8cSDan Williams if the region is not in a state to accept interleave 425b9686e8cSDan Williams configuration changes. EINVAL is returned if the object name is 426b9686e8cSDan Williams not an endpoint decoder. Once all positions have been 427b9686e8cSDan Williams successfully written a final validation for decode conflicts is 428b9686e8cSDan Williams performed before activating the region. 429176baefbSDan Williams 430176baefbSDan Williams 431176baefbSDan WilliamsWhat: /sys/bus/cxl/devices/regionZ/commit 432176baefbSDan WilliamsDate: May, 2022 4338752efd2SDan WilliamsKernelVersion: v6.0 434176baefbSDan WilliamsContact: linux-cxl@vger.kernel.org 435176baefbSDan WilliamsDescription: 436176baefbSDan Williams (RW) Write a boolean 'true' string value to this attribute to 437176baefbSDan Williams trigger the region to transition from the software programmed 438176baefbSDan Williams state to the actively decoding in hardware state. The commit 439176baefbSDan Williams operation in addition to validating that the region is in proper 440176baefbSDan Williams configured state, validates that the decoders are being 441176baefbSDan Williams committed in spec mandated order (last committed decoder id + 442176baefbSDan Williams 1), and checks that the hardware accepts the commit request. 443176baefbSDan Williams Reading this value indicates whether the region is committed or 444176baefbSDan Williams not. 4457ff6ad10SAlison Schofield 4467ff6ad10SAlison Schofield 4477ff6ad10SAlison SchofieldWhat: /sys/bus/cxl/devices/memX/trigger_poison_list 4487ff6ad10SAlison SchofieldDate: April, 2023 4497ff6ad10SAlison SchofieldKernelVersion: v6.4 4507ff6ad10SAlison SchofieldContact: linux-cxl@vger.kernel.org 4517ff6ad10SAlison SchofieldDescription: 4527ff6ad10SAlison Schofield (WO) When a boolean 'true' is written to this attribute the 4537ff6ad10SAlison Schofield memdev driver retrieves the poison list from the device. The 4547ff6ad10SAlison Schofield list consists of addresses that are poisoned, or would result 4557ff6ad10SAlison Schofield in poison if accessed, and the source of the poison. This 4567ff6ad10SAlison Schofield attribute is only visible for devices supporting the 4577ff6ad10SAlison Schofield capability. The retrieved errors are logged as kernel 4587ff6ad10SAlison Schofield events when cxl_poison event tracing is enabled. 459