Debian Codegraph @

Documentation/ABI/testing/sysfs-bus-cxl

raw
1 What: /sys/bus/cxl/flush
2 Date: January, 2022
3 KernelVersion: v5.18
4 Contact: [email protected]
5 Description:
6 (WO) If userspace manually unbinds a port the kernel schedules
7 all descendant memdevs for unbind. Writing '1' to this attribute
8 flushes that work.
9
10
11 What: /sys/bus/cxl/devices/memX/firmware_version
12 Date: December, 2020
13 KernelVersion: v5.12
14 Contact: [email protected]
15 Description:
16 (RO) "FW Revision" string as reported by the Identify
17 Memory Device Output Payload in the CXL-2.0
18 specification.
19
20
21 What: /sys/bus/cxl/devices/memX/payload_max
22 Date: December, 2020
23 KernelVersion: v5.12
24 Contact: [email protected]
25 Description:
26 (RO) Maximum size (in bytes) of the mailbox command payload
27 registers. Linux caps this at 1MB if the device reports a
28 larger size.
29
30
31 What: /sys/bus/cxl/devices/memX/label_storage_size
32 Date: May, 2021
33 KernelVersion: v5.13
34 Contact: [email protected]
35 Description:
36 (RO) Size (in bytes) of the Label Storage Area (LSA).
37
38
39 What: /sys/bus/cxl/devices/memX/ram/size
40 Date: December, 2020
41 KernelVersion: v5.12
42 Contact: [email protected]
43 Description:
44 (RO) "Volatile Only Capacity" as bytes. Represents the
45 identically named field in the Identify Memory Device Output
46 Payload in the CXL-2.0 specification.
47
48
49 What: /sys/bus/cxl/devices/memX/ram/qos_class
50 Date: May, 2023
51 KernelVersion: v6.8
52 Contact: [email protected]
53 Description:
54 (RO) For CXL host platforms that support "QoS Telemetry"
55 this attribute conveys a comma delimited list of platform
56 specific cookies that identifies a QoS performance class
57 for the volatile partition of the CXL mem device. These
58 class-ids can be compared against a similar "qos_class"
59 published for a root decoder. While it is not required
60 that the endpoints map their local memory-class to a
61 matching platform class, mismatches are not recommended
62 and there are platform specific performance related
63 side-effects that may result. First class-id is displayed.
64
65
66 What: /sys/bus/cxl/devices/memX/pmem/size
67 Date: December, 2020
68 KernelVersion: v5.12
69 Contact: [email protected]
70 Description:
71 (RO) "Persistent Only Capacity" as bytes. Represents the
72 identically named field in the Identify Memory Device Output
73 Payload in the CXL-2.0 specification.
74
75
76 What: /sys/bus/cxl/devices/memX/pmem/qos_class
77 Date: May, 2023
78 KernelVersion: v6.8
79 Contact: [email protected]
80 Description:
81 (RO) For CXL host platforms that support "QoS Telemetry"
82 this attribute conveys a comma delimited list of platform
83 specific cookies that identifies a QoS performance class
84 for the persistent partition of the CXL mem device. These
85 class-ids can be compared against a similar "qos_class"
86 published for a root decoder. While it is not required
87 that the endpoints map their local memory-class to a
88 matching platform class, mismatches are not recommended
89 and there are platform specific performance related
90 side-effects that may result. First class-id is displayed.
91
92
93 What: /sys/bus/cxl/devices/memX/serial
94 Date: January, 2022
95 KernelVersion: v5.18
96 Contact: [email protected]
97 Description:
98 (RO) 64-bit serial number per the PCIe Device Serial Number
99 capability. Mandatory for CXL devices, see CXL 2.0 8.1.12.2
100 Memory Device PCIe Capabilities and Extended Capabilities.
101
102
103 What: /sys/bus/cxl/devices/memX/numa_node
104 Date: January, 2022
105 KernelVersion: v5.18
106 Contact: [email protected]
107 Description:
108 (RO) If NUMA is enabled and the platform has affinitized the
109 host PCI device for this memory device, emit the CPU node
110 affinity for this device.
111
112
113 What: /sys/bus/cxl/devices/memX/security/state
114 Date: June, 2023
115 KernelVersion: v6.5
116 Contact: [email protected]
117 Description:
118 (RO) Reading this file will display the CXL security state for
119 that device. Such states can be: 'disabled', 'sanitize', when
120 a sanitization is currently underway; or those available only
121 for persistent memory: 'locked', 'unlocked' or 'frozen'. This
122 sysfs entry is select/poll capable from userspace to notify
123 upon completion of a sanitize operation.
124
125
126 What: /sys/bus/cxl/devices/memX/security/sanitize
127 Date: June, 2023
128 KernelVersion: v6.5
129 Contact: [email protected]
130 Description:
131 (WO) Write a boolean 'true' string value to this attribute to
132 sanitize the device to securely re-purpose or decommission it.
133 This is done by ensuring that all user data and meta-data,
134 whether it resides in persistent capacity, volatile capacity,
135 or the LSA, is made permanently unavailable by whatever means
136 is appropriate for the media type. This functionality requires
137 the device to be disabled, that is, not actively decoding any
138 HPA ranges. This permits avoiding explicit global CPU cache
139 management, relying instead for it to be done when a region
140 transitions between software programmed and hardware committed
141 states. If this file is not present, then there is no hardware
142 support for the operation.
143
144
145 What /sys/bus/cxl/devices/memX/security/erase
146 Date: June, 2023
147 KernelVersion: v6.5
148 Contact: [email protected]
149 Description:
150 (WO) Write a boolean 'true' string value to this attribute to
151 secure erase user data by changing the media encryption keys for
152 all user data areas of the device. This functionality requires
153 the device to be disabled, that is, not actively decoding any
154 HPA ranges. This permits avoiding explicit global CPU cache
155 management, relying instead for it to be done when a region
156 transitions between software programmed and hardware committed
157 states. If this file is not present, then there is no hardware
158 support for the operation.
159
160
161 What: /sys/bus/cxl/devices/memX/firmware/
162 Date: April, 2023
163 KernelVersion: v6.5
164 Contact: [email protected]
165 Description:
166 (RW) Firmware uploader mechanism. The different files under
167 this directory can be used to upload and activate new
168 firmware for CXL devices. The interfaces under this are
169 documented in sysfs-class-firmware.
170
171
172 What: /sys/bus/cxl/devices/*/devtype
173 Date: June, 2021
174 KernelVersion: v5.14
175 Contact: [email protected]
176 Description:
177 (RO) CXL device objects export the devtype attribute which
178 mirrors the same value communicated in the DEVTYPE environment
179 variable for uevents for devices on the "cxl" bus.
180
181
182 What: /sys/bus/cxl/devices/*/modalias
183 Date: December, 2021
184 KernelVersion: v5.18
185 Contact: [email protected]
186 Description:
187 (RO) CXL device objects export the modalias attribute which
188 mirrors the same value communicated in the MODALIAS environment
189 variable for uevents for devices on the "cxl" bus.
190
191
192 What: /sys/bus/cxl/devices/portX/uport
193 Date: June, 2021
194 KernelVersion: v5.14
195 Contact: [email protected]
196 Description:
197 (RO) CXL port objects are enumerated from either a platform
198 firmware device (ACPI0017 and ACPI0016) or PCIe switch upstream
199 port with CXL component registers. The 'uport' symlink connects
200 the CXL portX object to the device that published the CXL port
201 capability.
202
203
204 What: /sys/bus/cxl/devices/{port,endpoint}X/parent_dport
205 Date: January, 2023
206 KernelVersion: v6.3
207 Contact: [email protected]
208 Description:
209 (RO) CXL port objects are instantiated for each upstream port in
210 a CXL/PCIe switch, and for each endpoint to map the
211 corresponding memory device into the CXL port hierarchy. When a
212 descendant CXL port (switch or endpoint) is enumerated it is
213 useful to know which 'dport' object in the parent CXL port
214 routes to this descendant. The 'parent_dport' symlink points to
215 the device representing the downstream port of a CXL switch that
216 routes to {port,endpoint}X.
217
218
219 What: /sys/bus/cxl/devices/portX/dportY
220 Date: June, 2021
221 KernelVersion: v5.14
222 Contact: [email protected]
223 Description:
224 (RO) CXL port objects are enumerated from either a platform
225 firmware device (ACPI0017 and ACPI0016) or PCIe switch upstream
226 port with CXL component registers. The 'dportY' symlink
227 identifies one or more downstream ports that the upstream port
228 may target in its decode of CXL memory resources. The 'Y'
229 integer reflects the hardware port unique-id used in the
230 hardware decoder target list.
231
232
233 What: /sys/bus/cxl/devices/portX/decoders_committed
234 Date: October, 2023
235 KernelVersion: v6.7
236 Contact: [email protected]
237 Description:
238 (RO) A memory device is considered active when any of its
239 decoders are in the "committed" state (See CXL 3.0 8.2.4.19.7
240 CXL HDM Decoder n Control Register). Hotplug and destructive
241 operations like "sanitize" are blocked while device is actively
242 decoding a Host Physical Address range. Note that this number
243 may be elevated without any regionX objects active or even
244 enumerated, as this may be due to decoders established by
245 platform firmware or a previous kernel (kexec).
246
247
248 What: /sys/bus/cxl/devices/decoderX.Y
249 Date: June, 2021
250 KernelVersion: v5.14
251 Contact: [email protected]
252 Description:
253 (RO) CXL decoder objects are enumerated from either a platform
254 firmware description, or a CXL HDM decoder register set in a
255 PCIe device (see CXL 2.0 section 8.2.5.12 CXL HDM Decoder
256 Capability Structure). The 'X' in decoderX.Y represents the
257 cxl_port container of this decoder, and 'Y' represents the
258 instance id of a given decoder resource.
259
260
261 What: /sys/bus/cxl/devices/decoderX.Y/{start,size}
262 Date: June, 2021
263 KernelVersion: v5.14
264 Contact: [email protected]
265 Description:
266 (RO) The 'start' and 'size' attributes together convey the
267 physical address base and number of bytes mapped in the
268 decoder's decode window. For decoders of devtype
269 "cxl_decoder_root" the address range is fixed. For decoders of
270 devtype "cxl_decoder_switch" the address is bounded by the
271 decode range of the cxl_port ancestor of the decoder's cxl_port,
272 and dynamically updates based on the active memory regions in
273 that address space.
274
275
276 What: /sys/bus/cxl/devices/decoderX.Y/locked
277 Date: June, 2021
278 KernelVersion: v5.14
279 Contact: [email protected]
280 Description:
281 (RO) CXL HDM decoders have the capability to lock the
282 configuration until the next device reset. For decoders of
283 devtype "cxl_decoder_root" there is no standard facility to
284 unlock them. For decoders of devtype "cxl_decoder_switch" a
285 secondary bus reset, of the PCIe bridge that provides the bus
286 for this decoders uport, unlocks / resets the decoder.
287
288
289 What: /sys/bus/cxl/devices/decoderX.Y/target_list
290 Date: June, 2021
291 KernelVersion: v5.14
292 Contact: [email protected]
293 Description:
294 (RO) Display a comma separated list of the current decoder
295 target configuration. The list is ordered by the current
296 configured interleave order of the decoder's dport instances.
297 Each entry in the list is a dport id.
298
299
300 What: /sys/bus/cxl/devices/decoderX.Y/cap_{pmem,ram,type2,type3}
301 Date: June, 2021
302 KernelVersion: v5.14
303 Contact: [email protected]
304 Description:
305 (RO) When a CXL decoder is of devtype "cxl_decoder_root", it
306 represents a fixed memory window identified by platform
307 firmware. A fixed window may only support a subset of memory
308 types. The 'cap_*' attributes indicate whether persistent
309 memory, volatile memory, accelerator memory, and / or expander
310 memory may be mapped behind this decoder's memory window.
311
312
313 What: /sys/bus/cxl/devices/decoderX.Y/target_type
314 Date: June, 2021
315 KernelVersion: v5.14
316 Contact: [email protected]
317 Description:
318 (RO) When a CXL decoder is of devtype "cxl_decoder_switch", it
319 can optionally decode either accelerator memory (type-2) or
320 expander memory (type-3). The 'target_type' attribute indicates
321 the current setting which may dynamically change based on what
322 memory regions are activated in this decode hierarchy.
323
324
325 What: /sys/bus/cxl/devices/endpointX/CDAT
326 Date: July, 2022
327 KernelVersion: v6.0
328 Contact: [email protected]
329 Description:
330 (RO) If this sysfs entry is not present no DOE mailbox was
331 found to support CDAT data. If it is present and the length of
332 the data is 0 reading the CDAT data failed. Otherwise the CDAT
333 data is reported.
334
335
336 What: /sys/bus/cxl/devices/decoderX.Y/mode
337 Date: May, 2022
338 KernelVersion: v6.0
339 Contact: [email protected]
340 Description:
341 (RW) When a CXL decoder is of devtype "cxl_decoder_endpoint" it
342 translates from a host physical address range, to a device
343 local address range. Device-local address ranges are further
344 split into a 'ram' (volatile memory) range and 'pmem'
345 (persistent memory) range. The 'mode' attribute emits one of
346 'ram', 'pmem', or 'none'. The 'none' indicates the decoder is
347 not actively decoding, or no DPA allocation policy has been
348 set.
349
350 'mode' can be written, when the decoder is in the 'disabled'
351 state, with either 'ram' or 'pmem' to set the boundaries for the
352 next allocation.
353
354
355 What: /sys/bus/cxl/devices/decoderX.Y/dpa_resource
356 Date: May, 2022
357 KernelVersion: v6.0
358 Contact: [email protected]
359 Description:
360 (RO) When a CXL decoder is of devtype "cxl_decoder_endpoint",
361 and its 'dpa_size' attribute is non-zero, this attribute
362 indicates the device physical address (DPA) base address of the
363 allocation.
364
365
366 What: /sys/bus/cxl/devices/decoderX.Y/dpa_size
367 Date: May, 2022
368 KernelVersion: v6.0
369 Contact: [email protected]
370 Description:
371 (RW) When a CXL decoder is of devtype "cxl_decoder_endpoint" it
372 translates from a host physical address range, to a device local
373 address range. The range, base address plus length in bytes, of
374 DPA allocated to this decoder is conveyed in these 2 attributes.
375 Allocations can be mutated as long as the decoder is in the
376 disabled state. A write to 'dpa_size' releases the previous DPA
377 allocation and then attempts to allocate from the free capacity
378 in the device partition referred to by 'decoderX.Y/mode'.
379 Allocate and free requests can only be performed on the highest
380 instance number disabled decoder with non-zero size. I.e.
381 allocations are enforced to occur in increasing 'decoderX.Y/id'
382 order and frees are enforced to occur in decreasing
383 'decoderX.Y/id' order.
384
385
386 What: /sys/bus/cxl/devices/decoderX.Y/interleave_ways
387 Date: May, 2022
388 KernelVersion: v6.0
389 Contact: [email protected]
390 Description:
391 (RO) The number of targets across which this decoder's host
392 physical address (HPA) memory range is interleaved. The device
393 maps every Nth block of HPA (of size ==
394 'interleave_granularity') to consecutive DPA addresses. The
395 decoder's position in the interleave is determined by the
396 device's (endpoint or switch) switch ancestry. For root
397 decoders their interleave is specified by platform firmware and
398 they only specify a downstream target order for host bridges.
399
400
401 What: /sys/bus/cxl/devices/decoderX.Y/interleave_granularity
402 Date: May, 2022
403 KernelVersion: v6.0
404 Contact: [email protected]
405 Description:
406 (RO) The number of consecutive bytes of host physical address
407 space this decoder claims at address N before the decode rotates
408 to the next target in the interleave at address N +
409 interleave_granularity (assuming N is aligned to
410 interleave_granularity).
411
412
413 What: /sys/bus/cxl/devices/decoderX.Y/create_{pmem,ram}_region
414 Date: May, 2022, January, 2023
415 KernelVersion: v6.0 (pmem), v6.3 (ram)
416 Contact: [email protected]
417 Description:
418 (RW) Write a string in the form 'regionZ' to start the process
419 of defining a new persistent, or volatile memory region
420 (interleave-set) within the decode range bounded by root decoder
421 'decoderX.Y'. The value written must match the current value
422 returned from reading this attribute. An atomic compare exchange
423 operation is done on write to assign the requested id to a
424 region and allocate the region-id for the next creation attempt.
425 EBUSY is returned if the region name written does not match the
426 current cached value.
427
428
429 What: /sys/bus/cxl/devices/decoderX.Y/delete_region
430 Date: May, 2022
431 KernelVersion: v6.0
432 Contact: [email protected]
433 Description:
434 (WO) Write a string in the form 'regionZ' to delete that region,
435 provided it is currently idle / not bound to a driver.
436
437
438 What: /sys/bus/cxl/devices/decoderX.Y/qos_class
439 Date: May, 2023
440 KernelVersion: v6.5
441 Contact: [email protected]
442 Description:
443 (RO) For CXL host platforms that support "QoS Telemetry" this
444 root-decoder-only attribute conveys a platform specific cookie
445 that identifies a QoS performance class for the CXL Window.
446 This class-id can be compared against a similar "qos_class"
447 published for each memory-type that an endpoint supports. While
448 it is not required that endpoints map their local memory-class
449 to a matching platform class, mismatches are not recommended and
450 there are platform specific side-effects that may result.
451
452
453 What: /sys/bus/cxl/devices/regionZ/uuid
454 Date: May, 2022
455 KernelVersion: v6.0
456 Contact: [email protected]
457 Description:
458 (RW) Write a unique identifier for the region. This field must
459 be set for persistent regions and it must not conflict with the
460 UUID of another region. For volatile ram regions this
461 attribute is a read-only empty string.
462
463
464 What: /sys/bus/cxl/devices/regionZ/interleave_granularity
465 Date: May, 2022
466 KernelVersion: v6.0
467 Contact: [email protected]
468 Description:
469 (RW) Set the number of consecutive bytes each device in the
470 interleave set will claim. The possible interleave granularity
471 values are determined by the CXL spec and the participating
472 devices.
473
474
475 What: /sys/bus/cxl/devices/regionZ/interleave_ways
476 Date: May, 2022
477 KernelVersion: v6.0
478 Contact: [email protected]
479 Description:
480 (RW) Configures the number of devices participating in the
481 region is set by writing this value. Each device will provide
482 1/interleave_ways of storage for the region.
483
484
485 What: /sys/bus/cxl/devices/regionZ/size
486 Date: May, 2022
487 KernelVersion: v6.0
488 Contact: [email protected]
489 Description:
490 (RW) System physical address space to be consumed by the region.
491 When written trigger the driver to allocate space out of the
492 parent root decoder's address space. When read the size of the
493 address space is reported and should match the span of the
494 region's resource attribute. Size shall be set after the
495 interleave configuration parameters. Once set it cannot be
496 changed, only freed by writing 0. The kernel makes no guarantees
497 that data is maintained over an address space freeing event, and
498 there is no guarantee that a free followed by an allocate
499 results in the same address being allocated. If extended linear
500 cache is present, the size indicates extended linear cache size
501 plus the CXL region size.
502
503 What: /sys/bus/cxl/devices/regionZ/extended_linear_cache_size
504 Date: October, 2025
505 KernelVersion: v6.19
506 Contact: [email protected]
507 Description:
508 (RO) The size of extended linear cache, if there is an extended
509 linear cache. Otherwise the attribute will not be visible.
510
511 What: /sys/bus/cxl/devices/regionZ/mode
512 Date: January, 2023
513 KernelVersion: v6.3
514 Contact: [email protected]
515 Description:
516 (RO) The mode of a region is established at region creation time
517 and dictates the mode of the endpoint decoder that comprise the
518 region. For more details on the possible modes see
519 /sys/bus/cxl/devices/decoderX.Y/mode
520
521
522 What: /sys/bus/cxl/devices/regionZ/resource
523 Date: May, 2022
524 KernelVersion: v6.0
525 Contact: [email protected]
526 Description:
527 (RO) A region is a contiguous partition of a CXL root decoder
528 address space. Region capacity is allocated by writing to the
529 size attribute, the resulting physical address space determined
530 by the driver is reflected here. It is therefore not useful to
531 read this before writing a value to the size attribute.
532
533
534 What: /sys/bus/cxl/devices/regionZ/target[0..N]
535 Date: May, 2022
536 KernelVersion: v6.0
537 Contact: [email protected]
538 Description:
539 (RW) Write an endpoint decoder object name to 'targetX' where X
540 is the intended position of the endpoint device in the region
541 interleave and N is the 'interleave_ways' setting for the
542 region. ENXIO is returned if the write results in an impossible
543 to map decode scenario, like the endpoint is unreachable at that
544 position relative to the root decoder interleave. EBUSY is
545 returned if the position in the region is already occupied, or
546 if the region is not in a state to accept interleave
547 configuration changes. EINVAL is returned if the object name is
548 not an endpoint decoder. Once all positions have been
549 successfully written a final validation for decode conflicts is
550 performed before activating the region.
551
552
553 What: /sys/bus/cxl/devices/regionZ/commit
554 Date: May, 2022
555 KernelVersion: v6.0
556 Contact: [email protected]
557 Description:
558 (RW) Write a boolean 'true' string value to this attribute to
559 trigger the region to transition from the software programmed
560 state to the actively decoding in hardware state. The commit
561 operation in addition to validating that the region is in proper
562 configured state, validates that the decoders are being
563 committed in spec mandated order (last committed decoder id +
564 1), and checks that the hardware accepts the commit request.
565 Reading this value indicates whether the region is committed or
566 not.
567
568
569 What: /sys/bus/cxl/devices/memX/trigger_poison_list
570 Date: April, 2023
571 KernelVersion: v6.4
572 Contact: [email protected]
573 Description:
574 (WO) When a boolean 'true' is written to this attribute the
575 memdev driver retrieves the poison list from the device. The
576 list consists of addresses that are poisoned, or would result
577 in poison if accessed, and the source of the poison. This
578 attribute is only visible for devices supporting the
579 capability. The retrieved errors are logged as kernel
580 events when cxl_poison event tracing is enabled.
581
582
583 What: /sys/bus/cxl/devices/regionZ/accessY/read_bandwidth
584 /sys/bus/cxl/devices/regionZ/accessY/write_bandwidth
585 Date: Jan, 2024
586 KernelVersion: v6.9
587 Contact: [email protected]
588 Description:
589 (RO) The aggregated read or write bandwidth of the region. The
590 number is the accumulated read or write bandwidth of all CXL memory
591 devices that contributes to the region in MB/s. It is
592 identical data that should appear in
593 /sys/devices/system/node/nodeX/accessY/initiators/read_bandwidth or
594 /sys/devices/system/node/nodeX/accessY/initiators/write_bandwidth.
595 See Documentation/ABI/stable/sysfs-devices-node. access0 provides
596 the number to the closest initiator and access1 provides the
597 number to the closest CPU.
598
599
600 What: /sys/bus/cxl/devices/regionZ/accessY/read_latency
601 /sys/bus/cxl/devices/regionZ/accessY/write_latency
602 Date: Jan, 2024
603 KernelVersion: v6.9
604 Contact: [email protected]
605 Description:
606 (RO) The read or write latency of the region. The number is
607 the worst read or write latency of all CXL memory devices that
608 contributes to the region in nanoseconds. It is identical data
609 that should appear in
610 /sys/devices/system/node/nodeX/accessY/initiators/read_latency or
611 /sys/devices/system/node/nodeX/accessY/initiators/write_latency.
612 See Documentation/ABI/stable/sysfs-devices-node. access0 provides
613 the number to the closest initiator and access1 provides the
614 number to the closest CPU.
615
616
617 What: /sys/bus/cxl/devices/nvdimm-bridge0/ndbusX/nmemY/cxl/dirty_shutdown
618 Date: Feb, 2025
619 KernelVersion: v6.15
620 Contact: [email protected]
621 Description:
622 (RO) The device dirty shutdown count value, which is the number
623 of times the device could have incurred in potential data loss.
624 The count is persistent across power loss and wraps back to 0
625 upon overflow. If this file is not present, the device does not
626 have the necessary support for dirty tracking.