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