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