]>
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 | # |
4d8bb958 MAL |
26 | # Please, refer to the QMP specification (docs/qmp-spec.txt) for |
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 | |
d34bda71 BC |
52 | # QAPI common definitions |
53 | { 'include': 'qapi/common.json' } | |
104059da | 54 | |
a090187d DB |
55 | # QAPI crypto definitions |
56 | { 'include': 'qapi/crypto.json' } | |
57 | ||
5db15096 BC |
58 | # QAPI block definitions |
59 | { 'include': 'qapi/block.json' } | |
60 | ||
82d72d9d WX |
61 | # QAPI event definitions |
62 | { 'include': 'qapi/event.json' } | |
63 | ||
1dde0f48 LV |
64 | # Tracing commands |
65 | { 'include': 'qapi/trace.json' } | |
66 | ||
39a18158 MA |
67 | # QAPI introspection |
68 | { 'include': 'qapi/introspect.json' } | |
69 | ||
d3a48372 MAL |
70 | ## |
71 | # = QMP commands | |
72 | ## | |
73 | ||
119ebac1 MAL |
74 | ## |
75 | # @qmp_capabilities: | |
76 | # | |
77 | # Enable QMP capabilities. | |
78 | # | |
79 | # Arguments: None. | |
80 | # | |
81 | # Example: | |
82 | # | |
83 | # -> { "execute": "qmp_capabilities" } | |
84 | # <- { "return": {} } | |
85 | # | |
86 | # Notes: This command is valid exactly when first connecting: it must be | |
87 | # issued before any other command will be accepted, and will fail once the | |
88 | # monitor is accepting other commands. (see qemu docs/qmp-spec.txt) | |
89 | # | |
90 | # Since: 0.13 | |
91 | # | |
92 | ## | |
93 | { 'command': 'qmp_capabilities' } | |
94 | ||
104059da | 95 | ## |
801db5ec | 96 | # @LostTickPolicy: |
104059da PB |
97 | # |
98 | # Policy for handling lost ticks in timer devices. | |
99 | # | |
100 | # @discard: throw away the missed tick(s) and continue with future injection | |
101 | # normally. Guest time may be delayed, unless the OS has explicit | |
102 | # handling of lost ticks | |
103 | # | |
104 | # @delay: continue to deliver ticks at the normal rate. Guest time will be | |
105 | # delayed due to the late tick | |
106 | # | |
107 | # @merge: merge the missed tick(s) into one tick and inject. Guest time | |
108 | # may be delayed, depending on how the OS reacts to the merging | |
109 | # of ticks | |
110 | # | |
111 | # @slew: deliver ticks at a higher rate to catch up with the missed tick. The | |
112 | # guest time should not be delayed once catchup is complete. | |
113 | # | |
114 | # Since: 2.0 | |
115 | ## | |
116 | { 'enum': 'LostTickPolicy', | |
117 | 'data': ['discard', 'delay', 'merge', 'slew' ] } | |
118 | ||
49687ace | 119 | ## |
5072f7b3 | 120 | # @add_client: |
b224e5e2 LC |
121 | # |
122 | # Allow client connections for VNC, Spice and socket based | |
123 | # character devices to be passed in to QEMU via SCM_RIGHTS. | |
124 | # | |
125 | # @protocol: protocol name. Valid names are "vnc", "spice" or the | |
126 | # name of a character device (eg. from -chardev id=XXXX) | |
127 | # | |
128 | # @fdname: file descriptor name previously passed via 'getfd' command | |
129 | # | |
130 | # @skipauth: #optional whether to skip authentication. Only applies | |
131 | # to "vnc" and "spice" protocols | |
132 | # | |
133 | # @tls: #optional whether to perform TLS. Only applies to the "spice" | |
134 | # protocol | |
135 | # | |
136 | # Returns: nothing on success. | |
137 | # | |
138 | # Since: 0.14.0 | |
65ce54f5 MAL |
139 | # |
140 | # Example: | |
141 | # | |
142 | # -> { "execute": "add_client", "arguments": { "protocol": "vnc", | |
143 | # "fdname": "myclient" } } | |
144 | # <- { "return": {} } | |
145 | # | |
b224e5e2 LC |
146 | ## |
147 | { 'command': 'add_client', | |
148 | 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool', | |
149 | '*tls': 'bool' } } | |
150 | ||
48a32bed AL |
151 | ## |
152 | # @NameInfo: | |
153 | # | |
154 | # Guest name information. | |
155 | # | |
156 | # @name: #optional The name of the guest | |
157 | # | |
5072f7b3 | 158 | # Since: 0.14.0 |
48a32bed | 159 | ## |
895a2a80 | 160 | { 'struct': 'NameInfo', 'data': {'*name': 'str'} } |
48a32bed AL |
161 | |
162 | ## | |
163 | # @query-name: | |
164 | # | |
165 | # Return the name information of a guest. | |
166 | # | |
167 | # Returns: @NameInfo of the guest | |
168 | # | |
5072f7b3 | 169 | # Since: 0.14.0 |
3aa4c6cd MAL |
170 | # |
171 | # Example: | |
172 | # | |
173 | # -> { "execute": "query-name" } | |
174 | # <- { "return": { "name": "qemu-name" } } | |
175 | # | |
48a32bed AL |
176 | ## |
177 | { 'command': 'query-name', 'returns': 'NameInfo' } | |
b9c15f16 | 178 | |
292a2602 LC |
179 | ## |
180 | # @KvmInfo: | |
181 | # | |
182 | # Information about support for KVM acceleration | |
183 | # | |
184 | # @enabled: true if KVM acceleration is active | |
185 | # | |
186 | # @present: true if KVM acceleration is built into this executable | |
187 | # | |
188 | # Since: 0.14.0 | |
189 | ## | |
895a2a80 | 190 | { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} } |
292a2602 LC |
191 | |
192 | ## | |
193 | # @query-kvm: | |
194 | # | |
195 | # Returns information about KVM acceleration | |
196 | # | |
197 | # Returns: @KvmInfo | |
198 | # | |
199 | # Since: 0.14.0 | |
b4f65cd2 MAL |
200 | # |
201 | # Example: | |
202 | # | |
203 | # -> { "execute": "query-kvm" } | |
204 | # <- { "return": { "enabled": true, "present": true } } | |
205 | # | |
292a2602 LC |
206 | ## |
207 | { 'command': 'query-kvm', 'returns': 'KvmInfo' } | |
208 | ||
1fa9a5e4 | 209 | ## |
5072f7b3 | 210 | # @RunState: |
1fa9a5e4 | 211 | # |
6932a69b | 212 | # An enumeration of VM run states. |
1fa9a5e4 LC |
213 | # |
214 | # @debug: QEMU is running on a debugger | |
215 | # | |
0a24c7b1 LC |
216 | # @finish-migrate: guest is paused to finish the migration process |
217 | # | |
1e998146 PB |
218 | # @inmigrate: guest is paused waiting for an incoming migration. Note |
219 | # that this state does not tell whether the machine will start at the | |
220 | # end of the migration. This depends on the command-line -S option and | |
221 | # any invocation of 'stop' or 'cont' that has happened since QEMU was | |
222 | # started. | |
1fa9a5e4 LC |
223 | # |
224 | # @internal-error: An internal error that prevents further guest execution | |
225 | # has occurred | |
226 | # | |
227 | # @io-error: the last IOP has failed and the device is configured to pause | |
228 | # on I/O errors | |
229 | # | |
230 | # @paused: guest has been paused via the 'stop' command | |
231 | # | |
232 | # @postmigrate: guest is paused following a successful 'migrate' | |
233 | # | |
234 | # @prelaunch: QEMU was started with -S and guest has not started | |
235 | # | |
1fa9a5e4 LC |
236 | # @restore-vm: guest is paused to restore VM state |
237 | # | |
238 | # @running: guest is actively running | |
239 | # | |
240 | # @save-vm: guest is paused to save the VM state | |
241 | # | |
242 | # @shutdown: guest is shut down (and -no-shutdown is in use) | |
243 | # | |
ad02b96a LC |
244 | # @suspended: guest is suspended (ACPI S3) |
245 | # | |
1fa9a5e4 | 246 | # @watchdog: the watchdog action is configured to pause and has been triggered |
ede085b3 HT |
247 | # |
248 | # @guest-panicked: guest has been panicked as a result of guest OS panic | |
21142ba7 | 249 | # |
252093a7 HZ |
250 | # @colo: guest is paused to save/restore VM state under colo checkpoint, |
251 | # VM can not get into this state unless colo capability is enabled | |
252 | # for migration. (since 2.8) | |
1fa9a5e4 LC |
253 | ## |
254 | { 'enum': 'RunState', | |
255 | 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused', | |
256 | 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm', | |
ede085b3 | 257 | 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog', |
21142ba7 | 258 | 'guest-panicked', 'colo' ] } |
1fa9a5e4 LC |
259 | |
260 | ## | |
261 | # @StatusInfo: | |
262 | # | |
263 | # Information about VCPU run state | |
264 | # | |
265 | # @running: true if all VCPUs are runnable, false if not runnable | |
266 | # | |
267 | # @singlestep: true if VCPUs are in single-step mode | |
268 | # | |
269 | # @status: the virtual machine @RunState | |
270 | # | |
271 | # Since: 0.14.0 | |
272 | # | |
273 | # Notes: @singlestep is enabled through the GDB stub | |
274 | ## | |
895a2a80 | 275 | { 'struct': 'StatusInfo', |
1fa9a5e4 LC |
276 | 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} } |
277 | ||
278 | ## | |
279 | # @query-status: | |
280 | # | |
281 | # Query the run status of all VCPUs | |
282 | # | |
283 | # Returns: @StatusInfo reflecting all VCPUs | |
284 | # | |
285 | # Since: 0.14.0 | |
477bc1e4 MAL |
286 | # |
287 | # Example: | |
288 | # | |
289 | # -> { "execute": "query-status" } | |
290 | # <- { "return": { "running": true, | |
291 | # "singlestep": false, | |
292 | # "status": "running" } } | |
293 | # | |
1fa9a5e4 LC |
294 | ## |
295 | { 'command': 'query-status', 'returns': 'StatusInfo' } | |
296 | ||
efab767e LC |
297 | ## |
298 | # @UuidInfo: | |
299 | # | |
0ed90f77 | 300 | # Guest UUID information (Universally Unique Identifier). |
efab767e LC |
301 | # |
302 | # @UUID: the UUID of the guest | |
303 | # | |
304 | # Since: 0.14.0 | |
305 | # | |
306 | # Notes: If no UUID was specified for the guest, a null UUID is returned. | |
307 | ## | |
895a2a80 | 308 | { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} } |
efab767e LC |
309 | |
310 | ## | |
311 | # @query-uuid: | |
312 | # | |
313 | # Query the guest UUID information. | |
314 | # | |
315 | # Returns: The @UuidInfo for the guest | |
316 | # | |
5072f7b3 | 317 | # Since: 0.14.0 |
0ed90f77 MAL |
318 | # |
319 | # Example: | |
320 | # | |
321 | # -> { "execute": "query-uuid" } | |
322 | # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } } | |
323 | # | |
efab767e LC |
324 | ## |
325 | { 'command': 'query-uuid', 'returns': 'UuidInfo' } | |
326 | ||
c5a415a0 LC |
327 | ## |
328 | # @ChardevInfo: | |
329 | # | |
330 | # Information about a character device. | |
331 | # | |
332 | # @label: the label of the character device | |
333 | # | |
334 | # @filename: the filename of the character device | |
335 | # | |
32a97ea1 LE |
336 | # @frontend-open: shows whether the frontend device attached to this backend |
337 | # (eg. with the chardev=... option) is in open or closed state | |
338 | # (since 2.1) | |
339 | # | |
c5a415a0 LC |
340 | # Notes: @filename is encoded using the QEMU command line character device |
341 | # encoding. See the QEMU man page for details. | |
342 | # | |
343 | # Since: 0.14.0 | |
344 | ## | |
895a2a80 | 345 | { 'struct': 'ChardevInfo', 'data': {'label': 'str', |
32a97ea1 LE |
346 | 'filename': 'str', |
347 | 'frontend-open': 'bool'} } | |
c5a415a0 LC |
348 | |
349 | ## | |
350 | # @query-chardev: | |
351 | # | |
352 | # Returns information about current character devices. | |
353 | # | |
354 | # Returns: a list of @ChardevInfo | |
355 | # | |
356 | # Since: 0.14.0 | |
4055aa8d MAL |
357 | # |
358 | # Example: | |
359 | # | |
360 | # -> { "execute": "query-chardev" } | |
361 | # <- { | |
362 | # "return": [ | |
363 | # { | |
364 | # "label": "charchannel0", | |
365 | # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server", | |
366 | # "frontend-open": false | |
367 | # }, | |
368 | # { | |
369 | # "label": "charmonitor", | |
370 | # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server", | |
371 | # "frontend-open": true | |
372 | # }, | |
373 | # { | |
374 | # "label": "charserial0", | |
375 | # "filename": "pty:/dev/pts/2", | |
376 | # "frontend-open": true | |
377 | # } | |
378 | # ] | |
379 | # } | |
380 | # | |
c5a415a0 LC |
381 | ## |
382 | { 'command': 'query-chardev', 'returns': ['ChardevInfo'] } | |
aa9b79bc | 383 | |
77d1c3c6 MK |
384 | ## |
385 | # @ChardevBackendInfo: | |
386 | # | |
387 | # Information about a character device backend | |
388 | # | |
389 | # @name: The backend name | |
390 | # | |
391 | # Since: 2.0 | |
392 | ## | |
895a2a80 | 393 | { 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} } |
77d1c3c6 MK |
394 | |
395 | ## | |
396 | # @query-chardev-backends: | |
397 | # | |
398 | # Returns information about character device backends. | |
399 | # | |
400 | # Returns: a list of @ChardevBackendInfo | |
401 | # | |
402 | # Since: 2.0 | |
90e365c0 MAL |
403 | # |
404 | # Example: | |
405 | # | |
406 | # -> { "execute": "query-chardev-backends" } | |
407 | # <- { | |
408 | # "return":[ | |
409 | # { | |
410 | # "name":"udp" | |
411 | # }, | |
412 | # { | |
413 | # "name":"tcp" | |
414 | # }, | |
415 | # { | |
416 | # "name":"unix" | |
417 | # }, | |
418 | # { | |
419 | # "name":"spiceport" | |
420 | # } | |
421 | # ] | |
422 | # } | |
423 | # | |
77d1c3c6 MK |
424 | ## |
425 | { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] } | |
426 | ||
1f590cf9 LL |
427 | ## |
428 | # @DataFormat: | |
429 | # | |
430 | # An enumeration of data format. | |
431 | # | |
3949e594 | 432 | # @utf8: Data is a UTF-8 string (RFC 3629) |
1f590cf9 | 433 | # |
3949e594 | 434 | # @base64: Data is Base64 encoded binary (RFC 3548) |
1f590cf9 LL |
435 | # |
436 | # Since: 1.4 | |
437 | ## | |
ad0f171e | 438 | { 'enum': 'DataFormat', |
1f590cf9 LL |
439 | 'data': [ 'utf8', 'base64' ] } |
440 | ||
441 | ## | |
3949e594 | 442 | # @ringbuf-write: |
1f590cf9 | 443 | # |
3949e594 | 444 | # Write to a ring buffer character device. |
1f590cf9 | 445 | # |
3949e594 | 446 | # @device: the ring buffer character device name |
1f590cf9 | 447 | # |
3949e594 | 448 | # @data: data to write |
1f590cf9 | 449 | # |
3949e594 MA |
450 | # @format: #optional data encoding (default 'utf8'). |
451 | # - base64: data must be base64 encoded text. Its binary | |
452 | # decoding gets written. | |
3949e594 MA |
453 | # - utf8: data's UTF-8 encoding is written |
454 | # - data itself is always Unicode regardless of format, like | |
455 | # any other string. | |
1f590cf9 LL |
456 | # |
457 | # Returns: Nothing on success | |
1f590cf9 LL |
458 | # |
459 | # Since: 1.4 | |
a4143a84 MAL |
460 | # |
461 | # Example: | |
462 | # | |
463 | # -> { "execute": "ringbuf-write", | |
464 | # "arguments": { "device": "foo", | |
465 | # "data": "abcdefgh", | |
466 | # "format": "utf8" } } | |
467 | # <- { "return": {} } | |
468 | # | |
1f590cf9 | 469 | ## |
3949e594 | 470 | { 'command': 'ringbuf-write', |
82e59a67 | 471 | 'data': {'device': 'str', 'data': 'str', |
1f590cf9 LL |
472 | '*format': 'DataFormat'} } |
473 | ||
49b6d722 | 474 | ## |
3949e594 | 475 | # @ringbuf-read: |
49b6d722 | 476 | # |
3949e594 | 477 | # Read from a ring buffer character device. |
49b6d722 | 478 | # |
3949e594 | 479 | # @device: the ring buffer character device name |
49b6d722 | 480 | # |
3949e594 | 481 | # @size: how many bytes to read at most |
49b6d722 | 482 | # |
3949e594 MA |
483 | # @format: #optional data encoding (default 'utf8'). |
484 | # - base64: the data read is returned in base64 encoding. | |
485 | # - utf8: the data read is interpreted as UTF-8. | |
486 | # Bug: can screw up when the buffer contains invalid UTF-8 | |
487 | # sequences, NUL characters, after the ring buffer lost | |
488 | # data, and when reading stops because the size limit is | |
489 | # reached. | |
490 | # - The return value is always Unicode regardless of format, | |
491 | # like any other string. | |
49b6d722 | 492 | # |
3ab651fc | 493 | # Returns: data read from the device |
49b6d722 LL |
494 | # |
495 | # Since: 1.4 | |
4f19a01b MAL |
496 | # |
497 | # Example: | |
498 | # | |
499 | # -> { "execute": "ringbuf-read", | |
500 | # "arguments": { "device": "foo", | |
501 | # "size": 1000, | |
502 | # "format": "utf8" } } | |
503 | # <- { "return": "abcdefgh" } | |
504 | # | |
49b6d722 | 505 | ## |
3949e594 | 506 | { 'command': 'ringbuf-read', |
49b6d722 | 507 | 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'}, |
3ab651fc | 508 | 'returns': 'str' } |
49b6d722 | 509 | |
4860853d DB |
510 | ## |
511 | # @EventInfo: | |
512 | # | |
513 | # Information about a QMP event | |
514 | # | |
515 | # @name: The event name | |
516 | # | |
517 | # Since: 1.2.0 | |
518 | ## | |
895a2a80 | 519 | { 'struct': 'EventInfo', 'data': {'name': 'str'} } |
4860853d DB |
520 | |
521 | ## | |
522 | # @query-events: | |
523 | # | |
524 | # Return a list of supported QMP events by this server | |
525 | # | |
526 | # Returns: A list of @EventInfo for all supported events | |
527 | # | |
528 | # Since: 1.2.0 | |
66c2f5a5 MAL |
529 | # |
530 | # Example: | |
531 | # | |
532 | # -> { "execute": "query-events" } | |
533 | # <- { | |
534 | # "return": [ | |
535 | # { | |
536 | # "name":"SHUTDOWN" | |
537 | # }, | |
538 | # { | |
539 | # "name":"RESET" | |
540 | # } | |
541 | # ] | |
542 | # } | |
543 | # | |
544 | # Note: This example has been shortened as the real response is too long. | |
545 | # | |
4860853d DB |
546 | ## |
547 | { 'command': 'query-events', 'returns': ['EventInfo'] } | |
548 | ||
791e7c82 | 549 | ## |
5072f7b3 | 550 | # @MigrationStats: |
791e7c82 LC |
551 | # |
552 | # Detailed migration status. | |
553 | # | |
554 | # @transferred: amount of bytes already transferred to the target VM | |
555 | # | |
556 | # @remaining: amount of bytes remaining to be transferred to the target VM | |
557 | # | |
558 | # @total: total amount of bytes involved in the migration process | |
559 | # | |
f1c72795 PL |
560 | # @duplicate: number of duplicate (zero) pages (since 1.2) |
561 | # | |
562 | # @skipped: number of skipped zero pages (since 1.5) | |
004d4c10 | 563 | # |
5072f7b3 | 564 | # @normal: number of normal pages (since 1.2) |
004d4c10 | 565 | # |
8d017193 JQ |
566 | # @normal-bytes: number of normal bytes sent (since 1.2) |
567 | # | |
568 | # @dirty-pages-rate: number of pages dirtied by second by the | |
569 | # guest (since 1.3) | |
004d4c10 | 570 | # |
7e114f8c MH |
571 | # @mbps: throughput in megabits/sec. (since 1.6) |
572 | # | |
58570ed8 C |
573 | # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1) |
574 | # | |
d3bf5418 DDAG |
575 | # @postcopy-requests: The number of page requests received from the destination |
576 | # (since 2.7) | |
577 | # | |
004d4c10 | 578 | # Since: 0.14.0 |
791e7c82 | 579 | ## |
895a2a80 | 580 | { 'struct': 'MigrationStats', |
d5f8a570 | 581 | 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' , |
f1c72795 | 582 | 'duplicate': 'int', 'skipped': 'int', 'normal': 'int', |
7e114f8c | 583 | 'normal-bytes': 'int', 'dirty-pages-rate' : 'int', |
d3bf5418 DDAG |
584 | 'mbps' : 'number', 'dirty-sync-count' : 'int', |
585 | 'postcopy-requests' : 'int' } } | |
791e7c82 | 586 | |
f36d55af | 587 | ## |
5072f7b3 | 588 | # @XBZRLECacheStats: |
f36d55af OW |
589 | # |
590 | # Detailed XBZRLE migration cache statistics | |
591 | # | |
592 | # @cache-size: XBZRLE cache size | |
593 | # | |
594 | # @bytes: amount of bytes already transferred to the target VM | |
595 | # | |
596 | # @pages: amount of pages transferred to the target VM | |
597 | # | |
598 | # @cache-miss: number of cache miss | |
599 | # | |
8bc39233 C |
600 | # @cache-miss-rate: rate of cache miss (since 2.1) |
601 | # | |
f36d55af OW |
602 | # @overflow: number of overflows |
603 | # | |
604 | # Since: 1.2 | |
605 | ## | |
895a2a80 | 606 | { 'struct': 'XBZRLECacheStats', |
f36d55af | 607 | 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int', |
8bc39233 C |
608 | 'cache-miss': 'int', 'cache-miss-rate': 'number', |
609 | 'overflow': 'int' } } | |
f36d55af | 610 | |
49687ace | 611 | ## |
24b8c39b HZ |
612 | # @MigrationStatus: |
613 | # | |
614 | # An enumeration of migration status. | |
615 | # | |
616 | # @none: no migration has ever happened. | |
617 | # | |
618 | # @setup: migration process has been initiated. | |
619 | # | |
620 | # @cancelling: in the process of cancelling migration. | |
621 | # | |
622 | # @cancelled: cancelling migration is finished. | |
623 | # | |
624 | # @active: in the process of doing migration. | |
625 | # | |
9ec055ae DDAG |
626 | # @postcopy-active: like active, but now in postcopy mode. (since 2.5) |
627 | # | |
24b8c39b HZ |
628 | # @completed: migration is finished. |
629 | # | |
630 | # @failed: some error occurred during migration process. | |
631 | # | |
252093a7 HZ |
632 | # @colo: VM is in the process of fault tolerance, VM can not get into this |
633 | # state unless colo capability is enabled for migration. (since 2.8) | |
0b827d5e | 634 | # |
24b8c39b HZ |
635 | # Since: 2.3 |
636 | # | |
637 | ## | |
638 | { 'enum': 'MigrationStatus', | |
639 | 'data': [ 'none', 'setup', 'cancelling', 'cancelled', | |
0b827d5e | 640 | 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] } |
24b8c39b | 641 | |
791e7c82 | 642 | ## |
5072f7b3 | 643 | # @MigrationInfo: |
791e7c82 LC |
644 | # |
645 | # Information about current migration process. | |
646 | # | |
24b8c39b HZ |
647 | # @status: #optional @MigrationStatus describing the current migration status. |
648 | # If this field is not returned, no migration process | |
791e7c82 LC |
649 | # has been initiated |
650 | # | |
d5f8a570 JQ |
651 | # @ram: #optional @MigrationStats containing detailed migration |
652 | # status, only returned if status is 'active' or | |
24b8c39b | 653 | # 'completed'(since 1.2) |
791e7c82 LC |
654 | # |
655 | # @disk: #optional @MigrationStats containing detailed disk migration | |
656 | # status, only returned if status is 'active' and it is a block | |
657 | # migration | |
658 | # | |
f36d55af OW |
659 | # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE |
660 | # migration statistics, only returned if XBZRLE feature is on and | |
661 | # status is 'active' or 'completed' (since 1.2) | |
662 | # | |
7aa939af JQ |
663 | # @total-time: #optional total amount of milliseconds since migration started. |
664 | # If migration has ended, it returns the total migration | |
665 | # time. (since 1.2) | |
666 | # | |
9c5a9fcf JQ |
667 | # @downtime: #optional only present when migration finishes correctly |
668 | # total downtime in milliseconds for the guest. | |
669 | # (since 1.3) | |
670 | # | |
2c52ddf1 JQ |
671 | # @expected-downtime: #optional only present while migration is active |
672 | # expected downtime in milliseconds for the guest in last walk | |
673 | # of the dirty bitmap. (since 1.3) | |
674 | # | |
ed4fbd10 MH |
675 | # @setup-time: #optional amount of setup time in milliseconds _before_ the |
676 | # iterations begin but _after_ the QMP command is issued. This is designed | |
677 | # to provide an accounting of any activities (such as RDMA pinning) which | |
678 | # may be expensive, but do not actually occur during the iterative | |
679 | # migration rounds themselves. (since 1.6) | |
680 | # | |
d85a31d1 JH |
681 | # @cpu-throttle-percentage: #optional percentage of time guest cpus are being |
682 | # throttled during auto-converge. This is only present when auto-converge | |
683 | # has started throttling guest cpus. (Since 2.7) | |
4782893e | 684 | # |
d59ce6f3 DB |
685 | # @error-desc: #optional the human readable error description string, when |
686 | # @status is 'failed'. Clients should not attempt to parse the | |
bdbba12b | 687 | # error strings. (Since 2.7) |
d59ce6f3 | 688 | # |
791e7c82 LC |
689 | # Since: 0.14.0 |
690 | ## | |
895a2a80 | 691 | { 'struct': 'MigrationInfo', |
24b8c39b | 692 | 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats', |
f36d55af | 693 | '*disk': 'MigrationStats', |
7aa939af | 694 | '*xbzrle-cache': 'XBZRLECacheStats', |
9c5a9fcf | 695 | '*total-time': 'int', |
2c52ddf1 | 696 | '*expected-downtime': 'int', |
ed4fbd10 | 697 | '*downtime': 'int', |
4782893e | 698 | '*setup-time': 'int', |
d59ce6f3 DB |
699 | '*cpu-throttle-percentage': 'int', |
700 | '*error-desc': 'str'} } | |
791e7c82 LC |
701 | |
702 | ## | |
5072f7b3 | 703 | # @query-migrate: |
791e7c82 | 704 | # |
104b1caf MAL |
705 | # Returns information about current migration process. If migration |
706 | # is active there will be another json-object with RAM migration | |
707 | # status and if block migration is active another one with block | |
708 | # migration status. | |
791e7c82 LC |
709 | # |
710 | # Returns: @MigrationInfo | |
711 | # | |
712 | # Since: 0.14.0 | |
104b1caf MAL |
713 | # |
714 | # Example: | |
715 | # | |
716 | # 1. Before the first migration | |
717 | # | |
718 | # -> { "execute": "query-migrate" } | |
719 | # <- { "return": {} } | |
720 | # | |
721 | # 2. Migration is done and has succeeded | |
722 | # | |
723 | # -> { "execute": "query-migrate" } | |
724 | # <- { "return": { | |
725 | # "status": "completed", | |
726 | # "ram":{ | |
727 | # "transferred":123, | |
728 | # "remaining":123, | |
729 | # "total":246, | |
730 | # "total-time":12345, | |
731 | # "setup-time":12345, | |
732 | # "downtime":12345, | |
733 | # "duplicate":123, | |
734 | # "normal":123, | |
735 | # "normal-bytes":123456, | |
736 | # "dirty-sync-count":15 | |
737 | # } | |
738 | # } | |
739 | # } | |
740 | # | |
741 | # 3. Migration is done and has failed | |
742 | # | |
743 | # -> { "execute": "query-migrate" } | |
744 | # <- { "return": { "status": "failed" } } | |
745 | # | |
746 | # 4. Migration is being performed and is not a block migration: | |
747 | # | |
748 | # -> { "execute": "query-migrate" } | |
749 | # <- { | |
750 | # "return":{ | |
751 | # "status":"active", | |
752 | # "ram":{ | |
753 | # "transferred":123, | |
754 | # "remaining":123, | |
755 | # "total":246, | |
756 | # "total-time":12345, | |
757 | # "setup-time":12345, | |
758 | # "expected-downtime":12345, | |
759 | # "duplicate":123, | |
760 | # "normal":123, | |
761 | # "normal-bytes":123456, | |
762 | # "dirty-sync-count":15 | |
763 | # } | |
764 | # } | |
765 | # } | |
766 | # | |
767 | # 5. Migration is being performed and is a block migration: | |
768 | # | |
769 | # -> { "execute": "query-migrate" } | |
770 | # <- { | |
771 | # "return":{ | |
772 | # "status":"active", | |
773 | # "ram":{ | |
774 | # "total":1057024, | |
775 | # "remaining":1053304, | |
776 | # "transferred":3720, | |
777 | # "total-time":12345, | |
778 | # "setup-time":12345, | |
779 | # "expected-downtime":12345, | |
780 | # "duplicate":123, | |
781 | # "normal":123, | |
782 | # "normal-bytes":123456, | |
783 | # "dirty-sync-count":15 | |
784 | # }, | |
785 | # "disk":{ | |
786 | # "total":20971520, | |
787 | # "remaining":20880384, | |
788 | # "transferred":91136 | |
789 | # } | |
790 | # } | |
791 | # } | |
792 | # | |
793 | # 6. Migration is being performed and XBZRLE is active: | |
794 | # | |
795 | # -> { "execute": "query-migrate" } | |
796 | # <- { | |
797 | # "return":{ | |
798 | # "status":"active", | |
799 | # "capabilities" : [ { "capability": "xbzrle", "state" : true } ], | |
800 | # "ram":{ | |
801 | # "total":1057024, | |
802 | # "remaining":1053304, | |
803 | # "transferred":3720, | |
804 | # "total-time":12345, | |
805 | # "setup-time":12345, | |
806 | # "expected-downtime":12345, | |
807 | # "duplicate":10, | |
808 | # "normal":3333, | |
809 | # "normal-bytes":3412992, | |
810 | # "dirty-sync-count":15 | |
811 | # }, | |
812 | # "xbzrle-cache":{ | |
813 | # "cache-size":67108864, | |
814 | # "bytes":20971520, | |
815 | # "pages":2444343, | |
816 | # "cache-miss":2244, | |
817 | # "cache-miss-rate":0.123, | |
818 | # "overflow":34434 | |
819 | # } | |
820 | # } | |
821 | # } | |
822 | # | |
791e7c82 LC |
823 | ## |
824 | { 'command': 'query-migrate', 'returns': 'MigrationInfo' } | |
825 | ||
bbf6da32 | 826 | ## |
5072f7b3 | 827 | # @MigrationCapability: |
bbf6da32 OW |
828 | # |
829 | # Migration capabilities enumeration | |
830 | # | |
831 | # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding). | |
832 | # This feature allows us to minimize migration traffic for certain work | |
833 | # loads, by sending compressed difference of the pages | |
834 | # | |
41310c68 | 835 | # @rdma-pin-all: Controls whether or not the entire VM memory footprint is |
60d9222c | 836 | # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage. |
41310c68 | 837 | # Disabled by default. (since 2.0) |
60d9222c | 838 | # |
323004a3 PL |
839 | # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This |
840 | # essentially saves 1MB of zeroes per block on the wire. Enabling requires | |
841 | # source and target VM to support this feature. To enable it is sufficient | |
842 | # to enable the capability on the source VM. The feature is disabled by | |
843 | # default. (since 1.6) | |
844 | # | |
dde4e694 LL |
845 | # @compress: Use multiple compression threads to accelerate live migration. |
846 | # This feature can help to reduce the migration traffic, by sending | |
847 | # compressed pages. Please note that if compress and xbzrle are both | |
848 | # on, compress only takes effect in the ram bulk stage, after that, | |
849 | # it will be disabled and only xbzrle takes effect, this can help to | |
850 | # minimize migration traffic. The feature is disabled by default. | |
851 | # (since 2.4 ) | |
852 | # | |
b05dc723 JQ |
853 | # @events: generate events for each migration state change |
854 | # (since 2.4 ) | |
855 | # | |
9781c371 JQ |
856 | # @auto-converge: If enabled, QEMU will automatically throttle down the guest |
857 | # to speed up convergence of RAM migration. (since 1.6) | |
858 | # | |
32c3db5b | 859 | # @postcopy-ram: Start executing on the migration target before all of RAM has |
53dd370c | 860 | # been migrated, pulling the remaining pages along as needed. NOTE: If |
32c3db5b | 861 | # the migration fails during postcopy the VM will fail. (since 2.6) |
53dd370c | 862 | # |
35a6ed4f HZ |
863 | # @x-colo: If enabled, migration will never end, and the state of the VM on the |
864 | # primary side will be migrated continuously to the VM on secondary | |
865 | # side, this process is called COarse-Grain LOck Stepping (COLO) for | |
866 | # Non-stop Service. (since 2.8) | |
867 | # | |
bbf6da32 OW |
868 | # Since: 1.2 |
869 | ## | |
870 | { 'enum': 'MigrationCapability', | |
dde4e694 | 871 | 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', |
35a6ed4f | 872 | 'compress', 'events', 'postcopy-ram', 'x-colo'] } |
bbf6da32 OW |
873 | |
874 | ## | |
5072f7b3 | 875 | # @MigrationCapabilityStatus: |
bbf6da32 OW |
876 | # |
877 | # Migration capability information | |
878 | # | |
879 | # @capability: capability enum | |
880 | # | |
881 | # @state: capability state bool | |
882 | # | |
883 | # Since: 1.2 | |
884 | ## | |
895a2a80 | 885 | { 'struct': 'MigrationCapabilityStatus', |
bbf6da32 OW |
886 | 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } } |
887 | ||
888 | ## | |
5072f7b3 | 889 | # @migrate-set-capabilities: |
00458433 OW |
890 | # |
891 | # Enable/Disable the following migration capabilities (like xbzrle) | |
892 | # | |
893 | # @capabilities: json array of capability modifications to make | |
894 | # | |
895 | # Since: 1.2 | |
0a0bb964 MAL |
896 | # |
897 | # Example: | |
898 | # | |
899 | # -> { "execute": "migrate-set-capabilities" , "arguments": | |
900 | # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } } | |
901 | # | |
00458433 OW |
902 | ## |
903 | { 'command': 'migrate-set-capabilities', | |
904 | 'data': { 'capabilities': ['MigrationCapabilityStatus'] } } | |
905 | ||
906 | ## | |
5072f7b3 | 907 | # @query-migrate-capabilities: |
bbf6da32 OW |
908 | # |
909 | # Returns information about the current migration capabilities status | |
910 | # | |
911 | # Returns: @MigrationCapabilitiesStatus | |
912 | # | |
913 | # Since: 1.2 | |
135b238e MAL |
914 | # |
915 | # Example: | |
916 | # | |
917 | # -> { "execute": "query-migrate-capabilities" } | |
918 | # <- { "return": [ | |
919 | # {"state": false, "capability": "xbzrle"}, | |
920 | # {"state": false, "capability": "rdma-pin-all"}, | |
921 | # {"state": false, "capability": "auto-converge"}, | |
922 | # {"state": false, "capability": "zero-blocks"}, | |
923 | # {"state": false, "capability": "compress"}, | |
924 | # {"state": true, "capability": "events"}, | |
925 | # {"state": false, "capability": "postcopy-ram"}, | |
926 | # {"state": false, "capability": "x-colo"} | |
927 | # ]} | |
928 | # | |
bbf6da32 OW |
929 | ## |
930 | { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']} | |
931 | ||
49687ace | 932 | ## |
5072f7b3 | 933 | # @MigrationParameter: |
43c60a81 LL |
934 | # |
935 | # Migration parameters enumeration | |
936 | # | |
937 | # @compress-level: Set the compression level to be used in live migration, | |
938 | # the compression level is an integer between 0 and 9, where 0 means | |
939 | # no compression, 1 means the best compression speed, and 9 means best | |
940 | # compression ratio which will consume more CPU. | |
941 | # | |
942 | # @compress-threads: Set compression thread count to be used in live migration, | |
943 | # the compression thread count is an integer between 1 and 255. | |
944 | # | |
945 | # @decompress-threads: Set decompression thread count to be used in live | |
946 | # migration, the decompression thread count is an integer between 1 | |
947 | # and 255. Usually, decompression is at least 4 times as fast as | |
948 | # compression, so set the decompress-threads to the number about 1/4 | |
949 | # of compress-threads is adequate. | |
950 | # | |
d85a31d1 JH |
951 | # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled |
952 | # when migration auto-converge is activated. The | |
953 | # default value is 20. (Since 2.7) | |
1626fee3 | 954 | # |
d85a31d1 JH |
955 | # @cpu-throttle-increment: throttle percentage increase each time |
956 | # auto-converge detects that migration is not making | |
957 | # progress. The default value is 10. (Since 2.7) | |
69ef1f36 DB |
958 | # |
959 | # @tls-creds: ID of the 'tls-creds' object that provides credentials for | |
960 | # establishing a TLS connection over the migration data channel. | |
961 | # On the outgoing side of the migration, the credentials must | |
962 | # be for a 'client' endpoint, while for the incoming side the | |
963 | # credentials must be for a 'server' endpoint. Setting this | |
964 | # will enable TLS for all migrations. The default is unset, | |
965 | # resulting in unsecured migration at the QEMU level. (Since 2.7) | |
966 | # | |
967 | # @tls-hostname: hostname of the target host for the migration. This is | |
968 | # required when using x509 based TLS credentials and the | |
969 | # migration URI does not already include a hostname. For | |
970 | # example if using fd: or exec: based migration, the | |
971 | # hostname must be provided so that the server's x509 | |
bdbba12b | 972 | # certificate identity can be validated. (Since 2.7) |
69ef1f36 | 973 | # |
2ff30257 AA |
974 | # @max-bandwidth: to set maximum speed for migration. maximum speed in |
975 | # bytes per second. (Since 2.8) | |
976 | # | |
977 | # @downtime-limit: set maximum tolerated downtime for migration. maximum | |
978 | # downtime in milliseconds (Since 2.8) | |
979 | # | |
68b53591 HZ |
980 | # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in |
981 | # periodic mode. (Since 2.8) | |
982 | # | |
43c60a81 LL |
983 | # Since: 2.4 |
984 | ## | |
985 | { 'enum': 'MigrationParameter', | |
1626fee3 | 986 | 'data': ['compress-level', 'compress-threads', 'decompress-threads', |
69ef1f36 | 987 | 'cpu-throttle-initial', 'cpu-throttle-increment', |
2ff30257 | 988 | 'tls-creds', 'tls-hostname', 'max-bandwidth', |
68b53591 | 989 | 'downtime-limit', 'x-checkpoint-delay' ] } |
43c60a81 | 990 | |
49687ace | 991 | ## |
5072f7b3 | 992 | # @migrate-set-parameters: |
85de8323 | 993 | # |
de63ab61 | 994 | # Set various migration parameters. See MigrationParameters for details. |
69ef1f36 | 995 | # |
85de8323 | 996 | # Since: 2.4 |
35db41e5 MAL |
997 | # |
998 | # Example: | |
999 | # | |
1000 | # -> { "execute": "migrate-set-parameters" , | |
1001 | # "arguments": { "compress-level": 1 } } | |
1002 | # | |
85de8323 | 1003 | ## |
7f375e04 | 1004 | { 'command': 'migrate-set-parameters', 'boxed': true, |
de63ab61 | 1005 | 'data': 'MigrationParameters' } |
85de8323 | 1006 | |
49687ace | 1007 | ## |
5072f7b3 | 1008 | # @MigrationParameters: |
85de8323 | 1009 | # |
de63ab61 EB |
1010 | # Optional members can be omitted on input ('migrate-set-parameters') |
1011 | # but most members will always be present on output | |
1012 | # ('query-migrate-parameters'), with the exception of tls-creds and | |
1013 | # tls-hostname. | |
85de8323 | 1014 | # |
de63ab61 | 1015 | # @compress-level: #optional compression level |
85de8323 | 1016 | # |
de63ab61 | 1017 | # @compress-threads: #optional compression thread count |
85de8323 | 1018 | # |
de63ab61 | 1019 | # @decompress-threads: #optional decompression thread count |
1626fee3 | 1020 | # |
de63ab61 EB |
1021 | # @cpu-throttle-initial: #optional Initial percentage of time guest cpus are |
1022 | # throttledwhen migration auto-converge is activated. | |
1023 | # The default value is 20. (Since 2.7) | |
1024 | # | |
1025 | # @cpu-throttle-increment: #optional throttle percentage increase each time | |
d85a31d1 JH |
1026 | # auto-converge detects that migration is not making |
1027 | # progress. The default value is 10. (Since 2.7) | |
1626fee3 | 1028 | # |
de63ab61 EB |
1029 | # @tls-creds: #optional ID of the 'tls-creds' object that provides credentials |
1030 | # for establishing a TLS connection over the migration data | |
1031 | # channel. On the outgoing side of the migration, the credentials | |
1032 | # must be for a 'client' endpoint, while for the incoming side the | |
69ef1f36 DB |
1033 | # credentials must be for a 'server' endpoint. Setting this |
1034 | # will enable TLS for all migrations. The default is unset, | |
bdbba12b | 1035 | # resulting in unsecured migration at the QEMU level. (Since 2.7) |
69ef1f36 | 1036 | # |
de63ab61 EB |
1037 | # @tls-hostname: #optional hostname of the target host for the migration. This |
1038 | # is required when using x509 based TLS credentials and the | |
69ef1f36 DB |
1039 | # migration URI does not already include a hostname. For |
1040 | # example if using fd: or exec: based migration, the | |
1041 | # hostname must be provided so that the server's x509 | |
bdbba12b | 1042 | # certificate identity can be validated. (Since 2.7) |
69ef1f36 | 1043 | # |
2ff30257 AA |
1044 | # @max-bandwidth: to set maximum speed for migration. maximum speed in |
1045 | # bytes per second. (Since 2.8) | |
1046 | # | |
1047 | # @downtime-limit: set maximum tolerated downtime for migration. maximum | |
1048 | # downtime in milliseconds (Since 2.8) | |
1049 | # | |
68b53591 HZ |
1050 | # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8) |
1051 | # | |
85de8323 LL |
1052 | # Since: 2.4 |
1053 | ## | |
1054 | { 'struct': 'MigrationParameters', | |
de63ab61 EB |
1055 | 'data': { '*compress-level': 'int', |
1056 | '*compress-threads': 'int', | |
1057 | '*decompress-threads': 'int', | |
1058 | '*cpu-throttle-initial': 'int', | |
1059 | '*cpu-throttle-increment': 'int', | |
1060 | '*tls-creds': 'str', | |
2ff30257 AA |
1061 | '*tls-hostname': 'str', |
1062 | '*max-bandwidth': 'int', | |
68b53591 HZ |
1063 | '*downtime-limit': 'int', |
1064 | '*x-checkpoint-delay': 'int'} } | |
6235b9cd | 1065 | |
85de8323 | 1066 | ## |
5072f7b3 | 1067 | # @query-migrate-parameters: |
85de8323 LL |
1068 | # |
1069 | # Returns information about the current migration parameters | |
1070 | # | |
1071 | # Returns: @MigrationParameters | |
1072 | # | |
1073 | # Since: 2.4 | |
cf56cfad MAL |
1074 | # |
1075 | # Example: | |
1076 | # | |
1077 | # -> { "execute": "query-migrate-parameters" } | |
1078 | # <- { "return": { | |
1079 | # "decompress-threads": 2, | |
1080 | # "cpu-throttle-increment": 10, | |
1081 | # "compress-threads": 8, | |
1082 | # "compress-level": 1, | |
1083 | # "cpu-throttle-initial": 20, | |
1084 | # "max-bandwidth": 33554432, | |
1085 | # "downtime-limit": 300 | |
1086 | # } | |
1087 | # } | |
1088 | # | |
85de8323 LL |
1089 | ## |
1090 | { 'command': 'query-migrate-parameters', | |
1091 | 'returns': 'MigrationParameters' } | |
1092 | ||
b8a185bc | 1093 | ## |
5072f7b3 | 1094 | # @client_migrate_info: |
b8a185bc MA |
1095 | # |
1096 | # Set migration information for remote display. This makes the server | |
1097 | # ask the client to automatically reconnect using the new parameters | |
1098 | # once migration finished successfully. Only implemented for SPICE. | |
1099 | # | |
1100 | # @protocol: must be "spice" | |
1101 | # @hostname: migration target hostname | |
1102 | # @port: #optional spice tcp port for plaintext channels | |
1103 | # @tls-port: #optional spice tcp port for tls-secured channels | |
1104 | # @cert-subject: #optional server certificate subject | |
1105 | # | |
1106 | # Since: 0.14.0 | |
d0d3fc7f MAL |
1107 | # |
1108 | # Example: | |
1109 | # | |
1110 | # -> { "execute": "client_migrate_info", | |
1111 | # "arguments": { "protocol": "spice", | |
1112 | # "hostname": "virt42.lab.kraxel.org", | |
1113 | # "port": 1234 } } | |
1114 | # <- { "return": {} } | |
1115 | # | |
b8a185bc MA |
1116 | ## |
1117 | { 'command': 'client_migrate_info', | |
1118 | 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int', | |
1119 | '*tls-port': 'int', '*cert-subject': 'str' } } | |
1120 | ||
4886a1bc | 1121 | ## |
5072f7b3 | 1122 | # @migrate-start-postcopy: |
4886a1bc | 1123 | # |
a54d340b | 1124 | # Followup to a migration command to switch the migration to postcopy mode. |
32c3db5b | 1125 | # The postcopy-ram capability must be set before the original migration |
a54d340b | 1126 | # command. |
4886a1bc DDAG |
1127 | # |
1128 | # Since: 2.5 | |
3c3ea00a MAL |
1129 | # |
1130 | # Example: | |
1131 | # | |
1132 | # -> { "execute": "migrate-start-postcopy" } | |
1133 | # <- { "return": {} } | |
1134 | # | |
49687ace | 1135 | ## |
4886a1bc DDAG |
1136 | { 'command': 'migrate-start-postcopy' } |
1137 | ||
e235cec3 | 1138 | ## |
5072f7b3 | 1139 | # @COLOMessage: |
4f97558e HZ |
1140 | # |
1141 | # The message transmission between Primary side and Secondary side. | |
1142 | # | |
1143 | # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing | |
1144 | # | |
1145 | # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing | |
1146 | # | |
1147 | # @checkpoint-reply: SVM gets PVM's checkpoint request | |
1148 | # | |
1149 | # @vmstate-send: VM's state will be sent by PVM. | |
1150 | # | |
1151 | # @vmstate-size: The total size of VMstate. | |
1152 | # | |
1153 | # @vmstate-received: VM's state has been received by SVM. | |
1154 | # | |
1155 | # @vmstate-loaded: VM's state has been loaded by SVM. | |
1156 | # | |
1157 | # Since: 2.8 | |
1158 | ## | |
1159 | { 'enum': 'COLOMessage', | |
1160 | 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply', | |
1161 | 'vmstate-send', 'vmstate-size', 'vmstate-received', | |
1162 | 'vmstate-loaded' ] } | |
1163 | ||
d89e666e | 1164 | ## |
5072f7b3 | 1165 | # @COLOMode: |
d89e666e HZ |
1166 | # |
1167 | # The colo mode | |
1168 | # | |
1169 | # @unknown: unknown mode | |
1170 | # | |
1171 | # @primary: master side | |
1172 | # | |
1173 | # @secondary: slave side | |
1174 | # | |
1175 | # Since: 2.8 | |
1176 | ## | |
1177 | { 'enum': 'COLOMode', | |
1178 | 'data': [ 'unknown', 'primary', 'secondary'] } | |
1179 | ||
aef06085 | 1180 | ## |
5072f7b3 | 1181 | # @FailoverStatus: |
aef06085 HZ |
1182 | # |
1183 | # An enumeration of COLO failover status | |
1184 | # | |
1185 | # @none: no failover has ever happened | |
1186 | # | |
1187 | # @require: got failover requirement but not handled | |
1188 | # | |
1189 | # @active: in the process of doing failover | |
1190 | # | |
1191 | # @completed: finish the process of failover | |
1192 | # | |
1193 | # Since: 2.8 | |
1194 | ## | |
1195 | { 'enum': 'FailoverStatus', | |
1196 | 'data': [ 'none', 'require', 'active', 'completed'] } | |
1197 | ||
d89e666e | 1198 | ## |
5072f7b3 | 1199 | # @x-colo-lost-heartbeat: |
d89e666e HZ |
1200 | # |
1201 | # Tell qemu that heartbeat is lost, request it to do takeover procedures. | |
1202 | # If this command is sent to the PVM, the Primary side will exit COLO mode. | |
1203 | # If sent to the Secondary, the Secondary side will run failover work, | |
1204 | # then takes over server operation to become the service VM. | |
1205 | # | |
1206 | # Since: 2.8 | |
c08d6443 MAL |
1207 | # |
1208 | # Example: | |
1209 | # | |
1210 | # -> { "execute": "x-colo-lost-heartbeat" } | |
1211 | # <- { "return": {} } | |
1212 | # | |
d89e666e HZ |
1213 | ## |
1214 | { 'command': 'x-colo-lost-heartbeat' } | |
1215 | ||
1216 | ## | |
e235cec3 LC |
1217 | # @MouseInfo: |
1218 | # | |
1219 | # Information about a mouse device. | |
1220 | # | |
1221 | # @name: the name of the mouse device | |
1222 | # | |
1223 | # @index: the index of the mouse device | |
1224 | # | |
1225 | # @current: true if this device is currently receiving mouse events | |
1226 | # | |
1227 | # @absolute: true if this device supports absolute coordinates as input | |
1228 | # | |
1229 | # Since: 0.14.0 | |
1230 | ## | |
895a2a80 | 1231 | { 'struct': 'MouseInfo', |
e235cec3 LC |
1232 | 'data': {'name': 'str', 'index': 'int', 'current': 'bool', |
1233 | 'absolute': 'bool'} } | |
1234 | ||
1235 | ## | |
1236 | # @query-mice: | |
1237 | # | |
1238 | # Returns information about each active mouse device | |
1239 | # | |
1240 | # Returns: a list of @MouseInfo for each device | |
1241 | # | |
1242 | # Since: 0.14.0 | |
60639df5 MAL |
1243 | # |
1244 | # Example: | |
1245 | # | |
1246 | # -> { "execute": "query-mice" } | |
1247 | # <- { "return": [ | |
1248 | # { | |
1249 | # "name":"QEMU Microsoft Mouse", | |
1250 | # "index":0, | |
1251 | # "current":false, | |
1252 | # "absolute":false | |
1253 | # }, | |
1254 | # { | |
1255 | # "name":"QEMU PS/2 Mouse", | |
1256 | # "index":1, | |
1257 | # "current":true, | |
1258 | # "absolute":true | |
1259 | # } | |
1260 | # ] | |
1261 | # } | |
1262 | # | |
e235cec3 LC |
1263 | ## |
1264 | { 'command': 'query-mice', 'returns': ['MouseInfo'] } | |
1265 | ||
de0b36b6 | 1266 | ## |
86f4b687 | 1267 | # @CpuInfoArch: |
de0b36b6 | 1268 | # |
86f4b687 EB |
1269 | # An enumeration of cpu types that enable additional information during |
1270 | # @query-cpus. | |
1271 | # | |
1272 | # Since: 2.6 | |
1273 | ## | |
1274 | { 'enum': 'CpuInfoArch', | |
1275 | 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] } | |
1276 | ||
1277 | ## | |
3666a97f | 1278 | # @CpuInfo: |
86f4b687 | 1279 | # |
3666a97f | 1280 | # Information about a virtual CPU |
de0b36b6 LC |
1281 | # |
1282 | # @CPU: the index of the virtual CPU | |
1283 | # | |
86f4b687 | 1284 | # @current: this only exists for backwards compatibility and should be ignored |
b80e560b | 1285 | # |
de0b36b6 LC |
1286 | # @halted: true if the virtual CPU is in the halt state. Halt usually refers |
1287 | # to a processor specific low power mode. | |
1288 | # | |
58f88d4b EH |
1289 | # @qom_path: path to the CPU object in the QOM tree (since 2.4) |
1290 | # | |
de0b36b6 LC |
1291 | # @thread_id: ID of the underlying host thread |
1292 | # | |
86f4b687 EB |
1293 | # @arch: architecture of the cpu, which determines which additional fields |
1294 | # will be listed (since 2.6) | |
1295 | # | |
de0b36b6 LC |
1296 | # Since: 0.14.0 |
1297 | # | |
1298 | # Notes: @halted is a transient state that changes frequently. By the time the | |
1299 | # data is sent to the client, the guest may no longer be halted. | |
1300 | ## | |
3666a97f EB |
1301 | { 'union': 'CpuInfo', |
1302 | 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', | |
1303 | 'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' }, | |
1304 | 'discriminator': 'arch', | |
86f4b687 EB |
1305 | 'data': { 'x86': 'CpuInfoX86', |
1306 | 'sparc': 'CpuInfoSPARC', | |
1307 | 'ppc': 'CpuInfoPPC', | |
1308 | 'mips': 'CpuInfoMIPS', | |
1309 | 'tricore': 'CpuInfoTricore', | |
1310 | 'other': 'CpuInfoOther' } } | |
1311 | ||
1312 | ## | |
1313 | # @CpuInfoX86: | |
1314 | # | |
1315 | # Additional information about a virtual i386 or x86_64 CPU | |
1316 | # | |
1317 | # @pc: the 64-bit instruction pointer | |
1318 | # | |
5072f7b3 | 1319 | # Since: 2.6 |
86f4b687 EB |
1320 | ## |
1321 | { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } } | |
1322 | ||
1323 | ## | |
1324 | # @CpuInfoSPARC: | |
1325 | # | |
1326 | # Additional information about a virtual SPARC CPU | |
1327 | # | |
1328 | # @pc: the PC component of the instruction pointer | |
1329 | # | |
1330 | # @npc: the NPC component of the instruction pointer | |
1331 | # | |
5072f7b3 | 1332 | # Since: 2.6 |
86f4b687 EB |
1333 | ## |
1334 | { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } } | |
1335 | ||
1336 | ## | |
1337 | # @CpuInfoPPC: | |
1338 | # | |
1339 | # Additional information about a virtual PPC CPU | |
1340 | # | |
1341 | # @nip: the instruction pointer | |
1342 | # | |
5072f7b3 | 1343 | # Since: 2.6 |
86f4b687 EB |
1344 | ## |
1345 | { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } } | |
1346 | ||
1347 | ## | |
1348 | # @CpuInfoMIPS: | |
1349 | # | |
1350 | # Additional information about a virtual MIPS CPU | |
1351 | # | |
1352 | # @PC: the instruction pointer | |
1353 | # | |
5072f7b3 | 1354 | # Since: 2.6 |
86f4b687 EB |
1355 | ## |
1356 | { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } } | |
1357 | ||
1358 | ## | |
1359 | # @CpuInfoTricore: | |
1360 | # | |
1361 | # Additional information about a virtual Tricore CPU | |
1362 | # | |
1363 | # @PC: the instruction pointer | |
1364 | # | |
5072f7b3 | 1365 | # Since: 2.6 |
86f4b687 EB |
1366 | ## |
1367 | { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } } | |
1368 | ||
1369 | ## | |
1370 | # @CpuInfoOther: | |
1371 | # | |
1372 | # No additional information is available about the virtual CPU | |
1373 | # | |
5072f7b3 | 1374 | # Since: 2.6 |
86f4b687 EB |
1375 | # |
1376 | ## | |
1377 | { 'struct': 'CpuInfoOther', 'data': { } } | |
de0b36b6 LC |
1378 | |
1379 | ## | |
1380 | # @query-cpus: | |
1381 | # | |
1382 | # Returns a list of information about each virtual CPU. | |
1383 | # | |
1384 | # Returns: a list of @CpuInfo for each virtual CPU | |
1385 | # | |
1386 | # Since: 0.14.0 | |
5c5bee64 MAL |
1387 | # |
1388 | # Example: | |
1389 | # | |
1390 | # -> { "execute": "query-cpus" } | |
1391 | # <- { "return": [ | |
1392 | # { | |
1393 | # "CPU":0, | |
1394 | # "current":true, | |
1395 | # "halted":false, | |
1396 | # "qom_path":"/machine/unattached/device[0]", | |
1397 | # "arch":"x86", | |
1398 | # "pc":3227107138, | |
1399 | # "thread_id":3134 | |
1400 | # }, | |
1401 | # { | |
1402 | # "CPU":1, | |
1403 | # "current":false, | |
1404 | # "halted":true, | |
1405 | # "qom_path":"/machine/unattached/device[2]", | |
1406 | # "arch":"x86", | |
1407 | # "pc":7108165, | |
1408 | # "thread_id":3135 | |
1409 | # } | |
1410 | # ] | |
1411 | # } | |
1412 | # | |
de0b36b6 LC |
1413 | ## |
1414 | { 'command': 'query-cpus', 'returns': ['CpuInfo'] } | |
1415 | ||
dc3dd0d2 SH |
1416 | ## |
1417 | # @IOThreadInfo: | |
1418 | # | |
1419 | # Information about an iothread | |
1420 | # | |
1421 | # @id: the identifier of the iothread | |
1422 | # | |
1423 | # @thread-id: ID of the underlying host thread | |
1424 | # | |
1425 | # Since: 2.0 | |
1426 | ## | |
895a2a80 | 1427 | { 'struct': 'IOThreadInfo', |
dc3dd0d2 SH |
1428 | 'data': {'id': 'str', 'thread-id': 'int'} } |
1429 | ||
1430 | ## | |
1431 | # @query-iothreads: | |
1432 | # | |
1433 | # Returns a list of information about each iothread. | |
1434 | # | |
5072f7b3 | 1435 | # Note: this list excludes the QEMU main loop thread, which is not declared |
dc3dd0d2 SH |
1436 | # using the -object iothread command-line option. It is always the main thread |
1437 | # of the process. | |
1438 | # | |
1439 | # Returns: a list of @IOThreadInfo for each iothread | |
1440 | # | |
1441 | # Since: 2.0 | |
fdf4d34f MAL |
1442 | # |
1443 | # Example: | |
1444 | # | |
1445 | # -> { "execute": "query-iothreads" } | |
1446 | # <- { "return": [ | |
1447 | # { | |
1448 | # "id":"iothread0", | |
1449 | # "thread-id":3134 | |
1450 | # }, | |
1451 | # { | |
1452 | # "id":"iothread1", | |
1453 | # "thread-id":3135 | |
1454 | # } | |
1455 | # ] | |
1456 | # } | |
1457 | # | |
dc3dd0d2 SH |
1458 | ## |
1459 | { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] } | |
1460 | ||
2b54aa87 | 1461 | ## |
5072f7b3 | 1462 | # @NetworkAddressFamily: |
2b54aa87 | 1463 | # |
a589569f WX |
1464 | # The network address family |
1465 | # | |
1466 | # @ipv4: IPV4 family | |
1467 | # | |
1468 | # @ipv6: IPV6 family | |
1469 | # | |
1470 | # @unix: unix socket | |
1471 | # | |
6a02c806 SH |
1472 | # @vsock: vsock family (since 2.8) |
1473 | # | |
a589569f WX |
1474 | # @unknown: otherwise |
1475 | # | |
1476 | # Since: 2.1 | |
1477 | ## | |
1478 | { 'enum': 'NetworkAddressFamily', | |
6a02c806 | 1479 | 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] } |
a589569f WX |
1480 | |
1481 | ## | |
5072f7b3 | 1482 | # @VncBasicInfo: |
2b54aa87 | 1483 | # |
a589569f | 1484 | # The basic information for vnc network connection |
2b54aa87 | 1485 | # |
a589569f | 1486 | # @host: IP address |
2b54aa87 | 1487 | # |
2f44a08b WX |
1488 | # @service: The service name of the vnc port. This may depend on the host |
1489 | # system's service database so symbolic names should not be relied | |
1490 | # on. | |
a589569f WX |
1491 | # |
1492 | # @family: address family | |
1493 | # | |
4478aa76 GH |
1494 | # @websocket: true in case the socket is a websocket (since 2.3). |
1495 | # | |
a589569f WX |
1496 | # Since: 2.1 |
1497 | ## | |
895a2a80 | 1498 | { 'struct': 'VncBasicInfo', |
a589569f WX |
1499 | 'data': { 'host': 'str', |
1500 | 'service': 'str', | |
4478aa76 GH |
1501 | 'family': 'NetworkAddressFamily', |
1502 | 'websocket': 'bool' } } | |
a589569f WX |
1503 | |
1504 | ## | |
5072f7b3 | 1505 | # @VncServerInfo: |
2b54aa87 | 1506 | # |
a589569f | 1507 | # The network connection information for server |
2b54aa87 | 1508 | # |
a589569f | 1509 | # @auth: #optional, authentication method |
2b54aa87 | 1510 | # |
a589569f WX |
1511 | # Since: 2.1 |
1512 | ## | |
895a2a80 | 1513 | { 'struct': 'VncServerInfo', |
a589569f WX |
1514 | 'base': 'VncBasicInfo', |
1515 | 'data': { '*auth': 'str' } } | |
1516 | ||
1517 | ## | |
1518 | # @VncClientInfo: | |
1519 | # | |
1520 | # Information about a connected VNC client. | |
2b54aa87 LC |
1521 | # |
1522 | # @x509_dname: #optional If x509 authentication is in use, the Distinguished | |
1523 | # Name of the client. | |
1524 | # | |
1525 | # @sasl_username: #optional If SASL authentication is in use, the SASL username | |
1526 | # used for authentication. | |
1527 | # | |
1528 | # Since: 0.14.0 | |
1529 | ## | |
895a2a80 | 1530 | { 'struct': 'VncClientInfo', |
a589569f | 1531 | 'base': 'VncBasicInfo', |
2f44a08b | 1532 | 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } } |
2b54aa87 LC |
1533 | |
1534 | ## | |
1535 | # @VncInfo: | |
1536 | # | |
1537 | # Information about the VNC session. | |
1538 | # | |
1539 | # @enabled: true if the VNC server is enabled, false otherwise | |
1540 | # | |
1541 | # @host: #optional The hostname the VNC server is bound to. This depends on | |
1542 | # the name resolution on the host and may be an IP address. | |
1543 | # | |
1544 | # @family: #optional 'ipv6' if the host is listening for IPv6 connections | |
1545 | # 'ipv4' if the host is listening for IPv4 connections | |
1546 | # 'unix' if the host is listening on a unix domain socket | |
1547 | # 'unknown' otherwise | |
1548 | # | |
1549 | # @service: #optional The service name of the server's port. This may depends | |
1550 | # on the host system's service database so symbolic names should not | |
1551 | # be relied on. | |
1552 | # | |
1553 | # @auth: #optional the current authentication type used by the server | |
1554 | # 'none' if no authentication is being used | |
1555 | # 'vnc' if VNC authentication is being used | |
1556 | # 'vencrypt+plain' if VEncrypt is used with plain text authentication | |
1557 | # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication | |
1558 | # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication | |
1559 | # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth | |
1560 | # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth | |
1561 | # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth | |
1562 | # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth | |
1563 | # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth | |
1564 | # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth | |
1565 | # | |
1566 | # @clients: a list of @VncClientInfo of all currently connected clients | |
1567 | # | |
1568 | # Since: 0.14.0 | |
1569 | ## | |
895a2a80 | 1570 | { 'struct': 'VncInfo', |
a589569f WX |
1571 | 'data': {'enabled': 'bool', '*host': 'str', |
1572 | '*family': 'NetworkAddressFamily', | |
2b54aa87 LC |
1573 | '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} } |
1574 | ||
df887684 | 1575 | ## |
4d5c8bc4 | 1576 | # @VncPrimaryAuth: |
df887684 GH |
1577 | # |
1578 | # vnc primary authentication method. | |
1579 | # | |
1580 | # Since: 2.3 | |
1581 | ## | |
1582 | { 'enum': 'VncPrimaryAuth', | |
1583 | 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra', | |
1584 | 'tls', 'vencrypt', 'sasl' ] } | |
1585 | ||
1586 | ## | |
1587 | # @VncVencryptSubAuth: | |
1588 | # | |
1589 | # vnc sub authentication method with vencrypt. | |
1590 | # | |
1591 | # Since: 2.3 | |
1592 | ## | |
1593 | { 'enum': 'VncVencryptSubAuth', | |
1594 | 'data': [ 'plain', | |
1595 | 'tls-none', 'x509-none', | |
1596 | 'tls-vnc', 'x509-vnc', | |
1597 | 'tls-plain', 'x509-plain', | |
1598 | 'tls-sasl', 'x509-sasl' ] } | |
1599 | ||
1600 | ## | |
1601 | # @VncInfo2: | |
1602 | # | |
1603 | # Information about a vnc server | |
1604 | # | |
1605 | # @id: vnc server name. | |
1606 | # | |
1607 | # @server: A list of @VncBasincInfo describing all listening sockets. | |
1608 | # The list can be empty (in case the vnc server is disabled). | |
1609 | # It also may have multiple entries: normal + websocket, | |
1610 | # possibly also ipv4 + ipv6 in the future. | |
1611 | # | |
1612 | # @clients: A list of @VncClientInfo of all currently connected clients. | |
1613 | # The list can be empty, for obvious reasons. | |
1614 | # | |
1615 | # @auth: The current authentication type used by the server | |
1616 | # | |
1617 | # @vencrypt: #optional The vencrypt sub authentication type used by the server, | |
1618 | # only specified in case auth == vencrypt. | |
1619 | # | |
1620 | # @display: #optional The display device the vnc server is linked to. | |
1621 | # | |
1622 | # Since: 2.3 | |
1623 | ## | |
895a2a80 | 1624 | { 'struct': 'VncInfo2', |
df887684 GH |
1625 | 'data': { 'id' : 'str', |
1626 | 'server' : ['VncBasicInfo'], | |
1627 | 'clients' : ['VncClientInfo'], | |
1628 | 'auth' : 'VncPrimaryAuth', | |
1629 | '*vencrypt' : 'VncVencryptSubAuth', | |
1630 | '*display' : 'str' } } | |
1631 | ||
2b54aa87 LC |
1632 | ## |
1633 | # @query-vnc: | |
1634 | # | |
1635 | # Returns information about the current VNC server | |
1636 | # | |
1637 | # Returns: @VncInfo | |
2b54aa87 LC |
1638 | # |
1639 | # Since: 0.14.0 | |
85f96549 MAL |
1640 | # |
1641 | # Example: | |
1642 | # | |
1643 | # -> { "execute": "query-vnc" } | |
1644 | # <- { "return": { | |
1645 | # "enabled":true, | |
1646 | # "host":"0.0.0.0", | |
1647 | # "service":"50402", | |
1648 | # "auth":"vnc", | |
1649 | # "family":"ipv4", | |
1650 | # "clients":[ | |
1651 | # { | |
1652 | # "host":"127.0.0.1", | |
1653 | # "service":"50401", | |
1654 | # "family":"ipv4" | |
1655 | # } | |
1656 | # ] | |
1657 | # } | |
1658 | # } | |
1659 | # | |
2b54aa87 LC |
1660 | ## |
1661 | { 'command': 'query-vnc', 'returns': 'VncInfo' } | |
1662 | ||
df887684 GH |
1663 | ## |
1664 | # @query-vnc-servers: | |
1665 | # | |
1666 | # Returns a list of vnc servers. The list can be empty. | |
1667 | # | |
1668 | # Returns: a list of @VncInfo2 | |
1669 | # | |
1670 | # Since: 2.3 | |
1671 | ## | |
1672 | { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] } | |
1673 | ||
d1f29646 | 1674 | ## |
5072f7b3 | 1675 | # @SpiceBasicInfo: |
d1f29646 | 1676 | # |
a589569f WX |
1677 | # The basic information for SPICE network connection |
1678 | # | |
1679 | # @host: IP address | |
d1f29646 | 1680 | # |
a589569f | 1681 | # @port: port number |
d1f29646 | 1682 | # |
a589569f | 1683 | # @family: address family |
d1f29646 | 1684 | # |
a589569f WX |
1685 | # Since: 2.1 |
1686 | ## | |
895a2a80 | 1687 | { 'struct': 'SpiceBasicInfo', |
a589569f WX |
1688 | 'data': { 'host': 'str', |
1689 | 'port': 'str', | |
1690 | 'family': 'NetworkAddressFamily' } } | |
1691 | ||
1692 | ## | |
5072f7b3 | 1693 | # @SpiceServerInfo: |
d1f29646 | 1694 | # |
a589569f | 1695 | # Information about a SPICE server |
d1f29646 | 1696 | # |
a589569f | 1697 | # @auth: #optional, authentication method |
d1f29646 | 1698 | # |
a589569f WX |
1699 | # Since: 2.1 |
1700 | ## | |
895a2a80 | 1701 | { 'struct': 'SpiceServerInfo', |
a589569f WX |
1702 | 'base': 'SpiceBasicInfo', |
1703 | 'data': { '*auth': 'str' } } | |
1704 | ||
1705 | ## | |
5072f7b3 | 1706 | # @SpiceChannel: |
a589569f WX |
1707 | # |
1708 | # Information about a SPICE client channel. | |
d1f29646 LC |
1709 | # |
1710 | # @connection-id: SPICE connection id number. All channels with the same id | |
1711 | # belong to the same SPICE session. | |
1712 | # | |
7e781c79 CR |
1713 | # @channel-type: SPICE channel type number. "1" is the main control |
1714 | # channel, filter for this one if you want to track spice | |
1715 | # sessions only | |
d1f29646 | 1716 | # |
419e1bdf AL |
1717 | # @channel-id: SPICE channel ID number. Usually "0", might be different when |
1718 | # multiple channels of the same type exist, such as multiple | |
d1f29646 LC |
1719 | # display channels in a multihead setup |
1720 | # | |
1721 | # @tls: true if the channel is encrypted, false otherwise. | |
1722 | # | |
1723 | # Since: 0.14.0 | |
1724 | ## | |
895a2a80 | 1725 | { 'struct': 'SpiceChannel', |
a589569f WX |
1726 | 'base': 'SpiceBasicInfo', |
1727 | 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int', | |
d1f29646 LC |
1728 | 'tls': 'bool'} } |
1729 | ||
4efee029 | 1730 | ## |
5072f7b3 | 1731 | # @SpiceQueryMouseMode: |
4efee029 | 1732 | # |
6932a69b | 1733 | # An enumeration of Spice mouse states. |
4efee029 AL |
1734 | # |
1735 | # @client: Mouse cursor position is determined by the client. | |
1736 | # | |
1737 | # @server: Mouse cursor position is determined by the server. | |
1738 | # | |
1739 | # @unknown: No information is available about mouse mode used by | |
1740 | # the spice server. | |
1741 | # | |
1742 | # Note: spice/enums.h has a SpiceMouseMode already, hence the name. | |
1743 | # | |
1744 | # Since: 1.1 | |
1745 | ## | |
1746 | { 'enum': 'SpiceQueryMouseMode', | |
1747 | 'data': [ 'client', 'server', 'unknown' ] } | |
1748 | ||
d1f29646 | 1749 | ## |
5072f7b3 | 1750 | # @SpiceInfo: |
d1f29646 LC |
1751 | # |
1752 | # Information about the SPICE session. | |
b80e560b | 1753 | # |
d1f29646 LC |
1754 | # @enabled: true if the SPICE server is enabled, false otherwise |
1755 | # | |
61c4efe2 | 1756 | # @migrated: true if the last guest migration completed and spice |
bc7e2602 | 1757 | # migration had completed as well. false otherwise. (since 1.4) |
61c4efe2 | 1758 | # |
d1f29646 LC |
1759 | # @host: #optional The hostname the SPICE server is bound to. This depends on |
1760 | # the name resolution on the host and may be an IP address. | |
1761 | # | |
1762 | # @port: #optional The SPICE server's port number. | |
1763 | # | |
1764 | # @compiled-version: #optional SPICE server version. | |
1765 | # | |
1766 | # @tls-port: #optional The SPICE server's TLS port number. | |
1767 | # | |
1768 | # @auth: #optional the current authentication type used by the server | |
419e1bdf AL |
1769 | # 'none' if no authentication is being used |
1770 | # 'spice' uses SASL or direct TLS authentication, depending on command | |
1771 | # line options | |
d1f29646 | 1772 | # |
4efee029 AL |
1773 | # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can |
1774 | # be determined by the client or the server, or unknown if spice | |
bc7e2602 | 1775 | # server doesn't provide this information. (since: 1.1) |
4efee029 | 1776 | # |
d1f29646 LC |
1777 | # @channels: a list of @SpiceChannel for each active spice channel |
1778 | # | |
1779 | # Since: 0.14.0 | |
1780 | ## | |
895a2a80 | 1781 | { 'struct': 'SpiceInfo', |
61c4efe2 | 1782 | 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int', |
d1f29646 | 1783 | '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str', |
4efee029 | 1784 | 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} } |
d1f29646 LC |
1785 | |
1786 | ## | |
5072f7b3 | 1787 | # @query-spice: |
d1f29646 LC |
1788 | # |
1789 | # Returns information about the current SPICE server | |
1790 | # | |
1791 | # Returns: @SpiceInfo | |
1792 | # | |
1793 | # Since: 0.14.0 | |
bc7e2602 MAL |
1794 | # |
1795 | # Example: | |
1796 | # | |
1797 | # -> { "execute": "query-spice" } | |
1798 | # <- { "return": { | |
1799 | # "enabled": true, | |
1800 | # "auth": "spice", | |
1801 | # "port": 5920, | |
1802 | # "tls-port": 5921, | |
1803 | # "host": "0.0.0.0", | |
1804 | # "channels": [ | |
1805 | # { | |
1806 | # "port": "54924", | |
1807 | # "family": "ipv4", | |
1808 | # "channel-type": 1, | |
1809 | # "connection-id": 1804289383, | |
1810 | # "host": "127.0.0.1", | |
1811 | # "channel-id": 0, | |
1812 | # "tls": true | |
1813 | # }, | |
1814 | # { | |
1815 | # "port": "36710", | |
1816 | # "family": "ipv4", | |
1817 | # "channel-type": 4, | |
1818 | # "connection-id": 1804289383, | |
1819 | # "host": "127.0.0.1", | |
1820 | # "channel-id": 0, | |
1821 | # "tls": false | |
1822 | # }, | |
1823 | # [ ... more channels follow ... ] | |
1824 | # ] | |
1825 | # } | |
1826 | # } | |
1827 | # | |
d1f29646 LC |
1828 | ## |
1829 | { 'command': 'query-spice', 'returns': 'SpiceInfo' } | |
1830 | ||
96637bcd LC |
1831 | ## |
1832 | # @BalloonInfo: | |
1833 | # | |
1834 | # Information about the guest balloon device. | |
1835 | # | |
1836 | # @actual: the number of bytes the balloon currently contains | |
1837 | # | |
96637bcd LC |
1838 | # Since: 0.14.0 |
1839 | # | |
96637bcd | 1840 | ## |
895a2a80 | 1841 | { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } } |
96637bcd LC |
1842 | |
1843 | ## | |
1844 | # @query-balloon: | |
1845 | # | |
1846 | # Return information about the balloon device. | |
1847 | # | |
1848 | # Returns: @BalloonInfo on success | |
f504e3dc | 1849 | # |
96637bcd LC |
1850 | # If the balloon driver is enabled but not functional because the KVM |
1851 | # kernel module cannot support it, KvmMissingCap | |
f504e3dc | 1852 | # |
96637bcd LC |
1853 | # If no balloon device is present, DeviceNotActive |
1854 | # | |
1855 | # Since: 0.14.0 | |
f504e3dc MAL |
1856 | # |
1857 | # Example: | |
1858 | # | |
1859 | # -> { "execute": "query-balloon" } | |
1860 | # <- { "return": { | |
1861 | # "actual": 1073741824, | |
1862 | # } | |
1863 | # } | |
1864 | # | |
96637bcd LC |
1865 | ## |
1866 | { 'command': 'query-balloon', 'returns': 'BalloonInfo' } | |
1867 | ||
79627472 LC |
1868 | ## |
1869 | # @PciMemoryRange: | |
1870 | # | |
1871 | # A PCI device memory region | |
1872 | # | |
1873 | # @base: the starting address (guest physical) | |
1874 | # | |
1875 | # @limit: the ending address (guest physical) | |
1876 | # | |
1877 | # Since: 0.14.0 | |
1878 | ## | |
895a2a80 | 1879 | { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} } |
79627472 LC |
1880 | |
1881 | ## | |
5072f7b3 | 1882 | # @PciMemoryRegion: |
79627472 LC |
1883 | # |
1884 | # Information about a PCI device I/O region. | |
1885 | # | |
1886 | # @bar: the index of the Base Address Register for this region | |
1887 | # | |
1888 | # @type: 'io' if the region is a PIO region | |
1889 | # 'memory' if the region is a MMIO region | |
1890 | # | |
3fc3aa6d MAL |
1891 | # @size: memory size |
1892 | # | |
79627472 LC |
1893 | # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable |
1894 | # | |
1895 | # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit | |
1896 | # | |
1897 | # Since: 0.14.0 | |
1898 | ## | |
895a2a80 | 1899 | { 'struct': 'PciMemoryRegion', |
79627472 LC |
1900 | 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int', |
1901 | '*prefetch': 'bool', '*mem_type_64': 'bool' } } | |
1902 | ||
1903 | ## | |
9fa02cd1 | 1904 | # @PciBusInfo: |
79627472 | 1905 | # |
9fa02cd1 | 1906 | # Information about a bus of a PCI Bridge device |
79627472 | 1907 | # |
9fa02cd1 EB |
1908 | # @number: primary bus interface number. This should be the number of the |
1909 | # bus the device resides on. | |
79627472 | 1910 | # |
9fa02cd1 EB |
1911 | # @secondary: secondary bus interface number. This is the number of the |
1912 | # main bus for the bridge | |
79627472 | 1913 | # |
9fa02cd1 EB |
1914 | # @subordinate: This is the highest number bus that resides below the |
1915 | # bridge. | |
79627472 | 1916 | # |
9fa02cd1 | 1917 | # @io_range: The PIO range for all devices on this bridge |
79627472 | 1918 | # |
9fa02cd1 | 1919 | # @memory_range: The MMIO range for all devices on this bridge |
79627472 | 1920 | # |
9fa02cd1 EB |
1921 | # @prefetchable_range: The range of prefetchable MMIO for all devices on |
1922 | # this bridge | |
1923 | # | |
1924 | # Since: 2.4 | |
1925 | ## | |
1926 | { 'struct': 'PciBusInfo', | |
1927 | 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int', | |
1928 | 'io_range': 'PciMemoryRange', | |
1929 | 'memory_range': 'PciMemoryRange', | |
1930 | 'prefetchable_range': 'PciMemoryRange' } } | |
1931 | ||
1932 | ## | |
1933 | # @PciBridgeInfo: | |
1934 | # | |
1935 | # Information about a PCI Bridge device | |
1936 | # | |
1937 | # @bus: information about the bus the device resides on | |
79627472 LC |
1938 | # |
1939 | # @devices: a list of @PciDeviceInfo for each device on this bridge | |
1940 | # | |
1941 | # Since: 0.14.0 | |
1942 | ## | |
895a2a80 | 1943 | { 'struct': 'PciBridgeInfo', |
9fa02cd1 EB |
1944 | 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} } |
1945 | ||
1946 | ## | |
1947 | # @PciDeviceClass: | |
1948 | # | |
1949 | # Information about the Class of a PCI device | |
1950 | # | |
1951 | # @desc: #optional a string description of the device's class | |
1952 | # | |
1953 | # @class: the class code of the device | |
1954 | # | |
1955 | # Since: 2.4 | |
1956 | ## | |
1957 | { 'struct': 'PciDeviceClass', | |
1958 | 'data': {'*desc': 'str', 'class': 'int'} } | |
1959 | ||
1960 | ## | |
1961 | # @PciDeviceId: | |
1962 | # | |
1963 | # Information about the Id of a PCI device | |
1964 | # | |
1965 | # @device: the PCI device id | |
1966 | # | |
1967 | # @vendor: the PCI vendor id | |
1968 | # | |
1969 | # Since: 2.4 | |
1970 | ## | |
1971 | { 'struct': 'PciDeviceId', | |
1972 | 'data': {'device': 'int', 'vendor': 'int'} } | |
79627472 LC |
1973 | |
1974 | ## | |
1975 | # @PciDeviceInfo: | |
1976 | # | |
1977 | # Information about a PCI device | |
1978 | # | |
1979 | # @bus: the bus number of the device | |
1980 | # | |
1981 | # @slot: the slot the device is located in | |
1982 | # | |
1983 | # @function: the function of the slot used by the device | |
1984 | # | |
9fa02cd1 | 1985 | # @class_info: the class of the device |
79627472 | 1986 | # |
9fa02cd1 | 1987 | # @id: the PCI device id |
79627472 LC |
1988 | # |
1989 | # @irq: #optional if an IRQ is assigned to the device, the IRQ number | |
1990 | # | |
1991 | # @qdev_id: the device name of the PCI device | |
1992 | # | |
1993 | # @pci_bridge: if the device is a PCI bridge, the bridge information | |
1994 | # | |
1995 | # @regions: a list of the PCI I/O regions associated with the device | |
1996 | # | |
1997 | # Notes: the contents of @class_info.desc are not stable and should only be | |
1998 | # treated as informational. | |
1999 | # | |
2000 | # Since: 0.14.0 | |
2001 | ## | |
895a2a80 | 2002 | { 'struct': 'PciDeviceInfo', |
79627472 | 2003 | 'data': {'bus': 'int', 'slot': 'int', 'function': 'int', |
9fa02cd1 | 2004 | 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId', |
79627472 LC |
2005 | '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo', |
2006 | 'regions': ['PciMemoryRegion']} } | |
2007 | ||
2008 | ## | |
2009 | # @PciInfo: | |
2010 | # | |
2011 | # Information about a PCI bus | |
2012 | # | |
2013 | # @bus: the bus index | |
2014 | # | |
2015 | # @devices: a list of devices on this bus | |
2016 | # | |
2017 | # Since: 0.14.0 | |
2018 | ## | |
895a2a80 | 2019 | { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} } |
79627472 LC |
2020 | |
2021 | ## | |
2022 | # @query-pci: | |
2023 | # | |
2024 | # Return information about the PCI bus topology of the guest. | |
2025 | # | |
3fc3aa6d MAL |
2026 | # Returns: a list of @PciInfo for each PCI bus. Each bus is |
2027 | # represented by a json-object, which has a key with a json-array of | |
2028 | # all PCI devices attached to it. Each device is represented by a | |
2029 | # json-object. | |
79627472 LC |
2030 | # |
2031 | # Since: 0.14.0 | |
3fc3aa6d MAL |
2032 | # |
2033 | # Example: | |
2034 | # | |
2035 | # -> { "execute": "query-pci" } | |
2036 | # <- { "return": [ | |
2037 | # { | |
2038 | # "bus": 0, | |
2039 | # "devices": [ | |
2040 | # { | |
2041 | # "bus": 0, | |
2042 | # "qdev_id": "", | |
2043 | # "slot": 0, | |
2044 | # "class_info": { | |
2045 | # "class": 1536, | |
2046 | # "desc": "Host bridge" | |
2047 | # }, | |
2048 | # "id": { | |
2049 | # "device": 32902, | |
2050 | # "vendor": 4663 | |
2051 | # }, | |
2052 | # "function": 0, | |
2053 | # "regions": [ | |
2054 | # ] | |
2055 | # }, | |
2056 | # { | |
2057 | # "bus": 0, | |
2058 | # "qdev_id": "", | |
2059 | # "slot": 1, | |
2060 | # "class_info": { | |
2061 | # "class": 1537, | |
2062 | # "desc": "ISA bridge" | |
2063 | # }, | |
2064 | # "id": { | |
2065 | # "device": 32902, | |
2066 | # "vendor": 28672 | |
2067 | # }, | |
2068 | # "function": 0, | |
2069 | # "regions": [ | |
2070 | # ] | |
2071 | # }, | |
2072 | # { | |
2073 | # "bus": 0, | |
2074 | # "qdev_id": "", | |
2075 | # "slot": 1, | |
2076 | # "class_info": { | |
2077 | # "class": 257, | |
2078 | # "desc": "IDE controller" | |
2079 | # }, | |
2080 | # "id": { | |
2081 | # "device": 32902, | |
2082 | # "vendor": 28688 | |
2083 | # }, | |
2084 | # "function": 1, | |
2085 | # "regions": [ | |
2086 | # { | |
2087 | # "bar": 4, | |
2088 | # "size": 16, | |
2089 | # "address": 49152, | |
2090 | # "type": "io" | |
2091 | # } | |
2092 | # ] | |
2093 | # }, | |
2094 | # { | |
2095 | # "bus": 0, | |
2096 | # "qdev_id": "", | |
2097 | # "slot": 2, | |
2098 | # "class_info": { | |
2099 | # "class": 768, | |
2100 | # "desc": "VGA controller" | |
2101 | # }, | |
2102 | # "id": { | |
2103 | # "device": 4115, | |
2104 | # "vendor": 184 | |
2105 | # }, | |
2106 | # "function": 0, | |
2107 | # "regions": [ | |
2108 | # { | |
2109 | # "prefetch": true, | |
2110 | # "mem_type_64": false, | |
2111 | # "bar": 0, | |
2112 | # "size": 33554432, | |
2113 | # "address": 4026531840, | |
2114 | # "type": "memory" | |
2115 | # }, | |
2116 | # { | |
2117 | # "prefetch": false, | |
2118 | # "mem_type_64": false, | |
2119 | # "bar": 1, | |
2120 | # "size": 4096, | |
2121 | # "address": 4060086272, | |
2122 | # "type": "memory" | |
2123 | # }, | |
2124 | # { | |
2125 | # "prefetch": false, | |
2126 | # "mem_type_64": false, | |
2127 | # "bar": 6, | |
2128 | # "size": 65536, | |
2129 | # "address": -1, | |
2130 | # "type": "memory" | |
2131 | # } | |
2132 | # ] | |
2133 | # }, | |
2134 | # { | |
2135 | # "bus": 0, | |
2136 | # "qdev_id": "", | |
2137 | # "irq": 11, | |
2138 | # "slot": 4, | |
2139 | # "class_info": { | |
2140 | # "class": 1280, | |
2141 | # "desc": "RAM controller" | |
2142 | # }, | |
2143 | # "id": { | |
2144 | # "device": 6900, | |
2145 | # "vendor": 4098 | |
2146 | # }, | |
2147 | # "function": 0, | |
2148 | # "regions": [ | |
2149 | # { | |
2150 | # "bar": 0, | |
2151 | # "size": 32, | |
2152 | # "address": 49280, | |
2153 | # "type": "io" | |
2154 | # } | |
2155 | # ] | |
2156 | # } | |
2157 | # ] | |
2158 | # } | |
2159 | # ] | |
2160 | # } | |
2161 | # | |
2162 | # Note: This example has been shortened as the real response is too long. | |
2163 | # | |
79627472 LC |
2164 | ## |
2165 | { 'command': 'query-pci', 'returns': ['PciInfo'] } | |
2166 | ||
7a7f325e LC |
2167 | ## |
2168 | # @quit: | |
2169 | # | |
2170 | # This command will cause the QEMU process to exit gracefully. While every | |
2171 | # attempt is made to send the QMP response before terminating, this is not | |
2172 | # guaranteed. When using this interface, a premature EOF would not be | |
2173 | # unexpected. | |
2174 | # | |
2175 | # Since: 0.14.0 | |
8046bf53 MAL |
2176 | # |
2177 | # Example: | |
2178 | # | |
2179 | # -> { "execute": "quit" } | |
2180 | # <- { "return": {} } | |
7a7f325e LC |
2181 | ## |
2182 | { 'command': 'quit' } | |
5f158f21 LC |
2183 | |
2184 | ## | |
2185 | # @stop: | |
2186 | # | |
2187 | # Stop all guest VCPU execution. | |
2188 | # | |
2189 | # Since: 0.14.0 | |
2190 | # | |
2191 | # Notes: This function will succeed even if the guest is already in the stopped | |
1e998146 PB |
2192 | # state. In "inmigrate" state, it will ensure that the guest |
2193 | # remains paused once migration finishes, as if the -S option was | |
2194 | # passed on the command line. | |
9787339e MAL |
2195 | # |
2196 | # Example: | |
2197 | # | |
2198 | # -> { "execute": "stop" } | |
2199 | # <- { "return": {} } | |
2200 | # | |
5f158f21 LC |
2201 | ## |
2202 | { 'command': 'stop' } | |
38d22653 LC |
2203 | |
2204 | ## | |
2205 | # @system_reset: | |
2206 | # | |
2207 | # Performs a hard reset of a guest. | |
2208 | # | |
2209 | # Since: 0.14.0 | |
cd98e00b MAL |
2210 | # |
2211 | # Example: | |
2212 | # | |
2213 | # -> { "execute": "system_reset" } | |
2214 | # <- { "return": {} } | |
2215 | # | |
38d22653 LC |
2216 | ## |
2217 | { 'command': 'system_reset' } | |
5bc465e4 LC |
2218 | |
2219 | ## | |
2220 | # @system_powerdown: | |
2221 | # | |
2222 | # Requests that a guest perform a powerdown operation. | |
2223 | # | |
2224 | # Since: 0.14.0 | |
2225 | # | |
2226 | # Notes: A guest may or may not respond to this command. This command | |
2227 | # returning does not indicate that a guest has accepted the request or | |
2228 | # that it has shut down. Many guests will respond to this command by | |
2229 | # prompting the user in some way. | |
04fcbabc MAL |
2230 | # Example: |
2231 | # | |
2232 | # -> { "execute": "system_powerdown" } | |
2233 | # <- { "return": {} } | |
2234 | # | |
5bc465e4 LC |
2235 | ## |
2236 | { 'command': 'system_powerdown' } | |
755f1968 LC |
2237 | |
2238 | ## | |
2239 | # @cpu: | |
2240 | # | |
2241 | # This command is a nop that is only provided for the purposes of compatibility. | |
2242 | # | |
2243 | # Since: 0.14.0 | |
2244 | # | |
2245 | # Notes: Do not use this command. | |
2246 | ## | |
2247 | { 'command': 'cpu', 'data': {'index': 'int'} } | |
0cfd6a9a | 2248 | |
69ca3ea5 | 2249 | ## |
5072f7b3 | 2250 | # @cpu-add: |
69ca3ea5 IM |
2251 | # |
2252 | # Adds CPU with specified ID | |
2253 | # | |
2254 | # @id: ID of CPU to be created, valid values [0..max_cpus) | |
2255 | # | |
2256 | # Returns: Nothing on success | |
2257 | # | |
5072f7b3 | 2258 | # Since: 1.5 |
a7b83754 MAL |
2259 | # |
2260 | # Example: | |
2261 | # | |
2262 | # -> { "execute": "cpu-add", "arguments": { "id": 2 } } | |
2263 | # <- { "return": {} } | |
2264 | # | |
69ca3ea5 IM |
2265 | ## |
2266 | { 'command': 'cpu-add', 'data': {'id': 'int'} } | |
2267 | ||
0cfd6a9a LC |
2268 | ## |
2269 | # @memsave: | |
2270 | # | |
2271 | # Save a portion of guest memory to a file. | |
2272 | # | |
2273 | # @val: the virtual address of the guest to start from | |
2274 | # | |
2275 | # @size: the size of memory region to save | |
2276 | # | |
2277 | # @filename: the file to save the memory to as binary data | |
2278 | # | |
2279 | # @cpu-index: #optional the index of the virtual CPU to use for translating the | |
2280 | # virtual address (defaults to CPU 0) | |
2281 | # | |
2282 | # Returns: Nothing on success | |
0cfd6a9a LC |
2283 | # |
2284 | # Since: 0.14.0 | |
2285 | # | |
2286 | # Notes: Errors were not reliably returned until 1.1 | |
30831b63 MAL |
2287 | # |
2288 | # Example: | |
2289 | # | |
2290 | # -> { "execute": "memsave", | |
2291 | # "arguments": { "val": 10, | |
2292 | # "size": 100, | |
2293 | # "filename": "/tmp/virtual-mem-dump" } } | |
2294 | # <- { "return": {} } | |
2295 | # | |
0cfd6a9a LC |
2296 | ## |
2297 | { 'command': 'memsave', | |
2298 | 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} } | |
6d3962bf LC |
2299 | |
2300 | ## | |
2301 | # @pmemsave: | |
2302 | # | |
2303 | # Save a portion of guest physical memory to a file. | |
2304 | # | |
2305 | # @val: the physical address of the guest to start from | |
2306 | # | |
2307 | # @size: the size of memory region to save | |
2308 | # | |
2309 | # @filename: the file to save the memory to as binary data | |
2310 | # | |
2311 | # Returns: Nothing on success | |
6d3962bf LC |
2312 | # |
2313 | # Since: 0.14.0 | |
2314 | # | |
2315 | # Notes: Errors were not reliably returned until 1.1 | |
978d4d97 MAL |
2316 | # |
2317 | # Example: | |
2318 | # | |
2319 | # -> { "execute": "pmemsave", | |
2320 | # "arguments": { "val": 10, | |
2321 | # "size": 100, | |
2322 | # "filename": "/tmp/physical-mem-dump" } } | |
2323 | # <- { "return": {} } | |
2324 | # | |
6d3962bf LC |
2325 | ## |
2326 | { 'command': 'pmemsave', | |
2327 | 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} } | |
e42e818b LC |
2328 | |
2329 | ## | |
2330 | # @cont: | |
2331 | # | |
2332 | # Resume guest VCPU execution. | |
2333 | # | |
2334 | # Since: 0.14.0 | |
2335 | # | |
2336 | # Returns: If successful, nothing | |
e42e818b LC |
2337 | # If QEMU was started with an encrypted block device and a key has |
2338 | # not yet been set, DeviceEncrypted. | |
2339 | # | |
1e998146 PB |
2340 | # Notes: This command will succeed if the guest is currently running. It |
2341 | # will also succeed if the guest is in the "inmigrate" state; in | |
2342 | # this case, the effect of the command is to make sure the guest | |
2343 | # starts once migration finishes, removing the effect of the -S | |
2344 | # command line option if it was passed. | |
3815d0de MAL |
2345 | # |
2346 | # Example: | |
2347 | # | |
2348 | # -> { "execute": "cont" } | |
2349 | # <- { "return": {} } | |
2350 | # | |
e42e818b LC |
2351 | ## |
2352 | { 'command': 'cont' } | |
2353 | ||
9b9df25a GH |
2354 | ## |
2355 | # @system_wakeup: | |
2356 | # | |
2357 | # Wakeup guest from suspend. Does nothing in case the guest isn't suspended. | |
2358 | # | |
2359 | # Since: 1.1 | |
2360 | # | |
2361 | # Returns: nothing. | |
253cdee1 MAL |
2362 | # |
2363 | # Example: | |
2364 | # | |
2365 | # -> { "execute": "system_wakeup" } | |
2366 | # <- { "return": {} } | |
2367 | # | |
9b9df25a GH |
2368 | ## |
2369 | { 'command': 'system_wakeup' } | |
2370 | ||
ab49ab5c LC |
2371 | ## |
2372 | # @inject-nmi: | |
2373 | # | |
9cb805fd | 2374 | # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64). |
149ea099 | 2375 | # The command fails when the guest doesn't support injecting. |
ab49ab5c LC |
2376 | # |
2377 | # Returns: If successful, nothing | |
ab49ab5c LC |
2378 | # |
2379 | # Since: 0.14.0 | |
2380 | # | |
9cb805fd | 2381 | # Note: prior to 2.1, this command was only supported for x86 and s390 VMs |
149ea099 MAL |
2382 | # |
2383 | # Example: | |
2384 | # | |
2385 | # -> { "execute": "inject-nmi" } | |
2386 | # <- { "return": {} } | |
2387 | # | |
ab49ab5c LC |
2388 | ## |
2389 | { 'command': 'inject-nmi' } | |
4b37156c LC |
2390 | |
2391 | ## | |
2392 | # @set_link: | |
2393 | # | |
2394 | # Sets the link status of a virtual network adapter. | |
2395 | # | |
2396 | # @name: the device name of the virtual network adapter | |
2397 | # | |
2398 | # @up: true to set the link status to be up | |
2399 | # | |
2400 | # Returns: Nothing on success | |
2401 | # If @name is not a valid network device, DeviceNotFound | |
2402 | # | |
2403 | # Since: 0.14.0 | |
2404 | # | |
2405 | # Notes: Not all network adapters support setting link status. This command | |
2406 | # will succeed even if the network adapter does not support link status | |
2407 | # notification. | |
f9cfb8f7 MAL |
2408 | # |
2409 | # Example: | |
2410 | # | |
2411 | # -> { "execute": "set_link", | |
2412 | # "arguments": { "name": "e1000.0", "up": false } } | |
2413 | # <- { "return": {} } | |
2414 | # | |
4b37156c LC |
2415 | ## |
2416 | { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} } | |
a4dea8a9 | 2417 | |
d72f3264 LC |
2418 | ## |
2419 | # @balloon: | |
2420 | # | |
2421 | # Request the balloon driver to change its balloon size. | |
2422 | # | |
2423 | # @value: the target size of the balloon in bytes | |
2424 | # | |
2425 | # Returns: Nothing on success | |
2426 | # If the balloon driver is enabled but not functional because the KVM | |
2427 | # kernel module cannot support it, KvmMissingCap | |
2428 | # If no balloon device is present, DeviceNotActive | |
2429 | # | |
2430 | # Notes: This command just issues a request to the guest. When it returns, | |
2431 | # the balloon size may not have changed. A guest can change the balloon | |
2432 | # size independent of this command. | |
2433 | # | |
2434 | # Since: 0.14.0 | |
7b338db7 MAL |
2435 | # |
2436 | # Example: | |
2437 | # | |
2438 | # -> { "execute": "balloon", "arguments": { "value": 536870912 } } | |
2439 | # <- { "return": {} } | |
2440 | # | |
d72f3264 LC |
2441 | ## |
2442 | { 'command': 'balloon', 'data': {'value': 'int'} } | |
5e7caacb | 2443 | |
78b18b78 | 2444 | ## |
5072f7b3 | 2445 | # @Abort: |
78b18b78 SH |
2446 | # |
2447 | # This action can be used to test transaction failure. | |
2448 | # | |
2449 | # Since: 1.6 | |
5072f7b3 | 2450 | ## |
895a2a80 | 2451 | { 'struct': 'Abort', |
78b18b78 SH |
2452 | 'data': { } } |
2453 | ||
94d16a64 | 2454 | ## |
5072f7b3 | 2455 | # @ActionCompletionMode: |
94d16a64 JS |
2456 | # |
2457 | # An enumeration of Transactional completion modes. | |
2458 | # | |
2459 | # @individual: Do not attempt to cancel any other Actions if any Actions fail | |
2460 | # after the Transaction request succeeds. All Actions that | |
2461 | # can complete successfully will do so without waiting on others. | |
2462 | # This is the default. | |
2463 | # | |
2464 | # @grouped: If any Action fails after the Transaction succeeds, cancel all | |
2465 | # Actions. Actions do not complete until all Actions are ready to | |
2466 | # complete. May be rejected by Actions that do not support this | |
2467 | # completion mode. | |
2468 | # | |
2469 | # Since: 2.5 | |
2470 | ## | |
2471 | { 'enum': 'ActionCompletionMode', | |
2472 | 'data': [ 'individual', 'grouped' ] } | |
2473 | ||
8802d1fd | 2474 | ## |
5072f7b3 | 2475 | # @TransactionAction: |
8802d1fd | 2476 | # |
52e7c241 | 2477 | # A discriminated record of operations that can be performed with |
41dc1dc0 | 2478 | # @transaction. Action @type can be: |
b7b9d39a | 2479 | # |
41dc1dc0 MAL |
2480 | # - @abort: since 1.6 |
2481 | # - @block-dirty-bitmap-add: since 2.5 | |
2482 | # - @block-dirty-bitmap-clear: since 2.5 | |
2483 | # - @blockdev-backup: since 2.3 | |
2484 | # - @blockdev-snapshot: since 2.5 | |
2485 | # - @blockdev-snapshot-internal-sync: since 1.7 | |
2486 | # - @blockdev-snapshot-sync: since 1.1 | |
2487 | # - @drive-backup: since 1.6 | |
b7b9d39a | 2488 | # |
41dc1dc0 | 2489 | # Since: 1.1 |
8802d1fd | 2490 | ## |
c8a83e85 | 2491 | { 'union': 'TransactionAction', |
52e7c241 | 2492 | 'data': { |
bbe86010 | 2493 | 'abort': 'Abort', |
df9a681d | 2494 | 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd', |
41dc1dc0 MAL |
2495 | 'block-dirty-bitmap-clear': 'BlockDirtyBitmap', |
2496 | 'blockdev-backup': 'BlockdevBackup', | |
2497 | 'blockdev-snapshot': 'BlockdevSnapshot', | |
2498 | 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal', | |
2499 | 'blockdev-snapshot-sync': 'BlockdevSnapshotSync', | |
2500 | 'drive-backup': 'DriveBackup' | |
52e7c241 | 2501 | } } |
8802d1fd | 2502 | |
94d16a64 | 2503 | ## |
5072f7b3 | 2504 | # @TransactionProperties: |
94d16a64 JS |
2505 | # |
2506 | # Optional arguments to modify the behavior of a Transaction. | |
2507 | # | |
2508 | # @completion-mode: #optional Controls how jobs launched asynchronously by | |
2509 | # Actions will complete or fail as a group. | |
2510 | # See @ActionCompletionMode for details. | |
2511 | # | |
2512 | # Since: 2.5 | |
2513 | ## | |
2514 | { 'struct': 'TransactionProperties', | |
2515 | 'data': { | |
2516 | '*completion-mode': 'ActionCompletionMode' | |
2517 | } | |
2518 | } | |
2519 | ||
8802d1fd | 2520 | ## |
5072f7b3 | 2521 | # @transaction: |
8802d1fd | 2522 | # |
c8a83e85 KW |
2523 | # Executes a number of transactionable QMP commands atomically. If any |
2524 | # operation fails, then the entire set of actions will be abandoned and the | |
2525 | # appropriate error returned. | |
8802d1fd | 2526 | # |
5c82b0f1 MAL |
2527 | # For external snapshots, the dictionary contains the device, the file to use for |
2528 | # the new snapshot, and the format. The default format, if not specified, is | |
2529 | # qcow2. | |
2530 | # | |
2531 | # Each new snapshot defaults to being created by QEMU (wiping any | |
2532 | # contents if the file already exists), but it is also possible to reuse | |
2533 | # an externally-created file. In the latter case, you should ensure that | |
2534 | # the new image file has the same contents as the current one; QEMU cannot | |
2535 | # perform any meaningful check. Typically this is achieved by using the | |
2536 | # current image file as the backing file for the new image. | |
2537 | # | |
2538 | # On failure, the original disks pre-snapshot attempt will be used. | |
2539 | # | |
2540 | # For internal snapshots, the dictionary contains the device and the snapshot's | |
2541 | # name. If an internal snapshot matching name already exists, the request will | |
2542 | # be rejected. Only some image formats support it, for example, qcow2, rbd, | |
2543 | # and sheepdog. | |
2544 | # | |
2545 | # On failure, qemu will try delete the newly created internal snapshot in the | |
2546 | # transaction. When an I/O error occurs during deletion, the user needs to fix | |
2547 | # it later with qemu-img or other command. | |
2548 | # | |
94d16a64 JS |
2549 | # @actions: List of @TransactionAction; |
2550 | # information needed for the respective operations. | |
2551 | # | |
2552 | # @properties: #optional structure of additional options to control the | |
2553 | # execution of the transaction. See @TransactionProperties | |
2554 | # for additional detail. | |
8802d1fd JC |
2555 | # |
2556 | # Returns: nothing on success | |
5c82b0f1 | 2557 | # |
c8a83e85 | 2558 | # Errors depend on the operations of the transaction |
8802d1fd | 2559 | # |
c8a83e85 KW |
2560 | # Note: The transaction aborts on the first failure. Therefore, there will be |
2561 | # information on only one failed operation returned in an error condition, and | |
52e7c241 PB |
2562 | # subsequent actions will not have been attempted. |
2563 | # | |
5072f7b3 | 2564 | # Since: 1.1 |
5c82b0f1 MAL |
2565 | # |
2566 | # Example: | |
2567 | # | |
2568 | # -> { "execute": "transaction", | |
2569 | # "arguments": { "actions": [ | |
2570 | # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0", | |
2571 | # "snapshot-file": "/some/place/my-image", | |
2572 | # "format": "qcow2" } }, | |
2573 | # { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile", | |
2574 | # "snapshot-file": "/some/place/my-image2", | |
2575 | # "snapshot-node-name": "node3432", | |
2576 | # "mode": "existing", | |
2577 | # "format": "qcow2" } }, | |
2578 | # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1", | |
2579 | # "snapshot-file": "/some/place/my-image2", | |
2580 | # "mode": "existing", | |
2581 | # "format": "qcow2" } }, | |
2582 | # { "type": "blockdev-snapshot-internal-sync", "data" : { | |
2583 | # "device": "ide-hd2", | |
2584 | # "name": "snapshot0" } } ] } } | |
2585 | # <- { "return": {} } | |
2586 | # | |
8802d1fd | 2587 | ## |
52e7c241 | 2588 | { 'command': 'transaction', |
94d16a64 JS |
2589 | 'data': { 'actions': [ 'TransactionAction' ], |
2590 | '*properties': 'TransactionProperties' | |
2591 | } | |
2592 | } | |
8802d1fd | 2593 | |
d51a67b4 LC |
2594 | ## |
2595 | # @human-monitor-command: | |
2596 | # | |
2597 | # Execute a command on the human monitor and return the output. | |
2598 | # | |
2599 | # @command-line: the command to execute in the human monitor | |
2600 | # | |
2601 | # @cpu-index: #optional The CPU to use for commands that require an implicit CPU | |
2602 | # | |
2603 | # Returns: the output of the command as a string | |
2604 | # | |
1ad166b6 | 2605 | # Since: 0.14.0 |
08e4ed6c | 2606 | # |
1ad166b6 | 2607 | # Notes: This command only exists as a stop-gap. Its use is highly |
e9ac76ac MAL |
2608 | # discouraged. The semantics of this command are not |
2609 | # guaranteed: this means that command names, arguments and | |
2610 | # responses can change or be removed at ANY time. Applications | |
2611 | # that rely on long term stability guarantees should NOT | |
2612 | # use this command. | |
b952b558 | 2613 | # |
1ad166b6 | 2614 | # Known limitations: |
b952b558 | 2615 | # |
3df58d41 | 2616 | # * This command is stateless, this means that commands that depend |
1ad166b6 | 2617 | # on state information (such as getfd) might not work |
d9b902db | 2618 | # |
3df58d41 MAL |
2619 | # * Commands that prompt the user for data (eg. 'cont' when the block |
2620 | # device is encrypted) don't currently work | |
e9ac76ac MAL |
2621 | # |
2622 | # Example: | |
2623 | # | |
2624 | # -> { "execute": "human-monitor-command", | |
2625 | # "arguments": { "command-line": "info kvm" } } | |
2626 | # <- { "return": "kvm support: enabled\r\n" } | |
2627 | # | |
d9b902db | 2628 | ## |
1ad166b6 BC |
2629 | { 'command': 'human-monitor-command', |
2630 | 'data': {'command-line': 'str', '*cpu-index': 'int'}, | |
2631 | 'returns': 'str' } | |
d9b902db PB |
2632 | |
2633 | ## | |
5072f7b3 | 2634 | # @migrate_cancel: |
6cdedb07 LC |
2635 | # |
2636 | # Cancel the current executing migration process. | |
2637 | # | |
2638 | # Returns: nothing on success | |
2639 | # | |
2640 | # Notes: This command succeeds even if there is no migration process running. | |
2641 | # | |
2642 | # Since: 0.14.0 | |
92dcfb43 MAL |
2643 | # |
2644 | # Example: | |
2645 | # | |
2646 | # -> { "execute": "migrate_cancel" } | |
2647 | # <- { "return": {} } | |
2648 | # | |
6cdedb07 LC |
2649 | ## |
2650 | { 'command': 'migrate_cancel' } | |
4f0a993b LC |
2651 | |
2652 | ## | |
5072f7b3 | 2653 | # @migrate_set_downtime: |
4f0a993b LC |
2654 | # |
2655 | # Set maximum tolerated downtime for migration. | |
2656 | # | |
2657 | # @value: maximum downtime in seconds | |
2658 | # | |
2659 | # Returns: nothing on success | |
2660 | # | |
2ff30257 AA |
2661 | # Notes: This command is deprecated in favor of 'migrate-set-parameters' |
2662 | # | |
4f0a993b | 2663 | # Since: 0.14.0 |
de0b45ea MAL |
2664 | # |
2665 | # Example: | |
2666 | # | |
2667 | # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } } | |
2668 | # <- { "return": {} } | |
2669 | # | |
4f0a993b LC |
2670 | ## |
2671 | { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} } | |
3dc85383 LC |
2672 | |
2673 | ## | |
5072f7b3 | 2674 | # @migrate_set_speed: |
3dc85383 LC |
2675 | # |
2676 | # Set maximum speed for migration. | |
2677 | # | |
ab989533 | 2678 | # @value: maximum speed in bytes per second. |
3dc85383 LC |
2679 | # |
2680 | # Returns: nothing on success | |
2681 | # | |
2ff30257 | 2682 | # Notes: This command is deprecated in favor of 'migrate-set-parameters' |
3dc85383 LC |
2683 | # |
2684 | # Since: 0.14.0 | |
ab989533 MAL |
2685 | # |
2686 | # Example: | |
2687 | # | |
2688 | # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } } | |
2689 | # <- { "return": {} } | |
2690 | # | |
3dc85383 LC |
2691 | ## |
2692 | { 'command': 'migrate_set_speed', 'data': {'value': 'int'} } | |
b4b12c62 | 2693 | |
9e1ba4cc | 2694 | ## |
5072f7b3 | 2695 | # @migrate-set-cache-size: |
9e1ba4cc | 2696 | # |
8f457b67 | 2697 | # Set cache size to be used by XBZRLE migration |
9e1ba4cc OW |
2698 | # |
2699 | # @value: cache size in bytes | |
2700 | # | |
2701 | # The size will be rounded down to the nearest power of 2. | |
2702 | # The cache size can be modified before and during ongoing migration | |
2703 | # | |
2704 | # Returns: nothing on success | |
2705 | # | |
2706 | # Since: 1.2 | |
8f457b67 MAL |
2707 | # |
2708 | # Example: | |
2709 | # | |
2710 | # -> { "execute": "migrate-set-cache-size", | |
2711 | # "arguments": { "value": 536870912 } } | |
2712 | # <- { "return": {} } | |
2713 | # | |
9e1ba4cc OW |
2714 | ## |
2715 | { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} } | |
2716 | ||
2717 | ## | |
5072f7b3 | 2718 | # @query-migrate-cache-size: |
9e1ba4cc | 2719 | # |
b953601b | 2720 | # Query migration XBZRLE cache size |
9e1ba4cc OW |
2721 | # |
2722 | # Returns: XBZRLE cache size in bytes | |
2723 | # | |
2724 | # Since: 1.2 | |
b953601b MAL |
2725 | # |
2726 | # Example: | |
2727 | # | |
2728 | # -> { "execute": "query-migrate-cache-size" } | |
2729 | # <- { "return": 67108864 } | |
2730 | # | |
9e1ba4cc OW |
2731 | ## |
2732 | { 'command': 'query-migrate-cache-size', 'returns': 'int' } | |
2733 | ||
b4b12c62 | 2734 | ## |
d03ee401 | 2735 | # @ObjectPropertyInfo: |
b4b12c62 AL |
2736 | # |
2737 | # @name: the name of the property | |
2738 | # | |
2739 | # @type: the type of the property. This will typically come in one of four | |
2740 | # forms: | |
2741 | # | |
2742 | # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'. | |
2743 | # These types are mapped to the appropriate JSON type. | |
2744 | # | |
33b23b4b | 2745 | # 2) A child type in the form 'child<subtype>' where subtype is a qdev |
b4b12c62 AL |
2746 | # device type name. Child properties create the composition tree. |
2747 | # | |
33b23b4b | 2748 | # 3) A link type in the form 'link<subtype>' where subtype is a qdev |
b4b12c62 AL |
2749 | # device type name. Link properties form the device model graph. |
2750 | # | |
51920820 | 2751 | # Since: 1.2 |
b4b12c62 | 2752 | ## |
895a2a80 | 2753 | { 'struct': 'ObjectPropertyInfo', |
b4b12c62 AL |
2754 | 'data': { 'name': 'str', 'type': 'str' } } |
2755 | ||
2756 | ## | |
2757 | # @qom-list: | |
2758 | # | |
57c9fafe | 2759 | # This command will list any properties of a object given a path in the object |
b4b12c62 AL |
2760 | # model. |
2761 | # | |
57c9fafe | 2762 | # @path: the path within the object model. See @qom-get for a description of |
b4b12c62 AL |
2763 | # this parameter. |
2764 | # | |
57c9fafe AL |
2765 | # Returns: a list of @ObjectPropertyInfo that describe the properties of the |
2766 | # object. | |
b4b12c62 | 2767 | # |
51920820 | 2768 | # Since: 1.2 |
b4b12c62 AL |
2769 | ## |
2770 | { 'command': 'qom-list', | |
2771 | 'data': { 'path': 'str' }, | |
57c9fafe | 2772 | 'returns': [ 'ObjectPropertyInfo' ] } |
eb6e8ea5 AL |
2773 | |
2774 | ## | |
2775 | # @qom-get: | |
2776 | # | |
57c9fafe | 2777 | # This command will get a property from a object model path and return the |
eb6e8ea5 AL |
2778 | # value. |
2779 | # | |
57c9fafe | 2780 | # @path: The path within the object model. There are two forms of supported |
eb6e8ea5 AL |
2781 | # paths--absolute and partial paths. |
2782 | # | |
57c9fafe | 2783 | # Absolute paths are derived from the root object and can follow child<> |
eb6e8ea5 AL |
2784 | # or link<> properties. Since they can follow link<> properties, they |
2785 | # can be arbitrarily long. Absolute paths look like absolute filenames | |
2786 | # and are prefixed with a leading slash. | |
2787 | # | |
2788 | # Partial paths look like relative filenames. They do not begin | |
2789 | # with a prefix. The matching rules for partial paths are subtle but | |
57c9fafe | 2790 | # designed to make specifying objects easy. At each level of the |
eb6e8ea5 AL |
2791 | # composition tree, the partial path is matched as an absolute path. |
2792 | # The first match is not returned. At least two matches are searched | |
2793 | # for. A successful result is only returned if only one match is | |
2794 | # found. If more than one match is found, a flag is return to | |
2795 | # indicate that the match was ambiguous. | |
2796 | # | |
2797 | # @property: The property name to read | |
2798 | # | |
33b23b4b MAL |
2799 | # Returns: The property value. The type depends on the property |
2800 | # type. child<> and link<> properties are returned as #str | |
2801 | # pathnames. All integer property types (u8, u16, etc) are | |
2802 | # returned as #int. | |
eb6e8ea5 | 2803 | # |
51920820 | 2804 | # Since: 1.2 |
eb6e8ea5 AL |
2805 | ## |
2806 | { 'command': 'qom-get', | |
2807 | 'data': { 'path': 'str', 'property': 'str' }, | |
6eb3937e | 2808 | 'returns': 'any' } |
eb6e8ea5 AL |
2809 | |
2810 | ## | |
2811 | # @qom-set: | |
2812 | # | |
57c9fafe | 2813 | # This command will set a property from a object model path. |
eb6e8ea5 AL |
2814 | # |
2815 | # @path: see @qom-get for a description of this parameter | |
2816 | # | |
2817 | # @property: the property name to set | |
2818 | # | |
2819 | # @value: a value who's type is appropriate for the property type. See @qom-get | |
2820 | # for a description of type mapping. | |
2821 | # | |
51920820 | 2822 | # Since: 1.2 |
eb6e8ea5 AL |
2823 | ## |
2824 | { 'command': 'qom-set', | |
6eb3937e | 2825 | 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } } |
fbf796fd LC |
2826 | |
2827 | ## | |
2828 | # @set_password: | |
2829 | # | |
2830 | # Sets the password of a remote display session. | |
2831 | # | |
2832 | # @protocol: `vnc' to modify the VNC server password | |
2833 | # `spice' to modify the Spice server password | |
2834 | # | |
2835 | # @password: the new password | |
2836 | # | |
2837 | # @connected: #optional how to handle existing clients when changing the | |
b80e560b | 2838 | # password. If nothing is specified, defaults to `keep' |
fbf796fd LC |
2839 | # `fail' to fail the command if clients are connected |
2840 | # `disconnect' to disconnect existing clients | |
2841 | # `keep' to maintain existing clients | |
2842 | # | |
2843 | # Returns: Nothing on success | |
2844 | # If Spice is not enabled, DeviceNotFound | |
fbf796fd LC |
2845 | # |
2846 | # Since: 0.14.0 | |
4d8a374e MAL |
2847 | # |
2848 | # Example: | |
2849 | # | |
2850 | # -> { "execute": "set_password", "arguments": { "protocol": "vnc", | |
2851 | # "password": "secret" } } | |
2852 | # <- { "return": {} } | |
2853 | # | |
fbf796fd LC |
2854 | ## |
2855 | { 'command': 'set_password', | |
2856 | 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} } | |
9ad5372d LC |
2857 | |
2858 | ## | |
2859 | # @expire_password: | |
2860 | # | |
2861 | # Expire the password of a remote display server. | |
2862 | # | |
2863 | # @protocol: the name of the remote display protocol `vnc' or `spice' | |
2864 | # | |
2865 | # @time: when to expire the password. | |
2866 | # `now' to expire the password immediately | |
2867 | # `never' to cancel password expiration | |
2868 | # `+INT' where INT is the number of seconds from now (integer) | |
2869 | # `INT' where INT is the absolute time in seconds | |
2870 | # | |
2871 | # Returns: Nothing on success | |
2872 | # If @protocol is `spice' and Spice is not active, DeviceNotFound | |
9ad5372d LC |
2873 | # |
2874 | # Since: 0.14.0 | |
2875 | # | |
2876 | # Notes: Time is relative to the server and currently there is no way to | |
2877 | # coordinate server time with client time. It is not recommended to | |
2878 | # use the absolute time version of the @time parameter unless you're | |
2879 | # sure you are on the same machine as the QEMU instance. | |
342816b9 MAL |
2880 | # |
2881 | # Example: | |
2882 | # | |
2883 | # -> { "execute": "expire_password", "arguments": { "protocol": "vnc", | |
2884 | # "time": "+60" } } | |
2885 | # <- { "return": {} } | |
2886 | # | |
9ad5372d LC |
2887 | ## |
2888 | { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} } | |
c245b6a3 | 2889 | |
270b243f LC |
2890 | ## |
2891 | # @change-vnc-password: | |
2892 | # | |
2893 | # Change the VNC server password. | |
2894 | # | |
1c854067 | 2895 | # @password: the new password to use with VNC authentication |
270b243f LC |
2896 | # |
2897 | # Since: 1.1 | |
2898 | # | |
2899 | # Notes: An empty password in this command will set the password to the empty | |
2900 | # string. Existing clients are unaffected by executing this command. | |
2901 | ## | |
2902 | { 'command': 'change-vnc-password', 'data': {'password': 'str'} } | |
333a96ec LC |
2903 | |
2904 | ## | |
2905 | # @change: | |
2906 | # | |
2907 | # This command is multiple commands multiplexed together. | |
2908 | # | |
2909 | # @device: This is normally the name of a block device but it may also be 'vnc'. | |
2910 | # when it's 'vnc', then sub command depends on @target | |
2911 | # | |
2912 | # @target: If @device is a block device, then this is the new filename. | |
2913 | # If @device is 'vnc', then if the value 'password' selects the vnc | |
2914 | # change password command. Otherwise, this specifies a new server URI | |
2915 | # address to listen to for VNC connections. | |
2916 | # | |
2917 | # @arg: If @device is a block device, then this is an optional format to open | |
2918 | # the device with. | |
2919 | # If @device is 'vnc' and @target is 'password', this is the new VNC | |
2920 | # password to set. If this argument is an empty string, then no future | |
2921 | # logins will be allowed. | |
2922 | # | |
2923 | # Returns: Nothing on success. | |
2924 | # If @device is not a valid block device, DeviceNotFound | |
333a96ec LC |
2925 | # If the new block device is encrypted, DeviceEncrypted. Note that |
2926 | # if this error is returned, the device has been opened successfully | |
2927 | # and an additional call to @block_passwd is required to set the | |
2928 | # device's password. The behavior of reads and writes to the block | |
2929 | # device between when these calls are executed is undefined. | |
2930 | # | |
24fb4133 HR |
2931 | # Notes: This interface is deprecated, and it is strongly recommended that you |
2932 | # avoid using it. For changing block devices, use | |
2933 | # blockdev-change-medium; for changing VNC parameters, use | |
2934 | # change-vnc-password. | |
333a96ec LC |
2935 | # |
2936 | # Since: 0.14.0 | |
01387ae5 MAL |
2937 | # |
2938 | # Example: | |
2939 | # | |
2940 | # 1. Change a removable medium | |
2941 | # | |
2942 | # -> { "execute": "change", | |
2943 | # "arguments": { "device": "ide1-cd0", | |
2944 | # "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } } | |
2945 | # <- { "return": {} } | |
2946 | # | |
2947 | # 2. Change VNC password | |
2948 | # | |
2949 | # -> { "execute": "change", | |
2950 | # "arguments": { "device": "vnc", "target": "password", | |
2951 | # "arg": "foobar1" } } | |
2952 | # <- { "return": {} } | |
2953 | # | |
333a96ec LC |
2954 | ## |
2955 | { 'command': 'change', | |
2956 | 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} } | |
80047da5 | 2957 | |
5eeee3fa AL |
2958 | ## |
2959 | # @ObjectTypeInfo: | |
2960 | # | |
2961 | # This structure describes a search result from @qom-list-types | |
2962 | # | |
2963 | # @name: the type name found in the search | |
2964 | # | |
2965 | # Since: 1.1 | |
2966 | # | |
2967 | # Notes: This command is experimental and may change syntax in future releases. | |
2968 | ## | |
895a2a80 | 2969 | { 'struct': 'ObjectTypeInfo', |
5eeee3fa AL |
2970 | 'data': { 'name': 'str' } } |
2971 | ||
2972 | ## | |
2973 | # @qom-list-types: | |
2974 | # | |
2975 | # This command will return a list of types given search parameters | |
2976 | # | |
2977 | # @implements: if specified, only return types that implement this type name | |
2978 | # | |
2979 | # @abstract: if true, include abstract types in the results | |
2980 | # | |
2981 | # Returns: a list of @ObjectTypeInfo or an empty list if no results are found | |
2982 | # | |
2983 | # Since: 1.1 | |
5eeee3fa AL |
2984 | ## |
2985 | { 'command': 'qom-list-types', | |
2986 | 'data': { '*implements': 'str', '*abstract': 'bool' }, | |
2987 | 'returns': [ 'ObjectTypeInfo' ] } | |
e1c37d0e | 2988 | |
1daa31b9 AL |
2989 | ## |
2990 | # @DevicePropertyInfo: | |
2991 | # | |
2992 | # Information about device properties. | |
2993 | # | |
2994 | # @name: the name of the property | |
2995 | # @type: the typename of the property | |
07d09c58 GA |
2996 | # @description: #optional if specified, the description of the property. |
2997 | # (since 2.2) | |
1daa31b9 AL |
2998 | # |
2999 | # Since: 1.2 | |
3000 | ## | |
895a2a80 | 3001 | { 'struct': 'DevicePropertyInfo', |
07d09c58 | 3002 | 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } } |
1daa31b9 AL |
3003 | |
3004 | ## | |
3005 | # @device-list-properties: | |
3006 | # | |
3007 | # List properties associated with a device. | |
3008 | # | |
3009 | # @typename: the type name of a device | |
3010 | # | |
3011 | # Returns: a list of DevicePropertyInfo describing a devices properties | |
3012 | # | |
3013 | # Since: 1.2 | |
3014 | ## | |
3015 | { 'command': 'device-list-properties', | |
3016 | 'data': { 'typename': 'str'}, | |
3017 | 'returns': [ 'DevicePropertyInfo' ] } | |
3018 | ||
e1c37d0e | 3019 | ## |
5072f7b3 | 3020 | # @migrate: |
e1c37d0e LC |
3021 | # |
3022 | # Migrates the current running guest to another Virtual Machine. | |
3023 | # | |
3024 | # @uri: the Uniform Resource Identifier of the destination VM | |
3025 | # | |
3026 | # @blk: #optional do block migration (full disk copy) | |
3027 | # | |
3028 | # @inc: #optional incremental disk copy migration | |
3029 | # | |
3030 | # @detach: this argument exists only for compatibility reasons and | |
3031 | # is ignored by QEMU | |
3032 | # | |
3033 | # Returns: nothing on success | |
3034 | # | |
3035 | # Since: 0.14.0 | |
b3ac5a0d MAL |
3036 | # |
3037 | # Notes: | |
3038 | # | |
3039 | # 1. The 'query-migrate' command should be used to check migration's progress | |
3040 | # and final result (this information is provided by the 'status' member) | |
3041 | # | |
3042 | # 2. All boolean arguments default to false | |
3043 | # | |
3044 | # 3. The user Monitor's "detach" argument is invalid in QMP and should not | |
3045 | # be used | |
3046 | # | |
3047 | # Example: | |
3048 | # | |
3049 | # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } } | |
3050 | # <- { "return": {} } | |
3051 | # | |
e1c37d0e LC |
3052 | ## |
3053 | { 'command': 'migrate', | |
3054 | 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } } | |
33cf629a | 3055 | |
bf1ae1f4 | 3056 | ## |
5072f7b3 | 3057 | # @migrate-incoming: |
bf1ae1f4 DDAG |
3058 | # |
3059 | # Start an incoming migration, the qemu must have been started | |
3060 | # with -incoming defer | |
3061 | # | |
3062 | # @uri: The Uniform Resource Identifier identifying the source or | |
3063 | # address to listen on | |
3064 | # | |
3065 | # Returns: nothing on success | |
3066 | # | |
3067 | # Since: 2.3 | |
dbdbddb9 MAL |
3068 | # |
3069 | # Notes: | |
3070 | # | |
3071 | # 1. It's a bad idea to use a string for the uri, but it needs to stay | |
3072 | # compatible with -incoming and the format of the uri is already exposed | |
3073 | # above libvirt. | |
3074 | # | |
3075 | # 2. QEMU must be started with -incoming defer to allow migrate-incoming to | |
3076 | # be used. | |
3077 | # | |
3078 | # 3. The uri format is the same as for -incoming | |
3079 | # | |
3080 | # Example: | |
3081 | # | |
3082 | # -> { "execute": "migrate-incoming", | |
3083 | # "arguments": { "uri": "tcp::4446" } } | |
3084 | # <- { "return": {} } | |
3085 | # | |
bf1ae1f4 DDAG |
3086 | ## |
3087 | { 'command': 'migrate-incoming', 'data': {'uri': 'str' } } | |
3088 | ||
49687ace | 3089 | ## |
a7ae8355 SS |
3090 | # @xen-save-devices-state: |
3091 | # | |
3092 | # Save the state of all devices to file. The RAM and the block devices | |
3093 | # of the VM are not saved by this command. | |
3094 | # | |
3095 | # @filename: the file to save the state of the devices to as binary | |
3096 | # data. See xen-save-devices-state.txt for a description of the binary | |
3097 | # format. | |
3098 | # | |
3099 | # Returns: Nothing on success | |
a7ae8355 SS |
3100 | # |
3101 | # Since: 1.1 | |
2ea72beb MAL |
3102 | # |
3103 | # Example: | |
3104 | # | |
3105 | # -> { "execute": "xen-save-devices-state", | |
3106 | # "arguments": { "filename": "/tmp/save" } } | |
3107 | # <- { "return": {} } | |
3108 | # | |
a7ae8355 SS |
3109 | ## |
3110 | { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} } | |
a15fef21 | 3111 | |
39f42439 | 3112 | ## |
5072f7b3 | 3113 | # @xen-set-global-dirty-log: |
39f42439 AP |
3114 | # |
3115 | # Enable or disable the global dirty log mode. | |
3116 | # | |
3117 | # @enable: true to enable, false to disable. | |
3118 | # | |
3119 | # Returns: nothing | |
3120 | # | |
3121 | # Since: 1.3 | |
a4df6eff MAL |
3122 | # |
3123 | # Example: | |
3124 | # | |
3125 | # -> { "execute": "xen-set-global-dirty-log", | |
3126 | # "arguments": { "enable": true } } | |
3127 | # <- { "return": {} } | |
3128 | # | |
39f42439 AP |
3129 | ## |
3130 | { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } } | |
3131 | ||
94cfd07f MAL |
3132 | ## |
3133 | # @device_add: | |
3134 | # | |
3135 | # @driver: the name of the new device's driver | |
3136 | # | |
3137 | # @bus: #optional the device's parent bus (device tree path) | |
3138 | # | |
b780e9c3 | 3139 | # @id: #optional the device's ID, must be unique |
94cfd07f MAL |
3140 | # |
3141 | # Additional arguments depend on the type. | |
3142 | # | |
3143 | # Add a device. | |
3144 | # | |
3145 | # Notes: | |
3146 | # 1. For detailed information about this command, please refer to the | |
3147 | # 'docs/qdev-device-use.txt' file. | |
3148 | # | |
3149 | # 2. It's possible to list device properties by running QEMU with the | |
3150 | # "-device DEVICE,help" command-line argument, where DEVICE is the | |
3151 | # device's name | |
3152 | # | |
3153 | # Example: | |
3154 | # | |
3155 | # -> { "execute": "device_add", | |
3156 | # "arguments": { "driver": "e1000", "id": "net1", | |
3157 | # "bus": "pci.0", | |
3158 | # "mac": "52:54:00:12:34:56" } } | |
3159 | # <- { "return": {} } | |
3160 | # | |
e22da431 | 3161 | # TODO: This command effectively bypasses QAPI completely due to its |
94cfd07f MAL |
3162 | # "additional arguments" business. It shouldn't have been added to |
3163 | # the schema in this form. It should be qapified properly, or | |
3164 | # replaced by a properly qapified command. | |
3165 | # | |
3166 | # Since: 0.13 | |
3167 | ## | |
3168 | { 'command': 'device_add', | |
b780e9c3 | 3169 | 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'}, |
94cfd07f MAL |
3170 | 'gen': false } # so we can get the additional arguments |
3171 | ||
a15fef21 LC |
3172 | ## |
3173 | # @device_del: | |
3174 | # | |
3175 | # Remove a device from a guest | |
3176 | # | |
e389c004 | 3177 | # @id: the device's ID or QOM path |
a15fef21 LC |
3178 | # |
3179 | # Returns: Nothing on success | |
3180 | # If @id is not a valid device, DeviceNotFound | |
a15fef21 LC |
3181 | # |
3182 | # Notes: When this command completes, the device may not be removed from the | |
3183 | # guest. Hot removal is an operation that requires guest cooperation. | |
3184 | # This command merely requests that the guest begin the hot removal | |
0402a5d6 MT |
3185 | # process. Completion of the device removal process is signaled with a |
3186 | # DEVICE_DELETED event. Guest reset will automatically complete removal | |
3187 | # for all devices. | |
a15fef21 LC |
3188 | # |
3189 | # Since: 0.14.0 | |
e389c004 MAL |
3190 | # |
3191 | # Example: | |
3192 | # | |
3193 | # -> { "execute": "device_del", | |
3194 | # "arguments": { "id": "net1" } } | |
3195 | # <- { "return": {} } | |
3196 | # | |
3197 | # -> { "execute": "device_del", | |
3198 | # "arguments": { "id": "/machine/peripheral-anon/device[0]" } } | |
3199 | # <- { "return": {} } | |
3200 | # | |
a15fef21 LC |
3201 | ## |
3202 | { 'command': 'device_del', 'data': {'id': 'str'} } | |
783e9b48 | 3203 | |
b53ccc30 QN |
3204 | ## |
3205 | # @DumpGuestMemoryFormat: | |
3206 | # | |
3207 | # An enumeration of guest-memory-dump's format. | |
3208 | # | |
3209 | # @elf: elf format | |
3210 | # | |
3211 | # @kdump-zlib: kdump-compressed format with zlib-compressed | |
3212 | # | |
3213 | # @kdump-lzo: kdump-compressed format with lzo-compressed | |
3214 | # | |
3215 | # @kdump-snappy: kdump-compressed format with snappy-compressed | |
3216 | # | |
3217 | # Since: 2.0 | |
3218 | ## | |
3219 | { 'enum': 'DumpGuestMemoryFormat', | |
3220 | 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] } | |
3221 | ||
783e9b48 | 3222 | ## |
5072f7b3 | 3223 | # @dump-guest-memory: |
783e9b48 WC |
3224 | # |
3225 | # Dump guest's memory to vmcore. It is a synchronous operation that can take | |
f1cd4830 | 3226 | # very long depending on the amount of guest memory. |
f5b0d93b LC |
3227 | # |
3228 | # @paging: if true, do paging to get guest's memory mapping. This allows | |
d691180e | 3229 | # using gdb to process the core file. |
f5b0d93b | 3230 | # |
d691180e LC |
3231 | # IMPORTANT: this option can make QEMU allocate several gigabytes |
3232 | # of RAM. This can happen for a large guest, or a | |
3233 | # malicious guest pretending to be large. | |
3234 | # | |
3235 | # Also, paging=true has the following limitations: | |
3236 | # | |
3237 | # 1. The guest may be in a catastrophic state or can have corrupted | |
3238 | # memory, which cannot be trusted | |
3239 | # 2. The guest can be in real-mode even if paging is enabled. For | |
3240 | # example, the guest uses ACPI to sleep, and ACPI sleep state | |
3241 | # goes in real-mode | |
f1cd4830 | 3242 | # 3. Currently only supported on i386 and x86_64. |
f5b0d93b | 3243 | # |
783e9b48 | 3244 | # @protocol: the filename or file descriptor of the vmcore. The supported |
d691180e | 3245 | # protocols are: |
f5b0d93b | 3246 | # |
d691180e LC |
3247 | # 1. file: the protocol starts with "file:", and the following |
3248 | # string is the file's path. | |
3249 | # 2. fd: the protocol starts with "fd:", and the following string | |
3250 | # is the fd's name. | |
f5b0d93b | 3251 | # |
228de9cf | 3252 | # @detach: #optional if true, QMP will return immediately rather than |
39ba2ea6 PX |
3253 | # waiting for the dump to finish. The user can track progress |
3254 | # using "query-dump". (since 2.6). | |
228de9cf | 3255 | # |
783e9b48 | 3256 | # @begin: #optional if specified, the starting physical address. |
f5b0d93b | 3257 | # |
783e9b48 | 3258 | # @length: #optional if specified, the memory size, in bytes. If you don't |
d691180e LC |
3259 | # want to dump all guest's memory, please specify the start @begin |
3260 | # and @length | |
783e9b48 | 3261 | # |
b53ccc30 QN |
3262 | # @format: #optional if specified, the format of guest memory dump. But non-elf |
3263 | # format is conflict with paging and filter, ie. @paging, @begin and | |
3264 | # @length is not allowed to be specified with non-elf @format at the | |
3265 | # same time (since 2.0) | |
3266 | # | |
58e4300a MAL |
3267 | # Note: All boolean arguments default to false |
3268 | # | |
783e9b48 | 3269 | # Returns: nothing on success |
783e9b48 WC |
3270 | # |
3271 | # Since: 1.2 | |
58e4300a MAL |
3272 | # |
3273 | # Example: | |
3274 | # | |
3275 | # -> { "execute": "dump-guest-memory", | |
3276 | # "arguments": { "protocol": "fd:dump" } } | |
3277 | # <- { "return": {} } | |
3278 | # | |
783e9b48 WC |
3279 | ## |
3280 | { 'command': 'dump-guest-memory', | |
228de9cf PX |
3281 | 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool', |
3282 | '*begin': 'int', '*length': 'int', | |
3283 | '*format': 'DumpGuestMemoryFormat'} } | |
d691180e | 3284 | |
baf28f57 | 3285 | ## |
5072f7b3 | 3286 | # @DumpStatus: |
baf28f57 PX |
3287 | # |
3288 | # Describe the status of a long-running background guest memory dump. | |
3289 | # | |
3290 | # @none: no dump-guest-memory has started yet. | |
3291 | # | |
3292 | # @active: there is one dump running in background. | |
3293 | # | |
3294 | # @completed: the last dump has finished successfully. | |
3295 | # | |
3296 | # @failed: the last dump has failed. | |
3297 | # | |
5072f7b3 | 3298 | # Since: 2.6 |
baf28f57 PX |
3299 | ## |
3300 | { 'enum': 'DumpStatus', | |
3301 | 'data': [ 'none', 'active', 'completed', 'failed' ] } | |
3302 | ||
39ba2ea6 | 3303 | ## |
5072f7b3 | 3304 | # @DumpQueryResult: |
39ba2ea6 PX |
3305 | # |
3306 | # The result format for 'query-dump'. | |
3307 | # | |
3308 | # @status: enum of @DumpStatus, which shows current dump status | |
3309 | # | |
3310 | # @completed: bytes written in latest dump (uncompressed) | |
3311 | # | |
3312 | # @total: total bytes to be written in latest dump (uncompressed) | |
3313 | # | |
5072f7b3 | 3314 | # Since: 2.6 |
39ba2ea6 PX |
3315 | ## |
3316 | { 'struct': 'DumpQueryResult', | |
3317 | 'data': { 'status': 'DumpStatus', | |
3318 | 'completed': 'int', | |
3319 | 'total': 'int' } } | |
3320 | ||
3321 | ## | |
5072f7b3 | 3322 | # @query-dump: |
39ba2ea6 PX |
3323 | # |
3324 | # Query latest dump status. | |
3325 | # | |
3326 | # Returns: A @DumpStatus object showing the dump status. | |
3327 | # | |
3328 | # Since: 2.6 | |
926dce5c MAL |
3329 | # |
3330 | # Example: | |
3331 | # | |
3332 | # -> { "execute": "query-dump" } | |
3333 | # <- { "return": { "status": "active", "completed": 1024000, | |
3334 | # "total": 2048000 } } | |
3335 | # | |
39ba2ea6 PX |
3336 | ## |
3337 | { 'command': 'query-dump', 'returns': 'DumpQueryResult' } | |
3338 | ||
7d6dc7f3 QN |
3339 | ## |
3340 | # @DumpGuestMemoryCapability: | |
3341 | # | |
3342 | # A list of the available formats for dump-guest-memory | |
3343 | # | |
3344 | # Since: 2.0 | |
3345 | ## | |
895a2a80 | 3346 | { 'struct': 'DumpGuestMemoryCapability', |
7d6dc7f3 QN |
3347 | 'data': { |
3348 | 'formats': ['DumpGuestMemoryFormat'] } } | |
3349 | ||
3350 | ## | |
3351 | # @query-dump-guest-memory-capability: | |
3352 | # | |
3353 | # Returns the available formats for dump-guest-memory | |
3354 | # | |
3355 | # Returns: A @DumpGuestMemoryCapability object listing available formats for | |
3356 | # dump-guest-memory | |
3357 | # | |
3358 | # Since: 2.0 | |
2ccb9803 MAL |
3359 | # |
3360 | # Example: | |
3361 | # | |
3362 | # -> { "execute": "query-dump-guest-memory-capability" } | |
3363 | # <- { "return": { "formats": | |
3364 | # ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] } | |
3365 | # | |
7d6dc7f3 QN |
3366 | ## |
3367 | { 'command': 'query-dump-guest-memory-capability', | |
3368 | 'returns': 'DumpGuestMemoryCapability' } | |
d691180e | 3369 | |
7ee0c3e3 | 3370 | ## |
5072f7b3 | 3371 | # @dump-skeys: |
7ee0c3e3 JH |
3372 | # |
3373 | # Dump guest's storage keys | |
3374 | # | |
3375 | # @filename: the path to the file to dump to | |
3376 | # | |
3377 | # This command is only supported on s390 architecture. | |
3378 | # | |
3379 | # Since: 2.5 | |
ee332b51 MAL |
3380 | # |
3381 | # Example: | |
3382 | # | |
3383 | # -> { "execute": "dump-skeys", | |
3384 | # "arguments": { "filename": "/tmp/skeys" } } | |
3385 | # <- { "return": {} } | |
3386 | # | |
7ee0c3e3 JH |
3387 | ## |
3388 | { 'command': 'dump-skeys', | |
3389 | 'data': { 'filename': 'str' } } | |
3390 | ||
928059a3 LC |
3391 | ## |
3392 | # @netdev_add: | |
3393 | # | |
3394 | # Add a network backend. | |
3395 | # | |
3396 | # @type: the type of network backend. Current valid values are 'user', 'tap', | |
3397 | # 'vde', 'socket', 'dump' and 'bridge' | |
3398 | # | |
3399 | # @id: the name of the new network backend | |
3400 | # | |
b8a98326 | 3401 | # Additional arguments depend on the type. |
928059a3 | 3402 | # |
e22da431 | 3403 | # TODO: This command effectively bypasses QAPI completely due to its |
b8a98326 MA |
3404 | # "additional arguments" business. It shouldn't have been added to |
3405 | # the schema in this form. It should be qapified properly, or | |
3406 | # replaced by a properly qapified command. | |
928059a3 LC |
3407 | # |
3408 | # Since: 0.14.0 | |
3409 | # | |
3410 | # Returns: Nothing on success | |
3411 | # If @type is not a valid network backend, DeviceNotFound | |
aa72941b MAL |
3412 | # |
3413 | # Example: | |
3414 | # | |
3415 | # -> { "execute": "netdev_add", | |
3416 | # "arguments": { "type": "user", "id": "netdev1", | |
3417 | # "dnssearch": "example.org" } } | |
3418 | # <- { "return": {} } | |
3419 | # | |
928059a3 LC |
3420 | ## |
3421 | { 'command': 'netdev_add', | |
b8a98326 MA |
3422 | 'data': {'type': 'str', 'id': 'str'}, |
3423 | 'gen': false } # so we can get the additional arguments | |
5f964155 LC |
3424 | |
3425 | ## | |
3426 | # @netdev_del: | |
3427 | # | |
3428 | # Remove a network backend. | |
3429 | # | |
3430 | # @id: the name of the network backend to remove | |
3431 | # | |
3432 | # Returns: Nothing on success | |
3433 | # If @id is not a valid network backend, DeviceNotFound | |
3434 | # | |
3435 | # Since: 0.14.0 | |
d071f6be MAL |
3436 | # |
3437 | # Example: | |
3438 | # | |
3439 | # -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } } | |
3440 | # <- { "return": {} } | |
3441 | # | |
5f964155 LC |
3442 | ## |
3443 | { 'command': 'netdev_del', 'data': {'id': 'str'} } | |
208c9d1b | 3444 | |
cff8b2c6 PB |
3445 | ## |
3446 | # @object-add: | |
3447 | # | |
3448 | # Create a QOM object. | |
3449 | # | |
3450 | # @qom-type: the class name for the object to be created | |
3451 | # | |
3452 | # @id: the name of the new object | |
3453 | # | |
3454 | # @props: #optional a dictionary of properties to be passed to the backend | |
3455 | # | |
3456 | # Returns: Nothing on success | |
3457 | # Error if @qom-type is not a valid class name | |
3458 | # | |
3459 | # Since: 2.0 | |
6517192b MAL |
3460 | # |
3461 | # Example: | |
3462 | # | |
3463 | # -> { "execute": "object-add", | |
3464 | # "arguments": { "qom-type": "rng-random", "id": "rng1", | |
3465 | # "props": { "filename": "/dev/hwrng" } } } | |
3466 | # <- { "return": {} } | |
3467 | # | |
cff8b2c6 PB |
3468 | ## |
3469 | { 'command': 'object-add', | |
6eb3937e | 3470 | 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} } |
cff8b2c6 | 3471 | |
ab2d0531 PB |
3472 | ## |
3473 | # @object-del: | |
3474 | # | |
3475 | # Remove a QOM object. | |
3476 | # | |
3477 | # @id: the name of the QOM object to remove | |
3478 | # | |
3479 | # Returns: Nothing on success | |
3480 | # Error if @id is not a valid id for a QOM object | |
3481 | # | |
3482 | # Since: 2.0 | |
de0ba662 MAL |
3483 | # |
3484 | # Example: | |
3485 | # | |
3486 | # -> { "execute": "object-del", "arguments": { "id": "rng1" } } | |
3487 | # <- { "return": {} } | |
3488 | # | |
ab2d0531 PB |
3489 | ## |
3490 | { 'command': 'object-del', 'data': {'id': 'str'} } | |
3491 | ||
14aa0c2d | 3492 | ## |
5072f7b3 | 3493 | # @NetdevNoneOptions: |
14aa0c2d LE |
3494 | # |
3495 | # Use it alone to have zero network devices. | |
3496 | # | |
5072f7b3 | 3497 | # Since: 1.2 |
14aa0c2d | 3498 | ## |
895a2a80 | 3499 | { 'struct': 'NetdevNoneOptions', |
14aa0c2d LE |
3500 | 'data': { } } |
3501 | ||
3502 | ## | |
5072f7b3 | 3503 | # @NetLegacyNicOptions: |
14aa0c2d LE |
3504 | # |
3505 | # Create a new Network Interface Card. | |
3506 | # | |
3507 | # @netdev: #optional id of -netdev to connect to | |
3508 | # | |
3509 | # @macaddr: #optional MAC address | |
3510 | # | |
3511 | # @model: #optional device model (e1000, rtl8139, virtio etc.) | |
3512 | # | |
3513 | # @addr: #optional PCI device address | |
3514 | # | |
3515 | # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X | |
3516 | # | |
5072f7b3 | 3517 | # Since: 1.2 |
14aa0c2d | 3518 | ## |
895a2a80 | 3519 | { 'struct': 'NetLegacyNicOptions', |
14aa0c2d LE |
3520 | 'data': { |
3521 | '*netdev': 'str', | |
3522 | '*macaddr': 'str', | |
3523 | '*model': 'str', | |
3524 | '*addr': 'str', | |
3525 | '*vectors': 'uint32' } } | |
3526 | ||
3527 | ## | |
5072f7b3 | 3528 | # @String: |
14aa0c2d LE |
3529 | # |
3530 | # A fat type wrapping 'str', to be embedded in lists. | |
3531 | # | |
5072f7b3 | 3532 | # Since: 1.2 |
14aa0c2d | 3533 | ## |
895a2a80 | 3534 | { 'struct': 'String', |
14aa0c2d LE |
3535 | 'data': { |
3536 | 'str': 'str' } } | |
3537 | ||
3538 | ## | |
5072f7b3 | 3539 | # @NetdevUserOptions: |
14aa0c2d LE |
3540 | # |
3541 | # Use the user mode network stack which requires no administrator privilege to | |
3542 | # run. | |
3543 | # | |
3544 | # @hostname: #optional client hostname reported by the builtin DHCP server | |
3545 | # | |
3546 | # @restrict: #optional isolate the guest from the host | |
3547 | # | |
0b11c036 ST |
3548 | # @ipv4: #optional whether to support IPv4, default true for enabled |
3549 | # (since 2.6) | |
3550 | # | |
3551 | # @ipv6: #optional whether to support IPv6, default true for enabled | |
3552 | # (since 2.6) | |
3553 | # | |
14aa0c2d LE |
3554 | # @ip: #optional legacy parameter, use net= instead |
3555 | # | |
d8eb3864 ST |
3556 | # @net: #optional IP network address that the guest will see, in the |
3557 | # form addr[/netmask] The netmask is optional, and can be | |
3558 | # either in the form a.b.c.d or as a number of valid top-most | |
3559 | # bits. Default is 10.0.2.0/24. | |
14aa0c2d LE |
3560 | # |
3561 | # @host: #optional guest-visible address of the host | |
3562 | # | |
3563 | # @tftp: #optional root directory of the built-in TFTP server | |
3564 | # | |
3565 | # @bootfile: #optional BOOTP filename, for use with tftp= | |
3566 | # | |
3567 | # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can | |
3568 | # assign | |
3569 | # | |
3570 | # @dns: #optional guest-visible address of the virtual nameserver | |
3571 | # | |
63d2960b KS |
3572 | # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option |
3573 | # to the guest | |
3574 | # | |
d8eb3864 ST |
3575 | # @ipv6-prefix: #optional IPv6 network prefix (default is fec0::) (since |
3576 | # 2.6). The network prefix is given in the usual | |
3577 | # hexadecimal IPv6 address notation. | |
7aac531e | 3578 | # |
d8eb3864 ST |
3579 | # @ipv6-prefixlen: #optional IPv6 network prefix length (default is 64) |
3580 | # (since 2.6) | |
7aac531e | 3581 | # |
d8eb3864 | 3582 | # @ipv6-host: #optional guest-visible IPv6 address of the host (since 2.6) |
7aac531e | 3583 | # |
d8eb3864 ST |
3584 | # @ipv6-dns: #optional guest-visible IPv6 address of the virtual |
3585 | # nameserver (since 2.6) | |
7aac531e | 3586 | # |
14aa0c2d LE |
3587 | # @smb: #optional root directory of the built-in SMB server |
3588 | # | |
3589 | # @smbserver: #optional IP address of the built-in SMB server | |
3590 | # | |
3591 | # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest | |
3592 | # endpoints | |
3593 | # | |
3594 | # @guestfwd: #optional forward guest TCP connections | |
3595 | # | |
5072f7b3 | 3596 | # Since: 1.2 |
14aa0c2d | 3597 | ## |
895a2a80 | 3598 | { 'struct': 'NetdevUserOptions', |
14aa0c2d LE |
3599 | 'data': { |
3600 | '*hostname': 'str', | |
3601 | '*restrict': 'bool', | |
0b11c036 ST |
3602 | '*ipv4': 'bool', |
3603 | '*ipv6': 'bool', | |
14aa0c2d LE |
3604 | '*ip': 'str', |
3605 | '*net': 'str', | |
3606 | '*host': 'str', | |
3607 | '*tftp': 'str', | |
3608 | '*bootfile': 'str', | |
3609 | '*dhcpstart': 'str', | |
3610 | '*dns': 'str', | |
63d2960b | 3611 | '*dnssearch': ['String'], |
d8eb3864 ST |
3612 | '*ipv6-prefix': 'str', |
3613 | '*ipv6-prefixlen': 'int', | |
3614 | '*ipv6-host': 'str', | |
3615 | '*ipv6-dns': 'str', | |
14aa0c2d LE |
3616 | '*smb': 'str', |
3617 | '*smbserver': 'str', | |
3618 | '*hostfwd': ['String'], | |
3619 | '*guestfwd': ['String'] } } | |
3620 | ||
3621 | ## | |
5072f7b3 | 3622 | # @NetdevTapOptions: |
14aa0c2d LE |
3623 | # |
3624 | # Connect the host TAP network interface name to the VLAN. | |
3625 | # | |
3626 | # @ifname: #optional interface name | |
3627 | # | |
3628 | # @fd: #optional file descriptor of an already opened tap | |
3629 | # | |
2ca81baa JW |
3630 | # @fds: #optional multiple file descriptors of already opened multiqueue capable |
3631 | # tap | |
3632 | # | |
14aa0c2d LE |
3633 | # @script: #optional script to initialize the interface |
3634 | # | |
3635 | # @downscript: #optional script to shut down the interface | |
3636 | # | |
584613ea AK |
3637 | # @br: #optional bridge name (since 2.8) |
3638 | # | |
14aa0c2d LE |
3639 | # @helper: #optional command to execute to configure bridge |
3640 | # | |
3641 | # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes. | |
3642 | # | |
3643 | # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface | |
3644 | # | |
3645 | # @vhost: #optional enable vhost-net network accelerator | |
3646 | # | |
3647 | # @vhostfd: #optional file descriptor of an already opened vhost net device | |
3648 | # | |
2ca81baa JW |
3649 | # @vhostfds: #optional file descriptors of multiple already opened vhost net |
3650 | # devices | |
3651 | # | |
14aa0c2d LE |
3652 | # @vhostforce: #optional vhost on for non-MSIX virtio guests |
3653 | # | |
ec396014 JW |
3654 | # @queues: #optional number of queues to be created for multiqueue capable tap |
3655 | # | |
69e87b32 JW |
3656 | # @poll-us: #optional maximum number of microseconds that could |
3657 | # be spent on busy polling for tap (since 2.7) | |
3658 | # | |
5072f7b3 | 3659 | # Since: 1.2 |
14aa0c2d | 3660 | ## |
895a2a80 | 3661 | { 'struct': 'NetdevTapOptions', |
14aa0c2d LE |
3662 | 'data': { |
3663 | '*ifname': 'str', | |
3664 | '*fd': 'str', | |
264986e2 | 3665 | '*fds': 'str', |
14aa0c2d LE |
3666 | '*script': 'str', |
3667 | '*downscript': 'str', | |
584613ea | 3668 | '*br': 'str', |
14aa0c2d LE |
3669 | '*helper': 'str', |
3670 | '*sndbuf': 'size', | |
3671 | '*vnet_hdr': 'bool', | |
3672 | '*vhost': 'bool', | |
3673 | '*vhostfd': 'str', | |
264986e2 JW |
3674 | '*vhostfds': 'str', |
3675 | '*vhostforce': 'bool', | |
69e87b32 JW |
3676 | '*queues': 'uint32', |
3677 | '*poll-us': 'uint32'} } | |
14aa0c2d LE |
3678 | |
3679 | ## | |
5072f7b3 | 3680 | # @NetdevSocketOptions: |
14aa0c2d LE |
3681 | # |
3682 | # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP | |
3683 | # socket connection. | |
3684 | # | |
3685 | # @fd: #optional file descriptor of an already opened socket | |
3686 | # | |
3687 | # @listen: #optional port number, and optional hostname, to listen on | |
3688 | # | |
3689 | # @connect: #optional port number, and optional hostname, to connect to | |
3690 | # | |
3691 | # @mcast: #optional UDP multicast address and port number | |
3692 | # | |
3693 | # @localaddr: #optional source address and port for multicast and udp packets | |
3694 | # | |
3695 | # @udp: #optional UDP unicast address and port number | |
3696 | # | |
5072f7b3 | 3697 | # Since: 1.2 |
14aa0c2d | 3698 | ## |
895a2a80 | 3699 | { 'struct': 'NetdevSocketOptions', |
14aa0c2d LE |
3700 | 'data': { |
3701 | '*fd': 'str', | |
3702 | '*listen': 'str', | |
3703 | '*connect': 'str', | |
3704 | '*mcast': 'str', | |
3705 | '*localaddr': 'str', | |
3706 | '*udp': 'str' } } | |
3707 | ||
3fb69aa1 | 3708 | ## |
5072f7b3 | 3709 | # @NetdevL2TPv3Options: |
3fb69aa1 AI |
3710 | # |
3711 | # Connect the VLAN to Ethernet over L2TPv3 Static tunnel | |
3712 | # | |
3713 | # @src: source address | |
3714 | # | |
3715 | # @dst: destination address | |
3716 | # | |
3717 | # @srcport: #optional source port - mandatory for udp, optional for ip | |
3718 | # | |
3719 | # @dstport: #optional destination port - mandatory for udp, optional for ip | |
3720 | # | |
3721 | # @ipv6: #optional - force the use of ipv6 | |
3722 | # | |
3723 | # @udp: #optional - use the udp version of l2tpv3 encapsulation | |
3724 | # | |
3725 | # @cookie64: #optional - use 64 bit coookies | |
3726 | # | |
3727 | # @counter: #optional have sequence counter | |
3728 | # | |
3729 | # @pincounter: #optional pin sequence counter to zero - | |
3730 | # workaround for buggy implementations or | |
3731 | # networks with packet reorder | |
3732 | # | |
3733 | # @txcookie: #optional 32 or 64 bit transmit cookie | |
3734 | # | |
3735 | # @rxcookie: #optional 32 or 64 bit receive cookie | |
3736 | # | |
3737 | # @txsession: 32 bit transmit session | |
3738 | # | |
3739 | # @rxsession: #optional 32 bit receive session - if not specified | |
3740 | # set to the same value as transmit | |
3741 | # | |
3742 | # @offset: #optional additional offset - allows the insertion of | |
3743 | # additional application-specific data before the packet payload | |
3744 | # | |
5072f7b3 | 3745 | # Since: 2.1 |
3fb69aa1 | 3746 | ## |
895a2a80 | 3747 | { 'struct': 'NetdevL2TPv3Options', |
3fb69aa1 AI |
3748 | 'data': { |
3749 | 'src': 'str', | |
3750 | 'dst': 'str', | |
3751 | '*srcport': 'str', | |
3752 | '*dstport': 'str', | |
3753 | '*ipv6': 'bool', | |
3754 | '*udp': 'bool', | |
3755 | '*cookie64': 'bool', | |
3756 | '*counter': 'bool', | |
3757 | '*pincounter': 'bool', | |
3758 | '*txcookie': 'uint64', | |
3759 | '*rxcookie': 'uint64', | |
3760 | 'txsession': 'uint32', | |
3761 | '*rxsession': 'uint32', | |
3762 | '*offset': 'uint32' } } | |
3763 | ||
14aa0c2d | 3764 | ## |
5072f7b3 | 3765 | # @NetdevVdeOptions: |
14aa0c2d LE |
3766 | # |
3767 | # Connect the VLAN to a vde switch running on the host. | |
3768 | # | |
3769 | # @sock: #optional socket path | |
3770 | # | |
3771 | # @port: #optional port number | |
3772 | # | |
3773 | # @group: #optional group owner of socket | |
3774 | # | |
3775 | # @mode: #optional permissions for socket | |
3776 | # | |
5072f7b3 | 3777 | # Since: 1.2 |
14aa0c2d | 3778 | ## |
895a2a80 | 3779 | { 'struct': 'NetdevVdeOptions', |
14aa0c2d LE |
3780 | 'data': { |
3781 | '*sock': 'str', | |
3782 | '*port': 'uint16', | |
3783 | '*group': 'str', | |
3784 | '*mode': 'uint16' } } | |
3785 | ||
3786 | ## | |
5072f7b3 | 3787 | # @NetdevDumpOptions: |
14aa0c2d LE |
3788 | # |
3789 | # Dump VLAN network traffic to a file. | |
3790 | # | |
3791 | # @len: #optional per-packet size limit (64k default). Understands [TGMKkb] | |
3792 | # suffixes. | |
3793 | # | |
3794 | # @file: #optional dump file path (default is qemu-vlan0.pcap) | |
3795 | # | |
5072f7b3 | 3796 | # Since: 1.2 |
14aa0c2d | 3797 | ## |
895a2a80 | 3798 | { 'struct': 'NetdevDumpOptions', |
14aa0c2d LE |
3799 | 'data': { |
3800 | '*len': 'size', | |
3801 | '*file': 'str' } } | |
3802 | ||
3803 | ## | |
5072f7b3 | 3804 | # @NetdevBridgeOptions: |
14aa0c2d LE |
3805 | # |
3806 | # Connect a host TAP network interface to a host bridge device. | |
3807 | # | |
3808 | # @br: #optional bridge name | |
3809 | # | |
3810 | # @helper: #optional command to execute to configure bridge | |
3811 | # | |
5072f7b3 | 3812 | # Since: 1.2 |
14aa0c2d | 3813 | ## |
895a2a80 | 3814 | { 'struct': 'NetdevBridgeOptions', |
14aa0c2d LE |
3815 | 'data': { |
3816 | '*br': 'str', | |
3817 | '*helper': 'str' } } | |
3818 | ||
f6c874e3 | 3819 | ## |
5072f7b3 | 3820 | # @NetdevHubPortOptions: |
f6c874e3 SH |
3821 | # |
3822 | # Connect two or more net clients through a software hub. | |
3823 | # | |
3824 | # @hubid: hub identifier number | |
3825 | # | |
5072f7b3 | 3826 | # Since: 1.2 |
f6c874e3 | 3827 | ## |
895a2a80 | 3828 | { 'struct': 'NetdevHubPortOptions', |
f6c874e3 SH |
3829 | 'data': { |
3830 | 'hubid': 'int32' } } | |
3831 | ||
58952137 | 3832 | ## |
5072f7b3 | 3833 | # @NetdevNetmapOptions: |
58952137 VM |
3834 | # |
3835 | # Connect a client to a netmap-enabled NIC or to a VALE switch port | |
3836 | # | |
3837 | # @ifname: Either the name of an existing network interface supported by | |
3838 | # netmap, or the name of a VALE port (created on the fly). | |
3839 | # A VALE port name is in the form 'valeXXX:YYY', where XXX and | |
3840 | # YYY are non-negative integers. XXX identifies a switch and | |
3841 | # YYY identifies a port of the switch. VALE ports having the | |
3842 | # same XXX are therefore connected to the same switch. | |
3843 | # | |
3844 | # @devname: #optional path of the netmap device (default: '/dev/netmap'). | |
3845 | # | |
5072f7b3 | 3846 | # Since: 2.0 |
58952137 | 3847 | ## |
895a2a80 | 3848 | { 'struct': 'NetdevNetmapOptions', |
58952137 VM |
3849 | 'data': { |
3850 | 'ifname': 'str', | |
3851 | '*devname': 'str' } } | |
3852 | ||
03ce5744 | 3853 | ## |
5072f7b3 | 3854 | # @NetdevVhostUserOptions: |
03ce5744 NN |
3855 | # |
3856 | # Vhost-user network backend | |
3857 | # | |
3858 | # @chardev: name of a unix socket chardev | |
3859 | # | |
3860 | # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false). | |
3861 | # | |
b931bfbf CO |
3862 | # @queues: #optional number of queues to be created for multiqueue vhost-user |
3863 | # (default: 1) (Since 2.5) | |
3864 | # | |
5072f7b3 | 3865 | # Since: 2.1 |
03ce5744 | 3866 | ## |
895a2a80 | 3867 | { 'struct': 'NetdevVhostUserOptions', |
03ce5744 NN |
3868 | 'data': { |
3869 | 'chardev': 'str', | |
b931bfbf CO |
3870 | '*vhostforce': 'bool', |
3871 | '*queues': 'int' } } | |
03ce5744 | 3872 | |
14aa0c2d | 3873 | ## |
5072f7b3 | 3874 | # @NetClientDriver: |
14aa0c2d | 3875 | # |
f394b2e2 EB |
3876 | # Available netdev drivers. |
3877 | # | |
5072f7b3 | 3878 | # Since: 2.7 |
f394b2e2 EB |
3879 | ## |
3880 | { 'enum': 'NetClientDriver', | |
3881 | 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump', | |
3882 | 'bridge', 'hubport', 'netmap', 'vhost-user' ] } | |
3883 | ||
3884 | ## | |
5072f7b3 | 3885 | # @Netdev: |
f394b2e2 EB |
3886 | # |
3887 | # Captures the configuration of a network device. | |
3888 | # | |
3889 | # @id: identifier for monitor commands. | |
3890 | # | |
3891 | # @type: Specify the driver used for interpreting remaining arguments. | |
14aa0c2d | 3892 | # |
5072f7b3 | 3893 | # Since: 1.2 |
3fb69aa1 AI |
3894 | # |
3895 | # 'l2tpv3' - since 2.1 | |
14aa0c2d | 3896 | ## |
f394b2e2 EB |
3897 | { 'union': 'Netdev', |
3898 | 'base': { 'id': 'str', 'type': 'NetClientDriver' }, | |
3899 | 'discriminator': 'type', | |
14aa0c2d | 3900 | 'data': { |
f6c874e3 SH |
3901 | 'none': 'NetdevNoneOptions', |
3902 | 'nic': 'NetLegacyNicOptions', | |
3903 | 'user': 'NetdevUserOptions', | |
3904 | 'tap': 'NetdevTapOptions', | |
3fb69aa1 | 3905 | 'l2tpv3': 'NetdevL2TPv3Options', |
f6c874e3 SH |
3906 | 'socket': 'NetdevSocketOptions', |
3907 | 'vde': 'NetdevVdeOptions', | |
3908 | 'dump': 'NetdevDumpOptions', | |
3909 | 'bridge': 'NetdevBridgeOptions', | |
58952137 | 3910 | 'hubport': 'NetdevHubPortOptions', |
03ce5744 NN |
3911 | 'netmap': 'NetdevNetmapOptions', |
3912 | 'vhost-user': 'NetdevVhostUserOptions' } } | |
14aa0c2d LE |
3913 | |
3914 | ## | |
5072f7b3 | 3915 | # @NetLegacy: |
14aa0c2d LE |
3916 | # |
3917 | # Captures the configuration of a network device; legacy. | |
3918 | # | |
3919 | # @vlan: #optional vlan number | |
3920 | # | |
3921 | # @id: #optional identifier for monitor commands | |
3922 | # | |
3923 | # @name: #optional identifier for monitor commands, ignored if @id is present | |
3924 | # | |
3925 | # @opts: device type specific properties (legacy) | |
3926 | # | |
5072f7b3 | 3927 | # Since: 1.2 |
14aa0c2d | 3928 | ## |
895a2a80 | 3929 | { 'struct': 'NetLegacy', |
14aa0c2d LE |
3930 | 'data': { |
3931 | '*vlan': 'int32', | |
3932 | '*id': 'str', | |
3933 | '*name': 'str', | |
f394b2e2 | 3934 | 'opts': 'NetLegacyOptions' } } |
14aa0c2d LE |
3935 | |
3936 | ## | |
5072f7b3 | 3937 | # @NetLegacyOptions: |
14aa0c2d | 3938 | # |
f394b2e2 | 3939 | # Like Netdev, but for use only by the legacy command line options |
14aa0c2d | 3940 | # |
5072f7b3 | 3941 | # Since: 1.2 |
14aa0c2d | 3942 | ## |
f394b2e2 | 3943 | { 'union': 'NetLegacyOptions', |
14aa0c2d | 3944 | 'data': { |
f394b2e2 EB |
3945 | 'none': 'NetdevNoneOptions', |
3946 | 'nic': 'NetLegacyNicOptions', | |
3947 | 'user': 'NetdevUserOptions', | |
3948 | 'tap': 'NetdevTapOptions', | |
3949 | 'l2tpv3': 'NetdevL2TPv3Options', | |
3950 | 'socket': 'NetdevSocketOptions', | |
3951 | 'vde': 'NetdevVdeOptions', | |
3952 | 'dump': 'NetdevDumpOptions', | |
3953 | 'bridge': 'NetdevBridgeOptions', | |
3954 | 'netmap': 'NetdevNetmapOptions', | |
3955 | 'vhost-user': 'NetdevVhostUserOptions' } } | |
14aa0c2d | 3956 | |
fdccce45 | 3957 | ## |
5072f7b3 | 3958 | # @NetFilterDirection: |
fdccce45 YH |
3959 | # |
3960 | # Indicates whether a netfilter is attached to a netdev's transmit queue or | |
3961 | # receive queue or both. | |
3962 | # | |
3963 | # @all: the filter is attached both to the receive and the transmit | |
3964 | # queue of the netdev (default). | |
3965 | # | |
3966 | # @rx: the filter is attached to the receive queue of the netdev, | |
3967 | # where it will receive packets sent to the netdev. | |
3968 | # | |
3969 | # @tx: the filter is attached to the transmit queue of the netdev, | |
3970 | # where it will receive packets sent by the netdev. | |
3971 | # | |
5072f7b3 | 3972 | # Since: 2.5 |
fdccce45 YH |
3973 | ## |
3974 | { 'enum': 'NetFilterDirection', | |
3975 | 'data': [ 'all', 'rx', 'tx' ] } | |
3976 | ||
5be8c759 | 3977 | ## |
5072f7b3 | 3978 | # @InetSocketAddress: |
5be8c759 PB |
3979 | # |
3980 | # Captures a socket address or address range in the Internet namespace. | |
3981 | # | |
3982 | # @host: host part of the address | |
3983 | # | |
2ea1793b | 3984 | # @port: port part of the address, or lowest port if @to is present |
5be8c759 PB |
3985 | # |
3986 | # @to: highest port to try | |
3987 | # | |
3988 | # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6 | |
3989 | # #optional | |
3990 | # | |
3991 | # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6 | |
3992 | # #optional | |
3993 | # | |
5072f7b3 | 3994 | # Since: 1.3 |
5be8c759 | 3995 | ## |
895a2a80 | 3996 | { 'struct': 'InetSocketAddress', |
5be8c759 PB |
3997 | 'data': { |
3998 | 'host': 'str', | |
2ea1793b | 3999 | 'port': 'str', |
5be8c759 PB |
4000 | '*to': 'uint16', |
4001 | '*ipv4': 'bool', | |
4002 | '*ipv6': 'bool' } } | |
4003 | ||
4004 | ## | |
5072f7b3 | 4005 | # @UnixSocketAddress: |
5be8c759 PB |
4006 | # |
4007 | # Captures a socket address in the local ("Unix socket") namespace. | |
4008 | # | |
4009 | # @path: filesystem path to use | |
4010 | # | |
5072f7b3 | 4011 | # Since: 1.3 |
5be8c759 | 4012 | ## |
895a2a80 | 4013 | { 'struct': 'UnixSocketAddress', |
5be8c759 PB |
4014 | 'data': { |
4015 | 'path': 'str' } } | |
4016 | ||
6a02c806 | 4017 | ## |
5072f7b3 | 4018 | # @VsockSocketAddress: |
6a02c806 SH |
4019 | # |
4020 | # Captures a socket address in the vsock namespace. | |
4021 | # | |
4022 | # @cid: unique host identifier | |
4023 | # @port: port | |
4024 | # | |
5072f7b3 | 4025 | # Note: string types are used to allow for possible future hostname or |
6a02c806 SH |
4026 | # service resolution support. |
4027 | # | |
5072f7b3 | 4028 | # Since: 2.8 |
6a02c806 SH |
4029 | ## |
4030 | { 'struct': 'VsockSocketAddress', | |
4031 | 'data': { | |
4032 | 'cid': 'str', | |
4033 | 'port': 'str' } } | |
4034 | ||
5be8c759 | 4035 | ## |
5072f7b3 | 4036 | # @SocketAddress: |
5be8c759 PB |
4037 | # |
4038 | # Captures the address of a socket, which could also be a named file descriptor | |
4039 | # | |
5072f7b3 | 4040 | # Since: 1.3 |
5be8c759 PB |
4041 | ## |
4042 | { 'union': 'SocketAddress', | |
4043 | 'data': { | |
4044 | 'inet': 'InetSocketAddress', | |
4045 | 'unix': 'UnixSocketAddress', | |
6a02c806 | 4046 | 'vsock': 'VsockSocketAddress', |
5be8c759 PB |
4047 | 'fd': 'String' } } |
4048 | ||
208c9d1b CB |
4049 | ## |
4050 | # @getfd: | |
4051 | # | |
4052 | # Receive a file descriptor via SCM rights and assign it a name | |
4053 | # | |
4054 | # @fdname: file descriptor name | |
4055 | # | |
4056 | # Returns: Nothing on success | |
208c9d1b CB |
4057 | # |
4058 | # Since: 0.14.0 | |
4059 | # | |
4060 | # Notes: If @fdname already exists, the file descriptor assigned to | |
4061 | # it will be closed and replaced by the received file | |
4062 | # descriptor. | |
179bf59a | 4063 | # |
208c9d1b CB |
4064 | # The 'closefd' command can be used to explicitly close the |
4065 | # file descriptor when it is no longer needed. | |
179bf59a MAL |
4066 | # |
4067 | # Example: | |
4068 | # | |
4069 | # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } } | |
4070 | # <- { "return": {} } | |
4071 | # | |
208c9d1b CB |
4072 | ## |
4073 | { 'command': 'getfd', 'data': {'fdname': 'str'} } | |
4074 | ||
4075 | ## | |
4076 | # @closefd: | |
4077 | # | |
4078 | # Close a file descriptor previously passed via SCM rights | |
4079 | # | |
4080 | # @fdname: file descriptor name | |
4081 | # | |
4082 | # Returns: Nothing on success | |
208c9d1b CB |
4083 | # |
4084 | # Since: 0.14.0 | |
f5ad8e87 MAL |
4085 | # |
4086 | # Example: | |
4087 | # | |
4088 | # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } } | |
4089 | # <- { "return": {} } | |
4090 | # | |
208c9d1b CB |
4091 | ## |
4092 | { 'command': 'closefd', 'data': {'fdname': 'str'} } | |
01d3c80d AL |
4093 | |
4094 | ## | |
4095 | # @MachineInfo: | |
4096 | # | |
4097 | # Information describing a machine. | |
4098 | # | |
4099 | # @name: the name of the machine | |
4100 | # | |
4101 | # @alias: #optional an alias for the machine name | |
4102 | # | |
4d5c8bc4 | 4103 | # @is-default: #optional whether the machine is default |
01d3c80d | 4104 | # |
c72e7688 MN |
4105 | # @cpu-max: maximum number of CPUs supported by the machine type |
4106 | # (since 1.5.0) | |
4107 | # | |
62c9467d PK |
4108 | # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0) |
4109 | # | |
01d3c80d AL |
4110 | # Since: 1.2.0 |
4111 | ## | |
895a2a80 | 4112 | { 'struct': 'MachineInfo', |
01d3c80d | 4113 | 'data': { 'name': 'str', '*alias': 'str', |
62c9467d PK |
4114 | '*is-default': 'bool', 'cpu-max': 'int', |
4115 | 'hotpluggable-cpus': 'bool'} } | |
01d3c80d AL |
4116 | |
4117 | ## | |
4118 | # @query-machines: | |
4119 | # | |
4120 | # Return a list of supported machines | |
4121 | # | |
4122 | # Returns: a list of MachineInfo | |
4123 | # | |
4124 | # Since: 1.2.0 | |
4125 | ## | |
4126 | { 'command': 'query-machines', 'returns': ['MachineInfo'] } | |
e4e31c63 AL |
4127 | |
4128 | ## | |
4129 | # @CpuDefinitionInfo: | |
4130 | # | |
4131 | # Virtual CPU definition. | |
4132 | # | |
4133 | # @name: the name of the CPU definition | |
4134 | # | |
fc4b84b1 DH |
4135 | # @migration-safe: #optional whether a CPU definition can be safely used for |
4136 | # migration in combination with a QEMU compatibility machine | |
4137 | # when migrating between different QMU versions and between | |
4138 | # hosts with different sets of (hardware or software) | |
4139 | # capabilities. If not provided, information is not available | |
4140 | # and callers should not assume the CPU definition to be | |
4141 | # migration-safe. (since 2.8) | |
4142 | # | |
4143 | # @static: whether a CPU definition is static and will not change depending on | |
4144 | # QEMU version, machine type, machine options and accelerator options. | |
4145 | # A static model is always migration-safe. (since 2.8) | |
4146 | # | |
9504e710 EH |
4147 | # @unavailable-features: #optional List of properties that prevent |
4148 | # the CPU model from running in the current | |
4149 | # host. (since 2.8) | |
8ed877b7 EH |
4150 | # @typename: Type name that can be used as argument to @device-list-properties, |
4151 | # to introspect properties configurable using -cpu or -global. | |
4152 | # (since 2.9) | |
9504e710 EH |
4153 | # |
4154 | # @unavailable-features is a list of QOM property names that | |
4155 | # represent CPU model attributes that prevent the CPU from running. | |
4156 | # If the QOM property is read-only, that means there's no known | |
4157 | # way to make the CPU model run in the current host. Implementations | |
4158 | # that choose not to provide specific information return the | |
4159 | # property name "type". | |
4160 | # If the property is read-write, it means that it MAY be possible | |
4161 | # to run the CPU model in the current host if that property is | |
4162 | # changed. Management software can use it as hints to suggest or | |
4163 | # choose an alternative for the user, or just to generate meaningful | |
4164 | # error messages explaining why the CPU model can't be used. | |
4165 | # If @unavailable-features is an empty list, the CPU model is | |
4166 | # runnable using the current host and machine-type. | |
4167 | # If @unavailable-features is not present, runnability | |
4168 | # information for the CPU is not available. | |
4169 | # | |
e4e31c63 AL |
4170 | # Since: 1.2.0 |
4171 | ## | |
895a2a80 | 4172 | { 'struct': 'CpuDefinitionInfo', |
9504e710 | 4173 | 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool', |
8ed877b7 | 4174 | '*unavailable-features': [ 'str' ], 'typename': 'str' } } |
e4e31c63 AL |
4175 | |
4176 | ## | |
4177 | # @query-cpu-definitions: | |
4178 | # | |
4179 | # Return a list of supported virtual CPU definitions | |
4180 | # | |
4181 | # Returns: a list of CpuDefInfo | |
4182 | # | |
4183 | # Since: 1.2.0 | |
4184 | ## | |
4185 | { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] } | |
ba1c048a | 4186 | |
e09484ef DH |
4187 | ## |
4188 | # @CpuModelInfo: | |
4189 | # | |
4190 | # Virtual CPU model. | |
4191 | # | |
4192 | # A CPU model consists of the name of a CPU definition, to which | |
4193 | # delta changes are applied (e.g. features added/removed). Most magic values | |
4194 | # that an architecture might require should be hidden behind the name. | |
4195 | # However, if required, architectures can expose relevant properties. | |
4196 | # | |
4197 | # @name: the name of the CPU definition the model is based on | |
4198 | # @props: #optional a dictionary of QOM properties to be applied | |
4199 | # | |
4200 | # Since: 2.8.0 | |
4201 | ## | |
4202 | { 'struct': 'CpuModelInfo', | |
4203 | 'data': { 'name': 'str', | |
4204 | '*props': 'any' } } | |
4205 | ||
4206 | ## | |
5072f7b3 | 4207 | # @CpuModelExpansionType: |
e09484ef DH |
4208 | # |
4209 | # An enumeration of CPU model expansion types. | |
4210 | # | |
4211 | # @static: Expand to a static CPU model, a combination of a static base | |
4212 | # model name and property delta changes. As the static base model will | |
4213 | # never change, the expanded CPU model will be the same, independant of | |
4214 | # independent of QEMU version, machine type, machine options, and | |
4215 | # accelerator options. Therefore, the resulting model can be used by | |
4216 | # tooling without having to specify a compatibility machine - e.g. when | |
4217 | # displaying the "host" model. static CPU models are migration-safe. | |
4218 | # | |
4219 | # @full: Expand all properties. The produced model is not guaranteed to be | |
4220 | # migration-safe, but allows tooling to get an insight and work with | |
4221 | # model details. | |
4222 | # | |
4223 | # Since: 2.8.0 | |
4224 | ## | |
4225 | { 'enum': 'CpuModelExpansionType', | |
4226 | 'data': [ 'static', 'full' ] } | |
4227 | ||
4228 | ||
4229 | ## | |
5072f7b3 | 4230 | # @CpuModelExpansionInfo: |
e09484ef DH |
4231 | # |
4232 | # The result of a cpu model expansion. | |
4233 | # | |
4234 | # @model: the expanded CpuModelInfo. | |
4235 | # | |
4236 | # Since: 2.8.0 | |
4237 | ## | |
4238 | { 'struct': 'CpuModelExpansionInfo', | |
4239 | 'data': { 'model': 'CpuModelInfo' } } | |
4240 | ||
4241 | ||
4242 | ## | |
4243 | # @query-cpu-model-expansion: | |
4244 | # | |
4245 | # Expands a given CPU model (or a combination of CPU model + additional options) | |
4246 | # to different granularities, allowing tooling to get an understanding what a | |
4247 | # specific CPU model looks like in QEMU under a certain configuration. | |
4248 | # | |
4249 | # This interface can be used to query the "host" CPU model. | |
4250 | # | |
4251 | # The data returned by this command may be affected by: | |
4252 | # | |
4253 | # * QEMU version: CPU models may look different depending on the QEMU version. | |
4254 | # (Except for CPU models reported as "static" in query-cpu-definitions.) | |
4255 | # * machine-type: CPU model may look different depending on the machine-type. | |
4256 | # (Except for CPU models reported as "static" in query-cpu-definitions.) | |
4257 | # * machine options (including accelerator): in some architectures, CPU models | |
4258 | # may look different depending on machine and accelerator options. (Except for | |
4259 | # CPU models reported as "static" in query-cpu-definitions.) | |
4260 | # * "-cpu" arguments and global properties: arguments to the -cpu option and | |
4261 | # global properties may affect expansion of CPU models. Using | |
4262 | # query-cpu-model-expansion while using these is not advised. | |
4263 | # | |
137974ce DH |
4264 | # Some architectures may not support all expansion types. s390x supports |
4265 | # "full" and "static". | |
e09484ef DH |
4266 | # |
4267 | # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is | |
4268 | # not supported, if the model cannot be expanded, if the model contains | |
4269 | # an unknown CPU definition name, unknown properties or properties | |
4270 | # with a wrong type. Also returns an error if an expansion type is | |
4271 | # not supported. | |
4272 | # | |
4273 | # Since: 2.8.0 | |
4274 | ## | |
4275 | { 'command': 'query-cpu-model-expansion', | |
4276 | 'data': { 'type': 'CpuModelExpansionType', | |
4277 | 'model': 'CpuModelInfo' }, | |
4278 | 'returns': 'CpuModelExpansionInfo' } | |
4279 | ||
0031e0d6 DH |
4280 | ## |
4281 | # @CpuModelCompareResult: | |
4282 | # | |
4283 | # An enumeration of CPU model comparation results. The result is usually | |
4d4ccabd | 4284 | # calculated using e.g. CPU features or CPU generations. |
0031e0d6 DH |
4285 | # |
4286 | # @incompatible: If model A is incompatible to model B, model A is not | |
4287 | # guaranteed to run where model B runs and the other way around. | |
4288 | # | |
4289 | # @identical: If model A is identical to model B, model A is guaranteed to run | |
4290 | # where model B runs and the other way around. | |
4291 | # | |
4292 | # @superset: If model A is a superset of model B, model B is guaranteed to run | |
4293 | # where model A runs. There are no guarantees about the other way. | |
4294 | # | |
4295 | # @subset: If model A is a subset of model B, model A is guaranteed to run | |
4296 | # where model B runs. There are no guarantees about the other way. | |
4297 | # | |
4298 | # Since: 2.8.0 | |
4299 | ## | |
4300 | { 'enum': 'CpuModelCompareResult', | |
4301 | 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] } | |
4302 | ||
4303 | ## | |
5072f7b3 | 4304 | # @CpuModelCompareInfo: |
0031e0d6 DH |
4305 | # |
4306 | # The result of a CPU model comparison. | |
4307 | # | |
4308 | # @result: The result of the compare operation. | |
4309 | # @responsible-properties: List of properties that led to the comparison result | |
4310 | # not being identical. | |
4311 | # | |
4312 | # @responsible-properties is a list of QOM property names that led to | |
4313 | # both CPUs not being detected as identical. For identical models, this | |
4314 | # list is empty. | |
4315 | # If a QOM property is read-only, that means there's no known way to make the | |
4316 | # CPU models identical. If the special property name "type" is included, the | |
4317 | # models are by definition not identical and cannot be made identical. | |
4318 | # | |
4319 | # Since: 2.8.0 | |
4320 | ## | |
4321 | { 'struct': 'CpuModelCompareInfo', | |
4322 | 'data': {'result': 'CpuModelCompareResult', | |
4323 | 'responsible-properties': ['str'] | |
4324 | } | |
4325 | } | |
4326 | ||
4327 | ## | |
4328 | # @query-cpu-model-comparison: | |
4329 | # | |
4330 | # Compares two CPU models, returning how they compare in a specific | |
4331 | # configuration. The results indicates how both models compare regarding | |
4332 | # runnability. This result can be used by tooling to make decisions if a | |
4333 | # certain CPU model will run in a certain configuration or if a compatible | |
4334 | # CPU model has to be created by baselining. | |
4335 | # | |
4336 | # Usually, a CPU model is compared against the maximum possible CPU model | |
4d4ccabd | 4337 | # of a certain configuration (e.g. the "host" model for KVM). If that CPU |
0031e0d6 DH |
4338 | # model is identical or a subset, it will run in that configuration. |
4339 | # | |
4340 | # The result returned by this command may be affected by: | |
4341 | # | |
4342 | # * QEMU version: CPU models may look different depending on the QEMU version. | |
4343 | # (Except for CPU models reported as "static" in query-cpu-definitions.) | |
4d4ccabd | 4344 | # * machine-type: CPU model may look different depending on the machine-type. |
0031e0d6 DH |
4345 | # (Except for CPU models reported as "static" in query-cpu-definitions.) |
4346 | # * machine options (including accelerator): in some architectures, CPU models | |
4347 | # may look different depending on machine and accelerator options. (Except for | |
4348 | # CPU models reported as "static" in query-cpu-definitions.) | |
4349 | # * "-cpu" arguments and global properties: arguments to the -cpu option and | |
4350 | # global properties may affect expansion of CPU models. Using | |
4351 | # query-cpu-model-expansion while using these is not advised. | |
4352 | # | |
4e82ef05 DH |
4353 | # Some architectures may not support comparing CPU models. s390x supports |
4354 | # comparing CPU models. | |
0031e0d6 DH |
4355 | # |
4356 | # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is | |
4357 | # not supported, if a model cannot be used, if a model contains | |
4358 | # an unknown cpu definition name, unknown properties or properties | |
4359 | # with wrong types. | |
4360 | # | |
4361 | # Since: 2.8.0 | |
4362 | ## | |
4363 | { 'command': 'query-cpu-model-comparison', | |
4364 | 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' }, | |
4365 | 'returns': 'CpuModelCompareInfo' } | |
4366 | ||
b18b6043 | 4367 | ## |
5072f7b3 | 4368 | # @CpuModelBaselineInfo: |
b18b6043 DH |
4369 | # |
4370 | # The result of a CPU model baseline. | |
4371 | # | |
4372 | # @model: the baselined CpuModelInfo. | |
4373 | # | |
4374 | # Since: 2.8.0 | |
4375 | ## | |
4376 | { 'struct': 'CpuModelBaselineInfo', | |
4377 | 'data': { 'model': 'CpuModelInfo' } } | |
4378 | ||
4379 | ## | |
4380 | # @query-cpu-model-baseline: | |
4381 | # | |
4382 | # Baseline two CPU models, creating a compatible third model. The created | |
4383 | # model will always be a static, migration-safe CPU model (see "static" | |
4384 | # CPU model expansion for details). | |
4385 | # | |
4386 | # This interface can be used by tooling to create a compatible CPU model out | |
4387 | # two CPU models. The created CPU model will be identical to or a subset of | |
4388 | # both CPU models when comparing them. Therefore, the created CPU model is | |
4389 | # guaranteed to run where the given CPU models run. | |
4390 | # | |
4391 | # The result returned by this command may be affected by: | |
4392 | # | |
4393 | # * QEMU version: CPU models may look different depending on the QEMU version. | |
4394 | # (Except for CPU models reported as "static" in query-cpu-definitions.) | |
4d4ccabd | 4395 | # * machine-type: CPU model may look different depending on the machine-type. |
b18b6043 DH |
4396 | # (Except for CPU models reported as "static" in query-cpu-definitions.) |
4397 | # * machine options (including accelerator): in some architectures, CPU models | |
4398 | # may look different depending on machine and accelerator options. (Except for | |
4399 | # CPU models reported as "static" in query-cpu-definitions.) | |
4400 | # * "-cpu" arguments and global properties: arguments to the -cpu option and | |
4401 | # global properties may affect expansion of CPU models. Using | |
4402 | # query-cpu-model-expansion while using these is not advised. | |
4403 | # | |
f1a47d08 DH |
4404 | # Some architectures may not support baselining CPU models. s390x supports |
4405 | # baselining CPU models. | |
b18b6043 DH |
4406 | # |
4407 | # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is | |
4408 | # not supported, if a model cannot be used, if a model contains | |
4409 | # an unknown cpu definition name, unknown properties or properties | |
4410 | # with wrong types. | |
4411 | # | |
4412 | # Since: 2.8.0 | |
4413 | ## | |
4414 | { 'command': 'query-cpu-model-baseline', | |
4415 | 'data': { 'modela': 'CpuModelInfo', | |
4416 | 'modelb': 'CpuModelInfo' }, | |
4417 | 'returns': 'CpuModelBaselineInfo' } | |
4418 | ||
49687ace | 4419 | ## |
ba1c048a CB |
4420 | # @AddfdInfo: |
4421 | # | |
4422 | # Information about a file descriptor that was added to an fd set. | |
4423 | # | |
4424 | # @fdset-id: The ID of the fd set that @fd was added to. | |
4425 | # | |
4426 | # @fd: The file descriptor that was received via SCM rights and | |
4427 | # added to the fd set. | |
4428 | # | |
4429 | # Since: 1.2.0 | |
4430 | ## | |
895a2a80 | 4431 | { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} } |
ba1c048a CB |
4432 | |
4433 | ## | |
4434 | # @add-fd: | |
4435 | # | |
4436 | # Add a file descriptor, that was passed via SCM rights, to an fd set. | |
4437 | # | |
4438 | # @fdset-id: #optional The ID of the fd set to add the file descriptor to. | |
4439 | # | |
4440 | # @opaque: #optional A free-form string that can be used to describe the fd. | |
4441 | # | |
4442 | # Returns: @AddfdInfo on success | |
43fef34a | 4443 | # |
ba1c048a | 4444 | # If file descriptor was not received, FdNotSupplied |
43fef34a | 4445 | # |
9ac54af0 | 4446 | # If @fdset-id is a negative value, InvalidParameterValue |
ba1c048a CB |
4447 | # |
4448 | # Notes: The list of fd sets is shared by all monitor connections. | |
4449 | # | |
4450 | # If @fdset-id is not specified, a new fd set will be created. | |
4451 | # | |
4452 | # Since: 1.2.0 | |
43fef34a MAL |
4453 | # |
4454 | # Example: | |
4455 | # | |
4456 | # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } } | |
4457 | # <- { "return": { "fdset-id": 1, "fd": 3 } } | |
4458 | # | |
ba1c048a CB |
4459 | ## |
4460 | { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'}, | |
4461 | 'returns': 'AddfdInfo' } | |
4462 | ||
4463 | ## | |
4464 | # @remove-fd: | |
4465 | # | |
4466 | # Remove a file descriptor from an fd set. | |
4467 | # | |
4468 | # @fdset-id: The ID of the fd set that the file descriptor belongs to. | |
4469 | # | |
4470 | # @fd: #optional The file descriptor that is to be removed. | |
4471 | # | |
4472 | # Returns: Nothing on success | |
4473 | # If @fdset-id or @fd is not found, FdNotFound | |
4474 | # | |
4475 | # Since: 1.2.0 | |
4476 | # | |
4477 | # Notes: The list of fd sets is shared by all monitor connections. | |
4478 | # | |
4479 | # If @fd is not specified, all file descriptors in @fdset-id | |
4480 | # will be removed. | |
4503e4b3 MAL |
4481 | # |
4482 | # Example: | |
4483 | # | |
4484 | # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } } | |
4485 | # <- { "return": {} } | |
4486 | # | |
ba1c048a CB |
4487 | ## |
4488 | { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} } | |
4489 | ||
4490 | ## | |
4491 | # @FdsetFdInfo: | |
4492 | # | |
4493 | # Information about a file descriptor that belongs to an fd set. | |
4494 | # | |
4495 | # @fd: The file descriptor value. | |
4496 | # | |
4497 | # @opaque: #optional A free-form string that can be used to describe the fd. | |
4498 | # | |
4499 | # Since: 1.2.0 | |
4500 | ## | |
895a2a80 | 4501 | { 'struct': 'FdsetFdInfo', |
ba1c048a CB |
4502 | 'data': {'fd': 'int', '*opaque': 'str'} } |
4503 | ||
4504 | ## | |
4505 | # @FdsetInfo: | |
4506 | # | |
4507 | # Information about an fd set. | |
4508 | # | |
4509 | # @fdset-id: The ID of the fd set. | |
4510 | # | |
4511 | # @fds: A list of file descriptors that belong to this fd set. | |
4512 | # | |
4513 | # Since: 1.2.0 | |
4514 | ## | |
895a2a80 | 4515 | { 'struct': 'FdsetInfo', |
ba1c048a CB |
4516 | 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} } |
4517 | ||
4518 | ## | |
4519 | # @query-fdsets: | |
4520 | # | |
4521 | # Return information describing all fd sets. | |
4522 | # | |
4523 | # Returns: A list of @FdsetInfo | |
4524 | # | |
4525 | # Since: 1.2.0 | |
4526 | # | |
4527 | # Note: The list of fd sets is shared by all monitor connections. | |
4528 | # | |
d71ca35d MAL |
4529 | # Example: |
4530 | # | |
4531 | # -> { "execute": "query-fdsets" } | |
4532 | # <- { "return": [ | |
4533 | # { | |
4534 | # "fds": [ | |
4535 | # { | |
4536 | # "fd": 30, | |
4537 | # "opaque": "rdonly:/path/to/file" | |
4538 | # }, | |
4539 | # { | |
4540 | # "fd": 24, | |
4541 | # "opaque": "rdwr:/path/to/file" | |
4542 | # } | |
4543 | # ], | |
4544 | # "fdset-id": 1 | |
4545 | # }, | |
4546 | # { | |
4547 | # "fds": [ | |
4548 | # { | |
4549 | # "fd": 28 | |
4550 | # }, | |
4551 | # { | |
4552 | # "fd": 29 | |
4553 | # } | |
4554 | # ], | |
4555 | # "fdset-id": 0 | |
4556 | # } | |
4557 | # ] | |
4558 | # } | |
4559 | # | |
ba1c048a CB |
4560 | ## |
4561 | { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] } | |
99afc91d | 4562 | |
99afc91d DB |
4563 | ## |
4564 | # @TargetInfo: | |
4565 | # | |
4566 | # Information describing the QEMU target. | |
4567 | # | |
4568 | # @arch: the target architecture (eg "x86_64", "i386", etc) | |
4569 | # | |
4570 | # Since: 1.2.0 | |
4571 | ## | |
895a2a80 | 4572 | { 'struct': 'TargetInfo', |
c02a9552 | 4573 | 'data': { 'arch': 'str' } } |
99afc91d DB |
4574 | |
4575 | ## | |
4576 | # @query-target: | |
4577 | # | |
4578 | # Return information about the target for this QEMU | |
4579 | # | |
4580 | # Returns: TargetInfo | |
4581 | # | |
4582 | # Since: 1.2.0 | |
4583 | ## | |
4584 | { 'command': 'query-target', 'returns': 'TargetInfo' } | |
411656f4 AK |
4585 | |
4586 | ## | |
4587 | # @QKeyCode: | |
4588 | # | |
515b17c2 MAL |
4589 | # An enumeration of key name. |
4590 | # | |
4591 | # This is used by the @send-key command. | |
4592 | # | |
9f2a70e4 MAL |
4593 | # @unmapped: since 2.0 |
4594 | # @pause: since 2.0 | |
4595 | # @ro: since 2.4 | |
4596 | # @kp_comma: since 2.4 | |
4597 | # @kp_equals: since 2.6 | |
4598 | # @power: since 2.6 | |
e9346441 OH |
4599 | # @hiragana: since 2.9 |
4600 | # @henkan: since 2.9 | |
4601 | # @yen: since 2.9 | |
9f2a70e4 | 4602 | # |
411656f4 | 4603 | # Since: 1.3.0 |
bbd1b1cc | 4604 | # |
411656f4 AK |
4605 | ## |
4606 | { 'enum': 'QKeyCode', | |
bbd1b1cc GH |
4607 | 'data': [ 'unmapped', |
4608 | 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl', | |
411656f4 AK |
4609 | 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8', |
4610 | '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e', | |
4611 | 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right', | |
4612 | 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon', | |
4613 | 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b', | |
4614 | 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock', | |
4615 | 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10', | |
4616 | 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply', | |
4617 | 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0', | |
4618 | 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8', | |
4619 | 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end', | |
4620 | 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again', | |
4621 | 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut', | |
e9346441 OH |
4622 | 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', |
4623 | 'ro', 'hiragana', 'henkan', 'yen', | |
a3541278 | 4624 | 'kp_comma', 'kp_equals', 'power' ] } |
e4c8f004 | 4625 | |
9f328977 | 4626 | ## |
5072f7b3 | 4627 | # @KeyValue: |
9f328977 LC |
4628 | # |
4629 | # Represents a keyboard key. | |
4630 | # | |
4631 | # Since: 1.3.0 | |
4632 | ## | |
4633 | { 'union': 'KeyValue', | |
4634 | 'data': { | |
4635 | 'number': 'int', | |
4636 | 'qcode': 'QKeyCode' } } | |
4637 | ||
e4c8f004 AK |
4638 | ## |
4639 | # @send-key: | |
4640 | # | |
4641 | # Send keys to guest. | |
4642 | # | |
9f328977 LC |
4643 | # @keys: An array of @KeyValue elements. All @KeyValues in this array are |
4644 | # simultaneously sent to the guest. A @KeyValue.number value is sent | |
4645 | # directly to the guest, while @KeyValue.qcode must be a valid | |
4646 | # @QKeyCode value | |
e4c8f004 AK |
4647 | # |
4648 | # @hold-time: #optional time to delay key up events, milliseconds. Defaults | |
4649 | # to 100 | |
4650 | # | |
4651 | # Returns: Nothing on success | |
4652 | # If key is unknown or redundant, InvalidParameter | |
4653 | # | |
4654 | # Since: 1.3.0 | |
4655 | # | |
f45fd52c MAL |
4656 | # Example: |
4657 | # | |
4658 | # -> { "execute": "send-key", | |
4659 | # "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" }, | |
4660 | # { "type": "qcode", "data": "alt" }, | |
4661 | # { "type": "qcode", "data": "delete" } ] } } | |
4662 | # <- { "return": {} } | |
4663 | # | |
e4c8f004 AK |
4664 | ## |
4665 | { 'command': 'send-key', | |
9f328977 | 4666 | 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } } |
ad39cf6d LC |
4667 | |
4668 | ## | |
4669 | # @screendump: | |
4670 | # | |
4671 | # Write a PPM of the VGA screen to a file. | |
4672 | # | |
4673 | # @filename: the path of a new PPM file to store the image | |
4674 | # | |
4675 | # Returns: Nothing on success | |
4676 | # | |
4677 | # Since: 0.14.0 | |
77b6681e MAL |
4678 | # |
4679 | # Example: | |
4680 | # | |
4681 | # -> { "execute": "screendump", | |
4682 | # "arguments": { "filename": "/tmp/image" } } | |
4683 | # <- { "return": {} } | |
4684 | # | |
ad39cf6d LC |
4685 | ## |
4686 | { 'command': 'screendump', 'data': {'filename': 'str'} } | |
6dd844db | 4687 | |
d0d7708b DB |
4688 | |
4689 | ## | |
4690 | # @ChardevCommon: | |
4691 | # | |
4692 | # Configuration shared across all chardev backends | |
4693 | # | |
4694 | # @logfile: #optional The name of a logfile to save output | |
4695 | # @logappend: #optional true to append instead of truncate | |
4696 | # (default to false to truncate) | |
4697 | # | |
4698 | # Since: 2.6 | |
4699 | ## | |
4700 | { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str', | |
4701 | '*logappend': 'bool' } } | |
4702 | ||
ffbdbe59 GH |
4703 | ## |
4704 | # @ChardevFile: | |
4705 | # | |
4706 | # Configuration info for file chardevs. | |
4707 | # | |
4708 | # @in: #optional The name of the input file | |
4709 | # @out: The name of the output file | |
31e38a22 OK |
4710 | # @append: #optional Open the file in append mode (default false to |
4711 | # truncate) (Since 2.6) | |
ffbdbe59 GH |
4712 | # |
4713 | # Since: 1.4 | |
4714 | ## | |
895a2a80 | 4715 | { 'struct': 'ChardevFile', 'data': { '*in' : 'str', |
31e38a22 | 4716 | 'out' : 'str', |
d0d7708b DB |
4717 | '*append': 'bool' }, |
4718 | 'base': 'ChardevCommon' } | |
ffbdbe59 | 4719 | |
d59044ef | 4720 | ## |
d36b2b90 | 4721 | # @ChardevHostdev: |
d59044ef | 4722 | # |
548cbb36 | 4723 | # Configuration info for device and pipe chardevs. |
d59044ef GH |
4724 | # |
4725 | # @device: The name of the special file for the device, | |
4726 | # i.e. /dev/ttyS0 on Unix or COM1: on Windows | |
d59044ef GH |
4727 | # |
4728 | # Since: 1.4 | |
4729 | ## | |
d0d7708b DB |
4730 | { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' }, |
4731 | 'base': 'ChardevCommon' } | |
d59044ef | 4732 | |
f6bd5d6e GH |
4733 | ## |
4734 | # @ChardevSocket: | |
4735 | # | |
3ecc059d | 4736 | # Configuration info for (stream) socket chardevs. |
f6bd5d6e GH |
4737 | # |
4738 | # @addr: socket address to listen on (server=true) | |
4739 | # or connect to (server=false) | |
a8fb5427 | 4740 | # @tls-creds: #optional the ID of the TLS credentials object (since 2.6) |
f6bd5d6e | 4741 | # @server: #optional create server socket (default: true) |
ef993ba7 GH |
4742 | # @wait: #optional wait for incoming connection on server |
4743 | # sockets (default: false). | |
f6bd5d6e | 4744 | # @nodelay: #optional set TCP_NODELAY socket option (default: false) |
ef993ba7 GH |
4745 | # @telnet: #optional enable telnet protocol on server |
4746 | # sockets (default: false) | |
5dd1f02b CM |
4747 | # @reconnect: #optional For a client socket, if a socket is disconnected, |
4748 | # then attempt a reconnect after the given number of seconds. | |
4749 | # Setting this to zero disables this function. (default: 0) | |
4750 | # (Since: 2.2) | |
f6bd5d6e GH |
4751 | # |
4752 | # Since: 1.4 | |
4753 | ## | |
895a2a80 | 4754 | { 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress', |
a8fb5427 | 4755 | '*tls-creds' : 'str', |
5dd1f02b CM |
4756 | '*server' : 'bool', |
4757 | '*wait' : 'bool', | |
4758 | '*nodelay' : 'bool', | |
4759 | '*telnet' : 'bool', | |
d0d7708b DB |
4760 | '*reconnect' : 'int' }, |
4761 | 'base': 'ChardevCommon' } | |
f6bd5d6e | 4762 | |
3ecc059d | 4763 | ## |
08d0ab3f | 4764 | # @ChardevUdp: |
3ecc059d GH |
4765 | # |
4766 | # Configuration info for datagram socket chardevs. | |
4767 | # | |
4768 | # @remote: remote address | |
4769 | # @local: #optional local address | |
4770 | # | |
4771 | # Since: 1.5 | |
4772 | ## | |
895a2a80 | 4773 | { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress', |
d0d7708b DB |
4774 | '*local' : 'SocketAddress' }, |
4775 | 'base': 'ChardevCommon' } | |
3ecc059d | 4776 | |
edb2fb3c GH |
4777 | ## |
4778 | # @ChardevMux: | |
4779 | # | |
4780 | # Configuration info for mux chardevs. | |
4781 | # | |
4782 | # @chardev: name of the base chardev. | |
4783 | # | |
4784 | # Since: 1.5 | |
4785 | ## | |
d0d7708b DB |
4786 | { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' }, |
4787 | 'base': 'ChardevCommon' } | |
edb2fb3c | 4788 | |
7c358031 GH |
4789 | ## |
4790 | # @ChardevStdio: | |
4791 | # | |
4792 | # Configuration info for stdio chardevs. | |
4793 | # | |
4794 | # @signal: #optional Allow signals (such as SIGINT triggered by ^C) | |
4795 | # be delivered to qemu. Default: true in -nographic mode, | |
4796 | # false otherwise. | |
4797 | # | |
4798 | # Since: 1.5 | |
4799 | ## | |
d0d7708b DB |
4800 | { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' }, |
4801 | 'base': 'ChardevCommon' } | |
4802 | ||
7c358031 | 4803 | |
cd153e2a GH |
4804 | ## |
4805 | # @ChardevSpiceChannel: | |
4806 | # | |
4807 | # Configuration info for spice vm channel chardevs. | |
4808 | # | |
4809 | # @type: kind of channel (for example vdagent). | |
4810 | # | |
4811 | # Since: 1.5 | |
4812 | ## | |
d0d7708b DB |
4813 | { 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' }, |
4814 | 'base': 'ChardevCommon' } | |
cd153e2a GH |
4815 | |
4816 | ## | |
4817 | # @ChardevSpicePort: | |
4818 | # | |
4819 | # Configuration info for spice port chardevs. | |
4820 | # | |
4821 | # @fqdn: name of the channel (see docs/spice-port-fqdn.txt) | |
4822 | # | |
4823 | # Since: 1.5 | |
4824 | ## | |
d0d7708b DB |
4825 | { 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' }, |
4826 | 'base': 'ChardevCommon' } | |
cd153e2a | 4827 | |
702ec69c GH |
4828 | ## |
4829 | # @ChardevVC: | |
4830 | # | |
4831 | # Configuration info for virtual console chardevs. | |
4832 | # | |
4833 | # @width: console width, in pixels | |
4834 | # @height: console height, in pixels | |
4835 | # @cols: console width, in chars | |
4836 | # @rows: console height, in chars | |
4837 | # | |
4838 | # Since: 1.5 | |
4839 | ## | |
895a2a80 | 4840 | { 'struct': 'ChardevVC', 'data': { '*width' : 'int', |
702ec69c GH |
4841 | '*height' : 'int', |
4842 | '*cols' : 'int', | |
d0d7708b DB |
4843 | '*rows' : 'int' }, |
4844 | 'base': 'ChardevCommon' } | |
702ec69c | 4845 | |
1da48c65 | 4846 | ## |
4f57378f | 4847 | # @ChardevRingbuf: |
1da48c65 | 4848 | # |
3a1da42e | 4849 | # Configuration info for ring buffer chardevs. |
1da48c65 | 4850 | # |
3a1da42e | 4851 | # @size: #optional ring buffer size, must be power of two, default is 65536 |
1da48c65 GH |
4852 | # |
4853 | # Since: 1.5 | |
4854 | ## | |
d0d7708b DB |
4855 | { 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' }, |
4856 | 'base': 'ChardevCommon' } | |
1da48c65 | 4857 | |
f1a1a356 GH |
4858 | ## |
4859 | # @ChardevBackend: | |
4860 | # | |
4861 | # Configuration info for the new chardev backend. | |
4862 | # | |
5692399f | 4863 | # Since: 1.4 (testdev since 2.2) |
f1a1a356 | 4864 | ## |
f6bd5d6e | 4865 | { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile', |
d36b2b90 MA |
4866 | 'serial' : 'ChardevHostdev', |
4867 | 'parallel': 'ChardevHostdev', | |
548cbb36 | 4868 | 'pipe' : 'ChardevHostdev', |
f6bd5d6e | 4869 | 'socket' : 'ChardevSocket', |
08d0ab3f | 4870 | 'udp' : 'ChardevUdp', |
b1918fbb EB |
4871 | 'pty' : 'ChardevCommon', |
4872 | 'null' : 'ChardevCommon', | |
f5a51cab | 4873 | 'mux' : 'ChardevMux', |
b1918fbb EB |
4874 | 'msmouse': 'ChardevCommon', |
4875 | 'braille': 'ChardevCommon', | |
4876 | 'testdev': 'ChardevCommon', | |
d9ac374f | 4877 | 'stdio' : 'ChardevStdio', |
b1918fbb | 4878 | 'console': 'ChardevCommon', |
cd153e2a | 4879 | 'spicevmc' : 'ChardevSpiceChannel', |
702ec69c | 4880 | 'spiceport' : 'ChardevSpicePort', |
1da48c65 | 4881 | 'vc' : 'ChardevVC', |
3a1da42e MA |
4882 | 'ringbuf': 'ChardevRingbuf', |
4883 | # next one is just for compatibility | |
4f57378f | 4884 | 'memory' : 'ChardevRingbuf' } } |
f1a1a356 GH |
4885 | |
4886 | ## | |
4887 | # @ChardevReturn: | |
4888 | # | |
4889 | # Return info about the chardev backend just created. | |
4890 | # | |
58fa4325 MA |
4891 | # @pty: #optional name of the slave pseudoterminal device, present if |
4892 | # and only if a chardev of type 'pty' was created | |
4893 | # | |
f1a1a356 GH |
4894 | # Since: 1.4 |
4895 | ## | |
895a2a80 | 4896 | { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } } |
f1a1a356 GH |
4897 | |
4898 | ## | |
4899 | # @chardev-add: | |
4900 | # | |
58fa4325 | 4901 | # Add a character device backend |
f1a1a356 GH |
4902 | # |
4903 | # @id: the chardev's ID, must be unique | |
4904 | # @backend: backend type and parameters | |
4905 | # | |
58fa4325 | 4906 | # Returns: ChardevReturn. |
f1a1a356 GH |
4907 | # |
4908 | # Since: 1.4 | |
2212092e MAL |
4909 | # |
4910 | # Example: | |
4911 | # | |
4912 | # -> { "execute" : "chardev-add", | |
4913 | # "arguments" : { "id" : "foo", | |
4914 | # "backend" : { "type" : "null", "data" : {} } } } | |
4915 | # <- { "return": {} } | |
4916 | # | |
4917 | # -> { "execute" : "chardev-add", | |
4918 | # "arguments" : { "id" : "bar", | |
4919 | # "backend" : { "type" : "file", | |
4920 | # "data" : { "out" : "/tmp/bar.log" } } } } | |
4921 | # <- { "return": {} } | |
4922 | # | |
4923 | # -> { "execute" : "chardev-add", | |
4924 | # "arguments" : { "id" : "baz", | |
4925 | # "backend" : { "type" : "pty", "data" : {} } } } | |
4926 | # <- { "return": { "pty" : "/dev/pty/42" } } | |
4927 | # | |
f1a1a356 GH |
4928 | ## |
4929 | { 'command': 'chardev-add', 'data': {'id' : 'str', | |
4930 | 'backend' : 'ChardevBackend' }, | |
4931 | 'returns': 'ChardevReturn' } | |
4932 | ||
4933 | ## | |
4934 | # @chardev-remove: | |
4935 | # | |
58fa4325 | 4936 | # Remove a character device backend |
f1a1a356 GH |
4937 | # |
4938 | # @id: the chardev's ID, must exist and not be in use | |
4939 | # | |
4940 | # Returns: Nothing on success | |
4941 | # | |
4942 | # Since: 1.4 | |
7cfee8d9 MAL |
4943 | # |
4944 | # Example: | |
4945 | # | |
4946 | # -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } } | |
4947 | # <- { "return": {} } | |
4948 | # | |
f1a1a356 GH |
4949 | ## |
4950 | { 'command': 'chardev-remove', 'data': {'id': 'str'} } | |
d1a0cf73 SB |
4951 | |
4952 | ## | |
4953 | # @TpmModel: | |
4954 | # | |
4955 | # An enumeration of TPM models | |
4956 | # | |
4957 | # @tpm-tis: TPM TIS model | |
4958 | # | |
4959 | # Since: 1.5 | |
4960 | ## | |
4961 | { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] } | |
4962 | ||
4963 | ## | |
4964 | # @query-tpm-models: | |
4965 | # | |
4966 | # Return a list of supported TPM models | |
4967 | # | |
4968 | # Returns: a list of TpmModel | |
4969 | # | |
4970 | # Since: 1.5 | |
b7c7941b MAL |
4971 | # |
4972 | # Example: | |
4973 | # | |
4974 | # -> { "execute": "query-tpm-models" } | |
4975 | # <- { "return": [ "tpm-tis" ] } | |
4976 | # | |
d1a0cf73 SB |
4977 | ## |
4978 | { 'command': 'query-tpm-models', 'returns': ['TpmModel'] } | |
4979 | ||
4980 | ## | |
4981 | # @TpmType: | |
4982 | # | |
4983 | # An enumeration of TPM types | |
4984 | # | |
4985 | # @passthrough: TPM passthrough type | |
4986 | # | |
4987 | # Since: 1.5 | |
4988 | ## | |
4989 | { 'enum': 'TpmType', 'data': [ 'passthrough' ] } | |
4990 | ||
4991 | ## | |
4992 | # @query-tpm-types: | |
4993 | # | |
4994 | # Return a list of supported TPM types | |
4995 | # | |
4996 | # Returns: a list of TpmType | |
4997 | # | |
4998 | # Since: 1.5 | |
5a4c0316 MAL |
4999 | # |
5000 | # Example: | |
5001 | # | |
5002 | # -> { "execute": "query-tpm-types" } | |
5003 | # <- { "return": [ "passthrough" ] } | |
5004 | # | |
d1a0cf73 SB |
5005 | ## |
5006 | { 'command': 'query-tpm-types', 'returns': ['TpmType'] } | |
5007 | ||
5008 | ## | |
5009 | # @TPMPassthroughOptions: | |
5010 | # | |
5011 | # Information about the TPM passthrough type | |
5012 | # | |
5013 | # @path: #optional string describing the path used for accessing the TPM device | |
5014 | # | |
5015 | # @cancel-path: #optional string showing the TPM's sysfs cancel file | |
5016 | # for cancellation of TPM commands while they are executing | |
5017 | # | |
5018 | # Since: 1.5 | |
5019 | ## | |
895a2a80 | 5020 | { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str', |
d1a0cf73 SB |
5021 | '*cancel-path' : 'str'} } |
5022 | ||
5023 | ## | |
5024 | # @TpmTypeOptions: | |
5025 | # | |
5026 | # A union referencing different TPM backend types' configuration options | |
5027 | # | |
4d5c8bc4 | 5028 | # @type: 'passthrough' The configuration options for the TPM passthrough type |
d1a0cf73 SB |
5029 | # |
5030 | # Since: 1.5 | |
5031 | ## | |
5032 | { 'union': 'TpmTypeOptions', | |
88ca7bcf | 5033 | 'data': { 'passthrough' : 'TPMPassthroughOptions' } } |
d1a0cf73 SB |
5034 | |
5035 | ## | |
4d5c8bc4 | 5036 | # @TPMInfo: |
d1a0cf73 SB |
5037 | # |
5038 | # Information about the TPM | |
5039 | # | |
5040 | # @id: The Id of the TPM | |
5041 | # | |
5042 | # @model: The TPM frontend model | |
5043 | # | |
88ca7bcf | 5044 | # @options: The TPM (backend) type configuration options |
d1a0cf73 SB |
5045 | # |
5046 | # Since: 1.5 | |
5047 | ## | |
895a2a80 | 5048 | { 'struct': 'TPMInfo', |
d1a0cf73 SB |
5049 | 'data': {'id': 'str', |
5050 | 'model': 'TpmModel', | |
88ca7bcf | 5051 | 'options': 'TpmTypeOptions' } } |
d1a0cf73 SB |
5052 | |
5053 | ## | |
5054 | # @query-tpm: | |
5055 | # | |
5056 | # Return information about the TPM device | |
5057 | # | |
5058 | # Returns: @TPMInfo on success | |
5059 | # | |
5060 | # Since: 1.5 | |
4e022d01 MAL |
5061 | # |
5062 | # Example: | |
5063 | # | |
5064 | # -> { "execute": "query-tpm" } | |
5065 | # <- { "return": | |
5066 | # [ | |
5067 | # { "model": "tpm-tis", | |
5068 | # "options": | |
5069 | # { "type": "passthrough", | |
5070 | # "data": | |
5071 | # { "cancel-path": "/sys/class/misc/tpm0/device/cancel", | |
5072 | # "path": "/dev/tpm0" | |
5073 | # } | |
5074 | # }, | |
5075 | # "id": "tpm0" | |
5076 | # } | |
5077 | # ] | |
5078 | # } | |
5079 | # | |
d1a0cf73 SB |
5080 | ## |
5081 | { 'command': 'query-tpm', 'returns': ['TPMInfo'] } | |
8ccbad5c LE |
5082 | |
5083 | ## | |
5072f7b3 | 5084 | # @AcpiTableOptions: |
8ccbad5c LE |
5085 | # |
5086 | # Specify an ACPI table on the command line to load. | |
5087 | # | |
5088 | # At most one of @file and @data can be specified. The list of files specified | |
5089 | # by any one of them is loaded and concatenated in order. If both are omitted, | |
5090 | # @data is implied. | |
5091 | # | |
5092 | # Other fields / optargs can be used to override fields of the generic ACPI | |
5093 | # table header; refer to the ACPI specification 5.0, section 5.2.6 System | |
5094 | # Description Table Header. If a header field is not overridden, then the | |
5095 | # corresponding value from the concatenated blob is used (in case of @file), or | |
5096 | # it is filled in with a hard-coded value (in case of @data). | |
5097 | # | |
5098 | # String fields are copied into the matching ACPI member from lowest address | |
5099 | # upwards, and silently truncated / NUL-padded to length. | |
5100 | # | |
5101 | # @sig: #optional table signature / identifier (4 bytes) | |
5102 | # | |
5103 | # @rev: #optional table revision number (dependent on signature, 1 byte) | |
5104 | # | |
5105 | # @oem_id: #optional OEM identifier (6 bytes) | |
5106 | # | |
5107 | # @oem_table_id: #optional OEM table identifier (8 bytes) | |
5108 | # | |
5109 | # @oem_rev: #optional OEM-supplied revision number (4 bytes) | |
5110 | # | |
5111 | # @asl_compiler_id: #optional identifier of the utility that created the table | |
5112 | # (4 bytes) | |
5113 | # | |
5114 | # @asl_compiler_rev: #optional revision number of the utility that created the | |
5115 | # table (4 bytes) | |
5116 | # | |
5117 | # @file: #optional colon (:) separated list of pathnames to load and | |
5118 | # concatenate as table data. The resultant binary blob is expected to | |
5119 | # have an ACPI table header. At least one file is required. This field | |
5120 | # excludes @data. | |
5121 | # | |
5122 | # @data: #optional colon (:) separated list of pathnames to load and | |
5123 | # concatenate as table data. The resultant binary blob must not have an | |
5124 | # ACPI table header. At least one file is required. This field excludes | |
5125 | # @file. | |
5126 | # | |
5072f7b3 | 5127 | # Since: 1.5 |
8ccbad5c | 5128 | ## |
895a2a80 | 5129 | { 'struct': 'AcpiTableOptions', |
8ccbad5c LE |
5130 | 'data': { |
5131 | '*sig': 'str', | |
5132 | '*rev': 'uint8', | |
5133 | '*oem_id': 'str', | |
5134 | '*oem_table_id': 'str', | |
5135 | '*oem_rev': 'uint32', | |
5136 | '*asl_compiler_id': 'str', | |
5137 | '*asl_compiler_rev': 'uint32', | |
5138 | '*file': 'str', | |
5139 | '*data': 'str' }} | |
1f8f987d AK |
5140 | |
5141 | ## | |
5142 | # @CommandLineParameterType: | |
5143 | # | |
5144 | # Possible types for an option parameter. | |
5145 | # | |
5146 | # @string: accepts a character string | |
5147 | # | |
5148 | # @boolean: accepts "on" or "off" | |
5149 | # | |
5150 | # @number: accepts a number | |
5151 | # | |
5152 | # @size: accepts a number followed by an optional suffix (K)ilo, | |
5153 | # (M)ega, (G)iga, (T)era | |
5154 | # | |
5072f7b3 | 5155 | # Since: 1.5 |
1f8f987d AK |
5156 | ## |
5157 | { 'enum': 'CommandLineParameterType', | |
5158 | 'data': ['string', 'boolean', 'number', 'size'] } | |
5159 | ||
5160 | ## | |
5161 | # @CommandLineParameterInfo: | |
5162 | # | |
5163 | # Details about a single parameter of a command line option. | |
5164 | # | |
5165 | # @name: parameter name | |
5166 | # | |
5167 | # @type: parameter @CommandLineParameterType | |
5168 | # | |
5169 | # @help: #optional human readable text string, not suitable for parsing. | |
5170 | # | |
e36af94f CL |
5171 | # @default: #optional default value string (since 2.1) |
5172 | # | |
5072f7b3 | 5173 | # Since: 1.5 |
1f8f987d | 5174 | ## |
895a2a80 | 5175 | { 'struct': 'CommandLineParameterInfo', |
1f8f987d AK |
5176 | 'data': { 'name': 'str', |
5177 | 'type': 'CommandLineParameterType', | |
e36af94f CL |
5178 | '*help': 'str', |
5179 | '*default': 'str' } } | |
1f8f987d AK |
5180 | |
5181 | ## | |
5182 | # @CommandLineOptionInfo: | |
5183 | # | |
5184 | # Details about a command line option, including its list of parameter details | |
5185 | # | |
5186 | # @option: option name | |
5187 | # | |
5188 | # @parameters: an array of @CommandLineParameterInfo | |
5189 | # | |
5072f7b3 | 5190 | # Since: 1.5 |
1f8f987d | 5191 | ## |
895a2a80 | 5192 | { 'struct': 'CommandLineOptionInfo', |
1f8f987d AK |
5193 | 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } } |
5194 | ||
5195 | ## | |
5196 | # @query-command-line-options: | |
5197 | # | |
5198 | # Query command line option schema. | |
5199 | # | |
5200 | # @option: #optional option name | |
5201 | # | |
5202 | # Returns: list of @CommandLineOptionInfo for all options (or for the given | |
5203 | # @option). Returns an error if the given @option doesn't exist. | |
5204 | # | |
5072f7b3 | 5205 | # Since: 1.5 |
e26a0d00 MAL |
5206 | # |
5207 | # Example: | |
5208 | # | |
5209 | # -> { "execute": "query-command-line-options", | |
5210 | # "arguments": { "option": "option-rom" } } | |
5211 | # <- { "return": [ | |
5212 | # { | |
5213 | # "parameters": [ | |
5214 | # { | |
5215 | # "name": "romfile", | |
5216 | # "type": "string" | |
5217 | # }, | |
5218 | # { | |
5219 | # "name": "bootindex", | |
5220 | # "type": "number" | |
5221 | # } | |
5222 | # ], | |
5223 | # "option": "option-rom" | |
5224 | # } | |
5225 | # ] | |
5226 | # } | |
5227 | # | |
1f8f987d AK |
5228 | ## |
5229 | {'command': 'query-command-line-options', 'data': { '*option': 'str' }, | |
5230 | 'returns': ['CommandLineOptionInfo'] } | |
8e8aba50 EH |
5231 | |
5232 | ## | |
5072f7b3 | 5233 | # @X86CPURegister32: |
8e8aba50 EH |
5234 | # |
5235 | # A X86 32-bit register | |
5236 | # | |
5237 | # Since: 1.5 | |
5238 | ## | |
5239 | { 'enum': 'X86CPURegister32', | |
5240 | 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] } | |
5241 | ||
5242 | ## | |
5072f7b3 | 5243 | # @X86CPUFeatureWordInfo: |
8e8aba50 EH |
5244 | # |
5245 | # Information about a X86 CPU feature word | |
5246 | # | |
5247 | # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word | |
5248 | # | |
5249 | # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that | |
5250 | # feature word | |
5251 | # | |
5252 | # @cpuid-register: Output register containing the feature bits | |
5253 | # | |
5254 | # @features: value of output register, containing the feature bits | |
5255 | # | |
5256 | # Since: 1.5 | |
5257 | ## | |
895a2a80 | 5258 | { 'struct': 'X86CPUFeatureWordInfo', |
8e8aba50 EH |
5259 | 'data': { 'cpuid-input-eax': 'int', |
5260 | '*cpuid-input-ecx': 'int', | |
5261 | 'cpuid-register': 'X86CPURegister32', | |
5262 | 'features': 'int' } } | |
b1be4280 | 5263 | |
9f08c8ec | 5264 | ## |
5072f7b3 | 5265 | # @DummyForceArrays: |
9f08c8ec EB |
5266 | # |
5267 | # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally | |
5268 | # | |
5072f7b3 | 5269 | # Since: 2.5 |
9f08c8ec EB |
5270 | ## |
5271 | { 'struct': 'DummyForceArrays', | |
5272 | 'data': { 'unused': ['X86CPUFeatureWordInfo'] } } | |
5273 | ||
5274 | ||
b1be4280 AK |
5275 | ## |
5276 | # @RxState: | |
5277 | # | |
5278 | # Packets receiving state | |
5279 | # | |
5280 | # @normal: filter assigned packets according to the mac-table | |
5281 | # | |
5282 | # @none: don't receive any assigned packet | |
5283 | # | |
5284 | # @all: receive all assigned packets | |
5285 | # | |
5286 | # Since: 1.6 | |
5287 | ## | |
5288 | { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] } | |
5289 | ||
5290 | ## | |
5291 | # @RxFilterInfo: | |
5292 | # | |
5293 | # Rx-filter information for a NIC. | |
5294 | # | |
5295 | # @name: net client name | |
5296 | # | |
5297 | # @promiscuous: whether promiscuous mode is enabled | |
5298 | # | |
5299 | # @multicast: multicast receive state | |
5300 | # | |
5301 | # @unicast: unicast receive state | |
5302 | # | |
f7bc8ef8 AK |
5303 | # @vlan: vlan receive state (Since 2.0) |
5304 | # | |
b1be4280 AK |
5305 | # @broadcast-allowed: whether to receive broadcast |
5306 | # | |
5307 | # @multicast-overflow: multicast table is overflowed or not | |
5308 | # | |
5309 | # @unicast-overflow: unicast table is overflowed or not | |
5310 | # | |
5311 | # @main-mac: the main macaddr string | |
5312 | # | |
5313 | # @vlan-table: a list of active vlan id | |
5314 | # | |
5315 | # @unicast-table: a list of unicast macaddr string | |
5316 | # | |
5317 | # @multicast-table: a list of multicast macaddr string | |
5318 | # | |
5072f7b3 | 5319 | # Since: 1.6 |
b1be4280 | 5320 | ## |
895a2a80 | 5321 | { 'struct': 'RxFilterInfo', |
b1be4280 AK |
5322 | 'data': { |
5323 | 'name': 'str', | |
5324 | 'promiscuous': 'bool', | |
5325 | 'multicast': 'RxState', | |
5326 | 'unicast': 'RxState', | |
f7bc8ef8 | 5327 | 'vlan': 'RxState', |
b1be4280 AK |
5328 | 'broadcast-allowed': 'bool', |
5329 | 'multicast-overflow': 'bool', | |
5330 | 'unicast-overflow': 'bool', | |
5331 | 'main-mac': 'str', | |
5332 | 'vlan-table': ['int'], | |
5333 | 'unicast-table': ['str'], | |
5334 | 'multicast-table': ['str'] }} | |
5335 | ||
5336 | ## | |
5337 | # @query-rx-filter: | |
5338 | # | |
5339 | # Return rx-filter information for all NICs (or for the given NIC). | |
5340 | # | |
5341 | # @name: #optional net client name | |
5342 | # | |
5343 | # Returns: list of @RxFilterInfo for all NICs (or for the given NIC). | |
5344 | # Returns an error if the given @name doesn't exist, or given | |
5345 | # NIC doesn't support rx-filter querying, or given net client | |
5346 | # isn't a NIC. | |
5347 | # | |
5348 | # Since: 1.6 | |
043ea312 MAL |
5349 | # |
5350 | # Example: | |
5351 | # | |
5352 | # -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } } | |
5353 | # <- { "return": [ | |
5354 | # { | |
5355 | # "promiscuous": true, | |
5356 | # "name": "vnet0", | |
5357 | # "main-mac": "52:54:00:12:34:56", | |
5358 | # "unicast": "normal", | |
5359 | # "vlan": "normal", | |
5360 | # "vlan-table": [ | |
5361 | # 4, | |
5362 | # 0 | |
5363 | # ], | |
5364 | # "unicast-table": [ | |
5365 | # ], | |
5366 | # "multicast": "normal", | |
5367 | # "multicast-overflow": false, | |
5368 | # "unicast-overflow": false, | |
5369 | # "multicast-table": [ | |
5370 | # "01:00:5e:00:00:01", | |
5371 | # "33:33:00:00:00:01", | |
5372 | # "33:33:ff:12:34:56" | |
5373 | # ], | |
5374 | # "broadcast-allowed": false | |
5375 | # } | |
5376 | # ] | |
5377 | # } | |
5378 | # | |
b1be4280 AK |
5379 | ## |
5380 | { 'command': 'query-rx-filter', 'data': { '*name': 'str' }, | |
5381 | 'returns': ['RxFilterInfo'] } | |
d26c9a15 | 5382 | |
031fa964 | 5383 | ## |
5072f7b3 | 5384 | # @InputButton: |
031fa964 GH |
5385 | # |
5386 | # Button of a pointer input device (mouse, tablet). | |
5387 | # | |
5388 | # Since: 2.0 | |
5389 | ## | |
5390 | { 'enum' : 'InputButton', | |
f22d0af0 | 5391 | 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down' ] } |
031fa964 GH |
5392 | |
5393 | ## | |
5072f7b3 | 5394 | # @InputAxis: |
031fa964 GH |
5395 | # |
5396 | # Position axis of a pointer input device (mouse, tablet). | |
5397 | # | |
5398 | # Since: 2.0 | |
5399 | ## | |
5400 | { 'enum' : 'InputAxis', | |
01df5143 | 5401 | 'data' : [ 'x', 'y' ] } |
031fa964 GH |
5402 | |
5403 | ## | |
5072f7b3 | 5404 | # @InputKeyEvent: |
031fa964 GH |
5405 | # |
5406 | # Keyboard input event. | |
5407 | # | |
5408 | # @key: Which key this event is for. | |
5409 | # @down: True for key-down and false for key-up events. | |
5410 | # | |
5411 | # Since: 2.0 | |
5412 | ## | |
895a2a80 | 5413 | { 'struct' : 'InputKeyEvent', |
031fa964 GH |
5414 | 'data' : { 'key' : 'KeyValue', |
5415 | 'down' : 'bool' } } | |
5416 | ||
5417 | ## | |
5072f7b3 | 5418 | # @InputBtnEvent: |
031fa964 GH |
5419 | # |
5420 | # Pointer button input event. | |
5421 | # | |
5422 | # @button: Which button this event is for. | |
5423 | # @down: True for key-down and false for key-up events. | |
5424 | # | |
5425 | # Since: 2.0 | |
5426 | ## | |
895a2a80 | 5427 | { 'struct' : 'InputBtnEvent', |
031fa964 GH |
5428 | 'data' : { 'button' : 'InputButton', |
5429 | 'down' : 'bool' } } | |
5430 | ||
5431 | ## | |
5072f7b3 | 5432 | # @InputMoveEvent: |
031fa964 GH |
5433 | # |
5434 | # Pointer motion input event. | |
5435 | # | |
5436 | # @axis: Which axis is referenced by @value. | |
5437 | # @value: Pointer position. For absolute coordinates the | |
5438 | # valid range is 0 -> 0x7ffff | |
5439 | # | |
5440 | # Since: 2.0 | |
5441 | ## | |
895a2a80 | 5442 | { 'struct' : 'InputMoveEvent', |
031fa964 GH |
5443 | 'data' : { 'axis' : 'InputAxis', |
5444 | 'value' : 'int' } } | |
5445 | ||
5446 | ## | |
5072f7b3 | 5447 | # @InputEvent: |
031fa964 GH |
5448 | # |
5449 | # Input event union. | |
5450 | # | |
4d5c8bc4 MAL |
5451 | # @type: the input type, one of: |
5452 | # - 'key': Input event of Keyboard | |
5453 | # - 'btn': Input event of pointer buttons | |
5454 | # - 'rel': Input event of relative pointer motion | |
5455 | # - 'abs': Input event of absolute pointer motion | |
935fb915 | 5456 | # |
031fa964 GH |
5457 | # Since: 2.0 |
5458 | ## | |
5459 | { 'union' : 'InputEvent', | |
5460 | 'data' : { 'key' : 'InputKeyEvent', | |
5461 | 'btn' : 'InputBtnEvent', | |
5462 | 'rel' : 'InputMoveEvent', | |
5463 | 'abs' : 'InputMoveEvent' } } | |
0042109a | 5464 | |
50c6617f | 5465 | ## |
5072f7b3 | 5466 | # @input-send-event: |
50c6617f MT |
5467 | # |
5468 | # Send input event(s) to guest. | |
5469 | # | |
b98d26e3 GH |
5470 | # @device: #optional display device to send event(s) to. |
5471 | # @head: #optional head to send event(s) to, in case the | |
5472 | # display device supports multiple scanouts. | |
50c6617f MT |
5473 | # @events: List of InputEvent union. |
5474 | # | |
5475 | # Returns: Nothing on success. | |
5476 | # | |
70d5b0c2 MAL |
5477 | # The @device and @head parameters can be used to send the input event |
5478 | # to specific input devices in case (a) multiple input devices of the | |
5479 | # same kind are added to the virtual machine and (b) you have | |
b98d26e3 GH |
5480 | # configured input routing (see docs/multiseat.txt) for those input |
5481 | # devices. The parameters work exactly like the device and head | |
5482 | # properties of input devices. If @device is missing, only devices | |
5483 | # that have no input routing config are admissible. If @device is | |
5484 | # specified, both input devices with and without input routing config | |
5485 | # are admissible, but devices with input routing config take | |
5486 | # precedence. | |
df5b2adb | 5487 | # |
6575ccdd | 5488 | # Since: 2.6 |
70d5b0c2 MAL |
5489 | # |
5490 | # Note: The consoles are visible in the qom tree, under | |
5491 | # /backend/console[$index]. They have a device link and head property, | |
5492 | # so it is possible to map which console belongs to which device and | |
5493 | # display. | |
5494 | # | |
5495 | # Example: | |
5496 | # | |
5497 | # 1. Press left mouse button. | |
5498 | # | |
5499 | # -> { "execute": "input-send-event", | |
5500 | # "arguments": { "device": "video0", | |
5501 | # "events": [ { "type": "btn", | |
5502 | # "data" : { "down": true, "button": "left" } } ] } } | |
5503 | # <- { "return": {} } | |
5504 | # | |
5505 | # -> { "execute": "input-send-event", | |
5506 | # "arguments": { "device": "video0", | |
5507 | # "events": [ { "type": "btn", | |
5508 | # "data" : { "down": false, "button": "left" } } ] } } | |
5509 | # <- { "return": {} } | |
5510 | # | |
5511 | # 2. Press ctrl-alt-del. | |
5512 | # | |
5513 | # -> { "execute": "input-send-event", | |
5514 | # "arguments": { "events": [ | |
5515 | # { "type": "key", "data" : { "down": true, | |
5516 | # "key": {"type": "qcode", "data": "ctrl" } } }, | |
5517 | # { "type": "key", "data" : { "down": true, | |
5518 | # "key": {"type": "qcode", "data": "alt" } } }, | |
5519 | # { "type": "key", "data" : { "down": true, | |
5520 | # "key": {"type": "qcode", "data": "delete" } } } ] } } | |
5521 | # <- { "return": {} } | |
5522 | # | |
5523 | # 3. Move mouse pointer to absolute coordinates (20000, 400). | |
5524 | # | |
5525 | # -> { "execute": "input-send-event" , | |
5526 | # "arguments": { "events": [ | |
5527 | # { "type": "abs", "data" : { "axis": "x", "value" : 20000 } }, | |
5528 | # { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } } | |
5529 | # <- { "return": {} } | |
5530 | # | |
50c6617f | 5531 | ## |
6575ccdd | 5532 | { 'command': 'input-send-event', |
b98d26e3 GH |
5533 | 'data': { '*device': 'str', |
5534 | '*head' : 'int', | |
5535 | 'events' : [ 'InputEvent' ] } } | |
50c6617f | 5536 | |
0042109a | 5537 | ## |
5072f7b3 | 5538 | # @NumaOptions: |
0042109a WG |
5539 | # |
5540 | # A discriminated record of NUMA options. (for OptsVisitor) | |
5541 | # | |
5072f7b3 | 5542 | # Since: 2.1 |
0042109a WG |
5543 | ## |
5544 | { 'union': 'NumaOptions', | |
5545 | 'data': { | |
5546 | 'node': 'NumaNodeOptions' }} | |
5547 | ||
5548 | ## | |
5072f7b3 | 5549 | # @NumaNodeOptions: |
0042109a WG |
5550 | # |
5551 | # Create a guest NUMA node. (for OptsVisitor) | |
5552 | # | |
5553 | # @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted) | |
5554 | # | |
5555 | # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin | |
5556 | # if omitted) | |
5557 | # | |
7febe36f PB |
5558 | # @mem: #optional memory size of this node; mutually exclusive with @memdev. |
5559 | # Equally divide total memory among nodes if both @mem and @memdev are | |
5560 | # omitted. | |
5561 | # | |
5562 | # @memdev: #optional memory backend object. If specified for one node, | |
5563 | # it must be specified for all nodes. | |
0042109a WG |
5564 | # |
5565 | # Since: 2.1 | |
5566 | ## | |
895a2a80 | 5567 | { 'struct': 'NumaNodeOptions', |
0042109a WG |
5568 | 'data': { |
5569 | '*nodeid': 'uint16', | |
5570 | '*cpus': ['uint16'], | |
7febe36f PB |
5571 | '*mem': 'size', |
5572 | '*memdev': 'str' }} | |
4cf1b76b HT |
5573 | |
5574 | ## | |
5072f7b3 | 5575 | # @HostMemPolicy: |
4cf1b76b HT |
5576 | # |
5577 | # Host memory policy types | |
5578 | # | |
5579 | # @default: restore default policy, remove any nondefault policy | |
5580 | # | |
5581 | # @preferred: set the preferred host nodes for allocation | |
5582 | # | |
5583 | # @bind: a strict policy that restricts memory allocation to the | |
5584 | # host nodes specified | |
5585 | # | |
5586 | # @interleave: memory allocations are interleaved across the set | |
5587 | # of host nodes specified | |
5588 | # | |
5072f7b3 | 5589 | # Since: 2.1 |
4cf1b76b HT |
5590 | ## |
5591 | { 'enum': 'HostMemPolicy', | |
5592 | 'data': [ 'default', 'preferred', 'bind', 'interleave' ] } | |
76b5d850 HT |
5593 | |
5594 | ## | |
5595 | # @Memdev: | |
5596 | # | |
8f4e5ac3 | 5597 | # Information about memory backend |
76b5d850 | 5598 | # |
e1ff3c67 IM |
5599 | # @id: #optional backend's ID if backend has 'id' property (since 2.9) |
5600 | # | |
8f4e5ac3 | 5601 | # @size: memory backend size |
76b5d850 HT |
5602 | # |
5603 | # @merge: enables or disables memory merge support | |
5604 | # | |
8f4e5ac3 | 5605 | # @dump: includes memory backend's memory in a core dump or not |
76b5d850 HT |
5606 | # |
5607 | # @prealloc: enables or disables memory preallocation | |
5608 | # | |
5609 | # @host-nodes: host nodes for its memory policy | |
5610 | # | |
8f4e5ac3 | 5611 | # @policy: memory policy of memory backend |
76b5d850 HT |
5612 | # |
5613 | # Since: 2.1 | |
5614 | ## | |
895a2a80 | 5615 | { 'struct': 'Memdev', |
76b5d850 | 5616 | 'data': { |
e1ff3c67 | 5617 | '*id': 'str', |
76b5d850 HT |
5618 | 'size': 'size', |
5619 | 'merge': 'bool', | |
5620 | 'dump': 'bool', | |
5621 | 'prealloc': 'bool', | |
5622 | 'host-nodes': ['uint16'], | |
5623 | 'policy': 'HostMemPolicy' }} | |
5624 | ||
5625 | ## | |
5626 | # @query-memdev: | |
5627 | # | |
8f4e5ac3 | 5628 | # Returns information for all memory backends. |
76b5d850 HT |
5629 | # |
5630 | # Returns: a list of @Memdev. | |
5631 | # | |
5632 | # Since: 2.1 | |
cfc84c8b MAL |
5633 | # |
5634 | # Example: | |
5635 | # | |
5636 | # -> { "execute": "query-memdev" } | |
5637 | # <- { "return": [ | |
5638 | # { | |
5639 | # "id": "mem1", | |
5640 | # "size": 536870912, | |
5641 | # "merge": false, | |
5642 | # "dump": true, | |
5643 | # "prealloc": false, | |
5644 | # "host-nodes": [0, 1], | |
5645 | # "policy": "bind" | |
5646 | # }, | |
5647 | # { | |
5648 | # "size": 536870912, | |
5649 | # "merge": false, | |
5650 | # "dump": true, | |
5651 | # "prealloc": true, | |
5652 | # "host-nodes": [2, 3], | |
5653 | # "policy": "preferred" | |
5654 | # } | |
5655 | # ] | |
5656 | # } | |
5657 | # | |
76b5d850 HT |
5658 | ## |
5659 | { 'command': 'query-memdev', 'returns': ['Memdev'] } | |
8f4e5ac3 IM |
5660 | |
5661 | ## | |
6f2e2730 IM |
5662 | # @PCDIMMDeviceInfo: |
5663 | # | |
5664 | # PCDIMMDevice state information | |
5665 | # | |
5666 | # @id: #optional device's ID | |
5667 | # | |
5668 | # @addr: physical address, where device is mapped | |
5669 | # | |
5670 | # @size: size of memory that the device provides | |
5671 | # | |
5672 | # @slot: slot number at which device is plugged in | |
5673 | # | |
5674 | # @node: NUMA node number where device is plugged in | |
5675 | # | |
5676 | # @memdev: memory backend linked with device | |
5677 | # | |
5678 | # @hotplugged: true if device was hotplugged | |
5679 | # | |
5680 | # @hotpluggable: true if device if could be added/removed while machine is running | |
5681 | # | |
5682 | # Since: 2.1 | |
5683 | ## | |
895a2a80 | 5684 | { 'struct': 'PCDIMMDeviceInfo', |
6f2e2730 IM |
5685 | 'data': { '*id': 'str', |
5686 | 'addr': 'int', | |
5687 | 'size': 'int', | |
5688 | 'slot': 'int', | |
5689 | 'node': 'int', | |
5690 | 'memdev': 'str', | |
5691 | 'hotplugged': 'bool', | |
5692 | 'hotpluggable': 'bool' | |
5693 | } | |
5694 | } | |
5695 | ||
5696 | ## | |
5697 | # @MemoryDeviceInfo: | |
5698 | # | |
5699 | # Union containing information about a memory device | |
5700 | # | |
5701 | # Since: 2.1 | |
5702 | ## | |
5703 | { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} } | |
5704 | ||
5705 | ## | |
5072f7b3 | 5706 | # @query-memory-devices: |
6f2e2730 IM |
5707 | # |
5708 | # Lists available memory devices and their state | |
5709 | # | |
5710 | # Since: 2.1 | |
22f9a094 MAL |
5711 | # |
5712 | # Example: | |
5713 | # | |
5714 | # -> { "execute": "query-memory-devices" } | |
5715 | # <- { "return": [ { "data": | |
5716 | # { "addr": 5368709120, | |
5717 | # "hotpluggable": true, | |
5718 | # "hotplugged": true, | |
5719 | # "id": "d1", | |
5720 | # "memdev": "/objects/memX", | |
5721 | # "node": 0, | |
5722 | # "size": 1073741824, | |
5723 | # "slot": 0}, | |
5724 | # "type": "dimm" | |
5725 | # } ] } | |
5726 | # | |
6f2e2730 IM |
5727 | ## |
5728 | { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] } | |
521b3673 | 5729 | |
49687ace | 5730 | ## |
5072f7b3 | 5731 | # @ACPISlotType: |
521b3673 IM |
5732 | # |
5733 | # @DIMM: memory slot | |
76623d00 | 5734 | # @CPU: logical CPU slot (since 2.7) |
49687ace | 5735 | ## |
76623d00 | 5736 | { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] } |
521b3673 | 5737 | |
49687ace | 5738 | ## |
5072f7b3 | 5739 | # @ACPIOSTInfo: |
521b3673 IM |
5740 | # |
5741 | # OSPM Status Indication for a device | |
5742 | # For description of possible values of @source and @status fields | |
5743 | # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec. | |
5744 | # | |
5745 | # @device: #optional device ID associated with slot | |
5746 | # | |
5747 | # @slot: slot ID, unique per slot of a given @slot-type | |
5748 | # | |
5749 | # @slot-type: type of the slot | |
5750 | # | |
5751 | # @source: an integer containing the source event | |
5752 | # | |
5753 | # @status: an integer containing the status code | |
5754 | # | |
5755 | # Since: 2.1 | |
5756 | ## | |
895a2a80 | 5757 | { 'struct': 'ACPIOSTInfo', |
521b3673 IM |
5758 | 'data' : { '*device': 'str', |
5759 | 'slot': 'str', | |
5760 | 'slot-type': 'ACPISlotType', | |
5761 | 'source': 'int', | |
5762 | 'status': 'int' } } | |
02419bcb IM |
5763 | |
5764 | ## | |
5072f7b3 | 5765 | # @query-acpi-ospm-status: |
02419bcb | 5766 | # |
18b43003 MAL |
5767 | # Return a list of ACPIOSTInfo for devices that support status |
5768 | # reporting via ACPI _OST method. | |
02419bcb IM |
5769 | # |
5770 | # Since: 2.1 | |
18b43003 MAL |
5771 | # |
5772 | # Example: | |
5773 | # | |
5774 | # -> { "execute": "query-acpi-ospm-status" } | |
5775 | # <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0}, | |
5776 | # { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0}, | |
5777 | # { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0}, | |
5778 | # { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0} | |
5779 | # ]} | |
5780 | # | |
02419bcb IM |
5781 | ## |
5782 | { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] } | |
f668470f | 5783 | |
99eaf09c | 5784 | ## |
5072f7b3 | 5785 | # @WatchdogExpirationAction: |
99eaf09c WX |
5786 | # |
5787 | # An enumeration of the actions taken when the watchdog device's timer is | |
5788 | # expired | |
5789 | # | |
5790 | # @reset: system resets | |
5791 | # | |
5792 | # @shutdown: system shutdown, note that it is similar to @powerdown, which | |
5793 | # tries to set to system status and notify guest | |
5794 | # | |
5795 | # @poweroff: system poweroff, the emulator program exits | |
5796 | # | |
5797 | # @pause: system pauses, similar to @stop | |
5798 | # | |
5799 | # @debug: system enters debug state | |
5800 | # | |
5801 | # @none: nothing is done | |
5802 | # | |
795dc6e4 MCL |
5803 | # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all |
5804 | # VCPUS on x86) (since 2.4) | |
5805 | # | |
99eaf09c WX |
5806 | # Since: 2.1 |
5807 | ## | |
5808 | { 'enum': 'WatchdogExpirationAction', | |
795dc6e4 MCL |
5809 | 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none', |
5810 | 'inject-nmi' ] } | |
99eaf09c | 5811 | |
5a2d2cbd | 5812 | ## |
5072f7b3 | 5813 | # @IoOperationType: |
5a2d2cbd WX |
5814 | # |
5815 | # An enumeration of the I/O operation types | |
5816 | # | |
5817 | # @read: read operation | |
5818 | # | |
5819 | # @write: write operation | |
5820 | # | |
5821 | # Since: 2.1 | |
5822 | ## | |
5823 | { 'enum': 'IoOperationType', | |
5824 | 'data': [ 'read', 'write' ] } | |
5825 | ||
3a449690 | 5826 | ## |
5072f7b3 | 5827 | # @GuestPanicAction: |
3a449690 WX |
5828 | # |
5829 | # An enumeration of the actions taken when guest OS panic is detected | |
5830 | # | |
5831 | # @pause: system pauses | |
5832 | # | |
864111f4 | 5833 | # Since: 2.1 (poweroff since 2.8) |
3a449690 WX |
5834 | ## |
5835 | { 'enum': 'GuestPanicAction', | |
864111f4 | 5836 | 'data': [ 'pause', 'poweroff' ] } |
f2ae8abf MT |
5837 | |
5838 | ## | |
5072f7b3 | 5839 | # @rtc-reset-reinjection: |
f2ae8abf MT |
5840 | # |
5841 | # This command will reset the RTC interrupt reinjection backlog. | |
5842 | # Can be used if another mechanism to synchronize guest time | |
5843 | # is in effect, for example QEMU guest agent's guest-set-time | |
5844 | # command. | |
5845 | # | |
5846 | # Since: 2.1 | |
5c32b4cc MAL |
5847 | # |
5848 | # Example: | |
5849 | # | |
5850 | # -> { "execute": "rtc-reset-reinjection" } | |
5851 | # <- { "return": {} } | |
5852 | # | |
f2ae8abf MT |
5853 | ## |
5854 | { 'command': 'rtc-reset-reinjection' } | |
fafa4d50 SF |
5855 | |
5856 | # Rocker ethernet network switch | |
5857 | { 'include': 'qapi/rocker.json' } | |
d73abd6d PD |
5858 | |
5859 | ## | |
c5927e7a | 5860 | # @ReplayMode: |
d73abd6d PD |
5861 | # |
5862 | # Mode of the replay subsystem. | |
5863 | # | |
5864 | # @none: normal execution mode. Replay or record are not enabled. | |
5865 | # | |
5866 | # @record: record mode. All non-deterministic data is written into the | |
5867 | # replay log. | |
5868 | # | |
5869 | # @play: replay mode. Non-deterministic data required for system execution | |
5870 | # is read from the log. | |
5871 | # | |
5872 | # Since: 2.5 | |
5873 | ## | |
5874 | { 'enum': 'ReplayMode', | |
5875 | 'data': [ 'none', 'record', 'play' ] } | |
ae50a770 | 5876 | |
88c16567 WC |
5877 | ## |
5878 | # @xen-load-devices-state: | |
5879 | # | |
5880 | # Load the state of all devices from file. The RAM and the block devices | |
5881 | # of the VM are not loaded by this command. | |
5882 | # | |
5883 | # @filename: the file to load the state of the devices from as binary | |
5884 | # data. See xen-save-devices-state.txt for a description of the binary | |
5885 | # format. | |
5886 | # | |
5887 | # Since: 2.7 | |
7d1182d9 MAL |
5888 | # |
5889 | # Example: | |
5890 | # | |
5891 | # -> { "execute": "xen-load-devices-state", | |
5892 | # "arguments": { "filename": "/tmp/resume" } } | |
5893 | # <- { "return": {} } | |
5894 | # | |
88c16567 WC |
5895 | ## |
5896 | { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} } | |
5897 | ||
ae50a770 PX |
5898 | ## |
5899 | # @GICCapability: | |
5900 | # | |
5901 | # The struct describes capability for a specific GIC (Generic | |
5902 | # Interrupt Controller) version. These bits are not only decided by | |
5903 | # QEMU/KVM software version, but also decided by the hardware that | |
5904 | # the program is running upon. | |
5905 | # | |
5906 | # @version: version of GIC to be described. Currently, only 2 and 3 | |
5907 | # are supported. | |
5908 | # | |
5909 | # @emulated: whether current QEMU/hardware supports emulated GIC | |
5910 | # device in user space. | |
5911 | # | |
5912 | # @kernel: whether current QEMU/hardware supports hardware | |
5913 | # accelerated GIC device in kernel. | |
5914 | # | |
5915 | # Since: 2.6 | |
5916 | ## | |
5917 | { 'struct': 'GICCapability', | |
5918 | 'data': { 'version': 'int', | |
5919 | 'emulated': 'bool', | |
5920 | 'kernel': 'bool' } } | |
5921 | ||
5922 | ## | |
5923 | # @query-gic-capabilities: | |
5924 | # | |
5925 | # This command is ARM-only. It will return a list of GICCapability | |
5926 | # objects that describe its capability bits. | |
5927 | # | |
5928 | # Returns: a list of GICCapability objects. | |
5929 | # | |
5930 | # Since: 2.6 | |
1965e98d MAL |
5931 | # |
5932 | # Example: | |
5933 | # | |
5934 | # -> { "execute": "query-gic-capabilities" } | |
5935 | # <- { "return": [{ "version": 2, "emulated": true, "kernel": false }, | |
5936 | # { "version": 3, "emulated": false, "kernel": true } ] } | |
5937 | # | |
ae50a770 PX |
5938 | ## |
5939 | { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] } | |
d4633541 IM |
5940 | |
5941 | ## | |
5072f7b3 | 5942 | # @CpuInstanceProperties: |
d4633541 IM |
5943 | # |
5944 | # List of properties to be used for hotplugging a CPU instance, | |
5945 | # it should be passed by management with device_add command when | |
5946 | # a CPU is being hotplugged. | |
5947 | # | |
5807ff88 MAL |
5948 | # @node-id: #optional NUMA node ID the CPU belongs to |
5949 | # @socket-id: #optional socket number within node/board the CPU belongs to | |
5950 | # @core-id: #optional core number within socket the CPU belongs to | |
5951 | # @thread-id: #optional thread number within core the CPU belongs to | |
5952 | # | |
d4633541 IM |
5953 | # Note: currently there are 4 properties that could be present |
5954 | # but management should be prepared to pass through other | |
5955 | # properties with device_add command to allow for future | |
27393c33 PK |
5956 | # interface extension. This also requires the filed names to be kept in |
5957 | # sync with the properties passed to -device/device_add. | |
d4633541 | 5958 | # |
d4633541 IM |
5959 | # Since: 2.7 |
5960 | ## | |
5961 | { 'struct': 'CpuInstanceProperties', | |
27393c33 PK |
5962 | 'data': { '*node-id': 'int', |
5963 | '*socket-id': 'int', | |
5964 | '*core-id': 'int', | |
5965 | '*thread-id': 'int' | |
d4633541 IM |
5966 | } |
5967 | } | |
5968 | ||
5969 | ## | |
5072f7b3 | 5970 | # @HotpluggableCPU: |
d4633541 IM |
5971 | # |
5972 | # @type: CPU object type for usage with device_add command | |
5973 | # @props: list of properties to be used for hotplugging CPU | |
5974 | # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides | |
5975 | # @qom-path: #optional link to existing CPU object if CPU is present or | |
5976 | # omitted if CPU is not present. | |
5977 | # | |
5978 | # Since: 2.7 | |
5979 | ## | |
5980 | { 'struct': 'HotpluggableCPU', | |
5981 | 'data': { 'type': 'str', | |
5982 | 'vcpus-count': 'int', | |
5983 | 'props': 'CpuInstanceProperties', | |
5984 | '*qom-path': 'str' | |
5985 | } | |
5986 | } | |
5987 | ||
5988 | ## | |
5072f7b3 | 5989 | # @query-hotpluggable-cpus: |
d4633541 IM |
5990 | # |
5991 | # Returns: a list of HotpluggableCPU objects. | |
5992 | # | |
5993 | # Since: 2.7 | |
7e31d1ae MAL |
5994 | # |
5995 | # Example: | |
5996 | # | |
5997 | # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8: | |
5998 | # | |
5999 | # -> { "execute": "query-hotpluggable-cpus" } | |
6000 | # <- {"return": [ | |
6001 | # { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core", | |
6002 | # "vcpus-count": 1 }, | |
6003 | # { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core", | |
6004 | # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"} | |
6005 | # ]}' | |
6006 | # | |
6007 | # For pc machine type started with -smp 1,maxcpus=2: | |
6008 | # | |
6009 | # -> { "execute": "query-hotpluggable-cpus" } | |
6010 | # <- {"return": [ | |
6011 | # { | |
6012 | # "type": "qemu64-x86_64-cpu", "vcpus-count": 1, | |
6013 | # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0} | |
6014 | # }, | |
6015 | # { | |
6016 | # "qom-path": "/machine/unattached/device[0]", | |
6017 | # "type": "qemu64-x86_64-cpu", "vcpus-count": 1, | |
6018 | # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0} | |
6019 | # } | |
6020 | # ]} | |
6021 | # | |
d4633541 IM |
6022 | ## |
6023 | { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] } |