xref: /openbmc/qemu/qapi/cxl.json (revision 9547754f)
1# -*- Mode: Python -*-
2# vim: filetype=python
3
4##
5# = CXL devices
6##
7
8##
9# @cxl-inject-poison:
10#
11# Poison records indicate that a CXL memory device knows that a
12# particular memory region may be corrupted.  This may be because of
13# locally detected errors (e.g. ECC failure) or poisoned writes
14# received from other components in the system.  This injection
15# mechanism enables testing of the OS handling of poison records which
16# may be queried via the CXL mailbox.
17#
18# @path: CXL type 3 device canonical QOM path
19#
20# @start: Start address; must be 64 byte aligned.
21#
22# @length: Length of poison to inject; must be a multiple of 64 bytes.
23#
24# Since: 8.1
25##
26{ 'command': 'cxl-inject-poison',
27  'data': { 'path': 'str', 'start': 'uint64', 'length': 'size' }}
28
29##
30# @CxlUncorErrorType:
31#
32# Type of uncorrectable CXL error to inject.  These errors are
33# reported via an AER uncorrectable internal error with additional
34# information logged at the CXL device.
35#
36# @cache-data-parity: Data error such as data parity or data ECC error
37#     CXL.cache
38#
39# @cache-address-parity: Address parity or other errors associated
40#     with the address field on CXL.cache
41#
42# @cache-be-parity: Byte enable parity or other byte enable errors on
43#     CXL.cache
44#
45# @cache-data-ecc: ECC error on CXL.cache
46#
47# @mem-data-parity: Data error such as data parity or data ECC error
48#     on CXL.mem
49#
50# @mem-address-parity: Address parity or other errors associated with
51#     the address field on CXL.mem
52#
53# @mem-be-parity: Byte enable parity or other byte enable errors on
54#     CXL.mem.
55#
56# @mem-data-ecc: Data ECC error on CXL.mem.
57#
58# @reinit-threshold: REINIT threshold hit.
59#
60# @rsvd-encoding: Received unrecognized encoding.
61#
62# @poison-received: Received poison from the peer.
63#
64# @receiver-overflow: Buffer overflows (first 3 bits of header log
65#     indicate which)
66#
67# @internal: Component specific error
68#
69# @cxl-ide-tx: Integrity and data encryption tx error.
70#
71# @cxl-ide-rx: Integrity and data encryption rx error.
72#
73# Since: 8.0
74##
75
76{ 'enum': 'CxlUncorErrorType',
77  'data': ['cache-data-parity',
78           'cache-address-parity',
79           'cache-be-parity',
80           'cache-data-ecc',
81           'mem-data-parity',
82           'mem-address-parity',
83           'mem-be-parity',
84           'mem-data-ecc',
85           'reinit-threshold',
86           'rsvd-encoding',
87           'poison-received',
88           'receiver-overflow',
89           'internal',
90           'cxl-ide-tx',
91           'cxl-ide-rx'
92           ]
93 }
94
95##
96# @CXLUncorErrorRecord:
97#
98# Record of a single error including header log.
99#
100# @type: Type of error
101#
102# @header: 16 DWORD of header.
103#
104# Since: 8.0
105##
106{ 'struct': 'CXLUncorErrorRecord',
107  'data': {
108      'type': 'CxlUncorErrorType',
109      'header': [ 'uint32' ]
110  }
111}
112
113##
114# @cxl-inject-uncorrectable-errors:
115#
116# Command to allow injection of multiple errors in one go.  This
117# allows testing of multiple header log handling in the OS.
118#
119# @path: CXL Type 3 device canonical QOM path
120#
121# @errors: Errors to inject
122#
123# Since: 8.0
124##
125{ 'command': 'cxl-inject-uncorrectable-errors',
126  'data': { 'path': 'str',
127             'errors': [ 'CXLUncorErrorRecord' ] }}
128
129##
130# @CxlCorErrorType:
131#
132# Type of CXL correctable error to inject
133#
134# @cache-data-ecc: Data ECC error on CXL.cache
135#
136# @mem-data-ecc: Data ECC error on CXL.mem
137#
138# @crc-threshold: Component specific and applicable to 68 byte Flit
139#     mode only.
140#
141# @cache-poison-received: Received poison from a peer on CXL.cache.
142#
143# @mem-poison-received: Received poison from a peer on CXL.mem
144#
145# @physical: Received error indication from the physical layer.
146#
147# Since: 8.0
148##
149{ 'enum': 'CxlCorErrorType',
150  'data': ['cache-data-ecc',
151           'mem-data-ecc',
152           'crc-threshold',
153           'retry-threshold',
154           'cache-poison-received',
155           'mem-poison-received',
156           'physical']
157}
158
159##
160# @cxl-inject-correctable-error:
161#
162# Command to inject a single correctable error.  Multiple error
163# injection of this error type is not interesting as there is no
164# associated header log.  These errors are reported via AER as a
165# correctable internal error, with additional detail available from
166# the CXL device.
167#
168# @path: CXL Type 3 device canonical QOM path
169#
170# @type: Type of error.
171#
172# Since: 8.0
173##
174{'command': 'cxl-inject-correctable-error',
175 'data': {'path': 'str', 'type': 'CxlCorErrorType'}}
176