5 # = Target-specific commands & events
8 { 'include': 'misc.json' }
13 # Emitted when the guest changes the RTC time.
15 # @offset: offset between base RTC clock (as specified by -rtc base), and
18 # Note: This event is rate-limited.
24 # <- { "event": "RTC_CHANGE",
25 # "data": { "offset": 78 },
26 # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
29 { 'event': 'RTC_CHANGE',
30 'data': { 'offset': 'int' },
31 'if': 'defined(TARGET_ALPHA) || defined(TARGET_ARM) || defined(TARGET_HPPA) || defined(TARGET_I386) || defined(TARGET_MIPS) || defined(TARGET_MIPS64) || defined(TARGET_MOXIE) || defined(TARGET_PPC) || defined(TARGET_PPC64) || defined(TARGET_S390X) || defined(TARGET_SH4) || defined(TARGET_SPARC)' }
34 # @rtc-reset-reinjection:
36 # This command will reset the RTC interrupt reinjection backlog.
37 # Can be used if another mechanism to synchronize guest time
38 # is in effect, for example QEMU guest agent's guest-set-time
45 # -> { "execute": "rtc-reset-reinjection" }
49 { 'command': 'rtc-reset-reinjection',
50 'if': 'defined(TARGET_I386)' }
56 # An enumeration of SEV state information used during @query-sev.
58 # @uninit: The guest is uninitialized.
60 # @launch-update: The guest is currently being launched; plaintext data and
61 # register state is being imported.
63 # @launch-secret: The guest is currently being launched; ciphertext data
66 # @running: The guest is fully launched or migrated in.
68 # @send-update: The guest is currently being migrated out to another machine.
70 # @receive-update: The guest is currently being migrated from another machine.
75 'data': ['uninit', 'launch-update', 'launch-secret', 'running',
76 'send-update', 'receive-update' ],
77 'if': 'defined(TARGET_I386)' }
82 # Information about Secure Encrypted Virtualization (SEV) support
84 # @enabled: true if SEV is active
86 # @api-major: SEV API major version
88 # @api-minor: SEV API minor version
90 # @build-id: SEV FW build id
92 # @policy: SEV policy value
94 # @state: SEV guest state
96 # @handle: SEV firmware handle
100 { 'struct': 'SevInfo',
101 'data': { 'enabled': 'bool',
102 'api-major': 'uint8',
103 'api-minor' : 'uint8',
104 'build-id' : 'uint8',
106 'state' : 'SevState',
109 'if': 'defined(TARGET_I386)'
115 # Returns information about SEV
123 # -> { "execute": "query-sev" }
124 # <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0,
125 # "build-id" : 0, "policy" : 0, "state" : "running",
129 { 'command': 'query-sev', 'returns': 'SevInfo',
130 'if': 'defined(TARGET_I386)' }
134 # @SevLaunchMeasureInfo:
136 # SEV Guest Launch measurement information
138 # @data: the measurement value encoded in base64
143 { 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'},
144 'if': 'defined(TARGET_I386)' }
147 # @query-sev-launch-measure:
149 # Query the SEV guest launch information.
151 # Returns: The @SevLaunchMeasureInfo for the guest
157 # -> { "execute": "query-sev-launch-measure" }
158 # <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } }
161 { 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo',
162 'if': 'defined(TARGET_I386)' }
168 # The struct describes capability for a Secure Encrypted Virtualization
171 # @pdh: Platform Diffie-Hellman key (base64 encoded)
173 # @cert-chain: PDH certificate chain (base64 encoded)
175 # @cbitpos: C-bit location in page table entry
177 # @reduced-phys-bits: Number of physical Address bit reduction when SEV is
182 { 'struct': 'SevCapability',
183 'data': { 'pdh': 'str',
186 'reduced-phys-bits': 'int'},
187 'if': 'defined(TARGET_I386)' }
190 # @query-sev-capabilities:
192 # This command is used to get the SEV capabilities, and is supported on AMD
193 # X86 platforms only.
195 # Returns: SevCapability objects.
201 # -> { "execute": "query-sev-capabilities" }
202 # <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE",
203 # "cbitpos": 47, "reduced-phys-bits": 5}}
206 { 'command': 'query-sev-capabilities', 'returns': 'SevCapability',
207 'if': 'defined(TARGET_I386)' }
212 # Dump guest's storage keys
214 # @filename: the path to the file to dump to
216 # This command is only supported on s390 architecture.
222 # -> { "execute": "dump-skeys",
223 # "arguments": { "filename": "/tmp/skeys" } }
224 # <- { "return": {} }
227 { 'command': 'dump-skeys',
228 'data': { 'filename': 'str' },
229 'if': 'defined(TARGET_S390X)' }
232 # @CpuModelBaselineInfo:
234 # The result of a CPU model baseline.
236 # @model: the baselined CpuModelInfo.
240 { 'struct': 'CpuModelBaselineInfo',
241 'data': { 'model': 'CpuModelInfo' },
242 'if': 'defined(TARGET_S390X)' }
245 # @CpuModelCompareInfo:
247 # The result of a CPU model comparison.
249 # @result: The result of the compare operation.
250 # @responsible-properties: List of properties that led to the comparison result
251 # not being identical.
253 # @responsible-properties is a list of QOM property names that led to
254 # both CPUs not being detected as identical. For identical models, this
256 # If a QOM property is read-only, that means there's no known way to make the
257 # CPU models identical. If the special property name "type" is included, the
258 # models are by definition not identical and cannot be made identical.
262 { 'struct': 'CpuModelCompareInfo',
263 'data': { 'result': 'CpuModelCompareResult',
264 'responsible-properties': ['str'] },
265 'if': 'defined(TARGET_S390X)' }
268 # @query-cpu-model-comparison:
270 # Compares two CPU models, returning how they compare in a specific
271 # configuration. The results indicates how both models compare regarding
272 # runnability. This result can be used by tooling to make decisions if a
273 # certain CPU model will run in a certain configuration or if a compatible
274 # CPU model has to be created by baselining.
276 # Usually, a CPU model is compared against the maximum possible CPU model
277 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
278 # model is identical or a subset, it will run in that configuration.
280 # The result returned by this command may be affected by:
282 # * QEMU version: CPU models may look different depending on the QEMU version.
283 # (Except for CPU models reported as "static" in query-cpu-definitions.)
284 # * machine-type: CPU model may look different depending on the machine-type.
285 # (Except for CPU models reported as "static" in query-cpu-definitions.)
286 # * machine options (including accelerator): in some architectures, CPU models
287 # may look different depending on machine and accelerator options. (Except for
288 # CPU models reported as "static" in query-cpu-definitions.)
289 # * "-cpu" arguments and global properties: arguments to the -cpu option and
290 # global properties may affect expansion of CPU models. Using
291 # query-cpu-model-expansion while using these is not advised.
293 # Some architectures may not support comparing CPU models. s390x supports
294 # comparing CPU models.
296 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
297 # not supported, if a model cannot be used, if a model contains
298 # an unknown cpu definition name, unknown properties or properties
301 # Note: this command isn't specific to s390x, but is only implemented
302 # on this architecture currently.
306 { 'command': 'query-cpu-model-comparison',
307 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
308 'returns': 'CpuModelCompareInfo',
309 'if': 'defined(TARGET_S390X)' }
312 # @query-cpu-model-baseline:
314 # Baseline two CPU models, creating a compatible third model. The created
315 # model will always be a static, migration-safe CPU model (see "static"
316 # CPU model expansion for details).
318 # This interface can be used by tooling to create a compatible CPU model out
319 # two CPU models. The created CPU model will be identical to or a subset of
320 # both CPU models when comparing them. Therefore, the created CPU model is
321 # guaranteed to run where the given CPU models run.
323 # The result returned by this command may be affected by:
325 # * QEMU version: CPU models may look different depending on the QEMU version.
326 # (Except for CPU models reported as "static" in query-cpu-definitions.)
327 # * machine-type: CPU model may look different depending on the machine-type.
328 # (Except for CPU models reported as "static" in query-cpu-definitions.)
329 # * machine options (including accelerator): in some architectures, CPU models
330 # may look different depending on machine and accelerator options. (Except for
331 # CPU models reported as "static" in query-cpu-definitions.)
332 # * "-cpu" arguments and global properties: arguments to the -cpu option and
333 # global properties may affect expansion of CPU models. Using
334 # query-cpu-model-expansion while using these is not advised.
336 # Some architectures may not support baselining CPU models. s390x supports
337 # baselining CPU models.
339 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
340 # not supported, if a model cannot be used, if a model contains
341 # an unknown cpu definition name, unknown properties or properties
344 # Note: this command isn't specific to s390x, but is only implemented
345 # on this architecture currently.
349 { 'command': 'query-cpu-model-baseline',
350 'data': { 'modela': 'CpuModelInfo',
351 'modelb': 'CpuModelInfo' },
352 'returns': 'CpuModelBaselineInfo',
353 'if': 'defined(TARGET_S390X)' }
358 # The struct describes capability for a specific GIC (Generic
359 # Interrupt Controller) version. These bits are not only decided by
360 # QEMU/KVM software version, but also decided by the hardware that
361 # the program is running upon.
363 # @version: version of GIC to be described. Currently, only 2 and 3
366 # @emulated: whether current QEMU/hardware supports emulated GIC
367 # device in user space.
369 # @kernel: whether current QEMU/hardware supports hardware
370 # accelerated GIC device in kernel.
374 { 'struct': 'GICCapability',
375 'data': { 'version': 'int',
378 'if': 'defined(TARGET_ARM)' }
381 # @query-gic-capabilities:
383 # This command is ARM-only. It will return a list of GICCapability
384 # objects that describe its capability bits.
386 # Returns: a list of GICCapability objects.
392 # -> { "execute": "query-gic-capabilities" }
393 # <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
394 # { "version": 3, "emulated": false, "kernel": true } ] }
397 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'],
398 'if': 'defined(TARGET_ARM)' }
401 # @CpuModelExpansionInfo:
403 # The result of a cpu model expansion.
405 # @model: the expanded CpuModelInfo.
409 { 'struct': 'CpuModelExpansionInfo',
410 'data': { 'model': 'CpuModelInfo' },
411 'if': 'defined(TARGET_S390X) || defined(TARGET_I386)' }
414 # @query-cpu-model-expansion:
416 # Expands a given CPU model (or a combination of CPU model + additional options)
417 # to different granularities, allowing tooling to get an understanding what a
418 # specific CPU model looks like in QEMU under a certain configuration.
420 # This interface can be used to query the "host" CPU model.
422 # The data returned by this command may be affected by:
424 # * QEMU version: CPU models may look different depending on the QEMU version.
425 # (Except for CPU models reported as "static" in query-cpu-definitions.)
426 # * machine-type: CPU model may look different depending on the machine-type.
427 # (Except for CPU models reported as "static" in query-cpu-definitions.)
428 # * machine options (including accelerator): in some architectures, CPU models
429 # may look different depending on machine and accelerator options. (Except for
430 # CPU models reported as "static" in query-cpu-definitions.)
431 # * "-cpu" arguments and global properties: arguments to the -cpu option and
432 # global properties may affect expansion of CPU models. Using
433 # query-cpu-model-expansion while using these is not advised.
435 # Some architectures may not support all expansion types. s390x supports
436 # "full" and "static".
438 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
439 # not supported, if the model cannot be expanded, if the model contains
440 # an unknown CPU definition name, unknown properties or properties
441 # with a wrong type. Also returns an error if an expansion type is
446 { 'command': 'query-cpu-model-expansion',
447 'data': { 'type': 'CpuModelExpansionType',
448 'model': 'CpuModelInfo' },
449 'returns': 'CpuModelExpansionInfo',
450 'if': 'defined(TARGET_S390X) || defined(TARGET_I386)' }
453 # @CpuDefinitionInfo:
455 # Virtual CPU definition.
457 # @name: the name of the CPU definition
459 # @migration-safe: whether a CPU definition can be safely used for
460 # migration in combination with a QEMU compatibility machine
461 # when migrating between different QEMU versions and between
462 # hosts with different sets of (hardware or software)
463 # capabilities. If not provided, information is not available
464 # and callers should not assume the CPU definition to be
465 # migration-safe. (since 2.8)
467 # @static: whether a CPU definition is static and will not change depending on
468 # QEMU version, machine type, machine options and accelerator options.
469 # A static model is always migration-safe. (since 2.8)
471 # @unavailable-features: List of properties that prevent
472 # the CPU model from running in the current
474 # @typename: Type name that can be used as argument to @device-list-properties,
475 # to introspect properties configurable using -cpu or -global.
478 # @unavailable-features is a list of QOM property names that
479 # represent CPU model attributes that prevent the CPU from running.
480 # If the QOM property is read-only, that means there's no known
481 # way to make the CPU model run in the current host. Implementations
482 # that choose not to provide specific information return the
483 # property name "type".
484 # If the property is read-write, it means that it MAY be possible
485 # to run the CPU model in the current host if that property is
486 # changed. Management software can use it as hints to suggest or
487 # choose an alternative for the user, or just to generate meaningful
488 # error messages explaining why the CPU model can't be used.
489 # If @unavailable-features is an empty list, the CPU model is
490 # runnable using the current host and machine-type.
491 # If @unavailable-features is not present, runnability
492 # information for the CPU is not available.
496 { 'struct': 'CpuDefinitionInfo',
497 'data': { 'name': 'str',
498 '*migration-safe': 'bool',
500 '*unavailable-features': [ 'str' ],
502 'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_I386) || defined(TARGET_S390X) || defined(TARGET_MIPS)' }
505 # @query-cpu-definitions:
507 # Return a list of supported virtual CPU definitions
509 # Returns: a list of CpuDefInfo
513 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'],
514 'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_I386) || defined(TARGET_S390X) || defined(TARGET_MIPS)' }