]> git.proxmox.com Git - mirror_qemu.git/blame - qapi/target.json
nbd/server: Don't fail NBD_OPT_INFO for byte-aligned sources
[mirror_qemu.git] / qapi / target.json
CommitLineData
61eb9e80
MA
1# -*- Mode: Python -*-
2#
3
4##
5# = Target-specific commands & events
6##
7
0e2f4530
MAL
8{ 'include': 'misc.json' }
9
183e4281
MAL
10##
11# @RTC_CHANGE:
12#
13# Emitted when the guest changes the RTC time.
14#
15# @offset: offset between base RTC clock (as specified by -rtc base), and
16# new RTC clock value
17#
18# Note: This event is rate-limited.
19#
20# Since: 0.13.0
21#
22# Example:
23#
24# <- { "event": "RTC_CHANGE",
25# "data": { "offset": 78 },
26# "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
27#
28##
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)' }
32
61eb9e80 33##
a6c7040f
MAL
34# @rtc-reset-reinjection:
35#
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
39# command.
40#
41# Since: 2.1
42#
43# Example:
44#
45# -> { "execute": "rtc-reset-reinjection" }
46# <- { "return": {} }
47#
48##
49{ 'command': 'rtc-reset-reinjection',
50 'if': 'defined(TARGET_I386)' }
51
52
53##
54# @SevState:
55#
56# An enumeration of SEV state information used during @query-sev.
57#
58# @uninit: The guest is uninitialized.
59#
60# @launch-update: The guest is currently being launched; plaintext data and
61# register state is being imported.
62#
63# @launch-secret: The guest is currently being launched; ciphertext data
64# is being imported.
65#
66# @running: The guest is fully launched or migrated in.
67#
68# @send-update: The guest is currently being migrated out to another machine.
69#
70# @receive-update: The guest is currently being migrated from another machine.
71#
72# Since: 2.12
73##
74{ 'enum': 'SevState',
75 'data': ['uninit', 'launch-update', 'launch-secret', 'running',
76 'send-update', 'receive-update' ],
77 'if': 'defined(TARGET_I386)' }
78
79##
80# @SevInfo:
81#
82# Information about Secure Encrypted Virtualization (SEV) support
83#
84# @enabled: true if SEV is active
85#
86# @api-major: SEV API major version
87#
88# @api-minor: SEV API minor version
89#
90# @build-id: SEV FW build id
91#
92# @policy: SEV policy value
93#
94# @state: SEV guest state
95#
96# @handle: SEV firmware handle
97#
98# Since: 2.12
99##
100{ 'struct': 'SevInfo',
101 'data': { 'enabled': 'bool',
102 'api-major': 'uint8',
103 'api-minor' : 'uint8',
104 'build-id' : 'uint8',
105 'policy' : 'uint32',
106 'state' : 'SevState',
107 'handle' : 'uint32'
108 },
109 'if': 'defined(TARGET_I386)'
110}
111
112##
113# @query-sev:
114#
115# Returns information about SEV
116#
117# Returns: @SevInfo
118#
119# Since: 2.12
120#
121# Example:
122#
123# -> { "execute": "query-sev" }
124# <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0,
125# "build-id" : 0, "policy" : 0, "state" : "running",
126# "handle" : 1 } }
127#
128##
129{ 'command': 'query-sev', 'returns': 'SevInfo',
130 'if': 'defined(TARGET_I386)' }
131
132
133##
134# @SevLaunchMeasureInfo:
135#
136# SEV Guest Launch measurement information
137#
138# @data: the measurement value encoded in base64
139#
140# Since: 2.12
141#
142##
143{ 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'},
144 'if': 'defined(TARGET_I386)' }
145
146##
147# @query-sev-launch-measure:
148#
149# Query the SEV guest launch information.
150#
151# Returns: The @SevLaunchMeasureInfo for the guest
152#
153# Since: 2.12
154#
155# Example:
156#
157# -> { "execute": "query-sev-launch-measure" }
158# <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } }
159#
160##
161{ 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo',
162 'if': 'defined(TARGET_I386)' }
163
164
165##
166# @SevCapability:
167#
168# The struct describes capability for a Secure Encrypted Virtualization
169# feature.
170#
171# @pdh: Platform Diffie-Hellman key (base64 encoded)
172#
173# @cert-chain: PDH certificate chain (base64 encoded)
174#
175# @cbitpos: C-bit location in page table entry
176#
177# @reduced-phys-bits: Number of physical Address bit reduction when SEV is
178# enabled
179#
180# Since: 2.12
181##
182{ 'struct': 'SevCapability',
183 'data': { 'pdh': 'str',
184 'cert-chain': 'str',
185 'cbitpos': 'int',
186 'reduced-phys-bits': 'int'},
187 'if': 'defined(TARGET_I386)' }
188
189##
190# @query-sev-capabilities:
191#
192# This command is used to get the SEV capabilities, and is supported on AMD
193# X86 platforms only.
194#
195# Returns: SevCapability objects.
196#
197# Since: 2.12
198#
199# Example:
200#
201# -> { "execute": "query-sev-capabilities" }
202# <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE",
203# "cbitpos": 47, "reduced-phys-bits": 5}}
204#
61eb9e80 205##
a6c7040f
MAL
206{ 'command': 'query-sev-capabilities', 'returns': 'SevCapability',
207 'if': 'defined(TARGET_I386)' }
0e2f4530
MAL
208
209##
210# @dump-skeys:
211#
212# Dump guest's storage keys
213#
214# @filename: the path to the file to dump to
215#
216# This command is only supported on s390 architecture.
217#
218# Since: 2.5
219#
220# Example:
221#
222# -> { "execute": "dump-skeys",
223# "arguments": { "filename": "/tmp/skeys" } }
224# <- { "return": {} }
225#
226##
227{ 'command': 'dump-skeys',
228 'data': { 'filename': 'str' },
229 'if': 'defined(TARGET_S390X)' }
230
231##
232# @CpuModelBaselineInfo:
233#
234# The result of a CPU model baseline.
235#
236# @model: the baselined CpuModelInfo.
237#
238# Since: 2.8.0
239##
240{ 'struct': 'CpuModelBaselineInfo',
241 'data': { 'model': 'CpuModelInfo' },
242 'if': 'defined(TARGET_S390X)' }
243
244##
245# @CpuModelCompareInfo:
246#
247# The result of a CPU model comparison.
248#
249# @result: The result of the compare operation.
250# @responsible-properties: List of properties that led to the comparison result
251# not being identical.
252#
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
255# list is empty.
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.
259#
260# Since: 2.8.0
261##
262{ 'struct': 'CpuModelCompareInfo',
263 'data': { 'result': 'CpuModelCompareResult',
264 'responsible-properties': ['str'] },
265 'if': 'defined(TARGET_S390X)' }
266
267##
268# @query-cpu-model-comparison:
269#
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.
275#
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.
279#
280# The result returned by this command may be affected by:
281#
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.
292#
293# Some architectures may not support comparing CPU models. s390x supports
294# comparing CPU models.
295#
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
299# with wrong types.
300#
46e58d1b
MAL
301# Note: this command isn't specific to s390x, but is only implemented
302# on this architecture currently.
303#
0e2f4530
MAL
304# Since: 2.8.0
305##
306{ 'command': 'query-cpu-model-comparison',
307 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
308 'returns': 'CpuModelCompareInfo',
309 'if': 'defined(TARGET_S390X)' }
310
311##
312# @query-cpu-model-baseline:
313#
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).
317#
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.
322#
323# The result returned by this command may be affected by:
324#
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.
335#
336# Some architectures may not support baselining CPU models. s390x supports
337# baselining CPU models.
338#
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
342# with wrong types.
343#
46e58d1b
MAL
344# Note: this command isn't specific to s390x, but is only implemented
345# on this architecture currently.
346#
0e2f4530
MAL
347# Since: 2.8.0
348##
349{ 'command': 'query-cpu-model-baseline',
350 'data': { 'modela': 'CpuModelInfo',
351 'modelb': 'CpuModelInfo' },
352 'returns': 'CpuModelBaselineInfo',
353 'if': 'defined(TARGET_S390X)' }
84c6499e
MAL
354
355##
356# @GICCapability:
357#
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.
362#
363# @version: version of GIC to be described. Currently, only 2 and 3
364# are supported.
365#
366# @emulated: whether current QEMU/hardware supports emulated GIC
367# device in user space.
368#
369# @kernel: whether current QEMU/hardware supports hardware
370# accelerated GIC device in kernel.
371#
372# Since: 2.6
373##
374{ 'struct': 'GICCapability',
375 'data': { 'version': 'int',
376 'emulated': 'bool',
377 'kernel': 'bool' },
378 'if': 'defined(TARGET_ARM)' }
379
380##
381# @query-gic-capabilities:
382#
383# This command is ARM-only. It will return a list of GICCapability
384# objects that describe its capability bits.
385#
386# Returns: a list of GICCapability objects.
387#
388# Since: 2.6
389#
390# Example:
391#
392# -> { "execute": "query-gic-capabilities" }
393# <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
394# { "version": 3, "emulated": false, "kernel": true } ] }
395#
396##
397{ 'command': 'query-gic-capabilities', 'returns': ['GICCapability'],
398 'if': 'defined(TARGET_ARM)' }
96f75b59
MAL
399
400##
401# @CpuModelExpansionInfo:
402#
403# The result of a cpu model expansion.
404#
405# @model: the expanded CpuModelInfo.
406#
407# Since: 2.8.0
408##
409{ 'struct': 'CpuModelExpansionInfo',
410 'data': { 'model': 'CpuModelInfo' },
411 'if': 'defined(TARGET_S390X) || defined(TARGET_I386)' }
412
413##
414# @query-cpu-model-expansion:
415#
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.
419#
420# This interface can be used to query the "host" CPU model.
421#
422# The data returned by this command may be affected by:
423#
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.
434#
435# Some architectures may not support all expansion types. s390x supports
436# "full" and "static".
437#
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
442# not supported.
443#
444# Since: 2.8.0
445##
446{ 'command': 'query-cpu-model-expansion',
447 'data': { 'type': 'CpuModelExpansionType',
448 'model': 'CpuModelInfo' },
449 'returns': 'CpuModelExpansionInfo',
450 'if': 'defined(TARGET_S390X) || defined(TARGET_I386)' }
25a9d6ca
MAL
451
452##
453# @CpuDefinitionInfo:
454#
455# Virtual CPU definition.
456#
457# @name: the name of the CPU definition
458#
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)
466#
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)
470#
471# @unavailable-features: List of properties that prevent
472# the CPU model from running in the current
473# host. (since 2.8)
474# @typename: Type name that can be used as argument to @device-list-properties,
475# to introspect properties configurable using -cpu or -global.
476# (since 2.9)
477#
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.
493#
494# Since: 1.2.0
495##
496{ 'struct': 'CpuDefinitionInfo',
497 'data': { 'name': 'str',
498 '*migration-safe': 'bool',
499 'static': 'bool',
500 '*unavailable-features': [ 'str' ],
501 'typename': 'str' },
535db744 502 'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_I386) || defined(TARGET_S390X) || defined(TARGET_MIPS)' }
25a9d6ca
MAL
503
504##
505# @query-cpu-definitions:
506#
507# Return a list of supported virtual CPU definitions
508#
509# Returns: a list of CpuDefInfo
510#
511# Since: 1.2.0
512##
513{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'],
535db744 514 'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_I386) || defined(TARGET_S390X) || defined(TARGET_MIPS)' }