hw/arm/virt: no ITS on older machine types
[qemu/kevin.git] / qapi-schema.json
blobded1179f0656dc69f22733d27e9813aea3f64f3c
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 # @max-bandwidth: to set maximum speed for migration. maximum speed in
662 #                 bytes per second. (Since 2.8)
664 # @downtime-limit: set maximum tolerated downtime for migration. maximum
665 #                  downtime in milliseconds (Since 2.8)
667 # Since: 2.4
669 { 'enum': 'MigrationParameter',
670   'data': ['compress-level', 'compress-threads', 'decompress-threads',
671            'cpu-throttle-initial', 'cpu-throttle-increment',
672            'tls-creds', 'tls-hostname', 'max-bandwidth',
673            'downtime-limit'] }
676 # @migrate-set-parameters
678 # Set various migration parameters.  See MigrationParameters for details.
680 # Since: 2.4
682 { 'command': 'migrate-set-parameters', 'boxed': true,
683   'data': 'MigrationParameters' }
686 # @MigrationParameters
688 # Optional members can be omitted on input ('migrate-set-parameters')
689 # but most members will always be present on output
690 # ('query-migrate-parameters'), with the exception of tls-creds and
691 # tls-hostname.
693 # @compress-level: #optional compression level
695 # @compress-threads: #optional compression thread count
697 # @decompress-threads: #optional decompression thread count
699 # @cpu-throttle-initial: #optional Initial percentage of time guest cpus are
700 #                        throttledwhen migration auto-converge is activated.
701 #                        The default value is 20. (Since 2.7)
703 # @cpu-throttle-increment: #optional throttle percentage increase each time
704 #                          auto-converge detects that migration is not making
705 #                          progress. The default value is 10. (Since 2.7)
707 # @tls-creds: #optional ID of the 'tls-creds' object that provides credentials
708 #             for establishing a TLS connection over the migration data
709 #             channel. On the outgoing side of the migration, the credentials
710 #             must be for a 'client' endpoint, while for the incoming side the
711 #             credentials must be for a 'server' endpoint. Setting this
712 #             will enable TLS for all migrations. The default is unset,
713 #             resulting in unsecured migration at the QEMU level. (Since 2.7)
715 # @tls-hostname: #optional hostname of the target host for the migration. This
716 #                is required when using x509 based TLS credentials and the
717 #                migration URI does not already include a hostname. For
718 #                example if using fd: or exec: based migration, the
719 #                hostname must be provided so that the server's x509
720 #                certificate identity can be validated. (Since 2.7)
722 # @max-bandwidth: to set maximum speed for migration. maximum speed in
723 #                 bytes per second. (Since 2.8)
725 # @downtime-limit: set maximum tolerated downtime for migration. maximum
726 #                  downtime in milliseconds (Since 2.8)
728 # Since: 2.4
730 { 'struct': 'MigrationParameters',
731   'data': { '*compress-level': 'int',
732             '*compress-threads': 'int',
733             '*decompress-threads': 'int',
734             '*cpu-throttle-initial': 'int',
735             '*cpu-throttle-increment': 'int',
736             '*tls-creds': 'str',
737             '*tls-hostname': 'str',
738             '*max-bandwidth': 'int',
739             '*downtime-limit': 'int'} }
741 # @query-migrate-parameters
743 # Returns information about the current migration parameters
745 # Returns: @MigrationParameters
747 # Since: 2.4
749 { 'command': 'query-migrate-parameters',
750   'returns': 'MigrationParameters' }
753 # @client_migrate_info
755 # Set migration information for remote display.  This makes the server
756 # ask the client to automatically reconnect using the new parameters
757 # once migration finished successfully.  Only implemented for SPICE.
759 # @protocol:     must be "spice"
760 # @hostname:     migration target hostname
761 # @port:         #optional spice tcp port for plaintext channels
762 # @tls-port:     #optional spice tcp port for tls-secured channels
763 # @cert-subject: #optional server certificate subject
765 # Since: 0.14.0
767 { 'command': 'client_migrate_info',
768   'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
769             '*tls-port': 'int', '*cert-subject': 'str' } }
772 # @migrate-start-postcopy
774 # Followup to a migration command to switch the migration to postcopy mode.
775 # The postcopy-ram capability must be set before the original migration
776 # command.
778 # Since: 2.5
779 { 'command': 'migrate-start-postcopy' }
782 # @MouseInfo:
784 # Information about a mouse device.
786 # @name: the name of the mouse device
788 # @index: the index of the mouse device
790 # @current: true if this device is currently receiving mouse events
792 # @absolute: true if this device supports absolute coordinates as input
794 # Since: 0.14.0
796 { 'struct': 'MouseInfo',
797   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
798            'absolute': 'bool'} }
801 # @query-mice:
803 # Returns information about each active mouse device
805 # Returns: a list of @MouseInfo for each device
807 # Since: 0.14.0
809 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
812 # @CpuInfoArch:
814 # An enumeration of cpu types that enable additional information during
815 # @query-cpus.
817 # Since: 2.6
819 { 'enum': 'CpuInfoArch',
820   'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
823 # @CpuInfo:
825 # Information about a virtual CPU
827 # @CPU: the index of the virtual CPU
829 # @current: this only exists for backwards compatibility and should be ignored
831 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
832 #          to a processor specific low power mode.
834 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
836 # @thread_id: ID of the underlying host thread
838 # @arch: architecture of the cpu, which determines which additional fields
839 #        will be listed (since 2.6)
841 # Since: 0.14.0
843 # Notes: @halted is a transient state that changes frequently.  By the time the
844 #        data is sent to the client, the guest may no longer be halted.
846 { 'union': 'CpuInfo',
847   'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
848            'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' },
849   'discriminator': 'arch',
850   'data': { 'x86': 'CpuInfoX86',
851             'sparc': 'CpuInfoSPARC',
852             'ppc': 'CpuInfoPPC',
853             'mips': 'CpuInfoMIPS',
854             'tricore': 'CpuInfoTricore',
855             'other': 'CpuInfoOther' } }
858 # @CpuInfoX86:
860 # Additional information about a virtual i386 or x86_64 CPU
862 # @pc: the 64-bit instruction pointer
864 # Since 2.6
866 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
869 # @CpuInfoSPARC:
871 # Additional information about a virtual SPARC CPU
873 # @pc: the PC component of the instruction pointer
875 # @npc: the NPC component of the instruction pointer
877 # Since 2.6
879 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
882 # @CpuInfoPPC:
884 # Additional information about a virtual PPC CPU
886 # @nip: the instruction pointer
888 # Since 2.6
890 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
893 # @CpuInfoMIPS:
895 # Additional information about a virtual MIPS CPU
897 # @PC: the instruction pointer
899 # Since 2.6
901 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
904 # @CpuInfoTricore:
906 # Additional information about a virtual Tricore CPU
908 # @PC: the instruction pointer
910 # Since 2.6
912 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
915 # @CpuInfoOther:
917 # No additional information is available about the virtual CPU
919 # Since 2.6
922 { 'struct': 'CpuInfoOther', 'data': { } }
925 # @query-cpus:
927 # Returns a list of information about each virtual CPU.
929 # Returns: a list of @CpuInfo for each virtual CPU
931 # Since: 0.14.0
933 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
936 # @IOThreadInfo:
938 # Information about an iothread
940 # @id: the identifier of the iothread
942 # @thread-id: ID of the underlying host thread
944 # Since: 2.0
946 { 'struct': 'IOThreadInfo',
947   'data': {'id': 'str', 'thread-id': 'int'} }
950 # @query-iothreads:
952 # Returns a list of information about each iothread.
954 # Note this list excludes the QEMU main loop thread, which is not declared
955 # using the -object iothread command-line option.  It is always the main thread
956 # of the process.
958 # Returns: a list of @IOThreadInfo for each iothread
960 # Since: 2.0
962 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
965 # @NetworkAddressFamily
967 # The network address family
969 # @ipv4: IPV4 family
971 # @ipv6: IPV6 family
973 # @unix: unix socket
975 # @unknown: otherwise
977 # Since: 2.1
979 { 'enum': 'NetworkAddressFamily',
980   'data': [ 'ipv4', 'ipv6', 'unix', 'unknown' ] }
983 # @VncBasicInfo
985 # The basic information for vnc network connection
987 # @host: IP address
989 # @service: The service name of the vnc port. This may depend on the host
990 #           system's service database so symbolic names should not be relied
991 #           on.
993 # @family: address family
995 # @websocket: true in case the socket is a websocket (since 2.3).
997 # Since: 2.1
999 { 'struct': 'VncBasicInfo',
1000   'data': { 'host': 'str',
1001             'service': 'str',
1002             'family': 'NetworkAddressFamily',
1003             'websocket': 'bool' } }
1006 # @VncServerInfo
1008 # The network connection information for server
1010 # @auth: #optional, authentication method
1012 # Since: 2.1
1014 { 'struct': 'VncServerInfo',
1015   'base': 'VncBasicInfo',
1016   'data': { '*auth': 'str' } }
1019 # @VncClientInfo:
1021 # Information about a connected VNC client.
1023 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
1024 #              Name of the client.
1026 # @sasl_username: #optional If SASL authentication is in use, the SASL username
1027 #                 used for authentication.
1029 # Since: 0.14.0
1031 { 'struct': 'VncClientInfo',
1032   'base': 'VncBasicInfo',
1033   'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1036 # @VncInfo:
1038 # Information about the VNC session.
1040 # @enabled: true if the VNC server is enabled, false otherwise
1042 # @host: #optional The hostname the VNC server is bound to.  This depends on
1043 #        the name resolution on the host and may be an IP address.
1045 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
1046 #                    'ipv4' if the host is listening for IPv4 connections
1047 #                    'unix' if the host is listening on a unix domain socket
1048 #                    'unknown' otherwise
1050 # @service: #optional The service name of the server's port.  This may depends
1051 #           on the host system's service database so symbolic names should not
1052 #           be relied on.
1054 # @auth: #optional the current authentication type used by the server
1055 #        'none' if no authentication is being used
1056 #        'vnc' if VNC authentication is being used
1057 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
1058 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1059 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1060 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1061 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1062 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1063 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1064 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1065 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1067 # @clients: a list of @VncClientInfo of all currently connected clients
1069 # Since: 0.14.0
1071 { 'struct': 'VncInfo',
1072   'data': {'enabled': 'bool', '*host': 'str',
1073            '*family': 'NetworkAddressFamily',
1074            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1077 # @VncPriAuth:
1079 # vnc primary authentication method.
1081 # Since: 2.3
1083 { 'enum': 'VncPrimaryAuth',
1084   'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1085             'tls', 'vencrypt', 'sasl' ] }
1088 # @VncVencryptSubAuth:
1090 # vnc sub authentication method with vencrypt.
1092 # Since: 2.3
1094 { 'enum': 'VncVencryptSubAuth',
1095   'data': [ 'plain',
1096             'tls-none',  'x509-none',
1097             'tls-vnc',   'x509-vnc',
1098             'tls-plain', 'x509-plain',
1099             'tls-sasl',  'x509-sasl' ] }
1102 # @VncInfo2:
1104 # Information about a vnc server
1106 # @id: vnc server name.
1108 # @server: A list of @VncBasincInfo describing all listening sockets.
1109 #          The list can be empty (in case the vnc server is disabled).
1110 #          It also may have multiple entries: normal + websocket,
1111 #          possibly also ipv4 + ipv6 in the future.
1113 # @clients: A list of @VncClientInfo of all currently connected clients.
1114 #           The list can be empty, for obvious reasons.
1116 # @auth: The current authentication type used by the server
1118 # @vencrypt: #optional The vencrypt sub authentication type used by the server,
1119 #            only specified in case auth == vencrypt.
1121 # @display: #optional The display device the vnc server is linked to.
1123 # Since: 2.3
1125 { 'struct': 'VncInfo2',
1126   'data': { 'id'        : 'str',
1127             'server'    : ['VncBasicInfo'],
1128             'clients'   : ['VncClientInfo'],
1129             'auth'      : 'VncPrimaryAuth',
1130             '*vencrypt' : 'VncVencryptSubAuth',
1131             '*display'  : 'str' } }
1134 # @query-vnc:
1136 # Returns information about the current VNC server
1138 # Returns: @VncInfo
1140 # Since: 0.14.0
1142 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1145 # @query-vnc-servers:
1147 # Returns a list of vnc servers.  The list can be empty.
1149 # Returns: a list of @VncInfo2
1151 # Since: 2.3
1153 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1156 # @SpiceBasicInfo
1158 # The basic information for SPICE network connection
1160 # @host: IP address
1162 # @port: port number
1164 # @family: address family
1166 # Since: 2.1
1168 { 'struct': 'SpiceBasicInfo',
1169   'data': { 'host': 'str',
1170             'port': 'str',
1171             'family': 'NetworkAddressFamily' } }
1174 # @SpiceServerInfo
1176 # Information about a SPICE server
1178 # @auth: #optional, authentication method
1180 # Since: 2.1
1182 { 'struct': 'SpiceServerInfo',
1183   'base': 'SpiceBasicInfo',
1184   'data': { '*auth': 'str' } }
1187 # @SpiceChannel
1189 # Information about a SPICE client channel.
1191 # @connection-id: SPICE connection id number.  All channels with the same id
1192 #                 belong to the same SPICE session.
1194 # @channel-type: SPICE channel type number.  "1" is the main control
1195 #                channel, filter for this one if you want to track spice
1196 #                sessions only
1198 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
1199 #              multiple channels of the same type exist, such as multiple
1200 #              display channels in a multihead setup
1202 # @tls: true if the channel is encrypted, false otherwise.
1204 # Since: 0.14.0
1206 { 'struct': 'SpiceChannel',
1207   'base': 'SpiceBasicInfo',
1208   'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1209            'tls': 'bool'} }
1212 # @SpiceQueryMouseMode
1214 # An enumeration of Spice mouse states.
1216 # @client: Mouse cursor position is determined by the client.
1218 # @server: Mouse cursor position is determined by the server.
1220 # @unknown: No information is available about mouse mode used by
1221 #           the spice server.
1223 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1225 # Since: 1.1
1227 { 'enum': 'SpiceQueryMouseMode',
1228   'data': [ 'client', 'server', 'unknown' ] }
1231 # @SpiceInfo
1233 # Information about the SPICE session.
1235 # @enabled: true if the SPICE server is enabled, false otherwise
1237 # @migrated: true if the last guest migration completed and spice
1238 #            migration had completed as well. false otherwise.
1240 # @host: #optional The hostname the SPICE server is bound to.  This depends on
1241 #        the name resolution on the host and may be an IP address.
1243 # @port: #optional The SPICE server's port number.
1245 # @compiled-version: #optional SPICE server version.
1247 # @tls-port: #optional The SPICE server's TLS port number.
1249 # @auth: #optional the current authentication type used by the server
1250 #        'none'  if no authentication is being used
1251 #        'spice' uses SASL or direct TLS authentication, depending on command
1252 #                line options
1254 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1255 #              be determined by the client or the server, or unknown if spice
1256 #              server doesn't provide this information.
1258 #              Since: 1.1
1260 # @channels: a list of @SpiceChannel for each active spice channel
1262 # Since: 0.14.0
1264 { 'struct': 'SpiceInfo',
1265   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1266            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1267            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1270 # @query-spice
1272 # Returns information about the current SPICE server
1274 # Returns: @SpiceInfo
1276 # Since: 0.14.0
1278 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1281 # @BalloonInfo:
1283 # Information about the guest balloon device.
1285 # @actual: the number of bytes the balloon currently contains
1287 # Since: 0.14.0
1290 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1293 # @query-balloon:
1295 # Return information about the balloon device.
1297 # Returns: @BalloonInfo on success
1298 #          If the balloon driver is enabled but not functional because the KVM
1299 #          kernel module cannot support it, KvmMissingCap
1300 #          If no balloon device is present, DeviceNotActive
1302 # Since: 0.14.0
1304 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1307 # @PciMemoryRange:
1309 # A PCI device memory region
1311 # @base: the starting address (guest physical)
1313 # @limit: the ending address (guest physical)
1315 # Since: 0.14.0
1317 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1320 # @PciMemoryRegion
1322 # Information about a PCI device I/O region.
1324 # @bar: the index of the Base Address Register for this region
1326 # @type: 'io' if the region is a PIO region
1327 #        'memory' if the region is a MMIO region
1329 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1331 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1333 # Since: 0.14.0
1335 { 'struct': 'PciMemoryRegion',
1336   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1337            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1340 # @PciBusInfo:
1342 # Information about a bus of a PCI Bridge device
1344 # @number: primary bus interface number.  This should be the number of the
1345 #          bus the device resides on.
1347 # @secondary: secondary bus interface number.  This is the number of the
1348 #             main bus for the bridge
1350 # @subordinate: This is the highest number bus that resides below the
1351 #               bridge.
1353 # @io_range: The PIO range for all devices on this bridge
1355 # @memory_range: The MMIO range for all devices on this bridge
1357 # @prefetchable_range: The range of prefetchable MMIO for all devices on
1358 #                      this bridge
1360 # Since: 2.4
1362 { 'struct': 'PciBusInfo',
1363   'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1364            'io_range': 'PciMemoryRange',
1365            'memory_range': 'PciMemoryRange',
1366            'prefetchable_range': 'PciMemoryRange' } }
1369 # @PciBridgeInfo:
1371 # Information about a PCI Bridge device
1373 # @bus: information about the bus the device resides on
1375 # @devices: a list of @PciDeviceInfo for each device on this bridge
1377 # Since: 0.14.0
1379 { 'struct': 'PciBridgeInfo',
1380   'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
1383 # @PciDeviceClass:
1385 # Information about the Class of a PCI device
1387 # @desc: #optional a string description of the device's class
1389 # @class: the class code of the device
1391 # Since: 2.4
1393 { 'struct': 'PciDeviceClass',
1394   'data': {'*desc': 'str', 'class': 'int'} }
1397 # @PciDeviceId:
1399 # Information about the Id of a PCI device
1401 # @device: the PCI device id
1403 # @vendor: the PCI vendor id
1405 # Since: 2.4
1407 { 'struct': 'PciDeviceId',
1408   'data': {'device': 'int', 'vendor': 'int'} }
1411 # @PciDeviceInfo:
1413 # Information about a PCI device
1415 # @bus: the bus number of the device
1417 # @slot: the slot the device is located in
1419 # @function: the function of the slot used by the device
1421 # @class_info: the class of the device
1423 # @id: the PCI device id
1425 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1427 # @qdev_id: the device name of the PCI device
1429 # @pci_bridge: if the device is a PCI bridge, the bridge information
1431 # @regions: a list of the PCI I/O regions associated with the device
1433 # Notes: the contents of @class_info.desc are not stable and should only be
1434 #        treated as informational.
1436 # Since: 0.14.0
1438 { 'struct': 'PciDeviceInfo',
1439   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1440            'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
1441            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1442            'regions': ['PciMemoryRegion']} }
1445 # @PciInfo:
1447 # Information about a PCI bus
1449 # @bus: the bus index
1451 # @devices: a list of devices on this bus
1453 # Since: 0.14.0
1455 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1458 # @query-pci:
1460 # Return information about the PCI bus topology of the guest.
1462 # Returns: a list of @PciInfo for each PCI bus
1464 # Since: 0.14.0
1466 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1469 # @quit:
1471 # This command will cause the QEMU process to exit gracefully.  While every
1472 # attempt is made to send the QMP response before terminating, this is not
1473 # guaranteed.  When using this interface, a premature EOF would not be
1474 # unexpected.
1476 # Since: 0.14.0
1478 { 'command': 'quit' }
1481 # @stop:
1483 # Stop all guest VCPU execution.
1485 # Since:  0.14.0
1487 # Notes:  This function will succeed even if the guest is already in the stopped
1488 #         state.  In "inmigrate" state, it will ensure that the guest
1489 #         remains paused once migration finishes, as if the -S option was
1490 #         passed on the command line.
1492 { 'command': 'stop' }
1495 # @system_reset:
1497 # Performs a hard reset of a guest.
1499 # Since: 0.14.0
1501 { 'command': 'system_reset' }
1504 # @system_powerdown:
1506 # Requests that a guest perform a powerdown operation.
1508 # Since: 0.14.0
1510 # Notes: A guest may or may not respond to this command.  This command
1511 #        returning does not indicate that a guest has accepted the request or
1512 #        that it has shut down.  Many guests will respond to this command by
1513 #        prompting the user in some way.
1515 { 'command': 'system_powerdown' }
1518 # @cpu:
1520 # This command is a nop that is only provided for the purposes of compatibility.
1522 # Since: 0.14.0
1524 # Notes: Do not use this command.
1526 { 'command': 'cpu', 'data': {'index': 'int'} }
1529 # @cpu-add
1531 # Adds CPU with specified ID
1533 # @id: ID of CPU to be created, valid values [0..max_cpus)
1535 # Returns: Nothing on success
1537 # Since 1.5
1539 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1542 # @memsave:
1544 # Save a portion of guest memory to a file.
1546 # @val: the virtual address of the guest to start from
1548 # @size: the size of memory region to save
1550 # @filename: the file to save the memory to as binary data
1552 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1553 #                       virtual address (defaults to CPU 0)
1555 # Returns: Nothing on success
1557 # Since: 0.14.0
1559 # Notes: Errors were not reliably returned until 1.1
1561 { 'command': 'memsave',
1562   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1565 # @pmemsave:
1567 # Save a portion of guest physical memory to a file.
1569 # @val: the physical address of the guest to start from
1571 # @size: the size of memory region to save
1573 # @filename: the file to save the memory to as binary data
1575 # Returns: Nothing on success
1577 # Since: 0.14.0
1579 # Notes: Errors were not reliably returned until 1.1
1581 { 'command': 'pmemsave',
1582   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1585 # @cont:
1587 # Resume guest VCPU execution.
1589 # Since:  0.14.0
1591 # Returns:  If successful, nothing
1592 #           If QEMU was started with an encrypted block device and a key has
1593 #              not yet been set, DeviceEncrypted.
1595 # Notes:  This command will succeed if the guest is currently running.  It
1596 #         will also succeed if the guest is in the "inmigrate" state; in
1597 #         this case, the effect of the command is to make sure the guest
1598 #         starts once migration finishes, removing the effect of the -S
1599 #         command line option if it was passed.
1601 { 'command': 'cont' }
1604 # @system_wakeup:
1606 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1608 # Since:  1.1
1610 # Returns:  nothing.
1612 { 'command': 'system_wakeup' }
1615 # @inject-nmi:
1617 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
1619 # Returns:  If successful, nothing
1621 # Since:  0.14.0
1623 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
1625 { 'command': 'inject-nmi' }
1628 # @set_link:
1630 # Sets the link status of a virtual network adapter.
1632 # @name: the device name of the virtual network adapter
1634 # @up: true to set the link status to be up
1636 # Returns: Nothing on success
1637 #          If @name is not a valid network device, DeviceNotFound
1639 # Since: 0.14.0
1641 # Notes: Not all network adapters support setting link status.  This command
1642 #        will succeed even if the network adapter does not support link status
1643 #        notification.
1645 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1648 # @balloon:
1650 # Request the balloon driver to change its balloon size.
1652 # @value: the target size of the balloon in bytes
1654 # Returns: Nothing on success
1655 #          If the balloon driver is enabled but not functional because the KVM
1656 #            kernel module cannot support it, KvmMissingCap
1657 #          If no balloon device is present, DeviceNotActive
1659 # Notes: This command just issues a request to the guest.  When it returns,
1660 #        the balloon size may not have changed.  A guest can change the balloon
1661 #        size independent of this command.
1663 # Since: 0.14.0
1665 { 'command': 'balloon', 'data': {'value': 'int'} }
1668 # @Abort
1670 # This action can be used to test transaction failure.
1672 # Since: 1.6
1674 { 'struct': 'Abort',
1675   'data': { } }
1678 # @ActionCompletionMode
1680 # An enumeration of Transactional completion modes.
1682 # @individual: Do not attempt to cancel any other Actions if any Actions fail
1683 #              after the Transaction request succeeds. All Actions that
1684 #              can complete successfully will do so without waiting on others.
1685 #              This is the default.
1687 # @grouped: If any Action fails after the Transaction succeeds, cancel all
1688 #           Actions. Actions do not complete until all Actions are ready to
1689 #           complete. May be rejected by Actions that do not support this
1690 #           completion mode.
1692 # Since: 2.5
1694 { 'enum': 'ActionCompletionMode',
1695   'data': [ 'individual', 'grouped' ] }
1698 # @TransactionAction
1700 # A discriminated record of operations that can be performed with
1701 # @transaction.
1703 # Since 1.1
1705 # drive-backup since 1.6
1706 # abort since 1.6
1707 # blockdev-snapshot-internal-sync since 1.7
1708 # blockdev-backup since 2.3
1709 # blockdev-snapshot since 2.5
1710 # block-dirty-bitmap-add since 2.5
1711 # block-dirty-bitmap-clear since 2.5
1713 { 'union': 'TransactionAction',
1714   'data': {
1715        'blockdev-snapshot': 'BlockdevSnapshot',
1716        'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
1717        'drive-backup': 'DriveBackup',
1718        'blockdev-backup': 'BlockdevBackup',
1719        'abort': 'Abort',
1720        'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
1721        'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
1722        'block-dirty-bitmap-clear': 'BlockDirtyBitmap'
1723    } }
1726 # @TransactionProperties
1728 # Optional arguments to modify the behavior of a Transaction.
1730 # @completion-mode: #optional Controls how jobs launched asynchronously by
1731 #                   Actions will complete or fail as a group.
1732 #                   See @ActionCompletionMode for details.
1734 # Since: 2.5
1736 { 'struct': 'TransactionProperties',
1737   'data': {
1738        '*completion-mode': 'ActionCompletionMode'
1739   }
1743 # @transaction
1745 # Executes a number of transactionable QMP commands atomically. If any
1746 # operation fails, then the entire set of actions will be abandoned and the
1747 # appropriate error returned.
1749 # @actions: List of @TransactionAction;
1750 #           information needed for the respective operations.
1752 # @properties: #optional structure of additional options to control the
1753 #              execution of the transaction. See @TransactionProperties
1754 #              for additional detail.
1756 # Returns: nothing on success
1757 #          Errors depend on the operations of the transaction
1759 # Note: The transaction aborts on the first failure.  Therefore, there will be
1760 # information on only one failed operation returned in an error condition, and
1761 # subsequent actions will not have been attempted.
1763 # Since 1.1
1765 { 'command': 'transaction',
1766   'data': { 'actions': [ 'TransactionAction' ],
1767             '*properties': 'TransactionProperties'
1768           }
1772 # @human-monitor-command:
1774 # Execute a command on the human monitor and return the output.
1776 # @command-line: the command to execute in the human monitor
1778 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1780 # Returns: the output of the command as a string
1782 # Since: 0.14.0
1784 # Notes: This command only exists as a stop-gap.  Its use is highly
1785 #        discouraged.  The semantics of this command are not guaranteed.
1787 #        Known limitations:
1789 #        o This command is stateless, this means that commands that depend
1790 #          on state information (such as getfd) might not work
1792 #       o Commands that prompt the user for data (eg. 'cont' when the block
1793 #         device is encrypted) don't currently work
1795 { 'command': 'human-monitor-command',
1796   'data': {'command-line': 'str', '*cpu-index': 'int'},
1797   'returns': 'str' }
1800 # @migrate_cancel
1802 # Cancel the current executing migration process.
1804 # Returns: nothing on success
1806 # Notes: This command succeeds even if there is no migration process running.
1808 # Since: 0.14.0
1810 { 'command': 'migrate_cancel' }
1813 # @migrate_set_downtime
1815 # Set maximum tolerated downtime for migration.
1817 # @value: maximum downtime in seconds
1819 # Returns: nothing on success
1821 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1823 # Since: 0.14.0
1825 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1828 # @migrate_set_speed
1830 # Set maximum speed for migration.
1832 # @value: maximum speed in bytes.
1834 # Returns: nothing on success
1836 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1838 # Since: 0.14.0
1840 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1843 # @migrate-set-cache-size
1845 # Set XBZRLE cache size
1847 # @value: cache size in bytes
1849 # The size will be rounded down to the nearest power of 2.
1850 # The cache size can be modified before and during ongoing migration
1852 # Returns: nothing on success
1854 # Since: 1.2
1856 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1859 # @query-migrate-cache-size
1861 # query XBZRLE cache size
1863 # Returns: XBZRLE cache size in bytes
1865 # Since: 1.2
1867 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1870 # @ObjectPropertyInfo:
1872 # @name: the name of the property
1874 # @type: the type of the property.  This will typically come in one of four
1875 #        forms:
1877 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1878 #           These types are mapped to the appropriate JSON type.
1880 #        2) A child type in the form 'child<subtype>' where subtype is a qdev
1881 #           device type name.  Child properties create the composition tree.
1883 #        3) A link type in the form 'link<subtype>' where subtype is a qdev
1884 #           device type name.  Link properties form the device model graph.
1886 # Since: 1.2
1888 { 'struct': 'ObjectPropertyInfo',
1889   'data': { 'name': 'str', 'type': 'str' } }
1892 # @qom-list:
1894 # This command will list any properties of a object given a path in the object
1895 # model.
1897 # @path: the path within the object model.  See @qom-get for a description of
1898 #        this parameter.
1900 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1901 #          object.
1903 # Since: 1.2
1905 { 'command': 'qom-list',
1906   'data': { 'path': 'str' },
1907   'returns': [ 'ObjectPropertyInfo' ] }
1910 # @qom-get:
1912 # This command will get a property from a object model path and return the
1913 # value.
1915 # @path: The path within the object model.  There are two forms of supported
1916 #        paths--absolute and partial paths.
1918 #        Absolute paths are derived from the root object and can follow child<>
1919 #        or link<> properties.  Since they can follow link<> properties, they
1920 #        can be arbitrarily long.  Absolute paths look like absolute filenames
1921 #        and are prefixed  with a leading slash.
1923 #        Partial paths look like relative filenames.  They do not begin
1924 #        with a prefix.  The matching rules for partial paths are subtle but
1925 #        designed to make specifying objects easy.  At each level of the
1926 #        composition tree, the partial path is matched as an absolute path.
1927 #        The first match is not returned.  At least two matches are searched
1928 #        for.  A successful result is only returned if only one match is
1929 #        found.  If more than one match is found, a flag is return to
1930 #        indicate that the match was ambiguous.
1932 # @property: The property name to read
1934 # Returns: The property value.  The type depends on the property
1935 #          type. child<> and link<> properties are returned as #str
1936 #          pathnames.  All integer property types (u8, u16, etc) are
1937 #          returned as #int.
1939 # Since: 1.2
1941 { 'command': 'qom-get',
1942   'data': { 'path': 'str', 'property': 'str' },
1943   'returns': 'any' }
1946 # @qom-set:
1948 # This command will set a property from a object model path.
1950 # @path: see @qom-get for a description of this parameter
1952 # @property: the property name to set
1954 # @value: a value who's type is appropriate for the property type.  See @qom-get
1955 #         for a description of type mapping.
1957 # Since: 1.2
1959 { 'command': 'qom-set',
1960   'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
1963 # @set_password:
1965 # Sets the password of a remote display session.
1967 # @protocol: `vnc' to modify the VNC server password
1968 #            `spice' to modify the Spice server password
1970 # @password: the new password
1972 # @connected: #optional how to handle existing clients when changing the
1973 #                       password.  If nothing is specified, defaults to `keep'
1974 #                       `fail' to fail the command if clients are connected
1975 #                       `disconnect' to disconnect existing clients
1976 #                       `keep' to maintain existing clients
1978 # Returns: Nothing on success
1979 #          If Spice is not enabled, DeviceNotFound
1981 # Since: 0.14.0
1983 { 'command': 'set_password',
1984   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1987 # @expire_password:
1989 # Expire the password of a remote display server.
1991 # @protocol: the name of the remote display protocol `vnc' or `spice'
1993 # @time: when to expire the password.
1994 #        `now' to expire the password immediately
1995 #        `never' to cancel password expiration
1996 #        `+INT' where INT is the number of seconds from now (integer)
1997 #        `INT' where INT is the absolute time in seconds
1999 # Returns: Nothing on success
2000 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
2002 # Since: 0.14.0
2004 # Notes: Time is relative to the server and currently there is no way to
2005 #        coordinate server time with client time.  It is not recommended to
2006 #        use the absolute time version of the @time parameter unless you're
2007 #        sure you are on the same machine as the QEMU instance.
2009 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2012 # @change-vnc-password:
2014 # Change the VNC server password.
2016 # @password:  the new password to use with VNC authentication
2018 # Since: 1.1
2020 # Notes:  An empty password in this command will set the password to the empty
2021 #         string.  Existing clients are unaffected by executing this command.
2023 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2026 # @change:
2028 # This command is multiple commands multiplexed together.
2030 # @device: This is normally the name of a block device but it may also be 'vnc'.
2031 #          when it's 'vnc', then sub command depends on @target
2033 # @target: If @device is a block device, then this is the new filename.
2034 #          If @device is 'vnc', then if the value 'password' selects the vnc
2035 #          change password command.   Otherwise, this specifies a new server URI
2036 #          address to listen to for VNC connections.
2038 # @arg:    If @device is a block device, then this is an optional format to open
2039 #          the device with.
2040 #          If @device is 'vnc' and @target is 'password', this is the new VNC
2041 #          password to set.  If this argument is an empty string, then no future
2042 #          logins will be allowed.
2044 # Returns: Nothing on success.
2045 #          If @device is not a valid block device, DeviceNotFound
2046 #          If the new block device is encrypted, DeviceEncrypted.  Note that
2047 #          if this error is returned, the device has been opened successfully
2048 #          and an additional call to @block_passwd is required to set the
2049 #          device's password.  The behavior of reads and writes to the block
2050 #          device between when these calls are executed is undefined.
2052 # Notes:  This interface is deprecated, and it is strongly recommended that you
2053 #         avoid using it.  For changing block devices, use
2054 #         blockdev-change-medium; for changing VNC parameters, use
2055 #         change-vnc-password.
2057 # Since: 0.14.0
2059 { 'command': 'change',
2060   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2063 # @ObjectTypeInfo:
2065 # This structure describes a search result from @qom-list-types
2067 # @name: the type name found in the search
2069 # Since: 1.1
2071 # Notes: This command is experimental and may change syntax in future releases.
2073 { 'struct': 'ObjectTypeInfo',
2074   'data': { 'name': 'str' } }
2077 # @qom-list-types:
2079 # This command will return a list of types given search parameters
2081 # @implements: if specified, only return types that implement this type name
2083 # @abstract: if true, include abstract types in the results
2085 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2087 # Since: 1.1
2089 { 'command': 'qom-list-types',
2090   'data': { '*implements': 'str', '*abstract': 'bool' },
2091   'returns': [ 'ObjectTypeInfo' ] }
2094 # @DevicePropertyInfo:
2096 # Information about device properties.
2098 # @name: the name of the property
2099 # @type: the typename of the property
2100 # @description: #optional if specified, the description of the property.
2101 #               (since 2.2)
2103 # Since: 1.2
2105 { 'struct': 'DevicePropertyInfo',
2106   'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
2109 # @device-list-properties:
2111 # List properties associated with a device.
2113 # @typename: the type name of a device
2115 # Returns: a list of DevicePropertyInfo describing a devices properties
2117 # Since: 1.2
2119 { 'command': 'device-list-properties',
2120   'data': { 'typename': 'str'},
2121   'returns': [ 'DevicePropertyInfo' ] }
2124 # @migrate
2126 # Migrates the current running guest to another Virtual Machine.
2128 # @uri: the Uniform Resource Identifier of the destination VM
2130 # @blk: #optional do block migration (full disk copy)
2132 # @inc: #optional incremental disk copy migration
2134 # @detach: this argument exists only for compatibility reasons and
2135 #          is ignored by QEMU
2137 # Returns: nothing on success
2139 # Since: 0.14.0
2141 { 'command': 'migrate',
2142   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2145 # @migrate-incoming
2147 # Start an incoming migration, the qemu must have been started
2148 # with -incoming defer
2150 # @uri: The Uniform Resource Identifier identifying the source or
2151 #       address to listen on
2153 # Returns: nothing on success
2155 # Since: 2.3
2156 # Note: It's a bad idea to use a string for the uri, but it needs to stay
2157 # compatible with -incoming and the format of the uri is already exposed
2158 # above libvirt
2160 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
2162 # @xen-save-devices-state:
2164 # Save the state of all devices to file. The RAM and the block devices
2165 # of the VM are not saved by this command.
2167 # @filename: the file to save the state of the devices to as binary
2168 # data. See xen-save-devices-state.txt for a description of the binary
2169 # format.
2171 # Returns: Nothing on success
2173 # Since: 1.1
2175 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2178 # @xen-set-global-dirty-log
2180 # Enable or disable the global dirty log mode.
2182 # @enable: true to enable, false to disable.
2184 # Returns: nothing
2186 # Since: 1.3
2188 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2191 # @device_add:
2193 # @driver: the name of the new device's driver
2195 # @bus: #optional the device's parent bus (device tree path)
2197 # @id: the device's ID, must be unique
2199 # Additional arguments depend on the type.
2201 # Add a device.
2203 # Notes:
2204 # 1. For detailed information about this command, please refer to the
2205 #    'docs/qdev-device-use.txt' file.
2207 # 2. It's possible to list device properties by running QEMU with the
2208 #    "-device DEVICE,help" command-line argument, where DEVICE is the
2209 #    device's name
2211 # Example:
2213 # -> { "execute": "device_add",
2214 #      "arguments": { "driver": "e1000", "id": "net1",
2215 #                     "bus": "pci.0",
2216 #                     "mac": "52:54:00:12:34:56" } }
2217 # <- { "return": {} }
2219 # TODO This command effectively bypasses QAPI completely due to its
2220 # "additional arguments" business.  It shouldn't have been added to
2221 # the schema in this form.  It should be qapified properly, or
2222 # replaced by a properly qapified command.
2224 # Since: 0.13
2226 { 'command': 'device_add',
2227   'data': {'driver': 'str', 'id': 'str'},
2228   'gen': false } # so we can get the additional arguments
2231 # @device_del:
2233 # Remove a device from a guest
2235 # @id: the name or QOM path of the device
2237 # Returns: Nothing on success
2238 #          If @id is not a valid device, DeviceNotFound
2240 # Notes: When this command completes, the device may not be removed from the
2241 #        guest.  Hot removal is an operation that requires guest cooperation.
2242 #        This command merely requests that the guest begin the hot removal
2243 #        process.  Completion of the device removal process is signaled with a
2244 #        DEVICE_DELETED event. Guest reset will automatically complete removal
2245 #        for all devices.
2247 # Since: 0.14.0
2249 { 'command': 'device_del', 'data': {'id': 'str'} }
2252 # @DumpGuestMemoryFormat:
2254 # An enumeration of guest-memory-dump's format.
2256 # @elf: elf format
2258 # @kdump-zlib: kdump-compressed format with zlib-compressed
2260 # @kdump-lzo: kdump-compressed format with lzo-compressed
2262 # @kdump-snappy: kdump-compressed format with snappy-compressed
2264 # Since: 2.0
2266 { 'enum': 'DumpGuestMemoryFormat',
2267   'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
2270 # @dump-guest-memory
2272 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2273 # very long depending on the amount of guest memory.
2275 # @paging: if true, do paging to get guest's memory mapping. This allows
2276 #          using gdb to process the core file.
2278 #          IMPORTANT: this option can make QEMU allocate several gigabytes
2279 #                     of RAM. This can happen for a large guest, or a
2280 #                     malicious guest pretending to be large.
2282 #          Also, paging=true has the following limitations:
2284 #             1. The guest may be in a catastrophic state or can have corrupted
2285 #                memory, which cannot be trusted
2286 #             2. The guest can be in real-mode even if paging is enabled. For
2287 #                example, the guest uses ACPI to sleep, and ACPI sleep state
2288 #                goes in real-mode
2289 #             3. Currently only supported on i386 and x86_64.
2291 # @protocol: the filename or file descriptor of the vmcore. The supported
2292 #            protocols are:
2294 #            1. file: the protocol starts with "file:", and the following
2295 #               string is the file's path.
2296 #            2. fd: the protocol starts with "fd:", and the following string
2297 #               is the fd's name.
2299 # @detach: #optional if true, QMP will return immediately rather than
2300 #          waiting for the dump to finish. The user can track progress
2301 #          using "query-dump". (since 2.6).
2303 # @begin: #optional if specified, the starting physical address.
2305 # @length: #optional if specified, the memory size, in bytes. If you don't
2306 #          want to dump all guest's memory, please specify the start @begin
2307 #          and @length
2309 # @format: #optional if specified, the format of guest memory dump. But non-elf
2310 #          format is conflict with paging and filter, ie. @paging, @begin and
2311 #          @length is not allowed to be specified with non-elf @format at the
2312 #          same time (since 2.0)
2314 # Returns: nothing on success
2316 # Since: 1.2
2318 { 'command': 'dump-guest-memory',
2319   'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
2320             '*begin': 'int', '*length': 'int',
2321             '*format': 'DumpGuestMemoryFormat'} }
2324 # @DumpStatus
2326 # Describe the status of a long-running background guest memory dump.
2328 # @none: no dump-guest-memory has started yet.
2330 # @active: there is one dump running in background.
2332 # @completed: the last dump has finished successfully.
2334 # @failed: the last dump has failed.
2336 # Since 2.6
2338 { 'enum': 'DumpStatus',
2339   'data': [ 'none', 'active', 'completed', 'failed' ] }
2342 # @DumpQueryResult
2344 # The result format for 'query-dump'.
2346 # @status: enum of @DumpStatus, which shows current dump status
2348 # @completed: bytes written in latest dump (uncompressed)
2350 # @total: total bytes to be written in latest dump (uncompressed)
2352 # Since 2.6
2354 { 'struct': 'DumpQueryResult',
2355   'data': { 'status': 'DumpStatus',
2356             'completed': 'int',
2357             'total': 'int' } }
2360 # @query-dump
2362 # Query latest dump status.
2364 # Returns: A @DumpStatus object showing the dump status.
2366 # Since: 2.6
2368 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
2371 # @DumpGuestMemoryCapability:
2373 # A list of the available formats for dump-guest-memory
2375 # Since: 2.0
2377 { 'struct': 'DumpGuestMemoryCapability',
2378   'data': {
2379       'formats': ['DumpGuestMemoryFormat'] } }
2382 # @query-dump-guest-memory-capability:
2384 # Returns the available formats for dump-guest-memory
2386 # Returns:  A @DumpGuestMemoryCapability object listing available formats for
2387 #           dump-guest-memory
2389 # Since: 2.0
2391 { 'command': 'query-dump-guest-memory-capability',
2392   'returns': 'DumpGuestMemoryCapability' }
2395 # @dump-skeys
2397 # Dump guest's storage keys
2399 # @filename: the path to the file to dump to
2401 # This command is only supported on s390 architecture.
2403 # Since: 2.5
2405 { 'command': 'dump-skeys',
2406   'data': { 'filename': 'str' } }
2409 # @netdev_add:
2411 # Add a network backend.
2413 # @type: the type of network backend.  Current valid values are 'user', 'tap',
2414 #        'vde', 'socket', 'dump' and 'bridge'
2416 # @id: the name of the new network backend
2418 # Additional arguments depend on the type.
2420 # TODO This command effectively bypasses QAPI completely due to its
2421 # "additional arguments" business.  It shouldn't have been added to
2422 # the schema in this form.  It should be qapified properly, or
2423 # replaced by a properly qapified command.
2425 # Since: 0.14.0
2427 # Returns: Nothing on success
2428 #          If @type is not a valid network backend, DeviceNotFound
2430 { 'command': 'netdev_add',
2431   'data': {'type': 'str', 'id': 'str'},
2432   'gen': false }                # so we can get the additional arguments
2435 # @netdev_del:
2437 # Remove a network backend.
2439 # @id: the name of the network backend to remove
2441 # Returns: Nothing on success
2442 #          If @id is not a valid network backend, DeviceNotFound
2444 # Since: 0.14.0
2446 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2449 # @object-add:
2451 # Create a QOM object.
2453 # @qom-type: the class name for the object to be created
2455 # @id: the name of the new object
2457 # @props: #optional a dictionary of properties to be passed to the backend
2459 # Returns: Nothing on success
2460 #          Error if @qom-type is not a valid class name
2462 # Since: 2.0
2464 { 'command': 'object-add',
2465   'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
2468 # @object-del:
2470 # Remove a QOM object.
2472 # @id: the name of the QOM object to remove
2474 # Returns: Nothing on success
2475 #          Error if @id is not a valid id for a QOM object
2477 # Since: 2.0
2479 { 'command': 'object-del', 'data': {'id': 'str'} }
2482 # @NetdevNoneOptions
2484 # Use it alone to have zero network devices.
2486 # Since 1.2
2488 { 'struct': 'NetdevNoneOptions',
2489   'data': { } }
2492 # @NetLegacyNicOptions
2494 # Create a new Network Interface Card.
2496 # @netdev: #optional id of -netdev to connect to
2498 # @macaddr: #optional MAC address
2500 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2502 # @addr: #optional PCI device address
2504 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2506 # Since 1.2
2508 { 'struct': 'NetLegacyNicOptions',
2509   'data': {
2510     '*netdev':  'str',
2511     '*macaddr': 'str',
2512     '*model':   'str',
2513     '*addr':    'str',
2514     '*vectors': 'uint32' } }
2517 # @String
2519 # A fat type wrapping 'str', to be embedded in lists.
2521 # Since 1.2
2523 { 'struct': 'String',
2524   'data': {
2525     'str': 'str' } }
2528 # @NetdevUserOptions
2530 # Use the user mode network stack which requires no administrator privilege to
2531 # run.
2533 # @hostname: #optional client hostname reported by the builtin DHCP server
2535 # @restrict: #optional isolate the guest from the host
2537 # @ipv4: #optional whether to support IPv4, default true for enabled
2538 #        (since 2.6)
2540 # @ipv6: #optional whether to support IPv6, default true for enabled
2541 #        (since 2.6)
2543 # @ip: #optional legacy parameter, use net= instead
2545 # @net: #optional IP network address that the guest will see, in the
2546 #       form addr[/netmask] The netmask is optional, and can be
2547 #       either in the form a.b.c.d or as a number of valid top-most
2548 #       bits. Default is 10.0.2.0/24.
2550 # @host: #optional guest-visible address of the host
2552 # @tftp: #optional root directory of the built-in TFTP server
2554 # @bootfile: #optional BOOTP filename, for use with tftp=
2556 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2557 #             assign
2559 # @dns: #optional guest-visible address of the virtual nameserver
2561 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2562 #             to the guest
2564 # @ipv6-prefix: #optional IPv6 network prefix (default is fec0::) (since
2565 #               2.6). The network prefix is given in the usual
2566 #               hexadecimal IPv6 address notation.
2568 # @ipv6-prefixlen: #optional IPv6 network prefix length (default is 64)
2569 #                  (since 2.6)
2571 # @ipv6-host: #optional guest-visible IPv6 address of the host (since 2.6)
2573 # @ipv6-dns: #optional guest-visible IPv6 address of the virtual
2574 #            nameserver (since 2.6)
2576 # @smb: #optional root directory of the built-in SMB server
2578 # @smbserver: #optional IP address of the built-in SMB server
2580 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2581 #           endpoints
2583 # @guestfwd: #optional forward guest TCP connections
2585 # Since 1.2
2587 { 'struct': 'NetdevUserOptions',
2588   'data': {
2589     '*hostname':  'str',
2590     '*restrict':  'bool',
2591     '*ipv4':      'bool',
2592     '*ipv6':      'bool',
2593     '*ip':        'str',
2594     '*net':       'str',
2595     '*host':      'str',
2596     '*tftp':      'str',
2597     '*bootfile':  'str',
2598     '*dhcpstart': 'str',
2599     '*dns':       'str',
2600     '*dnssearch': ['String'],
2601     '*ipv6-prefix':      'str',
2602     '*ipv6-prefixlen':   'int',
2603     '*ipv6-host':        'str',
2604     '*ipv6-dns':         'str',
2605     '*smb':       'str',
2606     '*smbserver': 'str',
2607     '*hostfwd':   ['String'],
2608     '*guestfwd':  ['String'] } }
2611 # @NetdevTapOptions
2613 # Connect the host TAP network interface name to the VLAN.
2615 # @ifname: #optional interface name
2617 # @fd: #optional file descriptor of an already opened tap
2619 # @fds: #optional multiple file descriptors of already opened multiqueue capable
2620 # tap
2622 # @script: #optional script to initialize the interface
2624 # @downscript: #optional script to shut down the interface
2626 # @br: #optional bridge name (since 2.8)
2628 # @helper: #optional command to execute to configure bridge
2630 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2632 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2634 # @vhost: #optional enable vhost-net network accelerator
2636 # @vhostfd: #optional file descriptor of an already opened vhost net device
2638 # @vhostfds: #optional file descriptors of multiple already opened vhost net
2639 # devices
2641 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2643 # @queues: #optional number of queues to be created for multiqueue capable tap
2645 # @poll-us: #optional maximum number of microseconds that could
2646 # be spent on busy polling for tap (since 2.7)
2648 # Since 1.2
2650 { 'struct': 'NetdevTapOptions',
2651   'data': {
2652     '*ifname':     'str',
2653     '*fd':         'str',
2654     '*fds':        'str',
2655     '*script':     'str',
2656     '*downscript': 'str',
2657     '*br':         'str',
2658     '*helper':     'str',
2659     '*sndbuf':     'size',
2660     '*vnet_hdr':   'bool',
2661     '*vhost':      'bool',
2662     '*vhostfd':    'str',
2663     '*vhostfds':   'str',
2664     '*vhostforce': 'bool',
2665     '*queues':     'uint32',
2666     '*poll-us':    'uint32'} }
2669 # @NetdevSocketOptions
2671 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2672 # socket connection.
2674 # @fd: #optional file descriptor of an already opened socket
2676 # @listen: #optional port number, and optional hostname, to listen on
2678 # @connect: #optional port number, and optional hostname, to connect to
2680 # @mcast: #optional UDP multicast address and port number
2682 # @localaddr: #optional source address and port for multicast and udp packets
2684 # @udp: #optional UDP unicast address and port number
2686 # Since 1.2
2688 { 'struct': 'NetdevSocketOptions',
2689   'data': {
2690     '*fd':        'str',
2691     '*listen':    'str',
2692     '*connect':   'str',
2693     '*mcast':     'str',
2694     '*localaddr': 'str',
2695     '*udp':       'str' } }
2698 # @NetdevL2TPv3Options
2700 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
2702 # @src: source address
2704 # @dst: destination address
2706 # @srcport: #optional source port - mandatory for udp, optional for ip
2708 # @dstport: #optional destination port - mandatory for udp, optional for ip
2710 # @ipv6: #optional - force the use of ipv6
2712 # @udp: #optional - use the udp version of l2tpv3 encapsulation
2714 # @cookie64: #optional - use 64 bit coookies
2716 # @counter: #optional have sequence counter
2718 # @pincounter: #optional pin sequence counter to zero -
2719 #              workaround for buggy implementations or
2720 #              networks with packet reorder
2722 # @txcookie: #optional 32 or 64 bit transmit cookie
2724 # @rxcookie: #optional 32 or 64 bit receive cookie
2726 # @txsession: 32 bit transmit session
2728 # @rxsession: #optional 32 bit receive session - if not specified
2729 #             set to the same value as transmit
2731 # @offset: #optional additional offset - allows the insertion of
2732 #          additional application-specific data before the packet payload
2734 # Since 2.1
2736 { 'struct': 'NetdevL2TPv3Options',
2737   'data': {
2738     'src':          'str',
2739     'dst':          'str',
2740     '*srcport':     'str',
2741     '*dstport':     'str',
2742     '*ipv6':        'bool',
2743     '*udp':         'bool',
2744     '*cookie64':    'bool',
2745     '*counter':     'bool',
2746     '*pincounter':  'bool',
2747     '*txcookie':    'uint64',
2748     '*rxcookie':    'uint64',
2749     'txsession':    'uint32',
2750     '*rxsession':   'uint32',
2751     '*offset':      'uint32' } }
2754 # @NetdevVdeOptions
2756 # Connect the VLAN to a vde switch running on the host.
2758 # @sock: #optional socket path
2760 # @port: #optional port number
2762 # @group: #optional group owner of socket
2764 # @mode: #optional permissions for socket
2766 # Since 1.2
2768 { 'struct': 'NetdevVdeOptions',
2769   'data': {
2770     '*sock':  'str',
2771     '*port':  'uint16',
2772     '*group': 'str',
2773     '*mode':  'uint16' } }
2776 # @NetdevDumpOptions
2778 # Dump VLAN network traffic to a file.
2780 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2781 # suffixes.
2783 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2785 # Since 1.2
2787 { 'struct': 'NetdevDumpOptions',
2788   'data': {
2789     '*len':  'size',
2790     '*file': 'str' } }
2793 # @NetdevBridgeOptions
2795 # Connect a host TAP network interface to a host bridge device.
2797 # @br: #optional bridge name
2799 # @helper: #optional command to execute to configure bridge
2801 # Since 1.2
2803 { 'struct': 'NetdevBridgeOptions',
2804   'data': {
2805     '*br':     'str',
2806     '*helper': 'str' } }
2809 # @NetdevHubPortOptions
2811 # Connect two or more net clients through a software hub.
2813 # @hubid: hub identifier number
2815 # Since 1.2
2817 { 'struct': 'NetdevHubPortOptions',
2818   'data': {
2819     'hubid':     'int32' } }
2822 # @NetdevNetmapOptions
2824 # Connect a client to a netmap-enabled NIC or to a VALE switch port
2826 # @ifname: Either the name of an existing network interface supported by
2827 #          netmap, or the name of a VALE port (created on the fly).
2828 #          A VALE port name is in the form 'valeXXX:YYY', where XXX and
2829 #          YYY are non-negative integers. XXX identifies a switch and
2830 #          YYY identifies a port of the switch. VALE ports having the
2831 #          same XXX are therefore connected to the same switch.
2833 # @devname: #optional path of the netmap device (default: '/dev/netmap').
2835 # Since 2.0
2837 { 'struct': 'NetdevNetmapOptions',
2838   'data': {
2839     'ifname':     'str',
2840     '*devname':    'str' } }
2843 # @NetdevVhostUserOptions
2845 # Vhost-user network backend
2847 # @chardev: name of a unix socket chardev
2849 # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
2851 # @queues: #optional number of queues to be created for multiqueue vhost-user
2852 #          (default: 1) (Since 2.5)
2854 # Since 2.1
2856 { 'struct': 'NetdevVhostUserOptions',
2857   'data': {
2858     'chardev':        'str',
2859     '*vhostforce':    'bool',
2860     '*queues':        'int' } }
2863 # @NetClientDriver
2865 # Available netdev drivers.
2867 # Since 2.7
2869 { 'enum': 'NetClientDriver',
2870   'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
2871             'bridge', 'hubport', 'netmap', 'vhost-user' ] }
2874 # @Netdev
2876 # Captures the configuration of a network device.
2878 # @id: identifier for monitor commands.
2880 # @type: Specify the driver used for interpreting remaining arguments.
2882 # Since 1.2
2884 # 'l2tpv3' - since 2.1
2886 { 'union': 'Netdev',
2887   'base': { 'id': 'str', 'type': 'NetClientDriver' },
2888   'discriminator': 'type',
2889   'data': {
2890     'none':     'NetdevNoneOptions',
2891     'nic':      'NetLegacyNicOptions',
2892     'user':     'NetdevUserOptions',
2893     'tap':      'NetdevTapOptions',
2894     'l2tpv3':   'NetdevL2TPv3Options',
2895     'socket':   'NetdevSocketOptions',
2896     'vde':      'NetdevVdeOptions',
2897     'dump':     'NetdevDumpOptions',
2898     'bridge':   'NetdevBridgeOptions',
2899     'hubport':  'NetdevHubPortOptions',
2900     'netmap':   'NetdevNetmapOptions',
2901     'vhost-user': 'NetdevVhostUserOptions' } }
2904 # @NetLegacy
2906 # Captures the configuration of a network device; legacy.
2908 # @vlan: #optional vlan number
2910 # @id: #optional identifier for monitor commands
2912 # @name: #optional identifier for monitor commands, ignored if @id is present
2914 # @opts: device type specific properties (legacy)
2916 # Since 1.2
2918 { 'struct': 'NetLegacy',
2919   'data': {
2920     '*vlan': 'int32',
2921     '*id':   'str',
2922     '*name': 'str',
2923     'opts':  'NetLegacyOptions' } }
2926 # @NetLegacyOptions
2928 # Like Netdev, but for use only by the legacy command line options
2930 # Since 1.2
2932 { 'union': 'NetLegacyOptions',
2933   'data': {
2934     'none':     'NetdevNoneOptions',
2935     'nic':      'NetLegacyNicOptions',
2936     'user':     'NetdevUserOptions',
2937     'tap':      'NetdevTapOptions',
2938     'l2tpv3':   'NetdevL2TPv3Options',
2939     'socket':   'NetdevSocketOptions',
2940     'vde':      'NetdevVdeOptions',
2941     'dump':     'NetdevDumpOptions',
2942     'bridge':   'NetdevBridgeOptions',
2943     'netmap':   'NetdevNetmapOptions',
2944     'vhost-user': 'NetdevVhostUserOptions' } }
2947 # @NetFilterDirection
2949 # Indicates whether a netfilter is attached to a netdev's transmit queue or
2950 # receive queue or both.
2952 # @all: the filter is attached both to the receive and the transmit
2953 #       queue of the netdev (default).
2955 # @rx: the filter is attached to the receive queue of the netdev,
2956 #      where it will receive packets sent to the netdev.
2958 # @tx: the filter is attached to the transmit queue of the netdev,
2959 #      where it will receive packets sent by the netdev.
2961 # Since 2.5
2963 { 'enum': 'NetFilterDirection',
2964   'data': [ 'all', 'rx', 'tx' ] }
2967 # @InetSocketAddress
2969 # Captures a socket address or address range in the Internet namespace.
2971 # @host: host part of the address
2973 # @port: port part of the address, or lowest port if @to is present
2975 # @to: highest port to try
2977 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2978 #        #optional
2980 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2981 #        #optional
2983 # Since 1.3
2985 { 'struct': 'InetSocketAddress',
2986   'data': {
2987     'host': 'str',
2988     'port': 'str',
2989     '*to': 'uint16',
2990     '*ipv4': 'bool',
2991     '*ipv6': 'bool' } }
2994 # @UnixSocketAddress
2996 # Captures a socket address in the local ("Unix socket") namespace.
2998 # @path: filesystem path to use
3000 # Since 1.3
3002 { 'struct': 'UnixSocketAddress',
3003   'data': {
3004     'path': 'str' } }
3007 # @SocketAddress
3009 # Captures the address of a socket, which could also be a named file descriptor
3011 # Since 1.3
3013 { 'union': 'SocketAddress',
3014   'data': {
3015     'inet': 'InetSocketAddress',
3016     'unix': 'UnixSocketAddress',
3017     'fd': 'String' } }
3020 # @getfd:
3022 # Receive a file descriptor via SCM rights and assign it a name
3024 # @fdname: file descriptor name
3026 # Returns: Nothing on success
3028 # Since: 0.14.0
3030 # Notes: If @fdname already exists, the file descriptor assigned to
3031 #        it will be closed and replaced by the received file
3032 #        descriptor.
3033 #        The 'closefd' command can be used to explicitly close the
3034 #        file descriptor when it is no longer needed.
3036 { 'command': 'getfd', 'data': {'fdname': 'str'} }
3039 # @closefd:
3041 # Close a file descriptor previously passed via SCM rights
3043 # @fdname: file descriptor name
3045 # Returns: Nothing on success
3047 # Since: 0.14.0
3049 { 'command': 'closefd', 'data': {'fdname': 'str'} }
3052 # @MachineInfo:
3054 # Information describing a machine.
3056 # @name: the name of the machine
3058 # @alias: #optional an alias for the machine name
3060 # @default: #optional whether the machine is default
3062 # @cpu-max: maximum number of CPUs supported by the machine type
3063 #           (since 1.5.0)
3065 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
3067 # Since: 1.2.0
3069 { 'struct': 'MachineInfo',
3070   'data': { 'name': 'str', '*alias': 'str',
3071             '*is-default': 'bool', 'cpu-max': 'int',
3072             'hotpluggable-cpus': 'bool'} }
3075 # @query-machines:
3077 # Return a list of supported machines
3079 # Returns: a list of MachineInfo
3081 # Since: 1.2.0
3083 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
3086 # @CpuDefinitionInfo:
3088 # Virtual CPU definition.
3090 # @name: the name of the CPU definition
3092 # @migration-safe: #optional whether a CPU definition can be safely used for
3093 #                  migration in combination with a QEMU compatibility machine
3094 #                  when migrating between different QMU versions and between
3095 #                  hosts with different sets of (hardware or software)
3096 #                  capabilities. If not provided, information is not available
3097 #                  and callers should not assume the CPU definition to be
3098 #                  migration-safe. (since 2.8)
3100 # @static: whether a CPU definition is static and will not change depending on
3101 #          QEMU version, machine type, machine options and accelerator options.
3102 #          A static model is always migration-safe. (since 2.8)
3104 # Since: 1.2.0
3106 { 'struct': 'CpuDefinitionInfo',
3107   'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool' } }
3110 # @query-cpu-definitions:
3112 # Return a list of supported virtual CPU definitions
3114 # Returns: a list of CpuDefInfo
3116 # Since: 1.2.0
3118 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3121 # @CpuModelInfo:
3123 # Virtual CPU model.
3125 # A CPU model consists of the name of a CPU definition, to which
3126 # delta changes are applied (e.g. features added/removed). Most magic values
3127 # that an architecture might require should be hidden behind the name.
3128 # However, if required, architectures can expose relevant properties.
3130 # @name: the name of the CPU definition the model is based on
3131 # @props: #optional a dictionary of QOM properties to be applied
3133 # Since: 2.8.0
3135 { 'struct': 'CpuModelInfo',
3136   'data': { 'name': 'str',
3137             '*props': 'any' } }
3140 # @CpuModelExpansionType
3142 # An enumeration of CPU model expansion types.
3144 # @static: Expand to a static CPU model, a combination of a static base
3145 #          model name and property delta changes. As the static base model will
3146 #          never change, the expanded CPU model will be the same, independant of
3147 #          independent of QEMU version, machine type, machine options, and
3148 #          accelerator options. Therefore, the resulting model can be used by
3149 #          tooling without having to specify a compatibility machine - e.g. when
3150 #          displaying the "host" model. static CPU models are migration-safe.
3152 # @full: Expand all properties. The produced model is not guaranteed to be
3153 #        migration-safe, but allows tooling to get an insight and work with
3154 #        model details.
3156 # Since: 2.8.0
3158 { 'enum': 'CpuModelExpansionType',
3159   'data': [ 'static', 'full' ] }
3163 # @CpuModelExpansionInfo
3165 # The result of a cpu model expansion.
3167 # @model: the expanded CpuModelInfo.
3169 # Since: 2.8.0
3171 { 'struct': 'CpuModelExpansionInfo',
3172   'data': { 'model': 'CpuModelInfo' } }
3176 # @query-cpu-model-expansion:
3178 # Expands a given CPU model (or a combination of CPU model + additional options)
3179 # to different granularities, allowing tooling to get an understanding what a
3180 # specific CPU model looks like in QEMU under a certain configuration.
3182 # This interface can be used to query the "host" CPU model.
3184 # The data returned by this command may be affected by:
3186 # * QEMU version: CPU models may look different depending on the QEMU version.
3187 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3188 # * machine-type: CPU model  may look different depending on the machine-type.
3189 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3190 # * machine options (including accelerator): in some architectures, CPU models
3191 #   may look different depending on machine and accelerator options. (Except for
3192 #   CPU models reported as "static" in query-cpu-definitions.)
3193 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3194 #   global properties may affect expansion of CPU models. Using
3195 #   query-cpu-model-expansion while using these is not advised.
3197 # Some architectures may not support all expansion types. s390x supports
3198 # "full" and "static".
3200 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
3201 #          not supported, if the model cannot be expanded, if the model contains
3202 #          an unknown CPU definition name, unknown properties or properties
3203 #          with a wrong type. Also returns an error if an expansion type is
3204 #          not supported.
3206 # Since: 2.8.0
3208 { 'command': 'query-cpu-model-expansion',
3209   'data': { 'type': 'CpuModelExpansionType',
3210             'model': 'CpuModelInfo' },
3211   'returns': 'CpuModelExpansionInfo' }
3214 # @CpuModelCompareResult:
3216 # An enumeration of CPU model comparation results. The result is usually
3217 # calculated using e.g. CPU features or CPU generations.
3219 # @incompatible: If model A is incompatible to model B, model A is not
3220 #                guaranteed to run where model B runs and the other way around.
3222 # @identical: If model A is identical to model B, model A is guaranteed to run
3223 #             where model B runs and the other way around.
3225 # @superset: If model A is a superset of model B, model B is guaranteed to run
3226 #            where model A runs. There are no guarantees about the other way.
3228 # @subset: If model A is a subset of model B, model A is guaranteed to run
3229 #          where model B runs. There are no guarantees about the other way.
3231 # Since: 2.8.0
3233 { 'enum': 'CpuModelCompareResult',
3234   'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
3237 # @CpuModelCompareInfo
3239 # The result of a CPU model comparison.
3241 # @result: The result of the compare operation.
3242 # @responsible-properties: List of properties that led to the comparison result
3243 #                          not being identical.
3245 # @responsible-properties is a list of QOM property names that led to
3246 # both CPUs not being detected as identical. For identical models, this
3247 # list is empty.
3248 # If a QOM property is read-only, that means there's no known way to make the
3249 # CPU models identical. If the special property name "type" is included, the
3250 # models are by definition not identical and cannot be made identical.
3252 # Since: 2.8.0
3254 { 'struct': 'CpuModelCompareInfo',
3255   'data': {'result': 'CpuModelCompareResult',
3256            'responsible-properties': ['str']
3257           }
3261 # @query-cpu-model-comparison:
3263 # Compares two CPU models, returning how they compare in a specific
3264 # configuration. The results indicates how both models compare regarding
3265 # runnability. This result can be used by tooling to make decisions if a
3266 # certain CPU model will run in a certain configuration or if a compatible
3267 # CPU model has to be created by baselining.
3269 # Usually, a CPU model is compared against the maximum possible CPU model
3270 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
3271 # model is identical or a subset, it will run in that configuration.
3273 # The result returned by this command may be affected by:
3275 # * QEMU version: CPU models may look different depending on the QEMU version.
3276 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3277 # * machine-type: CPU model may look different depending on the machine-type.
3278 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3279 # * machine options (including accelerator): in some architectures, CPU models
3280 #   may look different depending on machine and accelerator options. (Except for
3281 #   CPU models reported as "static" in query-cpu-definitions.)
3282 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3283 #   global properties may affect expansion of CPU models. Using
3284 #   query-cpu-model-expansion while using these is not advised.
3286 # Some architectures may not support comparing CPU models. s390x supports
3287 # comparing CPU models.
3289 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
3290 #          not supported, if a model cannot be used, if a model contains
3291 #          an unknown cpu definition name, unknown properties or properties
3292 #          with wrong types.
3294 # Since: 2.8.0
3296 { 'command': 'query-cpu-model-comparison',
3297   'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
3298   'returns': 'CpuModelCompareInfo' }
3301 # @CpuModelBaselineInfo
3303 # The result of a CPU model baseline.
3305 # @model: the baselined CpuModelInfo.
3307 # Since: 2.8.0
3309 { 'struct': 'CpuModelBaselineInfo',
3310   'data': { 'model': 'CpuModelInfo' } }
3313 # @query-cpu-model-baseline:
3315 # Baseline two CPU models, creating a compatible third model. The created
3316 # model will always be a static, migration-safe CPU model (see "static"
3317 # CPU model expansion for details).
3319 # This interface can be used by tooling to create a compatible CPU model out
3320 # two CPU models. The created CPU model will be identical to or a subset of
3321 # both CPU models when comparing them. Therefore, the created CPU model is
3322 # guaranteed to run where the given CPU models run.
3324 # The result returned by this command may be affected by:
3326 # * QEMU version: CPU models may look different depending on the QEMU version.
3327 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3328 # * machine-type: CPU model may look different depending on the machine-type.
3329 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3330 # * machine options (including accelerator): in some architectures, CPU models
3331 #   may look different depending on machine and accelerator options. (Except for
3332 #   CPU models reported as "static" in query-cpu-definitions.)
3333 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3334 #   global properties may affect expansion of CPU models. Using
3335 #   query-cpu-model-expansion while using these is not advised.
3337 # Some architectures may not support baselining CPU models. s390x supports
3338 # baselining CPU models.
3340 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
3341 #          not supported, if a model cannot be used, if a model contains
3342 #          an unknown cpu definition name, unknown properties or properties
3343 #          with wrong types.
3345 # Since: 2.8.0
3347 { 'command': 'query-cpu-model-baseline',
3348   'data': { 'modela': 'CpuModelInfo',
3349             'modelb': 'CpuModelInfo' },
3350   'returns': 'CpuModelBaselineInfo' }
3352 # @AddfdInfo:
3354 # Information about a file descriptor that was added to an fd set.
3356 # @fdset-id: The ID of the fd set that @fd was added to.
3358 # @fd: The file descriptor that was received via SCM rights and
3359 #      added to the fd set.
3361 # Since: 1.2.0
3363 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3366 # @add-fd:
3368 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3370 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3372 # @opaque: #optional A free-form string that can be used to describe the fd.
3374 # Returns: @AddfdInfo on success
3375 #          If file descriptor was not received, FdNotSupplied
3376 #          If @fdset-id is a negative value, InvalidParameterValue
3378 # Notes: The list of fd sets is shared by all monitor connections.
3380 #        If @fdset-id is not specified, a new fd set will be created.
3382 # Since: 1.2.0
3384 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3385   'returns': 'AddfdInfo' }
3388 # @remove-fd:
3390 # Remove a file descriptor from an fd set.
3392 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3394 # @fd: #optional The file descriptor that is to be removed.
3396 # Returns: Nothing on success
3397 #          If @fdset-id or @fd is not found, FdNotFound
3399 # Since: 1.2.0
3401 # Notes: The list of fd sets is shared by all monitor connections.
3403 #        If @fd is not specified, all file descriptors in @fdset-id
3404 #        will be removed.
3406 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3409 # @FdsetFdInfo:
3411 # Information about a file descriptor that belongs to an fd set.
3413 # @fd: The file descriptor value.
3415 # @opaque: #optional A free-form string that can be used to describe the fd.
3417 # Since: 1.2.0
3419 { 'struct': 'FdsetFdInfo',
3420   'data': {'fd': 'int', '*opaque': 'str'} }
3423 # @FdsetInfo:
3425 # Information about an fd set.
3427 # @fdset-id: The ID of the fd set.
3429 # @fds: A list of file descriptors that belong to this fd set.
3431 # Since: 1.2.0
3433 { 'struct': 'FdsetInfo',
3434   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3437 # @query-fdsets:
3439 # Return information describing all fd sets.
3441 # Returns: A list of @FdsetInfo
3443 # Since: 1.2.0
3445 # Note: The list of fd sets is shared by all monitor connections.
3448 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3451 # @TargetInfo:
3453 # Information describing the QEMU target.
3455 # @arch: the target architecture (eg "x86_64", "i386", etc)
3457 # Since: 1.2.0
3459 { 'struct': 'TargetInfo',
3460   'data': { 'arch': 'str' } }
3463 # @query-target:
3465 # Return information about the target for this QEMU
3467 # Returns: TargetInfo
3469 # Since: 1.2.0
3471 { 'command': 'query-target', 'returns': 'TargetInfo' }
3474 # @QKeyCode:
3476 # An enumeration of key name.
3478 # This is used by the send-key command.
3480 # Since: 1.3.0
3482 # 'unmapped' and 'pause' since 2.0
3483 # 'ro' and 'kp_comma' since 2.4
3484 # 'kp_equals' and 'power' since 2.6
3486 { 'enum': 'QKeyCode',
3487   'data': [ 'unmapped',
3488             'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3489             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3490             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3491             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3492             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3493             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3494             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3495             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3496             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3497             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3498             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3499             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3500             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3501             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3502             'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro',
3503             'kp_comma', 'kp_equals', 'power' ] }
3506 # @KeyValue
3508 # Represents a keyboard key.
3510 # Since: 1.3.0
3512 { 'union': 'KeyValue',
3513   'data': {
3514     'number': 'int',
3515     'qcode': 'QKeyCode' } }
3518 # @send-key:
3520 # Send keys to guest.
3522 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3523 #        simultaneously sent to the guest. A @KeyValue.number value is sent
3524 #        directly to the guest, while @KeyValue.qcode must be a valid
3525 #        @QKeyCode value
3527 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3528 #             to 100
3530 # Returns: Nothing on success
3531 #          If key is unknown or redundant, InvalidParameter
3533 # Since: 1.3.0
3536 { 'command': 'send-key',
3537   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3540 # @screendump:
3542 # Write a PPM of the VGA screen to a file.
3544 # @filename: the path of a new PPM file to store the image
3546 # Returns: Nothing on success
3548 # Since: 0.14.0
3550 { 'command': 'screendump', 'data': {'filename': 'str'} }
3554 # @ChardevCommon:
3556 # Configuration shared across all chardev backends
3558 # @logfile: #optional The name of a logfile to save output
3559 # @logappend: #optional true to append instead of truncate
3560 #             (default to false to truncate)
3562 # Since: 2.6
3564 { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
3565                                        '*logappend': 'bool' } }
3568 # @ChardevFile:
3570 # Configuration info for file chardevs.
3572 # @in:  #optional The name of the input file
3573 # @out: The name of the output file
3574 # @append: #optional Open the file in append mode (default false to
3575 #          truncate) (Since 2.6)
3577 # Since: 1.4
3579 { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
3580                                    'out' : 'str',
3581                                    '*append': 'bool' },
3582   'base': 'ChardevCommon' }
3585 # @ChardevHostdev:
3587 # Configuration info for device and pipe chardevs.
3589 # @device: The name of the special file for the device,
3590 #          i.e. /dev/ttyS0 on Unix or COM1: on Windows
3591 # @type: What kind of device this is.
3593 # Since: 1.4
3595 { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
3596   'base': 'ChardevCommon' }
3599 # @ChardevSocket:
3601 # Configuration info for (stream) socket chardevs.
3603 # @addr: socket address to listen on (server=true)
3604 #        or connect to (server=false)
3605 # @tls-creds: #optional the ID of the TLS credentials object (since 2.6)
3606 # @server: #optional create server socket (default: true)
3607 # @wait: #optional wait for incoming connection on server
3608 #        sockets (default: false).
3609 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3610 # @telnet: #optional enable telnet protocol on server
3611 #          sockets (default: false)
3612 # @reconnect: #optional For a client socket, if a socket is disconnected,
3613 #          then attempt a reconnect after the given number of seconds.
3614 #          Setting this to zero disables this function. (default: 0)
3615 #          (Since: 2.2)
3617 # Since: 1.4
3619 { 'struct': 'ChardevSocket', 'data': { 'addr'       : 'SocketAddress',
3620                                      '*tls-creds'  : 'str',
3621                                      '*server'    : 'bool',
3622                                      '*wait'      : 'bool',
3623                                      '*nodelay'   : 'bool',
3624                                      '*telnet'    : 'bool',
3625                                      '*reconnect' : 'int' },
3626   'base': 'ChardevCommon' }
3629 # @ChardevUdp:
3631 # Configuration info for datagram socket chardevs.
3633 # @remote: remote address
3634 # @local: #optional local address
3636 # Since: 1.5
3638 { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3639                                   '*local' : 'SocketAddress' },
3640   'base': 'ChardevCommon' }
3643 # @ChardevMux:
3645 # Configuration info for mux chardevs.
3647 # @chardev: name of the base chardev.
3649 # Since: 1.5
3651 { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
3652   'base': 'ChardevCommon' }
3655 # @ChardevStdio:
3657 # Configuration info for stdio chardevs.
3659 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3660 #          be delivered to qemu.  Default: true in -nographic mode,
3661 #          false otherwise.
3663 # Since: 1.5
3665 { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
3666   'base': 'ChardevCommon' }
3670 # @ChardevSpiceChannel:
3672 # Configuration info for spice vm channel chardevs.
3674 # @type: kind of channel (for example vdagent).
3676 # Since: 1.5
3678 { 'struct': 'ChardevSpiceChannel', 'data': { 'type'  : 'str' },
3679   'base': 'ChardevCommon' }
3682 # @ChardevSpicePort:
3684 # Configuration info for spice port chardevs.
3686 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3688 # Since: 1.5
3690 { 'struct': 'ChardevSpicePort', 'data': { 'fqdn'  : 'str' },
3691   'base': 'ChardevCommon' }
3694 # @ChardevVC:
3696 # Configuration info for virtual console chardevs.
3698 # @width:  console width,  in pixels
3699 # @height: console height, in pixels
3700 # @cols:   console width,  in chars
3701 # @rows:   console height, in chars
3703 # Since: 1.5
3705 { 'struct': 'ChardevVC', 'data': { '*width'  : 'int',
3706                                  '*height' : 'int',
3707                                  '*cols'   : 'int',
3708                                  '*rows'   : 'int' },
3709   'base': 'ChardevCommon' }
3712 # @ChardevRingbuf:
3714 # Configuration info for ring buffer chardevs.
3716 # @size: #optional ring buffer size, must be power of two, default is 65536
3718 # Since: 1.5
3720 { 'struct': 'ChardevRingbuf', 'data': { '*size'  : 'int' },
3721   'base': 'ChardevCommon' }
3724 # @ChardevBackend:
3726 # Configuration info for the new chardev backend.
3728 # Since: 1.4 (testdev since 2.2)
3730 { 'union': 'ChardevBackend', 'data': { 'file'   : 'ChardevFile',
3731                                        'serial' : 'ChardevHostdev',
3732                                        'parallel': 'ChardevHostdev',
3733                                        'pipe'   : 'ChardevHostdev',
3734                                        'socket' : 'ChardevSocket',
3735                                        'udp'    : 'ChardevUdp',
3736                                        'pty'    : 'ChardevCommon',
3737                                        'null'   : 'ChardevCommon',
3738                                        'mux'    : 'ChardevMux',
3739                                        'msmouse': 'ChardevCommon',
3740                                        'braille': 'ChardevCommon',
3741                                        'testdev': 'ChardevCommon',
3742                                        'stdio'  : 'ChardevStdio',
3743                                        'console': 'ChardevCommon',
3744                                        'spicevmc' : 'ChardevSpiceChannel',
3745                                        'spiceport' : 'ChardevSpicePort',
3746                                        'vc'     : 'ChardevVC',
3747                                        'ringbuf': 'ChardevRingbuf',
3748                                        # next one is just for compatibility
3749                                        'memory' : 'ChardevRingbuf' } }
3752 # @ChardevReturn:
3754 # Return info about the chardev backend just created.
3756 # @pty: #optional name of the slave pseudoterminal device, present if
3757 #       and only if a chardev of type 'pty' was created
3759 # Since: 1.4
3761 { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3764 # @chardev-add:
3766 # Add a character device backend
3768 # @id: the chardev's ID, must be unique
3769 # @backend: backend type and parameters
3771 # Returns: ChardevReturn.
3773 # Since: 1.4
3775 { 'command': 'chardev-add', 'data': {'id'      : 'str',
3776                                      'backend' : 'ChardevBackend' },
3777   'returns': 'ChardevReturn' }
3780 # @chardev-remove:
3782 # Remove a character device backend
3784 # @id: the chardev's ID, must exist and not be in use
3786 # Returns: Nothing on success
3788 # Since: 1.4
3790 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3793 # @TpmModel:
3795 # An enumeration of TPM models
3797 # @tpm-tis: TPM TIS model
3799 # Since: 1.5
3801 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3804 # @query-tpm-models:
3806 # Return a list of supported TPM models
3808 # Returns: a list of TpmModel
3810 # Since: 1.5
3812 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3815 # @TpmType:
3817 # An enumeration of TPM types
3819 # @passthrough: TPM passthrough type
3821 # Since: 1.5
3823 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3826 # @query-tpm-types:
3828 # Return a list of supported TPM types
3830 # Returns: a list of TpmType
3832 # Since: 1.5
3834 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3837 # @TPMPassthroughOptions:
3839 # Information about the TPM passthrough type
3841 # @path: #optional string describing the path used for accessing the TPM device
3843 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3844 #               for cancellation of TPM commands while they are executing
3846 # Since: 1.5
3848 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3849                                              '*cancel-path' : 'str'} }
3852 # @TpmTypeOptions:
3854 # A union referencing different TPM backend types' configuration options
3856 # @passthrough: The configuration options for the TPM passthrough type
3858 # Since: 1.5
3860 { 'union': 'TpmTypeOptions',
3861    'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3864 # @TpmInfo:
3866 # Information about the TPM
3868 # @id: The Id of the TPM
3870 # @model: The TPM frontend model
3872 # @options: The TPM (backend) type configuration options
3874 # Since: 1.5
3876 { 'struct': 'TPMInfo',
3877   'data': {'id': 'str',
3878            'model': 'TpmModel',
3879            'options': 'TpmTypeOptions' } }
3882 # @query-tpm:
3884 # Return information about the TPM device
3886 # Returns: @TPMInfo on success
3888 # Since: 1.5
3890 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
3893 # @AcpiTableOptions
3895 # Specify an ACPI table on the command line to load.
3897 # At most one of @file and @data can be specified. The list of files specified
3898 # by any one of them is loaded and concatenated in order. If both are omitted,
3899 # @data is implied.
3901 # Other fields / optargs can be used to override fields of the generic ACPI
3902 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
3903 # Description Table Header. If a header field is not overridden, then the
3904 # corresponding value from the concatenated blob is used (in case of @file), or
3905 # it is filled in with a hard-coded value (in case of @data).
3907 # String fields are copied into the matching ACPI member from lowest address
3908 # upwards, and silently truncated / NUL-padded to length.
3910 # @sig: #optional table signature / identifier (4 bytes)
3912 # @rev: #optional table revision number (dependent on signature, 1 byte)
3914 # @oem_id: #optional OEM identifier (6 bytes)
3916 # @oem_table_id: #optional OEM table identifier (8 bytes)
3918 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
3920 # @asl_compiler_id: #optional identifier of the utility that created the table
3921 #                   (4 bytes)
3923 # @asl_compiler_rev: #optional revision number of the utility that created the
3924 #                    table (4 bytes)
3926 # @file: #optional colon (:) separated list of pathnames to load and
3927 #        concatenate as table data. The resultant binary blob is expected to
3928 #        have an ACPI table header. At least one file is required. This field
3929 #        excludes @data.
3931 # @data: #optional colon (:) separated list of pathnames to load and
3932 #        concatenate as table data. The resultant binary blob must not have an
3933 #        ACPI table header. At least one file is required. This field excludes
3934 #        @file.
3936 # Since 1.5
3938 { 'struct': 'AcpiTableOptions',
3939   'data': {
3940     '*sig':               'str',
3941     '*rev':               'uint8',
3942     '*oem_id':            'str',
3943     '*oem_table_id':      'str',
3944     '*oem_rev':           'uint32',
3945     '*asl_compiler_id':   'str',
3946     '*asl_compiler_rev':  'uint32',
3947     '*file':              'str',
3948     '*data':              'str' }}
3951 # @CommandLineParameterType:
3953 # Possible types for an option parameter.
3955 # @string: accepts a character string
3957 # @boolean: accepts "on" or "off"
3959 # @number: accepts a number
3961 # @size: accepts a number followed by an optional suffix (K)ilo,
3962 #        (M)ega, (G)iga, (T)era
3964 # Since 1.5
3966 { 'enum': 'CommandLineParameterType',
3967   'data': ['string', 'boolean', 'number', 'size'] }
3970 # @CommandLineParameterInfo:
3972 # Details about a single parameter of a command line option.
3974 # @name: parameter name
3976 # @type: parameter @CommandLineParameterType
3978 # @help: #optional human readable text string, not suitable for parsing.
3980 # @default: #optional default value string (since 2.1)
3982 # Since 1.5
3984 { 'struct': 'CommandLineParameterInfo',
3985   'data': { 'name': 'str',
3986             'type': 'CommandLineParameterType',
3987             '*help': 'str',
3988             '*default': 'str' } }
3991 # @CommandLineOptionInfo:
3993 # Details about a command line option, including its list of parameter details
3995 # @option: option name
3997 # @parameters: an array of @CommandLineParameterInfo
3999 # Since 1.5
4001 { 'struct': 'CommandLineOptionInfo',
4002   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
4005 # @query-command-line-options:
4007 # Query command line option schema.
4009 # @option: #optional option name
4011 # Returns: list of @CommandLineOptionInfo for all options (or for the given
4012 #          @option).  Returns an error if the given @option doesn't exist.
4014 # Since 1.5
4016 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
4017  'returns': ['CommandLineOptionInfo'] }
4020 # @X86CPURegister32
4022 # A X86 32-bit register
4024 # Since: 1.5
4026 { 'enum': 'X86CPURegister32',
4027   'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4030 # @X86CPUFeatureWordInfo
4032 # Information about a X86 CPU feature word
4034 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4036 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
4037 #                   feature word
4039 # @cpuid-register: Output register containing the feature bits
4041 # @features: value of output register, containing the feature bits
4043 # Since: 1.5
4045 { 'struct': 'X86CPUFeatureWordInfo',
4046   'data': { 'cpuid-input-eax': 'int',
4047             '*cpuid-input-ecx': 'int',
4048             'cpuid-register': 'X86CPURegister32',
4049             'features': 'int' } }
4052 # @DummyForceArrays
4054 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
4056 # Since 2.5
4058 { 'struct': 'DummyForceArrays',
4059   'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
4063 # @RxState:
4065 # Packets receiving state
4067 # @normal: filter assigned packets according to the mac-table
4069 # @none: don't receive any assigned packet
4071 # @all: receive all assigned packets
4073 # Since: 1.6
4075 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
4078 # @RxFilterInfo:
4080 # Rx-filter information for a NIC.
4082 # @name: net client name
4084 # @promiscuous: whether promiscuous mode is enabled
4086 # @multicast: multicast receive state
4088 # @unicast: unicast receive state
4090 # @vlan: vlan receive state (Since 2.0)
4092 # @broadcast-allowed: whether to receive broadcast
4094 # @multicast-overflow: multicast table is overflowed or not
4096 # @unicast-overflow: unicast table is overflowed or not
4098 # @main-mac: the main macaddr string
4100 # @vlan-table: a list of active vlan id
4102 # @unicast-table: a list of unicast macaddr string
4104 # @multicast-table: a list of multicast macaddr string
4106 # Since 1.6
4108 { 'struct': 'RxFilterInfo',
4109   'data': {
4110     'name':               'str',
4111     'promiscuous':        'bool',
4112     'multicast':          'RxState',
4113     'unicast':            'RxState',
4114     'vlan':               'RxState',
4115     'broadcast-allowed':  'bool',
4116     'multicast-overflow': 'bool',
4117     'unicast-overflow':   'bool',
4118     'main-mac':           'str',
4119     'vlan-table':         ['int'],
4120     'unicast-table':      ['str'],
4121     'multicast-table':    ['str'] }}
4124 # @query-rx-filter:
4126 # Return rx-filter information for all NICs (or for the given NIC).
4128 # @name: #optional net client name
4130 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4131 #          Returns an error if the given @name doesn't exist, or given
4132 #          NIC doesn't support rx-filter querying, or given net client
4133 #          isn't a NIC.
4135 # Since: 1.6
4137 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4138   'returns': ['RxFilterInfo'] }
4141 # @InputButton
4143 # Button of a pointer input device (mouse, tablet).
4145 # Since: 2.0
4147 { 'enum'  : 'InputButton',
4148   'data'  : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down' ] }
4151 # @InputAxis
4153 # Position axis of a pointer input device (mouse, tablet).
4155 # Since: 2.0
4157 { 'enum'  : 'InputAxis',
4158   'data'  : [ 'x', 'y' ] }
4161 # @InputKeyEvent
4163 # Keyboard input event.
4165 # @key:    Which key this event is for.
4166 # @down:   True for key-down and false for key-up events.
4168 # Since: 2.0
4170 { 'struct'  : 'InputKeyEvent',
4171   'data'  : { 'key'     : 'KeyValue',
4172               'down'    : 'bool' } }
4175 # @InputBtnEvent
4177 # Pointer button input event.
4179 # @button: Which button this event is for.
4180 # @down:   True for key-down and false for key-up events.
4182 # Since: 2.0
4184 { 'struct'  : 'InputBtnEvent',
4185   'data'  : { 'button'  : 'InputButton',
4186               'down'    : 'bool' } }
4189 # @InputMoveEvent
4191 # Pointer motion input event.
4193 # @axis:   Which axis is referenced by @value.
4194 # @value:  Pointer position.  For absolute coordinates the
4195 #          valid range is 0 -> 0x7ffff
4197 # Since: 2.0
4199 { 'struct'  : 'InputMoveEvent',
4200   'data'  : { 'axis'    : 'InputAxis',
4201               'value'   : 'int' } }
4204 # @InputEvent
4206 # Input event union.
4208 # @key: Input event of Keyboard
4209 # @btn: Input event of pointer buttons
4210 # @rel: Input event of relative pointer motion
4211 # @abs: Input event of absolute pointer motion
4213 # Since: 2.0
4215 { 'union' : 'InputEvent',
4216   'data'  : { 'key'     : 'InputKeyEvent',
4217               'btn'     : 'InputBtnEvent',
4218               'rel'     : 'InputMoveEvent',
4219               'abs'     : 'InputMoveEvent' } }
4222 # @input-send-event
4224 # Send input event(s) to guest.
4226 # @device: #optional display device to send event(s) to.
4227 # @head: #optional head to send event(s) to, in case the
4228 #        display device supports multiple scanouts.
4229 # @events: List of InputEvent union.
4231 # Returns: Nothing on success.
4233 # The @display and @head parameters can be used to send the input
4234 # event to specific input devices in case (a) multiple input devices
4235 # of the same kind are added to the virtual machine and (b) you have
4236 # configured input routing (see docs/multiseat.txt) for those input
4237 # devices.  The parameters work exactly like the device and head
4238 # properties of input devices.  If @device is missing, only devices
4239 # that have no input routing config are admissible.  If @device is
4240 # specified, both input devices with and without input routing config
4241 # are admissible, but devices with input routing config take
4242 # precedence.
4244 # Since: 2.6
4246 { 'command': 'input-send-event',
4247   'data': { '*device': 'str',
4248             '*head'  : 'int',
4249             'events' : [ 'InputEvent' ] } }
4252 # @NumaOptions
4254 # A discriminated record of NUMA options. (for OptsVisitor)
4256 # Since 2.1
4258 { 'union': 'NumaOptions',
4259   'data': {
4260     'node': 'NumaNodeOptions' }}
4263 # @NumaNodeOptions
4265 # Create a guest NUMA node. (for OptsVisitor)
4267 # @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
4269 # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
4270 #         if omitted)
4272 # @mem: #optional memory size of this node; mutually exclusive with @memdev.
4273 #       Equally divide total memory among nodes if both @mem and @memdev are
4274 #       omitted.
4276 # @memdev: #optional memory backend object.  If specified for one node,
4277 #          it must be specified for all nodes.
4279 # Since: 2.1
4281 { 'struct': 'NumaNodeOptions',
4282   'data': {
4283    '*nodeid': 'uint16',
4284    '*cpus':   ['uint16'],
4285    '*mem':    'size',
4286    '*memdev': 'str' }}
4289 # @HostMemPolicy
4291 # Host memory policy types
4293 # @default: restore default policy, remove any nondefault policy
4295 # @preferred: set the preferred host nodes for allocation
4297 # @bind: a strict policy that restricts memory allocation to the
4298 #        host nodes specified
4300 # @interleave: memory allocations are interleaved across the set
4301 #              of host nodes specified
4303 # Since 2.1
4305 { 'enum': 'HostMemPolicy',
4306   'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
4309 # @Memdev:
4311 # Information about memory backend
4313 # @size: memory backend size
4315 # @merge: enables or disables memory merge support
4317 # @dump: includes memory backend's memory in a core dump or not
4319 # @prealloc: enables or disables memory preallocation
4321 # @host-nodes: host nodes for its memory policy
4323 # @policy: memory policy of memory backend
4325 # Since: 2.1
4327 { 'struct': 'Memdev',
4328   'data': {
4329     'size':       'size',
4330     'merge':      'bool',
4331     'dump':       'bool',
4332     'prealloc':   'bool',
4333     'host-nodes': ['uint16'],
4334     'policy':     'HostMemPolicy' }}
4337 # @query-memdev:
4339 # Returns information for all memory backends.
4341 # Returns: a list of @Memdev.
4343 # Since: 2.1
4345 { 'command': 'query-memdev', 'returns': ['Memdev'] }
4348 # @PCDIMMDeviceInfo:
4350 # PCDIMMDevice state information
4352 # @id: #optional device's ID
4354 # @addr: physical address, where device is mapped
4356 # @size: size of memory that the device provides
4358 # @slot: slot number at which device is plugged in
4360 # @node: NUMA node number where device is plugged in
4362 # @memdev: memory backend linked with device
4364 # @hotplugged: true if device was hotplugged
4366 # @hotpluggable: true if device if could be added/removed while machine is running
4368 # Since: 2.1
4370 { 'struct': 'PCDIMMDeviceInfo',
4371   'data': { '*id': 'str',
4372             'addr': 'int',
4373             'size': 'int',
4374             'slot': 'int',
4375             'node': 'int',
4376             'memdev': 'str',
4377             'hotplugged': 'bool',
4378             'hotpluggable': 'bool'
4379           }
4383 # @MemoryDeviceInfo:
4385 # Union containing information about a memory device
4387 # Since: 2.1
4389 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
4392 # @query-memory-devices
4394 # Lists available memory devices and their state
4396 # Since: 2.1
4398 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
4400 ## @ACPISlotType
4402 # @DIMM: memory slot
4403 # @CPU: logical CPU slot (since 2.7)
4405 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
4407 ## @ACPIOSTInfo
4409 # OSPM Status Indication for a device
4410 # For description of possible values of @source and @status fields
4411 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
4413 # @device: #optional device ID associated with slot
4415 # @slot: slot ID, unique per slot of a given @slot-type
4417 # @slot-type: type of the slot
4419 # @source: an integer containing the source event
4421 # @status: an integer containing the status code
4423 # Since: 2.1
4425 { 'struct': 'ACPIOSTInfo',
4426   'data'  : { '*device': 'str',
4427               'slot': 'str',
4428               'slot-type': 'ACPISlotType',
4429               'source': 'int',
4430               'status': 'int' } }
4433 # @query-acpi-ospm-status
4435 # Lists ACPI OSPM status of ACPI device objects,
4436 # which might be reported via _OST method
4438 # Since: 2.1
4440 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
4443 # @WatchdogExpirationAction
4445 # An enumeration of the actions taken when the watchdog device's timer is
4446 # expired
4448 # @reset: system resets
4450 # @shutdown: system shutdown, note that it is similar to @powerdown, which
4451 #            tries to set to system status and notify guest
4453 # @poweroff: system poweroff, the emulator program exits
4455 # @pause: system pauses, similar to @stop
4457 # @debug: system enters debug state
4459 # @none: nothing is done
4461 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
4462 #              VCPUS on x86) (since 2.4)
4464 # Since: 2.1
4466 { 'enum': 'WatchdogExpirationAction',
4467   'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
4468             'inject-nmi' ] }
4471 # @IoOperationType
4473 # An enumeration of the I/O operation types
4475 # @read: read operation
4477 # @write: write operation
4479 # Since: 2.1
4481 { 'enum': 'IoOperationType',
4482   'data': [ 'read', 'write' ] }
4485 # @GuestPanicAction
4487 # An enumeration of the actions taken when guest OS panic is detected
4489 # @pause: system pauses
4491 # Since: 2.1
4493 { 'enum': 'GuestPanicAction',
4494   'data': [ 'pause' ] }
4497 # @rtc-reset-reinjection
4499 # This command will reset the RTC interrupt reinjection backlog.
4500 # Can be used if another mechanism to synchronize guest time
4501 # is in effect, for example QEMU guest agent's guest-set-time
4502 # command.
4504 # Since: 2.1
4506 { 'command': 'rtc-reset-reinjection' }
4508 # Rocker ethernet network switch
4509 { 'include': 'qapi/rocker.json' }
4512 # ReplayMode:
4514 # Mode of the replay subsystem.
4516 # @none: normal execution mode. Replay or record are not enabled.
4518 # @record: record mode. All non-deterministic data is written into the
4519 #          replay log.
4521 # @play: replay mode. Non-deterministic data required for system execution
4522 #        is read from the log.
4524 # Since: 2.5
4526 { 'enum': 'ReplayMode',
4527   'data': [ 'none', 'record', 'play' ] }
4530 # @xen-load-devices-state:
4532 # Load the state of all devices from file. The RAM and the block devices
4533 # of the VM are not loaded by this command.
4535 # @filename: the file to load the state of the devices from as binary
4536 # data. See xen-save-devices-state.txt for a description of the binary
4537 # format.
4539 # Since: 2.7
4541 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
4544 # @GICCapability:
4546 # The struct describes capability for a specific GIC (Generic
4547 # Interrupt Controller) version. These bits are not only decided by
4548 # QEMU/KVM software version, but also decided by the hardware that
4549 # the program is running upon.
4551 # @version:  version of GIC to be described. Currently, only 2 and 3
4552 #            are supported.
4554 # @emulated: whether current QEMU/hardware supports emulated GIC
4555 #            device in user space.
4557 # @kernel:   whether current QEMU/hardware supports hardware
4558 #            accelerated GIC device in kernel.
4560 # Since: 2.6
4562 { 'struct': 'GICCapability',
4563   'data': { 'version': 'int',
4564             'emulated': 'bool',
4565             'kernel': 'bool' } }
4568 # @query-gic-capabilities:
4570 # This command is ARM-only. It will return a list of GICCapability
4571 # objects that describe its capability bits.
4573 # Returns: a list of GICCapability objects.
4575 # Since: 2.6
4577 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
4580 # CpuInstanceProperties
4582 # List of properties to be used for hotplugging a CPU instance,
4583 # it should be passed by management with device_add command when
4584 # a CPU is being hotplugged.
4586 # Note: currently there are 4 properties that could be present
4587 # but management should be prepared to pass through other
4588 # properties with device_add command to allow for future
4589 # interface extension. This also requires the filed names to be kept in
4590 # sync with the properties passed to -device/device_add.
4592 # @node-id: #optional NUMA node ID the CPU belongs to
4593 # @socket-id: #optional socket number within node/board the CPU belongs to
4594 # @core-id: #optional core number within socket the CPU belongs to
4595 # @thread-id: #optional thread number within core the CPU belongs to
4597 # Since: 2.7
4599 { 'struct': 'CpuInstanceProperties',
4600   'data': { '*node-id': 'int',
4601             '*socket-id': 'int',
4602             '*core-id': 'int',
4603             '*thread-id': 'int'
4604   }
4608 # @HotpluggableCPU
4610 # @type: CPU object type for usage with device_add command
4611 # @props: list of properties to be used for hotplugging CPU
4612 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
4613 # @qom-path: #optional link to existing CPU object if CPU is present or
4614 #            omitted if CPU is not present.
4616 # Since: 2.7
4618 { 'struct': 'HotpluggableCPU',
4619   'data': { 'type': 'str',
4620             'vcpus-count': 'int',
4621             'props': 'CpuInstanceProperties',
4622             '*qom-path': 'str'
4623           }
4627 # @query-hotpluggable-cpus
4629 # Returns: a list of HotpluggableCPU objects.
4631 # Since: 2.7
4633 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }