qemu-iotests/081: Avoid blockdev-add with id
[qemu.git] / qapi-schema.json
blobe50706111cf518b8a41ddcc3f275bf7a9011d77e
1 # -*- Mode: Python -*-
3 # QAPI Schema
5 # QAPI common definitions
6 { 'include': 'qapi/common.json' }
8 # QAPI crypto definitions
9 { 'include': 'qapi/crypto.json' }
11 # QAPI block definitions
12 { 'include': 'qapi/block.json' }
14 # QAPI event definitions
15 { 'include': 'qapi/event.json' }
17 # Tracing commands
18 { 'include': 'qapi/trace.json' }
20 # QAPI introspection
21 { 'include': 'qapi/introspect.json' }
24 # @qmp_capabilities:
26 # Enable QMP capabilities.
28 # Arguments: None.
30 # Example:
32 # -> { "execute": "qmp_capabilities" }
33 # <- { "return": {} }
35 # Notes: This command is valid exactly when first connecting: it must be
36 # issued before any other command will be accepted, and will fail once the
37 # monitor is accepting other commands. (see qemu docs/qmp-spec.txt)
39 # Since: 0.13
42 { 'command': 'qmp_capabilities' }
45 # @LostTickPolicy:
47 # Policy for handling lost ticks in timer devices.
49 # @discard: throw away the missed tick(s) and continue with future injection
50 #           normally.  Guest time may be delayed, unless the OS has explicit
51 #           handling of lost ticks
53 # @delay: continue to deliver ticks at the normal rate.  Guest time will be
54 #         delayed due to the late tick
56 # @merge: merge the missed tick(s) into one tick and inject.  Guest time
57 #         may be delayed, depending on how the OS reacts to the merging
58 #         of ticks
60 # @slew: deliver ticks at a higher rate to catch up with the missed tick. The
61 #        guest time should not be delayed once catchup is complete.
63 # Since: 2.0
65 { 'enum': 'LostTickPolicy',
66   'data': ['discard', 'delay', 'merge', 'slew' ] }
68 # @add_client
70 # Allow client connections for VNC, Spice and socket based
71 # character devices to be passed in to QEMU via SCM_RIGHTS.
73 # @protocol: protocol name. Valid names are "vnc", "spice" or the
74 #            name of a character device (eg. from -chardev id=XXXX)
76 # @fdname: file descriptor name previously passed via 'getfd' command
78 # @skipauth: #optional whether to skip authentication. Only applies
79 #            to "vnc" and "spice" protocols
81 # @tls: #optional whether to perform TLS. Only applies to the "spice"
82 #       protocol
84 # Returns: nothing on success.
86 # Since: 0.14.0
88 { 'command': 'add_client',
89   'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
90             '*tls': 'bool' } }
93 # @NameInfo:
95 # Guest name information.
97 # @name: #optional The name of the guest
99 # Since 0.14.0
101 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
104 # @query-name:
106 # Return the name information of a guest.
108 # Returns: @NameInfo of the guest
110 # Since 0.14.0
112 { 'command': 'query-name', 'returns': 'NameInfo' }
115 # @KvmInfo:
117 # Information about support for KVM acceleration
119 # @enabled: true if KVM acceleration is active
121 # @present: true if KVM acceleration is built into this executable
123 # Since: 0.14.0
125 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
128 # @query-kvm:
130 # Returns information about KVM acceleration
132 # Returns: @KvmInfo
134 # Since: 0.14.0
136 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
139 # @RunState
141 # An enumeration of VM run states.
143 # @debug: QEMU is running on a debugger
145 # @finish-migrate: guest is paused to finish the migration process
147 # @inmigrate: guest is paused waiting for an incoming migration.  Note
148 # that this state does not tell whether the machine will start at the
149 # end of the migration.  This depends on the command-line -S option and
150 # any invocation of 'stop' or 'cont' that has happened since QEMU was
151 # started.
153 # @internal-error: An internal error that prevents further guest execution
154 # has occurred
156 # @io-error: the last IOP has failed and the device is configured to pause
157 # on I/O errors
159 # @paused: guest has been paused via the 'stop' command
161 # @postmigrate: guest is paused following a successful 'migrate'
163 # @prelaunch: QEMU was started with -S and guest has not started
165 # @restore-vm: guest is paused to restore VM state
167 # @running: guest is actively running
169 # @save-vm: guest is paused to save the VM state
171 # @shutdown: guest is shut down (and -no-shutdown is in use)
173 # @suspended: guest is suspended (ACPI S3)
175 # @watchdog: the watchdog action is configured to pause and has been triggered
177 # @guest-panicked: guest has been panicked as a result of guest OS panic
179 { 'enum': 'RunState',
180   'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
181             'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
182             'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
183             'guest-panicked' ] }
186 # @StatusInfo:
188 # Information about VCPU run state
190 # @running: true if all VCPUs are runnable, false if not runnable
192 # @singlestep: true if VCPUs are in single-step mode
194 # @status: the virtual machine @RunState
196 # Since:  0.14.0
198 # Notes: @singlestep is enabled through the GDB stub
200 { 'struct': 'StatusInfo',
201   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
204 # @query-status:
206 # Query the run status of all VCPUs
208 # Returns: @StatusInfo reflecting all VCPUs
210 # Since:  0.14.0
212 { 'command': 'query-status', 'returns': 'StatusInfo' }
215 # @UuidInfo:
217 # Guest UUID information.
219 # @UUID: the UUID of the guest
221 # Since: 0.14.0
223 # Notes: If no UUID was specified for the guest, a null UUID is returned.
225 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
228 # @query-uuid:
230 # Query the guest UUID information.
232 # Returns: The @UuidInfo for the guest
234 # Since 0.14.0
236 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
239 # @ChardevInfo:
241 # Information about a character device.
243 # @label: the label of the character device
245 # @filename: the filename of the character device
247 # @frontend-open: shows whether the frontend device attached to this backend
248 #                 (eg. with the chardev=... option) is in open or closed state
249 #                 (since 2.1)
251 # Notes: @filename is encoded using the QEMU command line character device
252 #        encoding.  See the QEMU man page for details.
254 # Since: 0.14.0
256 { 'struct': 'ChardevInfo', 'data': {'label': 'str',
257                                   'filename': 'str',
258                                   'frontend-open': 'bool'} }
261 # @query-chardev:
263 # Returns information about current character devices.
265 # Returns: a list of @ChardevInfo
267 # Since: 0.14.0
269 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
272 # @ChardevBackendInfo:
274 # Information about a character device backend
276 # @name: The backend name
278 # Since: 2.0
280 { 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} }
283 # @query-chardev-backends:
285 # Returns information about character device backends.
287 # Returns: a list of @ChardevBackendInfo
289 # Since: 2.0
291 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
294 # @DataFormat:
296 # An enumeration of data format.
298 # @utf8: Data is a UTF-8 string (RFC 3629)
300 # @base64: Data is Base64 encoded binary (RFC 3548)
302 # Since: 1.4
304 { 'enum': 'DataFormat',
305   'data': [ 'utf8', 'base64' ] }
308 # @ringbuf-write:
310 # Write to a ring buffer character device.
312 # @device: the ring buffer character device name
314 # @data: data to write
316 # @format: #optional data encoding (default 'utf8').
317 #          - base64: data must be base64 encoded text.  Its binary
318 #            decoding gets written.
319 #          - utf8: data's UTF-8 encoding is written
320 #          - data itself is always Unicode regardless of format, like
321 #            any other string.
323 # Returns: Nothing on success
325 # Since: 1.4
327 { 'command': 'ringbuf-write',
328   'data': {'device': 'str', 'data': 'str',
329            '*format': 'DataFormat'} }
332 # @ringbuf-read:
334 # Read from a ring buffer character device.
336 # @device: the ring buffer character device name
338 # @size: how many bytes to read at most
340 # @format: #optional data encoding (default 'utf8').
341 #          - base64: the data read is returned in base64 encoding.
342 #          - utf8: the data read is interpreted as UTF-8.
343 #            Bug: can screw up when the buffer contains invalid UTF-8
344 #            sequences, NUL characters, after the ring buffer lost
345 #            data, and when reading stops because the size limit is
346 #            reached.
347 #          - The return value is always Unicode regardless of format,
348 #            like any other string.
350 # Returns: data read from the device
352 # Since: 1.4
354 { 'command': 'ringbuf-read',
355   'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
356   'returns': 'str' }
359 # @EventInfo:
361 # Information about a QMP event
363 # @name: The event name
365 # Since: 1.2.0
367 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
370 # @query-events:
372 # Return a list of supported QMP events by this server
374 # Returns: A list of @EventInfo for all supported events
376 # Since: 1.2.0
378 { 'command': 'query-events', 'returns': ['EventInfo'] }
381 # @MigrationStats
383 # Detailed migration status.
385 # @transferred: amount of bytes already transferred to the target VM
387 # @remaining: amount of bytes remaining to be transferred to the target VM
389 # @total: total amount of bytes involved in the migration process
391 # @duplicate: number of duplicate (zero) pages (since 1.2)
393 # @skipped: number of skipped zero pages (since 1.5)
395 # @normal : number of normal pages (since 1.2)
397 # @normal-bytes: number of normal bytes sent (since 1.2)
399 # @dirty-pages-rate: number of pages dirtied by second by the
400 #        guest (since 1.3)
402 # @mbps: throughput in megabits/sec. (since 1.6)
404 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
406 # @postcopy-requests: The number of page requests received from the destination
407 #        (since 2.7)
409 # Since: 0.14.0
411 { 'struct': 'MigrationStats',
412   'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
413            'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
414            'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
415            'mbps' : 'number', 'dirty-sync-count' : 'int',
416            'postcopy-requests' : 'int' } }
419 # @XBZRLECacheStats
421 # Detailed XBZRLE migration cache statistics
423 # @cache-size: XBZRLE cache size
425 # @bytes: amount of bytes already transferred to the target VM
427 # @pages: amount of pages transferred to the target VM
429 # @cache-miss: number of cache miss
431 # @cache-miss-rate: rate of cache miss (since 2.1)
433 # @overflow: number of overflows
435 # Since: 1.2
437 { 'struct': 'XBZRLECacheStats',
438   'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
439            'cache-miss': 'int', 'cache-miss-rate': 'number',
440            'overflow': 'int' } }
442 # @MigrationStatus:
444 # An enumeration of migration status.
446 # @none: no migration has ever happened.
448 # @setup: migration process has been initiated.
450 # @cancelling: in the process of cancelling migration.
452 # @cancelled: cancelling migration is finished.
454 # @active: in the process of doing migration.
456 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
458 # @completed: migration is finished.
460 # @failed: some error occurred during migration process.
462 # Since: 2.3
465 { 'enum': 'MigrationStatus',
466   'data': [ 'none', 'setup', 'cancelling', 'cancelled',
467             'active', 'postcopy-active', 'completed', 'failed' ] }
470 # @MigrationInfo
472 # Information about current migration process.
474 # @status: #optional @MigrationStatus describing the current migration status.
475 #          If this field is not returned, no migration process
476 #          has been initiated
478 # @ram: #optional @MigrationStats containing detailed migration
479 #       status, only returned if status is 'active' or
480 #       'completed'(since 1.2)
482 # @disk: #optional @MigrationStats containing detailed disk migration
483 #        status, only returned if status is 'active' and it is a block
484 #        migration
486 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
487 #                migration statistics, only returned if XBZRLE feature is on and
488 #                status is 'active' or 'completed' (since 1.2)
490 # @total-time: #optional total amount of milliseconds since migration started.
491 #        If migration has ended, it returns the total migration
492 #        time. (since 1.2)
494 # @downtime: #optional only present when migration finishes correctly
495 #        total downtime in milliseconds for the guest.
496 #        (since 1.3)
498 # @expected-downtime: #optional only present while migration is active
499 #        expected downtime in milliseconds for the guest in last walk
500 #        of the dirty bitmap. (since 1.3)
502 # @setup-time: #optional amount of setup time in milliseconds _before_ the
503 #        iterations begin but _after_ the QMP command is issued. This is designed
504 #        to provide an accounting of any activities (such as RDMA pinning) which
505 #        may be expensive, but do not actually occur during the iterative
506 #        migration rounds themselves. (since 1.6)
508 # @cpu-throttle-percentage: #optional percentage of time guest cpus are being
509 #        throttled during auto-converge. This is only present when auto-converge
510 #        has started throttling guest cpus. (Since 2.7)
512 # @error-desc: #optional the human readable error description string, when
513 #              @status is 'failed'. Clients should not attempt to parse the
514 #              error strings. (Since 2.7)
516 # Since: 0.14.0
518 { 'struct': 'MigrationInfo',
519   'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
520            '*disk': 'MigrationStats',
521            '*xbzrle-cache': 'XBZRLECacheStats',
522            '*total-time': 'int',
523            '*expected-downtime': 'int',
524            '*downtime': 'int',
525            '*setup-time': 'int',
526            '*cpu-throttle-percentage': 'int',
527            '*error-desc': 'str'} }
530 # @query-migrate
532 # Returns information about current migration process.
534 # Returns: @MigrationInfo
536 # Since: 0.14.0
538 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
541 # @MigrationCapability
543 # Migration capabilities enumeration
545 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
546 #          This feature allows us to minimize migration traffic for certain work
547 #          loads, by sending compressed difference of the pages
549 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
550 #          mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
551 #          Disabled by default. (since 2.0)
553 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
554 #          essentially saves 1MB of zeroes per block on the wire. Enabling requires
555 #          source and target VM to support this feature. To enable it is sufficient
556 #          to enable the capability on the source VM. The feature is disabled by
557 #          default. (since 1.6)
559 # @compress: Use multiple compression threads to accelerate live migration.
560 #          This feature can help to reduce the migration traffic, by sending
561 #          compressed pages. Please note that if compress and xbzrle are both
562 #          on, compress only takes effect in the ram bulk stage, after that,
563 #          it will be disabled and only xbzrle takes effect, this can help to
564 #          minimize migration traffic. The feature is disabled by default.
565 #          (since 2.4 )
567 # @events: generate events for each migration state change
568 #          (since 2.4 )
570 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
571 #          to speed up convergence of RAM migration. (since 1.6)
573 # @postcopy-ram: Start executing on the migration target before all of RAM has
574 #          been migrated, pulling the remaining pages along as needed. NOTE: If
575 #          the migration fails during postcopy the VM will fail.  (since 2.6)
577 # Since: 1.2
579 { 'enum': 'MigrationCapability',
580   'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
581            'compress', 'events', 'postcopy-ram'] }
584 # @MigrationCapabilityStatus
586 # Migration capability information
588 # @capability: capability enum
590 # @state: capability state bool
592 # Since: 1.2
594 { 'struct': 'MigrationCapabilityStatus',
595   'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
598 # @migrate-set-capabilities
600 # Enable/Disable the following migration capabilities (like xbzrle)
602 # @capabilities: json array of capability modifications to make
604 # Since: 1.2
606 { 'command': 'migrate-set-capabilities',
607   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
610 # @query-migrate-capabilities
612 # Returns information about the current migration capabilities status
614 # Returns: @MigrationCapabilitiesStatus
616 # Since: 1.2
618 { 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}
620 # @MigrationParameter
622 # Migration parameters enumeration
624 # @compress-level: Set the compression level to be used in live migration,
625 #          the compression level is an integer between 0 and 9, where 0 means
626 #          no compression, 1 means the best compression speed, and 9 means best
627 #          compression ratio which will consume more CPU.
629 # @compress-threads: Set compression thread count to be used in live migration,
630 #          the compression thread count is an integer between 1 and 255.
632 # @decompress-threads: Set decompression thread count to be used in live
633 #          migration, the decompression thread count is an integer between 1
634 #          and 255. Usually, decompression is at least 4 times as fast as
635 #          compression, so set the decompress-threads to the number about 1/4
636 #          of compress-threads is adequate.
638 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
639 #                        when migration auto-converge is activated. The
640 #                        default value is 20. (Since 2.7)
642 # @cpu-throttle-increment: throttle percentage increase each time
643 #                          auto-converge detects that migration is not making
644 #                          progress. The default value is 10. (Since 2.7)
646 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
647 #             establishing a TLS connection over the migration data channel.
648 #             On the outgoing side of the migration, the credentials must
649 #             be for a 'client' endpoint, while for the incoming side the
650 #             credentials must be for a 'server' endpoint. Setting this
651 #             will enable TLS for all migrations. The default is unset,
652 #             resulting in unsecured migration at the QEMU level. (Since 2.7)
654 # @tls-hostname: hostname of the target host for the migration. This is
655 #                required when using x509 based TLS credentials and the
656 #                migration URI does not already include a hostname. For
657 #                example if using fd: or exec: based migration, the
658 #                hostname must be provided so that the server's x509
659 #                certificate identity can be validated. (Since 2.7)
661 # Since: 2.4
663 { 'enum': 'MigrationParameter',
664   'data': ['compress-level', 'compress-threads', 'decompress-threads',
665            'cpu-throttle-initial', 'cpu-throttle-increment',
666            'tls-creds', 'tls-hostname'] }
669 # @migrate-set-parameters
671 # Set the following migration parameters
673 # @compress-level: compression level
675 # @compress-threads: compression thread count
677 # @decompress-threads: decompression thread count
679 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
680 #                        when migration auto-converge is activated. The
681 #                        default value is 20. (Since 2.7)
683 # @cpu-throttle-increment: throttle percentage increase each time
684 #                          auto-converge detects that migration is not making
685 #                          progress. The default value is 10. (Since 2.7)
687 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
688 #             establishing a TLS connection over the migration data channel.
689 #             On the outgoing side of the migration, the credentials must
690 #             be for a 'client' endpoint, while for the incoming side the
691 #             credentials must be for a 'server' endpoint. Setting this
692 #             will enable TLS for all migrations. The default is unset,
693 #             resulting in unsecured migration at the QEMU level. (Since 2.7)
695 # @tls-hostname: hostname of the target host for the migration. This is
696 #                required when using x509 based TLS credentials and the
697 #                migration URI does not already include a hostname. For
698 #                example if using fd: or exec: based migration, the
699 #                hostname must be provided so that the server's x509
700 #                certificate identity can be validated. (Since 2.7)
702 # Since: 2.4
704 { 'command': 'migrate-set-parameters',
705   'data': { '*compress-level': 'int',
706             '*compress-threads': 'int',
707             '*decompress-threads': 'int',
708             '*cpu-throttle-initial': 'int',
709             '*cpu-throttle-increment': 'int',
710             '*tls-creds': 'str',
711             '*tls-hostname': 'str'} }
714 # @MigrationParameters
716 # @compress-level: compression level
718 # @compress-threads: compression thread count
720 # @decompress-threads: decompression thread count
722 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
723 #                        when migration auto-converge is activated. The
724 #                        default value is 20. (Since 2.7)
726 # @cpu-throttle-increment: throttle percentage increase each time
727 #                          auto-converge detects that migration is not making
728 #                          progress. The default value is 10. (Since 2.7)
730 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
731 #             establishing a TLS connection over the migration data channel.
732 #             On the outgoing side of the migration, the credentials must
733 #             be for a 'client' endpoint, while for the incoming side the
734 #             credentials must be for a 'server' endpoint. Setting this
735 #             will enable TLS for all migrations. The default is unset,
736 #             resulting in unsecured migration at the QEMU level. (Since 2.7)
738 # @tls-hostname: hostname of the target host for the migration. This is
739 #                required when using x509 based TLS credentials and the
740 #                migration URI does not already include a hostname. For
741 #                example if using fd: or exec: based migration, the
742 #                hostname must be provided so that the server's x509
743 #                certificate identity can be validated. (Since 2.7)
745 # Since: 2.4
747 { 'struct': 'MigrationParameters',
748   'data': { 'compress-level': 'int',
749             'compress-threads': 'int',
750             'decompress-threads': 'int',
751             'cpu-throttle-initial': 'int',
752             'cpu-throttle-increment': 'int',
753             'tls-creds': 'str',
754             'tls-hostname': 'str'} }
756 # @query-migrate-parameters
758 # Returns information about the current migration parameters
760 # Returns: @MigrationParameters
762 # Since: 2.4
764 { 'command': 'query-migrate-parameters',
765   'returns': 'MigrationParameters' }
768 # @client_migrate_info
770 # Set migration information for remote display.  This makes the server
771 # ask the client to automatically reconnect using the new parameters
772 # once migration finished successfully.  Only implemented for SPICE.
774 # @protocol:     must be "spice"
775 # @hostname:     migration target hostname
776 # @port:         #optional spice tcp port for plaintext channels
777 # @tls-port:     #optional spice tcp port for tls-secured channels
778 # @cert-subject: #optional server certificate subject
780 # Since: 0.14.0
782 { 'command': 'client_migrate_info',
783   'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
784             '*tls-port': 'int', '*cert-subject': 'str' } }
787 # @migrate-start-postcopy
789 # Followup to a migration command to switch the migration to postcopy mode.
790 # The postcopy-ram capability must be set before the original migration
791 # command.
793 # Since: 2.5
794 { 'command': 'migrate-start-postcopy' }
797 # @MouseInfo:
799 # Information about a mouse device.
801 # @name: the name of the mouse device
803 # @index: the index of the mouse device
805 # @current: true if this device is currently receiving mouse events
807 # @absolute: true if this device supports absolute coordinates as input
809 # Since: 0.14.0
811 { 'struct': 'MouseInfo',
812   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
813            'absolute': 'bool'} }
816 # @query-mice:
818 # Returns information about each active mouse device
820 # Returns: a list of @MouseInfo for each device
822 # Since: 0.14.0
824 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
827 # @CpuInfoArch:
829 # An enumeration of cpu types that enable additional information during
830 # @query-cpus.
832 # Since: 2.6
834 { 'enum': 'CpuInfoArch',
835   'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
838 # @CpuInfo:
840 # Information about a virtual CPU
842 # @CPU: the index of the virtual CPU
844 # @current: this only exists for backwards compatibility and should be ignored
846 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
847 #          to a processor specific low power mode.
849 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
851 # @thread_id: ID of the underlying host thread
853 # @arch: architecture of the cpu, which determines which additional fields
854 #        will be listed (since 2.6)
856 # Since: 0.14.0
858 # Notes: @halted is a transient state that changes frequently.  By the time the
859 #        data is sent to the client, the guest may no longer be halted.
861 { 'union': 'CpuInfo',
862   'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
863            'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' },
864   'discriminator': 'arch',
865   'data': { 'x86': 'CpuInfoX86',
866             'sparc': 'CpuInfoSPARC',
867             'ppc': 'CpuInfoPPC',
868             'mips': 'CpuInfoMIPS',
869             'tricore': 'CpuInfoTricore',
870             'other': 'CpuInfoOther' } }
873 # @CpuInfoX86:
875 # Additional information about a virtual i386 or x86_64 CPU
877 # @pc: the 64-bit instruction pointer
879 # Since 2.6
881 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
884 # @CpuInfoSPARC:
886 # Additional information about a virtual SPARC CPU
888 # @pc: the PC component of the instruction pointer
890 # @npc: the NPC component of the instruction pointer
892 # Since 2.6
894 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
897 # @CpuInfoPPC:
899 # Additional information about a virtual PPC CPU
901 # @nip: the instruction pointer
903 # Since 2.6
905 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
908 # @CpuInfoMIPS:
910 # Additional information about a virtual MIPS CPU
912 # @PC: the instruction pointer
914 # Since 2.6
916 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
919 # @CpuInfoTricore:
921 # Additional information about a virtual Tricore CPU
923 # @PC: the instruction pointer
925 # Since 2.6
927 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
930 # @CpuInfoOther:
932 # No additional information is available about the virtual CPU
934 # Since 2.6
937 { 'struct': 'CpuInfoOther', 'data': { } }
940 # @query-cpus:
942 # Returns a list of information about each virtual CPU.
944 # Returns: a list of @CpuInfo for each virtual CPU
946 # Since: 0.14.0
948 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
951 # @IOThreadInfo:
953 # Information about an iothread
955 # @id: the identifier of the iothread
957 # @thread-id: ID of the underlying host thread
959 # Since: 2.0
961 { 'struct': 'IOThreadInfo',
962   'data': {'id': 'str', 'thread-id': 'int'} }
965 # @query-iothreads:
967 # Returns a list of information about each iothread.
969 # Note this list excludes the QEMU main loop thread, which is not declared
970 # using the -object iothread command-line option.  It is always the main thread
971 # of the process.
973 # Returns: a list of @IOThreadInfo for each iothread
975 # Since: 2.0
977 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
980 # @NetworkAddressFamily
982 # The network address family
984 # @ipv4: IPV4 family
986 # @ipv6: IPV6 family
988 # @unix: unix socket
990 # @unknown: otherwise
992 # Since: 2.1
994 { 'enum': 'NetworkAddressFamily',
995   'data': [ 'ipv4', 'ipv6', 'unix', 'unknown' ] }
998 # @VncBasicInfo
1000 # The basic information for vnc network connection
1002 # @host: IP address
1004 # @service: The service name of the vnc port. This may depend on the host
1005 #           system's service database so symbolic names should not be relied
1006 #           on.
1008 # @family: address family
1010 # @websocket: true in case the socket is a websocket (since 2.3).
1012 # Since: 2.1
1014 { 'struct': 'VncBasicInfo',
1015   'data': { 'host': 'str',
1016             'service': 'str',
1017             'family': 'NetworkAddressFamily',
1018             'websocket': 'bool' } }
1021 # @VncServerInfo
1023 # The network connection information for server
1025 # @auth: #optional, authentication method
1027 # Since: 2.1
1029 { 'struct': 'VncServerInfo',
1030   'base': 'VncBasicInfo',
1031   'data': { '*auth': 'str' } }
1034 # @VncClientInfo:
1036 # Information about a connected VNC client.
1038 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
1039 #              Name of the client.
1041 # @sasl_username: #optional If SASL authentication is in use, the SASL username
1042 #                 used for authentication.
1044 # Since: 0.14.0
1046 { 'struct': 'VncClientInfo',
1047   'base': 'VncBasicInfo',
1048   'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1051 # @VncInfo:
1053 # Information about the VNC session.
1055 # @enabled: true if the VNC server is enabled, false otherwise
1057 # @host: #optional The hostname the VNC server is bound to.  This depends on
1058 #        the name resolution on the host and may be an IP address.
1060 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
1061 #                    'ipv4' if the host is listening for IPv4 connections
1062 #                    'unix' if the host is listening on a unix domain socket
1063 #                    'unknown' otherwise
1065 # @service: #optional The service name of the server's port.  This may depends
1066 #           on the host system's service database so symbolic names should not
1067 #           be relied on.
1069 # @auth: #optional the current authentication type used by the server
1070 #        'none' if no authentication is being used
1071 #        'vnc' if VNC authentication is being used
1072 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
1073 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1074 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1075 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1076 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1077 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1078 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1079 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1080 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1082 # @clients: a list of @VncClientInfo of all currently connected clients
1084 # Since: 0.14.0
1086 { 'struct': 'VncInfo',
1087   'data': {'enabled': 'bool', '*host': 'str',
1088            '*family': 'NetworkAddressFamily',
1089            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1092 # @VncPriAuth:
1094 # vnc primary authentication method.
1096 # Since: 2.3
1098 { 'enum': 'VncPrimaryAuth',
1099   'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1100             'tls', 'vencrypt', 'sasl' ] }
1103 # @VncVencryptSubAuth:
1105 # vnc sub authentication method with vencrypt.
1107 # Since: 2.3
1109 { 'enum': 'VncVencryptSubAuth',
1110   'data': [ 'plain',
1111             'tls-none',  'x509-none',
1112             'tls-vnc',   'x509-vnc',
1113             'tls-plain', 'x509-plain',
1114             'tls-sasl',  'x509-sasl' ] }
1117 # @VncInfo2:
1119 # Information about a vnc server
1121 # @id: vnc server name.
1123 # @server: A list of @VncBasincInfo describing all listening sockets.
1124 #          The list can be empty (in case the vnc server is disabled).
1125 #          It also may have multiple entries: normal + websocket,
1126 #          possibly also ipv4 + ipv6 in the future.
1128 # @clients: A list of @VncClientInfo of all currently connected clients.
1129 #           The list can be empty, for obvious reasons.
1131 # @auth: The current authentication type used by the server
1133 # @vencrypt: #optional The vencrypt sub authentication type used by the server,
1134 #            only specified in case auth == vencrypt.
1136 # @display: #optional The display device the vnc server is linked to.
1138 # Since: 2.3
1140 { 'struct': 'VncInfo2',
1141   'data': { 'id'        : 'str',
1142             'server'    : ['VncBasicInfo'],
1143             'clients'   : ['VncClientInfo'],
1144             'auth'      : 'VncPrimaryAuth',
1145             '*vencrypt' : 'VncVencryptSubAuth',
1146             '*display'  : 'str' } }
1149 # @query-vnc:
1151 # Returns information about the current VNC server
1153 # Returns: @VncInfo
1155 # Since: 0.14.0
1157 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1160 # @query-vnc-servers:
1162 # Returns a list of vnc servers.  The list can be empty.
1164 # Returns: a list of @VncInfo2
1166 # Since: 2.3
1168 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1171 # @SpiceBasicInfo
1173 # The basic information for SPICE network connection
1175 # @host: IP address
1177 # @port: port number
1179 # @family: address family
1181 # Since: 2.1
1183 { 'struct': 'SpiceBasicInfo',
1184   'data': { 'host': 'str',
1185             'port': 'str',
1186             'family': 'NetworkAddressFamily' } }
1189 # @SpiceServerInfo
1191 # Information about a SPICE server
1193 # @auth: #optional, authentication method
1195 # Since: 2.1
1197 { 'struct': 'SpiceServerInfo',
1198   'base': 'SpiceBasicInfo',
1199   'data': { '*auth': 'str' } }
1202 # @SpiceChannel
1204 # Information about a SPICE client channel.
1206 # @connection-id: SPICE connection id number.  All channels with the same id
1207 #                 belong to the same SPICE session.
1209 # @channel-type: SPICE channel type number.  "1" is the main control
1210 #                channel, filter for this one if you want to track spice
1211 #                sessions only
1213 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
1214 #              multiple channels of the same type exist, such as multiple
1215 #              display channels in a multihead setup
1217 # @tls: true if the channel is encrypted, false otherwise.
1219 # Since: 0.14.0
1221 { 'struct': 'SpiceChannel',
1222   'base': 'SpiceBasicInfo',
1223   'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1224            'tls': 'bool'} }
1227 # @SpiceQueryMouseMode
1229 # An enumeration of Spice mouse states.
1231 # @client: Mouse cursor position is determined by the client.
1233 # @server: Mouse cursor position is determined by the server.
1235 # @unknown: No information is available about mouse mode used by
1236 #           the spice server.
1238 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1240 # Since: 1.1
1242 { 'enum': 'SpiceQueryMouseMode',
1243   'data': [ 'client', 'server', 'unknown' ] }
1246 # @SpiceInfo
1248 # Information about the SPICE session.
1250 # @enabled: true if the SPICE server is enabled, false otherwise
1252 # @migrated: true if the last guest migration completed and spice
1253 #            migration had completed as well. false otherwise.
1255 # @host: #optional The hostname the SPICE server is bound to.  This depends on
1256 #        the name resolution on the host and may be an IP address.
1258 # @port: #optional The SPICE server's port number.
1260 # @compiled-version: #optional SPICE server version.
1262 # @tls-port: #optional The SPICE server's TLS port number.
1264 # @auth: #optional the current authentication type used by the server
1265 #        'none'  if no authentication is being used
1266 #        'spice' uses SASL or direct TLS authentication, depending on command
1267 #                line options
1269 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1270 #              be determined by the client or the server, or unknown if spice
1271 #              server doesn't provide this information.
1273 #              Since: 1.1
1275 # @channels: a list of @SpiceChannel for each active spice channel
1277 # Since: 0.14.0
1279 { 'struct': 'SpiceInfo',
1280   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1281            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1282            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1285 # @query-spice
1287 # Returns information about the current SPICE server
1289 # Returns: @SpiceInfo
1291 # Since: 0.14.0
1293 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1296 # @BalloonInfo:
1298 # Information about the guest balloon device.
1300 # @actual: the number of bytes the balloon currently contains
1302 # Since: 0.14.0
1305 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1308 # @query-balloon:
1310 # Return information about the balloon device.
1312 # Returns: @BalloonInfo on success
1313 #          If the balloon driver is enabled but not functional because the KVM
1314 #          kernel module cannot support it, KvmMissingCap
1315 #          If no balloon device is present, DeviceNotActive
1317 # Since: 0.14.0
1319 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1322 # @PciMemoryRange:
1324 # A PCI device memory region
1326 # @base: the starting address (guest physical)
1328 # @limit: the ending address (guest physical)
1330 # Since: 0.14.0
1332 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1335 # @PciMemoryRegion
1337 # Information about a PCI device I/O region.
1339 # @bar: the index of the Base Address Register for this region
1341 # @type: 'io' if the region is a PIO region
1342 #        'memory' if the region is a MMIO region
1344 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1346 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1348 # Since: 0.14.0
1350 { 'struct': 'PciMemoryRegion',
1351   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1352            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1355 # @PciBusInfo:
1357 # Information about a bus of a PCI Bridge device
1359 # @number: primary bus interface number.  This should be the number of the
1360 #          bus the device resides on.
1362 # @secondary: secondary bus interface number.  This is the number of the
1363 #             main bus for the bridge
1365 # @subordinate: This is the highest number bus that resides below the
1366 #               bridge.
1368 # @io_range: The PIO range for all devices on this bridge
1370 # @memory_range: The MMIO range for all devices on this bridge
1372 # @prefetchable_range: The range of prefetchable MMIO for all devices on
1373 #                      this bridge
1375 # Since: 2.4
1377 { 'struct': 'PciBusInfo',
1378   'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1379            'io_range': 'PciMemoryRange',
1380            'memory_range': 'PciMemoryRange',
1381            'prefetchable_range': 'PciMemoryRange' } }
1384 # @PciBridgeInfo:
1386 # Information about a PCI Bridge device
1388 # @bus: information about the bus the device resides on
1390 # @devices: a list of @PciDeviceInfo for each device on this bridge
1392 # Since: 0.14.0
1394 { 'struct': 'PciBridgeInfo',
1395   'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
1398 # @PciDeviceClass:
1400 # Information about the Class of a PCI device
1402 # @desc: #optional a string description of the device's class
1404 # @class: the class code of the device
1406 # Since: 2.4
1408 { 'struct': 'PciDeviceClass',
1409   'data': {'*desc': 'str', 'class': 'int'} }
1412 # @PciDeviceId:
1414 # Information about the Id of a PCI device
1416 # @device: the PCI device id
1418 # @vendor: the PCI vendor id
1420 # Since: 2.4
1422 { 'struct': 'PciDeviceId',
1423   'data': {'device': 'int', 'vendor': 'int'} }
1426 # @PciDeviceInfo:
1428 # Information about a PCI device
1430 # @bus: the bus number of the device
1432 # @slot: the slot the device is located in
1434 # @function: the function of the slot used by the device
1436 # @class_info: the class of the device
1438 # @id: the PCI device id
1440 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1442 # @qdev_id: the device name of the PCI device
1444 # @pci_bridge: if the device is a PCI bridge, the bridge information
1446 # @regions: a list of the PCI I/O regions associated with the device
1448 # Notes: the contents of @class_info.desc are not stable and should only be
1449 #        treated as informational.
1451 # Since: 0.14.0
1453 { 'struct': 'PciDeviceInfo',
1454   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1455            'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
1456            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1457            'regions': ['PciMemoryRegion']} }
1460 # @PciInfo:
1462 # Information about a PCI bus
1464 # @bus: the bus index
1466 # @devices: a list of devices on this bus
1468 # Since: 0.14.0
1470 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1473 # @query-pci:
1475 # Return information about the PCI bus topology of the guest.
1477 # Returns: a list of @PciInfo for each PCI bus
1479 # Since: 0.14.0
1481 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1484 # @quit:
1486 # This command will cause the QEMU process to exit gracefully.  While every
1487 # attempt is made to send the QMP response before terminating, this is not
1488 # guaranteed.  When using this interface, a premature EOF would not be
1489 # unexpected.
1491 # Since: 0.14.0
1493 { 'command': 'quit' }
1496 # @stop:
1498 # Stop all guest VCPU execution.
1500 # Since:  0.14.0
1502 # Notes:  This function will succeed even if the guest is already in the stopped
1503 #         state.  In "inmigrate" state, it will ensure that the guest
1504 #         remains paused once migration finishes, as if the -S option was
1505 #         passed on the command line.
1507 { 'command': 'stop' }
1510 # @system_reset:
1512 # Performs a hard reset of a guest.
1514 # Since: 0.14.0
1516 { 'command': 'system_reset' }
1519 # @system_powerdown:
1521 # Requests that a guest perform a powerdown operation.
1523 # Since: 0.14.0
1525 # Notes: A guest may or may not respond to this command.  This command
1526 #        returning does not indicate that a guest has accepted the request or
1527 #        that it has shut down.  Many guests will respond to this command by
1528 #        prompting the user in some way.
1530 { 'command': 'system_powerdown' }
1533 # @cpu:
1535 # This command is a nop that is only provided for the purposes of compatibility.
1537 # Since: 0.14.0
1539 # Notes: Do not use this command.
1541 { 'command': 'cpu', 'data': {'index': 'int'} }
1544 # @cpu-add
1546 # Adds CPU with specified ID
1548 # @id: ID of CPU to be created, valid values [0..max_cpus)
1550 # Returns: Nothing on success
1552 # Since 1.5
1554 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1557 # @memsave:
1559 # Save a portion of guest memory to a file.
1561 # @val: the virtual address of the guest to start from
1563 # @size: the size of memory region to save
1565 # @filename: the file to save the memory to as binary data
1567 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1568 #                       virtual address (defaults to CPU 0)
1570 # Returns: Nothing on success
1572 # Since: 0.14.0
1574 # Notes: Errors were not reliably returned until 1.1
1576 { 'command': 'memsave',
1577   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1580 # @pmemsave:
1582 # Save a portion of guest physical memory to a file.
1584 # @val: the physical address of the guest to start from
1586 # @size: the size of memory region to save
1588 # @filename: the file to save the memory to as binary data
1590 # Returns: Nothing on success
1592 # Since: 0.14.0
1594 # Notes: Errors were not reliably returned until 1.1
1596 { 'command': 'pmemsave',
1597   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1600 # @cont:
1602 # Resume guest VCPU execution.
1604 # Since:  0.14.0
1606 # Returns:  If successful, nothing
1607 #           If QEMU was started with an encrypted block device and a key has
1608 #              not yet been set, DeviceEncrypted.
1610 # Notes:  This command will succeed if the guest is currently running.  It
1611 #         will also succeed if the guest is in the "inmigrate" state; in
1612 #         this case, the effect of the command is to make sure the guest
1613 #         starts once migration finishes, removing the effect of the -S
1614 #         command line option if it was passed.
1616 { 'command': 'cont' }
1619 # @system_wakeup:
1621 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1623 # Since:  1.1
1625 # Returns:  nothing.
1627 { 'command': 'system_wakeup' }
1630 # @inject-nmi:
1632 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
1634 # Returns:  If successful, nothing
1636 # Since:  0.14.0
1638 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
1640 { 'command': 'inject-nmi' }
1643 # @set_link:
1645 # Sets the link status of a virtual network adapter.
1647 # @name: the device name of the virtual network adapter
1649 # @up: true to set the link status to be up
1651 # Returns: Nothing on success
1652 #          If @name is not a valid network device, DeviceNotFound
1654 # Since: 0.14.0
1656 # Notes: Not all network adapters support setting link status.  This command
1657 #        will succeed even if the network adapter does not support link status
1658 #        notification.
1660 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1663 # @balloon:
1665 # Request the balloon driver to change its balloon size.
1667 # @value: the target size of the balloon in bytes
1669 # Returns: Nothing on success
1670 #          If the balloon driver is enabled but not functional because the KVM
1671 #            kernel module cannot support it, KvmMissingCap
1672 #          If no balloon device is present, DeviceNotActive
1674 # Notes: This command just issues a request to the guest.  When it returns,
1675 #        the balloon size may not have changed.  A guest can change the balloon
1676 #        size independent of this command.
1678 # Since: 0.14.0
1680 { 'command': 'balloon', 'data': {'value': 'int'} }
1683 # @Abort
1685 # This action can be used to test transaction failure.
1687 # Since: 1.6
1689 { 'struct': 'Abort',
1690   'data': { } }
1693 # @ActionCompletionMode
1695 # An enumeration of Transactional completion modes.
1697 # @individual: Do not attempt to cancel any other Actions if any Actions fail
1698 #              after the Transaction request succeeds. All Actions that
1699 #              can complete successfully will do so without waiting on others.
1700 #              This is the default.
1702 # @grouped: If any Action fails after the Transaction succeeds, cancel all
1703 #           Actions. Actions do not complete until all Actions are ready to
1704 #           complete. May be rejected by Actions that do not support this
1705 #           completion mode.
1707 # Since: 2.5
1709 { 'enum': 'ActionCompletionMode',
1710   'data': [ 'individual', 'grouped' ] }
1713 # @TransactionAction
1715 # A discriminated record of operations that can be performed with
1716 # @transaction.
1718 # Since 1.1
1720 # drive-backup since 1.6
1721 # abort since 1.6
1722 # blockdev-snapshot-internal-sync since 1.7
1723 # blockdev-backup since 2.3
1724 # blockdev-snapshot since 2.5
1725 # block-dirty-bitmap-add since 2.5
1726 # block-dirty-bitmap-clear since 2.5
1728 { 'union': 'TransactionAction',
1729   'data': {
1730        'blockdev-snapshot': 'BlockdevSnapshot',
1731        'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
1732        'drive-backup': 'DriveBackup',
1733        'blockdev-backup': 'BlockdevBackup',
1734        'abort': 'Abort',
1735        'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
1736        'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
1737        'block-dirty-bitmap-clear': 'BlockDirtyBitmap'
1738    } }
1741 # @TransactionProperties
1743 # Optional arguments to modify the behavior of a Transaction.
1745 # @completion-mode: #optional Controls how jobs launched asynchronously by
1746 #                   Actions will complete or fail as a group.
1747 #                   See @ActionCompletionMode for details.
1749 # Since: 2.5
1751 { 'struct': 'TransactionProperties',
1752   'data': {
1753        '*completion-mode': 'ActionCompletionMode'
1754   }
1758 # @transaction
1760 # Executes a number of transactionable QMP commands atomically. If any
1761 # operation fails, then the entire set of actions will be abandoned and the
1762 # appropriate error returned.
1764 # @actions: List of @TransactionAction;
1765 #           information needed for the respective operations.
1767 # @properties: #optional structure of additional options to control the
1768 #              execution of the transaction. See @TransactionProperties
1769 #              for additional detail.
1771 # Returns: nothing on success
1772 #          Errors depend on the operations of the transaction
1774 # Note: The transaction aborts on the first failure.  Therefore, there will be
1775 # information on only one failed operation returned in an error condition, and
1776 # subsequent actions will not have been attempted.
1778 # Since 1.1
1780 { 'command': 'transaction',
1781   'data': { 'actions': [ 'TransactionAction' ],
1782             '*properties': 'TransactionProperties'
1783           }
1787 # @human-monitor-command:
1789 # Execute a command on the human monitor and return the output.
1791 # @command-line: the command to execute in the human monitor
1793 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1795 # Returns: the output of the command as a string
1797 # Since: 0.14.0
1799 # Notes: This command only exists as a stop-gap.  Its use is highly
1800 #        discouraged.  The semantics of this command are not guaranteed.
1802 #        Known limitations:
1804 #        o This command is stateless, this means that commands that depend
1805 #          on state information (such as getfd) might not work
1807 #       o Commands that prompt the user for data (eg. 'cont' when the block
1808 #         device is encrypted) don't currently work
1810 { 'command': 'human-monitor-command',
1811   'data': {'command-line': 'str', '*cpu-index': 'int'},
1812   'returns': 'str' }
1815 # @migrate_cancel
1817 # Cancel the current executing migration process.
1819 # Returns: nothing on success
1821 # Notes: This command succeeds even if there is no migration process running.
1823 # Since: 0.14.0
1825 { 'command': 'migrate_cancel' }
1828 # @migrate_set_downtime
1830 # Set maximum tolerated downtime for migration.
1832 # @value: maximum downtime in seconds
1834 # Returns: nothing on success
1836 # Since: 0.14.0
1838 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1841 # @migrate_set_speed
1843 # Set maximum speed for migration.
1845 # @value: maximum speed in bytes.
1847 # Returns: nothing on success
1849 # Notes: A value lesser than zero will be automatically round up to zero.
1851 # Since: 0.14.0
1853 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1856 # @migrate-set-cache-size
1858 # Set XBZRLE cache size
1860 # @value: cache size in bytes
1862 # The size will be rounded down to the nearest power of 2.
1863 # The cache size can be modified before and during ongoing migration
1865 # Returns: nothing on success
1867 # Since: 1.2
1869 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1872 # @query-migrate-cache-size
1874 # query XBZRLE cache size
1876 # Returns: XBZRLE cache size in bytes
1878 # Since: 1.2
1880 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1883 # @ObjectPropertyInfo:
1885 # @name: the name of the property
1887 # @type: the type of the property.  This will typically come in one of four
1888 #        forms:
1890 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1891 #           These types are mapped to the appropriate JSON type.
1893 #        2) A child type in the form 'child<subtype>' where subtype is a qdev
1894 #           device type name.  Child properties create the composition tree.
1896 #        3) A link type in the form 'link<subtype>' where subtype is a qdev
1897 #           device type name.  Link properties form the device model graph.
1899 # Since: 1.2
1901 { 'struct': 'ObjectPropertyInfo',
1902   'data': { 'name': 'str', 'type': 'str' } }
1905 # @qom-list:
1907 # This command will list any properties of a object given a path in the object
1908 # model.
1910 # @path: the path within the object model.  See @qom-get for a description of
1911 #        this parameter.
1913 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1914 #          object.
1916 # Since: 1.2
1918 { 'command': 'qom-list',
1919   'data': { 'path': 'str' },
1920   'returns': [ 'ObjectPropertyInfo' ] }
1923 # @qom-get:
1925 # This command will get a property from a object model path and return the
1926 # value.
1928 # @path: The path within the object model.  There are two forms of supported
1929 #        paths--absolute and partial paths.
1931 #        Absolute paths are derived from the root object and can follow child<>
1932 #        or link<> properties.  Since they can follow link<> properties, they
1933 #        can be arbitrarily long.  Absolute paths look like absolute filenames
1934 #        and are prefixed  with a leading slash.
1936 #        Partial paths look like relative filenames.  They do not begin
1937 #        with a prefix.  The matching rules for partial paths are subtle but
1938 #        designed to make specifying objects easy.  At each level of the
1939 #        composition tree, the partial path is matched as an absolute path.
1940 #        The first match is not returned.  At least two matches are searched
1941 #        for.  A successful result is only returned if only one match is
1942 #        found.  If more than one match is found, a flag is return to
1943 #        indicate that the match was ambiguous.
1945 # @property: The property name to read
1947 # Returns: The property value.  The type depends on the property
1948 #          type. child<> and link<> properties are returned as #str
1949 #          pathnames.  All integer property types (u8, u16, etc) are
1950 #          returned as #int.
1952 # Since: 1.2
1954 { 'command': 'qom-get',
1955   'data': { 'path': 'str', 'property': 'str' },
1956   'returns': 'any' }
1959 # @qom-set:
1961 # This command will set a property from a object model path.
1963 # @path: see @qom-get for a description of this parameter
1965 # @property: the property name to set
1967 # @value: a value who's type is appropriate for the property type.  See @qom-get
1968 #         for a description of type mapping.
1970 # Since: 1.2
1972 { 'command': 'qom-set',
1973   'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
1976 # @set_password:
1978 # Sets the password of a remote display session.
1980 # @protocol: `vnc' to modify the VNC server password
1981 #            `spice' to modify the Spice server password
1983 # @password: the new password
1985 # @connected: #optional how to handle existing clients when changing the
1986 #                       password.  If nothing is specified, defaults to `keep'
1987 #                       `fail' to fail the command if clients are connected
1988 #                       `disconnect' to disconnect existing clients
1989 #                       `keep' to maintain existing clients
1991 # Returns: Nothing on success
1992 #          If Spice is not enabled, DeviceNotFound
1994 # Since: 0.14.0
1996 { 'command': 'set_password',
1997   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2000 # @expire_password:
2002 # Expire the password of a remote display server.
2004 # @protocol: the name of the remote display protocol `vnc' or `spice'
2006 # @time: when to expire the password.
2007 #        `now' to expire the password immediately
2008 #        `never' to cancel password expiration
2009 #        `+INT' where INT is the number of seconds from now (integer)
2010 #        `INT' where INT is the absolute time in seconds
2012 # Returns: Nothing on success
2013 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
2015 # Since: 0.14.0
2017 # Notes: Time is relative to the server and currently there is no way to
2018 #        coordinate server time with client time.  It is not recommended to
2019 #        use the absolute time version of the @time parameter unless you're
2020 #        sure you are on the same machine as the QEMU instance.
2022 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2025 # @change-vnc-password:
2027 # Change the VNC server password.
2029 # @password:  the new password to use with VNC authentication
2031 # Since: 1.1
2033 # Notes:  An empty password in this command will set the password to the empty
2034 #         string.  Existing clients are unaffected by executing this command.
2036 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2039 # @change:
2041 # This command is multiple commands multiplexed together.
2043 # @device: This is normally the name of a block device but it may also be 'vnc'.
2044 #          when it's 'vnc', then sub command depends on @target
2046 # @target: If @device is a block device, then this is the new filename.
2047 #          If @device is 'vnc', then if the value 'password' selects the vnc
2048 #          change password command.   Otherwise, this specifies a new server URI
2049 #          address to listen to for VNC connections.
2051 # @arg:    If @device is a block device, then this is an optional format to open
2052 #          the device with.
2053 #          If @device is 'vnc' and @target is 'password', this is the new VNC
2054 #          password to set.  If this argument is an empty string, then no future
2055 #          logins will be allowed.
2057 # Returns: Nothing on success.
2058 #          If @device is not a valid block device, DeviceNotFound
2059 #          If the new block device is encrypted, DeviceEncrypted.  Note that
2060 #          if this error is returned, the device has been opened successfully
2061 #          and an additional call to @block_passwd is required to set the
2062 #          device's password.  The behavior of reads and writes to the block
2063 #          device between when these calls are executed is undefined.
2065 # Notes:  This interface is deprecated, and it is strongly recommended that you
2066 #         avoid using it.  For changing block devices, use
2067 #         blockdev-change-medium; for changing VNC parameters, use
2068 #         change-vnc-password.
2070 # Since: 0.14.0
2072 { 'command': 'change',
2073   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2076 # @ObjectTypeInfo:
2078 # This structure describes a search result from @qom-list-types
2080 # @name: the type name found in the search
2082 # Since: 1.1
2084 # Notes: This command is experimental and may change syntax in future releases.
2086 { 'struct': 'ObjectTypeInfo',
2087   'data': { 'name': 'str' } }
2090 # @qom-list-types:
2092 # This command will return a list of types given search parameters
2094 # @implements: if specified, only return types that implement this type name
2096 # @abstract: if true, include abstract types in the results
2098 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2100 # Since: 1.1
2102 { 'command': 'qom-list-types',
2103   'data': { '*implements': 'str', '*abstract': 'bool' },
2104   'returns': [ 'ObjectTypeInfo' ] }
2107 # @DevicePropertyInfo:
2109 # Information about device properties.
2111 # @name: the name of the property
2112 # @type: the typename of the property
2113 # @description: #optional if specified, the description of the property.
2114 #               (since 2.2)
2116 # Since: 1.2
2118 { 'struct': 'DevicePropertyInfo',
2119   'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
2122 # @device-list-properties:
2124 # List properties associated with a device.
2126 # @typename: the type name of a device
2128 # Returns: a list of DevicePropertyInfo describing a devices properties
2130 # Since: 1.2
2132 { 'command': 'device-list-properties',
2133   'data': { 'typename': 'str'},
2134   'returns': [ 'DevicePropertyInfo' ] }
2137 # @migrate
2139 # Migrates the current running guest to another Virtual Machine.
2141 # @uri: the Uniform Resource Identifier of the destination VM
2143 # @blk: #optional do block migration (full disk copy)
2145 # @inc: #optional incremental disk copy migration
2147 # @detach: this argument exists only for compatibility reasons and
2148 #          is ignored by QEMU
2150 # Returns: nothing on success
2152 # Since: 0.14.0
2154 { 'command': 'migrate',
2155   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2158 # @migrate-incoming
2160 # Start an incoming migration, the qemu must have been started
2161 # with -incoming defer
2163 # @uri: The Uniform Resource Identifier identifying the source or
2164 #       address to listen on
2166 # Returns: nothing on success
2168 # Since: 2.3
2169 # Note: It's a bad idea to use a string for the uri, but it needs to stay
2170 # compatible with -incoming and the format of the uri is already exposed
2171 # above libvirt
2173 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
2175 # @xen-save-devices-state:
2177 # Save the state of all devices to file. The RAM and the block devices
2178 # of the VM are not saved by this command.
2180 # @filename: the file to save the state of the devices to as binary
2181 # data. See xen-save-devices-state.txt for a description of the binary
2182 # format.
2184 # Returns: Nothing on success
2186 # Since: 1.1
2188 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2191 # @xen-set-global-dirty-log
2193 # Enable or disable the global dirty log mode.
2195 # @enable: true to enable, false to disable.
2197 # Returns: nothing
2199 # Since: 1.3
2201 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2204 # @device_add:
2206 # @driver: the name of the new device's driver
2208 # @bus: #optional the device's parent bus (device tree path)
2210 # @id: the device's ID, must be unique
2212 # Additional arguments depend on the type.
2214 # Add a device.
2216 # Notes:
2217 # 1. For detailed information about this command, please refer to the
2218 #    'docs/qdev-device-use.txt' file.
2220 # 2. It's possible to list device properties by running QEMU with the
2221 #    "-device DEVICE,help" command-line argument, where DEVICE is the
2222 #    device's name
2224 # Example:
2226 # -> { "execute": "device_add",
2227 #      "arguments": { "driver": "e1000", "id": "net1",
2228 #                     "bus": "pci.0",
2229 #                     "mac": "52:54:00:12:34:56" } }
2230 # <- { "return": {} }
2232 # TODO This command effectively bypasses QAPI completely due to its
2233 # "additional arguments" business.  It shouldn't have been added to
2234 # the schema in this form.  It should be qapified properly, or
2235 # replaced by a properly qapified command.
2237 # Since: 0.13
2239 { 'command': 'device_add',
2240   'data': {'driver': 'str', 'id': 'str'},
2241   'gen': false } # so we can get the additional arguments
2244 # @device_del:
2246 # Remove a device from a guest
2248 # @id: the name or QOM path of the device
2250 # Returns: Nothing on success
2251 #          If @id is not a valid device, DeviceNotFound
2253 # Notes: When this command completes, the device may not be removed from the
2254 #        guest.  Hot removal is an operation that requires guest cooperation.
2255 #        This command merely requests that the guest begin the hot removal
2256 #        process.  Completion of the device removal process is signaled with a
2257 #        DEVICE_DELETED event. Guest reset will automatically complete removal
2258 #        for all devices.
2260 # Since: 0.14.0
2262 { 'command': 'device_del', 'data': {'id': 'str'} }
2265 # @DumpGuestMemoryFormat:
2267 # An enumeration of guest-memory-dump's format.
2269 # @elf: elf format
2271 # @kdump-zlib: kdump-compressed format with zlib-compressed
2273 # @kdump-lzo: kdump-compressed format with lzo-compressed
2275 # @kdump-snappy: kdump-compressed format with snappy-compressed
2277 # Since: 2.0
2279 { 'enum': 'DumpGuestMemoryFormat',
2280   'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
2283 # @dump-guest-memory
2285 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2286 # very long depending on the amount of guest memory.
2288 # @paging: if true, do paging to get guest's memory mapping. This allows
2289 #          using gdb to process the core file.
2291 #          IMPORTANT: this option can make QEMU allocate several gigabytes
2292 #                     of RAM. This can happen for a large guest, or a
2293 #                     malicious guest pretending to be large.
2295 #          Also, paging=true has the following limitations:
2297 #             1. The guest may be in a catastrophic state or can have corrupted
2298 #                memory, which cannot be trusted
2299 #             2. The guest can be in real-mode even if paging is enabled. For
2300 #                example, the guest uses ACPI to sleep, and ACPI sleep state
2301 #                goes in real-mode
2302 #             3. Currently only supported on i386 and x86_64.
2304 # @protocol: the filename or file descriptor of the vmcore. The supported
2305 #            protocols are:
2307 #            1. file: the protocol starts with "file:", and the following
2308 #               string is the file's path.
2309 #            2. fd: the protocol starts with "fd:", and the following string
2310 #               is the fd's name.
2312 # @detach: #optional if true, QMP will return immediately rather than
2313 #          waiting for the dump to finish. The user can track progress
2314 #          using "query-dump". (since 2.6).
2316 # @begin: #optional if specified, the starting physical address.
2318 # @length: #optional if specified, the memory size, in bytes. If you don't
2319 #          want to dump all guest's memory, please specify the start @begin
2320 #          and @length
2322 # @format: #optional if specified, the format of guest memory dump. But non-elf
2323 #          format is conflict with paging and filter, ie. @paging, @begin and
2324 #          @length is not allowed to be specified with non-elf @format at the
2325 #          same time (since 2.0)
2327 # Returns: nothing on success
2329 # Since: 1.2
2331 { 'command': 'dump-guest-memory',
2332   'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
2333             '*begin': 'int', '*length': 'int',
2334             '*format': 'DumpGuestMemoryFormat'} }
2337 # @DumpStatus
2339 # Describe the status of a long-running background guest memory dump.
2341 # @none: no dump-guest-memory has started yet.
2343 # @active: there is one dump running in background.
2345 # @completed: the last dump has finished successfully.
2347 # @failed: the last dump has failed.
2349 # Since 2.6
2351 { 'enum': 'DumpStatus',
2352   'data': [ 'none', 'active', 'completed', 'failed' ] }
2355 # @DumpQueryResult
2357 # The result format for 'query-dump'.
2359 # @status: enum of @DumpStatus, which shows current dump status
2361 # @completed: bytes written in latest dump (uncompressed)
2363 # @total: total bytes to be written in latest dump (uncompressed)
2365 # Since 2.6
2367 { 'struct': 'DumpQueryResult',
2368   'data': { 'status': 'DumpStatus',
2369             'completed': 'int',
2370             'total': 'int' } }
2373 # @query-dump
2375 # Query latest dump status.
2377 # Returns: A @DumpStatus object showing the dump status.
2379 # Since: 2.6
2381 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
2384 # @DumpGuestMemoryCapability:
2386 # A list of the available formats for dump-guest-memory
2388 # Since: 2.0
2390 { 'struct': 'DumpGuestMemoryCapability',
2391   'data': {
2392       'formats': ['DumpGuestMemoryFormat'] } }
2395 # @query-dump-guest-memory-capability:
2397 # Returns the available formats for dump-guest-memory
2399 # Returns:  A @DumpGuestMemoryCapability object listing available formats for
2400 #           dump-guest-memory
2402 # Since: 2.0
2404 { 'command': 'query-dump-guest-memory-capability',
2405   'returns': 'DumpGuestMemoryCapability' }
2408 # @dump-skeys
2410 # Dump guest's storage keys
2412 # @filename: the path to the file to dump to
2414 # This command is only supported on s390 architecture.
2416 # Since: 2.5
2418 { 'command': 'dump-skeys',
2419   'data': { 'filename': 'str' } }
2422 # @netdev_add:
2424 # Add a network backend.
2426 # @type: the type of network backend.  Current valid values are 'user', 'tap',
2427 #        'vde', 'socket', 'dump' and 'bridge'
2429 # @id: the name of the new network backend
2431 # Additional arguments depend on the type.
2433 # TODO This command effectively bypasses QAPI completely due to its
2434 # "additional arguments" business.  It shouldn't have been added to
2435 # the schema in this form.  It should be qapified properly, or
2436 # replaced by a properly qapified command.
2438 # Since: 0.14.0
2440 # Returns: Nothing on success
2441 #          If @type is not a valid network backend, DeviceNotFound
2443 { 'command': 'netdev_add',
2444   'data': {'type': 'str', 'id': 'str'},
2445   'gen': false }                # so we can get the additional arguments
2448 # @netdev_del:
2450 # Remove a network backend.
2452 # @id: the name of the network backend to remove
2454 # Returns: Nothing on success
2455 #          If @id is not a valid network backend, DeviceNotFound
2457 # Since: 0.14.0
2459 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2462 # @object-add:
2464 # Create a QOM object.
2466 # @qom-type: the class name for the object to be created
2468 # @id: the name of the new object
2470 # @props: #optional a dictionary of properties to be passed to the backend
2472 # Returns: Nothing on success
2473 #          Error if @qom-type is not a valid class name
2475 # Since: 2.0
2477 { 'command': 'object-add',
2478   'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
2481 # @object-del:
2483 # Remove a QOM object.
2485 # @id: the name of the QOM object to remove
2487 # Returns: Nothing on success
2488 #          Error if @id is not a valid id for a QOM object
2490 # Since: 2.0
2492 { 'command': 'object-del', 'data': {'id': 'str'} }
2495 # @NetdevNoneOptions
2497 # Use it alone to have zero network devices.
2499 # Since 1.2
2501 { 'struct': 'NetdevNoneOptions',
2502   'data': { } }
2505 # @NetLegacyNicOptions
2507 # Create a new Network Interface Card.
2509 # @netdev: #optional id of -netdev to connect to
2511 # @macaddr: #optional MAC address
2513 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2515 # @addr: #optional PCI device address
2517 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2519 # Since 1.2
2521 { 'struct': 'NetLegacyNicOptions',
2522   'data': {
2523     '*netdev':  'str',
2524     '*macaddr': 'str',
2525     '*model':   'str',
2526     '*addr':    'str',
2527     '*vectors': 'uint32' } }
2530 # @String
2532 # A fat type wrapping 'str', to be embedded in lists.
2534 # Since 1.2
2536 { 'struct': 'String',
2537   'data': {
2538     'str': 'str' } }
2541 # @NetdevUserOptions
2543 # Use the user mode network stack which requires no administrator privilege to
2544 # run.
2546 # @hostname: #optional client hostname reported by the builtin DHCP server
2548 # @restrict: #optional isolate the guest from the host
2550 # @ipv4: #optional whether to support IPv4, default true for enabled
2551 #        (since 2.6)
2553 # @ipv6: #optional whether to support IPv6, default true for enabled
2554 #        (since 2.6)
2556 # @ip: #optional legacy parameter, use net= instead
2558 # @net: #optional IP network address that the guest will see, in the
2559 #       form addr[/netmask] The netmask is optional, and can be
2560 #       either in the form a.b.c.d or as a number of valid top-most
2561 #       bits. Default is 10.0.2.0/24.
2563 # @host: #optional guest-visible address of the host
2565 # @tftp: #optional root directory of the built-in TFTP server
2567 # @bootfile: #optional BOOTP filename, for use with tftp=
2569 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2570 #             assign
2572 # @dns: #optional guest-visible address of the virtual nameserver
2574 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2575 #             to the guest
2577 # @ipv6-prefix: #optional IPv6 network prefix (default is fec0::) (since
2578 #               2.6). The network prefix is given in the usual
2579 #               hexadecimal IPv6 address notation.
2581 # @ipv6-prefixlen: #optional IPv6 network prefix length (default is 64)
2582 #                  (since 2.6)
2584 # @ipv6-host: #optional guest-visible IPv6 address of the host (since 2.6)
2586 # @ipv6-dns: #optional guest-visible IPv6 address of the virtual
2587 #            nameserver (since 2.6)
2589 # @smb: #optional root directory of the built-in SMB server
2591 # @smbserver: #optional IP address of the built-in SMB server
2593 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2594 #           endpoints
2596 # @guestfwd: #optional forward guest TCP connections
2598 # Since 1.2
2600 { 'struct': 'NetdevUserOptions',
2601   'data': {
2602     '*hostname':  'str',
2603     '*restrict':  'bool',
2604     '*ipv4':      'bool',
2605     '*ipv6':      'bool',
2606     '*ip':        'str',
2607     '*net':       'str',
2608     '*host':      'str',
2609     '*tftp':      'str',
2610     '*bootfile':  'str',
2611     '*dhcpstart': 'str',
2612     '*dns':       'str',
2613     '*dnssearch': ['String'],
2614     '*ipv6-prefix':      'str',
2615     '*ipv6-prefixlen':   'int',
2616     '*ipv6-host':        'str',
2617     '*ipv6-dns':         'str',
2618     '*smb':       'str',
2619     '*smbserver': 'str',
2620     '*hostfwd':   ['String'],
2621     '*guestfwd':  ['String'] } }
2624 # @NetdevTapOptions
2626 # Connect the host TAP network interface name to the VLAN.
2628 # @ifname: #optional interface name
2630 # @fd: #optional file descriptor of an already opened tap
2632 # @fds: #optional multiple file descriptors of already opened multiqueue capable
2633 # tap
2635 # @script: #optional script to initialize the interface
2637 # @downscript: #optional script to shut down the interface
2639 # @helper: #optional command to execute to configure bridge
2641 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2643 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2645 # @vhost: #optional enable vhost-net network accelerator
2647 # @vhostfd: #optional file descriptor of an already opened vhost net device
2649 # @vhostfds: #optional file descriptors of multiple already opened vhost net
2650 # devices
2652 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2654 # @queues: #optional number of queues to be created for multiqueue capable tap
2656 # @poll-us: #optional maximum number of microseconds that could
2657 # be spent on busy polling for tap (since 2.7)
2659 # Since 1.2
2661 { 'struct': 'NetdevTapOptions',
2662   'data': {
2663     '*ifname':     'str',
2664     '*fd':         'str',
2665     '*fds':        'str',
2666     '*script':     'str',
2667     '*downscript': 'str',
2668     '*helper':     'str',
2669     '*sndbuf':     'size',
2670     '*vnet_hdr':   'bool',
2671     '*vhost':      'bool',
2672     '*vhostfd':    'str',
2673     '*vhostfds':   'str',
2674     '*vhostforce': 'bool',
2675     '*queues':     'uint32',
2676     '*poll-us':    'uint32'} }
2679 # @NetdevSocketOptions
2681 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2682 # socket connection.
2684 # @fd: #optional file descriptor of an already opened socket
2686 # @listen: #optional port number, and optional hostname, to listen on
2688 # @connect: #optional port number, and optional hostname, to connect to
2690 # @mcast: #optional UDP multicast address and port number
2692 # @localaddr: #optional source address and port for multicast and udp packets
2694 # @udp: #optional UDP unicast address and port number
2696 # Since 1.2
2698 { 'struct': 'NetdevSocketOptions',
2699   'data': {
2700     '*fd':        'str',
2701     '*listen':    'str',
2702     '*connect':   'str',
2703     '*mcast':     'str',
2704     '*localaddr': 'str',
2705     '*udp':       'str' } }
2708 # @NetdevL2TPv3Options
2710 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
2712 # @src: source address
2714 # @dst: destination address
2716 # @srcport: #optional source port - mandatory for udp, optional for ip
2718 # @dstport: #optional destination port - mandatory for udp, optional for ip
2720 # @ipv6: #optional - force the use of ipv6
2722 # @udp: #optional - use the udp version of l2tpv3 encapsulation
2724 # @cookie64: #optional - use 64 bit coookies
2726 # @counter: #optional have sequence counter
2728 # @pincounter: #optional pin sequence counter to zero -
2729 #              workaround for buggy implementations or
2730 #              networks with packet reorder
2732 # @txcookie: #optional 32 or 64 bit transmit cookie
2734 # @rxcookie: #optional 32 or 64 bit receive cookie
2736 # @txsession: 32 bit transmit session
2738 # @rxsession: #optional 32 bit receive session - if not specified
2739 #             set to the same value as transmit
2741 # @offset: #optional additional offset - allows the insertion of
2742 #          additional application-specific data before the packet payload
2744 # Since 2.1
2746 { 'struct': 'NetdevL2TPv3Options',
2747   'data': {
2748     'src':          'str',
2749     'dst':          'str',
2750     '*srcport':     'str',
2751     '*dstport':     'str',
2752     '*ipv6':        'bool',
2753     '*udp':         'bool',
2754     '*cookie64':    'bool',
2755     '*counter':     'bool',
2756     '*pincounter':  'bool',
2757     '*txcookie':    'uint64',
2758     '*rxcookie':    'uint64',
2759     'txsession':    'uint32',
2760     '*rxsession':   'uint32',
2761     '*offset':      'uint32' } }
2764 # @NetdevVdeOptions
2766 # Connect the VLAN to a vde switch running on the host.
2768 # @sock: #optional socket path
2770 # @port: #optional port number
2772 # @group: #optional group owner of socket
2774 # @mode: #optional permissions for socket
2776 # Since 1.2
2778 { 'struct': 'NetdevVdeOptions',
2779   'data': {
2780     '*sock':  'str',
2781     '*port':  'uint16',
2782     '*group': 'str',
2783     '*mode':  'uint16' } }
2786 # @NetdevDumpOptions
2788 # Dump VLAN network traffic to a file.
2790 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2791 # suffixes.
2793 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2795 # Since 1.2
2797 { 'struct': 'NetdevDumpOptions',
2798   'data': {
2799     '*len':  'size',
2800     '*file': 'str' } }
2803 # @NetdevBridgeOptions
2805 # Connect a host TAP network interface to a host bridge device.
2807 # @br: #optional bridge name
2809 # @helper: #optional command to execute to configure bridge
2811 # Since 1.2
2813 { 'struct': 'NetdevBridgeOptions',
2814   'data': {
2815     '*br':     'str',
2816     '*helper': 'str' } }
2819 # @NetdevHubPortOptions
2821 # Connect two or more net clients through a software hub.
2823 # @hubid: hub identifier number
2825 # Since 1.2
2827 { 'struct': 'NetdevHubPortOptions',
2828   'data': {
2829     'hubid':     'int32' } }
2832 # @NetdevNetmapOptions
2834 # Connect a client to a netmap-enabled NIC or to a VALE switch port
2836 # @ifname: Either the name of an existing network interface supported by
2837 #          netmap, or the name of a VALE port (created on the fly).
2838 #          A VALE port name is in the form 'valeXXX:YYY', where XXX and
2839 #          YYY are non-negative integers. XXX identifies a switch and
2840 #          YYY identifies a port of the switch. VALE ports having the
2841 #          same XXX are therefore connected to the same switch.
2843 # @devname: #optional path of the netmap device (default: '/dev/netmap').
2845 # Since 2.0
2847 { 'struct': 'NetdevNetmapOptions',
2848   'data': {
2849     'ifname':     'str',
2850     '*devname':    'str' } }
2853 # @NetdevVhostUserOptions
2855 # Vhost-user network backend
2857 # @chardev: name of a unix socket chardev
2859 # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
2861 # @queues: #optional number of queues to be created for multiqueue vhost-user
2862 #          (default: 1) (Since 2.5)
2864 # Since 2.1
2866 { 'struct': 'NetdevVhostUserOptions',
2867   'data': {
2868     'chardev':        'str',
2869     '*vhostforce':    'bool',
2870     '*queues':        'int' } }
2873 # @NetClientDriver
2875 # Available netdev drivers.
2877 # Since 2.7
2879 { 'enum': 'NetClientDriver',
2880   'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
2881             'bridge', 'hubport', 'netmap', 'vhost-user' ] }
2884 # @Netdev
2886 # Captures the configuration of a network device.
2888 # @id: identifier for monitor commands.
2890 # @type: Specify the driver used for interpreting remaining arguments.
2892 # Since 1.2
2894 # 'l2tpv3' - since 2.1
2896 { 'union': 'Netdev',
2897   'base': { 'id': 'str', 'type': 'NetClientDriver' },
2898   'discriminator': 'type',
2899   'data': {
2900     'none':     'NetdevNoneOptions',
2901     'nic':      'NetLegacyNicOptions',
2902     'user':     'NetdevUserOptions',
2903     'tap':      'NetdevTapOptions',
2904     'l2tpv3':   'NetdevL2TPv3Options',
2905     'socket':   'NetdevSocketOptions',
2906     'vde':      'NetdevVdeOptions',
2907     'dump':     'NetdevDumpOptions',
2908     'bridge':   'NetdevBridgeOptions',
2909     'hubport':  'NetdevHubPortOptions',
2910     'netmap':   'NetdevNetmapOptions',
2911     'vhost-user': 'NetdevVhostUserOptions' } }
2914 # @NetLegacy
2916 # Captures the configuration of a network device; legacy.
2918 # @vlan: #optional vlan number
2920 # @id: #optional identifier for monitor commands
2922 # @name: #optional identifier for monitor commands, ignored if @id is present
2924 # @opts: device type specific properties (legacy)
2926 # Since 1.2
2928 { 'struct': 'NetLegacy',
2929   'data': {
2930     '*vlan': 'int32',
2931     '*id':   'str',
2932     '*name': 'str',
2933     'opts':  'NetLegacyOptions' } }
2936 # @NetLegacyOptions
2938 # Like Netdev, but for use only by the legacy command line options
2940 # Since 1.2
2942 { 'union': 'NetLegacyOptions',
2943   'data': {
2944     'none':     'NetdevNoneOptions',
2945     'nic':      'NetLegacyNicOptions',
2946     'user':     'NetdevUserOptions',
2947     'tap':      'NetdevTapOptions',
2948     'l2tpv3':   'NetdevL2TPv3Options',
2949     'socket':   'NetdevSocketOptions',
2950     'vde':      'NetdevVdeOptions',
2951     'dump':     'NetdevDumpOptions',
2952     'bridge':   'NetdevBridgeOptions',
2953     'netmap':   'NetdevNetmapOptions',
2954     'vhost-user': 'NetdevVhostUserOptions' } }
2957 # @NetFilterDirection
2959 # Indicates whether a netfilter is attached to a netdev's transmit queue or
2960 # receive queue or both.
2962 # @all: the filter is attached both to the receive and the transmit
2963 #       queue of the netdev (default).
2965 # @rx: the filter is attached to the receive queue of the netdev,
2966 #      where it will receive packets sent to the netdev.
2968 # @tx: the filter is attached to the transmit queue of the netdev,
2969 #      where it will receive packets sent by the netdev.
2971 # Since 2.5
2973 { 'enum': 'NetFilterDirection',
2974   'data': [ 'all', 'rx', 'tx' ] }
2977 # @InetSocketAddress
2979 # Captures a socket address or address range in the Internet namespace.
2981 # @host: host part of the address
2983 # @port: port part of the address, or lowest port if @to is present
2985 # @to: highest port to try
2987 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2988 #        #optional
2990 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2991 #        #optional
2993 # Since 1.3
2995 { 'struct': 'InetSocketAddress',
2996   'data': {
2997     'host': 'str',
2998     'port': 'str',
2999     '*to': 'uint16',
3000     '*ipv4': 'bool',
3001     '*ipv6': 'bool' } }
3004 # @UnixSocketAddress
3006 # Captures a socket address in the local ("Unix socket") namespace.
3008 # @path: filesystem path to use
3010 # Since 1.3
3012 { 'struct': 'UnixSocketAddress',
3013   'data': {
3014     'path': 'str' } }
3017 # @SocketAddress
3019 # Captures the address of a socket, which could also be a named file descriptor
3021 # Since 1.3
3023 { 'union': 'SocketAddress',
3024   'data': {
3025     'inet': 'InetSocketAddress',
3026     'unix': 'UnixSocketAddress',
3027     'fd': 'String' } }
3030 # @getfd:
3032 # Receive a file descriptor via SCM rights and assign it a name
3034 # @fdname: file descriptor name
3036 # Returns: Nothing on success
3038 # Since: 0.14.0
3040 # Notes: If @fdname already exists, the file descriptor assigned to
3041 #        it will be closed and replaced by the received file
3042 #        descriptor.
3043 #        The 'closefd' command can be used to explicitly close the
3044 #        file descriptor when it is no longer needed.
3046 { 'command': 'getfd', 'data': {'fdname': 'str'} }
3049 # @closefd:
3051 # Close a file descriptor previously passed via SCM rights
3053 # @fdname: file descriptor name
3055 # Returns: Nothing on success
3057 # Since: 0.14.0
3059 { 'command': 'closefd', 'data': {'fdname': 'str'} }
3062 # @MachineInfo:
3064 # Information describing a machine.
3066 # @name: the name of the machine
3068 # @alias: #optional an alias for the machine name
3070 # @default: #optional whether the machine is default
3072 # @cpu-max: maximum number of CPUs supported by the machine type
3073 #           (since 1.5.0)
3075 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
3077 # Since: 1.2.0
3079 { 'struct': 'MachineInfo',
3080   'data': { 'name': 'str', '*alias': 'str',
3081             '*is-default': 'bool', 'cpu-max': 'int',
3082             'hotpluggable-cpus': 'bool'} }
3085 # @query-machines:
3087 # Return a list of supported machines
3089 # Returns: a list of MachineInfo
3091 # Since: 1.2.0
3093 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
3096 # @CpuDefinitionInfo:
3098 # Virtual CPU definition.
3100 # @name: the name of the CPU definition
3102 # @migration-safe: #optional whether a CPU definition can be safely used for
3103 #                  migration in combination with a QEMU compatibility machine
3104 #                  when migrating between different QMU versions and between
3105 #                  hosts with different sets of (hardware or software)
3106 #                  capabilities. If not provided, information is not available
3107 #                  and callers should not assume the CPU definition to be
3108 #                  migration-safe. (since 2.8)
3110 # @static: whether a CPU definition is static and will not change depending on
3111 #          QEMU version, machine type, machine options and accelerator options.
3112 #          A static model is always migration-safe. (since 2.8)
3114 # Since: 1.2.0
3116 { 'struct': 'CpuDefinitionInfo',
3117   'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool' } }
3120 # @query-cpu-definitions:
3122 # Return a list of supported virtual CPU definitions
3124 # Returns: a list of CpuDefInfo
3126 # Since: 1.2.0
3128 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3131 # @CpuModelInfo:
3133 # Virtual CPU model.
3135 # A CPU model consists of the name of a CPU definition, to which
3136 # delta changes are applied (e.g. features added/removed). Most magic values
3137 # that an architecture might require should be hidden behind the name.
3138 # However, if required, architectures can expose relevant properties.
3140 # @name: the name of the CPU definition the model is based on
3141 # @props: #optional a dictionary of QOM properties to be applied
3143 # Since: 2.8.0
3145 { 'struct': 'CpuModelInfo',
3146   'data': { 'name': 'str',
3147             '*props': 'any' } }
3150 # @CpuModelExpansionType
3152 # An enumeration of CPU model expansion types.
3154 # @static: Expand to a static CPU model, a combination of a static base
3155 #          model name and property delta changes. As the static base model will
3156 #          never change, the expanded CPU model will be the same, independant of
3157 #          independent of QEMU version, machine type, machine options, and
3158 #          accelerator options. Therefore, the resulting model can be used by
3159 #          tooling without having to specify a compatibility machine - e.g. when
3160 #          displaying the "host" model. static CPU models are migration-safe.
3162 # @full: Expand all properties. The produced model is not guaranteed to be
3163 #        migration-safe, but allows tooling to get an insight and work with
3164 #        model details.
3166 # Since: 2.8.0
3168 { 'enum': 'CpuModelExpansionType',
3169   'data': [ 'static', 'full' ] }
3173 # @CpuModelExpansionInfo
3175 # The result of a cpu model expansion.
3177 # @model: the expanded CpuModelInfo.
3179 # Since: 2.8.0
3181 { 'struct': 'CpuModelExpansionInfo',
3182   'data': { 'model': 'CpuModelInfo' } }
3186 # @query-cpu-model-expansion:
3188 # Expands a given CPU model (or a combination of CPU model + additional options)
3189 # to different granularities, allowing tooling to get an understanding what a
3190 # specific CPU model looks like in QEMU under a certain configuration.
3192 # This interface can be used to query the "host" CPU model.
3194 # The data returned by this command may be affected by:
3196 # * QEMU version: CPU models may look different depending on the QEMU version.
3197 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3198 # * machine-type: CPU model  may look different depending on the machine-type.
3199 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3200 # * machine options (including accelerator): in some architectures, CPU models
3201 #   may look different depending on machine and accelerator options. (Except for
3202 #   CPU models reported as "static" in query-cpu-definitions.)
3203 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3204 #   global properties may affect expansion of CPU models. Using
3205 #   query-cpu-model-expansion while using these is not advised.
3207 # Some architectures may not support all expansion types. s390x supports
3208 # "full" and "static".
3210 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
3211 #          not supported, if the model cannot be expanded, if the model contains
3212 #          an unknown CPU definition name, unknown properties or properties
3213 #          with a wrong type. Also returns an error if an expansion type is
3214 #          not supported.
3216 # Since: 2.8.0
3218 { 'command': 'query-cpu-model-expansion',
3219   'data': { 'type': 'CpuModelExpansionType',
3220             'model': 'CpuModelInfo' },
3221   'returns': 'CpuModelExpansionInfo' }
3224 # @CpuModelCompareResult:
3226 # An enumeration of CPU model comparation results. The result is usually
3227 # calculated using e.g. CPU features or CPU generations.
3229 # @incompatible: If model A is incompatible to model B, model A is not
3230 #                guaranteed to run where model B runs and the other way around.
3232 # @identical: If model A is identical to model B, model A is guaranteed to run
3233 #             where model B runs and the other way around.
3235 # @superset: If model A is a superset of model B, model B is guaranteed to run
3236 #            where model A runs. There are no guarantees about the other way.
3238 # @subset: If model A is a subset of model B, model A is guaranteed to run
3239 #          where model B runs. There are no guarantees about the other way.
3241 # Since: 2.8.0
3243 { 'enum': 'CpuModelCompareResult',
3244   'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
3247 # @CpuModelCompareInfo
3249 # The result of a CPU model comparison.
3251 # @result: The result of the compare operation.
3252 # @responsible-properties: List of properties that led to the comparison result
3253 #                          not being identical.
3255 # @responsible-properties is a list of QOM property names that led to
3256 # both CPUs not being detected as identical. For identical models, this
3257 # list is empty.
3258 # If a QOM property is read-only, that means there's no known way to make the
3259 # CPU models identical. If the special property name "type" is included, the
3260 # models are by definition not identical and cannot be made identical.
3262 # Since: 2.8.0
3264 { 'struct': 'CpuModelCompareInfo',
3265   'data': {'result': 'CpuModelCompareResult',
3266            'responsible-properties': ['str']
3267           }
3271 # @query-cpu-model-comparison:
3273 # Compares two CPU models, returning how they compare in a specific
3274 # configuration. The results indicates how both models compare regarding
3275 # runnability. This result can be used by tooling to make decisions if a
3276 # certain CPU model will run in a certain configuration or if a compatible
3277 # CPU model has to be created by baselining.
3279 # Usually, a CPU model is compared against the maximum possible CPU model
3280 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
3281 # model is identical or a subset, it will run in that configuration.
3283 # The result returned by this command may be affected by:
3285 # * QEMU version: CPU models may look different depending on the QEMU version.
3286 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3287 # * machine-type: CPU model may look different depending on the machine-type.
3288 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3289 # * machine options (including accelerator): in some architectures, CPU models
3290 #   may look different depending on machine and accelerator options. (Except for
3291 #   CPU models reported as "static" in query-cpu-definitions.)
3292 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3293 #   global properties may affect expansion of CPU models. Using
3294 #   query-cpu-model-expansion while using these is not advised.
3296 # Some architectures may not support comparing CPU models. s390x supports
3297 # comparing CPU models.
3299 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
3300 #          not supported, if a model cannot be used, if a model contains
3301 #          an unknown cpu definition name, unknown properties or properties
3302 #          with wrong types.
3304 # Since: 2.8.0
3306 { 'command': 'query-cpu-model-comparison',
3307   'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
3308   'returns': 'CpuModelCompareInfo' }
3311 # @CpuModelBaselineInfo
3313 # The result of a CPU model baseline.
3315 # @model: the baselined CpuModelInfo.
3317 # Since: 2.8.0
3319 { 'struct': 'CpuModelBaselineInfo',
3320   'data': { 'model': 'CpuModelInfo' } }
3323 # @query-cpu-model-baseline:
3325 # Baseline two CPU models, creating a compatible third model. The created
3326 # model will always be a static, migration-safe CPU model (see "static"
3327 # CPU model expansion for details).
3329 # This interface can be used by tooling to create a compatible CPU model out
3330 # two CPU models. The created CPU model will be identical to or a subset of
3331 # both CPU models when comparing them. Therefore, the created CPU model is
3332 # guaranteed to run where the given CPU models run.
3334 # The result returned by this command may be affected by:
3336 # * QEMU version: CPU models may look different depending on the QEMU version.
3337 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3338 # * machine-type: CPU model may look different depending on the machine-type.
3339 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3340 # * machine options (including accelerator): in some architectures, CPU models
3341 #   may look different depending on machine and accelerator options. (Except for
3342 #   CPU models reported as "static" in query-cpu-definitions.)
3343 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3344 #   global properties may affect expansion of CPU models. Using
3345 #   query-cpu-model-expansion while using these is not advised.
3347 # Some architectures may not support baselining CPU models. s390x supports
3348 # baselining CPU models.
3350 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
3351 #          not supported, if a model cannot be used, if a model contains
3352 #          an unknown cpu definition name, unknown properties or properties
3353 #          with wrong types.
3355 # Since: 2.8.0
3357 { 'command': 'query-cpu-model-baseline',
3358   'data': { 'modela': 'CpuModelInfo',
3359             'modelb': 'CpuModelInfo' },
3360   'returns': 'CpuModelBaselineInfo' }
3362 # @AddfdInfo:
3364 # Information about a file descriptor that was added to an fd set.
3366 # @fdset-id: The ID of the fd set that @fd was added to.
3368 # @fd: The file descriptor that was received via SCM rights and
3369 #      added to the fd set.
3371 # Since: 1.2.0
3373 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3376 # @add-fd:
3378 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3380 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3382 # @opaque: #optional A free-form string that can be used to describe the fd.
3384 # Returns: @AddfdInfo on success
3385 #          If file descriptor was not received, FdNotSupplied
3386 #          If @fdset-id is a negative value, InvalidParameterValue
3388 # Notes: The list of fd sets is shared by all monitor connections.
3390 #        If @fdset-id is not specified, a new fd set will be created.
3392 # Since: 1.2.0
3394 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3395   'returns': 'AddfdInfo' }
3398 # @remove-fd:
3400 # Remove a file descriptor from an fd set.
3402 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3404 # @fd: #optional The file descriptor that is to be removed.
3406 # Returns: Nothing on success
3407 #          If @fdset-id or @fd is not found, FdNotFound
3409 # Since: 1.2.0
3411 # Notes: The list of fd sets is shared by all monitor connections.
3413 #        If @fd is not specified, all file descriptors in @fdset-id
3414 #        will be removed.
3416 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3419 # @FdsetFdInfo:
3421 # Information about a file descriptor that belongs to an fd set.
3423 # @fd: The file descriptor value.
3425 # @opaque: #optional A free-form string that can be used to describe the fd.
3427 # Since: 1.2.0
3429 { 'struct': 'FdsetFdInfo',
3430   'data': {'fd': 'int', '*opaque': 'str'} }
3433 # @FdsetInfo:
3435 # Information about an fd set.
3437 # @fdset-id: The ID of the fd set.
3439 # @fds: A list of file descriptors that belong to this fd set.
3441 # Since: 1.2.0
3443 { 'struct': 'FdsetInfo',
3444   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3447 # @query-fdsets:
3449 # Return information describing all fd sets.
3451 # Returns: A list of @FdsetInfo
3453 # Since: 1.2.0
3455 # Note: The list of fd sets is shared by all monitor connections.
3458 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3461 # @TargetInfo:
3463 # Information describing the QEMU target.
3465 # @arch: the target architecture (eg "x86_64", "i386", etc)
3467 # Since: 1.2.0
3469 { 'struct': 'TargetInfo',
3470   'data': { 'arch': 'str' } }
3473 # @query-target:
3475 # Return information about the target for this QEMU
3477 # Returns: TargetInfo
3479 # Since: 1.2.0
3481 { 'command': 'query-target', 'returns': 'TargetInfo' }
3484 # @QKeyCode:
3486 # An enumeration of key name.
3488 # This is used by the send-key command.
3490 # Since: 1.3.0
3492 # 'unmapped' and 'pause' since 2.0
3493 # 'ro' and 'kp_comma' since 2.4
3494 # 'kp_equals' and 'power' since 2.6
3496 { 'enum': 'QKeyCode',
3497   'data': [ 'unmapped',
3498             'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3499             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3500             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3501             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3502             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3503             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3504             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3505             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3506             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3507             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3508             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3509             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3510             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3511             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3512             'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro',
3513             'kp_comma', 'kp_equals', 'power' ] }
3516 # @KeyValue
3518 # Represents a keyboard key.
3520 # Since: 1.3.0
3522 { 'union': 'KeyValue',
3523   'data': {
3524     'number': 'int',
3525     'qcode': 'QKeyCode' } }
3528 # @send-key:
3530 # Send keys to guest.
3532 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3533 #        simultaneously sent to the guest. A @KeyValue.number value is sent
3534 #        directly to the guest, while @KeyValue.qcode must be a valid
3535 #        @QKeyCode value
3537 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3538 #             to 100
3540 # Returns: Nothing on success
3541 #          If key is unknown or redundant, InvalidParameter
3543 # Since: 1.3.0
3546 { 'command': 'send-key',
3547   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3550 # @screendump:
3552 # Write a PPM of the VGA screen to a file.
3554 # @filename: the path of a new PPM file to store the image
3556 # Returns: Nothing on success
3558 # Since: 0.14.0
3560 { 'command': 'screendump', 'data': {'filename': 'str'} }
3564 # @ChardevCommon:
3566 # Configuration shared across all chardev backends
3568 # @logfile: #optional The name of a logfile to save output
3569 # @logappend: #optional true to append instead of truncate
3570 #             (default to false to truncate)
3572 # Since: 2.6
3574 { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
3575                                        '*logappend': 'bool' } }
3578 # @ChardevFile:
3580 # Configuration info for file chardevs.
3582 # @in:  #optional The name of the input file
3583 # @out: The name of the output file
3584 # @append: #optional Open the file in append mode (default false to
3585 #          truncate) (Since 2.6)
3587 # Since: 1.4
3589 { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
3590                                    'out' : 'str',
3591                                    '*append': 'bool' },
3592   'base': 'ChardevCommon' }
3595 # @ChardevHostdev:
3597 # Configuration info for device and pipe chardevs.
3599 # @device: The name of the special file for the device,
3600 #          i.e. /dev/ttyS0 on Unix or COM1: on Windows
3601 # @type: What kind of device this is.
3603 # Since: 1.4
3605 { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
3606   'base': 'ChardevCommon' }
3609 # @ChardevSocket:
3611 # Configuration info for (stream) socket chardevs.
3613 # @addr: socket address to listen on (server=true)
3614 #        or connect to (server=false)
3615 # @tls-creds: #optional the ID of the TLS credentials object (since 2.6)
3616 # @server: #optional create server socket (default: true)
3617 # @wait: #optional wait for incoming connection on server
3618 #        sockets (default: false).
3619 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3620 # @telnet: #optional enable telnet protocol on server
3621 #          sockets (default: false)
3622 # @reconnect: #optional For a client socket, if a socket is disconnected,
3623 #          then attempt a reconnect after the given number of seconds.
3624 #          Setting this to zero disables this function. (default: 0)
3625 #          (Since: 2.2)
3627 # Since: 1.4
3629 { 'struct': 'ChardevSocket', 'data': { 'addr'       : 'SocketAddress',
3630                                      '*tls-creds'  : 'str',
3631                                      '*server'    : 'bool',
3632                                      '*wait'      : 'bool',
3633                                      '*nodelay'   : 'bool',
3634                                      '*telnet'    : 'bool',
3635                                      '*reconnect' : 'int' },
3636   'base': 'ChardevCommon' }
3639 # @ChardevUdp:
3641 # Configuration info for datagram socket chardevs.
3643 # @remote: remote address
3644 # @local: #optional local address
3646 # Since: 1.5
3648 { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3649                                   '*local' : 'SocketAddress' },
3650   'base': 'ChardevCommon' }
3653 # @ChardevMux:
3655 # Configuration info for mux chardevs.
3657 # @chardev: name of the base chardev.
3659 # Since: 1.5
3661 { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
3662   'base': 'ChardevCommon' }
3665 # @ChardevStdio:
3667 # Configuration info for stdio chardevs.
3669 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3670 #          be delivered to qemu.  Default: true in -nographic mode,
3671 #          false otherwise.
3673 # Since: 1.5
3675 { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
3676   'base': 'ChardevCommon' }
3680 # @ChardevSpiceChannel:
3682 # Configuration info for spice vm channel chardevs.
3684 # @type: kind of channel (for example vdagent).
3686 # Since: 1.5
3688 { 'struct': 'ChardevSpiceChannel', 'data': { 'type'  : 'str' },
3689   'base': 'ChardevCommon' }
3692 # @ChardevSpicePort:
3694 # Configuration info for spice port chardevs.
3696 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3698 # Since: 1.5
3700 { 'struct': 'ChardevSpicePort', 'data': { 'fqdn'  : 'str' },
3701   'base': 'ChardevCommon' }
3704 # @ChardevVC:
3706 # Configuration info for virtual console chardevs.
3708 # @width:  console width,  in pixels
3709 # @height: console height, in pixels
3710 # @cols:   console width,  in chars
3711 # @rows:   console height, in chars
3713 # Since: 1.5
3715 { 'struct': 'ChardevVC', 'data': { '*width'  : 'int',
3716                                  '*height' : 'int',
3717                                  '*cols'   : 'int',
3718                                  '*rows'   : 'int' },
3719   'base': 'ChardevCommon' }
3722 # @ChardevRingbuf:
3724 # Configuration info for ring buffer chardevs.
3726 # @size: #optional ring buffer size, must be power of two, default is 65536
3728 # Since: 1.5
3730 { 'struct': 'ChardevRingbuf', 'data': { '*size'  : 'int' },
3731   'base': 'ChardevCommon' }
3734 # @ChardevBackend:
3736 # Configuration info for the new chardev backend.
3738 # Since: 1.4 (testdev since 2.2)
3740 { 'union': 'ChardevBackend', 'data': { 'file'   : 'ChardevFile',
3741                                        'serial' : 'ChardevHostdev',
3742                                        'parallel': 'ChardevHostdev',
3743                                        'pipe'   : 'ChardevHostdev',
3744                                        'socket' : 'ChardevSocket',
3745                                        'udp'    : 'ChardevUdp',
3746                                        'pty'    : 'ChardevCommon',
3747                                        'null'   : 'ChardevCommon',
3748                                        'mux'    : 'ChardevMux',
3749                                        'msmouse': 'ChardevCommon',
3750                                        'braille': 'ChardevCommon',
3751                                        'testdev': 'ChardevCommon',
3752                                        'stdio'  : 'ChardevStdio',
3753                                        'console': 'ChardevCommon',
3754                                        'spicevmc' : 'ChardevSpiceChannel',
3755                                        'spiceport' : 'ChardevSpicePort',
3756                                        'vc'     : 'ChardevVC',
3757                                        'ringbuf': 'ChardevRingbuf',
3758                                        # next one is just for compatibility
3759                                        'memory' : 'ChardevRingbuf' } }
3762 # @ChardevReturn:
3764 # Return info about the chardev backend just created.
3766 # @pty: #optional name of the slave pseudoterminal device, present if
3767 #       and only if a chardev of type 'pty' was created
3769 # Since: 1.4
3771 { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3774 # @chardev-add:
3776 # Add a character device backend
3778 # @id: the chardev's ID, must be unique
3779 # @backend: backend type and parameters
3781 # Returns: ChardevReturn.
3783 # Since: 1.4
3785 { 'command': 'chardev-add', 'data': {'id'      : 'str',
3786                                      'backend' : 'ChardevBackend' },
3787   'returns': 'ChardevReturn' }
3790 # @chardev-remove:
3792 # Remove a character device backend
3794 # @id: the chardev's ID, must exist and not be in use
3796 # Returns: Nothing on success
3798 # Since: 1.4
3800 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3803 # @TpmModel:
3805 # An enumeration of TPM models
3807 # @tpm-tis: TPM TIS model
3809 # Since: 1.5
3811 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3814 # @query-tpm-models:
3816 # Return a list of supported TPM models
3818 # Returns: a list of TpmModel
3820 # Since: 1.5
3822 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3825 # @TpmType:
3827 # An enumeration of TPM types
3829 # @passthrough: TPM passthrough type
3831 # Since: 1.5
3833 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3836 # @query-tpm-types:
3838 # Return a list of supported TPM types
3840 # Returns: a list of TpmType
3842 # Since: 1.5
3844 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3847 # @TPMPassthroughOptions:
3849 # Information about the TPM passthrough type
3851 # @path: #optional string describing the path used for accessing the TPM device
3853 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3854 #               for cancellation of TPM commands while they are executing
3856 # Since: 1.5
3858 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3859                                              '*cancel-path' : 'str'} }
3862 # @TpmTypeOptions:
3864 # A union referencing different TPM backend types' configuration options
3866 # @passthrough: The configuration options for the TPM passthrough type
3868 # Since: 1.5
3870 { 'union': 'TpmTypeOptions',
3871    'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3874 # @TpmInfo:
3876 # Information about the TPM
3878 # @id: The Id of the TPM
3880 # @model: The TPM frontend model
3882 # @options: The TPM (backend) type configuration options
3884 # Since: 1.5
3886 { 'struct': 'TPMInfo',
3887   'data': {'id': 'str',
3888            'model': 'TpmModel',
3889            'options': 'TpmTypeOptions' } }
3892 # @query-tpm:
3894 # Return information about the TPM device
3896 # Returns: @TPMInfo on success
3898 # Since: 1.5
3900 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
3903 # @AcpiTableOptions
3905 # Specify an ACPI table on the command line to load.
3907 # At most one of @file and @data can be specified. The list of files specified
3908 # by any one of them is loaded and concatenated in order. If both are omitted,
3909 # @data is implied.
3911 # Other fields / optargs can be used to override fields of the generic ACPI
3912 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
3913 # Description Table Header. If a header field is not overridden, then the
3914 # corresponding value from the concatenated blob is used (in case of @file), or
3915 # it is filled in with a hard-coded value (in case of @data).
3917 # String fields are copied into the matching ACPI member from lowest address
3918 # upwards, and silently truncated / NUL-padded to length.
3920 # @sig: #optional table signature / identifier (4 bytes)
3922 # @rev: #optional table revision number (dependent on signature, 1 byte)
3924 # @oem_id: #optional OEM identifier (6 bytes)
3926 # @oem_table_id: #optional OEM table identifier (8 bytes)
3928 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
3930 # @asl_compiler_id: #optional identifier of the utility that created the table
3931 #                   (4 bytes)
3933 # @asl_compiler_rev: #optional revision number of the utility that created the
3934 #                    table (4 bytes)
3936 # @file: #optional colon (:) separated list of pathnames to load and
3937 #        concatenate as table data. The resultant binary blob is expected to
3938 #        have an ACPI table header. At least one file is required. This field
3939 #        excludes @data.
3941 # @data: #optional colon (:) separated list of pathnames to load and
3942 #        concatenate as table data. The resultant binary blob must not have an
3943 #        ACPI table header. At least one file is required. This field excludes
3944 #        @file.
3946 # Since 1.5
3948 { 'struct': 'AcpiTableOptions',
3949   'data': {
3950     '*sig':               'str',
3951     '*rev':               'uint8',
3952     '*oem_id':            'str',
3953     '*oem_table_id':      'str',
3954     '*oem_rev':           'uint32',
3955     '*asl_compiler_id':   'str',
3956     '*asl_compiler_rev':  'uint32',
3957     '*file':              'str',
3958     '*data':              'str' }}
3961 # @CommandLineParameterType:
3963 # Possible types for an option parameter.
3965 # @string: accepts a character string
3967 # @boolean: accepts "on" or "off"
3969 # @number: accepts a number
3971 # @size: accepts a number followed by an optional suffix (K)ilo,
3972 #        (M)ega, (G)iga, (T)era
3974 # Since 1.5
3976 { 'enum': 'CommandLineParameterType',
3977   'data': ['string', 'boolean', 'number', 'size'] }
3980 # @CommandLineParameterInfo:
3982 # Details about a single parameter of a command line option.
3984 # @name: parameter name
3986 # @type: parameter @CommandLineParameterType
3988 # @help: #optional human readable text string, not suitable for parsing.
3990 # @default: #optional default value string (since 2.1)
3992 # Since 1.5
3994 { 'struct': 'CommandLineParameterInfo',
3995   'data': { 'name': 'str',
3996             'type': 'CommandLineParameterType',
3997             '*help': 'str',
3998             '*default': 'str' } }
4001 # @CommandLineOptionInfo:
4003 # Details about a command line option, including its list of parameter details
4005 # @option: option name
4007 # @parameters: an array of @CommandLineParameterInfo
4009 # Since 1.5
4011 { 'struct': 'CommandLineOptionInfo',
4012   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
4015 # @query-command-line-options:
4017 # Query command line option schema.
4019 # @option: #optional option name
4021 # Returns: list of @CommandLineOptionInfo for all options (or for the given
4022 #          @option).  Returns an error if the given @option doesn't exist.
4024 # Since 1.5
4026 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
4027  'returns': ['CommandLineOptionInfo'] }
4030 # @X86CPURegister32
4032 # A X86 32-bit register
4034 # Since: 1.5
4036 { 'enum': 'X86CPURegister32',
4037   'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4040 # @X86CPUFeatureWordInfo
4042 # Information about a X86 CPU feature word
4044 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4046 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
4047 #                   feature word
4049 # @cpuid-register: Output register containing the feature bits
4051 # @features: value of output register, containing the feature bits
4053 # Since: 1.5
4055 { 'struct': 'X86CPUFeatureWordInfo',
4056   'data': { 'cpuid-input-eax': 'int',
4057             '*cpuid-input-ecx': 'int',
4058             'cpuid-register': 'X86CPURegister32',
4059             'features': 'int' } }
4062 # @DummyForceArrays
4064 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
4066 # Since 2.5
4068 { 'struct': 'DummyForceArrays',
4069   'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
4073 # @RxState:
4075 # Packets receiving state
4077 # @normal: filter assigned packets according to the mac-table
4079 # @none: don't receive any assigned packet
4081 # @all: receive all assigned packets
4083 # Since: 1.6
4085 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
4088 # @RxFilterInfo:
4090 # Rx-filter information for a NIC.
4092 # @name: net client name
4094 # @promiscuous: whether promiscuous mode is enabled
4096 # @multicast: multicast receive state
4098 # @unicast: unicast receive state
4100 # @vlan: vlan receive state (Since 2.0)
4102 # @broadcast-allowed: whether to receive broadcast
4104 # @multicast-overflow: multicast table is overflowed or not
4106 # @unicast-overflow: unicast table is overflowed or not
4108 # @main-mac: the main macaddr string
4110 # @vlan-table: a list of active vlan id
4112 # @unicast-table: a list of unicast macaddr string
4114 # @multicast-table: a list of multicast macaddr string
4116 # Since 1.6
4119 { 'struct': 'RxFilterInfo',
4120   'data': {
4121     'name':               'str',
4122     'promiscuous':        'bool',
4123     'multicast':          'RxState',
4124     'unicast':            'RxState',
4125     'vlan':               'RxState',
4126     'broadcast-allowed':  'bool',
4127     'multicast-overflow': 'bool',
4128     'unicast-overflow':   'bool',
4129     'main-mac':           'str',
4130     'vlan-table':         ['int'],
4131     'unicast-table':      ['str'],
4132     'multicast-table':    ['str'] }}
4135 # @query-rx-filter:
4137 # Return rx-filter information for all NICs (or for the given NIC).
4139 # @name: #optional net client name
4141 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4142 #          Returns an error if the given @name doesn't exist, or given
4143 #          NIC doesn't support rx-filter querying, or given net client
4144 #          isn't a NIC.
4146 # Since: 1.6
4148 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4149   'returns': ['RxFilterInfo'] }
4152 # @InputButton
4154 # Button of a pointer input device (mouse, tablet).
4156 # Since: 2.0
4158 { 'enum'  : 'InputButton',
4159   'data'  : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down' ] }
4162 # @InputAxis
4164 # Position axis of a pointer input device (mouse, tablet).
4166 # Since: 2.0
4168 { 'enum'  : 'InputAxis',
4169   'data'  : [ 'x', 'y' ] }
4172 # @InputKeyEvent
4174 # Keyboard input event.
4176 # @key:    Which key this event is for.
4177 # @down:   True for key-down and false for key-up events.
4179 # Since: 2.0
4181 { 'struct'  : 'InputKeyEvent',
4182   'data'  : { 'key'     : 'KeyValue',
4183               'down'    : 'bool' } }
4186 # @InputBtnEvent
4188 # Pointer button input event.
4190 # @button: Which button this event is for.
4191 # @down:   True for key-down and false for key-up events.
4193 # Since: 2.0
4195 { 'struct'  : 'InputBtnEvent',
4196   'data'  : { 'button'  : 'InputButton',
4197               'down'    : 'bool' } }
4200 # @InputMoveEvent
4202 # Pointer motion input event.
4204 # @axis:   Which axis is referenced by @value.
4205 # @value:  Pointer position.  For absolute coordinates the
4206 #          valid range is 0 -> 0x7ffff
4208 # Since: 2.0
4210 { 'struct'  : 'InputMoveEvent',
4211   'data'  : { 'axis'    : 'InputAxis',
4212               'value'   : 'int' } }
4215 # @InputEvent
4217 # Input event union.
4219 # @key: Input event of Keyboard
4220 # @btn: Input event of pointer buttons
4221 # @rel: Input event of relative pointer motion
4222 # @abs: Input event of absolute pointer motion
4224 # Since: 2.0
4226 { 'union' : 'InputEvent',
4227   'data'  : { 'key'     : 'InputKeyEvent',
4228               'btn'     : 'InputBtnEvent',
4229               'rel'     : 'InputMoveEvent',
4230               'abs'     : 'InputMoveEvent' } }
4233 # @input-send-event
4235 # Send input event(s) to guest.
4237 # @device: #optional display device to send event(s) to.
4238 # @head: #optional head to send event(s) to, in case the
4239 #        display device supports multiple scanouts.
4240 # @events: List of InputEvent union.
4242 # Returns: Nothing on success.
4244 # The @display and @head parameters can be used to send the input
4245 # event to specific input devices in case (a) multiple input devices
4246 # of the same kind are added to the virtual machine and (b) you have
4247 # configured input routing (see docs/multiseat.txt) for those input
4248 # devices.  The parameters work exactly like the device and head
4249 # properties of input devices.  If @device is missing, only devices
4250 # that have no input routing config are admissible.  If @device is
4251 # specified, both input devices with and without input routing config
4252 # are admissible, but devices with input routing config take
4253 # precedence.
4255 # Since: 2.6
4257 { 'command': 'input-send-event',
4258   'data': { '*device': 'str',
4259             '*head'  : 'int',
4260             'events' : [ 'InputEvent' ] } }
4263 # @NumaOptions
4265 # A discriminated record of NUMA options. (for OptsVisitor)
4267 # Since 2.1
4269 { 'union': 'NumaOptions',
4270   'data': {
4271     'node': 'NumaNodeOptions' }}
4274 # @NumaNodeOptions
4276 # Create a guest NUMA node. (for OptsVisitor)
4278 # @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
4280 # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
4281 #         if omitted)
4283 # @mem: #optional memory size of this node; mutually exclusive with @memdev.
4284 #       Equally divide total memory among nodes if both @mem and @memdev are
4285 #       omitted.
4287 # @memdev: #optional memory backend object.  If specified for one node,
4288 #          it must be specified for all nodes.
4290 # Since: 2.1
4292 { 'struct': 'NumaNodeOptions',
4293   'data': {
4294    '*nodeid': 'uint16',
4295    '*cpus':   ['uint16'],
4296    '*mem':    'size',
4297    '*memdev': 'str' }}
4300 # @HostMemPolicy
4302 # Host memory policy types
4304 # @default: restore default policy, remove any nondefault policy
4306 # @preferred: set the preferred host nodes for allocation
4308 # @bind: a strict policy that restricts memory allocation to the
4309 #        host nodes specified
4311 # @interleave: memory allocations are interleaved across the set
4312 #              of host nodes specified
4314 # Since 2.1
4316 { 'enum': 'HostMemPolicy',
4317   'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
4320 # @Memdev:
4322 # Information about memory backend
4324 # @size: memory backend size
4326 # @merge: enables or disables memory merge support
4328 # @dump: includes memory backend's memory in a core dump or not
4330 # @prealloc: enables or disables memory preallocation
4332 # @host-nodes: host nodes for its memory policy
4334 # @policy: memory policy of memory backend
4336 # Since: 2.1
4339 { 'struct': 'Memdev',
4340   'data': {
4341     'size':       'size',
4342     'merge':      'bool',
4343     'dump':       'bool',
4344     'prealloc':   'bool',
4345     'host-nodes': ['uint16'],
4346     'policy':     'HostMemPolicy' }}
4349 # @query-memdev:
4351 # Returns information for all memory backends.
4353 # Returns: a list of @Memdev.
4355 # Since: 2.1
4357 { 'command': 'query-memdev', 'returns': ['Memdev'] }
4360 # @PCDIMMDeviceInfo:
4362 # PCDIMMDevice state information
4364 # @id: #optional device's ID
4366 # @addr: physical address, where device is mapped
4368 # @size: size of memory that the device provides
4370 # @slot: slot number at which device is plugged in
4372 # @node: NUMA node number where device is plugged in
4374 # @memdev: memory backend linked with device
4376 # @hotplugged: true if device was hotplugged
4378 # @hotpluggable: true if device if could be added/removed while machine is running
4380 # Since: 2.1
4382 { 'struct': 'PCDIMMDeviceInfo',
4383   'data': { '*id': 'str',
4384             'addr': 'int',
4385             'size': 'int',
4386             'slot': 'int',
4387             'node': 'int',
4388             'memdev': 'str',
4389             'hotplugged': 'bool',
4390             'hotpluggable': 'bool'
4391           }
4395 # @MemoryDeviceInfo:
4397 # Union containing information about a memory device
4399 # Since: 2.1
4401 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
4404 # @query-memory-devices
4406 # Lists available memory devices and their state
4408 # Since: 2.1
4410 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
4412 ## @ACPISlotType
4414 # @DIMM: memory slot
4415 # @CPU: logical CPU slot (since 2.7)
4417 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
4419 ## @ACPIOSTInfo
4421 # OSPM Status Indication for a device
4422 # For description of possible values of @source and @status fields
4423 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
4425 # @device: #optional device ID associated with slot
4427 # @slot: slot ID, unique per slot of a given @slot-type
4429 # @slot-type: type of the slot
4431 # @source: an integer containing the source event
4433 # @status: an integer containing the status code
4435 # Since: 2.1
4437 { 'struct': 'ACPIOSTInfo',
4438   'data'  : { '*device': 'str',
4439               'slot': 'str',
4440               'slot-type': 'ACPISlotType',
4441               'source': 'int',
4442               'status': 'int' } }
4445 # @query-acpi-ospm-status
4447 # Lists ACPI OSPM status of ACPI device objects,
4448 # which might be reported via _OST method
4450 # Since: 2.1
4452 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
4455 # @WatchdogExpirationAction
4457 # An enumeration of the actions taken when the watchdog device's timer is
4458 # expired
4460 # @reset: system resets
4462 # @shutdown: system shutdown, note that it is similar to @powerdown, which
4463 #            tries to set to system status and notify guest
4465 # @poweroff: system poweroff, the emulator program exits
4467 # @pause: system pauses, similar to @stop
4469 # @debug: system enters debug state
4471 # @none: nothing is done
4473 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
4474 #              VCPUS on x86) (since 2.4)
4476 # Since: 2.1
4478 { 'enum': 'WatchdogExpirationAction',
4479   'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
4480             'inject-nmi' ] }
4483 # @IoOperationType
4485 # An enumeration of the I/O operation types
4487 # @read: read operation
4489 # @write: write operation
4491 # Since: 2.1
4493 { 'enum': 'IoOperationType',
4494   'data': [ 'read', 'write' ] }
4497 # @GuestPanicAction
4499 # An enumeration of the actions taken when guest OS panic is detected
4501 # @pause: system pauses
4503 # Since: 2.1
4505 { 'enum': 'GuestPanicAction',
4506   'data': [ 'pause' ] }
4509 # @rtc-reset-reinjection
4511 # This command will reset the RTC interrupt reinjection backlog.
4512 # Can be used if another mechanism to synchronize guest time
4513 # is in effect, for example QEMU guest agent's guest-set-time
4514 # command.
4516 # Since: 2.1
4518 { 'command': 'rtc-reset-reinjection' }
4520 # Rocker ethernet network switch
4521 { 'include': 'qapi/rocker.json' }
4524 # ReplayMode:
4526 # Mode of the replay subsystem.
4528 # @none: normal execution mode. Replay or record are not enabled.
4530 # @record: record mode. All non-deterministic data is written into the
4531 #          replay log.
4533 # @play: replay mode. Non-deterministic data required for system execution
4534 #        is read from the log.
4536 # Since: 2.5
4538 { 'enum': 'ReplayMode',
4539   'data': [ 'none', 'record', 'play' ] }
4542 # @xen-load-devices-state:
4544 # Load the state of all devices from file. The RAM and the block devices
4545 # of the VM are not loaded by this command.
4547 # @filename: the file to load the state of the devices from as binary
4548 # data. See xen-save-devices-state.txt for a description of the binary
4549 # format.
4551 # Since: 2.7
4553 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
4556 # @GICCapability:
4558 # The struct describes capability for a specific GIC (Generic
4559 # Interrupt Controller) version. These bits are not only decided by
4560 # QEMU/KVM software version, but also decided by the hardware that
4561 # the program is running upon.
4563 # @version:  version of GIC to be described. Currently, only 2 and 3
4564 #            are supported.
4566 # @emulated: whether current QEMU/hardware supports emulated GIC
4567 #            device in user space.
4569 # @kernel:   whether current QEMU/hardware supports hardware
4570 #            accelerated GIC device in kernel.
4572 # Since: 2.6
4574 { 'struct': 'GICCapability',
4575   'data': { 'version': 'int',
4576             'emulated': 'bool',
4577             'kernel': 'bool' } }
4580 # @query-gic-capabilities:
4582 # This command is ARM-only. It will return a list of GICCapability
4583 # objects that describe its capability bits.
4585 # Returns: a list of GICCapability objects.
4587 # Since: 2.6
4589 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
4592 # CpuInstanceProperties
4594 # List of properties to be used for hotplugging a CPU instance,
4595 # it should be passed by management with device_add command when
4596 # a CPU is being hotplugged.
4598 # Note: currently there are 4 properties that could be present
4599 # but management should be prepared to pass through other
4600 # properties with device_add command to allow for future
4601 # interface extension. This also requires the filed names to be kept in
4602 # sync with the properties passed to -device/device_add.
4604 # @node-id: #optional NUMA node ID the CPU belongs to
4605 # @socket-id: #optional socket number within node/board the CPU belongs to
4606 # @core-id: #optional core number within socket the CPU belongs to
4607 # @thread-id: #optional thread number within core the CPU belongs to
4609 # Since: 2.7
4611 { 'struct': 'CpuInstanceProperties',
4612   'data': { '*node-id': 'int',
4613             '*socket-id': 'int',
4614             '*core-id': 'int',
4615             '*thread-id': 'int'
4616   }
4620 # @HotpluggableCPU
4622 # @type: CPU object type for usage with device_add command
4623 # @props: list of properties to be used for hotplugging CPU
4624 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
4625 # @qom-path: #optional link to existing CPU object if CPU is present or
4626 #            omitted if CPU is not present.
4628 # Since: 2.7
4630 { 'struct': 'HotpluggableCPU',
4631   'data': { 'type': 'str',
4632             'vcpus-count': 'int',
4633             'props': 'CpuInstanceProperties',
4634             '*qom-path': 'str'
4635           }
4639 # @query-hotpluggable-cpus
4641 # Returns: a list of HotpluggableCPU objects.
4643 # Since: 2.7
4645 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }