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