1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
|
# -*- Mode: Python -*-
# vim: filetype=python
##
# = CXL devices
##
##
# @CxlEventLog:
#
# CXL has a number of separate event logs for different types of
# events. Each such event log is handled and signaled independently.
#
# @informational: Information Event Log
#
# @warning: Warning Event Log
#
# @failure: Failure Event Log
#
# @fatal: Fatal Event Log
#
# Since: 8.1
##
{ 'enum': 'CxlEventLog',
'data': ['informational',
'warning',
'failure',
'fatal']
}
##
# @cxl-inject-general-media-event:
#
# Inject an event record for a General Media Event (CXL r3.0
# 8.2.9.2.1.1). This event type is reported via one of the event logs
# specified via the log parameter.
#
# @path: CXL type 3 device canonical QOM path
#
# @log: event log to add the event to
#
# @flags: Event Record Flags. See CXL r3.0 Table 8-42 Common Event
# Record Format, Event Record Flags for subfield definitions.
#
# @dpa: Device Physical Address (relative to @path device). Note
# lower bits include some flags. See CXL r3.0 Table 8-43 General
# Media Event Record, Physical Address.
#
# @descriptor: Memory Event Descriptor with additional memory event
# information. See CXL r3.0 Table 8-43 General Media Event
# Record, Memory Event Descriptor for bit definitions.
#
# @type: Type of memory event that occurred. See CXL r3.0 Table 8-43
# General Media Event Record, Memory Event Type for possible
# values.
#
# @transaction-type: Type of first transaction that caused the event
# to occur. See CXL r3.0 Table 8-43 General Media Event Record,
# Transaction Type for possible values.
#
# @channel: The channel of the memory event location. A channel is an
# interface that can be independently accessed for a transaction.
#
# @rank: The rank of the memory event location. A rank is a set of
# memory devices on a channel that together execute a transaction.
#
# @device: Bitmask that represents all devices in the rank associated
# with the memory event location.
#
# @component-id: Device specific component identifier for the event.
# May describe a field replaceable sub-component of the device.
#
# Since: 8.1
##
{ 'command': 'cxl-inject-general-media-event',
'data': { 'path': 'str', 'log': 'CxlEventLog', 'flags': 'uint8',
'dpa': 'uint64', 'descriptor': 'uint8',
'type': 'uint8', 'transaction-type': 'uint8',
'*channel': 'uint8', '*rank': 'uint8',
'*device': 'uint32', '*component-id': 'str' } }
##
# @cxl-inject-dram-event:
#
# Inject an event record for a DRAM Event (CXL r3.0 8.2.9.2.1.2).
# This event type is reported via one of the event logs specified via
# the log parameter.
#
# @path: CXL type 3 device canonical QOM path
#
# @log: Event log to add the event to
#
# @flags: Event Record Flags. See CXL r3.0 Table 8-42 Common Event
# Record Format, Event Record Flags for subfield definitions.
#
# @dpa: Device Physical Address (relative to @path device). Note
# lower bits include some flags. See CXL r3.0 Table 8-44 DRAM
# Event Record, Physical Address.
#
# @descriptor: Memory Event Descriptor with additional memory event
# information. See CXL r3.0 Table 8-44 DRAM Event Record, Memory
# Event Descriptor for bit definitions.
#
# @type: Type of memory event that occurred. See CXL r3.0 Table 8-44
# DRAM Event Record, Memory Event Type for possible values.
#
# @transaction-type: Type of first transaction that caused the event
# to occur. See CXL r3.0 Table 8-44 DRAM Event Record,
# Transaction Type for possible values.
#
# @channel: The channel of the memory event location. A channel is an
# interface that can be independently accessed for a transaction.
#
# @rank: The rank of the memory event location. A rank is a set of
# memory devices on a channel that together execute a transaction.
#
# @nibble-mask: Identifies one or more nibbles that the error affects
#
# @bank-group: Bank group of the memory event location, incorporating
# a number of Banks.
#
# @bank: Bank of the memory event location. A single bank is accessed
# per read or write of the memory.
#
# @row: Row address within the DRAM.
#
# @column: Column address within the DRAM.
#
# @correction-mask: Bits within each nibble. Used in order of bits
# set in the nibble-mask. Up to 4 nibbles may be covered.
#
# Since: 8.1
##
{ 'command': 'cxl-inject-dram-event',
'data': { 'path': 'str', 'log': 'CxlEventLog', 'flags': 'uint8',
'dpa': 'uint64', 'descriptor': 'uint8',
'type': 'uint8', 'transaction-type': 'uint8',
'*channel': 'uint8', '*rank': 'uint8', '*nibble-mask': 'uint32',
'*bank-group': 'uint8', '*bank': 'uint8', '*row': 'uint32',
'*column': 'uint16', '*correction-mask': [ 'uint64' ]
}}
##
# @cxl-inject-memory-module-event:
#
# Inject an event record for a Memory Module Event (CXL r3.0
# 8.2.9.2.1.3). This event includes a copy of the Device Health info
# at the time of the event.
#
# @path: CXL type 3 device canonical QOM path
#
# @log: Event Log to add the event to
#
# @flags: Event Record Flags. See CXL r3.0 Table 8-42 Common Event
# Record Format, Event Record Flags for subfield definitions.
#
# @type: Device Event Type. See CXL r3.0 Table 8-45 Memory Module
# Event Record for bit definitions for bit definiions.
#
# @health-status: Overall health summary bitmap. See CXL r3.0 Table
# 8-100 Get Health Info Output Payload, Health Status for bit
# definitions.
#
# @media-status: Overall media health summary. See CXL r3.0 Table
# 8-100 Get Health Info Output Payload, Media Status for bit
# definitions.
#
# @additional-status: See CXL r3.0 Table 8-100 Get Health Info Output
# Payload, Additional Status for subfield definitions.
#
# @life-used: Percentage (0-100) of factory expected life span.
#
# @temperature: Device temperature in degrees Celsius.
#
# @dirty-shutdown-count: Number of times the device has been unable to
# determine whether data loss may have occurred.
#
# @corrected-volatile-error-count: Total number of correctable errors
# in volatile memory.
#
# @corrected-persistent-error-count: Total number of correctable
# errors in persistent memory
#
# Since: 8.1
##
{ 'command': 'cxl-inject-memory-module-event',
'data': { 'path': 'str', 'log': 'CxlEventLog', 'flags' : 'uint8',
'type': 'uint8', 'health-status': 'uint8',
'media-status': 'uint8', 'additional-status': 'uint8',
'life-used': 'uint8', 'temperature' : 'int16',
'dirty-shutdown-count': 'uint32',
'corrected-volatile-error-count': 'uint32',
'corrected-persistent-error-count': 'uint32'
}}
##
# @cxl-inject-poison:
#
# Poison records indicate that a CXL memory device knows that a
# particular memory region may be corrupted. This may be because of
# locally detected errors (e.g. ECC failure) or poisoned writes
# received from other components in the system. This injection
# mechanism enables testing of the OS handling of poison records which
# may be queried via the CXL mailbox.
#
# @path: CXL type 3 device canonical QOM path
#
# @start: Start address; must be 64 byte aligned.
#
# @length: Length of poison to inject; must be a multiple of 64 bytes.
#
# Since: 8.1
##
{ 'command': 'cxl-inject-poison',
'data': { 'path': 'str', 'start': 'uint64', 'length': 'size' }}
##
# @CxlUncorErrorType:
#
# Type of uncorrectable CXL error to inject. These errors are
# reported via an AER uncorrectable internal error with additional
# information logged at the CXL device.
#
# @cache-data-parity: Data error such as data parity or data ECC error
# CXL.cache
#
# @cache-address-parity: Address parity or other errors associated
# with the address field on CXL.cache
#
# @cache-be-parity: Byte enable parity or other byte enable errors on
# CXL.cache
#
# @cache-data-ecc: ECC error on CXL.cache
#
# @mem-data-parity: Data error such as data parity or data ECC error
# on CXL.mem
#
# @mem-address-parity: Address parity or other errors associated with
# the address field on CXL.mem
#
# @mem-be-parity: Byte enable parity or other byte enable errors on
# CXL.mem.
#
# @mem-data-ecc: Data ECC error on CXL.mem.
#
# @reinit-threshold: REINIT threshold hit.
#
# @rsvd-encoding: Received unrecognized encoding.
#
# @poison-received: Received poison from the peer.
#
# @receiver-overflow: Buffer overflows (first 3 bits of header log
# indicate which)
#
# @internal: Component specific error
#
# @cxl-ide-tx: Integrity and data encryption tx error.
#
# @cxl-ide-rx: Integrity and data encryption rx error.
#
# Since: 8.0
##
{ 'enum': 'CxlUncorErrorType',
'data': ['cache-data-parity',
'cache-address-parity',
'cache-be-parity',
'cache-data-ecc',
'mem-data-parity',
'mem-address-parity',
'mem-be-parity',
'mem-data-ecc',
'reinit-threshold',
'rsvd-encoding',
'poison-received',
'receiver-overflow',
'internal',
'cxl-ide-tx',
'cxl-ide-rx'
]
}
##
# @CXLUncorErrorRecord:
#
# Record of a single error including header log.
#
# @type: Type of error
#
# @header: 16 DWORD of header.
#
# Since: 8.0
##
{ 'struct': 'CXLUncorErrorRecord',
'data': {
'type': 'CxlUncorErrorType',
'header': [ 'uint32' ]
}
}
##
# @cxl-inject-uncorrectable-errors:
#
# Command to allow injection of multiple errors in one go. This
# allows testing of multiple header log handling in the OS.
#
# @path: CXL Type 3 device canonical QOM path
#
# @errors: Errors to inject
#
# Since: 8.0
##
{ 'command': 'cxl-inject-uncorrectable-errors',
'data': { 'path': 'str',
'errors': [ 'CXLUncorErrorRecord' ] }}
##
# @CxlCorErrorType:
#
# Type of CXL correctable error to inject
#
# @cache-data-ecc: Data ECC error on CXL.cache
#
# @mem-data-ecc: Data ECC error on CXL.mem
#
# @crc-threshold: Component specific and applicable to 68 byte Flit
# mode only.
#
# @retry-threshold: Retry threshold hit in the Local Retry State
# Machine, 68B Flits only.
#
# @cache-poison-received: Received poison from a peer on CXL.cache.
#
# @mem-poison-received: Received poison from a peer on CXL.mem
#
# @physical: Received error indication from the physical layer.
#
# Since: 8.0
##
{ 'enum': 'CxlCorErrorType',
'data': ['cache-data-ecc',
'mem-data-ecc',
'crc-threshold',
'retry-threshold',
'cache-poison-received',
'mem-poison-received',
'physical']
}
##
# @cxl-inject-correctable-error:
#
# Command to inject a single correctable error. Multiple error
# injection of this error type is not interesting as there is no
# associated header log. These errors are reported via AER as a
# correctable internal error, with additional detail available from
# the CXL device.
#
# @path: CXL Type 3 device canonical QOM path
#
# @type: Type of error.
#
# Since: 8.0
##
{'command': 'cxl-inject-correctable-error',
'data': {'path': 'str', 'type': 'CxlCorErrorType'}}
##
# @CxlDynamicCapacityExtent:
#
# A single dynamic capacity extent. This is a contiguous allocation
# of memory by Device Physical Address within a single Dynamic
# Capacity Region on a CXL Type 3 Device.
#
# @offset: The offset (in bytes) to the start of the region where the
# extent belongs to.
#
# @len: The length of the extent in bytes.
#
# Since: 9.1
##
{ 'struct': 'CxlDynamicCapacityExtent',
'data': {
'offset':'uint64',
'len': 'uint64'
}
}
##
# @CxlExtentSelectionPolicy:
#
# The policy to use for selecting which extents comprise the added
# capacity, as defined in Compute Express Link (CXL) Specification,
# Revision 3.1, Table 7-70.
#
# @free: Device is responsible for allocating the requested memory
# capacity and is free to do this using any combination of
# supported extents.
#
# @contiguous: Device is responsible for allocating the requested
# memory capacity but must do so as a single contiguous
# extent.
#
# @prescriptive: The precise set of extents to be allocated is
# specified by the command. Thus allocation is being managed
# by the issuer of the allocation command, not the device.
#
# @enable-shared-access: Capacity has already been allocated to a
# different host using free, contiguous or prescriptive policy
# with a known tag. This policy then instructs the device to make
# the capacity with the specified tag available to an additional
# host. Capacity is implicit as it matches that already
# associated with the tag. Note that the extent list (and hence
# Device Physical Addresses) used are per host, so a device may
# use different representations on each host. The ordering of the
# extents provided to each host is indicated to the host using per
# extent sequence numbers generated by the device. Has a similar
# meaning for temporal sharing, but in that case there may be only
# one host involved.
#
# Since: 9.1
##
{ 'enum': 'CxlExtentSelectionPolicy',
'data': ['free',
'contiguous',
'prescriptive',
'enable-shared-access']
}
##
# @cxl-add-dynamic-capacity:
#
# Initiate adding dynamic capacity extents to a host. This simulates
# operations defined in Compute Express Link (CXL) Specification,
# Revision 3.1, Section 7.6.7.6.5. Note that, currently, establishing
# success or failure of the full Add Dynamic Capacity flow requires
# out of band communication with the OS of the CXL host.
#
# @path: path to the CXL Dynamic Capacity Device in the QOM tree.
#
# @host-id: The "Host ID" field as defined in Compute Express Link
# (CXL) Specification, Revision 3.1, Table 7-70.
#
# @selection-policy: The "Selection Policy" bits as defined in
# Compute Express Link (CXL) Specification, Revision 3.1,
# Table 7-70. It specifies the policy to use for selecting
# which extents comprise the added capacity.
#
# @region: The "Region Number" field as defined in Compute Express
# Link (CXL) Specification, Revision 3.1, Table 7-70. Valid
# range is from 0-7.
#
# @tag: The "Tag" field as defined in Compute Express Link (CXL)
# Specification, Revision 3.1, Table 7-70.
#
# @extents: The "Extent List" field as defined in Compute Express Link
# (CXL) Specification, Revision 3.1, Table 7-70.
#
# Features:
#
# @unstable: For now this command is subject to change.
#
# Since : 9.1
##
{ 'command': 'cxl-add-dynamic-capacity',
'data': { 'path': 'str',
'host-id': 'uint16',
'selection-policy': 'CxlExtentSelectionPolicy',
'region': 'uint8',
'*tag': 'str',
'extents': [ 'CxlDynamicCapacityExtent' ]
},
'features': [ 'unstable' ]
}
##
# @CxlExtentRemovalPolicy:
#
# The policy to use for selecting which extents comprise the released
# capacity, defined in the "Flags" field in Compute Express Link (CXL)
# Specification, Revision 3.1, Table 7-71.
#
# @tag-based: Extents are selected by the device based on tag, with
# no requirement for contiguous extents.
#
# @prescriptive: Extent list of capacity to release is included in
# the request payload.
#
# Since: 9.1
##
{ 'enum': 'CxlExtentRemovalPolicy',
'data': ['tag-based',
'prescriptive']
}
##
# @cxl-release-dynamic-capacity:
#
# Initiate release of dynamic capacity extents from a host. This
# simulates operations defined in Compute Express Link (CXL)
# Specification, Revision 3.1, Section 7.6.7.6.6. Note that,
# currently, success or failure of the full Release Dynamic Capacity
# flow requires out of band communication with the OS of the CXL host.
#
# @path: path to the CXL Dynamic Capacity Device in the QOM tree.
#
# @host-id: The "Host ID" field as defined in Compute Express Link
# (CXL) Specification, Revision 3.1, Table 7-71.
#
# @removal-policy: Bit[3:0] of the "Flags" field as defined in
# Compute Express Link (CXL) Specification, Revision 3.1,
# Table 7-71.
#
# @forced-removal: Bit[4] of the "Flags" field in Compute Express
# Link (CXL) Specification, Revision 3.1, Table 7-71. When set,
# the device does not wait for a Release Dynamic Capacity command
# from the host. Instead, the host immediately looses access to
# the released capacity.
#
# @sanitize-on-release: Bit[5] of the "Flags" field in Compute Express
# Link (CXL) Specification, Revision 3.1, Table 7-71. When set,
# the device should sanitize all released capacity as a result of
# this request. This ensures that all user data and metadata is
# made permanently unavailable by whatever means is appropriate
# for the media type. Note that changing encryption keys is not
# sufficient.
#
# @region: The "Region Number" field as defined in Compute Express
# Link Specification, Revision 3.1, Table 7-71. Valid range
# is from 0-7.
#
# @tag: The "Tag" field as defined in Compute Express Link (CXL)
# Specification, Revision 3.1, Table 7-71.
#
# @extents: The "Extent List" field as defined in Compute Express
# Link (CXL) Specification, Revision 3.1, Table 7-71.
#
# Features:
#
# @unstable: For now this command is subject to change.
#
# Since : 9.1
##
{ 'command': 'cxl-release-dynamic-capacity',
'data': { 'path': 'str',
'host-id': 'uint16',
'removal-policy': 'CxlExtentRemovalPolicy',
'*forced-removal': 'bool',
'*sanitize-on-release': 'bool',
'region': 'uint8',
'*tag': 'str',
'extents': [ 'CxlDynamicCapacityExtent' ]
},
'features': [ 'unstable' ]
}
|