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