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