]> git.proxmox.com Git - mirror_qemu.git/blob - qapi-schema.json
qmp-commands: move 'query-cpus' 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 { 'command': 'x-colo-lost-heartbeat' }
1162
1163 ##
1164 # @MouseInfo:
1165 #
1166 # Information about a mouse device.
1167 #
1168 # @name: the name of the mouse device
1169 #
1170 # @index: the index of the mouse device
1171 #
1172 # @current: true if this device is currently receiving mouse events
1173 #
1174 # @absolute: true if this device supports absolute coordinates as input
1175 #
1176 # Since: 0.14.0
1177 ##
1178 { 'struct': 'MouseInfo',
1179 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
1180 'absolute': 'bool'} }
1181
1182 ##
1183 # @query-mice:
1184 #
1185 # Returns information about each active mouse device
1186 #
1187 # Returns: a list of @MouseInfo for each device
1188 #
1189 # Since: 0.14.0
1190 #
1191 # Example:
1192 #
1193 # -> { "execute": "query-mice" }
1194 # <- { "return": [
1195 # {
1196 # "name":"QEMU Microsoft Mouse",
1197 # "index":0,
1198 # "current":false,
1199 # "absolute":false
1200 # },
1201 # {
1202 # "name":"QEMU PS/2 Mouse",
1203 # "index":1,
1204 # "current":true,
1205 # "absolute":true
1206 # }
1207 # ]
1208 # }
1209 #
1210 ##
1211 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
1212
1213 ##
1214 # @CpuInfoArch:
1215 #
1216 # An enumeration of cpu types that enable additional information during
1217 # @query-cpus.
1218 #
1219 # Since: 2.6
1220 ##
1221 { 'enum': 'CpuInfoArch',
1222 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
1223
1224 ##
1225 # @CpuInfo:
1226 #
1227 # Information about a virtual CPU
1228 #
1229 # @CPU: the index of the virtual CPU
1230 #
1231 # @current: this only exists for backwards compatibility and should be ignored
1232 #
1233 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
1234 # to a processor specific low power mode.
1235 #
1236 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
1237 #
1238 # @thread_id: ID of the underlying host thread
1239 #
1240 # @arch: architecture of the cpu, which determines which additional fields
1241 # will be listed (since 2.6)
1242 #
1243 # Since: 0.14.0
1244 #
1245 # Notes: @halted is a transient state that changes frequently. By the time the
1246 # data is sent to the client, the guest may no longer be halted.
1247 ##
1248 { 'union': 'CpuInfo',
1249 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
1250 'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' },
1251 'discriminator': 'arch',
1252 'data': { 'x86': 'CpuInfoX86',
1253 'sparc': 'CpuInfoSPARC',
1254 'ppc': 'CpuInfoPPC',
1255 'mips': 'CpuInfoMIPS',
1256 'tricore': 'CpuInfoTricore',
1257 'other': 'CpuInfoOther' } }
1258
1259 ##
1260 # @CpuInfoX86:
1261 #
1262 # Additional information about a virtual i386 or x86_64 CPU
1263 #
1264 # @pc: the 64-bit instruction pointer
1265 #
1266 # Since: 2.6
1267 ##
1268 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
1269
1270 ##
1271 # @CpuInfoSPARC:
1272 #
1273 # Additional information about a virtual SPARC CPU
1274 #
1275 # @pc: the PC component of the instruction pointer
1276 #
1277 # @npc: the NPC component of the instruction pointer
1278 #
1279 # Since: 2.6
1280 ##
1281 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
1282
1283 ##
1284 # @CpuInfoPPC:
1285 #
1286 # Additional information about a virtual PPC CPU
1287 #
1288 # @nip: the instruction pointer
1289 #
1290 # Since: 2.6
1291 ##
1292 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
1293
1294 ##
1295 # @CpuInfoMIPS:
1296 #
1297 # Additional information about a virtual MIPS CPU
1298 #
1299 # @PC: the instruction pointer
1300 #
1301 # Since: 2.6
1302 ##
1303 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
1304
1305 ##
1306 # @CpuInfoTricore:
1307 #
1308 # Additional information about a virtual Tricore CPU
1309 #
1310 # @PC: the instruction pointer
1311 #
1312 # Since: 2.6
1313 ##
1314 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
1315
1316 ##
1317 # @CpuInfoOther:
1318 #
1319 # No additional information is available about the virtual CPU
1320 #
1321 # Since: 2.6
1322 #
1323 ##
1324 { 'struct': 'CpuInfoOther', 'data': { } }
1325
1326 ##
1327 # @query-cpus:
1328 #
1329 # Returns a list of information about each virtual CPU.
1330 #
1331 # Returns: a list of @CpuInfo for each virtual CPU
1332 #
1333 # Since: 0.14.0
1334 #
1335 # Example:
1336 #
1337 # -> { "execute": "query-cpus" }
1338 # <- { "return": [
1339 # {
1340 # "CPU":0,
1341 # "current":true,
1342 # "halted":false,
1343 # "qom_path":"/machine/unattached/device[0]",
1344 # "arch":"x86",
1345 # "pc":3227107138,
1346 # "thread_id":3134
1347 # },
1348 # {
1349 # "CPU":1,
1350 # "current":false,
1351 # "halted":true,
1352 # "qom_path":"/machine/unattached/device[2]",
1353 # "arch":"x86",
1354 # "pc":7108165,
1355 # "thread_id":3135
1356 # }
1357 # ]
1358 # }
1359 #
1360 ##
1361 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
1362
1363 ##
1364 # @IOThreadInfo:
1365 #
1366 # Information about an iothread
1367 #
1368 # @id: the identifier of the iothread
1369 #
1370 # @thread-id: ID of the underlying host thread
1371 #
1372 # Since: 2.0
1373 ##
1374 { 'struct': 'IOThreadInfo',
1375 'data': {'id': 'str', 'thread-id': 'int'} }
1376
1377 ##
1378 # @query-iothreads:
1379 #
1380 # Returns a list of information about each iothread.
1381 #
1382 # Note: this list excludes the QEMU main loop thread, which is not declared
1383 # using the -object iothread command-line option. It is always the main thread
1384 # of the process.
1385 #
1386 # Returns: a list of @IOThreadInfo for each iothread
1387 #
1388 # Since: 2.0
1389 ##
1390 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
1391
1392 ##
1393 # @NetworkAddressFamily:
1394 #
1395 # The network address family
1396 #
1397 # @ipv4: IPV4 family
1398 #
1399 # @ipv6: IPV6 family
1400 #
1401 # @unix: unix socket
1402 #
1403 # @vsock: vsock family (since 2.8)
1404 #
1405 # @unknown: otherwise
1406 #
1407 # Since: 2.1
1408 ##
1409 { 'enum': 'NetworkAddressFamily',
1410 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
1411
1412 ##
1413 # @VncBasicInfo:
1414 #
1415 # The basic information for vnc network connection
1416 #
1417 # @host: IP address
1418 #
1419 # @service: The service name of the vnc port. This may depend on the host
1420 # system's service database so symbolic names should not be relied
1421 # on.
1422 #
1423 # @family: address family
1424 #
1425 # @websocket: true in case the socket is a websocket (since 2.3).
1426 #
1427 # Since: 2.1
1428 ##
1429 { 'struct': 'VncBasicInfo',
1430 'data': { 'host': 'str',
1431 'service': 'str',
1432 'family': 'NetworkAddressFamily',
1433 'websocket': 'bool' } }
1434
1435 ##
1436 # @VncServerInfo:
1437 #
1438 # The network connection information for server
1439 #
1440 # @auth: #optional, authentication method
1441 #
1442 # Since: 2.1
1443 ##
1444 { 'struct': 'VncServerInfo',
1445 'base': 'VncBasicInfo',
1446 'data': { '*auth': 'str' } }
1447
1448 ##
1449 # @VncClientInfo:
1450 #
1451 # Information about a connected VNC client.
1452 #
1453 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
1454 # Name of the client.
1455 #
1456 # @sasl_username: #optional If SASL authentication is in use, the SASL username
1457 # used for authentication.
1458 #
1459 # Since: 0.14.0
1460 ##
1461 { 'struct': 'VncClientInfo',
1462 'base': 'VncBasicInfo',
1463 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1464
1465 ##
1466 # @VncInfo:
1467 #
1468 # Information about the VNC session.
1469 #
1470 # @enabled: true if the VNC server is enabled, false otherwise
1471 #
1472 # @host: #optional The hostname the VNC server is bound to. This depends on
1473 # the name resolution on the host and may be an IP address.
1474 #
1475 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
1476 # 'ipv4' if the host is listening for IPv4 connections
1477 # 'unix' if the host is listening on a unix domain socket
1478 # 'unknown' otherwise
1479 #
1480 # @service: #optional The service name of the server's port. This may depends
1481 # on the host system's service database so symbolic names should not
1482 # be relied on.
1483 #
1484 # @auth: #optional the current authentication type used by the server
1485 # 'none' if no authentication is being used
1486 # 'vnc' if VNC authentication is being used
1487 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
1488 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1489 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1490 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1491 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1492 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1493 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1494 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1495 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1496 #
1497 # @clients: a list of @VncClientInfo of all currently connected clients
1498 #
1499 # Since: 0.14.0
1500 ##
1501 { 'struct': 'VncInfo',
1502 'data': {'enabled': 'bool', '*host': 'str',
1503 '*family': 'NetworkAddressFamily',
1504 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1505
1506 ##
1507 # @VncPrimaryAuth:
1508 #
1509 # vnc primary authentication method.
1510 #
1511 # Since: 2.3
1512 ##
1513 { 'enum': 'VncPrimaryAuth',
1514 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1515 'tls', 'vencrypt', 'sasl' ] }
1516
1517 ##
1518 # @VncVencryptSubAuth:
1519 #
1520 # vnc sub authentication method with vencrypt.
1521 #
1522 # Since: 2.3
1523 ##
1524 { 'enum': 'VncVencryptSubAuth',
1525 'data': [ 'plain',
1526 'tls-none', 'x509-none',
1527 'tls-vnc', 'x509-vnc',
1528 'tls-plain', 'x509-plain',
1529 'tls-sasl', 'x509-sasl' ] }
1530
1531 ##
1532 # @VncInfo2:
1533 #
1534 # Information about a vnc server
1535 #
1536 # @id: vnc server name.
1537 #
1538 # @server: A list of @VncBasincInfo describing all listening sockets.
1539 # The list can be empty (in case the vnc server is disabled).
1540 # It also may have multiple entries: normal + websocket,
1541 # possibly also ipv4 + ipv6 in the future.
1542 #
1543 # @clients: A list of @VncClientInfo of all currently connected clients.
1544 # The list can be empty, for obvious reasons.
1545 #
1546 # @auth: The current authentication type used by the server
1547 #
1548 # @vencrypt: #optional The vencrypt sub authentication type used by the server,
1549 # only specified in case auth == vencrypt.
1550 #
1551 # @display: #optional The display device the vnc server is linked to.
1552 #
1553 # Since: 2.3
1554 ##
1555 { 'struct': 'VncInfo2',
1556 'data': { 'id' : 'str',
1557 'server' : ['VncBasicInfo'],
1558 'clients' : ['VncClientInfo'],
1559 'auth' : 'VncPrimaryAuth',
1560 '*vencrypt' : 'VncVencryptSubAuth',
1561 '*display' : 'str' } }
1562
1563 ##
1564 # @query-vnc:
1565 #
1566 # Returns information about the current VNC server
1567 #
1568 # Returns: @VncInfo
1569 #
1570 # Since: 0.14.0
1571 ##
1572 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1573
1574 ##
1575 # @query-vnc-servers:
1576 #
1577 # Returns a list of vnc servers. The list can be empty.
1578 #
1579 # Returns: a list of @VncInfo2
1580 #
1581 # Since: 2.3
1582 ##
1583 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1584
1585 ##
1586 # @SpiceBasicInfo:
1587 #
1588 # The basic information for SPICE network connection
1589 #
1590 # @host: IP address
1591 #
1592 # @port: port number
1593 #
1594 # @family: address family
1595 #
1596 # Since: 2.1
1597 ##
1598 { 'struct': 'SpiceBasicInfo',
1599 'data': { 'host': 'str',
1600 'port': 'str',
1601 'family': 'NetworkAddressFamily' } }
1602
1603 ##
1604 # @SpiceServerInfo:
1605 #
1606 # Information about a SPICE server
1607 #
1608 # @auth: #optional, authentication method
1609 #
1610 # Since: 2.1
1611 ##
1612 { 'struct': 'SpiceServerInfo',
1613 'base': 'SpiceBasicInfo',
1614 'data': { '*auth': 'str' } }
1615
1616 ##
1617 # @SpiceChannel:
1618 #
1619 # Information about a SPICE client channel.
1620 #
1621 # @connection-id: SPICE connection id number. All channels with the same id
1622 # belong to the same SPICE session.
1623 #
1624 # @channel-type: SPICE channel type number. "1" is the main control
1625 # channel, filter for this one if you want to track spice
1626 # sessions only
1627 #
1628 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1629 # multiple channels of the same type exist, such as multiple
1630 # display channels in a multihead setup
1631 #
1632 # @tls: true if the channel is encrypted, false otherwise.
1633 #
1634 # Since: 0.14.0
1635 ##
1636 { 'struct': 'SpiceChannel',
1637 'base': 'SpiceBasicInfo',
1638 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1639 'tls': 'bool'} }
1640
1641 ##
1642 # @SpiceQueryMouseMode:
1643 #
1644 # An enumeration of Spice mouse states.
1645 #
1646 # @client: Mouse cursor position is determined by the client.
1647 #
1648 # @server: Mouse cursor position is determined by the server.
1649 #
1650 # @unknown: No information is available about mouse mode used by
1651 # the spice server.
1652 #
1653 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1654 #
1655 # Since: 1.1
1656 ##
1657 { 'enum': 'SpiceQueryMouseMode',
1658 'data': [ 'client', 'server', 'unknown' ] }
1659
1660 ##
1661 # @SpiceInfo:
1662 #
1663 # Information about the SPICE session.
1664 #
1665 # @enabled: true if the SPICE server is enabled, false otherwise
1666 #
1667 # @migrated: true if the last guest migration completed and spice
1668 # migration had completed as well. false otherwise.
1669 #
1670 # @host: #optional The hostname the SPICE server is bound to. This depends on
1671 # the name resolution on the host and may be an IP address.
1672 #
1673 # @port: #optional The SPICE server's port number.
1674 #
1675 # @compiled-version: #optional SPICE server version.
1676 #
1677 # @tls-port: #optional The SPICE server's TLS port number.
1678 #
1679 # @auth: #optional the current authentication type used by the server
1680 # 'none' if no authentication is being used
1681 # 'spice' uses SASL or direct TLS authentication, depending on command
1682 # line options
1683 #
1684 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1685 # be determined by the client or the server, or unknown if spice
1686 # server doesn't provide this information.
1687 #
1688 # Since: 1.1
1689 #
1690 # @channels: a list of @SpiceChannel for each active spice channel
1691 #
1692 # Since: 0.14.0
1693 ##
1694 { 'struct': 'SpiceInfo',
1695 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1696 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1697 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1698
1699 ##
1700 # @query-spice:
1701 #
1702 # Returns information about the current SPICE server
1703 #
1704 # Returns: @SpiceInfo
1705 #
1706 # Since: 0.14.0
1707 ##
1708 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1709
1710 ##
1711 # @BalloonInfo:
1712 #
1713 # Information about the guest balloon device.
1714 #
1715 # @actual: the number of bytes the balloon currently contains
1716 #
1717 # Since: 0.14.0
1718 #
1719 ##
1720 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1721
1722 ##
1723 # @query-balloon:
1724 #
1725 # Return information about the balloon device.
1726 #
1727 # Returns: @BalloonInfo on success
1728 # If the balloon driver is enabled but not functional because the KVM
1729 # kernel module cannot support it, KvmMissingCap
1730 # If no balloon device is present, DeviceNotActive
1731 #
1732 # Since: 0.14.0
1733 ##
1734 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1735
1736 ##
1737 # @PciMemoryRange:
1738 #
1739 # A PCI device memory region
1740 #
1741 # @base: the starting address (guest physical)
1742 #
1743 # @limit: the ending address (guest physical)
1744 #
1745 # Since: 0.14.0
1746 ##
1747 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1748
1749 ##
1750 # @PciMemoryRegion:
1751 #
1752 # Information about a PCI device I/O region.
1753 #
1754 # @bar: the index of the Base Address Register for this region
1755 #
1756 # @type: 'io' if the region is a PIO region
1757 # 'memory' if the region is a MMIO region
1758 #
1759 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1760 #
1761 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1762 #
1763 # Since: 0.14.0
1764 ##
1765 { 'struct': 'PciMemoryRegion',
1766 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1767 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1768
1769 ##
1770 # @PciBusInfo:
1771 #
1772 # Information about a bus of a PCI Bridge device
1773 #
1774 # @number: primary bus interface number. This should be the number of the
1775 # bus the device resides on.
1776 #
1777 # @secondary: secondary bus interface number. This is the number of the
1778 # main bus for the bridge
1779 #
1780 # @subordinate: This is the highest number bus that resides below the
1781 # bridge.
1782 #
1783 # @io_range: The PIO range for all devices on this bridge
1784 #
1785 # @memory_range: The MMIO range for all devices on this bridge
1786 #
1787 # @prefetchable_range: The range of prefetchable MMIO for all devices on
1788 # this bridge
1789 #
1790 # Since: 2.4
1791 ##
1792 { 'struct': 'PciBusInfo',
1793 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1794 'io_range': 'PciMemoryRange',
1795 'memory_range': 'PciMemoryRange',
1796 'prefetchable_range': 'PciMemoryRange' } }
1797
1798 ##
1799 # @PciBridgeInfo:
1800 #
1801 # Information about a PCI Bridge device
1802 #
1803 # @bus: information about the bus the device resides on
1804 #
1805 # @devices: a list of @PciDeviceInfo for each device on this bridge
1806 #
1807 # Since: 0.14.0
1808 ##
1809 { 'struct': 'PciBridgeInfo',
1810 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
1811
1812 ##
1813 # @PciDeviceClass:
1814 #
1815 # Information about the Class of a PCI device
1816 #
1817 # @desc: #optional a string description of the device's class
1818 #
1819 # @class: the class code of the device
1820 #
1821 # Since: 2.4
1822 ##
1823 { 'struct': 'PciDeviceClass',
1824 'data': {'*desc': 'str', 'class': 'int'} }
1825
1826 ##
1827 # @PciDeviceId:
1828 #
1829 # Information about the Id of a PCI device
1830 #
1831 # @device: the PCI device id
1832 #
1833 # @vendor: the PCI vendor id
1834 #
1835 # Since: 2.4
1836 ##
1837 { 'struct': 'PciDeviceId',
1838 'data': {'device': 'int', 'vendor': 'int'} }
1839
1840 ##
1841 # @PciDeviceInfo:
1842 #
1843 # Information about a PCI device
1844 #
1845 # @bus: the bus number of the device
1846 #
1847 # @slot: the slot the device is located in
1848 #
1849 # @function: the function of the slot used by the device
1850 #
1851 # @class_info: the class of the device
1852 #
1853 # @id: the PCI device id
1854 #
1855 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1856 #
1857 # @qdev_id: the device name of the PCI device
1858 #
1859 # @pci_bridge: if the device is a PCI bridge, the bridge information
1860 #
1861 # @regions: a list of the PCI I/O regions associated with the device
1862 #
1863 # Notes: the contents of @class_info.desc are not stable and should only be
1864 # treated as informational.
1865 #
1866 # Since: 0.14.0
1867 ##
1868 { 'struct': 'PciDeviceInfo',
1869 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1870 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
1871 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1872 'regions': ['PciMemoryRegion']} }
1873
1874 ##
1875 # @PciInfo:
1876 #
1877 # Information about a PCI bus
1878 #
1879 # @bus: the bus index
1880 #
1881 # @devices: a list of devices on this bus
1882 #
1883 # Since: 0.14.0
1884 ##
1885 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1886
1887 ##
1888 # @query-pci:
1889 #
1890 # Return information about the PCI bus topology of the guest.
1891 #
1892 # Returns: a list of @PciInfo for each PCI bus
1893 #
1894 # Since: 0.14.0
1895 ##
1896 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1897
1898 ##
1899 # @quit:
1900 #
1901 # This command will cause the QEMU process to exit gracefully. While every
1902 # attempt is made to send the QMP response before terminating, this is not
1903 # guaranteed. When using this interface, a premature EOF would not be
1904 # unexpected.
1905 #
1906 # Since: 0.14.0
1907 ##
1908 { 'command': 'quit' }
1909
1910 ##
1911 # @stop:
1912 #
1913 # Stop all guest VCPU execution.
1914 #
1915 # Since: 0.14.0
1916 #
1917 # Notes: This function will succeed even if the guest is already in the stopped
1918 # state. In "inmigrate" state, it will ensure that the guest
1919 # remains paused once migration finishes, as if the -S option was
1920 # passed on the command line.
1921 ##
1922 { 'command': 'stop' }
1923
1924 ##
1925 # @system_reset:
1926 #
1927 # Performs a hard reset of a guest.
1928 #
1929 # Since: 0.14.0
1930 ##
1931 { 'command': 'system_reset' }
1932
1933 ##
1934 # @system_powerdown:
1935 #
1936 # Requests that a guest perform a powerdown operation.
1937 #
1938 # Since: 0.14.0
1939 #
1940 # Notes: A guest may or may not respond to this command. This command
1941 # returning does not indicate that a guest has accepted the request or
1942 # that it has shut down. Many guests will respond to this command by
1943 # prompting the user in some way.
1944 ##
1945 { 'command': 'system_powerdown' }
1946
1947 ##
1948 # @cpu:
1949 #
1950 # This command is a nop that is only provided for the purposes of compatibility.
1951 #
1952 # Since: 0.14.0
1953 #
1954 # Notes: Do not use this command.
1955 ##
1956 { 'command': 'cpu', 'data': {'index': 'int'} }
1957
1958 ##
1959 # @cpu-add:
1960 #
1961 # Adds CPU with specified ID
1962 #
1963 # @id: ID of CPU to be created, valid values [0..max_cpus)
1964 #
1965 # Returns: Nothing on success
1966 #
1967 # Since: 1.5
1968 ##
1969 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1970
1971 ##
1972 # @memsave:
1973 #
1974 # Save a portion of guest memory to a file.
1975 #
1976 # @val: the virtual address of the guest to start from
1977 #
1978 # @size: the size of memory region to save
1979 #
1980 # @filename: the file to save the memory to as binary data
1981 #
1982 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1983 # virtual address (defaults to CPU 0)
1984 #
1985 # Returns: Nothing on success
1986 #
1987 # Since: 0.14.0
1988 #
1989 # Notes: Errors were not reliably returned until 1.1
1990 ##
1991 { 'command': 'memsave',
1992 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1993
1994 ##
1995 # @pmemsave:
1996 #
1997 # Save a portion of guest physical memory to a file.
1998 #
1999 # @val: the physical address of the guest to start from
2000 #
2001 # @size: the size of memory region to save
2002 #
2003 # @filename: the file to save the memory to as binary data
2004 #
2005 # Returns: Nothing on success
2006 #
2007 # Since: 0.14.0
2008 #
2009 # Notes: Errors were not reliably returned until 1.1
2010 ##
2011 { 'command': 'pmemsave',
2012 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
2013
2014 ##
2015 # @cont:
2016 #
2017 # Resume guest VCPU execution.
2018 #
2019 # Since: 0.14.0
2020 #
2021 # Returns: If successful, nothing
2022 # If QEMU was started with an encrypted block device and a key has
2023 # not yet been set, DeviceEncrypted.
2024 #
2025 # Notes: This command will succeed if the guest is currently running. It
2026 # will also succeed if the guest is in the "inmigrate" state; in
2027 # this case, the effect of the command is to make sure the guest
2028 # starts once migration finishes, removing the effect of the -S
2029 # command line option if it was passed.
2030 ##
2031 { 'command': 'cont' }
2032
2033 ##
2034 # @system_wakeup:
2035 #
2036 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
2037 #
2038 # Since: 1.1
2039 #
2040 # Returns: nothing.
2041 ##
2042 { 'command': 'system_wakeup' }
2043
2044 ##
2045 # @inject-nmi:
2046 #
2047 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
2048 #
2049 # Returns: If successful, nothing
2050 #
2051 # Since: 0.14.0
2052 #
2053 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
2054 ##
2055 { 'command': 'inject-nmi' }
2056
2057 ##
2058 # @set_link:
2059 #
2060 # Sets the link status of a virtual network adapter.
2061 #
2062 # @name: the device name of the virtual network adapter
2063 #
2064 # @up: true to set the link status to be up
2065 #
2066 # Returns: Nothing on success
2067 # If @name is not a valid network device, DeviceNotFound
2068 #
2069 # Since: 0.14.0
2070 #
2071 # Notes: Not all network adapters support setting link status. This command
2072 # will succeed even if the network adapter does not support link status
2073 # notification.
2074 ##
2075 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
2076
2077 ##
2078 # @balloon:
2079 #
2080 # Request the balloon driver to change its balloon size.
2081 #
2082 # @value: the target size of the balloon in bytes
2083 #
2084 # Returns: Nothing on success
2085 # If the balloon driver is enabled but not functional because the KVM
2086 # kernel module cannot support it, KvmMissingCap
2087 # If no balloon device is present, DeviceNotActive
2088 #
2089 # Notes: This command just issues a request to the guest. When it returns,
2090 # the balloon size may not have changed. A guest can change the balloon
2091 # size independent of this command.
2092 #
2093 # Since: 0.14.0
2094 ##
2095 { 'command': 'balloon', 'data': {'value': 'int'} }
2096
2097 ##
2098 # @Abort:
2099 #
2100 # This action can be used to test transaction failure.
2101 #
2102 # Since: 1.6
2103 ##
2104 { 'struct': 'Abort',
2105 'data': { } }
2106
2107 ##
2108 # @ActionCompletionMode:
2109 #
2110 # An enumeration of Transactional completion modes.
2111 #
2112 # @individual: Do not attempt to cancel any other Actions if any Actions fail
2113 # after the Transaction request succeeds. All Actions that
2114 # can complete successfully will do so without waiting on others.
2115 # This is the default.
2116 #
2117 # @grouped: If any Action fails after the Transaction succeeds, cancel all
2118 # Actions. Actions do not complete until all Actions are ready to
2119 # complete. May be rejected by Actions that do not support this
2120 # completion mode.
2121 #
2122 # Since: 2.5
2123 ##
2124 { 'enum': 'ActionCompletionMode',
2125 'data': [ 'individual', 'grouped' ] }
2126
2127 ##
2128 # @TransactionAction:
2129 #
2130 # A discriminated record of operations that can be performed with
2131 # @transaction. Action @type can be:
2132 #
2133 # - @abort: since 1.6
2134 # - @block-dirty-bitmap-add: since 2.5
2135 # - @block-dirty-bitmap-clear: since 2.5
2136 # - @blockdev-backup: since 2.3
2137 # - @blockdev-snapshot: since 2.5
2138 # - @blockdev-snapshot-internal-sync: since 1.7
2139 # - @blockdev-snapshot-sync: since 1.1
2140 # - @drive-backup: since 1.6
2141 #
2142 # Since: 1.1
2143 ##
2144 { 'union': 'TransactionAction',
2145 'data': {
2146 'abort': 'Abort',
2147 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
2148 'block-dirty-bitmap-clear': 'BlockDirtyBitmap',
2149 'blockdev-backup': 'BlockdevBackup',
2150 'blockdev-snapshot': 'BlockdevSnapshot',
2151 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
2152 'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
2153 'drive-backup': 'DriveBackup'
2154 } }
2155
2156 ##
2157 # @TransactionProperties:
2158 #
2159 # Optional arguments to modify the behavior of a Transaction.
2160 #
2161 # @completion-mode: #optional Controls how jobs launched asynchronously by
2162 # Actions will complete or fail as a group.
2163 # See @ActionCompletionMode for details.
2164 #
2165 # Since: 2.5
2166 ##
2167 { 'struct': 'TransactionProperties',
2168 'data': {
2169 '*completion-mode': 'ActionCompletionMode'
2170 }
2171 }
2172
2173 ##
2174 # @transaction:
2175 #
2176 # Executes a number of transactionable QMP commands atomically. If any
2177 # operation fails, then the entire set of actions will be abandoned and the
2178 # appropriate error returned.
2179 #
2180 # @actions: List of @TransactionAction;
2181 # information needed for the respective operations.
2182 #
2183 # @properties: #optional structure of additional options to control the
2184 # execution of the transaction. See @TransactionProperties
2185 # for additional detail.
2186 #
2187 # Returns: nothing on success
2188 # Errors depend on the operations of the transaction
2189 #
2190 # Note: The transaction aborts on the first failure. Therefore, there will be
2191 # information on only one failed operation returned in an error condition, and
2192 # subsequent actions will not have been attempted.
2193 #
2194 # Since: 1.1
2195 ##
2196 { 'command': 'transaction',
2197 'data': { 'actions': [ 'TransactionAction' ],
2198 '*properties': 'TransactionProperties'
2199 }
2200 }
2201
2202 ##
2203 # @human-monitor-command:
2204 #
2205 # Execute a command on the human monitor and return the output.
2206 #
2207 # @command-line: the command to execute in the human monitor
2208 #
2209 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
2210 #
2211 # Returns: the output of the command as a string
2212 #
2213 # Since: 0.14.0
2214 #
2215 # Notes: This command only exists as a stop-gap. Its use is highly
2216 # discouraged. The semantics of this command are not guaranteed.
2217 #
2218 # Known limitations:
2219 #
2220 # * This command is stateless, this means that commands that depend
2221 # on state information (such as getfd) might not work
2222 #
2223 # * Commands that prompt the user for data (eg. 'cont' when the block
2224 # device is encrypted) don't currently work
2225 ##
2226 { 'command': 'human-monitor-command',
2227 'data': {'command-line': 'str', '*cpu-index': 'int'},
2228 'returns': 'str' }
2229
2230 ##
2231 # @migrate_cancel:
2232 #
2233 # Cancel the current executing migration process.
2234 #
2235 # Returns: nothing on success
2236 #
2237 # Notes: This command succeeds even if there is no migration process running.
2238 #
2239 # Since: 0.14.0
2240 ##
2241 { 'command': 'migrate_cancel' }
2242
2243 ##
2244 # @migrate_set_downtime:
2245 #
2246 # Set maximum tolerated downtime for migration.
2247 #
2248 # @value: maximum downtime in seconds
2249 #
2250 # Returns: nothing on success
2251 #
2252 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2253 #
2254 # Since: 0.14.0
2255 ##
2256 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
2257
2258 ##
2259 # @migrate_set_speed:
2260 #
2261 # Set maximum speed for migration.
2262 #
2263 # @value: maximum speed in bytes.
2264 #
2265 # Returns: nothing on success
2266 #
2267 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2268 #
2269 # Since: 0.14.0
2270 ##
2271 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
2272
2273 ##
2274 # @migrate-set-cache-size:
2275 #
2276 # Set XBZRLE cache size
2277 #
2278 # @value: cache size in bytes
2279 #
2280 # The size will be rounded down to the nearest power of 2.
2281 # The cache size can be modified before and during ongoing migration
2282 #
2283 # Returns: nothing on success
2284 #
2285 # Since: 1.2
2286 ##
2287 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
2288
2289 ##
2290 # @query-migrate-cache-size:
2291 #
2292 # query XBZRLE cache size
2293 #
2294 # Returns: XBZRLE cache size in bytes
2295 #
2296 # Since: 1.2
2297 ##
2298 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
2299
2300 ##
2301 # @ObjectPropertyInfo:
2302 #
2303 # @name: the name of the property
2304 #
2305 # @type: the type of the property. This will typically come in one of four
2306 # forms:
2307 #
2308 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
2309 # These types are mapped to the appropriate JSON type.
2310 #
2311 # 2) A child type in the form 'child<subtype>' where subtype is a qdev
2312 # device type name. Child properties create the composition tree.
2313 #
2314 # 3) A link type in the form 'link<subtype>' where subtype is a qdev
2315 # device type name. Link properties form the device model graph.
2316 #
2317 # Since: 1.2
2318 ##
2319 { 'struct': 'ObjectPropertyInfo',
2320 'data': { 'name': 'str', 'type': 'str' } }
2321
2322 ##
2323 # @qom-list:
2324 #
2325 # This command will list any properties of a object given a path in the object
2326 # model.
2327 #
2328 # @path: the path within the object model. See @qom-get for a description of
2329 # this parameter.
2330 #
2331 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
2332 # object.
2333 #
2334 # Since: 1.2
2335 ##
2336 { 'command': 'qom-list',
2337 'data': { 'path': 'str' },
2338 'returns': [ 'ObjectPropertyInfo' ] }
2339
2340 ##
2341 # @qom-get:
2342 #
2343 # This command will get a property from a object model path and return the
2344 # value.
2345 #
2346 # @path: The path within the object model. There are two forms of supported
2347 # paths--absolute and partial paths.
2348 #
2349 # Absolute paths are derived from the root object and can follow child<>
2350 # or link<> properties. Since they can follow link<> properties, they
2351 # can be arbitrarily long. Absolute paths look like absolute filenames
2352 # and are prefixed with a leading slash.
2353 #
2354 # Partial paths look like relative filenames. They do not begin
2355 # with a prefix. The matching rules for partial paths are subtle but
2356 # designed to make specifying objects easy. At each level of the
2357 # composition tree, the partial path is matched as an absolute path.
2358 # The first match is not returned. At least two matches are searched
2359 # for. A successful result is only returned if only one match is
2360 # found. If more than one match is found, a flag is return to
2361 # indicate that the match was ambiguous.
2362 #
2363 # @property: The property name to read
2364 #
2365 # Returns: The property value. The type depends on the property
2366 # type. child<> and link<> properties are returned as #str
2367 # pathnames. All integer property types (u8, u16, etc) are
2368 # returned as #int.
2369 #
2370 # Since: 1.2
2371 ##
2372 { 'command': 'qom-get',
2373 'data': { 'path': 'str', 'property': 'str' },
2374 'returns': 'any' }
2375
2376 ##
2377 # @qom-set:
2378 #
2379 # This command will set a property from a object model path.
2380 #
2381 # @path: see @qom-get for a description of this parameter
2382 #
2383 # @property: the property name to set
2384 #
2385 # @value: a value who's type is appropriate for the property type. See @qom-get
2386 # for a description of type mapping.
2387 #
2388 # Since: 1.2
2389 ##
2390 { 'command': 'qom-set',
2391 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
2392
2393 ##
2394 # @set_password:
2395 #
2396 # Sets the password of a remote display session.
2397 #
2398 # @protocol: `vnc' to modify the VNC server password
2399 # `spice' to modify the Spice server password
2400 #
2401 # @password: the new password
2402 #
2403 # @connected: #optional how to handle existing clients when changing the
2404 # password. If nothing is specified, defaults to `keep'
2405 # `fail' to fail the command if clients are connected
2406 # `disconnect' to disconnect existing clients
2407 # `keep' to maintain existing clients
2408 #
2409 # Returns: Nothing on success
2410 # If Spice is not enabled, DeviceNotFound
2411 #
2412 # Since: 0.14.0
2413 ##
2414 { 'command': 'set_password',
2415 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2416
2417 ##
2418 # @expire_password:
2419 #
2420 # Expire the password of a remote display server.
2421 #
2422 # @protocol: the name of the remote display protocol `vnc' or `spice'
2423 #
2424 # @time: when to expire the password.
2425 # `now' to expire the password immediately
2426 # `never' to cancel password expiration
2427 # `+INT' where INT is the number of seconds from now (integer)
2428 # `INT' where INT is the absolute time in seconds
2429 #
2430 # Returns: Nothing on success
2431 # If @protocol is `spice' and Spice is not active, DeviceNotFound
2432 #
2433 # Since: 0.14.0
2434 #
2435 # Notes: Time is relative to the server and currently there is no way to
2436 # coordinate server time with client time. It is not recommended to
2437 # use the absolute time version of the @time parameter unless you're
2438 # sure you are on the same machine as the QEMU instance.
2439 ##
2440 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2441
2442 ##
2443 # @change-vnc-password:
2444 #
2445 # Change the VNC server password.
2446 #
2447 # @password: the new password to use with VNC authentication
2448 #
2449 # Since: 1.1
2450 #
2451 # Notes: An empty password in this command will set the password to the empty
2452 # string. Existing clients are unaffected by executing this command.
2453 ##
2454 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2455
2456 ##
2457 # @change:
2458 #
2459 # This command is multiple commands multiplexed together.
2460 #
2461 # @device: This is normally the name of a block device but it may also be 'vnc'.
2462 # when it's 'vnc', then sub command depends on @target
2463 #
2464 # @target: If @device is a block device, then this is the new filename.
2465 # If @device is 'vnc', then if the value 'password' selects the vnc
2466 # change password command. Otherwise, this specifies a new server URI
2467 # address to listen to for VNC connections.
2468 #
2469 # @arg: If @device is a block device, then this is an optional format to open
2470 # the device with.
2471 # If @device is 'vnc' and @target is 'password', this is the new VNC
2472 # password to set. If this argument is an empty string, then no future
2473 # logins will be allowed.
2474 #
2475 # Returns: Nothing on success.
2476 # If @device is not a valid block device, DeviceNotFound
2477 # If the new block device is encrypted, DeviceEncrypted. Note that
2478 # if this error is returned, the device has been opened successfully
2479 # and an additional call to @block_passwd is required to set the
2480 # device's password. The behavior of reads and writes to the block
2481 # device between when these calls are executed is undefined.
2482 #
2483 # Notes: This interface is deprecated, and it is strongly recommended that you
2484 # avoid using it. For changing block devices, use
2485 # blockdev-change-medium; for changing VNC parameters, use
2486 # change-vnc-password.
2487 #
2488 # Since: 0.14.0
2489 ##
2490 { 'command': 'change',
2491 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2492
2493 ##
2494 # @ObjectTypeInfo:
2495 #
2496 # This structure describes a search result from @qom-list-types
2497 #
2498 # @name: the type name found in the search
2499 #
2500 # Since: 1.1
2501 #
2502 # Notes: This command is experimental and may change syntax in future releases.
2503 ##
2504 { 'struct': 'ObjectTypeInfo',
2505 'data': { 'name': 'str' } }
2506
2507 ##
2508 # @qom-list-types:
2509 #
2510 # This command will return a list of types given search parameters
2511 #
2512 # @implements: if specified, only return types that implement this type name
2513 #
2514 # @abstract: if true, include abstract types in the results
2515 #
2516 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2517 #
2518 # Since: 1.1
2519 ##
2520 { 'command': 'qom-list-types',
2521 'data': { '*implements': 'str', '*abstract': 'bool' },
2522 'returns': [ 'ObjectTypeInfo' ] }
2523
2524 ##
2525 # @DevicePropertyInfo:
2526 #
2527 # Information about device properties.
2528 #
2529 # @name: the name of the property
2530 # @type: the typename of the property
2531 # @description: #optional if specified, the description of the property.
2532 # (since 2.2)
2533 #
2534 # Since: 1.2
2535 ##
2536 { 'struct': 'DevicePropertyInfo',
2537 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
2538
2539 ##
2540 # @device-list-properties:
2541 #
2542 # List properties associated with a device.
2543 #
2544 # @typename: the type name of a device
2545 #
2546 # Returns: a list of DevicePropertyInfo describing a devices properties
2547 #
2548 # Since: 1.2
2549 ##
2550 { 'command': 'device-list-properties',
2551 'data': { 'typename': 'str'},
2552 'returns': [ 'DevicePropertyInfo' ] }
2553
2554 ##
2555 # @migrate:
2556 #
2557 # Migrates the current running guest to another Virtual Machine.
2558 #
2559 # @uri: the Uniform Resource Identifier of the destination VM
2560 #
2561 # @blk: #optional do block migration (full disk copy)
2562 #
2563 # @inc: #optional incremental disk copy migration
2564 #
2565 # @detach: this argument exists only for compatibility reasons and
2566 # is ignored by QEMU
2567 #
2568 # Returns: nothing on success
2569 #
2570 # Since: 0.14.0
2571 ##
2572 { 'command': 'migrate',
2573 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2574
2575 ##
2576 # @migrate-incoming:
2577 #
2578 # Start an incoming migration, the qemu must have been started
2579 # with -incoming defer
2580 #
2581 # @uri: The Uniform Resource Identifier identifying the source or
2582 # address to listen on
2583 #
2584 # Returns: nothing on success
2585 #
2586 # Since: 2.3
2587 # Note: It's a bad idea to use a string for the uri, but it needs to stay
2588 # compatible with -incoming and the format of the uri is already exposed
2589 # above libvirt
2590 ##
2591 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
2592
2593 ##
2594 # @xen-save-devices-state:
2595 #
2596 # Save the state of all devices to file. The RAM and the block devices
2597 # of the VM are not saved by this command.
2598 #
2599 # @filename: the file to save the state of the devices to as binary
2600 # data. See xen-save-devices-state.txt for a description of the binary
2601 # format.
2602 #
2603 # Returns: Nothing on success
2604 #
2605 # Since: 1.1
2606 ##
2607 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2608
2609 ##
2610 # @xen-set-global-dirty-log:
2611 #
2612 # Enable or disable the global dirty log mode.
2613 #
2614 # @enable: true to enable, false to disable.
2615 #
2616 # Returns: nothing
2617 #
2618 # Since: 1.3
2619 ##
2620 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2621
2622 ##
2623 # @device_add:
2624 #
2625 # @driver: the name of the new device's driver
2626 #
2627 # @bus: #optional the device's parent bus (device tree path)
2628 #
2629 # @id: #optional the device's ID, must be unique
2630 #
2631 # Additional arguments depend on the type.
2632 #
2633 # Add a device.
2634 #
2635 # Notes:
2636 # 1. For detailed information about this command, please refer to the
2637 # 'docs/qdev-device-use.txt' file.
2638 #
2639 # 2. It's possible to list device properties by running QEMU with the
2640 # "-device DEVICE,help" command-line argument, where DEVICE is the
2641 # device's name
2642 #
2643 # Example:
2644 #
2645 # -> { "execute": "device_add",
2646 # "arguments": { "driver": "e1000", "id": "net1",
2647 # "bus": "pci.0",
2648 # "mac": "52:54:00:12:34:56" } }
2649 # <- { "return": {} }
2650 #
2651 # TODO: This command effectively bypasses QAPI completely due to its
2652 # "additional arguments" business. It shouldn't have been added to
2653 # the schema in this form. It should be qapified properly, or
2654 # replaced by a properly qapified command.
2655 #
2656 # Since: 0.13
2657 ##
2658 { 'command': 'device_add',
2659 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'},
2660 'gen': false } # so we can get the additional arguments
2661
2662 ##
2663 # @device_del:
2664 #
2665 # Remove a device from a guest
2666 #
2667 # @id: the name or QOM path of the device
2668 #
2669 # Returns: Nothing on success
2670 # If @id is not a valid device, DeviceNotFound
2671 #
2672 # Notes: When this command completes, the device may not be removed from the
2673 # guest. Hot removal is an operation that requires guest cooperation.
2674 # This command merely requests that the guest begin the hot removal
2675 # process. Completion of the device removal process is signaled with a
2676 # DEVICE_DELETED event. Guest reset will automatically complete removal
2677 # for all devices.
2678 #
2679 # Since: 0.14.0
2680 ##
2681 { 'command': 'device_del', 'data': {'id': 'str'} }
2682
2683 ##
2684 # @DumpGuestMemoryFormat:
2685 #
2686 # An enumeration of guest-memory-dump's format.
2687 #
2688 # @elf: elf format
2689 #
2690 # @kdump-zlib: kdump-compressed format with zlib-compressed
2691 #
2692 # @kdump-lzo: kdump-compressed format with lzo-compressed
2693 #
2694 # @kdump-snappy: kdump-compressed format with snappy-compressed
2695 #
2696 # Since: 2.0
2697 ##
2698 { 'enum': 'DumpGuestMemoryFormat',
2699 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
2700
2701 ##
2702 # @dump-guest-memory:
2703 #
2704 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2705 # very long depending on the amount of guest memory.
2706 #
2707 # @paging: if true, do paging to get guest's memory mapping. This allows
2708 # using gdb to process the core file.
2709 #
2710 # IMPORTANT: this option can make QEMU allocate several gigabytes
2711 # of RAM. This can happen for a large guest, or a
2712 # malicious guest pretending to be large.
2713 #
2714 # Also, paging=true has the following limitations:
2715 #
2716 # 1. The guest may be in a catastrophic state or can have corrupted
2717 # memory, which cannot be trusted
2718 # 2. The guest can be in real-mode even if paging is enabled. For
2719 # example, the guest uses ACPI to sleep, and ACPI sleep state
2720 # goes in real-mode
2721 # 3. Currently only supported on i386 and x86_64.
2722 #
2723 # @protocol: the filename or file descriptor of the vmcore. The supported
2724 # protocols are:
2725 #
2726 # 1. file: the protocol starts with "file:", and the following
2727 # string is the file's path.
2728 # 2. fd: the protocol starts with "fd:", and the following string
2729 # is the fd's name.
2730 #
2731 # @detach: #optional if true, QMP will return immediately rather than
2732 # waiting for the dump to finish. The user can track progress
2733 # using "query-dump". (since 2.6).
2734 #
2735 # @begin: #optional if specified, the starting physical address.
2736 #
2737 # @length: #optional if specified, the memory size, in bytes. If you don't
2738 # want to dump all guest's memory, please specify the start @begin
2739 # and @length
2740 #
2741 # @format: #optional if specified, the format of guest memory dump. But non-elf
2742 # format is conflict with paging and filter, ie. @paging, @begin and
2743 # @length is not allowed to be specified with non-elf @format at the
2744 # same time (since 2.0)
2745 #
2746 # Returns: nothing on success
2747 #
2748 # Since: 1.2
2749 ##
2750 { 'command': 'dump-guest-memory',
2751 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
2752 '*begin': 'int', '*length': 'int',
2753 '*format': 'DumpGuestMemoryFormat'} }
2754
2755 ##
2756 # @DumpStatus:
2757 #
2758 # Describe the status of a long-running background guest memory dump.
2759 #
2760 # @none: no dump-guest-memory has started yet.
2761 #
2762 # @active: there is one dump running in background.
2763 #
2764 # @completed: the last dump has finished successfully.
2765 #
2766 # @failed: the last dump has failed.
2767 #
2768 # Since: 2.6
2769 ##
2770 { 'enum': 'DumpStatus',
2771 'data': [ 'none', 'active', 'completed', 'failed' ] }
2772
2773 ##
2774 # @DumpQueryResult:
2775 #
2776 # The result format for 'query-dump'.
2777 #
2778 # @status: enum of @DumpStatus, which shows current dump status
2779 #
2780 # @completed: bytes written in latest dump (uncompressed)
2781 #
2782 # @total: total bytes to be written in latest dump (uncompressed)
2783 #
2784 # Since: 2.6
2785 ##
2786 { 'struct': 'DumpQueryResult',
2787 'data': { 'status': 'DumpStatus',
2788 'completed': 'int',
2789 'total': 'int' } }
2790
2791 ##
2792 # @query-dump:
2793 #
2794 # Query latest dump status.
2795 #
2796 # Returns: A @DumpStatus object showing the dump status.
2797 #
2798 # Since: 2.6
2799 ##
2800 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
2801
2802 ##
2803 # @DumpGuestMemoryCapability:
2804 #
2805 # A list of the available formats for dump-guest-memory
2806 #
2807 # Since: 2.0
2808 ##
2809 { 'struct': 'DumpGuestMemoryCapability',
2810 'data': {
2811 'formats': ['DumpGuestMemoryFormat'] } }
2812
2813 ##
2814 # @query-dump-guest-memory-capability:
2815 #
2816 # Returns the available formats for dump-guest-memory
2817 #
2818 # Returns: A @DumpGuestMemoryCapability object listing available formats for
2819 # dump-guest-memory
2820 #
2821 # Since: 2.0
2822 ##
2823 { 'command': 'query-dump-guest-memory-capability',
2824 'returns': 'DumpGuestMemoryCapability' }
2825
2826 ##
2827 # @dump-skeys:
2828 #
2829 # Dump guest's storage keys
2830 #
2831 # @filename: the path to the file to dump to
2832 #
2833 # This command is only supported on s390 architecture.
2834 #
2835 # Since: 2.5
2836 ##
2837 { 'command': 'dump-skeys',
2838 'data': { 'filename': 'str' } }
2839
2840 ##
2841 # @netdev_add:
2842 #
2843 # Add a network backend.
2844 #
2845 # @type: the type of network backend. Current valid values are 'user', 'tap',
2846 # 'vde', 'socket', 'dump' and 'bridge'
2847 #
2848 # @id: the name of the new network backend
2849 #
2850 # Additional arguments depend on the type.
2851 #
2852 # TODO: This command effectively bypasses QAPI completely due to its
2853 # "additional arguments" business. It shouldn't have been added to
2854 # the schema in this form. It should be qapified properly, or
2855 # replaced by a properly qapified command.
2856 #
2857 # Since: 0.14.0
2858 #
2859 # Returns: Nothing on success
2860 # If @type is not a valid network backend, DeviceNotFound
2861 ##
2862 { 'command': 'netdev_add',
2863 'data': {'type': 'str', 'id': 'str'},
2864 'gen': false } # so we can get the additional arguments
2865
2866 ##
2867 # @netdev_del:
2868 #
2869 # Remove a network backend.
2870 #
2871 # @id: the name of the network backend to remove
2872 #
2873 # Returns: Nothing on success
2874 # If @id is not a valid network backend, DeviceNotFound
2875 #
2876 # Since: 0.14.0
2877 ##
2878 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2879
2880 ##
2881 # @object-add:
2882 #
2883 # Create a QOM object.
2884 #
2885 # @qom-type: the class name for the object to be created
2886 #
2887 # @id: the name of the new object
2888 #
2889 # @props: #optional a dictionary of properties to be passed to the backend
2890 #
2891 # Returns: Nothing on success
2892 # Error if @qom-type is not a valid class name
2893 #
2894 # Since: 2.0
2895 ##
2896 { 'command': 'object-add',
2897 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
2898
2899 ##
2900 # @object-del:
2901 #
2902 # Remove a QOM object.
2903 #
2904 # @id: the name of the QOM object to remove
2905 #
2906 # Returns: Nothing on success
2907 # Error if @id is not a valid id for a QOM object
2908 #
2909 # Since: 2.0
2910 ##
2911 { 'command': 'object-del', 'data': {'id': 'str'} }
2912
2913 ##
2914 # @NetdevNoneOptions:
2915 #
2916 # Use it alone to have zero network devices.
2917 #
2918 # Since: 1.2
2919 ##
2920 { 'struct': 'NetdevNoneOptions',
2921 'data': { } }
2922
2923 ##
2924 # @NetLegacyNicOptions:
2925 #
2926 # Create a new Network Interface Card.
2927 #
2928 # @netdev: #optional id of -netdev to connect to
2929 #
2930 # @macaddr: #optional MAC address
2931 #
2932 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2933 #
2934 # @addr: #optional PCI device address
2935 #
2936 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2937 #
2938 # Since: 1.2
2939 ##
2940 { 'struct': 'NetLegacyNicOptions',
2941 'data': {
2942 '*netdev': 'str',
2943 '*macaddr': 'str',
2944 '*model': 'str',
2945 '*addr': 'str',
2946 '*vectors': 'uint32' } }
2947
2948 ##
2949 # @String:
2950 #
2951 # A fat type wrapping 'str', to be embedded in lists.
2952 #
2953 # Since: 1.2
2954 ##
2955 { 'struct': 'String',
2956 'data': {
2957 'str': 'str' } }
2958
2959 ##
2960 # @NetdevUserOptions:
2961 #
2962 # Use the user mode network stack which requires no administrator privilege to
2963 # run.
2964 #
2965 # @hostname: #optional client hostname reported by the builtin DHCP server
2966 #
2967 # @restrict: #optional isolate the guest from the host
2968 #
2969 # @ipv4: #optional whether to support IPv4, default true for enabled
2970 # (since 2.6)
2971 #
2972 # @ipv6: #optional whether to support IPv6, default true for enabled
2973 # (since 2.6)
2974 #
2975 # @ip: #optional legacy parameter, use net= instead
2976 #
2977 # @net: #optional IP network address that the guest will see, in the
2978 # form addr[/netmask] The netmask is optional, and can be
2979 # either in the form a.b.c.d or as a number of valid top-most
2980 # bits. Default is 10.0.2.0/24.
2981 #
2982 # @host: #optional guest-visible address of the host
2983 #
2984 # @tftp: #optional root directory of the built-in TFTP server
2985 #
2986 # @bootfile: #optional BOOTP filename, for use with tftp=
2987 #
2988 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2989 # assign
2990 #
2991 # @dns: #optional guest-visible address of the virtual nameserver
2992 #
2993 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2994 # to the guest
2995 #
2996 # @ipv6-prefix: #optional IPv6 network prefix (default is fec0::) (since
2997 # 2.6). The network prefix is given in the usual
2998 # hexadecimal IPv6 address notation.
2999 #
3000 # @ipv6-prefixlen: #optional IPv6 network prefix length (default is 64)
3001 # (since 2.6)
3002 #
3003 # @ipv6-host: #optional guest-visible IPv6 address of the host (since 2.6)
3004 #
3005 # @ipv6-dns: #optional guest-visible IPv6 address of the virtual
3006 # nameserver (since 2.6)
3007 #
3008 # @smb: #optional root directory of the built-in SMB server
3009 #
3010 # @smbserver: #optional IP address of the built-in SMB server
3011 #
3012 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
3013 # endpoints
3014 #
3015 # @guestfwd: #optional forward guest TCP connections
3016 #
3017 # Since: 1.2
3018 ##
3019 { 'struct': 'NetdevUserOptions',
3020 'data': {
3021 '*hostname': 'str',
3022 '*restrict': 'bool',
3023 '*ipv4': 'bool',
3024 '*ipv6': 'bool',
3025 '*ip': 'str',
3026 '*net': 'str',
3027 '*host': 'str',
3028 '*tftp': 'str',
3029 '*bootfile': 'str',
3030 '*dhcpstart': 'str',
3031 '*dns': 'str',
3032 '*dnssearch': ['String'],
3033 '*ipv6-prefix': 'str',
3034 '*ipv6-prefixlen': 'int',
3035 '*ipv6-host': 'str',
3036 '*ipv6-dns': 'str',
3037 '*smb': 'str',
3038 '*smbserver': 'str',
3039 '*hostfwd': ['String'],
3040 '*guestfwd': ['String'] } }
3041
3042 ##
3043 # @NetdevTapOptions:
3044 #
3045 # Connect the host TAP network interface name to the VLAN.
3046 #
3047 # @ifname: #optional interface name
3048 #
3049 # @fd: #optional file descriptor of an already opened tap
3050 #
3051 # @fds: #optional multiple file descriptors of already opened multiqueue capable
3052 # tap
3053 #
3054 # @script: #optional script to initialize the interface
3055 #
3056 # @downscript: #optional script to shut down the interface
3057 #
3058 # @br: #optional bridge name (since 2.8)
3059 #
3060 # @helper: #optional command to execute to configure bridge
3061 #
3062 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
3063 #
3064 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
3065 #
3066 # @vhost: #optional enable vhost-net network accelerator
3067 #
3068 # @vhostfd: #optional file descriptor of an already opened vhost net device
3069 #
3070 # @vhostfds: #optional file descriptors of multiple already opened vhost net
3071 # devices
3072 #
3073 # @vhostforce: #optional vhost on for non-MSIX virtio guests
3074 #
3075 # @queues: #optional number of queues to be created for multiqueue capable tap
3076 #
3077 # @poll-us: #optional maximum number of microseconds that could
3078 # be spent on busy polling for tap (since 2.7)
3079 #
3080 # Since: 1.2
3081 ##
3082 { 'struct': 'NetdevTapOptions',
3083 'data': {
3084 '*ifname': 'str',
3085 '*fd': 'str',
3086 '*fds': 'str',
3087 '*script': 'str',
3088 '*downscript': 'str',
3089 '*br': 'str',
3090 '*helper': 'str',
3091 '*sndbuf': 'size',
3092 '*vnet_hdr': 'bool',
3093 '*vhost': 'bool',
3094 '*vhostfd': 'str',
3095 '*vhostfds': 'str',
3096 '*vhostforce': 'bool',
3097 '*queues': 'uint32',
3098 '*poll-us': 'uint32'} }
3099
3100 ##
3101 # @NetdevSocketOptions:
3102 #
3103 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
3104 # socket connection.
3105 #
3106 # @fd: #optional file descriptor of an already opened socket
3107 #
3108 # @listen: #optional port number, and optional hostname, to listen on
3109 #
3110 # @connect: #optional port number, and optional hostname, to connect to
3111 #
3112 # @mcast: #optional UDP multicast address and port number
3113 #
3114 # @localaddr: #optional source address and port for multicast and udp packets
3115 #
3116 # @udp: #optional UDP unicast address and port number
3117 #
3118 # Since: 1.2
3119 ##
3120 { 'struct': 'NetdevSocketOptions',
3121 'data': {
3122 '*fd': 'str',
3123 '*listen': 'str',
3124 '*connect': 'str',
3125 '*mcast': 'str',
3126 '*localaddr': 'str',
3127 '*udp': 'str' } }
3128
3129 ##
3130 # @NetdevL2TPv3Options:
3131 #
3132 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
3133 #
3134 # @src: source address
3135 #
3136 # @dst: destination address
3137 #
3138 # @srcport: #optional source port - mandatory for udp, optional for ip
3139 #
3140 # @dstport: #optional destination port - mandatory for udp, optional for ip
3141 #
3142 # @ipv6: #optional - force the use of ipv6
3143 #
3144 # @udp: #optional - use the udp version of l2tpv3 encapsulation
3145 #
3146 # @cookie64: #optional - use 64 bit coookies
3147 #
3148 # @counter: #optional have sequence counter
3149 #
3150 # @pincounter: #optional pin sequence counter to zero -
3151 # workaround for buggy implementations or
3152 # networks with packet reorder
3153 #
3154 # @txcookie: #optional 32 or 64 bit transmit cookie
3155 #
3156 # @rxcookie: #optional 32 or 64 bit receive cookie
3157 #
3158 # @txsession: 32 bit transmit session
3159 #
3160 # @rxsession: #optional 32 bit receive session - if not specified
3161 # set to the same value as transmit
3162 #
3163 # @offset: #optional additional offset - allows the insertion of
3164 # additional application-specific data before the packet payload
3165 #
3166 # Since: 2.1
3167 ##
3168 { 'struct': 'NetdevL2TPv3Options',
3169 'data': {
3170 'src': 'str',
3171 'dst': 'str',
3172 '*srcport': 'str',
3173 '*dstport': 'str',
3174 '*ipv6': 'bool',
3175 '*udp': 'bool',
3176 '*cookie64': 'bool',
3177 '*counter': 'bool',
3178 '*pincounter': 'bool',
3179 '*txcookie': 'uint64',
3180 '*rxcookie': 'uint64',
3181 'txsession': 'uint32',
3182 '*rxsession': 'uint32',
3183 '*offset': 'uint32' } }
3184
3185 ##
3186 # @NetdevVdeOptions:
3187 #
3188 # Connect the VLAN to a vde switch running on the host.
3189 #
3190 # @sock: #optional socket path
3191 #
3192 # @port: #optional port number
3193 #
3194 # @group: #optional group owner of socket
3195 #
3196 # @mode: #optional permissions for socket
3197 #
3198 # Since: 1.2
3199 ##
3200 { 'struct': 'NetdevVdeOptions',
3201 'data': {
3202 '*sock': 'str',
3203 '*port': 'uint16',
3204 '*group': 'str',
3205 '*mode': 'uint16' } }
3206
3207 ##
3208 # @NetdevDumpOptions:
3209 #
3210 # Dump VLAN network traffic to a file.
3211 #
3212 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
3213 # suffixes.
3214 #
3215 # @file: #optional dump file path (default is qemu-vlan0.pcap)
3216 #
3217 # Since: 1.2
3218 ##
3219 { 'struct': 'NetdevDumpOptions',
3220 'data': {
3221 '*len': 'size',
3222 '*file': 'str' } }
3223
3224 ##
3225 # @NetdevBridgeOptions:
3226 #
3227 # Connect a host TAP network interface to a host bridge device.
3228 #
3229 # @br: #optional bridge name
3230 #
3231 # @helper: #optional command to execute to configure bridge
3232 #
3233 # Since: 1.2
3234 ##
3235 { 'struct': 'NetdevBridgeOptions',
3236 'data': {
3237 '*br': 'str',
3238 '*helper': 'str' } }
3239
3240 ##
3241 # @NetdevHubPortOptions:
3242 #
3243 # Connect two or more net clients through a software hub.
3244 #
3245 # @hubid: hub identifier number
3246 #
3247 # Since: 1.2
3248 ##
3249 { 'struct': 'NetdevHubPortOptions',
3250 'data': {
3251 'hubid': 'int32' } }
3252
3253 ##
3254 # @NetdevNetmapOptions:
3255 #
3256 # Connect a client to a netmap-enabled NIC or to a VALE switch port
3257 #
3258 # @ifname: Either the name of an existing network interface supported by
3259 # netmap, or the name of a VALE port (created on the fly).
3260 # A VALE port name is in the form 'valeXXX:YYY', where XXX and
3261 # YYY are non-negative integers. XXX identifies a switch and
3262 # YYY identifies a port of the switch. VALE ports having the
3263 # same XXX are therefore connected to the same switch.
3264 #
3265 # @devname: #optional path of the netmap device (default: '/dev/netmap').
3266 #
3267 # Since: 2.0
3268 ##
3269 { 'struct': 'NetdevNetmapOptions',
3270 'data': {
3271 'ifname': 'str',
3272 '*devname': 'str' } }
3273
3274 ##
3275 # @NetdevVhostUserOptions:
3276 #
3277 # Vhost-user network backend
3278 #
3279 # @chardev: name of a unix socket chardev
3280 #
3281 # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
3282 #
3283 # @queues: #optional number of queues to be created for multiqueue vhost-user
3284 # (default: 1) (Since 2.5)
3285 #
3286 # Since: 2.1
3287 ##
3288 { 'struct': 'NetdevVhostUserOptions',
3289 'data': {
3290 'chardev': 'str',
3291 '*vhostforce': 'bool',
3292 '*queues': 'int' } }
3293
3294 ##
3295 # @NetClientDriver:
3296 #
3297 # Available netdev drivers.
3298 #
3299 # Since: 2.7
3300 ##
3301 { 'enum': 'NetClientDriver',
3302 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
3303 'bridge', 'hubport', 'netmap', 'vhost-user' ] }
3304
3305 ##
3306 # @Netdev:
3307 #
3308 # Captures the configuration of a network device.
3309 #
3310 # @id: identifier for monitor commands.
3311 #
3312 # @type: Specify the driver used for interpreting remaining arguments.
3313 #
3314 # Since: 1.2
3315 #
3316 # 'l2tpv3' - since 2.1
3317 ##
3318 { 'union': 'Netdev',
3319 'base': { 'id': 'str', 'type': 'NetClientDriver' },
3320 'discriminator': 'type',
3321 'data': {
3322 'none': 'NetdevNoneOptions',
3323 'nic': 'NetLegacyNicOptions',
3324 'user': 'NetdevUserOptions',
3325 'tap': 'NetdevTapOptions',
3326 'l2tpv3': 'NetdevL2TPv3Options',
3327 'socket': 'NetdevSocketOptions',
3328 'vde': 'NetdevVdeOptions',
3329 'dump': 'NetdevDumpOptions',
3330 'bridge': 'NetdevBridgeOptions',
3331 'hubport': 'NetdevHubPortOptions',
3332 'netmap': 'NetdevNetmapOptions',
3333 'vhost-user': 'NetdevVhostUserOptions' } }
3334
3335 ##
3336 # @NetLegacy:
3337 #
3338 # Captures the configuration of a network device; legacy.
3339 #
3340 # @vlan: #optional vlan number
3341 #
3342 # @id: #optional identifier for monitor commands
3343 #
3344 # @name: #optional identifier for monitor commands, ignored if @id is present
3345 #
3346 # @opts: device type specific properties (legacy)
3347 #
3348 # Since: 1.2
3349 ##
3350 { 'struct': 'NetLegacy',
3351 'data': {
3352 '*vlan': 'int32',
3353 '*id': 'str',
3354 '*name': 'str',
3355 'opts': 'NetLegacyOptions' } }
3356
3357 ##
3358 # @NetLegacyOptions:
3359 #
3360 # Like Netdev, but for use only by the legacy command line options
3361 #
3362 # Since: 1.2
3363 ##
3364 { 'union': 'NetLegacyOptions',
3365 'data': {
3366 'none': 'NetdevNoneOptions',
3367 'nic': 'NetLegacyNicOptions',
3368 'user': 'NetdevUserOptions',
3369 'tap': 'NetdevTapOptions',
3370 'l2tpv3': 'NetdevL2TPv3Options',
3371 'socket': 'NetdevSocketOptions',
3372 'vde': 'NetdevVdeOptions',
3373 'dump': 'NetdevDumpOptions',
3374 'bridge': 'NetdevBridgeOptions',
3375 'netmap': 'NetdevNetmapOptions',
3376 'vhost-user': 'NetdevVhostUserOptions' } }
3377
3378 ##
3379 # @NetFilterDirection:
3380 #
3381 # Indicates whether a netfilter is attached to a netdev's transmit queue or
3382 # receive queue or both.
3383 #
3384 # @all: the filter is attached both to the receive and the transmit
3385 # queue of the netdev (default).
3386 #
3387 # @rx: the filter is attached to the receive queue of the netdev,
3388 # where it will receive packets sent to the netdev.
3389 #
3390 # @tx: the filter is attached to the transmit queue of the netdev,
3391 # where it will receive packets sent by the netdev.
3392 #
3393 # Since: 2.5
3394 ##
3395 { 'enum': 'NetFilterDirection',
3396 'data': [ 'all', 'rx', 'tx' ] }
3397
3398 ##
3399 # @InetSocketAddress:
3400 #
3401 # Captures a socket address or address range in the Internet namespace.
3402 #
3403 # @host: host part of the address
3404 #
3405 # @port: port part of the address, or lowest port if @to is present
3406 #
3407 # @to: highest port to try
3408 #
3409 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
3410 # #optional
3411 #
3412 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
3413 # #optional
3414 #
3415 # Since: 1.3
3416 ##
3417 { 'struct': 'InetSocketAddress',
3418 'data': {
3419 'host': 'str',
3420 'port': 'str',
3421 '*to': 'uint16',
3422 '*ipv4': 'bool',
3423 '*ipv6': 'bool' } }
3424
3425 ##
3426 # @UnixSocketAddress:
3427 #
3428 # Captures a socket address in the local ("Unix socket") namespace.
3429 #
3430 # @path: filesystem path to use
3431 #
3432 # Since: 1.3
3433 ##
3434 { 'struct': 'UnixSocketAddress',
3435 'data': {
3436 'path': 'str' } }
3437
3438 ##
3439 # @VsockSocketAddress:
3440 #
3441 # Captures a socket address in the vsock namespace.
3442 #
3443 # @cid: unique host identifier
3444 # @port: port
3445 #
3446 # Note: string types are used to allow for possible future hostname or
3447 # service resolution support.
3448 #
3449 # Since: 2.8
3450 ##
3451 { 'struct': 'VsockSocketAddress',
3452 'data': {
3453 'cid': 'str',
3454 'port': 'str' } }
3455
3456 ##
3457 # @SocketAddress:
3458 #
3459 # Captures the address of a socket, which could also be a named file descriptor
3460 #
3461 # Since: 1.3
3462 ##
3463 { 'union': 'SocketAddress',
3464 'data': {
3465 'inet': 'InetSocketAddress',
3466 'unix': 'UnixSocketAddress',
3467 'vsock': 'VsockSocketAddress',
3468 'fd': 'String' } }
3469
3470 ##
3471 # @getfd:
3472 #
3473 # Receive a file descriptor via SCM rights and assign it a name
3474 #
3475 # @fdname: file descriptor name
3476 #
3477 # Returns: Nothing on success
3478 #
3479 # Since: 0.14.0
3480 #
3481 # Notes: If @fdname already exists, the file descriptor assigned to
3482 # it will be closed and replaced by the received file
3483 # descriptor.
3484 # The 'closefd' command can be used to explicitly close the
3485 # file descriptor when it is no longer needed.
3486 ##
3487 { 'command': 'getfd', 'data': {'fdname': 'str'} }
3488
3489 ##
3490 # @closefd:
3491 #
3492 # Close a file descriptor previously passed via SCM rights
3493 #
3494 # @fdname: file descriptor name
3495 #
3496 # Returns: Nothing on success
3497 #
3498 # Since: 0.14.0
3499 ##
3500 { 'command': 'closefd', 'data': {'fdname': 'str'} }
3501
3502 ##
3503 # @MachineInfo:
3504 #
3505 # Information describing a machine.
3506 #
3507 # @name: the name of the machine
3508 #
3509 # @alias: #optional an alias for the machine name
3510 #
3511 # @is-default: #optional whether the machine is default
3512 #
3513 # @cpu-max: maximum number of CPUs supported by the machine type
3514 # (since 1.5.0)
3515 #
3516 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
3517 #
3518 # Since: 1.2.0
3519 ##
3520 { 'struct': 'MachineInfo',
3521 'data': { 'name': 'str', '*alias': 'str',
3522 '*is-default': 'bool', 'cpu-max': 'int',
3523 'hotpluggable-cpus': 'bool'} }
3524
3525 ##
3526 # @query-machines:
3527 #
3528 # Return a list of supported machines
3529 #
3530 # Returns: a list of MachineInfo
3531 #
3532 # Since: 1.2.0
3533 ##
3534 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
3535
3536 ##
3537 # @CpuDefinitionInfo:
3538 #
3539 # Virtual CPU definition.
3540 #
3541 # @name: the name of the CPU definition
3542 #
3543 # @migration-safe: #optional whether a CPU definition can be safely used for
3544 # migration in combination with a QEMU compatibility machine
3545 # when migrating between different QMU versions and between
3546 # hosts with different sets of (hardware or software)
3547 # capabilities. If not provided, information is not available
3548 # and callers should not assume the CPU definition to be
3549 # migration-safe. (since 2.8)
3550 #
3551 # @static: whether a CPU definition is static and will not change depending on
3552 # QEMU version, machine type, machine options and accelerator options.
3553 # A static model is always migration-safe. (since 2.8)
3554 #
3555 # @unavailable-features: #optional List of properties that prevent
3556 # the CPU model from running in the current
3557 # host. (since 2.8)
3558 # @typename: Type name that can be used as argument to @device-list-properties,
3559 # to introspect properties configurable using -cpu or -global.
3560 # (since 2.9)
3561 #
3562 # @unavailable-features is a list of QOM property names that
3563 # represent CPU model attributes that prevent the CPU from running.
3564 # If the QOM property is read-only, that means there's no known
3565 # way to make the CPU model run in the current host. Implementations
3566 # that choose not to provide specific information return the
3567 # property name "type".
3568 # If the property is read-write, it means that it MAY be possible
3569 # to run the CPU model in the current host if that property is
3570 # changed. Management software can use it as hints to suggest or
3571 # choose an alternative for the user, or just to generate meaningful
3572 # error messages explaining why the CPU model can't be used.
3573 # If @unavailable-features is an empty list, the CPU model is
3574 # runnable using the current host and machine-type.
3575 # If @unavailable-features is not present, runnability
3576 # information for the CPU is not available.
3577 #
3578 # Since: 1.2.0
3579 ##
3580 { 'struct': 'CpuDefinitionInfo',
3581 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
3582 '*unavailable-features': [ 'str' ], 'typename': 'str' } }
3583
3584 ##
3585 # @query-cpu-definitions:
3586 #
3587 # Return a list of supported virtual CPU definitions
3588 #
3589 # Returns: a list of CpuDefInfo
3590 #
3591 # Since: 1.2.0
3592 ##
3593 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3594
3595 ##
3596 # @CpuModelInfo:
3597 #
3598 # Virtual CPU model.
3599 #
3600 # A CPU model consists of the name of a CPU definition, to which
3601 # delta changes are applied (e.g. features added/removed). Most magic values
3602 # that an architecture might require should be hidden behind the name.
3603 # However, if required, architectures can expose relevant properties.
3604 #
3605 # @name: the name of the CPU definition the model is based on
3606 # @props: #optional a dictionary of QOM properties to be applied
3607 #
3608 # Since: 2.8.0
3609 ##
3610 { 'struct': 'CpuModelInfo',
3611 'data': { 'name': 'str',
3612 '*props': 'any' } }
3613
3614 ##
3615 # @CpuModelExpansionType:
3616 #
3617 # An enumeration of CPU model expansion types.
3618 #
3619 # @static: Expand to a static CPU model, a combination of a static base
3620 # model name and property delta changes. As the static base model will
3621 # never change, the expanded CPU model will be the same, independant of
3622 # independent of QEMU version, machine type, machine options, and
3623 # accelerator options. Therefore, the resulting model can be used by
3624 # tooling without having to specify a compatibility machine - e.g. when
3625 # displaying the "host" model. static CPU models are migration-safe.
3626 #
3627 # @full: Expand all properties. The produced model is not guaranteed to be
3628 # migration-safe, but allows tooling to get an insight and work with
3629 # model details.
3630 #
3631 # Since: 2.8.0
3632 ##
3633 { 'enum': 'CpuModelExpansionType',
3634 'data': [ 'static', 'full' ] }
3635
3636
3637 ##
3638 # @CpuModelExpansionInfo:
3639 #
3640 # The result of a cpu model expansion.
3641 #
3642 # @model: the expanded CpuModelInfo.
3643 #
3644 # Since: 2.8.0
3645 ##
3646 { 'struct': 'CpuModelExpansionInfo',
3647 'data': { 'model': 'CpuModelInfo' } }
3648
3649
3650 ##
3651 # @query-cpu-model-expansion:
3652 #
3653 # Expands a given CPU model (or a combination of CPU model + additional options)
3654 # to different granularities, allowing tooling to get an understanding what a
3655 # specific CPU model looks like in QEMU under a certain configuration.
3656 #
3657 # This interface can be used to query the "host" CPU model.
3658 #
3659 # The data returned by this command may be affected by:
3660 #
3661 # * QEMU version: CPU models may look different depending on the QEMU version.
3662 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3663 # * machine-type: CPU model may look different depending on the machine-type.
3664 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3665 # * machine options (including accelerator): in some architectures, CPU models
3666 # may look different depending on machine and accelerator options. (Except for
3667 # CPU models reported as "static" in query-cpu-definitions.)
3668 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3669 # global properties may affect expansion of CPU models. Using
3670 # query-cpu-model-expansion while using these is not advised.
3671 #
3672 # Some architectures may not support all expansion types. s390x supports
3673 # "full" and "static".
3674 #
3675 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
3676 # not supported, if the model cannot be expanded, if the model contains
3677 # an unknown CPU definition name, unknown properties or properties
3678 # with a wrong type. Also returns an error if an expansion type is
3679 # not supported.
3680 #
3681 # Since: 2.8.0
3682 ##
3683 { 'command': 'query-cpu-model-expansion',
3684 'data': { 'type': 'CpuModelExpansionType',
3685 'model': 'CpuModelInfo' },
3686 'returns': 'CpuModelExpansionInfo' }
3687
3688 ##
3689 # @CpuModelCompareResult:
3690 #
3691 # An enumeration of CPU model comparation results. The result is usually
3692 # calculated using e.g. CPU features or CPU generations.
3693 #
3694 # @incompatible: If model A is incompatible to model B, model A is not
3695 # guaranteed to run where model B runs and the other way around.
3696 #
3697 # @identical: If model A is identical to model B, model A is guaranteed to run
3698 # where model B runs and the other way around.
3699 #
3700 # @superset: If model A is a superset of model B, model B is guaranteed to run
3701 # where model A runs. There are no guarantees about the other way.
3702 #
3703 # @subset: If model A is a subset of model B, model A is guaranteed to run
3704 # where model B runs. There are no guarantees about the other way.
3705 #
3706 # Since: 2.8.0
3707 ##
3708 { 'enum': 'CpuModelCompareResult',
3709 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
3710
3711 ##
3712 # @CpuModelCompareInfo:
3713 #
3714 # The result of a CPU model comparison.
3715 #
3716 # @result: The result of the compare operation.
3717 # @responsible-properties: List of properties that led to the comparison result
3718 # not being identical.
3719 #
3720 # @responsible-properties is a list of QOM property names that led to
3721 # both CPUs not being detected as identical. For identical models, this
3722 # list is empty.
3723 # If a QOM property is read-only, that means there's no known way to make the
3724 # CPU models identical. If the special property name "type" is included, the
3725 # models are by definition not identical and cannot be made identical.
3726 #
3727 # Since: 2.8.0
3728 ##
3729 { 'struct': 'CpuModelCompareInfo',
3730 'data': {'result': 'CpuModelCompareResult',
3731 'responsible-properties': ['str']
3732 }
3733 }
3734
3735 ##
3736 # @query-cpu-model-comparison:
3737 #
3738 # Compares two CPU models, returning how they compare in a specific
3739 # configuration. The results indicates how both models compare regarding
3740 # runnability. This result can be used by tooling to make decisions if a
3741 # certain CPU model will run in a certain configuration or if a compatible
3742 # CPU model has to be created by baselining.
3743 #
3744 # Usually, a CPU model is compared against the maximum possible CPU model
3745 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
3746 # model is identical or a subset, it will run in that configuration.
3747 #
3748 # The result returned by this command may be affected by:
3749 #
3750 # * QEMU version: CPU models may look different depending on the QEMU version.
3751 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3752 # * machine-type: CPU model may look different depending on the machine-type.
3753 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3754 # * machine options (including accelerator): in some architectures, CPU models
3755 # may look different depending on machine and accelerator options. (Except for
3756 # CPU models reported as "static" in query-cpu-definitions.)
3757 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3758 # global properties may affect expansion of CPU models. Using
3759 # query-cpu-model-expansion while using these is not advised.
3760 #
3761 # Some architectures may not support comparing CPU models. s390x supports
3762 # comparing CPU models.
3763 #
3764 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
3765 # not supported, if a model cannot be used, if a model contains
3766 # an unknown cpu definition name, unknown properties or properties
3767 # with wrong types.
3768 #
3769 # Since: 2.8.0
3770 ##
3771 { 'command': 'query-cpu-model-comparison',
3772 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
3773 'returns': 'CpuModelCompareInfo' }
3774
3775 ##
3776 # @CpuModelBaselineInfo:
3777 #
3778 # The result of a CPU model baseline.
3779 #
3780 # @model: the baselined CpuModelInfo.
3781 #
3782 # Since: 2.8.0
3783 ##
3784 { 'struct': 'CpuModelBaselineInfo',
3785 'data': { 'model': 'CpuModelInfo' } }
3786
3787 ##
3788 # @query-cpu-model-baseline:
3789 #
3790 # Baseline two CPU models, creating a compatible third model. The created
3791 # model will always be a static, migration-safe CPU model (see "static"
3792 # CPU model expansion for details).
3793 #
3794 # This interface can be used by tooling to create a compatible CPU model out
3795 # two CPU models. The created CPU model will be identical to or a subset of
3796 # both CPU models when comparing them. Therefore, the created CPU model is
3797 # guaranteed to run where the given CPU models run.
3798 #
3799 # The result returned by this command may be affected by:
3800 #
3801 # * QEMU version: CPU models may look different depending on the QEMU version.
3802 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3803 # * machine-type: CPU model may look different depending on the machine-type.
3804 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3805 # * machine options (including accelerator): in some architectures, CPU models
3806 # may look different depending on machine and accelerator options. (Except for
3807 # CPU models reported as "static" in query-cpu-definitions.)
3808 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3809 # global properties may affect expansion of CPU models. Using
3810 # query-cpu-model-expansion while using these is not advised.
3811 #
3812 # Some architectures may not support baselining CPU models. s390x supports
3813 # baselining CPU models.
3814 #
3815 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
3816 # not supported, if a model cannot be used, if a model contains
3817 # an unknown cpu definition name, unknown properties or properties
3818 # with wrong types.
3819 #
3820 # Since: 2.8.0
3821 ##
3822 { 'command': 'query-cpu-model-baseline',
3823 'data': { 'modela': 'CpuModelInfo',
3824 'modelb': 'CpuModelInfo' },
3825 'returns': 'CpuModelBaselineInfo' }
3826
3827 ##
3828 # @AddfdInfo:
3829 #
3830 # Information about a file descriptor that was added to an fd set.
3831 #
3832 # @fdset-id: The ID of the fd set that @fd was added to.
3833 #
3834 # @fd: The file descriptor that was received via SCM rights and
3835 # added to the fd set.
3836 #
3837 # Since: 1.2.0
3838 ##
3839 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3840
3841 ##
3842 # @add-fd:
3843 #
3844 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3845 #
3846 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3847 #
3848 # @opaque: #optional A free-form string that can be used to describe the fd.
3849 #
3850 # Returns: @AddfdInfo on success
3851 # If file descriptor was not received, FdNotSupplied
3852 # If @fdset-id is a negative value, InvalidParameterValue
3853 #
3854 # Notes: The list of fd sets is shared by all monitor connections.
3855 #
3856 # If @fdset-id is not specified, a new fd set will be created.
3857 #
3858 # Since: 1.2.0
3859 ##
3860 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3861 'returns': 'AddfdInfo' }
3862
3863 ##
3864 # @remove-fd:
3865 #
3866 # Remove a file descriptor from an fd set.
3867 #
3868 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3869 #
3870 # @fd: #optional The file descriptor that is to be removed.
3871 #
3872 # Returns: Nothing on success
3873 # If @fdset-id or @fd is not found, FdNotFound
3874 #
3875 # Since: 1.2.0
3876 #
3877 # Notes: The list of fd sets is shared by all monitor connections.
3878 #
3879 # If @fd is not specified, all file descriptors in @fdset-id
3880 # will be removed.
3881 ##
3882 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3883
3884 ##
3885 # @FdsetFdInfo:
3886 #
3887 # Information about a file descriptor that belongs to an fd set.
3888 #
3889 # @fd: The file descriptor value.
3890 #
3891 # @opaque: #optional A free-form string that can be used to describe the fd.
3892 #
3893 # Since: 1.2.0
3894 ##
3895 { 'struct': 'FdsetFdInfo',
3896 'data': {'fd': 'int', '*opaque': 'str'} }
3897
3898 ##
3899 # @FdsetInfo:
3900 #
3901 # Information about an fd set.
3902 #
3903 # @fdset-id: The ID of the fd set.
3904 #
3905 # @fds: A list of file descriptors that belong to this fd set.
3906 #
3907 # Since: 1.2.0
3908 ##
3909 { 'struct': 'FdsetInfo',
3910 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3911
3912 ##
3913 # @query-fdsets:
3914 #
3915 # Return information describing all fd sets.
3916 #
3917 # Returns: A list of @FdsetInfo
3918 #
3919 # Since: 1.2.0
3920 #
3921 # Note: The list of fd sets is shared by all monitor connections.
3922 #
3923 ##
3924 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3925
3926 ##
3927 # @TargetInfo:
3928 #
3929 # Information describing the QEMU target.
3930 #
3931 # @arch: the target architecture (eg "x86_64", "i386", etc)
3932 #
3933 # Since: 1.2.0
3934 ##
3935 { 'struct': 'TargetInfo',
3936 'data': { 'arch': 'str' } }
3937
3938 ##
3939 # @query-target:
3940 #
3941 # Return information about the target for this QEMU
3942 #
3943 # Returns: TargetInfo
3944 #
3945 # Since: 1.2.0
3946 ##
3947 { 'command': 'query-target', 'returns': 'TargetInfo' }
3948
3949 ##
3950 # @QKeyCode:
3951 #
3952 # An enumeration of key name.
3953 #
3954 # This is used by the @send-key command.
3955 #
3956 # @unmapped: since 2.0
3957 # @pause: since 2.0
3958 # @ro: since 2.4
3959 # @kp_comma: since 2.4
3960 # @kp_equals: since 2.6
3961 # @power: since 2.6
3962 # @hiragana: since 2.9
3963 # @henkan: since 2.9
3964 # @yen: since 2.9
3965 #
3966 # Since: 1.3.0
3967 #
3968 ##
3969 { 'enum': 'QKeyCode',
3970 'data': [ 'unmapped',
3971 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3972 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3973 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3974 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3975 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3976 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3977 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3978 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3979 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3980 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3981 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3982 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3983 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3984 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3985 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
3986 'ro', 'hiragana', 'henkan', 'yen',
3987 'kp_comma', 'kp_equals', 'power' ] }
3988
3989 ##
3990 # @KeyValue:
3991 #
3992 # Represents a keyboard key.
3993 #
3994 # Since: 1.3.0
3995 ##
3996 { 'union': 'KeyValue',
3997 'data': {
3998 'number': 'int',
3999 'qcode': 'QKeyCode' } }
4000
4001 ##
4002 # @send-key:
4003 #
4004 # Send keys to guest.
4005 #
4006 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
4007 # simultaneously sent to the guest. A @KeyValue.number value is sent
4008 # directly to the guest, while @KeyValue.qcode must be a valid
4009 # @QKeyCode value
4010 #
4011 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
4012 # to 100
4013 #
4014 # Returns: Nothing on success
4015 # If key is unknown or redundant, InvalidParameter
4016 #
4017 # Since: 1.3.0
4018 #
4019 ##
4020 { 'command': 'send-key',
4021 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
4022
4023 ##
4024 # @screendump:
4025 #
4026 # Write a PPM of the VGA screen to a file.
4027 #
4028 # @filename: the path of a new PPM file to store the image
4029 #
4030 # Returns: Nothing on success
4031 #
4032 # Since: 0.14.0
4033 ##
4034 { 'command': 'screendump', 'data': {'filename': 'str'} }
4035
4036
4037 ##
4038 # @ChardevCommon:
4039 #
4040 # Configuration shared across all chardev backends
4041 #
4042 # @logfile: #optional The name of a logfile to save output
4043 # @logappend: #optional true to append instead of truncate
4044 # (default to false to truncate)
4045 #
4046 # Since: 2.6
4047 ##
4048 { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
4049 '*logappend': 'bool' } }
4050
4051 ##
4052 # @ChardevFile:
4053 #
4054 # Configuration info for file chardevs.
4055 #
4056 # @in: #optional The name of the input file
4057 # @out: The name of the output file
4058 # @append: #optional Open the file in append mode (default false to
4059 # truncate) (Since 2.6)
4060 #
4061 # Since: 1.4
4062 ##
4063 { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
4064 'out' : 'str',
4065 '*append': 'bool' },
4066 'base': 'ChardevCommon' }
4067
4068 ##
4069 # @ChardevHostdev:
4070 #
4071 # Configuration info for device and pipe chardevs.
4072 #
4073 # @device: The name of the special file for the device,
4074 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
4075 #
4076 # Since: 1.4
4077 ##
4078 { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
4079 'base': 'ChardevCommon' }
4080
4081 ##
4082 # @ChardevSocket:
4083 #
4084 # Configuration info for (stream) socket chardevs.
4085 #
4086 # @addr: socket address to listen on (server=true)
4087 # or connect to (server=false)
4088 # @tls-creds: #optional the ID of the TLS credentials object (since 2.6)
4089 # @server: #optional create server socket (default: true)
4090 # @wait: #optional wait for incoming connection on server
4091 # sockets (default: false).
4092 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
4093 # @telnet: #optional enable telnet protocol on server
4094 # sockets (default: false)
4095 # @reconnect: #optional For a client socket, if a socket is disconnected,
4096 # then attempt a reconnect after the given number of seconds.
4097 # Setting this to zero disables this function. (default: 0)
4098 # (Since: 2.2)
4099 #
4100 # Since: 1.4
4101 ##
4102 { 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
4103 '*tls-creds' : 'str',
4104 '*server' : 'bool',
4105 '*wait' : 'bool',
4106 '*nodelay' : 'bool',
4107 '*telnet' : 'bool',
4108 '*reconnect' : 'int' },
4109 'base': 'ChardevCommon' }
4110
4111 ##
4112 # @ChardevUdp:
4113 #
4114 # Configuration info for datagram socket chardevs.
4115 #
4116 # @remote: remote address
4117 # @local: #optional local address
4118 #
4119 # Since: 1.5
4120 ##
4121 { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
4122 '*local' : 'SocketAddress' },
4123 'base': 'ChardevCommon' }
4124
4125 ##
4126 # @ChardevMux:
4127 #
4128 # Configuration info for mux chardevs.
4129 #
4130 # @chardev: name of the base chardev.
4131 #
4132 # Since: 1.5
4133 ##
4134 { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
4135 'base': 'ChardevCommon' }
4136
4137 ##
4138 # @ChardevStdio:
4139 #
4140 # Configuration info for stdio chardevs.
4141 #
4142 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
4143 # be delivered to qemu. Default: true in -nographic mode,
4144 # false otherwise.
4145 #
4146 # Since: 1.5
4147 ##
4148 { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
4149 'base': 'ChardevCommon' }
4150
4151
4152 ##
4153 # @ChardevSpiceChannel:
4154 #
4155 # Configuration info for spice vm channel chardevs.
4156 #
4157 # @type: kind of channel (for example vdagent).
4158 #
4159 # Since: 1.5
4160 ##
4161 { 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' },
4162 'base': 'ChardevCommon' }
4163
4164 ##
4165 # @ChardevSpicePort:
4166 #
4167 # Configuration info for spice port chardevs.
4168 #
4169 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
4170 #
4171 # Since: 1.5
4172 ##
4173 { 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' },
4174 'base': 'ChardevCommon' }
4175
4176 ##
4177 # @ChardevVC:
4178 #
4179 # Configuration info for virtual console chardevs.
4180 #
4181 # @width: console width, in pixels
4182 # @height: console height, in pixels
4183 # @cols: console width, in chars
4184 # @rows: console height, in chars
4185 #
4186 # Since: 1.5
4187 ##
4188 { 'struct': 'ChardevVC', 'data': { '*width' : 'int',
4189 '*height' : 'int',
4190 '*cols' : 'int',
4191 '*rows' : 'int' },
4192 'base': 'ChardevCommon' }
4193
4194 ##
4195 # @ChardevRingbuf:
4196 #
4197 # Configuration info for ring buffer chardevs.
4198 #
4199 # @size: #optional ring buffer size, must be power of two, default is 65536
4200 #
4201 # Since: 1.5
4202 ##
4203 { 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' },
4204 'base': 'ChardevCommon' }
4205
4206 ##
4207 # @ChardevBackend:
4208 #
4209 # Configuration info for the new chardev backend.
4210 #
4211 # Since: 1.4 (testdev since 2.2)
4212 ##
4213 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
4214 'serial' : 'ChardevHostdev',
4215 'parallel': 'ChardevHostdev',
4216 'pipe' : 'ChardevHostdev',
4217 'socket' : 'ChardevSocket',
4218 'udp' : 'ChardevUdp',
4219 'pty' : 'ChardevCommon',
4220 'null' : 'ChardevCommon',
4221 'mux' : 'ChardevMux',
4222 'msmouse': 'ChardevCommon',
4223 'braille': 'ChardevCommon',
4224 'testdev': 'ChardevCommon',
4225 'stdio' : 'ChardevStdio',
4226 'console': 'ChardevCommon',
4227 'spicevmc' : 'ChardevSpiceChannel',
4228 'spiceport' : 'ChardevSpicePort',
4229 'vc' : 'ChardevVC',
4230 'ringbuf': 'ChardevRingbuf',
4231 # next one is just for compatibility
4232 'memory' : 'ChardevRingbuf' } }
4233
4234 ##
4235 # @ChardevReturn:
4236 #
4237 # Return info about the chardev backend just created.
4238 #
4239 # @pty: #optional name of the slave pseudoterminal device, present if
4240 # and only if a chardev of type 'pty' was created
4241 #
4242 # Since: 1.4
4243 ##
4244 { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
4245
4246 ##
4247 # @chardev-add:
4248 #
4249 # Add a character device backend
4250 #
4251 # @id: the chardev's ID, must be unique
4252 # @backend: backend type and parameters
4253 #
4254 # Returns: ChardevReturn.
4255 #
4256 # Since: 1.4
4257 ##
4258 { 'command': 'chardev-add', 'data': {'id' : 'str',
4259 'backend' : 'ChardevBackend' },
4260 'returns': 'ChardevReturn' }
4261
4262 ##
4263 # @chardev-remove:
4264 #
4265 # Remove a character device backend
4266 #
4267 # @id: the chardev's ID, must exist and not be in use
4268 #
4269 # Returns: Nothing on success
4270 #
4271 # Since: 1.4
4272 ##
4273 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
4274
4275 ##
4276 # @TpmModel:
4277 #
4278 # An enumeration of TPM models
4279 #
4280 # @tpm-tis: TPM TIS model
4281 #
4282 # Since: 1.5
4283 ##
4284 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
4285
4286 ##
4287 # @query-tpm-models:
4288 #
4289 # Return a list of supported TPM models
4290 #
4291 # Returns: a list of TpmModel
4292 #
4293 # Since: 1.5
4294 ##
4295 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
4296
4297 ##
4298 # @TpmType:
4299 #
4300 # An enumeration of TPM types
4301 #
4302 # @passthrough: TPM passthrough type
4303 #
4304 # Since: 1.5
4305 ##
4306 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
4307
4308 ##
4309 # @query-tpm-types:
4310 #
4311 # Return a list of supported TPM types
4312 #
4313 # Returns: a list of TpmType
4314 #
4315 # Since: 1.5
4316 ##
4317 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
4318
4319 ##
4320 # @TPMPassthroughOptions:
4321 #
4322 # Information about the TPM passthrough type
4323 #
4324 # @path: #optional string describing the path used for accessing the TPM device
4325 #
4326 # @cancel-path: #optional string showing the TPM's sysfs cancel file
4327 # for cancellation of TPM commands while they are executing
4328 #
4329 # Since: 1.5
4330 ##
4331 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
4332 '*cancel-path' : 'str'} }
4333
4334 ##
4335 # @TpmTypeOptions:
4336 #
4337 # A union referencing different TPM backend types' configuration options
4338 #
4339 # @type: 'passthrough' The configuration options for the TPM passthrough type
4340 #
4341 # Since: 1.5
4342 ##
4343 { 'union': 'TpmTypeOptions',
4344 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
4345
4346 ##
4347 # @TPMInfo:
4348 #
4349 # Information about the TPM
4350 #
4351 # @id: The Id of the TPM
4352 #
4353 # @model: The TPM frontend model
4354 #
4355 # @options: The TPM (backend) type configuration options
4356 #
4357 # Since: 1.5
4358 ##
4359 { 'struct': 'TPMInfo',
4360 'data': {'id': 'str',
4361 'model': 'TpmModel',
4362 'options': 'TpmTypeOptions' } }
4363
4364 ##
4365 # @query-tpm:
4366 #
4367 # Return information about the TPM device
4368 #
4369 # Returns: @TPMInfo on success
4370 #
4371 # Since: 1.5
4372 ##
4373 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
4374
4375 ##
4376 # @AcpiTableOptions:
4377 #
4378 # Specify an ACPI table on the command line to load.
4379 #
4380 # At most one of @file and @data can be specified. The list of files specified
4381 # by any one of them is loaded and concatenated in order. If both are omitted,
4382 # @data is implied.
4383 #
4384 # Other fields / optargs can be used to override fields of the generic ACPI
4385 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
4386 # Description Table Header. If a header field is not overridden, then the
4387 # corresponding value from the concatenated blob is used (in case of @file), or
4388 # it is filled in with a hard-coded value (in case of @data).
4389 #
4390 # String fields are copied into the matching ACPI member from lowest address
4391 # upwards, and silently truncated / NUL-padded to length.
4392 #
4393 # @sig: #optional table signature / identifier (4 bytes)
4394 #
4395 # @rev: #optional table revision number (dependent on signature, 1 byte)
4396 #
4397 # @oem_id: #optional OEM identifier (6 bytes)
4398 #
4399 # @oem_table_id: #optional OEM table identifier (8 bytes)
4400 #
4401 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
4402 #
4403 # @asl_compiler_id: #optional identifier of the utility that created the table
4404 # (4 bytes)
4405 #
4406 # @asl_compiler_rev: #optional revision number of the utility that created the
4407 # table (4 bytes)
4408 #
4409 # @file: #optional colon (:) separated list of pathnames to load and
4410 # concatenate as table data. The resultant binary blob is expected to
4411 # have an ACPI table header. At least one file is required. This field
4412 # excludes @data.
4413 #
4414 # @data: #optional colon (:) separated list of pathnames to load and
4415 # concatenate as table data. The resultant binary blob must not have an
4416 # ACPI table header. At least one file is required. This field excludes
4417 # @file.
4418 #
4419 # Since: 1.5
4420 ##
4421 { 'struct': 'AcpiTableOptions',
4422 'data': {
4423 '*sig': 'str',
4424 '*rev': 'uint8',
4425 '*oem_id': 'str',
4426 '*oem_table_id': 'str',
4427 '*oem_rev': 'uint32',
4428 '*asl_compiler_id': 'str',
4429 '*asl_compiler_rev': 'uint32',
4430 '*file': 'str',
4431 '*data': 'str' }}
4432
4433 ##
4434 # @CommandLineParameterType:
4435 #
4436 # Possible types for an option parameter.
4437 #
4438 # @string: accepts a character string
4439 #
4440 # @boolean: accepts "on" or "off"
4441 #
4442 # @number: accepts a number
4443 #
4444 # @size: accepts a number followed by an optional suffix (K)ilo,
4445 # (M)ega, (G)iga, (T)era
4446 #
4447 # Since: 1.5
4448 ##
4449 { 'enum': 'CommandLineParameterType',
4450 'data': ['string', 'boolean', 'number', 'size'] }
4451
4452 ##
4453 # @CommandLineParameterInfo:
4454 #
4455 # Details about a single parameter of a command line option.
4456 #
4457 # @name: parameter name
4458 #
4459 # @type: parameter @CommandLineParameterType
4460 #
4461 # @help: #optional human readable text string, not suitable for parsing.
4462 #
4463 # @default: #optional default value string (since 2.1)
4464 #
4465 # Since: 1.5
4466 ##
4467 { 'struct': 'CommandLineParameterInfo',
4468 'data': { 'name': 'str',
4469 'type': 'CommandLineParameterType',
4470 '*help': 'str',
4471 '*default': 'str' } }
4472
4473 ##
4474 # @CommandLineOptionInfo:
4475 #
4476 # Details about a command line option, including its list of parameter details
4477 #
4478 # @option: option name
4479 #
4480 # @parameters: an array of @CommandLineParameterInfo
4481 #
4482 # Since: 1.5
4483 ##
4484 { 'struct': 'CommandLineOptionInfo',
4485 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
4486
4487 ##
4488 # @query-command-line-options:
4489 #
4490 # Query command line option schema.
4491 #
4492 # @option: #optional option name
4493 #
4494 # Returns: list of @CommandLineOptionInfo for all options (or for the given
4495 # @option). Returns an error if the given @option doesn't exist.
4496 #
4497 # Since: 1.5
4498 ##
4499 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
4500 'returns': ['CommandLineOptionInfo'] }
4501
4502 ##
4503 # @X86CPURegister32:
4504 #
4505 # A X86 32-bit register
4506 #
4507 # Since: 1.5
4508 ##
4509 { 'enum': 'X86CPURegister32',
4510 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4511
4512 ##
4513 # @X86CPUFeatureWordInfo:
4514 #
4515 # Information about a X86 CPU feature word
4516 #
4517 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4518 #
4519 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
4520 # feature word
4521 #
4522 # @cpuid-register: Output register containing the feature bits
4523 #
4524 # @features: value of output register, containing the feature bits
4525 #
4526 # Since: 1.5
4527 ##
4528 { 'struct': 'X86CPUFeatureWordInfo',
4529 'data': { 'cpuid-input-eax': 'int',
4530 '*cpuid-input-ecx': 'int',
4531 'cpuid-register': 'X86CPURegister32',
4532 'features': 'int' } }
4533
4534 ##
4535 # @DummyForceArrays:
4536 #
4537 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
4538 #
4539 # Since: 2.5
4540 ##
4541 { 'struct': 'DummyForceArrays',
4542 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
4543
4544
4545 ##
4546 # @RxState:
4547 #
4548 # Packets receiving state
4549 #
4550 # @normal: filter assigned packets according to the mac-table
4551 #
4552 # @none: don't receive any assigned packet
4553 #
4554 # @all: receive all assigned packets
4555 #
4556 # Since: 1.6
4557 ##
4558 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
4559
4560 ##
4561 # @RxFilterInfo:
4562 #
4563 # Rx-filter information for a NIC.
4564 #
4565 # @name: net client name
4566 #
4567 # @promiscuous: whether promiscuous mode is enabled
4568 #
4569 # @multicast: multicast receive state
4570 #
4571 # @unicast: unicast receive state
4572 #
4573 # @vlan: vlan receive state (Since 2.0)
4574 #
4575 # @broadcast-allowed: whether to receive broadcast
4576 #
4577 # @multicast-overflow: multicast table is overflowed or not
4578 #
4579 # @unicast-overflow: unicast table is overflowed or not
4580 #
4581 # @main-mac: the main macaddr string
4582 #
4583 # @vlan-table: a list of active vlan id
4584 #
4585 # @unicast-table: a list of unicast macaddr string
4586 #
4587 # @multicast-table: a list of multicast macaddr string
4588 #
4589 # Since: 1.6
4590 ##
4591 { 'struct': 'RxFilterInfo',
4592 'data': {
4593 'name': 'str',
4594 'promiscuous': 'bool',
4595 'multicast': 'RxState',
4596 'unicast': 'RxState',
4597 'vlan': 'RxState',
4598 'broadcast-allowed': 'bool',
4599 'multicast-overflow': 'bool',
4600 'unicast-overflow': 'bool',
4601 'main-mac': 'str',
4602 'vlan-table': ['int'],
4603 'unicast-table': ['str'],
4604 'multicast-table': ['str'] }}
4605
4606 ##
4607 # @query-rx-filter:
4608 #
4609 # Return rx-filter information for all NICs (or for the given NIC).
4610 #
4611 # @name: #optional net client name
4612 #
4613 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4614 # Returns an error if the given @name doesn't exist, or given
4615 # NIC doesn't support rx-filter querying, or given net client
4616 # isn't a NIC.
4617 #
4618 # Since: 1.6
4619 ##
4620 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4621 'returns': ['RxFilterInfo'] }
4622
4623 ##
4624 # @InputButton:
4625 #
4626 # Button of a pointer input device (mouse, tablet).
4627 #
4628 # Since: 2.0
4629 ##
4630 { 'enum' : 'InputButton',
4631 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down' ] }
4632
4633 ##
4634 # @InputAxis:
4635 #
4636 # Position axis of a pointer input device (mouse, tablet).
4637 #
4638 # Since: 2.0
4639 ##
4640 { 'enum' : 'InputAxis',
4641 'data' : [ 'x', 'y' ] }
4642
4643 ##
4644 # @InputKeyEvent:
4645 #
4646 # Keyboard input event.
4647 #
4648 # @key: Which key this event is for.
4649 # @down: True for key-down and false for key-up events.
4650 #
4651 # Since: 2.0
4652 ##
4653 { 'struct' : 'InputKeyEvent',
4654 'data' : { 'key' : 'KeyValue',
4655 'down' : 'bool' } }
4656
4657 ##
4658 # @InputBtnEvent:
4659 #
4660 # Pointer button input event.
4661 #
4662 # @button: Which button this event is for.
4663 # @down: True for key-down and false for key-up events.
4664 #
4665 # Since: 2.0
4666 ##
4667 { 'struct' : 'InputBtnEvent',
4668 'data' : { 'button' : 'InputButton',
4669 'down' : 'bool' } }
4670
4671 ##
4672 # @InputMoveEvent:
4673 #
4674 # Pointer motion input event.
4675 #
4676 # @axis: Which axis is referenced by @value.
4677 # @value: Pointer position. For absolute coordinates the
4678 # valid range is 0 -> 0x7ffff
4679 #
4680 # Since: 2.0
4681 ##
4682 { 'struct' : 'InputMoveEvent',
4683 'data' : { 'axis' : 'InputAxis',
4684 'value' : 'int' } }
4685
4686 ##
4687 # @InputEvent:
4688 #
4689 # Input event union.
4690 #
4691 # @type: the input type, one of:
4692 # - 'key': Input event of Keyboard
4693 # - 'btn': Input event of pointer buttons
4694 # - 'rel': Input event of relative pointer motion
4695 # - 'abs': Input event of absolute pointer motion
4696 #
4697 # Since: 2.0
4698 ##
4699 { 'union' : 'InputEvent',
4700 'data' : { 'key' : 'InputKeyEvent',
4701 'btn' : 'InputBtnEvent',
4702 'rel' : 'InputMoveEvent',
4703 'abs' : 'InputMoveEvent' } }
4704
4705 ##
4706 # @input-send-event:
4707 #
4708 # Send input event(s) to guest.
4709 #
4710 # @device: #optional display device to send event(s) to.
4711 # @head: #optional head to send event(s) to, in case the
4712 # display device supports multiple scanouts.
4713 # @events: List of InputEvent union.
4714 #
4715 # Returns: Nothing on success.
4716 #
4717 # The @display and @head parameters can be used to send the input
4718 # event to specific input devices in case (a) multiple input devices
4719 # of the same kind are added to the virtual machine and (b) you have
4720 # configured input routing (see docs/multiseat.txt) for those input
4721 # devices. The parameters work exactly like the device and head
4722 # properties of input devices. If @device is missing, only devices
4723 # that have no input routing config are admissible. If @device is
4724 # specified, both input devices with and without input routing config
4725 # are admissible, but devices with input routing config take
4726 # precedence.
4727 #
4728 # Since: 2.6
4729 ##
4730 { 'command': 'input-send-event',
4731 'data': { '*device': 'str',
4732 '*head' : 'int',
4733 'events' : [ 'InputEvent' ] } }
4734
4735 ##
4736 # @NumaOptions:
4737 #
4738 # A discriminated record of NUMA options. (for OptsVisitor)
4739 #
4740 # Since: 2.1
4741 ##
4742 { 'union': 'NumaOptions',
4743 'data': {
4744 'node': 'NumaNodeOptions' }}
4745
4746 ##
4747 # @NumaNodeOptions:
4748 #
4749 # Create a guest NUMA node. (for OptsVisitor)
4750 #
4751 # @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
4752 #
4753 # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
4754 # if omitted)
4755 #
4756 # @mem: #optional memory size of this node; mutually exclusive with @memdev.
4757 # Equally divide total memory among nodes if both @mem and @memdev are
4758 # omitted.
4759 #
4760 # @memdev: #optional memory backend object. If specified for one node,
4761 # it must be specified for all nodes.
4762 #
4763 # Since: 2.1
4764 ##
4765 { 'struct': 'NumaNodeOptions',
4766 'data': {
4767 '*nodeid': 'uint16',
4768 '*cpus': ['uint16'],
4769 '*mem': 'size',
4770 '*memdev': 'str' }}
4771
4772 ##
4773 # @HostMemPolicy:
4774 #
4775 # Host memory policy types
4776 #
4777 # @default: restore default policy, remove any nondefault policy
4778 #
4779 # @preferred: set the preferred host nodes for allocation
4780 #
4781 # @bind: a strict policy that restricts memory allocation to the
4782 # host nodes specified
4783 #
4784 # @interleave: memory allocations are interleaved across the set
4785 # of host nodes specified
4786 #
4787 # Since: 2.1
4788 ##
4789 { 'enum': 'HostMemPolicy',
4790 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
4791
4792 ##
4793 # @Memdev:
4794 #
4795 # Information about memory backend
4796 #
4797 # @id: #optional backend's ID if backend has 'id' property (since 2.9)
4798 #
4799 # @size: memory backend size
4800 #
4801 # @merge: enables or disables memory merge support
4802 #
4803 # @dump: includes memory backend's memory in a core dump or not
4804 #
4805 # @prealloc: enables or disables memory preallocation
4806 #
4807 # @host-nodes: host nodes for its memory policy
4808 #
4809 # @policy: memory policy of memory backend
4810 #
4811 # Since: 2.1
4812 ##
4813 { 'struct': 'Memdev',
4814 'data': {
4815 '*id': 'str',
4816 'size': 'size',
4817 'merge': 'bool',
4818 'dump': 'bool',
4819 'prealloc': 'bool',
4820 'host-nodes': ['uint16'],
4821 'policy': 'HostMemPolicy' }}
4822
4823 ##
4824 # @query-memdev:
4825 #
4826 # Returns information for all memory backends.
4827 #
4828 # Returns: a list of @Memdev.
4829 #
4830 # Since: 2.1
4831 ##
4832 { 'command': 'query-memdev', 'returns': ['Memdev'] }
4833
4834 ##
4835 # @PCDIMMDeviceInfo:
4836 #
4837 # PCDIMMDevice state information
4838 #
4839 # @id: #optional device's ID
4840 #
4841 # @addr: physical address, where device is mapped
4842 #
4843 # @size: size of memory that the device provides
4844 #
4845 # @slot: slot number at which device is plugged in
4846 #
4847 # @node: NUMA node number where device is plugged in
4848 #
4849 # @memdev: memory backend linked with device
4850 #
4851 # @hotplugged: true if device was hotplugged
4852 #
4853 # @hotpluggable: true if device if could be added/removed while machine is running
4854 #
4855 # Since: 2.1
4856 ##
4857 { 'struct': 'PCDIMMDeviceInfo',
4858 'data': { '*id': 'str',
4859 'addr': 'int',
4860 'size': 'int',
4861 'slot': 'int',
4862 'node': 'int',
4863 'memdev': 'str',
4864 'hotplugged': 'bool',
4865 'hotpluggable': 'bool'
4866 }
4867 }
4868
4869 ##
4870 # @MemoryDeviceInfo:
4871 #
4872 # Union containing information about a memory device
4873 #
4874 # Since: 2.1
4875 ##
4876 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
4877
4878 ##
4879 # @query-memory-devices:
4880 #
4881 # Lists available memory devices and their state
4882 #
4883 # Since: 2.1
4884 ##
4885 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
4886
4887 ##
4888 # @ACPISlotType:
4889 #
4890 # @DIMM: memory slot
4891 # @CPU: logical CPU slot (since 2.7)
4892 ##
4893 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
4894
4895 ##
4896 # @ACPIOSTInfo:
4897 #
4898 # OSPM Status Indication for a device
4899 # For description of possible values of @source and @status fields
4900 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
4901 #
4902 # @device: #optional device ID associated with slot
4903 #
4904 # @slot: slot ID, unique per slot of a given @slot-type
4905 #
4906 # @slot-type: type of the slot
4907 #
4908 # @source: an integer containing the source event
4909 #
4910 # @status: an integer containing the status code
4911 #
4912 # Since: 2.1
4913 ##
4914 { 'struct': 'ACPIOSTInfo',
4915 'data' : { '*device': 'str',
4916 'slot': 'str',
4917 'slot-type': 'ACPISlotType',
4918 'source': 'int',
4919 'status': 'int' } }
4920
4921 ##
4922 # @query-acpi-ospm-status:
4923 #
4924 # Lists ACPI OSPM status of ACPI device objects,
4925 # which might be reported via _OST method
4926 #
4927 # Since: 2.1
4928 ##
4929 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
4930
4931 ##
4932 # @WatchdogExpirationAction:
4933 #
4934 # An enumeration of the actions taken when the watchdog device's timer is
4935 # expired
4936 #
4937 # @reset: system resets
4938 #
4939 # @shutdown: system shutdown, note that it is similar to @powerdown, which
4940 # tries to set to system status and notify guest
4941 #
4942 # @poweroff: system poweroff, the emulator program exits
4943 #
4944 # @pause: system pauses, similar to @stop
4945 #
4946 # @debug: system enters debug state
4947 #
4948 # @none: nothing is done
4949 #
4950 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
4951 # VCPUS on x86) (since 2.4)
4952 #
4953 # Since: 2.1
4954 ##
4955 { 'enum': 'WatchdogExpirationAction',
4956 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
4957 'inject-nmi' ] }
4958
4959 ##
4960 # @IoOperationType:
4961 #
4962 # An enumeration of the I/O operation types
4963 #
4964 # @read: read operation
4965 #
4966 # @write: write operation
4967 #
4968 # Since: 2.1
4969 ##
4970 { 'enum': 'IoOperationType',
4971 'data': [ 'read', 'write' ] }
4972
4973 ##
4974 # @GuestPanicAction:
4975 #
4976 # An enumeration of the actions taken when guest OS panic is detected
4977 #
4978 # @pause: system pauses
4979 #
4980 # Since: 2.1 (poweroff since 2.8)
4981 ##
4982 { 'enum': 'GuestPanicAction',
4983 'data': [ 'pause', 'poweroff' ] }
4984
4985 ##
4986 # @rtc-reset-reinjection:
4987 #
4988 # This command will reset the RTC interrupt reinjection backlog.
4989 # Can be used if another mechanism to synchronize guest time
4990 # is in effect, for example QEMU guest agent's guest-set-time
4991 # command.
4992 #
4993 # Since: 2.1
4994 ##
4995 { 'command': 'rtc-reset-reinjection' }
4996
4997 # Rocker ethernet network switch
4998 { 'include': 'qapi/rocker.json' }
4999
5000 ##
5001 # @ReplayMode:
5002 #
5003 # Mode of the replay subsystem.
5004 #
5005 # @none: normal execution mode. Replay or record are not enabled.
5006 #
5007 # @record: record mode. All non-deterministic data is written into the
5008 # replay log.
5009 #
5010 # @play: replay mode. Non-deterministic data required for system execution
5011 # is read from the log.
5012 #
5013 # Since: 2.5
5014 ##
5015 { 'enum': 'ReplayMode',
5016 'data': [ 'none', 'record', 'play' ] }
5017
5018 ##
5019 # @xen-load-devices-state:
5020 #
5021 # Load the state of all devices from file. The RAM and the block devices
5022 # of the VM are not loaded by this command.
5023 #
5024 # @filename: the file to load the state of the devices from as binary
5025 # data. See xen-save-devices-state.txt for a description of the binary
5026 # format.
5027 #
5028 # Since: 2.7
5029 ##
5030 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
5031
5032 ##
5033 # @GICCapability:
5034 #
5035 # The struct describes capability for a specific GIC (Generic
5036 # Interrupt Controller) version. These bits are not only decided by
5037 # QEMU/KVM software version, but also decided by the hardware that
5038 # the program is running upon.
5039 #
5040 # @version: version of GIC to be described. Currently, only 2 and 3
5041 # are supported.
5042 #
5043 # @emulated: whether current QEMU/hardware supports emulated GIC
5044 # device in user space.
5045 #
5046 # @kernel: whether current QEMU/hardware supports hardware
5047 # accelerated GIC device in kernel.
5048 #
5049 # Since: 2.6
5050 ##
5051 { 'struct': 'GICCapability',
5052 'data': { 'version': 'int',
5053 'emulated': 'bool',
5054 'kernel': 'bool' } }
5055
5056 ##
5057 # @query-gic-capabilities:
5058 #
5059 # This command is ARM-only. It will return a list of GICCapability
5060 # objects that describe its capability bits.
5061 #
5062 # Returns: a list of GICCapability objects.
5063 #
5064 # Since: 2.6
5065 ##
5066 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
5067
5068 ##
5069 # @CpuInstanceProperties:
5070 #
5071 # List of properties to be used for hotplugging a CPU instance,
5072 # it should be passed by management with device_add command when
5073 # a CPU is being hotplugged.
5074 #
5075 # @node-id: #optional NUMA node ID the CPU belongs to
5076 # @socket-id: #optional socket number within node/board the CPU belongs to
5077 # @core-id: #optional core number within socket the CPU belongs to
5078 # @thread-id: #optional thread number within core the CPU belongs to
5079 #
5080 # Note: currently there are 4 properties that could be present
5081 # but management should be prepared to pass through other
5082 # properties with device_add command to allow for future
5083 # interface extension. This also requires the filed names to be kept in
5084 # sync with the properties passed to -device/device_add.
5085 #
5086 # Since: 2.7
5087 ##
5088 { 'struct': 'CpuInstanceProperties',
5089 'data': { '*node-id': 'int',
5090 '*socket-id': 'int',
5091 '*core-id': 'int',
5092 '*thread-id': 'int'
5093 }
5094 }
5095
5096 ##
5097 # @HotpluggableCPU:
5098 #
5099 # @type: CPU object type for usage with device_add command
5100 # @props: list of properties to be used for hotplugging CPU
5101 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
5102 # @qom-path: #optional link to existing CPU object if CPU is present or
5103 # omitted if CPU is not present.
5104 #
5105 # Since: 2.7
5106 ##
5107 { 'struct': 'HotpluggableCPU',
5108 'data': { 'type': 'str',
5109 'vcpus-count': 'int',
5110 'props': 'CpuInstanceProperties',
5111 '*qom-path': 'str'
5112 }
5113 }
5114
5115 ##
5116 # @query-hotpluggable-cpus:
5117 #
5118 # Returns: a list of HotpluggableCPU objects.
5119 #
5120 # Since: 2.7
5121 ##
5122 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }