162306a36Sopenharmony_ciWhat: /sys/bus/cxl/flush 262306a36Sopenharmony_ciDate: Januarry, 2022 362306a36Sopenharmony_ciKernelVersion: v5.18 462306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 562306a36Sopenharmony_ciDescription: 662306a36Sopenharmony_ci (WO) If userspace manually unbinds a port the kernel schedules 762306a36Sopenharmony_ci all descendant memdevs for unbind. Writing '1' to this attribute 862306a36Sopenharmony_ci flushes that work. 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/memX/firmware_version 1262306a36Sopenharmony_ciDate: December, 2020 1362306a36Sopenharmony_ciKernelVersion: v5.12 1462306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 1562306a36Sopenharmony_ciDescription: 1662306a36Sopenharmony_ci (RO) "FW Revision" string as reported by the Identify 1762306a36Sopenharmony_ci Memory Device Output Payload in the CXL-2.0 1862306a36Sopenharmony_ci specification. 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/memX/ram/size 2262306a36Sopenharmony_ciDate: December, 2020 2362306a36Sopenharmony_ciKernelVersion: v5.12 2462306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 2562306a36Sopenharmony_ciDescription: 2662306a36Sopenharmony_ci (RO) "Volatile Only Capacity" as bytes. Represents the 2762306a36Sopenharmony_ci identically named field in the Identify Memory Device Output 2862306a36Sopenharmony_ci Payload in the CXL-2.0 specification. 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/memX/pmem/size 3262306a36Sopenharmony_ciDate: December, 2020 3362306a36Sopenharmony_ciKernelVersion: v5.12 3462306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 3562306a36Sopenharmony_ciDescription: 3662306a36Sopenharmony_ci (RO) "Persistent Only Capacity" as bytes. Represents the 3762306a36Sopenharmony_ci identically named field in the Identify Memory Device Output 3862306a36Sopenharmony_ci Payload in the CXL-2.0 specification. 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/memX/serial 4262306a36Sopenharmony_ciDate: January, 2022 4362306a36Sopenharmony_ciKernelVersion: v5.18 4462306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 4562306a36Sopenharmony_ciDescription: 4662306a36Sopenharmony_ci (RO) 64-bit serial number per the PCIe Device Serial Number 4762306a36Sopenharmony_ci capability. Mandatory for CXL devices, see CXL 2.0 8.1.12.2 4862306a36Sopenharmony_ci Memory Device PCIe Capabilities and Extended Capabilities. 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/memX/numa_node 5262306a36Sopenharmony_ciDate: January, 2022 5362306a36Sopenharmony_ciKernelVersion: v5.18 5462306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 5562306a36Sopenharmony_ciDescription: 5662306a36Sopenharmony_ci (RO) If NUMA is enabled and the platform has affinitized the 5762306a36Sopenharmony_ci host PCI device for this memory device, emit the CPU node 5862306a36Sopenharmony_ci affinity for this device. 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/memX/security/state 6262306a36Sopenharmony_ciDate: June, 2023 6362306a36Sopenharmony_ciKernelVersion: v6.5 6462306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 6562306a36Sopenharmony_ciDescription: 6662306a36Sopenharmony_ci (RO) Reading this file will display the CXL security state for 6762306a36Sopenharmony_ci that device. Such states can be: 'disabled', 'sanitize', when 6862306a36Sopenharmony_ci a sanitization is currently underway; or those available only 6962306a36Sopenharmony_ci for persistent memory: 'locked', 'unlocked' or 'frozen'. This 7062306a36Sopenharmony_ci sysfs entry is select/poll capable from userspace to notify 7162306a36Sopenharmony_ci upon completion of a sanitize operation. 7262306a36Sopenharmony_ci 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/memX/security/sanitize 7562306a36Sopenharmony_ciDate: June, 2023 7662306a36Sopenharmony_ciKernelVersion: v6.5 7762306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 7862306a36Sopenharmony_ciDescription: 7962306a36Sopenharmony_ci (WO) Write a boolean 'true' string value to this attribute to 8062306a36Sopenharmony_ci sanitize the device to securely re-purpose or decommission it. 8162306a36Sopenharmony_ci This is done by ensuring that all user data and meta-data, 8262306a36Sopenharmony_ci whether it resides in persistent capacity, volatile capacity, 8362306a36Sopenharmony_ci or the LSA, is made permanently unavailable by whatever means 8462306a36Sopenharmony_ci is appropriate for the media type. This functionality requires 8562306a36Sopenharmony_ci the device to be disabled, that is, not actively decoding any 8662306a36Sopenharmony_ci HPA ranges. This permits avoiding explicit global CPU cache 8762306a36Sopenharmony_ci management, relying instead for it to be done when a region 8862306a36Sopenharmony_ci transitions between software programmed and hardware committed 8962306a36Sopenharmony_ci states. If this file is not present, then there is no hardware 9062306a36Sopenharmony_ci support for the operation. 9162306a36Sopenharmony_ci 9262306a36Sopenharmony_ci 9362306a36Sopenharmony_ciWhat /sys/bus/cxl/devices/memX/security/erase 9462306a36Sopenharmony_ciDate: June, 2023 9562306a36Sopenharmony_ciKernelVersion: v6.5 9662306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 9762306a36Sopenharmony_ciDescription: 9862306a36Sopenharmony_ci (WO) Write a boolean 'true' string value to this attribute to 9962306a36Sopenharmony_ci secure erase user data by changing the media encryption keys for 10062306a36Sopenharmony_ci all user data areas of the device. This functionality requires 10162306a36Sopenharmony_ci the device to be disabled, that is, not actively decoding any 10262306a36Sopenharmony_ci HPA ranges. This permits avoiding explicit global CPU cache 10362306a36Sopenharmony_ci management, relying instead for it to be done when a region 10462306a36Sopenharmony_ci transitions between software programmed and hardware committed 10562306a36Sopenharmony_ci states. If this file is not present, then there is no hardware 10662306a36Sopenharmony_ci support for the operation. 10762306a36Sopenharmony_ci 10862306a36Sopenharmony_ci 10962306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/memX/firmware/ 11062306a36Sopenharmony_ciDate: April, 2023 11162306a36Sopenharmony_ciKernelVersion: v6.5 11262306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 11362306a36Sopenharmony_ciDescription: 11462306a36Sopenharmony_ci (RW) Firmware uploader mechanism. The different files under 11562306a36Sopenharmony_ci this directory can be used to upload and activate new 11662306a36Sopenharmony_ci firmware for CXL devices. The interfaces under this are 11762306a36Sopenharmony_ci documented in sysfs-class-firmware. 11862306a36Sopenharmony_ci 11962306a36Sopenharmony_ci 12062306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/*/devtype 12162306a36Sopenharmony_ciDate: June, 2021 12262306a36Sopenharmony_ciKernelVersion: v5.14 12362306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 12462306a36Sopenharmony_ciDescription: 12562306a36Sopenharmony_ci (RO) CXL device objects export the devtype attribute which 12662306a36Sopenharmony_ci mirrors the same value communicated in the DEVTYPE environment 12762306a36Sopenharmony_ci variable for uevents for devices on the "cxl" bus. 12862306a36Sopenharmony_ci 12962306a36Sopenharmony_ci 13062306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/*/modalias 13162306a36Sopenharmony_ciDate: December, 2021 13262306a36Sopenharmony_ciKernelVersion: v5.18 13362306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 13462306a36Sopenharmony_ciDescription: 13562306a36Sopenharmony_ci (RO) CXL device objects export the modalias attribute which 13662306a36Sopenharmony_ci mirrors the same value communicated in the MODALIAS environment 13762306a36Sopenharmony_ci variable for uevents for devices on the "cxl" bus. 13862306a36Sopenharmony_ci 13962306a36Sopenharmony_ci 14062306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/portX/uport 14162306a36Sopenharmony_ciDate: June, 2021 14262306a36Sopenharmony_ciKernelVersion: v5.14 14362306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 14462306a36Sopenharmony_ciDescription: 14562306a36Sopenharmony_ci (RO) CXL port objects are enumerated from either a platform 14662306a36Sopenharmony_ci firmware device (ACPI0017 and ACPI0016) or PCIe switch upstream 14762306a36Sopenharmony_ci port with CXL component registers. The 'uport' symlink connects 14862306a36Sopenharmony_ci the CXL portX object to the device that published the CXL port 14962306a36Sopenharmony_ci capability. 15062306a36Sopenharmony_ci 15162306a36Sopenharmony_ci 15262306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/{port,endpoint}X/parent_dport 15362306a36Sopenharmony_ciDate: January, 2023 15462306a36Sopenharmony_ciKernelVersion: v6.3 15562306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 15662306a36Sopenharmony_ciDescription: 15762306a36Sopenharmony_ci (RO) CXL port objects are instantiated for each upstream port in 15862306a36Sopenharmony_ci a CXL/PCIe switch, and for each endpoint to map the 15962306a36Sopenharmony_ci corresponding memory device into the CXL port hierarchy. When a 16062306a36Sopenharmony_ci descendant CXL port (switch or endpoint) is enumerated it is 16162306a36Sopenharmony_ci useful to know which 'dport' object in the parent CXL port 16262306a36Sopenharmony_ci routes to this descendant. The 'parent_dport' symlink points to 16362306a36Sopenharmony_ci the device representing the downstream port of a CXL switch that 16462306a36Sopenharmony_ci routes to {port,endpoint}X. 16562306a36Sopenharmony_ci 16662306a36Sopenharmony_ci 16762306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/portX/dportY 16862306a36Sopenharmony_ciDate: June, 2021 16962306a36Sopenharmony_ciKernelVersion: v5.14 17062306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 17162306a36Sopenharmony_ciDescription: 17262306a36Sopenharmony_ci (RO) CXL port objects are enumerated from either a platform 17362306a36Sopenharmony_ci firmware device (ACPI0017 and ACPI0016) or PCIe switch upstream 17462306a36Sopenharmony_ci port with CXL component registers. The 'dportY' symlink 17562306a36Sopenharmony_ci identifies one or more downstream ports that the upstream port 17662306a36Sopenharmony_ci may target in its decode of CXL memory resources. The 'Y' 17762306a36Sopenharmony_ci integer reflects the hardware port unique-id used in the 17862306a36Sopenharmony_ci hardware decoder target list. 17962306a36Sopenharmony_ci 18062306a36Sopenharmony_ci 18162306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/decoderX.Y 18262306a36Sopenharmony_ciDate: June, 2021 18362306a36Sopenharmony_ciKernelVersion: v5.14 18462306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 18562306a36Sopenharmony_ciDescription: 18662306a36Sopenharmony_ci (RO) CXL decoder objects are enumerated from either a platform 18762306a36Sopenharmony_ci firmware description, or a CXL HDM decoder register set in a 18862306a36Sopenharmony_ci PCIe device (see CXL 2.0 section 8.2.5.12 CXL HDM Decoder 18962306a36Sopenharmony_ci Capability Structure). The 'X' in decoderX.Y represents the 19062306a36Sopenharmony_ci cxl_port container of this decoder, and 'Y' represents the 19162306a36Sopenharmony_ci instance id of a given decoder resource. 19262306a36Sopenharmony_ci 19362306a36Sopenharmony_ci 19462306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/decoderX.Y/{start,size} 19562306a36Sopenharmony_ciDate: June, 2021 19662306a36Sopenharmony_ciKernelVersion: v5.14 19762306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 19862306a36Sopenharmony_ciDescription: 19962306a36Sopenharmony_ci (RO) The 'start' and 'size' attributes together convey the 20062306a36Sopenharmony_ci physical address base and number of bytes mapped in the 20162306a36Sopenharmony_ci decoder's decode window. For decoders of devtype 20262306a36Sopenharmony_ci "cxl_decoder_root" the address range is fixed. For decoders of 20362306a36Sopenharmony_ci devtype "cxl_decoder_switch" the address is bounded by the 20462306a36Sopenharmony_ci decode range of the cxl_port ancestor of the decoder's cxl_port, 20562306a36Sopenharmony_ci and dynamically updates based on the active memory regions in 20662306a36Sopenharmony_ci that address space. 20762306a36Sopenharmony_ci 20862306a36Sopenharmony_ci 20962306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/decoderX.Y/locked 21062306a36Sopenharmony_ciDate: June, 2021 21162306a36Sopenharmony_ciKernelVersion: v5.14 21262306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 21362306a36Sopenharmony_ciDescription: 21462306a36Sopenharmony_ci (RO) CXL HDM decoders have the capability to lock the 21562306a36Sopenharmony_ci configuration until the next device reset. For decoders of 21662306a36Sopenharmony_ci devtype "cxl_decoder_root" there is no standard facility to 21762306a36Sopenharmony_ci unlock them. For decoders of devtype "cxl_decoder_switch" a 21862306a36Sopenharmony_ci secondary bus reset, of the PCIe bridge that provides the bus 21962306a36Sopenharmony_ci for this decoders uport, unlocks / resets the decoder. 22062306a36Sopenharmony_ci 22162306a36Sopenharmony_ci 22262306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/decoderX.Y/target_list 22362306a36Sopenharmony_ciDate: June, 2021 22462306a36Sopenharmony_ciKernelVersion: v5.14 22562306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 22662306a36Sopenharmony_ciDescription: 22762306a36Sopenharmony_ci (RO) Display a comma separated list of the current decoder 22862306a36Sopenharmony_ci target configuration. The list is ordered by the current 22962306a36Sopenharmony_ci configured interleave order of the decoder's dport instances. 23062306a36Sopenharmony_ci Each entry in the list is a dport id. 23162306a36Sopenharmony_ci 23262306a36Sopenharmony_ci 23362306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/decoderX.Y/cap_{pmem,ram,type2,type3} 23462306a36Sopenharmony_ciDate: June, 2021 23562306a36Sopenharmony_ciKernelVersion: v5.14 23662306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 23762306a36Sopenharmony_ciDescription: 23862306a36Sopenharmony_ci (RO) When a CXL decoder is of devtype "cxl_decoder_root", it 23962306a36Sopenharmony_ci represents a fixed memory window identified by platform 24062306a36Sopenharmony_ci firmware. A fixed window may only support a subset of memory 24162306a36Sopenharmony_ci types. The 'cap_*' attributes indicate whether persistent 24262306a36Sopenharmony_ci memory, volatile memory, accelerator memory, and / or expander 24362306a36Sopenharmony_ci memory may be mapped behind this decoder's memory window. 24462306a36Sopenharmony_ci 24562306a36Sopenharmony_ci 24662306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/decoderX.Y/target_type 24762306a36Sopenharmony_ciDate: June, 2021 24862306a36Sopenharmony_ciKernelVersion: v5.14 24962306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 25062306a36Sopenharmony_ciDescription: 25162306a36Sopenharmony_ci (RO) When a CXL decoder is of devtype "cxl_decoder_switch", it 25262306a36Sopenharmony_ci can optionally decode either accelerator memory (type-2) or 25362306a36Sopenharmony_ci expander memory (type-3). The 'target_type' attribute indicates 25462306a36Sopenharmony_ci the current setting which may dynamically change based on what 25562306a36Sopenharmony_ci memory regions are activated in this decode hierarchy. 25662306a36Sopenharmony_ci 25762306a36Sopenharmony_ci 25862306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/endpointX/CDAT 25962306a36Sopenharmony_ciDate: July, 2022 26062306a36Sopenharmony_ciKernelVersion: v6.0 26162306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 26262306a36Sopenharmony_ciDescription: 26362306a36Sopenharmony_ci (RO) If this sysfs entry is not present no DOE mailbox was 26462306a36Sopenharmony_ci found to support CDAT data. If it is present and the length of 26562306a36Sopenharmony_ci the data is 0 reading the CDAT data failed. Otherwise the CDAT 26662306a36Sopenharmony_ci data is reported. 26762306a36Sopenharmony_ci 26862306a36Sopenharmony_ci 26962306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/decoderX.Y/mode 27062306a36Sopenharmony_ciDate: May, 2022 27162306a36Sopenharmony_ciKernelVersion: v6.0 27262306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 27362306a36Sopenharmony_ciDescription: 27462306a36Sopenharmony_ci (RW) When a CXL decoder is of devtype "cxl_decoder_endpoint" it 27562306a36Sopenharmony_ci translates from a host physical address range, to a device local 27662306a36Sopenharmony_ci address range. Device-local address ranges are further split 27762306a36Sopenharmony_ci into a 'ram' (volatile memory) range and 'pmem' (persistent 27862306a36Sopenharmony_ci memory) range. The 'mode' attribute emits one of 'ram', 'pmem', 27962306a36Sopenharmony_ci 'mixed', or 'none'. The 'mixed' indication is for error cases 28062306a36Sopenharmony_ci when a decoder straddles the volatile/persistent partition 28162306a36Sopenharmony_ci boundary, and 'none' indicates the decoder is not actively 28262306a36Sopenharmony_ci decoding, or no DPA allocation policy has been set. 28362306a36Sopenharmony_ci 28462306a36Sopenharmony_ci 'mode' can be written, when the decoder is in the 'disabled' 28562306a36Sopenharmony_ci state, with either 'ram' or 'pmem' to set the boundaries for the 28662306a36Sopenharmony_ci next allocation. 28762306a36Sopenharmony_ci 28862306a36Sopenharmony_ci 28962306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/decoderX.Y/dpa_resource 29062306a36Sopenharmony_ciDate: May, 2022 29162306a36Sopenharmony_ciKernelVersion: v6.0 29262306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 29362306a36Sopenharmony_ciDescription: 29462306a36Sopenharmony_ci (RO) When a CXL decoder is of devtype "cxl_decoder_endpoint", 29562306a36Sopenharmony_ci and its 'dpa_size' attribute is non-zero, this attribute 29662306a36Sopenharmony_ci indicates the device physical address (DPA) base address of the 29762306a36Sopenharmony_ci allocation. 29862306a36Sopenharmony_ci 29962306a36Sopenharmony_ci 30062306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/decoderX.Y/dpa_size 30162306a36Sopenharmony_ciDate: May, 2022 30262306a36Sopenharmony_ciKernelVersion: v6.0 30362306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 30462306a36Sopenharmony_ciDescription: 30562306a36Sopenharmony_ci (RW) When a CXL decoder is of devtype "cxl_decoder_endpoint" it 30662306a36Sopenharmony_ci translates from a host physical address range, to a device local 30762306a36Sopenharmony_ci address range. The range, base address plus length in bytes, of 30862306a36Sopenharmony_ci DPA allocated to this decoder is conveyed in these 2 attributes. 30962306a36Sopenharmony_ci Allocations can be mutated as long as the decoder is in the 31062306a36Sopenharmony_ci disabled state. A write to 'dpa_size' releases the previous DPA 31162306a36Sopenharmony_ci allocation and then attempts to allocate from the free capacity 31262306a36Sopenharmony_ci in the device partition referred to by 'decoderX.Y/mode'. 31362306a36Sopenharmony_ci Allocate and free requests can only be performed on the highest 31462306a36Sopenharmony_ci instance number disabled decoder with non-zero size. I.e. 31562306a36Sopenharmony_ci allocations are enforced to occur in increasing 'decoderX.Y/id' 31662306a36Sopenharmony_ci order and frees are enforced to occur in decreasing 31762306a36Sopenharmony_ci 'decoderX.Y/id' order. 31862306a36Sopenharmony_ci 31962306a36Sopenharmony_ci 32062306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/decoderX.Y/interleave_ways 32162306a36Sopenharmony_ciDate: May, 2022 32262306a36Sopenharmony_ciKernelVersion: v6.0 32362306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 32462306a36Sopenharmony_ciDescription: 32562306a36Sopenharmony_ci (RO) The number of targets across which this decoder's host 32662306a36Sopenharmony_ci physical address (HPA) memory range is interleaved. The device 32762306a36Sopenharmony_ci maps every Nth block of HPA (of size == 32862306a36Sopenharmony_ci 'interleave_granularity') to consecutive DPA addresses. The 32962306a36Sopenharmony_ci decoder's position in the interleave is determined by the 33062306a36Sopenharmony_ci device's (endpoint or switch) switch ancestry. For root 33162306a36Sopenharmony_ci decoders their interleave is specified by platform firmware and 33262306a36Sopenharmony_ci they only specify a downstream target order for host bridges. 33362306a36Sopenharmony_ci 33462306a36Sopenharmony_ci 33562306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/decoderX.Y/interleave_granularity 33662306a36Sopenharmony_ciDate: May, 2022 33762306a36Sopenharmony_ciKernelVersion: v6.0 33862306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 33962306a36Sopenharmony_ciDescription: 34062306a36Sopenharmony_ci (RO) The number of consecutive bytes of host physical address 34162306a36Sopenharmony_ci space this decoder claims at address N before the decode rotates 34262306a36Sopenharmony_ci to the next target in the interleave at address N + 34362306a36Sopenharmony_ci interleave_granularity (assuming N is aligned to 34462306a36Sopenharmony_ci interleave_granularity). 34562306a36Sopenharmony_ci 34662306a36Sopenharmony_ci 34762306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/decoderX.Y/create_{pmem,ram}_region 34862306a36Sopenharmony_ciDate: May, 2022, January, 2023 34962306a36Sopenharmony_ciKernelVersion: v6.0 (pmem), v6.3 (ram) 35062306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 35162306a36Sopenharmony_ciDescription: 35262306a36Sopenharmony_ci (RW) Write a string in the form 'regionZ' to start the process 35362306a36Sopenharmony_ci of defining a new persistent, or volatile memory region 35462306a36Sopenharmony_ci (interleave-set) within the decode range bounded by root decoder 35562306a36Sopenharmony_ci 'decoderX.Y'. The value written must match the current value 35662306a36Sopenharmony_ci returned from reading this attribute. An atomic compare exchange 35762306a36Sopenharmony_ci operation is done on write to assign the requested id to a 35862306a36Sopenharmony_ci region and allocate the region-id for the next creation attempt. 35962306a36Sopenharmony_ci EBUSY is returned if the region name written does not match the 36062306a36Sopenharmony_ci current cached value. 36162306a36Sopenharmony_ci 36262306a36Sopenharmony_ci 36362306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/decoderX.Y/delete_region 36462306a36Sopenharmony_ciDate: May, 2022 36562306a36Sopenharmony_ciKernelVersion: v6.0 36662306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 36762306a36Sopenharmony_ciDescription: 36862306a36Sopenharmony_ci (WO) Write a string in the form 'regionZ' to delete that region, 36962306a36Sopenharmony_ci provided it is currently idle / not bound to a driver. 37062306a36Sopenharmony_ci 37162306a36Sopenharmony_ci 37262306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/regionZ/uuid 37362306a36Sopenharmony_ciDate: May, 2022 37462306a36Sopenharmony_ciKernelVersion: v6.0 37562306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 37662306a36Sopenharmony_ciDescription: 37762306a36Sopenharmony_ci (RW) Write a unique identifier for the region. This field must 37862306a36Sopenharmony_ci be set for persistent regions and it must not conflict with the 37962306a36Sopenharmony_ci UUID of another region. For volatile ram regions this 38062306a36Sopenharmony_ci attribute is a read-only empty string. 38162306a36Sopenharmony_ci 38262306a36Sopenharmony_ci 38362306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/regionZ/interleave_granularity 38462306a36Sopenharmony_ciDate: May, 2022 38562306a36Sopenharmony_ciKernelVersion: v6.0 38662306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 38762306a36Sopenharmony_ciDescription: 38862306a36Sopenharmony_ci (RW) Set the number of consecutive bytes each device in the 38962306a36Sopenharmony_ci interleave set will claim. The possible interleave granularity 39062306a36Sopenharmony_ci values are determined by the CXL spec and the participating 39162306a36Sopenharmony_ci devices. 39262306a36Sopenharmony_ci 39362306a36Sopenharmony_ci 39462306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/regionZ/interleave_ways 39562306a36Sopenharmony_ciDate: May, 2022 39662306a36Sopenharmony_ciKernelVersion: v6.0 39762306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 39862306a36Sopenharmony_ciDescription: 39962306a36Sopenharmony_ci (RW) Configures the number of devices participating in the 40062306a36Sopenharmony_ci region is set by writing this value. Each device will provide 40162306a36Sopenharmony_ci 1/interleave_ways of storage for the region. 40262306a36Sopenharmony_ci 40362306a36Sopenharmony_ci 40462306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/regionZ/size 40562306a36Sopenharmony_ciDate: May, 2022 40662306a36Sopenharmony_ciKernelVersion: v6.0 40762306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 40862306a36Sopenharmony_ciDescription: 40962306a36Sopenharmony_ci (RW) System physical address space to be consumed by the region. 41062306a36Sopenharmony_ci When written trigger the driver to allocate space out of the 41162306a36Sopenharmony_ci parent root decoder's address space. When read the size of the 41262306a36Sopenharmony_ci address space is reported and should match the span of the 41362306a36Sopenharmony_ci region's resource attribute. Size shall be set after the 41462306a36Sopenharmony_ci interleave configuration parameters. Once set it cannot be 41562306a36Sopenharmony_ci changed, only freed by writing 0. The kernel makes no guarantees 41662306a36Sopenharmony_ci that data is maintained over an address space freeing event, and 41762306a36Sopenharmony_ci there is no guarantee that a free followed by an allocate 41862306a36Sopenharmony_ci results in the same address being allocated. 41962306a36Sopenharmony_ci 42062306a36Sopenharmony_ci 42162306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/regionZ/mode 42262306a36Sopenharmony_ciDate: January, 2023 42362306a36Sopenharmony_ciKernelVersion: v6.3 42462306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 42562306a36Sopenharmony_ciDescription: 42662306a36Sopenharmony_ci (RO) The mode of a region is established at region creation time 42762306a36Sopenharmony_ci and dictates the mode of the endpoint decoder that comprise the 42862306a36Sopenharmony_ci region. For more details on the possible modes see 42962306a36Sopenharmony_ci /sys/bus/cxl/devices/decoderX.Y/mode 43062306a36Sopenharmony_ci 43162306a36Sopenharmony_ci 43262306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/regionZ/resource 43362306a36Sopenharmony_ciDate: May, 2022 43462306a36Sopenharmony_ciKernelVersion: v6.0 43562306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 43662306a36Sopenharmony_ciDescription: 43762306a36Sopenharmony_ci (RO) A region is a contiguous partition of a CXL root decoder 43862306a36Sopenharmony_ci address space. Region capacity is allocated by writing to the 43962306a36Sopenharmony_ci size attribute, the resulting physical address space determined 44062306a36Sopenharmony_ci by the driver is reflected here. It is therefore not useful to 44162306a36Sopenharmony_ci read this before writing a value to the size attribute. 44262306a36Sopenharmony_ci 44362306a36Sopenharmony_ci 44462306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/regionZ/target[0..N] 44562306a36Sopenharmony_ciDate: May, 2022 44662306a36Sopenharmony_ciKernelVersion: v6.0 44762306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 44862306a36Sopenharmony_ciDescription: 44962306a36Sopenharmony_ci (RW) Write an endpoint decoder object name to 'targetX' where X 45062306a36Sopenharmony_ci is the intended position of the endpoint device in the region 45162306a36Sopenharmony_ci interleave and N is the 'interleave_ways' setting for the 45262306a36Sopenharmony_ci region. ENXIO is returned if the write results in an impossible 45362306a36Sopenharmony_ci to map decode scenario, like the endpoint is unreachable at that 45462306a36Sopenharmony_ci position relative to the root decoder interleave. EBUSY is 45562306a36Sopenharmony_ci returned if the position in the region is already occupied, or 45662306a36Sopenharmony_ci if the region is not in a state to accept interleave 45762306a36Sopenharmony_ci configuration changes. EINVAL is returned if the object name is 45862306a36Sopenharmony_ci not an endpoint decoder. Once all positions have been 45962306a36Sopenharmony_ci successfully written a final validation for decode conflicts is 46062306a36Sopenharmony_ci performed before activating the region. 46162306a36Sopenharmony_ci 46262306a36Sopenharmony_ci 46362306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/regionZ/commit 46462306a36Sopenharmony_ciDate: May, 2022 46562306a36Sopenharmony_ciKernelVersion: v6.0 46662306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 46762306a36Sopenharmony_ciDescription: 46862306a36Sopenharmony_ci (RW) Write a boolean 'true' string value to this attribute to 46962306a36Sopenharmony_ci trigger the region to transition from the software programmed 47062306a36Sopenharmony_ci state to the actively decoding in hardware state. The commit 47162306a36Sopenharmony_ci operation in addition to validating that the region is in proper 47262306a36Sopenharmony_ci configured state, validates that the decoders are being 47362306a36Sopenharmony_ci committed in spec mandated order (last committed decoder id + 47462306a36Sopenharmony_ci 1), and checks that the hardware accepts the commit request. 47562306a36Sopenharmony_ci Reading this value indicates whether the region is committed or 47662306a36Sopenharmony_ci not. 47762306a36Sopenharmony_ci 47862306a36Sopenharmony_ci 47962306a36Sopenharmony_ciWhat: /sys/bus/cxl/devices/memX/trigger_poison_list 48062306a36Sopenharmony_ciDate: April, 2023 48162306a36Sopenharmony_ciKernelVersion: v6.4 48262306a36Sopenharmony_ciContact: linux-cxl@vger.kernel.org 48362306a36Sopenharmony_ciDescription: 48462306a36Sopenharmony_ci (WO) When a boolean 'true' is written to this attribute the 48562306a36Sopenharmony_ci memdev driver retrieves the poison list from the device. The 48662306a36Sopenharmony_ci list consists of addresses that are poisoned, or would result 48762306a36Sopenharmony_ci in poison if accessed, and the source of the poison. This 48862306a36Sopenharmony_ci attribute is only visible for devices supporting the 48962306a36Sopenharmony_ci capability. The retrieved errors are logged as kernel 49062306a36Sopenharmony_ci events when cxl_poison event tracing is enabled. 491