]>
Commit | Line | Data |
---|---|---|
112ed241 MA |
1 | # -*- Mode: Python -*- |
2 | # | |
3 | ||
4 | ## | |
5 | # = Miscellanea | |
6 | ## | |
7 | ||
b47aa7b3 LE |
8 | { 'include': 'common.json' } |
9 | ||
112ed241 MA |
10 | ## |
11 | # @qmp_capabilities: | |
12 | # | |
13 | # Enable QMP capabilities. | |
14 | # | |
02130314 PX |
15 | # Arguments: |
16 | # | |
17 | # @enable: An optional list of QMPCapability values to enable. The | |
18 | # client must not enable any capability that is not | |
19 | # mentioned in the QMP greeting message. If the field is not | |
20 | # provided, it means no QMP capabilities will be enabled. | |
21 | # (since 2.12) | |
112ed241 MA |
22 | # |
23 | # Example: | |
24 | # | |
02130314 PX |
25 | # -> { "execute": "qmp_capabilities", |
26 | # "arguments": { "enable": [ "oob" ] } } | |
112ed241 MA |
27 | # <- { "return": {} } |
28 | # | |
29 | # Notes: This command is valid exactly when first connecting: it must be | |
30 | # issued before any other command will be accepted, and will fail once the | |
31 | # monitor is accepting other commands. (see qemu docs/interop/qmp-spec.txt) | |
32 | # | |
02130314 PX |
33 | # The QMP client needs to explicitly enable QMP capabilities, otherwise |
34 | # all the QMP capabilities will be turned off by default. | |
35 | # | |
112ed241 MA |
36 | # Since: 0.13 |
37 | # | |
38 | ## | |
02130314 | 39 | { 'command': 'qmp_capabilities', |
d6fe3d02 IM |
40 | 'data': { '*enable': [ 'QMPCapability' ] }, |
41 | 'allow-preconfig': true } | |
02130314 PX |
42 | |
43 | ## | |
44 | # @QMPCapability: | |
45 | # | |
46 | # Enumeration of capabilities to be advertised during initial client | |
47 | # connection, used for agreeing on particular QMP extension behaviors. | |
48 | # | |
c0698212 | 49 | # @oob: QMP ability to support out-of-band requests. |
02130314 PX |
50 | # (Please refer to qmp-spec.txt for more information on OOB) |
51 | # | |
52 | # Since: 2.12 | |
53 | # | |
54 | ## | |
55 | { 'enum': 'QMPCapability', | |
56 | 'data': [ 'oob' ] } | |
112ed241 MA |
57 | |
58 | ## | |
59 | # @VersionTriple: | |
60 | # | |
61 | # A three-part version number. | |
62 | # | |
63 | # @major: The major version number. | |
64 | # | |
65 | # @minor: The minor version number. | |
66 | # | |
67 | # @micro: The micro version number. | |
68 | # | |
69 | # Since: 2.4 | |
70 | ## | |
71 | { 'struct': 'VersionTriple', | |
72 | 'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} } | |
73 | ||
74 | ||
75 | ## | |
76 | # @VersionInfo: | |
77 | # | |
78 | # A description of QEMU's version. | |
79 | # | |
80 | # @qemu: The version of QEMU. By current convention, a micro | |
81 | # version of 50 signifies a development branch. A micro version | |
82 | # greater than or equal to 90 signifies a release candidate for | |
83 | # the next minor version. A micro version of less than 50 | |
84 | # signifies a stable release. | |
85 | # | |
86 | # @package: QEMU will always set this field to an empty string. Downstream | |
87 | # versions of QEMU should set this to a non-empty string. The | |
88 | # exact format depends on the downstream however it highly | |
89 | # recommended that a unique name is used. | |
90 | # | |
91 | # Since: 0.14.0 | |
92 | ## | |
93 | { 'struct': 'VersionInfo', | |
94 | 'data': {'qemu': 'VersionTriple', 'package': 'str'} } | |
95 | ||
96 | ## | |
97 | # @query-version: | |
98 | # | |
99 | # Returns the current version of QEMU. | |
100 | # | |
101 | # Returns: A @VersionInfo object describing the current version of QEMU. | |
102 | # | |
103 | # Since: 0.14.0 | |
104 | # | |
105 | # Example: | |
106 | # | |
107 | # -> { "execute": "query-version" } | |
108 | # <- { | |
109 | # "return":{ | |
110 | # "qemu":{ | |
111 | # "major":0, | |
112 | # "minor":11, | |
113 | # "micro":5 | |
114 | # }, | |
115 | # "package":"" | |
116 | # } | |
117 | # } | |
118 | # | |
119 | ## | |
a87706c8 IM |
120 | { 'command': 'query-version', 'returns': 'VersionInfo', |
121 | 'allow-preconfig': true } | |
112ed241 MA |
122 | |
123 | ## | |
124 | # @CommandInfo: | |
125 | # | |
126 | # Information about a QMP command | |
127 | # | |
128 | # @name: The command name | |
129 | # | |
130 | # Since: 0.14.0 | |
131 | ## | |
132 | { 'struct': 'CommandInfo', 'data': {'name': 'str'} } | |
133 | ||
134 | ## | |
135 | # @query-commands: | |
136 | # | |
137 | # Return a list of supported QMP commands by this server | |
138 | # | |
139 | # Returns: A list of @CommandInfo for all supported commands | |
140 | # | |
141 | # Since: 0.14.0 | |
142 | # | |
143 | # Example: | |
144 | # | |
145 | # -> { "execute": "query-commands" } | |
146 | # <- { | |
147 | # "return":[ | |
148 | # { | |
149 | # "name":"query-balloon" | |
150 | # }, | |
151 | # { | |
152 | # "name":"system_powerdown" | |
153 | # } | |
154 | # ] | |
155 | # } | |
156 | # | |
157 | # Note: This example has been shortened as the real response is too long. | |
158 | # | |
159 | ## | |
d6fe3d02 IM |
160 | { 'command': 'query-commands', 'returns': ['CommandInfo'], |
161 | 'allow-preconfig': true } | |
112ed241 MA |
162 | |
163 | ## | |
164 | # @LostTickPolicy: | |
165 | # | |
166 | # Policy for handling lost ticks in timer devices. | |
167 | # | |
168 | # @discard: throw away the missed tick(s) and continue with future injection | |
169 | # normally. Guest time may be delayed, unless the OS has explicit | |
170 | # handling of lost ticks | |
171 | # | |
172 | # @delay: continue to deliver ticks at the normal rate. Guest time will be | |
173 | # delayed due to the late tick | |
174 | # | |
175 | # @merge: merge the missed tick(s) into one tick and inject. Guest time | |
176 | # may be delayed, depending on how the OS reacts to the merging | |
177 | # of ticks | |
178 | # | |
179 | # @slew: deliver ticks at a higher rate to catch up with the missed tick. The | |
180 | # guest time should not be delayed once catchup is complete. | |
181 | # | |
182 | # Since: 2.0 | |
183 | ## | |
184 | { 'enum': 'LostTickPolicy', | |
185 | 'data': ['discard', 'delay', 'merge', 'slew' ] } | |
186 | ||
187 | ## | |
188 | # @add_client: | |
189 | # | |
190 | # Allow client connections for VNC, Spice and socket based | |
191 | # character devices to be passed in to QEMU via SCM_RIGHTS. | |
192 | # | |
193 | # @protocol: protocol name. Valid names are "vnc", "spice" or the | |
194 | # name of a character device (eg. from -chardev id=XXXX) | |
195 | # | |
196 | # @fdname: file descriptor name previously passed via 'getfd' command | |
197 | # | |
198 | # @skipauth: whether to skip authentication. Only applies | |
199 | # to "vnc" and "spice" protocols | |
200 | # | |
201 | # @tls: whether to perform TLS. Only applies to the "spice" | |
202 | # protocol | |
203 | # | |
204 | # Returns: nothing on success. | |
205 | # | |
206 | # Since: 0.14.0 | |
207 | # | |
208 | # Example: | |
209 | # | |
210 | # -> { "execute": "add_client", "arguments": { "protocol": "vnc", | |
211 | # "fdname": "myclient" } } | |
212 | # <- { "return": {} } | |
213 | # | |
214 | ## | |
215 | { 'command': 'add_client', | |
216 | 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool', | |
217 | '*tls': 'bool' } } | |
218 | ||
219 | ## | |
220 | # @NameInfo: | |
221 | # | |
222 | # Guest name information. | |
223 | # | |
224 | # @name: The name of the guest | |
225 | # | |
226 | # Since: 0.14.0 | |
227 | ## | |
228 | { 'struct': 'NameInfo', 'data': {'*name': 'str'} } | |
229 | ||
230 | ## | |
231 | # @query-name: | |
232 | # | |
233 | # Return the name information of a guest. | |
234 | # | |
235 | # Returns: @NameInfo of the guest | |
236 | # | |
237 | # Since: 0.14.0 | |
238 | # | |
239 | # Example: | |
240 | # | |
241 | # -> { "execute": "query-name" } | |
242 | # <- { "return": { "name": "qemu-name" } } | |
243 | # | |
244 | ## | |
a87706c8 | 245 | { 'command': 'query-name', 'returns': 'NameInfo', 'allow-preconfig': true } |
112ed241 MA |
246 | |
247 | ## | |
248 | # @KvmInfo: | |
249 | # | |
250 | # Information about support for KVM acceleration | |
251 | # | |
252 | # @enabled: true if KVM acceleration is active | |
253 | # | |
254 | # @present: true if KVM acceleration is built into this executable | |
255 | # | |
256 | # Since: 0.14.0 | |
257 | ## | |
258 | { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} } | |
259 | ||
260 | ## | |
261 | # @query-kvm: | |
262 | # | |
263 | # Returns information about KVM acceleration | |
264 | # | |
265 | # Returns: @KvmInfo | |
266 | # | |
267 | # Since: 0.14.0 | |
268 | # | |
269 | # Example: | |
270 | # | |
271 | # -> { "execute": "query-kvm" } | |
272 | # <- { "return": { "enabled": true, "present": true } } | |
273 | # | |
274 | ## | |
275 | { 'command': 'query-kvm', 'returns': 'KvmInfo' } | |
276 | ||
277 | ## | |
278 | # @UuidInfo: | |
279 | # | |
280 | # Guest UUID information (Universally Unique Identifier). | |
281 | # | |
282 | # @UUID: the UUID of the guest | |
283 | # | |
284 | # Since: 0.14.0 | |
285 | # | |
286 | # Notes: If no UUID was specified for the guest, a null UUID is returned. | |
287 | ## | |
288 | { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} } | |
289 | ||
290 | ## | |
291 | # @query-uuid: | |
292 | # | |
293 | # Query the guest UUID information. | |
294 | # | |
295 | # Returns: The @UuidInfo for the guest | |
296 | # | |
297 | # Since: 0.14.0 | |
298 | # | |
299 | # Example: | |
300 | # | |
301 | # -> { "execute": "query-uuid" } | |
302 | # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } } | |
303 | # | |
304 | ## | |
a87706c8 | 305 | { 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true } |
112ed241 MA |
306 | |
307 | ## | |
308 | # @EventInfo: | |
309 | # | |
310 | # Information about a QMP event | |
311 | # | |
312 | # @name: The event name | |
313 | # | |
314 | # Since: 1.2.0 | |
315 | ## | |
316 | { 'struct': 'EventInfo', 'data': {'name': 'str'} } | |
317 | ||
318 | ## | |
319 | # @query-events: | |
320 | # | |
321 | # Return a list of supported QMP events by this server | |
322 | # | |
323 | # Returns: A list of @EventInfo for all supported events | |
324 | # | |
325 | # Since: 1.2.0 | |
326 | # | |
327 | # Example: | |
328 | # | |
329 | # -> { "execute": "query-events" } | |
330 | # <- { | |
331 | # "return": [ | |
332 | # { | |
333 | # "name":"SHUTDOWN" | |
334 | # }, | |
335 | # { | |
336 | # "name":"RESET" | |
337 | # } | |
338 | # ] | |
339 | # } | |
340 | # | |
341 | # Note: This example has been shortened as the real response is too long. | |
342 | # | |
343 | ## | |
344 | { 'command': 'query-events', 'returns': ['EventInfo'] } | |
345 | ||
346 | ## | |
347 | # @CpuInfoArch: | |
348 | # | |
349 | # An enumeration of cpu types that enable additional information during | |
350 | # @query-cpus and @query-cpus-fast. | |
351 | # | |
352 | # @s390: since 2.12 | |
353 | # | |
25fa194b MC |
354 | # @riscv: since 2.12 |
355 | # | |
112ed241 MA |
356 | # Since: 2.6 |
357 | ## | |
358 | { 'enum': 'CpuInfoArch', | |
25fa194b | 359 | 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 's390', 'riscv', 'other' ] } |
112ed241 MA |
360 | |
361 | ## | |
362 | # @CpuInfo: | |
363 | # | |
364 | # Information about a virtual CPU | |
365 | # | |
366 | # @CPU: the index of the virtual CPU | |
367 | # | |
368 | # @current: this only exists for backwards compatibility and should be ignored | |
369 | # | |
370 | # @halted: true if the virtual CPU is in the halt state. Halt usually refers | |
371 | # to a processor specific low power mode. | |
372 | # | |
373 | # @qom_path: path to the CPU object in the QOM tree (since 2.4) | |
374 | # | |
375 | # @thread_id: ID of the underlying host thread | |
376 | # | |
377 | # @props: properties describing to which node/socket/core/thread | |
378 | # virtual CPU belongs to, provided if supported by board (since 2.10) | |
379 | # | |
380 | # @arch: architecture of the cpu, which determines which additional fields | |
381 | # will be listed (since 2.6) | |
382 | # | |
383 | # Since: 0.14.0 | |
384 | # | |
385 | # Notes: @halted is a transient state that changes frequently. By the time the | |
386 | # data is sent to the client, the guest may no longer be halted. | |
387 | ## | |
388 | { 'union': 'CpuInfo', | |
389 | 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', | |
390 | 'qom_path': 'str', 'thread_id': 'int', | |
391 | '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' }, | |
392 | 'discriminator': 'arch', | |
393 | 'data': { 'x86': 'CpuInfoX86', | |
394 | 'sparc': 'CpuInfoSPARC', | |
395 | 'ppc': 'CpuInfoPPC', | |
396 | 'mips': 'CpuInfoMIPS', | |
397 | 'tricore': 'CpuInfoTricore', | |
398 | 's390': 'CpuInfoS390', | |
29cd0403 | 399 | 'riscv': 'CpuInfoRISCV' } } |
112ed241 MA |
400 | |
401 | ## | |
402 | # @CpuInfoX86: | |
403 | # | |
404 | # Additional information about a virtual i386 or x86_64 CPU | |
405 | # | |
406 | # @pc: the 64-bit instruction pointer | |
407 | # | |
408 | # Since: 2.6 | |
409 | ## | |
410 | { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } } | |
411 | ||
412 | ## | |
413 | # @CpuInfoSPARC: | |
414 | # | |
415 | # Additional information about a virtual SPARC CPU | |
416 | # | |
417 | # @pc: the PC component of the instruction pointer | |
418 | # | |
419 | # @npc: the NPC component of the instruction pointer | |
420 | # | |
421 | # Since: 2.6 | |
422 | ## | |
423 | { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } } | |
424 | ||
425 | ## | |
426 | # @CpuInfoPPC: | |
427 | # | |
428 | # Additional information about a virtual PPC CPU | |
429 | # | |
430 | # @nip: the instruction pointer | |
431 | # | |
432 | # Since: 2.6 | |
433 | ## | |
434 | { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } } | |
435 | ||
436 | ## | |
437 | # @CpuInfoMIPS: | |
438 | # | |
439 | # Additional information about a virtual MIPS CPU | |
440 | # | |
441 | # @PC: the instruction pointer | |
442 | # | |
443 | # Since: 2.6 | |
444 | ## | |
445 | { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } } | |
446 | ||
447 | ## | |
448 | # @CpuInfoTricore: | |
449 | # | |
450 | # Additional information about a virtual Tricore CPU | |
451 | # | |
452 | # @PC: the instruction pointer | |
453 | # | |
454 | # Since: 2.6 | |
455 | ## | |
456 | { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } } | |
457 | ||
25fa194b MC |
458 | ## |
459 | # @CpuInfoRISCV: | |
460 | # | |
461 | # Additional information about a virtual RISCV CPU | |
462 | # | |
463 | # @pc: the instruction pointer | |
464 | # | |
465 | # Since 2.12 | |
466 | ## | |
467 | { 'struct': 'CpuInfoRISCV', 'data': { 'pc': 'int' } } | |
468 | ||
112ed241 MA |
469 | ## |
470 | # @CpuS390State: | |
471 | # | |
472 | # An enumeration of cpu states that can be assumed by a virtual | |
473 | # S390 CPU | |
474 | # | |
475 | # Since: 2.12 | |
476 | ## | |
477 | { 'enum': 'CpuS390State', | |
478 | 'prefix': 'S390_CPU_STATE', | |
479 | 'data': [ 'uninitialized', 'stopped', 'check-stop', 'operating', 'load' ] } | |
480 | ||
481 | ## | |
482 | # @CpuInfoS390: | |
483 | # | |
484 | # Additional information about a virtual S390 CPU | |
485 | # | |
486 | # @cpu-state: the virtual CPU's state | |
487 | # | |
488 | # Since: 2.12 | |
489 | ## | |
490 | { 'struct': 'CpuInfoS390', 'data': { 'cpu-state': 'CpuS390State' } } | |
491 | ||
492 | ## | |
493 | # @query-cpus: | |
494 | # | |
495 | # Returns a list of information about each virtual CPU. | |
496 | # | |
497 | # This command causes vCPU threads to exit to userspace, which causes | |
498 | # a small interruption to guest CPU execution. This will have a negative | |
499 | # impact on realtime guests and other latency sensitive guest workloads. | |
500 | # It is recommended to use @query-cpus-fast instead of this command to | |
501 | # avoid the vCPU interruption. | |
502 | # | |
503 | # Returns: a list of @CpuInfo for each virtual CPU | |
504 | # | |
505 | # Since: 0.14.0 | |
506 | # | |
507 | # Example: | |
508 | # | |
509 | # -> { "execute": "query-cpus" } | |
510 | # <- { "return": [ | |
511 | # { | |
512 | # "CPU":0, | |
513 | # "current":true, | |
514 | # "halted":false, | |
515 | # "qom_path":"/machine/unattached/device[0]", | |
516 | # "arch":"x86", | |
517 | # "pc":3227107138, | |
518 | # "thread_id":3134 | |
519 | # }, | |
520 | # { | |
521 | # "CPU":1, | |
522 | # "current":false, | |
523 | # "halted":true, | |
524 | # "qom_path":"/machine/unattached/device[2]", | |
525 | # "arch":"x86", | |
526 | # "pc":7108165, | |
527 | # "thread_id":3135 | |
528 | # } | |
529 | # ] | |
530 | # } | |
531 | # | |
532 | # Notes: This interface is deprecated (since 2.12.0), and it is strongly | |
533 | # recommended that you avoid using it. Use @query-cpus-fast to | |
534 | # obtain information about virtual CPUs. | |
535 | # | |
536 | ## | |
537 | { 'command': 'query-cpus', 'returns': ['CpuInfo'] } | |
538 | ||
539 | ## | |
540 | # @CpuInfoFast: | |
541 | # | |
542 | # Information about a virtual CPU | |
543 | # | |
544 | # @cpu-index: index of the virtual CPU | |
545 | # | |
546 | # @qom-path: path to the CPU object in the QOM tree | |
547 | # | |
548 | # @thread-id: ID of the underlying host thread | |
549 | # | |
550 | # @props: properties describing to which node/socket/core/thread | |
551 | # virtual CPU belongs to, provided if supported by board | |
552 | # | |
51f63ec7 | 553 | # @arch: base architecture of the cpu; deprecated since 3.0.0 in favor |
6ffa3ab4 | 554 | # of @target |
daa9d2bc | 555 | # |
6ffa3ab4 | 556 | # @target: the QEMU system emulation target, which determines which |
51f63ec7 | 557 | # additional fields will be listed (since 3.0) |
112ed241 MA |
558 | # |
559 | # Since: 2.12 | |
560 | # | |
561 | ## | |
daa9d2bc LE |
562 | { 'union' : 'CpuInfoFast', |
563 | 'base' : { 'cpu-index' : 'int', | |
564 | 'qom-path' : 'str', | |
565 | 'thread-id' : 'int', | |
566 | '*props' : 'CpuInstanceProperties', | |
567 | 'arch' : 'CpuInfoArch', | |
568 | 'target' : 'SysEmuTarget' }, | |
569 | 'discriminator' : 'target', | |
29cd0403 | 570 | 'data' : { 's390x' : 'CpuInfoS390' } } |
112ed241 MA |
571 | |
572 | ## | |
573 | # @query-cpus-fast: | |
574 | # | |
575 | # Returns information about all virtual CPUs. This command does not | |
576 | # incur a performance penalty and should be used in production | |
577 | # instead of query-cpus. | |
578 | # | |
579 | # Returns: list of @CpuInfoFast | |
580 | # | |
581 | # Since: 2.12 | |
582 | # | |
583 | # Example: | |
584 | # | |
585 | # -> { "execute": "query-cpus-fast" } | |
586 | # <- { "return": [ | |
587 | # { | |
588 | # "thread-id": 25627, | |
589 | # "props": { | |
590 | # "core-id": 0, | |
591 | # "thread-id": 0, | |
592 | # "socket-id": 0 | |
593 | # }, | |
594 | # "qom-path": "/machine/unattached/device[0]", | |
595 | # "arch":"x86", | |
daa9d2bc | 596 | # "target":"x86_64", |
112ed241 MA |
597 | # "cpu-index": 0 |
598 | # }, | |
599 | # { | |
600 | # "thread-id": 25628, | |
601 | # "props": { | |
602 | # "core-id": 0, | |
603 | # "thread-id": 0, | |
604 | # "socket-id": 1 | |
605 | # }, | |
606 | # "qom-path": "/machine/unattached/device[2]", | |
607 | # "arch":"x86", | |
daa9d2bc | 608 | # "target":"x86_64", |
112ed241 MA |
609 | # "cpu-index": 1 |
610 | # } | |
611 | # ] | |
612 | # } | |
613 | ## | |
614 | { 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] } | |
615 | ||
616 | ## | |
617 | # @IOThreadInfo: | |
618 | # | |
619 | # Information about an iothread | |
620 | # | |
621 | # @id: the identifier of the iothread | |
622 | # | |
623 | # @thread-id: ID of the underlying host thread | |
624 | # | |
625 | # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled | |
626 | # (since 2.9) | |
627 | # | |
628 | # @poll-grow: how many ns will be added to polling time, 0 means that it's not | |
629 | # configured (since 2.9) | |
630 | # | |
631 | # @poll-shrink: how many ns will be removed from polling time, 0 means that | |
632 | # it's not configured (since 2.9) | |
633 | # | |
634 | # Since: 2.0 | |
635 | ## | |
636 | { 'struct': 'IOThreadInfo', | |
637 | 'data': {'id': 'str', | |
638 | 'thread-id': 'int', | |
639 | 'poll-max-ns': 'int', | |
640 | 'poll-grow': 'int', | |
641 | 'poll-shrink': 'int' } } | |
642 | ||
643 | ## | |
644 | # @query-iothreads: | |
645 | # | |
646 | # Returns a list of information about each iothread. | |
647 | # | |
648 | # Note: this list excludes the QEMU main loop thread, which is not declared | |
649 | # using the -object iothread command-line option. It is always the main thread | |
650 | # of the process. | |
651 | # | |
652 | # Returns: a list of @IOThreadInfo for each iothread | |
653 | # | |
654 | # Since: 2.0 | |
655 | # | |
656 | # Example: | |
657 | # | |
658 | # -> { "execute": "query-iothreads" } | |
659 | # <- { "return": [ | |
660 | # { | |
661 | # "id":"iothread0", | |
662 | # "thread-id":3134 | |
663 | # }, | |
664 | # { | |
665 | # "id":"iothread1", | |
666 | # "thread-id":3135 | |
667 | # } | |
668 | # ] | |
669 | # } | |
670 | # | |
671 | ## | |
a87706c8 IM |
672 | { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'], |
673 | 'allow-preconfig': true } | |
112ed241 MA |
674 | |
675 | ## | |
676 | # @BalloonInfo: | |
677 | # | |
678 | # Information about the guest balloon device. | |
679 | # | |
680 | # @actual: the number of bytes the balloon currently contains | |
681 | # | |
682 | # Since: 0.14.0 | |
683 | # | |
684 | ## | |
685 | { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } } | |
686 | ||
687 | ## | |
688 | # @query-balloon: | |
689 | # | |
690 | # Return information about the balloon device. | |
691 | # | |
692 | # Returns: @BalloonInfo on success | |
693 | # | |
694 | # If the balloon driver is enabled but not functional because the KVM | |
695 | # kernel module cannot support it, KvmMissingCap | |
696 | # | |
697 | # If no balloon device is present, DeviceNotActive | |
698 | # | |
699 | # Since: 0.14.0 | |
700 | # | |
701 | # Example: | |
702 | # | |
703 | # -> { "execute": "query-balloon" } | |
704 | # <- { "return": { | |
705 | # "actual": 1073741824, | |
706 | # } | |
707 | # } | |
708 | # | |
709 | ## | |
710 | { 'command': 'query-balloon', 'returns': 'BalloonInfo' } | |
711 | ||
712 | ## | |
713 | # @BALLOON_CHANGE: | |
714 | # | |
715 | # Emitted when the guest changes the actual BALLOON level. This value is | |
716 | # equivalent to the @actual field return by the 'query-balloon' command | |
717 | # | |
718 | # @actual: actual level of the guest memory balloon in bytes | |
719 | # | |
720 | # Note: this event is rate-limited. | |
721 | # | |
722 | # Since: 1.2 | |
723 | # | |
724 | # Example: | |
725 | # | |
726 | # <- { "event": "BALLOON_CHANGE", | |
727 | # "data": { "actual": 944766976 }, | |
728 | # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } } | |
729 | # | |
730 | ## | |
731 | { 'event': 'BALLOON_CHANGE', | |
732 | 'data': { 'actual': 'int' } } | |
733 | ||
734 | ## | |
735 | # @PciMemoryRange: | |
736 | # | |
737 | # A PCI device memory region | |
738 | # | |
739 | # @base: the starting address (guest physical) | |
740 | # | |
741 | # @limit: the ending address (guest physical) | |
742 | # | |
743 | # Since: 0.14.0 | |
744 | ## | |
745 | { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} } | |
746 | ||
747 | ## | |
748 | # @PciMemoryRegion: | |
749 | # | |
750 | # Information about a PCI device I/O region. | |
751 | # | |
752 | # @bar: the index of the Base Address Register for this region | |
753 | # | |
754 | # @type: 'io' if the region is a PIO region | |
755 | # 'memory' if the region is a MMIO region | |
756 | # | |
757 | # @size: memory size | |
758 | # | |
759 | # @prefetch: if @type is 'memory', true if the memory is prefetchable | |
760 | # | |
761 | # @mem_type_64: if @type is 'memory', true if the BAR is 64-bit | |
762 | # | |
763 | # Since: 0.14.0 | |
764 | ## | |
765 | { 'struct': 'PciMemoryRegion', | |
766 | 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int', | |
767 | '*prefetch': 'bool', '*mem_type_64': 'bool' } } | |
768 | ||
769 | ## | |
770 | # @PciBusInfo: | |
771 | # | |
772 | # Information about a bus of a PCI Bridge device | |
773 | # | |
774 | # @number: primary bus interface number. This should be the number of the | |
775 | # bus the device resides on. | |
776 | # | |
777 | # @secondary: secondary bus interface number. This is the number of the | |
778 | # main bus for the bridge | |
779 | # | |
780 | # @subordinate: This is the highest number bus that resides below the | |
781 | # bridge. | |
782 | # | |
783 | # @io_range: The PIO range for all devices on this bridge | |
784 | # | |
785 | # @memory_range: The MMIO range for all devices on this bridge | |
786 | # | |
787 | # @prefetchable_range: The range of prefetchable MMIO for all devices on | |
788 | # this bridge | |
789 | # | |
790 | # Since: 2.4 | |
791 | ## | |
792 | { 'struct': 'PciBusInfo', | |
793 | 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int', | |
794 | 'io_range': 'PciMemoryRange', | |
795 | 'memory_range': 'PciMemoryRange', | |
796 | 'prefetchable_range': 'PciMemoryRange' } } | |
797 | ||
798 | ## | |
799 | # @PciBridgeInfo: | |
800 | # | |
801 | # Information about a PCI Bridge device | |
802 | # | |
803 | # @bus: information about the bus the device resides on | |
804 | # | |
805 | # @devices: a list of @PciDeviceInfo for each device on this bridge | |
806 | # | |
807 | # Since: 0.14.0 | |
808 | ## | |
809 | { 'struct': 'PciBridgeInfo', | |
810 | 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} } | |
811 | ||
812 | ## | |
813 | # @PciDeviceClass: | |
814 | # | |
815 | # Information about the Class of a PCI device | |
816 | # | |
817 | # @desc: a string description of the device's class | |
818 | # | |
819 | # @class: the class code of the device | |
820 | # | |
821 | # Since: 2.4 | |
822 | ## | |
823 | { 'struct': 'PciDeviceClass', | |
824 | 'data': {'*desc': 'str', 'class': 'int'} } | |
825 | ||
826 | ## | |
827 | # @PciDeviceId: | |
828 | # | |
829 | # Information about the Id of a PCI device | |
830 | # | |
831 | # @device: the PCI device id | |
832 | # | |
833 | # @vendor: the PCI vendor id | |
834 | # | |
835 | # Since: 2.4 | |
836 | ## | |
837 | { 'struct': 'PciDeviceId', | |
838 | 'data': {'device': 'int', 'vendor': 'int'} } | |
839 | ||
840 | ## | |
841 | # @PciDeviceInfo: | |
842 | # | |
843 | # Information about a PCI device | |
844 | # | |
845 | # @bus: the bus number of the device | |
846 | # | |
847 | # @slot: the slot the device is located in | |
848 | # | |
849 | # @function: the function of the slot used by the device | |
850 | # | |
851 | # @class_info: the class of the device | |
852 | # | |
853 | # @id: the PCI device id | |
854 | # | |
855 | # @irq: if an IRQ is assigned to the device, the IRQ number | |
856 | # | |
857 | # @qdev_id: the device name of the PCI device | |
858 | # | |
859 | # @pci_bridge: if the device is a PCI bridge, the bridge information | |
860 | # | |
861 | # @regions: a list of the PCI I/O regions associated with the device | |
862 | # | |
863 | # Notes: the contents of @class_info.desc are not stable and should only be | |
864 | # treated as informational. | |
865 | # | |
866 | # Since: 0.14.0 | |
867 | ## | |
868 | { 'struct': 'PciDeviceInfo', | |
869 | 'data': {'bus': 'int', 'slot': 'int', 'function': 'int', | |
870 | 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId', | |
871 | '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo', | |
872 | 'regions': ['PciMemoryRegion']} } | |
873 | ||
874 | ## | |
875 | # @PciInfo: | |
876 | # | |
877 | # Information about a PCI bus | |
878 | # | |
879 | # @bus: the bus index | |
880 | # | |
881 | # @devices: a list of devices on this bus | |
882 | # | |
883 | # Since: 0.14.0 | |
884 | ## | |
885 | { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} } | |
886 | ||
887 | ## | |
888 | # @query-pci: | |
889 | # | |
890 | # Return information about the PCI bus topology of the guest. | |
891 | # | |
892 | # Returns: a list of @PciInfo for each PCI bus. Each bus is | |
893 | # represented by a json-object, which has a key with a json-array of | |
894 | # all PCI devices attached to it. Each device is represented by a | |
895 | # json-object. | |
896 | # | |
897 | # Since: 0.14.0 | |
898 | # | |
899 | # Example: | |
900 | # | |
901 | # -> { "execute": "query-pci" } | |
902 | # <- { "return": [ | |
903 | # { | |
904 | # "bus": 0, | |
905 | # "devices": [ | |
906 | # { | |
907 | # "bus": 0, | |
908 | # "qdev_id": "", | |
909 | # "slot": 0, | |
910 | # "class_info": { | |
911 | # "class": 1536, | |
912 | # "desc": "Host bridge" | |
913 | # }, | |
914 | # "id": { | |
915 | # "device": 32902, | |
916 | # "vendor": 4663 | |
917 | # }, | |
918 | # "function": 0, | |
919 | # "regions": [ | |
920 | # ] | |
921 | # }, | |
922 | # { | |
923 | # "bus": 0, | |
924 | # "qdev_id": "", | |
925 | # "slot": 1, | |
926 | # "class_info": { | |
927 | # "class": 1537, | |
928 | # "desc": "ISA bridge" | |
929 | # }, | |
930 | # "id": { | |
931 | # "device": 32902, | |
932 | # "vendor": 28672 | |
933 | # }, | |
934 | # "function": 0, | |
935 | # "regions": [ | |
936 | # ] | |
937 | # }, | |
938 | # { | |
939 | # "bus": 0, | |
940 | # "qdev_id": "", | |
941 | # "slot": 1, | |
942 | # "class_info": { | |
943 | # "class": 257, | |
944 | # "desc": "IDE controller" | |
945 | # }, | |
946 | # "id": { | |
947 | # "device": 32902, | |
948 | # "vendor": 28688 | |
949 | # }, | |
950 | # "function": 1, | |
951 | # "regions": [ | |
952 | # { | |
953 | # "bar": 4, | |
954 | # "size": 16, | |
955 | # "address": 49152, | |
956 | # "type": "io" | |
957 | # } | |
958 | # ] | |
959 | # }, | |
960 | # { | |
961 | # "bus": 0, | |
962 | # "qdev_id": "", | |
963 | # "slot": 2, | |
964 | # "class_info": { | |
965 | # "class": 768, | |
966 | # "desc": "VGA controller" | |
967 | # }, | |
968 | # "id": { | |
969 | # "device": 4115, | |
970 | # "vendor": 184 | |
971 | # }, | |
972 | # "function": 0, | |
973 | # "regions": [ | |
974 | # { | |
975 | # "prefetch": true, | |
976 | # "mem_type_64": false, | |
977 | # "bar": 0, | |
978 | # "size": 33554432, | |
979 | # "address": 4026531840, | |
980 | # "type": "memory" | |
981 | # }, | |
982 | # { | |
983 | # "prefetch": false, | |
984 | # "mem_type_64": false, | |
985 | # "bar": 1, | |
986 | # "size": 4096, | |
987 | # "address": 4060086272, | |
988 | # "type": "memory" | |
989 | # }, | |
990 | # { | |
991 | # "prefetch": false, | |
992 | # "mem_type_64": false, | |
993 | # "bar": 6, | |
994 | # "size": 65536, | |
995 | # "address": -1, | |
996 | # "type": "memory" | |
997 | # } | |
998 | # ] | |
999 | # }, | |
1000 | # { | |
1001 | # "bus": 0, | |
1002 | # "qdev_id": "", | |
1003 | # "irq": 11, | |
1004 | # "slot": 4, | |
1005 | # "class_info": { | |
1006 | # "class": 1280, | |
1007 | # "desc": "RAM controller" | |
1008 | # }, | |
1009 | # "id": { | |
1010 | # "device": 6900, | |
1011 | # "vendor": 4098 | |
1012 | # }, | |
1013 | # "function": 0, | |
1014 | # "regions": [ | |
1015 | # { | |
1016 | # "bar": 0, | |
1017 | # "size": 32, | |
1018 | # "address": 49280, | |
1019 | # "type": "io" | |
1020 | # } | |
1021 | # ] | |
1022 | # } | |
1023 | # ] | |
1024 | # } | |
1025 | # ] | |
1026 | # } | |
1027 | # | |
1028 | # Note: This example has been shortened as the real response is too long. | |
1029 | # | |
1030 | ## | |
1031 | { 'command': 'query-pci', 'returns': ['PciInfo'] } | |
1032 | ||
1033 | ## | |
1034 | # @quit: | |
1035 | # | |
1036 | # This command will cause the QEMU process to exit gracefully. While every | |
1037 | # attempt is made to send the QMP response before terminating, this is not | |
1038 | # guaranteed. When using this interface, a premature EOF would not be | |
1039 | # unexpected. | |
1040 | # | |
1041 | # Since: 0.14.0 | |
1042 | # | |
1043 | # Example: | |
1044 | # | |
1045 | # -> { "execute": "quit" } | |
1046 | # <- { "return": {} } | |
1047 | ## | |
1048 | { 'command': 'quit' } | |
1049 | ||
1050 | ## | |
1051 | # @stop: | |
1052 | # | |
1053 | # Stop all guest VCPU execution. | |
1054 | # | |
1055 | # Since: 0.14.0 | |
1056 | # | |
1057 | # Notes: This function will succeed even if the guest is already in the stopped | |
1058 | # state. In "inmigrate" state, it will ensure that the guest | |
1059 | # remains paused once migration finishes, as if the -S option was | |
1060 | # passed on the command line. | |
1061 | # | |
1062 | # Example: | |
1063 | # | |
1064 | # -> { "execute": "stop" } | |
1065 | # <- { "return": {} } | |
1066 | # | |
1067 | ## | |
1068 | { 'command': 'stop' } | |
1069 | ||
1070 | ## | |
1071 | # @system_reset: | |
1072 | # | |
1073 | # Performs a hard reset of a guest. | |
1074 | # | |
1075 | # Since: 0.14.0 | |
1076 | # | |
1077 | # Example: | |
1078 | # | |
1079 | # -> { "execute": "system_reset" } | |
1080 | # <- { "return": {} } | |
1081 | # | |
1082 | ## | |
1083 | { 'command': 'system_reset' } | |
1084 | ||
1085 | ## | |
1086 | # @system_powerdown: | |
1087 | # | |
1088 | # Requests that a guest perform a powerdown operation. | |
1089 | # | |
1090 | # Since: 0.14.0 | |
1091 | # | |
1092 | # Notes: A guest may or may not respond to this command. This command | |
1093 | # returning does not indicate that a guest has accepted the request or | |
1094 | # that it has shut down. Many guests will respond to this command by | |
1095 | # prompting the user in some way. | |
1096 | # Example: | |
1097 | # | |
1098 | # -> { "execute": "system_powerdown" } | |
1099 | # <- { "return": {} } | |
1100 | # | |
1101 | ## | |
1102 | { 'command': 'system_powerdown' } | |
1103 | ||
1104 | ## | |
1105 | # @cpu-add: | |
1106 | # | |
1107 | # Adds CPU with specified ID | |
1108 | # | |
1109 | # @id: ID of CPU to be created, valid values [0..max_cpus) | |
1110 | # | |
1111 | # Returns: Nothing on success | |
1112 | # | |
1113 | # Since: 1.5 | |
1114 | # | |
1115 | # Example: | |
1116 | # | |
1117 | # -> { "execute": "cpu-add", "arguments": { "id": 2 } } | |
1118 | # <- { "return": {} } | |
1119 | # | |
1120 | ## | |
1121 | { 'command': 'cpu-add', 'data': {'id': 'int'} } | |
1122 | ||
1123 | ## | |
1124 | # @memsave: | |
1125 | # | |
1126 | # Save a portion of guest memory to a file. | |
1127 | # | |
1128 | # @val: the virtual address of the guest to start from | |
1129 | # | |
1130 | # @size: the size of memory region to save | |
1131 | # | |
1132 | # @filename: the file to save the memory to as binary data | |
1133 | # | |
1134 | # @cpu-index: the index of the virtual CPU to use for translating the | |
1135 | # virtual address (defaults to CPU 0) | |
1136 | # | |
1137 | # Returns: Nothing on success | |
1138 | # | |
1139 | # Since: 0.14.0 | |
1140 | # | |
1141 | # Notes: Errors were not reliably returned until 1.1 | |
1142 | # | |
1143 | # Example: | |
1144 | # | |
1145 | # -> { "execute": "memsave", | |
1146 | # "arguments": { "val": 10, | |
1147 | # "size": 100, | |
1148 | # "filename": "/tmp/virtual-mem-dump" } } | |
1149 | # <- { "return": {} } | |
1150 | # | |
1151 | ## | |
1152 | { 'command': 'memsave', | |
1153 | 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} } | |
1154 | ||
1155 | ## | |
1156 | # @pmemsave: | |
1157 | # | |
1158 | # Save a portion of guest physical memory to a file. | |
1159 | # | |
1160 | # @val: the physical address of the guest to start from | |
1161 | # | |
1162 | # @size: the size of memory region to save | |
1163 | # | |
1164 | # @filename: the file to save the memory to as binary data | |
1165 | # | |
1166 | # Returns: Nothing on success | |
1167 | # | |
1168 | # Since: 0.14.0 | |
1169 | # | |
1170 | # Notes: Errors were not reliably returned until 1.1 | |
1171 | # | |
1172 | # Example: | |
1173 | # | |
1174 | # -> { "execute": "pmemsave", | |
1175 | # "arguments": { "val": 10, | |
1176 | # "size": 100, | |
1177 | # "filename": "/tmp/physical-mem-dump" } } | |
1178 | # <- { "return": {} } | |
1179 | # | |
1180 | ## | |
1181 | { 'command': 'pmemsave', | |
1182 | 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} } | |
1183 | ||
1184 | ## | |
1185 | # @cont: | |
1186 | # | |
1187 | # Resume guest VCPU execution. | |
1188 | # | |
1189 | # Since: 0.14.0 | |
1190 | # | |
1191 | # Returns: If successful, nothing | |
1192 | # | |
1193 | # Notes: This command will succeed if the guest is currently running. It | |
1194 | # will also succeed if the guest is in the "inmigrate" state; in | |
1195 | # this case, the effect of the command is to make sure the guest | |
1196 | # starts once migration finishes, removing the effect of the -S | |
1197 | # command line option if it was passed. | |
1198 | # | |
1199 | # Example: | |
1200 | # | |
1201 | # -> { "execute": "cont" } | |
1202 | # <- { "return": {} } | |
1203 | # | |
1204 | ## | |
1205 | { 'command': 'cont' } | |
1206 | ||
047f7038 | 1207 | ## |
361ac948 | 1208 | # @x-exit-preconfig: |
047f7038 IM |
1209 | # |
1210 | # Exit from "preconfig" state | |
1211 | # | |
1212 | # This command makes QEMU exit the preconfig state and proceed with | |
1213 | # VM initialization using configuration data provided on the command line | |
1214 | # and via the QMP monitor during the preconfig state. The command is only | |
1215 | # available during the preconfig state (i.e. when the --preconfig command | |
1216 | # line option was in use). | |
1217 | # | |
1218 | # Since 3.0 | |
1219 | # | |
1220 | # Returns: nothing | |
1221 | # | |
1222 | # Example: | |
1223 | # | |
361ac948 | 1224 | # -> { "execute": "x-exit-preconfig" } |
047f7038 IM |
1225 | # <- { "return": {} } |
1226 | # | |
1227 | ## | |
361ac948 | 1228 | { 'command': 'x-exit-preconfig', 'allow-preconfig': true } |
047f7038 | 1229 | |
112ed241 MA |
1230 | ## |
1231 | # @system_wakeup: | |
1232 | # | |
1233 | # Wakeup guest from suspend. Does nothing in case the guest isn't suspended. | |
1234 | # | |
1235 | # Since: 1.1 | |
1236 | # | |
1237 | # Returns: nothing. | |
1238 | # | |
1239 | # Example: | |
1240 | # | |
1241 | # -> { "execute": "system_wakeup" } | |
1242 | # <- { "return": {} } | |
1243 | # | |
1244 | ## | |
1245 | { 'command': 'system_wakeup' } | |
1246 | ||
1247 | ## | |
1248 | # @inject-nmi: | |
1249 | # | |
1250 | # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64). | |
1251 | # The command fails when the guest doesn't support injecting. | |
1252 | # | |
1253 | # Returns: If successful, nothing | |
1254 | # | |
1255 | # Since: 0.14.0 | |
1256 | # | |
1257 | # Note: prior to 2.1, this command was only supported for x86 and s390 VMs | |
1258 | # | |
1259 | # Example: | |
1260 | # | |
1261 | # -> { "execute": "inject-nmi" } | |
1262 | # <- { "return": {} } | |
1263 | # | |
1264 | ## | |
1265 | { 'command': 'inject-nmi' } | |
1266 | ||
1267 | ## | |
1268 | # @balloon: | |
1269 | # | |
1270 | # Request the balloon driver to change its balloon size. | |
1271 | # | |
1272 | # @value: the target size of the balloon in bytes | |
1273 | # | |
1274 | # Returns: Nothing on success | |
1275 | # If the balloon driver is enabled but not functional because the KVM | |
1276 | # kernel module cannot support it, KvmMissingCap | |
1277 | # If no balloon device is present, DeviceNotActive | |
1278 | # | |
1279 | # Notes: This command just issues a request to the guest. When it returns, | |
1280 | # the balloon size may not have changed. A guest can change the balloon | |
1281 | # size independent of this command. | |
1282 | # | |
1283 | # Since: 0.14.0 | |
1284 | # | |
1285 | # Example: | |
1286 | # | |
1287 | # -> { "execute": "balloon", "arguments": { "value": 536870912 } } | |
1288 | # <- { "return": {} } | |
1289 | # | |
1290 | ## | |
1291 | { 'command': 'balloon', 'data': {'value': 'int'} } | |
1292 | ||
1293 | ## | |
1294 | # @human-monitor-command: | |
1295 | # | |
1296 | # Execute a command on the human monitor and return the output. | |
1297 | # | |
1298 | # @command-line: the command to execute in the human monitor | |
1299 | # | |
1300 | # @cpu-index: The CPU to use for commands that require an implicit CPU | |
1301 | # | |
1302 | # Returns: the output of the command as a string | |
1303 | # | |
1304 | # Since: 0.14.0 | |
1305 | # | |
1306 | # Notes: This command only exists as a stop-gap. Its use is highly | |
1307 | # discouraged. The semantics of this command are not | |
1308 | # guaranteed: this means that command names, arguments and | |
1309 | # responses can change or be removed at ANY time. Applications | |
1310 | # that rely on long term stability guarantees should NOT | |
1311 | # use this command. | |
1312 | # | |
1313 | # Known limitations: | |
1314 | # | |
1315 | # * This command is stateless, this means that commands that depend | |
1316 | # on state information (such as getfd) might not work | |
1317 | # | |
1318 | # * Commands that prompt the user for data don't currently work | |
1319 | # | |
1320 | # Example: | |
1321 | # | |
1322 | # -> { "execute": "human-monitor-command", | |
1323 | # "arguments": { "command-line": "info kvm" } } | |
1324 | # <- { "return": "kvm support: enabled\r\n" } | |
1325 | # | |
1326 | ## | |
1327 | { 'command': 'human-monitor-command', | |
1328 | 'data': {'command-line': 'str', '*cpu-index': 'int'}, | |
1329 | 'returns': 'str' } | |
1330 | ||
1331 | ## | |
1332 | # @ObjectPropertyInfo: | |
1333 | # | |
1334 | # @name: the name of the property | |
1335 | # | |
1336 | # @type: the type of the property. This will typically come in one of four | |
1337 | # forms: | |
1338 | # | |
1339 | # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'. | |
1340 | # These types are mapped to the appropriate JSON type. | |
1341 | # | |
1342 | # 2) A child type in the form 'child<subtype>' where subtype is a qdev | |
1343 | # device type name. Child properties create the composition tree. | |
1344 | # | |
1345 | # 3) A link type in the form 'link<subtype>' where subtype is a qdev | |
1346 | # device type name. Link properties form the device model graph. | |
1347 | # | |
35f63767 AK |
1348 | # @description: if specified, the description of the property. |
1349 | # | |
112ed241 MA |
1350 | # Since: 1.2 |
1351 | ## | |
1352 | { 'struct': 'ObjectPropertyInfo', | |
35f63767 | 1353 | 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } } |
112ed241 MA |
1354 | |
1355 | ## | |
1356 | # @qom-list: | |
1357 | # | |
1358 | # This command will list any properties of a object given a path in the object | |
1359 | # model. | |
1360 | # | |
1361 | # @path: the path within the object model. See @qom-get for a description of | |
1362 | # this parameter. | |
1363 | # | |
1364 | # Returns: a list of @ObjectPropertyInfo that describe the properties of the | |
1365 | # object. | |
1366 | # | |
1367 | # Since: 1.2 | |
1368 | ## | |
1369 | { 'command': 'qom-list', | |
1370 | 'data': { 'path': 'str' }, | |
a87706c8 IM |
1371 | 'returns': [ 'ObjectPropertyInfo' ], |
1372 | 'allow-preconfig': true } | |
112ed241 MA |
1373 | |
1374 | ## | |
1375 | # @qom-get: | |
1376 | # | |
1377 | # This command will get a property from a object model path and return the | |
1378 | # value. | |
1379 | # | |
1380 | # @path: The path within the object model. There are two forms of supported | |
1381 | # paths--absolute and partial paths. | |
1382 | # | |
1383 | # Absolute paths are derived from the root object and can follow child<> | |
1384 | # or link<> properties. Since they can follow link<> properties, they | |
1385 | # can be arbitrarily long. Absolute paths look like absolute filenames | |
1386 | # and are prefixed with a leading slash. | |
1387 | # | |
1388 | # Partial paths look like relative filenames. They do not begin | |
1389 | # with a prefix. The matching rules for partial paths are subtle but | |
1390 | # designed to make specifying objects easy. At each level of the | |
1391 | # composition tree, the partial path is matched as an absolute path. | |
1392 | # The first match is not returned. At least two matches are searched | |
1393 | # for. A successful result is only returned if only one match is | |
1394 | # found. If more than one match is found, a flag is return to | |
1395 | # indicate that the match was ambiguous. | |
1396 | # | |
1397 | # @property: The property name to read | |
1398 | # | |
1399 | # Returns: The property value. The type depends on the property | |
1400 | # type. child<> and link<> properties are returned as #str | |
1401 | # pathnames. All integer property types (u8, u16, etc) are | |
1402 | # returned as #int. | |
1403 | # | |
1404 | # Since: 1.2 | |
1405 | ## | |
1406 | { 'command': 'qom-get', | |
1407 | 'data': { 'path': 'str', 'property': 'str' }, | |
a87706c8 IM |
1408 | 'returns': 'any', |
1409 | 'allow-preconfig': true } | |
112ed241 MA |
1410 | |
1411 | ## | |
1412 | # @qom-set: | |
1413 | # | |
1414 | # This command will set a property from a object model path. | |
1415 | # | |
1416 | # @path: see @qom-get for a description of this parameter | |
1417 | # | |
1418 | # @property: the property name to set | |
1419 | # | |
1420 | # @value: a value who's type is appropriate for the property type. See @qom-get | |
1421 | # for a description of type mapping. | |
1422 | # | |
1423 | # Since: 1.2 | |
1424 | ## | |
1425 | { 'command': 'qom-set', | |
a87706c8 IM |
1426 | 'data': { 'path': 'str', 'property': 'str', 'value': 'any' }, |
1427 | 'allow-preconfig': true } | |
112ed241 MA |
1428 | |
1429 | ## | |
1430 | # @change: | |
1431 | # | |
1432 | # This command is multiple commands multiplexed together. | |
1433 | # | |
1434 | # @device: This is normally the name of a block device but it may also be 'vnc'. | |
1435 | # when it's 'vnc', then sub command depends on @target | |
1436 | # | |
1437 | # @target: If @device is a block device, then this is the new filename. | |
1438 | # If @device is 'vnc', then if the value 'password' selects the vnc | |
1439 | # change password command. Otherwise, this specifies a new server URI | |
1440 | # address to listen to for VNC connections. | |
1441 | # | |
1442 | # @arg: If @device is a block device, then this is an optional format to open | |
1443 | # the device with. | |
1444 | # If @device is 'vnc' and @target is 'password', this is the new VNC | |
1445 | # password to set. See change-vnc-password for additional notes. | |
1446 | # | |
1447 | # Returns: Nothing on success. | |
1448 | # If @device is not a valid block device, DeviceNotFound | |
1449 | # | |
1450 | # Notes: This interface is deprecated, and it is strongly recommended that you | |
1451 | # avoid using it. For changing block devices, use | |
1452 | # blockdev-change-medium; for changing VNC parameters, use | |
1453 | # change-vnc-password. | |
1454 | # | |
1455 | # Since: 0.14.0 | |
1456 | # | |
1457 | # Example: | |
1458 | # | |
1459 | # 1. Change a removable medium | |
1460 | # | |
1461 | # -> { "execute": "change", | |
1462 | # "arguments": { "device": "ide1-cd0", | |
1463 | # "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } } | |
1464 | # <- { "return": {} } | |
1465 | # | |
1466 | # 2. Change VNC password | |
1467 | # | |
1468 | # -> { "execute": "change", | |
1469 | # "arguments": { "device": "vnc", "target": "password", | |
1470 | # "arg": "foobar1" } } | |
1471 | # <- { "return": {} } | |
1472 | # | |
1473 | ## | |
1474 | { 'command': 'change', | |
1475 | 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} } | |
1476 | ||
1477 | ## | |
1478 | # @ObjectTypeInfo: | |
1479 | # | |
1480 | # This structure describes a search result from @qom-list-types | |
1481 | # | |
1482 | # @name: the type name found in the search | |
1483 | # | |
1484 | # @abstract: the type is abstract and can't be directly instantiated. | |
1485 | # Omitted if false. (since 2.10) | |
1486 | # | |
1487 | # @parent: Name of parent type, if any (since 2.10) | |
1488 | # | |
1489 | # Since: 1.1 | |
1490 | ## | |
1491 | { 'struct': 'ObjectTypeInfo', | |
1492 | 'data': { 'name': 'str', '*abstract': 'bool', '*parent': 'str' } } | |
1493 | ||
1494 | ## | |
1495 | # @qom-list-types: | |
1496 | # | |
1497 | # This command will return a list of types given search parameters | |
1498 | # | |
1499 | # @implements: if specified, only return types that implement this type name | |
1500 | # | |
1501 | # @abstract: if true, include abstract types in the results | |
1502 | # | |
1503 | # Returns: a list of @ObjectTypeInfo or an empty list if no results are found | |
1504 | # | |
1505 | # Since: 1.1 | |
1506 | ## | |
1507 | { 'command': 'qom-list-types', | |
1508 | 'data': { '*implements': 'str', '*abstract': 'bool' }, | |
a87706c8 IM |
1509 | 'returns': [ 'ObjectTypeInfo' ], |
1510 | 'allow-preconfig': true } | |
112ed241 | 1511 | |
112ed241 MA |
1512 | ## |
1513 | # @device-list-properties: | |
1514 | # | |
1515 | # List properties associated with a device. | |
1516 | # | |
1517 | # @typename: the type name of a device | |
1518 | # | |
35f63767 | 1519 | # Returns: a list of ObjectPropertyInfo describing a devices properties |
112ed241 | 1520 | # |
24ed1172 AK |
1521 | # Note: objects can create properties at runtime, for example to describe |
1522 | # links between different devices and/or objects. These properties | |
1523 | # are not included in the output of this command. | |
1524 | # | |
112ed241 MA |
1525 | # Since: 1.2 |
1526 | ## | |
1527 | { 'command': 'device-list-properties', | |
1528 | 'data': { 'typename': 'str'}, | |
35f63767 | 1529 | 'returns': [ 'ObjectPropertyInfo' ] } |
112ed241 | 1530 | |
961c47bb AK |
1531 | ## |
1532 | # @qom-list-properties: | |
1533 | # | |
1534 | # List properties associated with a QOM object. | |
1535 | # | |
1536 | # @typename: the type name of an object | |
1537 | # | |
24ed1172 AK |
1538 | # Note: objects can create properties at runtime, for example to describe |
1539 | # links between different devices and/or objects. These properties | |
1540 | # are not included in the output of this command. | |
1541 | # | |
961c47bb AK |
1542 | # Returns: a list of ObjectPropertyInfo describing object properties |
1543 | # | |
1544 | # Since: 2.12 | |
1545 | ## | |
1546 | { 'command': 'qom-list-properties', | |
1547 | 'data': { 'typename': 'str'}, | |
a87706c8 IM |
1548 | 'returns': [ 'ObjectPropertyInfo' ], |
1549 | 'allow-preconfig': true } | |
961c47bb | 1550 | |
112ed241 MA |
1551 | ## |
1552 | # @xen-set-global-dirty-log: | |
1553 | # | |
1554 | # Enable or disable the global dirty log mode. | |
1555 | # | |
1556 | # @enable: true to enable, false to disable. | |
1557 | # | |
1558 | # Returns: nothing | |
1559 | # | |
1560 | # Since: 1.3 | |
1561 | # | |
1562 | # Example: | |
1563 | # | |
1564 | # -> { "execute": "xen-set-global-dirty-log", | |
1565 | # "arguments": { "enable": true } } | |
1566 | # <- { "return": {} } | |
1567 | # | |
1568 | ## | |
1569 | { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } } | |
1570 | ||
1571 | ## | |
1572 | # @device_add: | |
1573 | # | |
1574 | # @driver: the name of the new device's driver | |
1575 | # | |
1576 | # @bus: the device's parent bus (device tree path) | |
1577 | # | |
1578 | # @id: the device's ID, must be unique | |
1579 | # | |
1580 | # Additional arguments depend on the type. | |
1581 | # | |
1582 | # Add a device. | |
1583 | # | |
1584 | # Notes: | |
1585 | # 1. For detailed information about this command, please refer to the | |
1586 | # 'docs/qdev-device-use.txt' file. | |
1587 | # | |
1588 | # 2. It's possible to list device properties by running QEMU with the | |
1589 | # "-device DEVICE,help" command-line argument, where DEVICE is the | |
1590 | # device's name | |
1591 | # | |
1592 | # Example: | |
1593 | # | |
1594 | # -> { "execute": "device_add", | |
1595 | # "arguments": { "driver": "e1000", "id": "net1", | |
1596 | # "bus": "pci.0", | |
1597 | # "mac": "52:54:00:12:34:56" } } | |
1598 | # <- { "return": {} } | |
1599 | # | |
1600 | # TODO: This command effectively bypasses QAPI completely due to its | |
1601 | # "additional arguments" business. It shouldn't have been added to | |
1602 | # the schema in this form. It should be qapified properly, or | |
1603 | # replaced by a properly qapified command. | |
1604 | # | |
1605 | # Since: 0.13 | |
1606 | ## | |
1607 | { 'command': 'device_add', | |
1608 | 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'}, | |
1609 | 'gen': false } # so we can get the additional arguments | |
1610 | ||
1611 | ## | |
1612 | # @device_del: | |
1613 | # | |
1614 | # Remove a device from a guest | |
1615 | # | |
1616 | # @id: the device's ID or QOM path | |
1617 | # | |
1618 | # Returns: Nothing on success | |
1619 | # If @id is not a valid device, DeviceNotFound | |
1620 | # | |
1621 | # Notes: When this command completes, the device may not be removed from the | |
1622 | # guest. Hot removal is an operation that requires guest cooperation. | |
1623 | # This command merely requests that the guest begin the hot removal | |
1624 | # process. Completion of the device removal process is signaled with a | |
1625 | # DEVICE_DELETED event. Guest reset will automatically complete removal | |
1626 | # for all devices. | |
1627 | # | |
1628 | # Since: 0.14.0 | |
1629 | # | |
1630 | # Example: | |
1631 | # | |
1632 | # -> { "execute": "device_del", | |
1633 | # "arguments": { "id": "net1" } } | |
1634 | # <- { "return": {} } | |
1635 | # | |
1636 | # -> { "execute": "device_del", | |
1637 | # "arguments": { "id": "/machine/peripheral-anon/device[0]" } } | |
1638 | # <- { "return": {} } | |
1639 | # | |
1640 | ## | |
1641 | { 'command': 'device_del', 'data': {'id': 'str'} } | |
1642 | ||
1643 | ## | |
1644 | # @DEVICE_DELETED: | |
1645 | # | |
1646 | # Emitted whenever the device removal completion is acknowledged by the guest. | |
1647 | # At this point, it's safe to reuse the specified device ID. Device removal can | |
1648 | # be initiated by the guest or by HMP/QMP commands. | |
1649 | # | |
1650 | # @device: device name | |
1651 | # | |
1652 | # @path: device path | |
1653 | # | |
1654 | # Since: 1.5 | |
1655 | # | |
1656 | # Example: | |
1657 | # | |
1658 | # <- { "event": "DEVICE_DELETED", | |
1659 | # "data": { "device": "virtio-net-pci-0", | |
1660 | # "path": "/machine/peripheral/virtio-net-pci-0" }, | |
1661 | # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } | |
1662 | # | |
1663 | ## | |
1664 | { 'event': 'DEVICE_DELETED', | |
1665 | 'data': { '*device': 'str', 'path': 'str' } } | |
1666 | ||
1667 | ## | |
1668 | # @DumpGuestMemoryFormat: | |
1669 | # | |
1670 | # An enumeration of guest-memory-dump's format. | |
1671 | # | |
1672 | # @elf: elf format | |
1673 | # | |
1674 | # @kdump-zlib: kdump-compressed format with zlib-compressed | |
1675 | # | |
1676 | # @kdump-lzo: kdump-compressed format with lzo-compressed | |
1677 | # | |
1678 | # @kdump-snappy: kdump-compressed format with snappy-compressed | |
1679 | # | |
2da91b54 VP |
1680 | # @win-dmp: Windows full crashdump format, |
1681 | # can be used instead of ELF converting (since 2.13) | |
1682 | # | |
112ed241 MA |
1683 | # Since: 2.0 |
1684 | ## | |
1685 | { 'enum': 'DumpGuestMemoryFormat', | |
2da91b54 | 1686 | 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy', 'win-dmp' ] } |
112ed241 MA |
1687 | |
1688 | ## | |
1689 | # @dump-guest-memory: | |
1690 | # | |
1691 | # Dump guest's memory to vmcore. It is a synchronous operation that can take | |
1692 | # very long depending on the amount of guest memory. | |
1693 | # | |
1694 | # @paging: if true, do paging to get guest's memory mapping. This allows | |
1695 | # using gdb to process the core file. | |
1696 | # | |
1697 | # IMPORTANT: this option can make QEMU allocate several gigabytes | |
1698 | # of RAM. This can happen for a large guest, or a | |
1699 | # malicious guest pretending to be large. | |
1700 | # | |
1701 | # Also, paging=true has the following limitations: | |
1702 | # | |
1703 | # 1. The guest may be in a catastrophic state or can have corrupted | |
1704 | # memory, which cannot be trusted | |
1705 | # 2. The guest can be in real-mode even if paging is enabled. For | |
1706 | # example, the guest uses ACPI to sleep, and ACPI sleep state | |
1707 | # goes in real-mode | |
1708 | # 3. Currently only supported on i386 and x86_64. | |
1709 | # | |
1710 | # @protocol: the filename or file descriptor of the vmcore. The supported | |
1711 | # protocols are: | |
1712 | # | |
1713 | # 1. file: the protocol starts with "file:", and the following | |
1714 | # string is the file's path. | |
1715 | # 2. fd: the protocol starts with "fd:", and the following string | |
1716 | # is the fd's name. | |
1717 | # | |
1718 | # @detach: if true, QMP will return immediately rather than | |
1719 | # waiting for the dump to finish. The user can track progress | |
1720 | # using "query-dump". (since 2.6). | |
1721 | # | |
1722 | # @begin: if specified, the starting physical address. | |
1723 | # | |
1724 | # @length: if specified, the memory size, in bytes. If you don't | |
1725 | # want to dump all guest's memory, please specify the start @begin | |
1726 | # and @length | |
1727 | # | |
1728 | # @format: if specified, the format of guest memory dump. But non-elf | |
1729 | # format is conflict with paging and filter, ie. @paging, @begin and | |
1730 | # @length is not allowed to be specified with non-elf @format at the | |
1731 | # same time (since 2.0) | |
1732 | # | |
1733 | # Note: All boolean arguments default to false | |
1734 | # | |
1735 | # Returns: nothing on success | |
1736 | # | |
1737 | # Since: 1.2 | |
1738 | # | |
1739 | # Example: | |
1740 | # | |
1741 | # -> { "execute": "dump-guest-memory", | |
1742 | # "arguments": { "protocol": "fd:dump" } } | |
1743 | # <- { "return": {} } | |
1744 | # | |
1745 | ## | |
1746 | { 'command': 'dump-guest-memory', | |
1747 | 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool', | |
1748 | '*begin': 'int', '*length': 'int', | |
1749 | '*format': 'DumpGuestMemoryFormat'} } | |
1750 | ||
1751 | ## | |
1752 | # @DumpStatus: | |
1753 | # | |
1754 | # Describe the status of a long-running background guest memory dump. | |
1755 | # | |
1756 | # @none: no dump-guest-memory has started yet. | |
1757 | # | |
1758 | # @active: there is one dump running in background. | |
1759 | # | |
1760 | # @completed: the last dump has finished successfully. | |
1761 | # | |
1762 | # @failed: the last dump has failed. | |
1763 | # | |
1764 | # Since: 2.6 | |
1765 | ## | |
1766 | { 'enum': 'DumpStatus', | |
1767 | 'data': [ 'none', 'active', 'completed', 'failed' ] } | |
1768 | ||
1769 | ## | |
1770 | # @DumpQueryResult: | |
1771 | # | |
1772 | # The result format for 'query-dump'. | |
1773 | # | |
1774 | # @status: enum of @DumpStatus, which shows current dump status | |
1775 | # | |
1776 | # @completed: bytes written in latest dump (uncompressed) | |
1777 | # | |
1778 | # @total: total bytes to be written in latest dump (uncompressed) | |
1779 | # | |
1780 | # Since: 2.6 | |
1781 | ## | |
1782 | { 'struct': 'DumpQueryResult', | |
1783 | 'data': { 'status': 'DumpStatus', | |
1784 | 'completed': 'int', | |
1785 | 'total': 'int' } } | |
1786 | ||
1787 | ## | |
1788 | # @query-dump: | |
1789 | # | |
1790 | # Query latest dump status. | |
1791 | # | |
1792 | # Returns: A @DumpStatus object showing the dump status. | |
1793 | # | |
1794 | # Since: 2.6 | |
1795 | # | |
1796 | # Example: | |
1797 | # | |
1798 | # -> { "execute": "query-dump" } | |
1799 | # <- { "return": { "status": "active", "completed": 1024000, | |
1800 | # "total": 2048000 } } | |
1801 | # | |
1802 | ## | |
1803 | { 'command': 'query-dump', 'returns': 'DumpQueryResult' } | |
1804 | ||
1805 | ## | |
1806 | # @DUMP_COMPLETED: | |
1807 | # | |
1808 | # Emitted when background dump has completed | |
1809 | # | |
eb815e24 | 1810 | # @result: final dump status |
112ed241 MA |
1811 | # |
1812 | # @error: human-readable error string that provides | |
1813 | # hint on why dump failed. Only presents on failure. The | |
1814 | # user should not try to interpret the error string. | |
1815 | # | |
1816 | # Since: 2.6 | |
1817 | # | |
1818 | # Example: | |
1819 | # | |
1820 | # { "event": "DUMP_COMPLETED", | |
1821 | # "data": {"result": {"total": 1090650112, "status": "completed", | |
1822 | # "completed": 1090650112} } } | |
1823 | # | |
1824 | ## | |
1825 | { 'event': 'DUMP_COMPLETED' , | |
1826 | 'data': { 'result': 'DumpQueryResult', '*error': 'str' } } | |
1827 | ||
1828 | ## | |
1829 | # @DumpGuestMemoryCapability: | |
1830 | # | |
1831 | # A list of the available formats for dump-guest-memory | |
1832 | # | |
1833 | # Since: 2.0 | |
1834 | ## | |
1835 | { 'struct': 'DumpGuestMemoryCapability', | |
1836 | 'data': { | |
1837 | 'formats': ['DumpGuestMemoryFormat'] } } | |
1838 | ||
1839 | ## | |
1840 | # @query-dump-guest-memory-capability: | |
1841 | # | |
1842 | # Returns the available formats for dump-guest-memory | |
1843 | # | |
1844 | # Returns: A @DumpGuestMemoryCapability object listing available formats for | |
1845 | # dump-guest-memory | |
1846 | # | |
1847 | # Since: 2.0 | |
1848 | # | |
1849 | # Example: | |
1850 | # | |
1851 | # -> { "execute": "query-dump-guest-memory-capability" } | |
1852 | # <- { "return": { "formats": | |
1853 | # ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] } | |
1854 | # | |
1855 | ## | |
1856 | { 'command': 'query-dump-guest-memory-capability', | |
1857 | 'returns': 'DumpGuestMemoryCapability' } | |
1858 | ||
1859 | ## | |
1860 | # @dump-skeys: | |
1861 | # | |
1862 | # Dump guest's storage keys | |
1863 | # | |
1864 | # @filename: the path to the file to dump to | |
1865 | # | |
1866 | # This command is only supported on s390 architecture. | |
1867 | # | |
1868 | # Since: 2.5 | |
1869 | # | |
1870 | # Example: | |
1871 | # | |
1872 | # -> { "execute": "dump-skeys", | |
1873 | # "arguments": { "filename": "/tmp/skeys" } } | |
1874 | # <- { "return": {} } | |
1875 | # | |
1876 | ## | |
1877 | { 'command': 'dump-skeys', | |
1878 | 'data': { 'filename': 'str' } } | |
1879 | ||
1880 | ## | |
1881 | # @object-add: | |
1882 | # | |
1883 | # Create a QOM object. | |
1884 | # | |
1885 | # @qom-type: the class name for the object to be created | |
1886 | # | |
1887 | # @id: the name of the new object | |
1888 | # | |
1889 | # @props: a dictionary of properties to be passed to the backend | |
1890 | # | |
1891 | # Returns: Nothing on success | |
1892 | # Error if @qom-type is not a valid class name | |
1893 | # | |
1894 | # Since: 2.0 | |
1895 | # | |
1896 | # Example: | |
1897 | # | |
1898 | # -> { "execute": "object-add", | |
1899 | # "arguments": { "qom-type": "rng-random", "id": "rng1", | |
1900 | # "props": { "filename": "/dev/hwrng" } } } | |
1901 | # <- { "return": {} } | |
1902 | # | |
1903 | ## | |
1904 | { 'command': 'object-add', | |
1905 | 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} } | |
1906 | ||
1907 | ## | |
1908 | # @object-del: | |
1909 | # | |
1910 | # Remove a QOM object. | |
1911 | # | |
1912 | # @id: the name of the QOM object to remove | |
1913 | # | |
1914 | # Returns: Nothing on success | |
1915 | # Error if @id is not a valid id for a QOM object | |
1916 | # | |
1917 | # Since: 2.0 | |
1918 | # | |
1919 | # Example: | |
1920 | # | |
1921 | # -> { "execute": "object-del", "arguments": { "id": "rng1" } } | |
1922 | # <- { "return": {} } | |
1923 | # | |
1924 | ## | |
1925 | { 'command': 'object-del', 'data': {'id': 'str'} } | |
1926 | ||
1927 | ## | |
1928 | # @getfd: | |
1929 | # | |
1930 | # Receive a file descriptor via SCM rights and assign it a name | |
1931 | # | |
1932 | # @fdname: file descriptor name | |
1933 | # | |
1934 | # Returns: Nothing on success | |
1935 | # | |
1936 | # Since: 0.14.0 | |
1937 | # | |
1938 | # Notes: If @fdname already exists, the file descriptor assigned to | |
1939 | # it will be closed and replaced by the received file | |
1940 | # descriptor. | |
1941 | # | |
1942 | # The 'closefd' command can be used to explicitly close the | |
1943 | # file descriptor when it is no longer needed. | |
1944 | # | |
1945 | # Example: | |
1946 | # | |
1947 | # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } } | |
1948 | # <- { "return": {} } | |
1949 | # | |
1950 | ## | |
1951 | { 'command': 'getfd', 'data': {'fdname': 'str'} } | |
1952 | ||
1953 | ## | |
1954 | # @closefd: | |
1955 | # | |
1956 | # Close a file descriptor previously passed via SCM rights | |
1957 | # | |
1958 | # @fdname: file descriptor name | |
1959 | # | |
1960 | # Returns: Nothing on success | |
1961 | # | |
1962 | # Since: 0.14.0 | |
1963 | # | |
1964 | # Example: | |
1965 | # | |
1966 | # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } } | |
1967 | # <- { "return": {} } | |
1968 | # | |
1969 | ## | |
1970 | { 'command': 'closefd', 'data': {'fdname': 'str'} } | |
1971 | ||
1972 | ## | |
1973 | # @MachineInfo: | |
1974 | # | |
1975 | # Information describing a machine. | |
1976 | # | |
1977 | # @name: the name of the machine | |
1978 | # | |
1979 | # @alias: an alias for the machine name | |
1980 | # | |
1981 | # @is-default: whether the machine is default | |
1982 | # | |
1983 | # @cpu-max: maximum number of CPUs supported by the machine type | |
1984 | # (since 1.5.0) | |
1985 | # | |
1986 | # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0) | |
1987 | # | |
1988 | # Since: 1.2.0 | |
1989 | ## | |
1990 | { 'struct': 'MachineInfo', | |
1991 | 'data': { 'name': 'str', '*alias': 'str', | |
1992 | '*is-default': 'bool', 'cpu-max': 'int', | |
1993 | 'hotpluggable-cpus': 'bool'} } | |
1994 | ||
1995 | ## | |
1996 | # @query-machines: | |
1997 | # | |
1998 | # Return a list of supported machines | |
1999 | # | |
2000 | # Returns: a list of MachineInfo | |
2001 | # | |
2002 | # Since: 1.2.0 | |
2003 | ## | |
2004 | { 'command': 'query-machines', 'returns': ['MachineInfo'] } | |
2005 | ||
2006 | ## | |
2007 | # @CpuDefinitionInfo: | |
2008 | # | |
2009 | # Virtual CPU definition. | |
2010 | # | |
2011 | # @name: the name of the CPU definition | |
2012 | # | |
2013 | # @migration-safe: whether a CPU definition can be safely used for | |
2014 | # migration in combination with a QEMU compatibility machine | |
2015 | # when migrating between different QMU versions and between | |
2016 | # hosts with different sets of (hardware or software) | |
2017 | # capabilities. If not provided, information is not available | |
2018 | # and callers should not assume the CPU definition to be | |
2019 | # migration-safe. (since 2.8) | |
2020 | # | |
2021 | # @static: whether a CPU definition is static and will not change depending on | |
2022 | # QEMU version, machine type, machine options and accelerator options. | |
2023 | # A static model is always migration-safe. (since 2.8) | |
2024 | # | |
2025 | # @unavailable-features: List of properties that prevent | |
2026 | # the CPU model from running in the current | |
2027 | # host. (since 2.8) | |
2028 | # @typename: Type name that can be used as argument to @device-list-properties, | |
2029 | # to introspect properties configurable using -cpu or -global. | |
2030 | # (since 2.9) | |
2031 | # | |
2032 | # @unavailable-features is a list of QOM property names that | |
2033 | # represent CPU model attributes that prevent the CPU from running. | |
2034 | # If the QOM property is read-only, that means there's no known | |
2035 | # way to make the CPU model run in the current host. Implementations | |
2036 | # that choose not to provide specific information return the | |
2037 | # property name "type". | |
2038 | # If the property is read-write, it means that it MAY be possible | |
2039 | # to run the CPU model in the current host if that property is | |
2040 | # changed. Management software can use it as hints to suggest or | |
2041 | # choose an alternative for the user, or just to generate meaningful | |
2042 | # error messages explaining why the CPU model can't be used. | |
2043 | # If @unavailable-features is an empty list, the CPU model is | |
2044 | # runnable using the current host and machine-type. | |
2045 | # If @unavailable-features is not present, runnability | |
2046 | # information for the CPU is not available. | |
2047 | # | |
2048 | # Since: 1.2.0 | |
2049 | ## | |
2050 | { 'struct': 'CpuDefinitionInfo', | |
2051 | 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool', | |
2052 | '*unavailable-features': [ 'str' ], 'typename': 'str' } } | |
2053 | ||
2054 | ## | |
2055 | # @MemoryInfo: | |
2056 | # | |
2057 | # Actual memory information in bytes. | |
2058 | # | |
2059 | # @base-memory: size of "base" memory specified with command line | |
2060 | # option -m. | |
2061 | # | |
2062 | # @plugged-memory: size of memory that can be hot-unplugged. This field | |
2063 | # is omitted if target doesn't support memory hotplug | |
2064 | # (i.e. CONFIG_MEM_HOTPLUG not defined on build time). | |
2065 | # | |
2066 | # Since: 2.11.0 | |
2067 | ## | |
2068 | { 'struct': 'MemoryInfo', | |
2069 | 'data' : { 'base-memory': 'size', '*plugged-memory': 'size' } } | |
2070 | ||
2071 | ## | |
2072 | # @query-memory-size-summary: | |
2073 | # | |
2074 | # Return the amount of initially allocated and present hotpluggable (if | |
2075 | # enabled) memory in bytes. | |
2076 | # | |
2077 | # Example: | |
2078 | # | |
2079 | # -> { "execute": "query-memory-size-summary" } | |
2080 | # <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } } | |
2081 | # | |
2082 | # Since: 2.11.0 | |
2083 | ## | |
2084 | { 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' } | |
2085 | ||
2086 | ## | |
2087 | # @query-cpu-definitions: | |
2088 | # | |
2089 | # Return a list of supported virtual CPU definitions | |
2090 | # | |
2091 | # Returns: a list of CpuDefInfo | |
2092 | # | |
2093 | # Since: 1.2.0 | |
2094 | ## | |
2095 | { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] } | |
2096 | ||
2097 | ## | |
2098 | # @CpuModelInfo: | |
2099 | # | |
2100 | # Virtual CPU model. | |
2101 | # | |
2102 | # A CPU model consists of the name of a CPU definition, to which | |
2103 | # delta changes are applied (e.g. features added/removed). Most magic values | |
2104 | # that an architecture might require should be hidden behind the name. | |
2105 | # However, if required, architectures can expose relevant properties. | |
2106 | # | |
2107 | # @name: the name of the CPU definition the model is based on | |
2108 | # @props: a dictionary of QOM properties to be applied | |
2109 | # | |
2110 | # Since: 2.8.0 | |
2111 | ## | |
2112 | { 'struct': 'CpuModelInfo', | |
2113 | 'data': { 'name': 'str', | |
2114 | '*props': 'any' } } | |
2115 | ||
2116 | ## | |
2117 | # @CpuModelExpansionType: | |
2118 | # | |
2119 | # An enumeration of CPU model expansion types. | |
2120 | # | |
2121 | # @static: Expand to a static CPU model, a combination of a static base | |
2122 | # model name and property delta changes. As the static base model will | |
2123 | # never change, the expanded CPU model will be the same, independent of | |
2124 | # independent of QEMU version, machine type, machine options, and | |
2125 | # accelerator options. Therefore, the resulting model can be used by | |
2126 | # tooling without having to specify a compatibility machine - e.g. when | |
2127 | # displaying the "host" model. static CPU models are migration-safe. | |
2128 | # | |
2129 | # @full: Expand all properties. The produced model is not guaranteed to be | |
2130 | # migration-safe, but allows tooling to get an insight and work with | |
2131 | # model details. | |
2132 | # | |
2133 | # Note: When a non-migration-safe CPU model is expanded in static mode, some | |
2134 | # features enabled by the CPU model may be omitted, because they can't be | |
2135 | # implemented by a static CPU model definition (e.g. cache info passthrough and | |
2136 | # PMU passthrough in x86). If you need an accurate representation of the | |
2137 | # features enabled by a non-migration-safe CPU model, use @full. If you need a | |
2138 | # static representation that will keep ABI compatibility even when changing QEMU | |
2139 | # version or machine-type, use @static (but keep in mind that some features may | |
2140 | # be omitted). | |
2141 | # | |
2142 | # Since: 2.8.0 | |
2143 | ## | |
2144 | { 'enum': 'CpuModelExpansionType', | |
2145 | 'data': [ 'static', 'full' ] } | |
2146 | ||
2147 | ||
2148 | ## | |
2149 | # @CpuModelExpansionInfo: | |
2150 | # | |
2151 | # The result of a cpu model expansion. | |
2152 | # | |
2153 | # @model: the expanded CpuModelInfo. | |
2154 | # | |
2155 | # Since: 2.8.0 | |
2156 | ## | |
2157 | { 'struct': 'CpuModelExpansionInfo', | |
2158 | 'data': { 'model': 'CpuModelInfo' } } | |
2159 | ||
2160 | ||
2161 | ## | |
2162 | # @query-cpu-model-expansion: | |
2163 | # | |
2164 | # Expands a given CPU model (or a combination of CPU model + additional options) | |
2165 | # to different granularities, allowing tooling to get an understanding what a | |
2166 | # specific CPU model looks like in QEMU under a certain configuration. | |
2167 | # | |
2168 | # This interface can be used to query the "host" CPU model. | |
2169 | # | |
2170 | # The data returned by this command may be affected by: | |
2171 | # | |
2172 | # * QEMU version: CPU models may look different depending on the QEMU version. | |
2173 | # (Except for CPU models reported as "static" in query-cpu-definitions.) | |
2174 | # * machine-type: CPU model may look different depending on the machine-type. | |
2175 | # (Except for CPU models reported as "static" in query-cpu-definitions.) | |
2176 | # * machine options (including accelerator): in some architectures, CPU models | |
2177 | # may look different depending on machine and accelerator options. (Except for | |
2178 | # CPU models reported as "static" in query-cpu-definitions.) | |
2179 | # * "-cpu" arguments and global properties: arguments to the -cpu option and | |
2180 | # global properties may affect expansion of CPU models. Using | |
2181 | # query-cpu-model-expansion while using these is not advised. | |
2182 | # | |
2183 | # Some architectures may not support all expansion types. s390x supports | |
2184 | # "full" and "static". | |
2185 | # | |
2186 | # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is | |
2187 | # not supported, if the model cannot be expanded, if the model contains | |
2188 | # an unknown CPU definition name, unknown properties or properties | |
2189 | # with a wrong type. Also returns an error if an expansion type is | |
2190 | # not supported. | |
2191 | # | |
2192 | # Since: 2.8.0 | |
2193 | ## | |
2194 | { 'command': 'query-cpu-model-expansion', | |
2195 | 'data': { 'type': 'CpuModelExpansionType', | |
2196 | 'model': 'CpuModelInfo' }, | |
2197 | 'returns': 'CpuModelExpansionInfo' } | |
2198 | ||
2199 | ## | |
2200 | # @CpuModelCompareResult: | |
2201 | # | |
2202 | # An enumeration of CPU model comparison results. The result is usually | |
2203 | # calculated using e.g. CPU features or CPU generations. | |
2204 | # | |
2205 | # @incompatible: If model A is incompatible to model B, model A is not | |
2206 | # guaranteed to run where model B runs and the other way around. | |
2207 | # | |
2208 | # @identical: If model A is identical to model B, model A is guaranteed to run | |
2209 | # where model B runs and the other way around. | |
2210 | # | |
2211 | # @superset: If model A is a superset of model B, model B is guaranteed to run | |
2212 | # where model A runs. There are no guarantees about the other way. | |
2213 | # | |
2214 | # @subset: If model A is a subset of model B, model A is guaranteed to run | |
2215 | # where model B runs. There are no guarantees about the other way. | |
2216 | # | |
2217 | # Since: 2.8.0 | |
2218 | ## | |
2219 | { 'enum': 'CpuModelCompareResult', | |
2220 | 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] } | |
2221 | ||
2222 | ## | |
2223 | # @CpuModelCompareInfo: | |
2224 | # | |
2225 | # The result of a CPU model comparison. | |
2226 | # | |
2227 | # @result: The result of the compare operation. | |
2228 | # @responsible-properties: List of properties that led to the comparison result | |
2229 | # not being identical. | |
2230 | # | |
2231 | # @responsible-properties is a list of QOM property names that led to | |
2232 | # both CPUs not being detected as identical. For identical models, this | |
2233 | # list is empty. | |
2234 | # If a QOM property is read-only, that means there's no known way to make the | |
2235 | # CPU models identical. If the special property name "type" is included, the | |
2236 | # models are by definition not identical and cannot be made identical. | |
2237 | # | |
2238 | # Since: 2.8.0 | |
2239 | ## | |
2240 | { 'struct': 'CpuModelCompareInfo', | |
2241 | 'data': {'result': 'CpuModelCompareResult', | |
2242 | 'responsible-properties': ['str'] | |
2243 | } | |
2244 | } | |
2245 | ||
2246 | ## | |
2247 | # @query-cpu-model-comparison: | |
2248 | # | |
2249 | # Compares two CPU models, returning how they compare in a specific | |
2250 | # configuration. The results indicates how both models compare regarding | |
2251 | # runnability. This result can be used by tooling to make decisions if a | |
2252 | # certain CPU model will run in a certain configuration or if a compatible | |
2253 | # CPU model has to be created by baselining. | |
2254 | # | |
2255 | # Usually, a CPU model is compared against the maximum possible CPU model | |
2256 | # of a certain configuration (e.g. the "host" model for KVM). If that CPU | |
2257 | # model is identical or a subset, it will run in that configuration. | |
2258 | # | |
2259 | # The result returned by this command may be affected by: | |
2260 | # | |
2261 | # * QEMU version: CPU models may look different depending on the QEMU version. | |
2262 | # (Except for CPU models reported as "static" in query-cpu-definitions.) | |
2263 | # * machine-type: CPU model may look different depending on the machine-type. | |
2264 | # (Except for CPU models reported as "static" in query-cpu-definitions.) | |
2265 | # * machine options (including accelerator): in some architectures, CPU models | |
2266 | # may look different depending on machine and accelerator options. (Except for | |
2267 | # CPU models reported as "static" in query-cpu-definitions.) | |
2268 | # * "-cpu" arguments and global properties: arguments to the -cpu option and | |
2269 | # global properties may affect expansion of CPU models. Using | |
2270 | # query-cpu-model-expansion while using these is not advised. | |
2271 | # | |
2272 | # Some architectures may not support comparing CPU models. s390x supports | |
2273 | # comparing CPU models. | |
2274 | # | |
2275 | # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is | |
2276 | # not supported, if a model cannot be used, if a model contains | |
2277 | # an unknown cpu definition name, unknown properties or properties | |
2278 | # with wrong types. | |
2279 | # | |
2280 | # Since: 2.8.0 | |
2281 | ## | |
2282 | { 'command': 'query-cpu-model-comparison', | |
2283 | 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' }, | |
2284 | 'returns': 'CpuModelCompareInfo' } | |
2285 | ||
2286 | ## | |
2287 | # @CpuModelBaselineInfo: | |
2288 | # | |
2289 | # The result of a CPU model baseline. | |
2290 | # | |
2291 | # @model: the baselined CpuModelInfo. | |
2292 | # | |
2293 | # Since: 2.8.0 | |
2294 | ## | |
2295 | { 'struct': 'CpuModelBaselineInfo', | |
2296 | 'data': { 'model': 'CpuModelInfo' } } | |
2297 | ||
2298 | ## | |
2299 | # @query-cpu-model-baseline: | |
2300 | # | |
2301 | # Baseline two CPU models, creating a compatible third model. The created | |
2302 | # model will always be a static, migration-safe CPU model (see "static" | |
2303 | # CPU model expansion for details). | |
2304 | # | |
2305 | # This interface can be used by tooling to create a compatible CPU model out | |
2306 | # two CPU models. The created CPU model will be identical to or a subset of | |
2307 | # both CPU models when comparing them. Therefore, the created CPU model is | |
2308 | # guaranteed to run where the given CPU models run. | |
2309 | # | |
2310 | # The result returned by this command may be affected by: | |
2311 | # | |
2312 | # * QEMU version: CPU models may look different depending on the QEMU version. | |
2313 | # (Except for CPU models reported as "static" in query-cpu-definitions.) | |
2314 | # * machine-type: CPU model may look different depending on the machine-type. | |
2315 | # (Except for CPU models reported as "static" in query-cpu-definitions.) | |
2316 | # * machine options (including accelerator): in some architectures, CPU models | |
2317 | # may look different depending on machine and accelerator options. (Except for | |
2318 | # CPU models reported as "static" in query-cpu-definitions.) | |
2319 | # * "-cpu" arguments and global properties: arguments to the -cpu option and | |
2320 | # global properties may affect expansion of CPU models. Using | |
2321 | # query-cpu-model-expansion while using these is not advised. | |
2322 | # | |
2323 | # Some architectures may not support baselining CPU models. s390x supports | |
2324 | # baselining CPU models. | |
2325 | # | |
2326 | # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is | |
2327 | # not supported, if a model cannot be used, if a model contains | |
2328 | # an unknown cpu definition name, unknown properties or properties | |
2329 | # with wrong types. | |
2330 | # | |
2331 | # Since: 2.8.0 | |
2332 | ## | |
2333 | { 'command': 'query-cpu-model-baseline', | |
2334 | 'data': { 'modela': 'CpuModelInfo', | |
2335 | 'modelb': 'CpuModelInfo' }, | |
2336 | 'returns': 'CpuModelBaselineInfo' } | |
2337 | ||
2338 | ## | |
2339 | # @AddfdInfo: | |
2340 | # | |
2341 | # Information about a file descriptor that was added to an fd set. | |
2342 | # | |
2343 | # @fdset-id: The ID of the fd set that @fd was added to. | |
2344 | # | |
2345 | # @fd: The file descriptor that was received via SCM rights and | |
2346 | # added to the fd set. | |
2347 | # | |
2348 | # Since: 1.2.0 | |
2349 | ## | |
2350 | { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} } | |
2351 | ||
2352 | ## | |
2353 | # @add-fd: | |
2354 | # | |
2355 | # Add a file descriptor, that was passed via SCM rights, to an fd set. | |
2356 | # | |
2357 | # @fdset-id: The ID of the fd set to add the file descriptor to. | |
2358 | # | |
2359 | # @opaque: A free-form string that can be used to describe the fd. | |
2360 | # | |
2361 | # Returns: @AddfdInfo on success | |
2362 | # | |
2363 | # If file descriptor was not received, FdNotSupplied | |
2364 | # | |
2365 | # If @fdset-id is a negative value, InvalidParameterValue | |
2366 | # | |
2367 | # Notes: The list of fd sets is shared by all monitor connections. | |
2368 | # | |
2369 | # If @fdset-id is not specified, a new fd set will be created. | |
2370 | # | |
2371 | # Since: 1.2.0 | |
2372 | # | |
2373 | # Example: | |
2374 | # | |
2375 | # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } } | |
2376 | # <- { "return": { "fdset-id": 1, "fd": 3 } } | |
2377 | # | |
2378 | ## | |
2379 | { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'}, | |
2380 | 'returns': 'AddfdInfo' } | |
2381 | ||
2382 | ## | |
2383 | # @remove-fd: | |
2384 | # | |
2385 | # Remove a file descriptor from an fd set. | |
2386 | # | |
2387 | # @fdset-id: The ID of the fd set that the file descriptor belongs to. | |
2388 | # | |
2389 | # @fd: The file descriptor that is to be removed. | |
2390 | # | |
2391 | # Returns: Nothing on success | |
2392 | # If @fdset-id or @fd is not found, FdNotFound | |
2393 | # | |
2394 | # Since: 1.2.0 | |
2395 | # | |
2396 | # Notes: The list of fd sets is shared by all monitor connections. | |
2397 | # | |
2398 | # If @fd is not specified, all file descriptors in @fdset-id | |
2399 | # will be removed. | |
2400 | # | |
2401 | # Example: | |
2402 | # | |
2403 | # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } } | |
2404 | # <- { "return": {} } | |
2405 | # | |
2406 | ## | |
2407 | { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} } | |
2408 | ||
2409 | ## | |
2410 | # @FdsetFdInfo: | |
2411 | # | |
2412 | # Information about a file descriptor that belongs to an fd set. | |
2413 | # | |
2414 | # @fd: The file descriptor value. | |
2415 | # | |
2416 | # @opaque: A free-form string that can be used to describe the fd. | |
2417 | # | |
2418 | # Since: 1.2.0 | |
2419 | ## | |
2420 | { 'struct': 'FdsetFdInfo', | |
2421 | 'data': {'fd': 'int', '*opaque': 'str'} } | |
2422 | ||
2423 | ## | |
2424 | # @FdsetInfo: | |
2425 | # | |
2426 | # Information about an fd set. | |
2427 | # | |
2428 | # @fdset-id: The ID of the fd set. | |
2429 | # | |
2430 | # @fds: A list of file descriptors that belong to this fd set. | |
2431 | # | |
2432 | # Since: 1.2.0 | |
2433 | ## | |
2434 | { 'struct': 'FdsetInfo', | |
2435 | 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} } | |
2436 | ||
2437 | ## | |
2438 | # @query-fdsets: | |
2439 | # | |
2440 | # Return information describing all fd sets. | |
2441 | # | |
2442 | # Returns: A list of @FdsetInfo | |
2443 | # | |
2444 | # Since: 1.2.0 | |
2445 | # | |
2446 | # Note: The list of fd sets is shared by all monitor connections. | |
2447 | # | |
2448 | # Example: | |
2449 | # | |
2450 | # -> { "execute": "query-fdsets" } | |
2451 | # <- { "return": [ | |
2452 | # { | |
2453 | # "fds": [ | |
2454 | # { | |
2455 | # "fd": 30, | |
2456 | # "opaque": "rdonly:/path/to/file" | |
2457 | # }, | |
2458 | # { | |
2459 | # "fd": 24, | |
2460 | # "opaque": "rdwr:/path/to/file" | |
2461 | # } | |
2462 | # ], | |
2463 | # "fdset-id": 1 | |
2464 | # }, | |
2465 | # { | |
2466 | # "fds": [ | |
2467 | # { | |
2468 | # "fd": 28 | |
2469 | # }, | |
2470 | # { | |
2471 | # "fd": 29 | |
2472 | # } | |
2473 | # ], | |
2474 | # "fdset-id": 0 | |
2475 | # } | |
2476 | # ] | |
2477 | # } | |
2478 | # | |
2479 | ## | |
2480 | { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] } | |
2481 | ||
2482 | ## | |
2483 | # @TargetInfo: | |
2484 | # | |
2485 | # Information describing the QEMU target. | |
2486 | # | |
b47aa7b3 | 2487 | # @arch: the target architecture |
112ed241 MA |
2488 | # |
2489 | # Since: 1.2.0 | |
2490 | ## | |
2491 | { 'struct': 'TargetInfo', | |
b47aa7b3 | 2492 | 'data': { 'arch': 'SysEmuTarget' } } |
112ed241 MA |
2493 | |
2494 | ## | |
2495 | # @query-target: | |
2496 | # | |
2497 | # Return information about the target for this QEMU | |
2498 | # | |
2499 | # Returns: TargetInfo | |
2500 | # | |
2501 | # Since: 1.2.0 | |
2502 | ## | |
2503 | { 'command': 'query-target', 'returns': 'TargetInfo' } | |
2504 | ||
2505 | ## | |
2506 | # @AcpiTableOptions: | |
2507 | # | |
2508 | # Specify an ACPI table on the command line to load. | |
2509 | # | |
2510 | # At most one of @file and @data can be specified. The list of files specified | |
2511 | # by any one of them is loaded and concatenated in order. If both are omitted, | |
2512 | # @data is implied. | |
2513 | # | |
2514 | # Other fields / optargs can be used to override fields of the generic ACPI | |
2515 | # table header; refer to the ACPI specification 5.0, section 5.2.6 System | |
2516 | # Description Table Header. If a header field is not overridden, then the | |
2517 | # corresponding value from the concatenated blob is used (in case of @file), or | |
2518 | # it is filled in with a hard-coded value (in case of @data). | |
2519 | # | |
2520 | # String fields are copied into the matching ACPI member from lowest address | |
2521 | # upwards, and silently truncated / NUL-padded to length. | |
2522 | # | |
2523 | # @sig: table signature / identifier (4 bytes) | |
2524 | # | |
2525 | # @rev: table revision number (dependent on signature, 1 byte) | |
2526 | # | |
2527 | # @oem_id: OEM identifier (6 bytes) | |
2528 | # | |
2529 | # @oem_table_id: OEM table identifier (8 bytes) | |
2530 | # | |
2531 | # @oem_rev: OEM-supplied revision number (4 bytes) | |
2532 | # | |
2533 | # @asl_compiler_id: identifier of the utility that created the table | |
2534 | # (4 bytes) | |
2535 | # | |
2536 | # @asl_compiler_rev: revision number of the utility that created the | |
2537 | # table (4 bytes) | |
2538 | # | |
2539 | # @file: colon (:) separated list of pathnames to load and | |
2540 | # concatenate as table data. The resultant binary blob is expected to | |
2541 | # have an ACPI table header. At least one file is required. This field | |
2542 | # excludes @data. | |
2543 | # | |
2544 | # @data: colon (:) separated list of pathnames to load and | |
2545 | # concatenate as table data. The resultant binary blob must not have an | |
2546 | # ACPI table header. At least one file is required. This field excludes | |
2547 | # @file. | |
2548 | # | |
2549 | # Since: 1.5 | |
2550 | ## | |
2551 | { 'struct': 'AcpiTableOptions', | |
2552 | 'data': { | |
2553 | '*sig': 'str', | |
2554 | '*rev': 'uint8', | |
2555 | '*oem_id': 'str', | |
2556 | '*oem_table_id': 'str', | |
2557 | '*oem_rev': 'uint32', | |
2558 | '*asl_compiler_id': 'str', | |
2559 | '*asl_compiler_rev': 'uint32', | |
2560 | '*file': 'str', | |
2561 | '*data': 'str' }} | |
2562 | ||
2563 | ## | |
2564 | # @CommandLineParameterType: | |
2565 | # | |
2566 | # Possible types for an option parameter. | |
2567 | # | |
2568 | # @string: accepts a character string | |
2569 | # | |
2570 | # @boolean: accepts "on" or "off" | |
2571 | # | |
2572 | # @number: accepts a number | |
2573 | # | |
2574 | # @size: accepts a number followed by an optional suffix (K)ilo, | |
2575 | # (M)ega, (G)iga, (T)era | |
2576 | # | |
2577 | # Since: 1.5 | |
2578 | ## | |
2579 | { 'enum': 'CommandLineParameterType', | |
2580 | 'data': ['string', 'boolean', 'number', 'size'] } | |
2581 | ||
2582 | ## | |
2583 | # @CommandLineParameterInfo: | |
2584 | # | |
2585 | # Details about a single parameter of a command line option. | |
2586 | # | |
2587 | # @name: parameter name | |
2588 | # | |
2589 | # @type: parameter @CommandLineParameterType | |
2590 | # | |
2591 | # @help: human readable text string, not suitable for parsing. | |
2592 | # | |
2593 | # @default: default value string (since 2.1) | |
2594 | # | |
2595 | # Since: 1.5 | |
2596 | ## | |
2597 | { 'struct': 'CommandLineParameterInfo', | |
2598 | 'data': { 'name': 'str', | |
2599 | 'type': 'CommandLineParameterType', | |
2600 | '*help': 'str', | |
2601 | '*default': 'str' } } | |
2602 | ||
2603 | ## | |
2604 | # @CommandLineOptionInfo: | |
2605 | # | |
2606 | # Details about a command line option, including its list of parameter details | |
2607 | # | |
2608 | # @option: option name | |
2609 | # | |
2610 | # @parameters: an array of @CommandLineParameterInfo | |
2611 | # | |
2612 | # Since: 1.5 | |
2613 | ## | |
2614 | { 'struct': 'CommandLineOptionInfo', | |
2615 | 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } } | |
2616 | ||
2617 | ## | |
2618 | # @query-command-line-options: | |
2619 | # | |
2620 | # Query command line option schema. | |
2621 | # | |
2622 | # @option: option name | |
2623 | # | |
2624 | # Returns: list of @CommandLineOptionInfo for all options (or for the given | |
2625 | # @option). Returns an error if the given @option doesn't exist. | |
2626 | # | |
2627 | # Since: 1.5 | |
2628 | # | |
2629 | # Example: | |
2630 | # | |
2631 | # -> { "execute": "query-command-line-options", | |
2632 | # "arguments": { "option": "option-rom" } } | |
2633 | # <- { "return": [ | |
2634 | # { | |
2635 | # "parameters": [ | |
2636 | # { | |
2637 | # "name": "romfile", | |
2638 | # "type": "string" | |
2639 | # }, | |
2640 | # { | |
2641 | # "name": "bootindex", | |
2642 | # "type": "number" | |
2643 | # } | |
2644 | # ], | |
2645 | # "option": "option-rom" | |
2646 | # } | |
2647 | # ] | |
2648 | # } | |
2649 | # | |
2650 | ## | |
2651 | {'command': 'query-command-line-options', 'data': { '*option': 'str' }, | |
d6fe3d02 IM |
2652 | 'returns': ['CommandLineOptionInfo'], |
2653 | 'allow-preconfig': true } | |
112ed241 MA |
2654 | |
2655 | ## | |
2656 | # @X86CPURegister32: | |
2657 | # | |
2658 | # A X86 32-bit register | |
2659 | # | |
2660 | # Since: 1.5 | |
2661 | ## | |
2662 | { 'enum': 'X86CPURegister32', | |
2663 | 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] } | |
2664 | ||
2665 | ## | |
2666 | # @X86CPUFeatureWordInfo: | |
2667 | # | |
2668 | # Information about a X86 CPU feature word | |
2669 | # | |
2670 | # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word | |
2671 | # | |
2672 | # @cpuid-input-ecx: Input ECX value for CPUID instruction for that | |
2673 | # feature word | |
2674 | # | |
2675 | # @cpuid-register: Output register containing the feature bits | |
2676 | # | |
2677 | # @features: value of output register, containing the feature bits | |
2678 | # | |
2679 | # Since: 1.5 | |
2680 | ## | |
2681 | { 'struct': 'X86CPUFeatureWordInfo', | |
2682 | 'data': { 'cpuid-input-eax': 'int', | |
2683 | '*cpuid-input-ecx': 'int', | |
2684 | 'cpuid-register': 'X86CPURegister32', | |
2685 | 'features': 'int' } } | |
2686 | ||
2687 | ## | |
2688 | # @DummyForceArrays: | |
2689 | # | |
2690 | # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally | |
2691 | # | |
2692 | # Since: 2.5 | |
2693 | ## | |
2694 | { 'struct': 'DummyForceArrays', | |
2695 | 'data': { 'unused': ['X86CPUFeatureWordInfo'] } } | |
2696 | ||
2697 | ||
2698 | ## | |
2699 | # @NumaOptionsType: | |
2700 | # | |
2701 | # @node: NUMA nodes configuration | |
2702 | # | |
2703 | # @dist: NUMA distance configuration (since 2.10) | |
2704 | # | |
2705 | # @cpu: property based CPU(s) to node mapping (Since: 2.10) | |
2706 | # | |
2707 | # Since: 2.1 | |
2708 | ## | |
2709 | { 'enum': 'NumaOptionsType', | |
2710 | 'data': [ 'node', 'dist', 'cpu' ] } | |
2711 | ||
2712 | ## | |
2713 | # @NumaOptions: | |
2714 | # | |
2715 | # A discriminated record of NUMA options. (for OptsVisitor) | |
2716 | # | |
2717 | # Since: 2.1 | |
2718 | ## | |
2719 | { 'union': 'NumaOptions', | |
2720 | 'base': { 'type': 'NumaOptionsType' }, | |
2721 | 'discriminator': 'type', | |
2722 | 'data': { | |
2723 | 'node': 'NumaNodeOptions', | |
2724 | 'dist': 'NumaDistOptions', | |
2725 | 'cpu': 'NumaCpuOptions' }} | |
2726 | ||
2727 | ## | |
2728 | # @NumaNodeOptions: | |
2729 | # | |
2730 | # Create a guest NUMA node. (for OptsVisitor) | |
2731 | # | |
2732 | # @nodeid: NUMA node ID (increase by 1 from 0 if omitted) | |
2733 | # | |
2734 | # @cpus: VCPUs belonging to this node (assign VCPUS round-robin | |
2735 | # if omitted) | |
2736 | # | |
2737 | # @mem: memory size of this node; mutually exclusive with @memdev. | |
2738 | # Equally divide total memory among nodes if both @mem and @memdev are | |
2739 | # omitted. | |
2740 | # | |
2741 | # @memdev: memory backend object. If specified for one node, | |
2742 | # it must be specified for all nodes. | |
2743 | # | |
2744 | # Since: 2.1 | |
2745 | ## | |
2746 | { 'struct': 'NumaNodeOptions', | |
2747 | 'data': { | |
2748 | '*nodeid': 'uint16', | |
2749 | '*cpus': ['uint16'], | |
2750 | '*mem': 'size', | |
2751 | '*memdev': 'str' }} | |
2752 | ||
2753 | ## | |
2754 | # @NumaDistOptions: | |
2755 | # | |
2756 | # Set the distance between 2 NUMA nodes. | |
2757 | # | |
2758 | # @src: source NUMA node. | |
2759 | # | |
2760 | # @dst: destination NUMA node. | |
2761 | # | |
2762 | # @val: NUMA distance from source node to destination node. | |
2763 | # When a node is unreachable from another node, set the distance | |
2764 | # between them to 255. | |
2765 | # | |
2766 | # Since: 2.10 | |
2767 | ## | |
2768 | { 'struct': 'NumaDistOptions', | |
2769 | 'data': { | |
2770 | 'src': 'uint16', | |
2771 | 'dst': 'uint16', | |
2772 | 'val': 'uint8' }} | |
2773 | ||
2774 | ## | |
2775 | # @NumaCpuOptions: | |
2776 | # | |
2777 | # Option "-numa cpu" overrides default cpu to node mapping. | |
2778 | # It accepts the same set of cpu properties as returned by | |
2779 | # query-hotpluggable-cpus[].props, where node-id could be used to | |
2780 | # override default node mapping. | |
2781 | # | |
2782 | # Since: 2.10 | |
2783 | ## | |
2784 | { 'struct': 'NumaCpuOptions', | |
2785 | 'base': 'CpuInstanceProperties', | |
2786 | 'data' : {} } | |
2787 | ||
2788 | ## | |
2789 | # @HostMemPolicy: | |
2790 | # | |
2791 | # Host memory policy types | |
2792 | # | |
2793 | # @default: restore default policy, remove any nondefault policy | |
2794 | # | |
2795 | # @preferred: set the preferred host nodes for allocation | |
2796 | # | |
2797 | # @bind: a strict policy that restricts memory allocation to the | |
2798 | # host nodes specified | |
2799 | # | |
2800 | # @interleave: memory allocations are interleaved across the set | |
2801 | # of host nodes specified | |
2802 | # | |
2803 | # Since: 2.1 | |
2804 | ## | |
2805 | { 'enum': 'HostMemPolicy', | |
2806 | 'data': [ 'default', 'preferred', 'bind', 'interleave' ] } | |
2807 | ||
2808 | ## | |
2809 | # @Memdev: | |
2810 | # | |
2811 | # Information about memory backend | |
2812 | # | |
2813 | # @id: backend's ID if backend has 'id' property (since 2.9) | |
2814 | # | |
2815 | # @size: memory backend size | |
2816 | # | |
2817 | # @merge: enables or disables memory merge support | |
2818 | # | |
2819 | # @dump: includes memory backend's memory in a core dump or not | |
2820 | # | |
2821 | # @prealloc: enables or disables memory preallocation | |
2822 | # | |
2823 | # @host-nodes: host nodes for its memory policy | |
2824 | # | |
2825 | # @policy: memory policy of memory backend | |
2826 | # | |
2827 | # Since: 2.1 | |
2828 | ## | |
2829 | { 'struct': 'Memdev', | |
2830 | 'data': { | |
2831 | '*id': 'str', | |
2832 | 'size': 'size', | |
2833 | 'merge': 'bool', | |
2834 | 'dump': 'bool', | |
2835 | 'prealloc': 'bool', | |
2836 | 'host-nodes': ['uint16'], | |
2837 | 'policy': 'HostMemPolicy' }} | |
2838 | ||
2839 | ## | |
2840 | # @query-memdev: | |
2841 | # | |
2842 | # Returns information for all memory backends. | |
2843 | # | |
2844 | # Returns: a list of @Memdev. | |
2845 | # | |
2846 | # Since: 2.1 | |
2847 | # | |
2848 | # Example: | |
2849 | # | |
2850 | # -> { "execute": "query-memdev" } | |
2851 | # <- { "return": [ | |
2852 | # { | |
2853 | # "id": "mem1", | |
2854 | # "size": 536870912, | |
2855 | # "merge": false, | |
2856 | # "dump": true, | |
2857 | # "prealloc": false, | |
2858 | # "host-nodes": [0, 1], | |
2859 | # "policy": "bind" | |
2860 | # }, | |
2861 | # { | |
2862 | # "size": 536870912, | |
2863 | # "merge": false, | |
2864 | # "dump": true, | |
2865 | # "prealloc": true, | |
2866 | # "host-nodes": [2, 3], | |
2867 | # "policy": "preferred" | |
2868 | # } | |
2869 | # ] | |
2870 | # } | |
2871 | # | |
2872 | ## | |
a87706c8 | 2873 | { 'command': 'query-memdev', 'returns': ['Memdev'], 'allow-preconfig': true } |
112ed241 MA |
2874 | |
2875 | ## | |
2876 | # @PCDIMMDeviceInfo: | |
2877 | # | |
2878 | # PCDIMMDevice state information | |
2879 | # | |
2880 | # @id: device's ID | |
2881 | # | |
2882 | # @addr: physical address, where device is mapped | |
2883 | # | |
2884 | # @size: size of memory that the device provides | |
2885 | # | |
2886 | # @slot: slot number at which device is plugged in | |
2887 | # | |
2888 | # @node: NUMA node number where device is plugged in | |
2889 | # | |
2890 | # @memdev: memory backend linked with device | |
2891 | # | |
2892 | # @hotplugged: true if device was hotplugged | |
2893 | # | |
2894 | # @hotpluggable: true if device if could be added/removed while machine is running | |
2895 | # | |
2896 | # Since: 2.1 | |
2897 | ## | |
2898 | { 'struct': 'PCDIMMDeviceInfo', | |
2899 | 'data': { '*id': 'str', | |
2900 | 'addr': 'int', | |
2901 | 'size': 'int', | |
2902 | 'slot': 'int', | |
2903 | 'node': 'int', | |
2904 | 'memdev': 'str', | |
2905 | 'hotplugged': 'bool', | |
2906 | 'hotpluggable': 'bool' | |
2907 | } | |
2908 | } | |
2909 | ||
2910 | ## | |
2911 | # @MemoryDeviceInfo: | |
2912 | # | |
2913 | # Union containing information about a memory device | |
2914 | # | |
2915 | # Since: 2.1 | |
2916 | ## | |
6388e18d HZ |
2917 | { 'union': 'MemoryDeviceInfo', |
2918 | 'data': { 'dimm': 'PCDIMMDeviceInfo', | |
2919 | 'nvdimm': 'PCDIMMDeviceInfo' | |
2920 | } | |
2921 | } | |
112ed241 MA |
2922 | |
2923 | ## | |
2924 | # @query-memory-devices: | |
2925 | # | |
2926 | # Lists available memory devices and their state | |
2927 | # | |
2928 | # Since: 2.1 | |
2929 | # | |
2930 | # Example: | |
2931 | # | |
2932 | # -> { "execute": "query-memory-devices" } | |
2933 | # <- { "return": [ { "data": | |
2934 | # { "addr": 5368709120, | |
2935 | # "hotpluggable": true, | |
2936 | # "hotplugged": true, | |
2937 | # "id": "d1", | |
2938 | # "memdev": "/objects/memX", | |
2939 | # "node": 0, | |
2940 | # "size": 1073741824, | |
2941 | # "slot": 0}, | |
2942 | # "type": "dimm" | |
2943 | # } ] } | |
2944 | # | |
2945 | ## | |
2946 | { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] } | |
2947 | ||
2948 | ## | |
2949 | # @MEM_UNPLUG_ERROR: | |
2950 | # | |
2951 | # Emitted when memory hot unplug error occurs. | |
2952 | # | |
2953 | # @device: device name | |
2954 | # | |
2955 | # @msg: Informative message | |
2956 | # | |
2957 | # Since: 2.4 | |
2958 | # | |
2959 | # Example: | |
2960 | # | |
2961 | # <- { "event": "MEM_UNPLUG_ERROR" | |
2962 | # "data": { "device": "dimm1", | |
2963 | # "msg": "acpi: device unplug for unsupported device" | |
2964 | # }, | |
2965 | # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } | |
2966 | # | |
2967 | ## | |
2968 | { 'event': 'MEM_UNPLUG_ERROR', | |
2969 | 'data': { 'device': 'str', 'msg': 'str' } } | |
2970 | ||
2971 | ## | |
2972 | # @ACPISlotType: | |
2973 | # | |
2974 | # @DIMM: memory slot | |
2975 | # @CPU: logical CPU slot (since 2.7) | |
2976 | ## | |
2977 | { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] } | |
2978 | ||
2979 | ## | |
2980 | # @ACPIOSTInfo: | |
2981 | # | |
2982 | # OSPM Status Indication for a device | |
2983 | # For description of possible values of @source and @status fields | |
2984 | # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec. | |
2985 | # | |
2986 | # @device: device ID associated with slot | |
2987 | # | |
2988 | # @slot: slot ID, unique per slot of a given @slot-type | |
2989 | # | |
2990 | # @slot-type: type of the slot | |
2991 | # | |
2992 | # @source: an integer containing the source event | |
2993 | # | |
2994 | # @status: an integer containing the status code | |
2995 | # | |
2996 | # Since: 2.1 | |
2997 | ## | |
2998 | { 'struct': 'ACPIOSTInfo', | |
2999 | 'data' : { '*device': 'str', | |
3000 | 'slot': 'str', | |
3001 | 'slot-type': 'ACPISlotType', | |
3002 | 'source': 'int', | |
3003 | 'status': 'int' } } | |
3004 | ||
3005 | ## | |
3006 | # @query-acpi-ospm-status: | |
3007 | # | |
3008 | # Return a list of ACPIOSTInfo for devices that support status | |
3009 | # reporting via ACPI _OST method. | |
3010 | # | |
3011 | # Since: 2.1 | |
3012 | # | |
3013 | # Example: | |
3014 | # | |
3015 | # -> { "execute": "query-acpi-ospm-status" } | |
3016 | # <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0}, | |
3017 | # { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0}, | |
3018 | # { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0}, | |
3019 | # { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0} | |
3020 | # ]} | |
3021 | # | |
3022 | ## | |
3023 | { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] } | |
3024 | ||
3025 | ## | |
3026 | # @ACPI_DEVICE_OST: | |
3027 | # | |
3028 | # Emitted when guest executes ACPI _OST method. | |
3029 | # | |
eb815e24 | 3030 | # @info: OSPM Status Indication |
112ed241 MA |
3031 | # |
3032 | # Since: 2.1 | |
3033 | # | |
3034 | # Example: | |
3035 | # | |
3036 | # <- { "event": "ACPI_DEVICE_OST", | |
3037 | # "data": { "device": "d1", "slot": "0", | |
3038 | # "slot-type": "DIMM", "source": 1, "status": 0 } } | |
3039 | # | |
3040 | ## | |
3041 | { 'event': 'ACPI_DEVICE_OST', | |
3042 | 'data': { 'info': 'ACPIOSTInfo' } } | |
3043 | ||
3044 | ## | |
3045 | # @rtc-reset-reinjection: | |
3046 | # | |
3047 | # This command will reset the RTC interrupt reinjection backlog. | |
3048 | # Can be used if another mechanism to synchronize guest time | |
3049 | # is in effect, for example QEMU guest agent's guest-set-time | |
3050 | # command. | |
3051 | # | |
3052 | # Since: 2.1 | |
3053 | # | |
3054 | # Example: | |
3055 | # | |
3056 | # -> { "execute": "rtc-reset-reinjection" } | |
3057 | # <- { "return": {} } | |
3058 | # | |
3059 | ## | |
3060 | { 'command': 'rtc-reset-reinjection' } | |
3061 | ||
3062 | ## | |
3063 | # @RTC_CHANGE: | |
3064 | # | |
3065 | # Emitted when the guest changes the RTC time. | |
3066 | # | |
3067 | # @offset: offset between base RTC clock (as specified by -rtc base), and | |
3068 | # new RTC clock value | |
3069 | # | |
3070 | # Note: This event is rate-limited. | |
3071 | # | |
3072 | # Since: 0.13.0 | |
3073 | # | |
3074 | # Example: | |
3075 | # | |
3076 | # <- { "event": "RTC_CHANGE", | |
3077 | # "data": { "offset": 78 }, | |
3078 | # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } } | |
3079 | # | |
3080 | ## | |
3081 | { 'event': 'RTC_CHANGE', | |
3082 | 'data': { 'offset': 'int' } } | |
3083 | ||
3084 | ## | |
3085 | # @ReplayMode: | |
3086 | # | |
3087 | # Mode of the replay subsystem. | |
3088 | # | |
3089 | # @none: normal execution mode. Replay or record are not enabled. | |
3090 | # | |
3091 | # @record: record mode. All non-deterministic data is written into the | |
3092 | # replay log. | |
3093 | # | |
3094 | # @play: replay mode. Non-deterministic data required for system execution | |
3095 | # is read from the log. | |
3096 | # | |
3097 | # Since: 2.5 | |
3098 | ## | |
3099 | { 'enum': 'ReplayMode', | |
3100 | 'data': [ 'none', 'record', 'play' ] } | |
3101 | ||
3102 | ## | |
3103 | # @xen-load-devices-state: | |
3104 | # | |
3105 | # Load the state of all devices from file. The RAM and the block devices | |
3106 | # of the VM are not loaded by this command. | |
3107 | # | |
3108 | # @filename: the file to load the state of the devices from as binary | |
3109 | # data. See xen-save-devices-state.txt for a description of the binary | |
3110 | # format. | |
3111 | # | |
3112 | # Since: 2.7 | |
3113 | # | |
3114 | # Example: | |
3115 | # | |
3116 | # -> { "execute": "xen-load-devices-state", | |
3117 | # "arguments": { "filename": "/tmp/resume" } } | |
3118 | # <- { "return": {} } | |
3119 | # | |
3120 | ## | |
3121 | { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} } | |
3122 | ||
3123 | ## | |
3124 | # @GICCapability: | |
3125 | # | |
3126 | # The struct describes capability for a specific GIC (Generic | |
3127 | # Interrupt Controller) version. These bits are not only decided by | |
3128 | # QEMU/KVM software version, but also decided by the hardware that | |
3129 | # the program is running upon. | |
3130 | # | |
3131 | # @version: version of GIC to be described. Currently, only 2 and 3 | |
3132 | # are supported. | |
3133 | # | |
3134 | # @emulated: whether current QEMU/hardware supports emulated GIC | |
3135 | # device in user space. | |
3136 | # | |
3137 | # @kernel: whether current QEMU/hardware supports hardware | |
3138 | # accelerated GIC device in kernel. | |
3139 | # | |
3140 | # Since: 2.6 | |
3141 | ## | |
3142 | { 'struct': 'GICCapability', | |
3143 | 'data': { 'version': 'int', | |
3144 | 'emulated': 'bool', | |
3145 | 'kernel': 'bool' } } | |
3146 | ||
3147 | ## | |
3148 | # @query-gic-capabilities: | |
3149 | # | |
3150 | # This command is ARM-only. It will return a list of GICCapability | |
3151 | # objects that describe its capability bits. | |
3152 | # | |
3153 | # Returns: a list of GICCapability objects. | |
3154 | # | |
3155 | # Since: 2.6 | |
3156 | # | |
3157 | # Example: | |
3158 | # | |
3159 | # -> { "execute": "query-gic-capabilities" } | |
3160 | # <- { "return": [{ "version": 2, "emulated": true, "kernel": false }, | |
3161 | # { "version": 3, "emulated": false, "kernel": true } ] } | |
3162 | # | |
3163 | ## | |
3164 | { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] } | |
3165 | ||
3166 | ## | |
3167 | # @CpuInstanceProperties: | |
3168 | # | |
3169 | # List of properties to be used for hotplugging a CPU instance, | |
3170 | # it should be passed by management with device_add command when | |
3171 | # a CPU is being hotplugged. | |
3172 | # | |
3173 | # @node-id: NUMA node ID the CPU belongs to | |
3174 | # @socket-id: socket number within node/board the CPU belongs to | |
3175 | # @core-id: core number within socket the CPU belongs to | |
3176 | # @thread-id: thread number within core the CPU belongs to | |
3177 | # | |
3178 | # Note: currently there are 4 properties that could be present | |
3179 | # but management should be prepared to pass through other | |
3180 | # properties with device_add command to allow for future | |
3181 | # interface extension. This also requires the filed names to be kept in | |
3182 | # sync with the properties passed to -device/device_add. | |
3183 | # | |
3184 | # Since: 2.7 | |
3185 | ## | |
3186 | { 'struct': 'CpuInstanceProperties', | |
3187 | 'data': { '*node-id': 'int', | |
3188 | '*socket-id': 'int', | |
3189 | '*core-id': 'int', | |
3190 | '*thread-id': 'int' | |
3191 | } | |
3192 | } | |
3193 | ||
3194 | ## | |
3195 | # @HotpluggableCPU: | |
3196 | # | |
3197 | # @type: CPU object type for usage with device_add command | |
3198 | # @props: list of properties to be used for hotplugging CPU | |
3199 | # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides | |
3200 | # @qom-path: link to existing CPU object if CPU is present or | |
3201 | # omitted if CPU is not present. | |
3202 | # | |
3203 | # Since: 2.7 | |
3204 | ## | |
3205 | { 'struct': 'HotpluggableCPU', | |
3206 | 'data': { 'type': 'str', | |
3207 | 'vcpus-count': 'int', | |
3208 | 'props': 'CpuInstanceProperties', | |
3209 | '*qom-path': 'str' | |
3210 | } | |
3211 | } | |
3212 | ||
3213 | ## | |
3214 | # @query-hotpluggable-cpus: | |
3215 | # | |
3216 | # Returns: a list of HotpluggableCPU objects. | |
3217 | # | |
3218 | # Since: 2.7 | |
3219 | # | |
3220 | # Example: | |
3221 | # | |
3222 | # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8: | |
3223 | # | |
3224 | # -> { "execute": "query-hotpluggable-cpus" } | |
3225 | # <- {"return": [ | |
3226 | # { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core", | |
3227 | # "vcpus-count": 1 }, | |
3228 | # { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core", | |
3229 | # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"} | |
3230 | # ]}' | |
3231 | # | |
3232 | # For pc machine type started with -smp 1,maxcpus=2: | |
3233 | # | |
3234 | # -> { "execute": "query-hotpluggable-cpus" } | |
3235 | # <- {"return": [ | |
3236 | # { | |
3237 | # "type": "qemu64-x86_64-cpu", "vcpus-count": 1, | |
3238 | # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0} | |
3239 | # }, | |
3240 | # { | |
3241 | # "qom-path": "/machine/unattached/device[0]", | |
3242 | # "type": "qemu64-x86_64-cpu", "vcpus-count": 1, | |
3243 | # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0} | |
3244 | # } | |
3245 | # ]} | |
3246 | # | |
3247 | # For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2 -cpu qemu | |
3248 | # (Since: 2.11): | |
3249 | # | |
3250 | # -> { "execute": "query-hotpluggable-cpus" } | |
3251 | # <- {"return": [ | |
3252 | # { | |
3253 | # "type": "qemu-s390x-cpu", "vcpus-count": 1, | |
3254 | # "props": { "core-id": 1 } | |
3255 | # }, | |
3256 | # { | |
3257 | # "qom-path": "/machine/unattached/device[0]", | |
3258 | # "type": "qemu-s390x-cpu", "vcpus-count": 1, | |
3259 | # "props": { "core-id": 0 } | |
3260 | # } | |
3261 | # ]} | |
3262 | # | |
3263 | ## | |
899eaab4 IM |
3264 | { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'], |
3265 | 'allow-preconfig': true } | |
112ed241 MA |
3266 | |
3267 | ## | |
3268 | # @GuidInfo: | |
3269 | # | |
3270 | # GUID information. | |
3271 | # | |
3272 | # @guid: the globally unique identifier | |
3273 | # | |
3274 | # Since: 2.9 | |
3275 | ## | |
3276 | { 'struct': 'GuidInfo', 'data': {'guid': 'str'} } | |
3277 | ||
3278 | ## | |
3279 | # @query-vm-generation-id: | |
3280 | # | |
3281 | # Show Virtual Machine Generation ID | |
3282 | # | |
3283 | # Since: 2.9 | |
3284 | ## | |
3285 | { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' } | |
08a161fd BS |
3286 | |
3287 | ||
3288 | ## | |
3289 | # @SevState: | |
3290 | # | |
3291 | # An enumeration of SEV state information used during @query-sev. | |
3292 | # | |
3293 | # @uninit: The guest is uninitialized. | |
3294 | # | |
3295 | # @launch-update: The guest is currently being launched; plaintext data and | |
3296 | # register state is being imported. | |
3297 | # | |
3298 | # @launch-secret: The guest is currently being launched; ciphertext data | |
3299 | # is being imported. | |
3300 | # | |
3301 | # @running: The guest is fully launched or migrated in. | |
3302 | # | |
3303 | # @send-update: The guest is currently being migrated out to another machine. | |
3304 | # | |
3305 | # @receive-update: The guest is currently being migrated from another machine. | |
3306 | # | |
3307 | # Since: 2.12 | |
3308 | ## | |
3309 | { 'enum': 'SevState', | |
3310 | 'data': ['uninit', 'launch-update', 'launch-secret', 'running', | |
3311 | 'send-update', 'receive-update' ] } | |
3312 | ||
3313 | ## | |
3314 | # @SevInfo: | |
3315 | # | |
3316 | # Information about Secure Encrypted Virtualization (SEV) support | |
3317 | # | |
3318 | # @enabled: true if SEV is active | |
3319 | # | |
3320 | # @api-major: SEV API major version | |
3321 | # | |
3322 | # @api-minor: SEV API minor version | |
3323 | # | |
3324 | # @build-id: SEV FW build id | |
3325 | # | |
3326 | # @policy: SEV policy value | |
3327 | # | |
3328 | # @state: SEV guest state | |
3329 | # | |
3330 | # @handle: SEV firmware handle | |
3331 | # | |
3332 | # Since: 2.12 | |
3333 | ## | |
3334 | { 'struct': 'SevInfo', | |
3335 | 'data': { 'enabled': 'bool', | |
3336 | 'api-major': 'uint8', | |
3337 | 'api-minor' : 'uint8', | |
3338 | 'build-id' : 'uint8', | |
3339 | 'policy' : 'uint32', | |
3340 | 'state' : 'SevState', | |
3341 | 'handle' : 'uint32' | |
3342 | } | |
3343 | } | |
3344 | ||
3345 | ## | |
3346 | # @query-sev: | |
3347 | # | |
3348 | # Returns information about SEV | |
3349 | # | |
3350 | # Returns: @SevInfo | |
3351 | # | |
3352 | # Since: 2.12 | |
3353 | # | |
3354 | # Example: | |
3355 | # | |
3356 | # -> { "execute": "query-sev" } | |
3357 | # <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0, | |
3358 | # "build-id" : 0, "policy" : 0, "state" : "running", | |
3359 | # "handle" : 1 } } | |
3360 | # | |
3361 | ## | |
3362 | { 'command': 'query-sev', 'returns': 'SevInfo' } | |
1b6a034f BS |
3363 | |
3364 | ## | |
3365 | # @SevLaunchMeasureInfo: | |
3366 | # | |
3367 | # SEV Guest Launch measurement information | |
3368 | # | |
3369 | # @data: the measurement value encoded in base64 | |
3370 | # | |
3371 | # Since: 2.12 | |
3372 | # | |
3373 | ## | |
3374 | { 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'} } | |
3375 | ||
3376 | ## | |
3377 | # @query-sev-launch-measure: | |
3378 | # | |
3379 | # Query the SEV guest launch information. | |
3380 | # | |
3381 | # Returns: The @SevLaunchMeasureInfo for the guest | |
3382 | # | |
3383 | # Since: 2.12 | |
3384 | # | |
3385 | # Example: | |
3386 | # | |
3387 | # -> { "execute": "query-sev-launch-measure" } | |
3388 | # <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } } | |
3389 | # | |
3390 | ## | |
3391 | { 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo' } | |
31dd67f6 BS |
3392 | |
3393 | ## | |
3394 | # @SevCapability: | |
3395 | # | |
3396 | # The struct describes capability for a Secure Encrypted Virtualization | |
3397 | # feature. | |
3398 | # | |
3399 | # @pdh: Platform Diffie-Hellman key (base64 encoded) | |
3400 | # | |
3401 | # @cert-chain: PDH certificate chain (base64 encoded) | |
3402 | # | |
3403 | # @cbitpos: C-bit location in page table entry | |
3404 | # | |
3405 | # @reduced-phys-bits: Number of physical Address bit reduction when SEV is | |
3406 | # enabled | |
3407 | # | |
3408 | # Since: 2.12 | |
3409 | ## | |
3410 | { 'struct': 'SevCapability', | |
3411 | 'data': { 'pdh': 'str', | |
3412 | 'cert-chain': 'str', | |
3413 | 'cbitpos': 'int', | |
3414 | 'reduced-phys-bits': 'int'} } | |
3415 | ||
3416 | ## | |
3417 | # @query-sev-capabilities: | |
3418 | # | |
3419 | # This command is used to get the SEV capabilities, and is supported on AMD | |
3420 | # X86 platforms only. | |
3421 | # | |
3422 | # Returns: SevCapability objects. | |
3423 | # | |
3424 | # Since: 2.12 | |
3425 | # | |
3426 | # Example: | |
3427 | # | |
3428 | # -> { "execute": "query-sev-capabilities" } | |
3429 | # <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE", | |
3430 | # "cbitpos": 47, "reduced-phys-bits": 5}} | |
3431 | # | |
3432 | ## | |
3433 | { 'command': 'query-sev-capabilities', 'returns': 'SevCapability' } | |
8167d8bd EB |
3434 | |
3435 | ## | |
3436 | # @CommandDropReason: | |
3437 | # | |
3438 | # Reasons that caused one command to be dropped. | |
3439 | # | |
3440 | # @queue-full: the command queue is full. This can only occur when | |
3441 | # the client sends a new non-oob command before the | |
3442 | # response to the previous non-oob command has been | |
3443 | # received. | |
3444 | # | |
3445 | # Since: 2.12 | |
3446 | ## | |
3447 | { 'enum': 'CommandDropReason', | |
3448 | 'data': [ 'queue-full' ] } | |
3449 | ||
3450 | ## | |
3451 | # @COMMAND_DROPPED: | |
3452 | # | |
3453 | # Emitted when a command is dropped due to some reason. Commands can | |
3454 | # only be dropped when the oob capability is enabled. | |
3455 | # | |
3456 | # @id: The dropped command's "id" field. | |
d621cfe0 MA |
3457 | # FIXME Broken by design. Events are broadcast to all monitors. If |
3458 | # another monitor's client has a command with the same ID in flight, | |
3459 | # the event will incorrectly claim that command was dropped. | |
8167d8bd EB |
3460 | # |
3461 | # @reason: The reason why the command is dropped. | |
3462 | # | |
3463 | # Since: 2.12 | |
3464 | # | |
3465 | # Example: | |
3466 | # | |
3467 | # { "event": "COMMAND_DROPPED", | |
3468 | # "data": {"result": {"id": "libvirt-102", | |
3469 | # "reason": "queue-full" } } } | |
3470 | # | |
3471 | ## | |
3472 | { 'event': 'COMMAND_DROPPED' , | |
3473 | 'data': { 'id': 'any', 'reason': 'CommandDropReason' } } | |
469638f9 | 3474 | |
f3be6781 IM |
3475 | ## |
3476 | # @set-numa-node: | |
3477 | # | |
3478 | # Runtime equivalent of '-numa' CLI option, available at | |
3479 | # preconfigure stage to configure numa mapping before initializing | |
3480 | # machine. | |
3481 | # | |
3482 | # Since 3.0 | |
3483 | ## | |
3484 | { 'command': 'set-numa-node', 'boxed': true, | |
3485 | 'data': 'NumaOptions', | |
3486 | 'allow-preconfig': true | |
3487 | } |