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