8 # Emitted when the guest changes the RTC time.
10 # @offset: offset between base RTC clock (as specified by -rtc base), and
13 # Note: This event is rate-limited.
19 # <- { "event": "RTC_CHANGE",
20 # "data": { "offset": 78 },
21 # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
24 { 'event': 'RTC_CHANGE',
25 'data': { 'offset': 'int' },
26 'if': { 'any': [ 'TARGET_ALPHA',
39 # @rtc-reset-reinjection:
41 # This command will reset the RTC interrupt reinjection backlog.
42 # Can be used if another mechanism to synchronize guest time
43 # is in effect, for example QEMU guest agent's guest-set-time
50 # -> { "execute": "rtc-reset-reinjection" }
54 { 'command': 'rtc-reset-reinjection',
61 # An enumeration of SEV state information used during @query-sev.
63 # @uninit: The guest is uninitialized.
65 # @launch-update: The guest is currently being launched; plaintext data and
66 # register state is being imported.
68 # @launch-secret: The guest is currently being launched; ciphertext data
71 # @running: The guest is fully launched or migrated in.
73 # @send-update: The guest is currently being migrated out to another machine.
75 # @receive-update: The guest is currently being migrated from another machine.
80 'data': ['uninit', 'launch-update', 'launch-secret', 'running',
81 'send-update', 'receive-update' ],
87 # Information about Secure Encrypted Virtualization (SEV) support
89 # @enabled: true if SEV is active
91 # @api-major: SEV API major version
93 # @api-minor: SEV API minor version
95 # @build-id: SEV FW build id
97 # @policy: SEV policy value
99 # @state: SEV guest state
101 # @handle: SEV firmware handle
105 { 'struct': 'SevInfo',
106 'data': { 'enabled': 'bool',
107 'api-major': 'uint8',
108 'api-minor' : 'uint8',
109 'build-id' : 'uint8',
111 'state' : 'SevState',
120 # Returns information about SEV
128 # -> { "execute": "query-sev" }
129 # <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0,
130 # "build-id" : 0, "policy" : 0, "state" : "running",
134 { 'command': 'query-sev', 'returns': 'SevInfo',
135 'if': 'TARGET_I386' }
139 # @SevLaunchMeasureInfo:
141 # SEV Guest Launch measurement information
143 # @data: the measurement value encoded in base64
148 { 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'},
149 'if': 'TARGET_I386' }
152 # @query-sev-launch-measure:
154 # Query the SEV guest launch information.
156 # Returns: The @SevLaunchMeasureInfo for the guest
162 # -> { "execute": "query-sev-launch-measure" }
163 # <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } }
166 { 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo',
167 'if': 'TARGET_I386' }
173 # The struct describes capability for a Secure Encrypted Virtualization
176 # @pdh: Platform Diffie-Hellman key (base64 encoded)
178 # @cert-chain: PDH certificate chain (base64 encoded)
180 # @cbitpos: C-bit location in page table entry
182 # @reduced-phys-bits: Number of physical Address bit reduction when SEV is
187 { 'struct': 'SevCapability',
188 'data': { 'pdh': 'str',
191 'reduced-phys-bits': 'int'},
192 'if': 'TARGET_I386' }
195 # @query-sev-capabilities:
197 # This command is used to get the SEV capabilities, and is supported on AMD
198 # X86 platforms only.
200 # Returns: SevCapability objects.
206 # -> { "execute": "query-sev-capabilities" }
207 # <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE",
208 # "cbitpos": 47, "reduced-phys-bits": 5}}
211 { 'command': 'query-sev-capabilities', 'returns': 'SevCapability',
212 'if': 'TARGET_I386' }
215 # @sev-inject-launch-secret:
217 # This command injects a secret blob into memory of SEV guest.
219 # @packet-header: the launch secret packet header encoded in base64
221 # @secret: the launch secret data to be injected encoded in base64
223 # @gpa: the guest physical address where secret will be injected.
228 { 'command': 'sev-inject-launch-secret',
229 'data': { 'packet-header': 'str', 'secret': 'str', '*gpa': 'uint64' },
230 'if': 'TARGET_I386' }
233 # @SevAttestationReport:
235 # The struct describes attestation report for a Secure Encrypted
236 # Virtualization feature.
238 # @data: guest attestation report (base64 encoded)
243 { 'struct': 'SevAttestationReport',
244 'data': { 'data': 'str'},
245 'if': 'TARGET_I386' }
248 # @query-sev-attestation-report:
250 # This command is used to get the SEV attestation report, and is
251 # supported on AMD X86 platforms only.
253 # @mnonce: a random 16 bytes value encoded in base64 (it will be
254 # included in report)
256 # Returns: SevAttestationReport objects.
262 # -> { "execute" : "query-sev-attestation-report",
263 # "arguments": { "mnonce": "aaaaaaa" } }
264 # <- { "return" : { "data": "aaaaaaaabbbddddd"} }
267 { 'command': 'query-sev-attestation-report',
268 'data': { 'mnonce': 'str' },
269 'returns': 'SevAttestationReport',
270 'if': 'TARGET_I386' }
275 # Dump guest's storage keys
277 # @filename: the path to the file to dump to
279 # This command is only supported on s390 architecture.
285 # -> { "execute": "dump-skeys",
286 # "arguments": { "filename": "/tmp/skeys" } }
287 # <- { "return": {} }
290 { 'command': 'dump-skeys',
291 'data': { 'filename': 'str' },
292 'if': 'TARGET_S390X' }
297 # The struct describes capability for a specific GIC (Generic
298 # Interrupt Controller) version. These bits are not only decided by
299 # QEMU/KVM software version, but also decided by the hardware that
300 # the program is running upon.
302 # @version: version of GIC to be described. Currently, only 2 and 3
305 # @emulated: whether current QEMU/hardware supports emulated GIC
306 # device in user space.
308 # @kernel: whether current QEMU/hardware supports hardware
309 # accelerated GIC device in kernel.
313 { 'struct': 'GICCapability',
314 'data': { 'version': 'int',
320 # @query-gic-capabilities:
322 # This command is ARM-only. It will return a list of GICCapability
323 # objects that describe its capability bits.
325 # Returns: a list of GICCapability objects.
331 # -> { "execute": "query-gic-capabilities" }
332 # <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
333 # { "version": 3, "emulated": false, "kernel": true } ] }
336 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'],
343 # Information about intel Safe Guard eXtension (SGX) support
345 # @sgx: true if SGX is supported
347 # @sgx1: true if SGX1 is supported
349 # @sgx2: true if SGX2 is supported
351 # @flc: true if FLC is supported
353 # @section-size: The EPC section size for guest
357 { 'struct': 'SGXInfo',
358 'data': { 'sgx': 'bool',
362 'section-size': 'uint64'},
363 'if': 'TARGET_I386' }
368 # Returns information about SGX
376 # -> { "execute": "query-sgx" }
377 # <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
378 # "flc": true, "section-size" : 0 } }
381 { 'command': 'query-sgx', 'returns': 'SGXInfo', 'if': 'TARGET_I386' }
384 # @query-sgx-capabilities:
386 # Returns information from host SGX capabilities
394 # -> { "execute": "query-sgx-capabilities" }
395 # <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
396 # "flc": true, "section-size" : 0 } }
399 { 'command': 'query-sgx-capabilities', 'returns': 'SGXInfo', 'if': 'TARGET_I386' }