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