Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-signed' into staging
[qemu/ar7.git] / qapi-schema.json
blob8a7b5270910277d907072fdce04e3de56971c66b
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 # @colo: guest is paused to save/restore VM state under colo checkpoint (since
180 # 2.8)
182 { 'enum': 'RunState',
183   'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
184             'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
185             'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
186             'guest-panicked', 'colo' ] }
189 # @StatusInfo:
191 # Information about VCPU run state
193 # @running: true if all VCPUs are runnable, false if not runnable
195 # @singlestep: true if VCPUs are in single-step mode
197 # @status: the virtual machine @RunState
199 # Since:  0.14.0
201 # Notes: @singlestep is enabled through the GDB stub
203 { 'struct': 'StatusInfo',
204   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
207 # @query-status:
209 # Query the run status of all VCPUs
211 # Returns: @StatusInfo reflecting all VCPUs
213 # Since:  0.14.0
215 { 'command': 'query-status', 'returns': 'StatusInfo' }
218 # @UuidInfo:
220 # Guest UUID information.
222 # @UUID: the UUID of the guest
224 # Since: 0.14.0
226 # Notes: If no UUID was specified for the guest, a null UUID is returned.
228 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
231 # @query-uuid:
233 # Query the guest UUID information.
235 # Returns: The @UuidInfo for the guest
237 # Since 0.14.0
239 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
242 # @ChardevInfo:
244 # Information about a character device.
246 # @label: the label of the character device
248 # @filename: the filename of the character device
250 # @frontend-open: shows whether the frontend device attached to this backend
251 #                 (eg. with the chardev=... option) is in open or closed state
252 #                 (since 2.1)
254 # Notes: @filename is encoded using the QEMU command line character device
255 #        encoding.  See the QEMU man page for details.
257 # Since: 0.14.0
259 { 'struct': 'ChardevInfo', 'data': {'label': 'str',
260                                   'filename': 'str',
261                                   'frontend-open': 'bool'} }
264 # @query-chardev:
266 # Returns information about current character devices.
268 # Returns: a list of @ChardevInfo
270 # Since: 0.14.0
272 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
275 # @ChardevBackendInfo:
277 # Information about a character device backend
279 # @name: The backend name
281 # Since: 2.0
283 { 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} }
286 # @query-chardev-backends:
288 # Returns information about character device backends.
290 # Returns: a list of @ChardevBackendInfo
292 # Since: 2.0
294 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
297 # @DataFormat:
299 # An enumeration of data format.
301 # @utf8: Data is a UTF-8 string (RFC 3629)
303 # @base64: Data is Base64 encoded binary (RFC 3548)
305 # Since: 1.4
307 { 'enum': 'DataFormat',
308   'data': [ 'utf8', 'base64' ] }
311 # @ringbuf-write:
313 # Write to a ring buffer character device.
315 # @device: the ring buffer character device name
317 # @data: data to write
319 # @format: #optional data encoding (default 'utf8').
320 #          - base64: data must be base64 encoded text.  Its binary
321 #            decoding gets written.
322 #          - utf8: data's UTF-8 encoding is written
323 #          - data itself is always Unicode regardless of format, like
324 #            any other string.
326 # Returns: Nothing on success
328 # Since: 1.4
330 { 'command': 'ringbuf-write',
331   'data': {'device': 'str', 'data': 'str',
332            '*format': 'DataFormat'} }
335 # @ringbuf-read:
337 # Read from a ring buffer character device.
339 # @device: the ring buffer character device name
341 # @size: how many bytes to read at most
343 # @format: #optional data encoding (default 'utf8').
344 #          - base64: the data read is returned in base64 encoding.
345 #          - utf8: the data read is interpreted as UTF-8.
346 #            Bug: can screw up when the buffer contains invalid UTF-8
347 #            sequences, NUL characters, after the ring buffer lost
348 #            data, and when reading stops because the size limit is
349 #            reached.
350 #          - The return value is always Unicode regardless of format,
351 #            like any other string.
353 # Returns: data read from the device
355 # Since: 1.4
357 { 'command': 'ringbuf-read',
358   'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
359   'returns': 'str' }
362 # @EventInfo:
364 # Information about a QMP event
366 # @name: The event name
368 # Since: 1.2.0
370 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
373 # @query-events:
375 # Return a list of supported QMP events by this server
377 # Returns: A list of @EventInfo for all supported events
379 # Since: 1.2.0
381 { 'command': 'query-events', 'returns': ['EventInfo'] }
384 # @MigrationStats
386 # Detailed migration status.
388 # @transferred: amount of bytes already transferred to the target VM
390 # @remaining: amount of bytes remaining to be transferred to the target VM
392 # @total: total amount of bytes involved in the migration process
394 # @duplicate: number of duplicate (zero) pages (since 1.2)
396 # @skipped: number of skipped zero pages (since 1.5)
398 # @normal : number of normal pages (since 1.2)
400 # @normal-bytes: number of normal bytes sent (since 1.2)
402 # @dirty-pages-rate: number of pages dirtied by second by the
403 #        guest (since 1.3)
405 # @mbps: throughput in megabits/sec. (since 1.6)
407 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
409 # @postcopy-requests: The number of page requests received from the destination
410 #        (since 2.7)
412 # Since: 0.14.0
414 { 'struct': 'MigrationStats',
415   'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
416            'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
417            'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
418            'mbps' : 'number', 'dirty-sync-count' : 'int',
419            'postcopy-requests' : 'int' } }
422 # @XBZRLECacheStats
424 # Detailed XBZRLE migration cache statistics
426 # @cache-size: XBZRLE cache size
428 # @bytes: amount of bytes already transferred to the target VM
430 # @pages: amount of pages transferred to the target VM
432 # @cache-miss: number of cache miss
434 # @cache-miss-rate: rate of cache miss (since 2.1)
436 # @overflow: number of overflows
438 # Since: 1.2
440 { 'struct': 'XBZRLECacheStats',
441   'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
442            'cache-miss': 'int', 'cache-miss-rate': 'number',
443            'overflow': 'int' } }
445 # @MigrationStatus:
447 # An enumeration of migration status.
449 # @none: no migration has ever happened.
451 # @setup: migration process has been initiated.
453 # @cancelling: in the process of cancelling migration.
455 # @cancelled: cancelling migration is finished.
457 # @active: in the process of doing migration.
459 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
461 # @completed: migration is finished.
463 # @failed: some error occurred during migration process.
465 # @colo: VM is in the process of fault tolerance. (since 2.8)
467 # Since: 2.3
470 { 'enum': 'MigrationStatus',
471   'data': [ 'none', 'setup', 'cancelling', 'cancelled',
472             'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
475 # @MigrationInfo
477 # Information about current migration process.
479 # @status: #optional @MigrationStatus describing the current migration status.
480 #          If this field is not returned, no migration process
481 #          has been initiated
483 # @ram: #optional @MigrationStats containing detailed migration
484 #       status, only returned if status is 'active' or
485 #       'completed'(since 1.2)
487 # @disk: #optional @MigrationStats containing detailed disk migration
488 #        status, only returned if status is 'active' and it is a block
489 #        migration
491 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
492 #                migration statistics, only returned if XBZRLE feature is on and
493 #                status is 'active' or 'completed' (since 1.2)
495 # @total-time: #optional total amount of milliseconds since migration started.
496 #        If migration has ended, it returns the total migration
497 #        time. (since 1.2)
499 # @downtime: #optional only present when migration finishes correctly
500 #        total downtime in milliseconds for the guest.
501 #        (since 1.3)
503 # @expected-downtime: #optional only present while migration is active
504 #        expected downtime in milliseconds for the guest in last walk
505 #        of the dirty bitmap. (since 1.3)
507 # @setup-time: #optional amount of setup time in milliseconds _before_ the
508 #        iterations begin but _after_ the QMP command is issued. This is designed
509 #        to provide an accounting of any activities (such as RDMA pinning) which
510 #        may be expensive, but do not actually occur during the iterative
511 #        migration rounds themselves. (since 1.6)
513 # @cpu-throttle-percentage: #optional percentage of time guest cpus are being
514 #        throttled during auto-converge. This is only present when auto-converge
515 #        has started throttling guest cpus. (Since 2.7)
517 # @error-desc: #optional the human readable error description string, when
518 #              @status is 'failed'. Clients should not attempt to parse the
519 #              error strings. (Since 2.7)
521 # Since: 0.14.0
523 { 'struct': 'MigrationInfo',
524   'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
525            '*disk': 'MigrationStats',
526            '*xbzrle-cache': 'XBZRLECacheStats',
527            '*total-time': 'int',
528            '*expected-downtime': 'int',
529            '*downtime': 'int',
530            '*setup-time': 'int',
531            '*cpu-throttle-percentage': 'int',
532            '*error-desc': 'str'} }
535 # @query-migrate
537 # Returns information about current migration process.
539 # Returns: @MigrationInfo
541 # Since: 0.14.0
543 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
546 # @MigrationCapability
548 # Migration capabilities enumeration
550 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
551 #          This feature allows us to minimize migration traffic for certain work
552 #          loads, by sending compressed difference of the pages
554 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
555 #          mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
556 #          Disabled by default. (since 2.0)
558 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
559 #          essentially saves 1MB of zeroes per block on the wire. Enabling requires
560 #          source and target VM to support this feature. To enable it is sufficient
561 #          to enable the capability on the source VM. The feature is disabled by
562 #          default. (since 1.6)
564 # @compress: Use multiple compression threads to accelerate live migration.
565 #          This feature can help to reduce the migration traffic, by sending
566 #          compressed pages. Please note that if compress and xbzrle are both
567 #          on, compress only takes effect in the ram bulk stage, after that,
568 #          it will be disabled and only xbzrle takes effect, this can help to
569 #          minimize migration traffic. The feature is disabled by default.
570 #          (since 2.4 )
572 # @events: generate events for each migration state change
573 #          (since 2.4 )
575 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
576 #          to speed up convergence of RAM migration. (since 1.6)
578 # @postcopy-ram: Start executing on the migration target before all of RAM has
579 #          been migrated, pulling the remaining pages along as needed. NOTE: If
580 #          the migration fails during postcopy the VM will fail.  (since 2.6)
582 # @x-colo: If enabled, migration will never end, and the state of the VM on the
583 #        primary side will be migrated continuously to the VM on secondary
584 #        side, this process is called COarse-Grain LOck Stepping (COLO) for
585 #        Non-stop Service. (since 2.8)
587 # Since: 1.2
589 { 'enum': 'MigrationCapability',
590   'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
591            'compress', 'events', 'postcopy-ram', 'x-colo'] }
594 # @MigrationCapabilityStatus
596 # Migration capability information
598 # @capability: capability enum
600 # @state: capability state bool
602 # Since: 1.2
604 { 'struct': 'MigrationCapabilityStatus',
605   'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
608 # @migrate-set-capabilities
610 # Enable/Disable the following migration capabilities (like xbzrle)
612 # @capabilities: json array of capability modifications to make
614 # Since: 1.2
616 { 'command': 'migrate-set-capabilities',
617   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
620 # @query-migrate-capabilities
622 # Returns information about the current migration capabilities status
624 # Returns: @MigrationCapabilitiesStatus
626 # Since: 1.2
628 { 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}
630 # @MigrationParameter
632 # Migration parameters enumeration
634 # @compress-level: Set the compression level to be used in live migration,
635 #          the compression level is an integer between 0 and 9, where 0 means
636 #          no compression, 1 means the best compression speed, and 9 means best
637 #          compression ratio which will consume more CPU.
639 # @compress-threads: Set compression thread count to be used in live migration,
640 #          the compression thread count is an integer between 1 and 255.
642 # @decompress-threads: Set decompression thread count to be used in live
643 #          migration, the decompression thread count is an integer between 1
644 #          and 255. Usually, decompression is at least 4 times as fast as
645 #          compression, so set the decompress-threads to the number about 1/4
646 #          of compress-threads is adequate.
648 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
649 #                        when migration auto-converge is activated. The
650 #                        default value is 20. (Since 2.7)
652 # @cpu-throttle-increment: throttle percentage increase each time
653 #                          auto-converge detects that migration is not making
654 #                          progress. The default value is 10. (Since 2.7)
656 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
657 #             establishing a TLS connection over the migration data channel.
658 #             On the outgoing side of the migration, the credentials must
659 #             be for a 'client' endpoint, while for the incoming side the
660 #             credentials must be for a 'server' endpoint. Setting this
661 #             will enable TLS for all migrations. The default is unset,
662 #             resulting in unsecured migration at the QEMU level. (Since 2.7)
664 # @tls-hostname: hostname of the target host for the migration. This is
665 #                required when using x509 based TLS credentials and the
666 #                migration URI does not already include a hostname. For
667 #                example if using fd: or exec: based migration, the
668 #                hostname must be provided so that the server's x509
669 #                certificate identity can be validated. (Since 2.7)
671 # @max-bandwidth: to set maximum speed for migration. maximum speed in
672 #                 bytes per second. (Since 2.8)
674 # @downtime-limit: set maximum tolerated downtime for migration. maximum
675 #                  downtime in milliseconds (Since 2.8)
677 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
678 #          periodic mode. (Since 2.8)
680 # Since: 2.4
682 { 'enum': 'MigrationParameter',
683   'data': ['compress-level', 'compress-threads', 'decompress-threads',
684            'cpu-throttle-initial', 'cpu-throttle-increment',
685            'tls-creds', 'tls-hostname', 'max-bandwidth',
686            'downtime-limit', 'x-checkpoint-delay' ] }
689 # @migrate-set-parameters
691 # Set various migration parameters.  See MigrationParameters for details.
693 # @x-checkpoint-delay: the delay time between two checkpoints. (Since 2.8)
695 # Since: 2.4
697 { 'command': 'migrate-set-parameters', 'boxed': true,
698   'data': 'MigrationParameters' }
701 # @MigrationParameters
703 # Optional members can be omitted on input ('migrate-set-parameters')
704 # but most members will always be present on output
705 # ('query-migrate-parameters'), with the exception of tls-creds and
706 # tls-hostname.
708 # @compress-level: #optional compression level
710 # @compress-threads: #optional compression thread count
712 # @decompress-threads: #optional decompression thread count
714 # @cpu-throttle-initial: #optional Initial percentage of time guest cpus are
715 #                        throttledwhen migration auto-converge is activated.
716 #                        The default value is 20. (Since 2.7)
718 # @cpu-throttle-increment: #optional throttle percentage increase each time
719 #                          auto-converge detects that migration is not making
720 #                          progress. The default value is 10. (Since 2.7)
722 # @tls-creds: #optional ID of the 'tls-creds' object that provides credentials
723 #             for establishing a TLS connection over the migration data
724 #             channel. On the outgoing side of the migration, the credentials
725 #             must be for a 'client' endpoint, while for the incoming side the
726 #             credentials must be for a 'server' endpoint. Setting this
727 #             will enable TLS for all migrations. The default is unset,
728 #             resulting in unsecured migration at the QEMU level. (Since 2.7)
730 # @tls-hostname: #optional hostname of the target host for the migration. This
731 #                is required when using x509 based TLS credentials and the
732 #                migration URI does not already include a hostname. For
733 #                example if using fd: or exec: based migration, the
734 #                hostname must be provided so that the server's x509
735 #                certificate identity can be validated. (Since 2.7)
737 # @max-bandwidth: to set maximum speed for migration. maximum speed in
738 #                 bytes per second. (Since 2.8)
740 # @downtime-limit: set maximum tolerated downtime for migration. maximum
741 #                  downtime in milliseconds (Since 2.8)
743 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
745 # Since: 2.4
747 { 'struct': 'MigrationParameters',
748   'data': { '*compress-level': 'int',
749             '*compress-threads': 'int',
750             '*decompress-threads': 'int',
751             '*cpu-throttle-initial': 'int',
752             '*cpu-throttle-increment': 'int',
753             '*tls-creds': 'str',
754             '*tls-hostname': 'str',
755             '*max-bandwidth': 'int',
756             '*downtime-limit': 'int',
757             '*x-checkpoint-delay': 'int'} }
760 # @query-migrate-parameters
762 # Returns information about the current migration parameters
764 # Returns: @MigrationParameters
766 # Since: 2.4
768 { 'command': 'query-migrate-parameters',
769   'returns': 'MigrationParameters' }
772 # @client_migrate_info
774 # Set migration information for remote display.  This makes the server
775 # ask the client to automatically reconnect using the new parameters
776 # once migration finished successfully.  Only implemented for SPICE.
778 # @protocol:     must be "spice"
779 # @hostname:     migration target hostname
780 # @port:         #optional spice tcp port for plaintext channels
781 # @tls-port:     #optional spice tcp port for tls-secured channels
782 # @cert-subject: #optional server certificate subject
784 # Since: 0.14.0
786 { 'command': 'client_migrate_info',
787   'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
788             '*tls-port': 'int', '*cert-subject': 'str' } }
791 # @migrate-start-postcopy
793 # Followup to a migration command to switch the migration to postcopy mode.
794 # The postcopy-ram capability must be set before the original migration
795 # command.
797 # Since: 2.5
798 { 'command': 'migrate-start-postcopy' }
801 # @COLOMessage
803 # The message transmission between Primary side and Secondary side.
805 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
807 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
809 # @checkpoint-reply: SVM gets PVM's checkpoint request
811 # @vmstate-send: VM's state will be sent by PVM.
813 # @vmstate-size: The total size of VMstate.
815 # @vmstate-received: VM's state has been received by SVM.
817 # @vmstate-loaded: VM's state has been loaded by SVM.
819 # Since: 2.8
821 { 'enum': 'COLOMessage',
822   'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
823             'vmstate-send', 'vmstate-size', 'vmstate-received',
824             'vmstate-loaded' ] }
827 # @COLOMode
829 # The colo mode
831 # @unknown: unknown mode
833 # @primary: master side
835 # @secondary: slave side
837 # Since: 2.8
839 { 'enum': 'COLOMode',
840   'data': [ 'unknown', 'primary', 'secondary'] }
843 # @FailoverStatus
845 # An enumeration of COLO failover status
847 # @none: no failover has ever happened
849 # @require: got failover requirement but not handled
851 # @active: in the process of doing failover
853 # @completed: finish the process of failover
855 # Since: 2.8
857 { 'enum': 'FailoverStatus',
858   'data': [ 'none', 'require', 'active', 'completed'] }
861 # @x-colo-lost-heartbeat
863 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
864 # If this command is sent to the PVM, the Primary side will exit COLO mode.
865 # If sent to the Secondary, the Secondary side will run failover work,
866 # then takes over server operation to become the service VM.
868 # Since: 2.8
870 { 'command': 'x-colo-lost-heartbeat' }
873 # @MouseInfo:
875 # Information about a mouse device.
877 # @name: the name of the mouse device
879 # @index: the index of the mouse device
881 # @current: true if this device is currently receiving mouse events
883 # @absolute: true if this device supports absolute coordinates as input
885 # Since: 0.14.0
887 { 'struct': 'MouseInfo',
888   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
889            'absolute': 'bool'} }
892 # @query-mice:
894 # Returns information about each active mouse device
896 # Returns: a list of @MouseInfo for each device
898 # Since: 0.14.0
900 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
903 # @CpuInfoArch:
905 # An enumeration of cpu types that enable additional information during
906 # @query-cpus.
908 # Since: 2.6
910 { 'enum': 'CpuInfoArch',
911   'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
914 # @CpuInfo:
916 # Information about a virtual CPU
918 # @CPU: the index of the virtual CPU
920 # @current: this only exists for backwards compatibility and should be ignored
922 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
923 #          to a processor specific low power mode.
925 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
927 # @thread_id: ID of the underlying host thread
929 # @arch: architecture of the cpu, which determines which additional fields
930 #        will be listed (since 2.6)
932 # Since: 0.14.0
934 # Notes: @halted is a transient state that changes frequently.  By the time the
935 #        data is sent to the client, the guest may no longer be halted.
937 { 'union': 'CpuInfo',
938   'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
939            'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' },
940   'discriminator': 'arch',
941   'data': { 'x86': 'CpuInfoX86',
942             'sparc': 'CpuInfoSPARC',
943             'ppc': 'CpuInfoPPC',
944             'mips': 'CpuInfoMIPS',
945             'tricore': 'CpuInfoTricore',
946             'other': 'CpuInfoOther' } }
949 # @CpuInfoX86:
951 # Additional information about a virtual i386 or x86_64 CPU
953 # @pc: the 64-bit instruction pointer
955 # Since 2.6
957 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
960 # @CpuInfoSPARC:
962 # Additional information about a virtual SPARC CPU
964 # @pc: the PC component of the instruction pointer
966 # @npc: the NPC component of the instruction pointer
968 # Since 2.6
970 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
973 # @CpuInfoPPC:
975 # Additional information about a virtual PPC CPU
977 # @nip: the instruction pointer
979 # Since 2.6
981 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
984 # @CpuInfoMIPS:
986 # Additional information about a virtual MIPS CPU
988 # @PC: the instruction pointer
990 # Since 2.6
992 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
995 # @CpuInfoTricore:
997 # Additional information about a virtual Tricore CPU
999 # @PC: the instruction pointer
1001 # Since 2.6
1003 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
1006 # @CpuInfoOther:
1008 # No additional information is available about the virtual CPU
1010 # Since 2.6
1013 { 'struct': 'CpuInfoOther', 'data': { } }
1016 # @query-cpus:
1018 # Returns a list of information about each virtual CPU.
1020 # Returns: a list of @CpuInfo for each virtual CPU
1022 # Since: 0.14.0
1024 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
1027 # @IOThreadInfo:
1029 # Information about an iothread
1031 # @id: the identifier of the iothread
1033 # @thread-id: ID of the underlying host thread
1035 # Since: 2.0
1037 { 'struct': 'IOThreadInfo',
1038   'data': {'id': 'str', 'thread-id': 'int'} }
1041 # @query-iothreads:
1043 # Returns a list of information about each iothread.
1045 # Note this list excludes the QEMU main loop thread, which is not declared
1046 # using the -object iothread command-line option.  It is always the main thread
1047 # of the process.
1049 # Returns: a list of @IOThreadInfo for each iothread
1051 # Since: 2.0
1053 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
1056 # @NetworkAddressFamily
1058 # The network address family
1060 # @ipv4: IPV4 family
1062 # @ipv6: IPV6 family
1064 # @unix: unix socket
1066 # @unknown: otherwise
1068 # Since: 2.1
1070 { 'enum': 'NetworkAddressFamily',
1071   'data': [ 'ipv4', 'ipv6', 'unix', 'unknown' ] }
1074 # @VncBasicInfo
1076 # The basic information for vnc network connection
1078 # @host: IP address
1080 # @service: The service name of the vnc port. This may depend on the host
1081 #           system's service database so symbolic names should not be relied
1082 #           on.
1084 # @family: address family
1086 # @websocket: true in case the socket is a websocket (since 2.3).
1088 # Since: 2.1
1090 { 'struct': 'VncBasicInfo',
1091   'data': { 'host': 'str',
1092             'service': 'str',
1093             'family': 'NetworkAddressFamily',
1094             'websocket': 'bool' } }
1097 # @VncServerInfo
1099 # The network connection information for server
1101 # @auth: #optional, authentication method
1103 # Since: 2.1
1105 { 'struct': 'VncServerInfo',
1106   'base': 'VncBasicInfo',
1107   'data': { '*auth': 'str' } }
1110 # @VncClientInfo:
1112 # Information about a connected VNC client.
1114 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
1115 #              Name of the client.
1117 # @sasl_username: #optional If SASL authentication is in use, the SASL username
1118 #                 used for authentication.
1120 # Since: 0.14.0
1122 { 'struct': 'VncClientInfo',
1123   'base': 'VncBasicInfo',
1124   'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1127 # @VncInfo:
1129 # Information about the VNC session.
1131 # @enabled: true if the VNC server is enabled, false otherwise
1133 # @host: #optional The hostname the VNC server is bound to.  This depends on
1134 #        the name resolution on the host and may be an IP address.
1136 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
1137 #                    'ipv4' if the host is listening for IPv4 connections
1138 #                    'unix' if the host is listening on a unix domain socket
1139 #                    'unknown' otherwise
1141 # @service: #optional The service name of the server's port.  This may depends
1142 #           on the host system's service database so symbolic names should not
1143 #           be relied on.
1145 # @auth: #optional the current authentication type used by the server
1146 #        'none' if no authentication is being used
1147 #        'vnc' if VNC authentication is being used
1148 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
1149 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1150 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1151 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1152 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1153 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1154 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1155 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1156 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1158 # @clients: a list of @VncClientInfo of all currently connected clients
1160 # Since: 0.14.0
1162 { 'struct': 'VncInfo',
1163   'data': {'enabled': 'bool', '*host': 'str',
1164            '*family': 'NetworkAddressFamily',
1165            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1168 # @VncPriAuth:
1170 # vnc primary authentication method.
1172 # Since: 2.3
1174 { 'enum': 'VncPrimaryAuth',
1175   'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1176             'tls', 'vencrypt', 'sasl' ] }
1179 # @VncVencryptSubAuth:
1181 # vnc sub authentication method with vencrypt.
1183 # Since: 2.3
1185 { 'enum': 'VncVencryptSubAuth',
1186   'data': [ 'plain',
1187             'tls-none',  'x509-none',
1188             'tls-vnc',   'x509-vnc',
1189             'tls-plain', 'x509-plain',
1190             'tls-sasl',  'x509-sasl' ] }
1193 # @VncInfo2:
1195 # Information about a vnc server
1197 # @id: vnc server name.
1199 # @server: A list of @VncBasincInfo describing all listening sockets.
1200 #          The list can be empty (in case the vnc server is disabled).
1201 #          It also may have multiple entries: normal + websocket,
1202 #          possibly also ipv4 + ipv6 in the future.
1204 # @clients: A list of @VncClientInfo of all currently connected clients.
1205 #           The list can be empty, for obvious reasons.
1207 # @auth: The current authentication type used by the server
1209 # @vencrypt: #optional The vencrypt sub authentication type used by the server,
1210 #            only specified in case auth == vencrypt.
1212 # @display: #optional The display device the vnc server is linked to.
1214 # Since: 2.3
1216 { 'struct': 'VncInfo2',
1217   'data': { 'id'        : 'str',
1218             'server'    : ['VncBasicInfo'],
1219             'clients'   : ['VncClientInfo'],
1220             'auth'      : 'VncPrimaryAuth',
1221             '*vencrypt' : 'VncVencryptSubAuth',
1222             '*display'  : 'str' } }
1225 # @query-vnc:
1227 # Returns information about the current VNC server
1229 # Returns: @VncInfo
1231 # Since: 0.14.0
1233 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1236 # @query-vnc-servers:
1238 # Returns a list of vnc servers.  The list can be empty.
1240 # Returns: a list of @VncInfo2
1242 # Since: 2.3
1244 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1247 # @SpiceBasicInfo
1249 # The basic information for SPICE network connection
1251 # @host: IP address
1253 # @port: port number
1255 # @family: address family
1257 # Since: 2.1
1259 { 'struct': 'SpiceBasicInfo',
1260   'data': { 'host': 'str',
1261             'port': 'str',
1262             'family': 'NetworkAddressFamily' } }
1265 # @SpiceServerInfo
1267 # Information about a SPICE server
1269 # @auth: #optional, authentication method
1271 # Since: 2.1
1273 { 'struct': 'SpiceServerInfo',
1274   'base': 'SpiceBasicInfo',
1275   'data': { '*auth': 'str' } }
1278 # @SpiceChannel
1280 # Information about a SPICE client channel.
1282 # @connection-id: SPICE connection id number.  All channels with the same id
1283 #                 belong to the same SPICE session.
1285 # @channel-type: SPICE channel type number.  "1" is the main control
1286 #                channel, filter for this one if you want to track spice
1287 #                sessions only
1289 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
1290 #              multiple channels of the same type exist, such as multiple
1291 #              display channels in a multihead setup
1293 # @tls: true if the channel is encrypted, false otherwise.
1295 # Since: 0.14.0
1297 { 'struct': 'SpiceChannel',
1298   'base': 'SpiceBasicInfo',
1299   'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1300            'tls': 'bool'} }
1303 # @SpiceQueryMouseMode
1305 # An enumeration of Spice mouse states.
1307 # @client: Mouse cursor position is determined by the client.
1309 # @server: Mouse cursor position is determined by the server.
1311 # @unknown: No information is available about mouse mode used by
1312 #           the spice server.
1314 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1316 # Since: 1.1
1318 { 'enum': 'SpiceQueryMouseMode',
1319   'data': [ 'client', 'server', 'unknown' ] }
1322 # @SpiceInfo
1324 # Information about the SPICE session.
1326 # @enabled: true if the SPICE server is enabled, false otherwise
1328 # @migrated: true if the last guest migration completed and spice
1329 #            migration had completed as well. false otherwise.
1331 # @host: #optional The hostname the SPICE server is bound to.  This depends on
1332 #        the name resolution on the host and may be an IP address.
1334 # @port: #optional The SPICE server's port number.
1336 # @compiled-version: #optional SPICE server version.
1338 # @tls-port: #optional The SPICE server's TLS port number.
1340 # @auth: #optional the current authentication type used by the server
1341 #        'none'  if no authentication is being used
1342 #        'spice' uses SASL or direct TLS authentication, depending on command
1343 #                line options
1345 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1346 #              be determined by the client or the server, or unknown if spice
1347 #              server doesn't provide this information.
1349 #              Since: 1.1
1351 # @channels: a list of @SpiceChannel for each active spice channel
1353 # Since: 0.14.0
1355 { 'struct': 'SpiceInfo',
1356   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1357            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1358            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1361 # @query-spice
1363 # Returns information about the current SPICE server
1365 # Returns: @SpiceInfo
1367 # Since: 0.14.0
1369 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1372 # @BalloonInfo:
1374 # Information about the guest balloon device.
1376 # @actual: the number of bytes the balloon currently contains
1378 # Since: 0.14.0
1381 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1384 # @query-balloon:
1386 # Return information about the balloon device.
1388 # Returns: @BalloonInfo on success
1389 #          If the balloon driver is enabled but not functional because the KVM
1390 #          kernel module cannot support it, KvmMissingCap
1391 #          If no balloon device is present, DeviceNotActive
1393 # Since: 0.14.0
1395 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1398 # @PciMemoryRange:
1400 # A PCI device memory region
1402 # @base: the starting address (guest physical)
1404 # @limit: the ending address (guest physical)
1406 # Since: 0.14.0
1408 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1411 # @PciMemoryRegion
1413 # Information about a PCI device I/O region.
1415 # @bar: the index of the Base Address Register for this region
1417 # @type: 'io' if the region is a PIO region
1418 #        'memory' if the region is a MMIO region
1420 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1422 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1424 # Since: 0.14.0
1426 { 'struct': 'PciMemoryRegion',
1427   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1428            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1431 # @PciBusInfo:
1433 # Information about a bus of a PCI Bridge device
1435 # @number: primary bus interface number.  This should be the number of the
1436 #          bus the device resides on.
1438 # @secondary: secondary bus interface number.  This is the number of the
1439 #             main bus for the bridge
1441 # @subordinate: This is the highest number bus that resides below the
1442 #               bridge.
1444 # @io_range: The PIO range for all devices on this bridge
1446 # @memory_range: The MMIO range for all devices on this bridge
1448 # @prefetchable_range: The range of prefetchable MMIO for all devices on
1449 #                      this bridge
1451 # Since: 2.4
1453 { 'struct': 'PciBusInfo',
1454   'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1455            'io_range': 'PciMemoryRange',
1456            'memory_range': 'PciMemoryRange',
1457            'prefetchable_range': 'PciMemoryRange' } }
1460 # @PciBridgeInfo:
1462 # Information about a PCI Bridge device
1464 # @bus: information about the bus the device resides on
1466 # @devices: a list of @PciDeviceInfo for each device on this bridge
1468 # Since: 0.14.0
1470 { 'struct': 'PciBridgeInfo',
1471   'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
1474 # @PciDeviceClass:
1476 # Information about the Class of a PCI device
1478 # @desc: #optional a string description of the device's class
1480 # @class: the class code of the device
1482 # Since: 2.4
1484 { 'struct': 'PciDeviceClass',
1485   'data': {'*desc': 'str', 'class': 'int'} }
1488 # @PciDeviceId:
1490 # Information about the Id of a PCI device
1492 # @device: the PCI device id
1494 # @vendor: the PCI vendor id
1496 # Since: 2.4
1498 { 'struct': 'PciDeviceId',
1499   'data': {'device': 'int', 'vendor': 'int'} }
1502 # @PciDeviceInfo:
1504 # Information about a PCI device
1506 # @bus: the bus number of the device
1508 # @slot: the slot the device is located in
1510 # @function: the function of the slot used by the device
1512 # @class_info: the class of the device
1514 # @id: the PCI device id
1516 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1518 # @qdev_id: the device name of the PCI device
1520 # @pci_bridge: if the device is a PCI bridge, the bridge information
1522 # @regions: a list of the PCI I/O regions associated with the device
1524 # Notes: the contents of @class_info.desc are not stable and should only be
1525 #        treated as informational.
1527 # Since: 0.14.0
1529 { 'struct': 'PciDeviceInfo',
1530   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1531            'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
1532            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1533            'regions': ['PciMemoryRegion']} }
1536 # @PciInfo:
1538 # Information about a PCI bus
1540 # @bus: the bus index
1542 # @devices: a list of devices on this bus
1544 # Since: 0.14.0
1546 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1549 # @query-pci:
1551 # Return information about the PCI bus topology of the guest.
1553 # Returns: a list of @PciInfo for each PCI bus
1555 # Since: 0.14.0
1557 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1560 # @quit:
1562 # This command will cause the QEMU process to exit gracefully.  While every
1563 # attempt is made to send the QMP response before terminating, this is not
1564 # guaranteed.  When using this interface, a premature EOF would not be
1565 # unexpected.
1567 # Since: 0.14.0
1569 { 'command': 'quit' }
1572 # @stop:
1574 # Stop all guest VCPU execution.
1576 # Since:  0.14.0
1578 # Notes:  This function will succeed even if the guest is already in the stopped
1579 #         state.  In "inmigrate" state, it will ensure that the guest
1580 #         remains paused once migration finishes, as if the -S option was
1581 #         passed on the command line.
1583 { 'command': 'stop' }
1586 # @system_reset:
1588 # Performs a hard reset of a guest.
1590 # Since: 0.14.0
1592 { 'command': 'system_reset' }
1595 # @system_powerdown:
1597 # Requests that a guest perform a powerdown operation.
1599 # Since: 0.14.0
1601 # Notes: A guest may or may not respond to this command.  This command
1602 #        returning does not indicate that a guest has accepted the request or
1603 #        that it has shut down.  Many guests will respond to this command by
1604 #        prompting the user in some way.
1606 { 'command': 'system_powerdown' }
1609 # @cpu:
1611 # This command is a nop that is only provided for the purposes of compatibility.
1613 # Since: 0.14.0
1615 # Notes: Do not use this command.
1617 { 'command': 'cpu', 'data': {'index': 'int'} }
1620 # @cpu-add
1622 # Adds CPU with specified ID
1624 # @id: ID of CPU to be created, valid values [0..max_cpus)
1626 # Returns: Nothing on success
1628 # Since 1.5
1630 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1633 # @memsave:
1635 # Save a portion of guest memory to a file.
1637 # @val: the virtual address of the guest to start from
1639 # @size: the size of memory region to save
1641 # @filename: the file to save the memory to as binary data
1643 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1644 #                       virtual address (defaults to CPU 0)
1646 # Returns: Nothing on success
1648 # Since: 0.14.0
1650 # Notes: Errors were not reliably returned until 1.1
1652 { 'command': 'memsave',
1653   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1656 # @pmemsave:
1658 # Save a portion of guest physical memory to a file.
1660 # @val: the physical address of the guest to start from
1662 # @size: the size of memory region to save
1664 # @filename: the file to save the memory to as binary data
1666 # Returns: Nothing on success
1668 # Since: 0.14.0
1670 # Notes: Errors were not reliably returned until 1.1
1672 { 'command': 'pmemsave',
1673   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1676 # @cont:
1678 # Resume guest VCPU execution.
1680 # Since:  0.14.0
1682 # Returns:  If successful, nothing
1683 #           If QEMU was started with an encrypted block device and a key has
1684 #              not yet been set, DeviceEncrypted.
1686 # Notes:  This command will succeed if the guest is currently running.  It
1687 #         will also succeed if the guest is in the "inmigrate" state; in
1688 #         this case, the effect of the command is to make sure the guest
1689 #         starts once migration finishes, removing the effect of the -S
1690 #         command line option if it was passed.
1692 { 'command': 'cont' }
1695 # @system_wakeup:
1697 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1699 # Since:  1.1
1701 # Returns:  nothing.
1703 { 'command': 'system_wakeup' }
1706 # @inject-nmi:
1708 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
1710 # Returns:  If successful, nothing
1712 # Since:  0.14.0
1714 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
1716 { 'command': 'inject-nmi' }
1719 # @set_link:
1721 # Sets the link status of a virtual network adapter.
1723 # @name: the device name of the virtual network adapter
1725 # @up: true to set the link status to be up
1727 # Returns: Nothing on success
1728 #          If @name is not a valid network device, DeviceNotFound
1730 # Since: 0.14.0
1732 # Notes: Not all network adapters support setting link status.  This command
1733 #        will succeed even if the network adapter does not support link status
1734 #        notification.
1736 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1739 # @balloon:
1741 # Request the balloon driver to change its balloon size.
1743 # @value: the target size of the balloon in bytes
1745 # Returns: Nothing on success
1746 #          If the balloon driver is enabled but not functional because the KVM
1747 #            kernel module cannot support it, KvmMissingCap
1748 #          If no balloon device is present, DeviceNotActive
1750 # Notes: This command just issues a request to the guest.  When it returns,
1751 #        the balloon size may not have changed.  A guest can change the balloon
1752 #        size independent of this command.
1754 # Since: 0.14.0
1756 { 'command': 'balloon', 'data': {'value': 'int'} }
1759 # @Abort
1761 # This action can be used to test transaction failure.
1763 # Since: 1.6
1765 { 'struct': 'Abort',
1766   'data': { } }
1769 # @ActionCompletionMode
1771 # An enumeration of Transactional completion modes.
1773 # @individual: Do not attempt to cancel any other Actions if any Actions fail
1774 #              after the Transaction request succeeds. All Actions that
1775 #              can complete successfully will do so without waiting on others.
1776 #              This is the default.
1778 # @grouped: If any Action fails after the Transaction succeeds, cancel all
1779 #           Actions. Actions do not complete until all Actions are ready to
1780 #           complete. May be rejected by Actions that do not support this
1781 #           completion mode.
1783 # Since: 2.5
1785 { 'enum': 'ActionCompletionMode',
1786   'data': [ 'individual', 'grouped' ] }
1789 # @TransactionAction
1791 # A discriminated record of operations that can be performed with
1792 # @transaction.
1794 # Since 1.1
1796 # drive-backup since 1.6
1797 # abort since 1.6
1798 # blockdev-snapshot-internal-sync since 1.7
1799 # blockdev-backup since 2.3
1800 # blockdev-snapshot since 2.5
1801 # block-dirty-bitmap-add since 2.5
1802 # block-dirty-bitmap-clear since 2.5
1804 { 'union': 'TransactionAction',
1805   'data': {
1806        'blockdev-snapshot': 'BlockdevSnapshot',
1807        'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
1808        'drive-backup': 'DriveBackup',
1809        'blockdev-backup': 'BlockdevBackup',
1810        'abort': 'Abort',
1811        'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
1812        'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
1813        'block-dirty-bitmap-clear': 'BlockDirtyBitmap'
1814    } }
1817 # @TransactionProperties
1819 # Optional arguments to modify the behavior of a Transaction.
1821 # @completion-mode: #optional Controls how jobs launched asynchronously by
1822 #                   Actions will complete or fail as a group.
1823 #                   See @ActionCompletionMode for details.
1825 # Since: 2.5
1827 { 'struct': 'TransactionProperties',
1828   'data': {
1829        '*completion-mode': 'ActionCompletionMode'
1830   }
1834 # @transaction
1836 # Executes a number of transactionable QMP commands atomically. If any
1837 # operation fails, then the entire set of actions will be abandoned and the
1838 # appropriate error returned.
1840 # @actions: List of @TransactionAction;
1841 #           information needed for the respective operations.
1843 # @properties: #optional structure of additional options to control the
1844 #              execution of the transaction. See @TransactionProperties
1845 #              for additional detail.
1847 # Returns: nothing on success
1848 #          Errors depend on the operations of the transaction
1850 # Note: The transaction aborts on the first failure.  Therefore, there will be
1851 # information on only one failed operation returned in an error condition, and
1852 # subsequent actions will not have been attempted.
1854 # Since 1.1
1856 { 'command': 'transaction',
1857   'data': { 'actions': [ 'TransactionAction' ],
1858             '*properties': 'TransactionProperties'
1859           }
1863 # @human-monitor-command:
1865 # Execute a command on the human monitor and return the output.
1867 # @command-line: the command to execute in the human monitor
1869 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1871 # Returns: the output of the command as a string
1873 # Since: 0.14.0
1875 # Notes: This command only exists as a stop-gap.  Its use is highly
1876 #        discouraged.  The semantics of this command are not guaranteed.
1878 #        Known limitations:
1880 #        o This command is stateless, this means that commands that depend
1881 #          on state information (such as getfd) might not work
1883 #       o Commands that prompt the user for data (eg. 'cont' when the block
1884 #         device is encrypted) don't currently work
1886 { 'command': 'human-monitor-command',
1887   'data': {'command-line': 'str', '*cpu-index': 'int'},
1888   'returns': 'str' }
1891 # @migrate_cancel
1893 # Cancel the current executing migration process.
1895 # Returns: nothing on success
1897 # Notes: This command succeeds even if there is no migration process running.
1899 # Since: 0.14.0
1901 { 'command': 'migrate_cancel' }
1904 # @migrate_set_downtime
1906 # Set maximum tolerated downtime for migration.
1908 # @value: maximum downtime in seconds
1910 # Returns: nothing on success
1912 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1914 # Since: 0.14.0
1916 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1919 # @migrate_set_speed
1921 # Set maximum speed for migration.
1923 # @value: maximum speed in bytes.
1925 # Returns: nothing on success
1927 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1929 # Since: 0.14.0
1931 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1934 # @migrate-set-cache-size
1936 # Set XBZRLE cache size
1938 # @value: cache size in bytes
1940 # The size will be rounded down to the nearest power of 2.
1941 # The cache size can be modified before and during ongoing migration
1943 # Returns: nothing on success
1945 # Since: 1.2
1947 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1950 # @query-migrate-cache-size
1952 # query XBZRLE cache size
1954 # Returns: XBZRLE cache size in bytes
1956 # Since: 1.2
1958 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1961 # @ObjectPropertyInfo:
1963 # @name: the name of the property
1965 # @type: the type of the property.  This will typically come in one of four
1966 #        forms:
1968 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1969 #           These types are mapped to the appropriate JSON type.
1971 #        2) A child type in the form 'child<subtype>' where subtype is a qdev
1972 #           device type name.  Child properties create the composition tree.
1974 #        3) A link type in the form 'link<subtype>' where subtype is a qdev
1975 #           device type name.  Link properties form the device model graph.
1977 # Since: 1.2
1979 { 'struct': 'ObjectPropertyInfo',
1980   'data': { 'name': 'str', 'type': 'str' } }
1983 # @qom-list:
1985 # This command will list any properties of a object given a path in the object
1986 # model.
1988 # @path: the path within the object model.  See @qom-get for a description of
1989 #        this parameter.
1991 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1992 #          object.
1994 # Since: 1.2
1996 { 'command': 'qom-list',
1997   'data': { 'path': 'str' },
1998   'returns': [ 'ObjectPropertyInfo' ] }
2001 # @qom-get:
2003 # This command will get a property from a object model path and return the
2004 # value.
2006 # @path: The path within the object model.  There are two forms of supported
2007 #        paths--absolute and partial paths.
2009 #        Absolute paths are derived from the root object and can follow child<>
2010 #        or link<> properties.  Since they can follow link<> properties, they
2011 #        can be arbitrarily long.  Absolute paths look like absolute filenames
2012 #        and are prefixed  with a leading slash.
2014 #        Partial paths look like relative filenames.  They do not begin
2015 #        with a prefix.  The matching rules for partial paths are subtle but
2016 #        designed to make specifying objects easy.  At each level of the
2017 #        composition tree, the partial path is matched as an absolute path.
2018 #        The first match is not returned.  At least two matches are searched
2019 #        for.  A successful result is only returned if only one match is
2020 #        found.  If more than one match is found, a flag is return to
2021 #        indicate that the match was ambiguous.
2023 # @property: The property name to read
2025 # Returns: The property value.  The type depends on the property
2026 #          type. child<> and link<> properties are returned as #str
2027 #          pathnames.  All integer property types (u8, u16, etc) are
2028 #          returned as #int.
2030 # Since: 1.2
2032 { 'command': 'qom-get',
2033   'data': { 'path': 'str', 'property': 'str' },
2034   'returns': 'any' }
2037 # @qom-set:
2039 # This command will set a property from a object model path.
2041 # @path: see @qom-get for a description of this parameter
2043 # @property: the property name to set
2045 # @value: a value who's type is appropriate for the property type.  See @qom-get
2046 #         for a description of type mapping.
2048 # Since: 1.2
2050 { 'command': 'qom-set',
2051   'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
2054 # @set_password:
2056 # Sets the password of a remote display session.
2058 # @protocol: `vnc' to modify the VNC server password
2059 #            `spice' to modify the Spice server password
2061 # @password: the new password
2063 # @connected: #optional how to handle existing clients when changing the
2064 #                       password.  If nothing is specified, defaults to `keep'
2065 #                       `fail' to fail the command if clients are connected
2066 #                       `disconnect' to disconnect existing clients
2067 #                       `keep' to maintain existing clients
2069 # Returns: Nothing on success
2070 #          If Spice is not enabled, DeviceNotFound
2072 # Since: 0.14.0
2074 { 'command': 'set_password',
2075   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2078 # @expire_password:
2080 # Expire the password of a remote display server.
2082 # @protocol: the name of the remote display protocol `vnc' or `spice'
2084 # @time: when to expire the password.
2085 #        `now' to expire the password immediately
2086 #        `never' to cancel password expiration
2087 #        `+INT' where INT is the number of seconds from now (integer)
2088 #        `INT' where INT is the absolute time in seconds
2090 # Returns: Nothing on success
2091 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
2093 # Since: 0.14.0
2095 # Notes: Time is relative to the server and currently there is no way to
2096 #        coordinate server time with client time.  It is not recommended to
2097 #        use the absolute time version of the @time parameter unless you're
2098 #        sure you are on the same machine as the QEMU instance.
2100 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2103 # @change-vnc-password:
2105 # Change the VNC server password.
2107 # @password:  the new password to use with VNC authentication
2109 # Since: 1.1
2111 # Notes:  An empty password in this command will set the password to the empty
2112 #         string.  Existing clients are unaffected by executing this command.
2114 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2117 # @change:
2119 # This command is multiple commands multiplexed together.
2121 # @device: This is normally the name of a block device but it may also be 'vnc'.
2122 #          when it's 'vnc', then sub command depends on @target
2124 # @target: If @device is a block device, then this is the new filename.
2125 #          If @device is 'vnc', then if the value 'password' selects the vnc
2126 #          change password command.   Otherwise, this specifies a new server URI
2127 #          address to listen to for VNC connections.
2129 # @arg:    If @device is a block device, then this is an optional format to open
2130 #          the device with.
2131 #          If @device is 'vnc' and @target is 'password', this is the new VNC
2132 #          password to set.  If this argument is an empty string, then no future
2133 #          logins will be allowed.
2135 # Returns: Nothing on success.
2136 #          If @device is not a valid block device, DeviceNotFound
2137 #          If the new block device is encrypted, DeviceEncrypted.  Note that
2138 #          if this error is returned, the device has been opened successfully
2139 #          and an additional call to @block_passwd is required to set the
2140 #          device's password.  The behavior of reads and writes to the block
2141 #          device between when these calls are executed is undefined.
2143 # Notes:  This interface is deprecated, and it is strongly recommended that you
2144 #         avoid using it.  For changing block devices, use
2145 #         blockdev-change-medium; for changing VNC parameters, use
2146 #         change-vnc-password.
2148 # Since: 0.14.0
2150 { 'command': 'change',
2151   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2154 # @ObjectTypeInfo:
2156 # This structure describes a search result from @qom-list-types
2158 # @name: the type name found in the search
2160 # Since: 1.1
2162 # Notes: This command is experimental and may change syntax in future releases.
2164 { 'struct': 'ObjectTypeInfo',
2165   'data': { 'name': 'str' } }
2168 # @qom-list-types:
2170 # This command will return a list of types given search parameters
2172 # @implements: if specified, only return types that implement this type name
2174 # @abstract: if true, include abstract types in the results
2176 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2178 # Since: 1.1
2180 { 'command': 'qom-list-types',
2181   'data': { '*implements': 'str', '*abstract': 'bool' },
2182   'returns': [ 'ObjectTypeInfo' ] }
2185 # @DevicePropertyInfo:
2187 # Information about device properties.
2189 # @name: the name of the property
2190 # @type: the typename of the property
2191 # @description: #optional if specified, the description of the property.
2192 #               (since 2.2)
2194 # Since: 1.2
2196 { 'struct': 'DevicePropertyInfo',
2197   'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
2200 # @device-list-properties:
2202 # List properties associated with a device.
2204 # @typename: the type name of a device
2206 # Returns: a list of DevicePropertyInfo describing a devices properties
2208 # Since: 1.2
2210 { 'command': 'device-list-properties',
2211   'data': { 'typename': 'str'},
2212   'returns': [ 'DevicePropertyInfo' ] }
2215 # @migrate
2217 # Migrates the current running guest to another Virtual Machine.
2219 # @uri: the Uniform Resource Identifier of the destination VM
2221 # @blk: #optional do block migration (full disk copy)
2223 # @inc: #optional incremental disk copy migration
2225 # @detach: this argument exists only for compatibility reasons and
2226 #          is ignored by QEMU
2228 # Returns: nothing on success
2230 # Since: 0.14.0
2232 { 'command': 'migrate',
2233   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2236 # @migrate-incoming
2238 # Start an incoming migration, the qemu must have been started
2239 # with -incoming defer
2241 # @uri: The Uniform Resource Identifier identifying the source or
2242 #       address to listen on
2244 # Returns: nothing on success
2246 # Since: 2.3
2247 # Note: It's a bad idea to use a string for the uri, but it needs to stay
2248 # compatible with -incoming and the format of the uri is already exposed
2249 # above libvirt
2251 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
2253 # @xen-save-devices-state:
2255 # Save the state of all devices to file. The RAM and the block devices
2256 # of the VM are not saved by this command.
2258 # @filename: the file to save the state of the devices to as binary
2259 # data. See xen-save-devices-state.txt for a description of the binary
2260 # format.
2262 # Returns: Nothing on success
2264 # Since: 1.1
2266 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2269 # @xen-set-global-dirty-log
2271 # Enable or disable the global dirty log mode.
2273 # @enable: true to enable, false to disable.
2275 # Returns: nothing
2277 # Since: 1.3
2279 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2282 # @device_add:
2284 # @driver: the name of the new device's driver
2286 # @bus: #optional the device's parent bus (device tree path)
2288 # @id: the device's ID, must be unique
2290 # Additional arguments depend on the type.
2292 # Add a device.
2294 # Notes:
2295 # 1. For detailed information about this command, please refer to the
2296 #    'docs/qdev-device-use.txt' file.
2298 # 2. It's possible to list device properties by running QEMU with the
2299 #    "-device DEVICE,help" command-line argument, where DEVICE is the
2300 #    device's name
2302 # Example:
2304 # -> { "execute": "device_add",
2305 #      "arguments": { "driver": "e1000", "id": "net1",
2306 #                     "bus": "pci.0",
2307 #                     "mac": "52:54:00:12:34:56" } }
2308 # <- { "return": {} }
2310 # TODO This command effectively bypasses QAPI completely due to its
2311 # "additional arguments" business.  It shouldn't have been added to
2312 # the schema in this form.  It should be qapified properly, or
2313 # replaced by a properly qapified command.
2315 # Since: 0.13
2317 { 'command': 'device_add',
2318   'data': {'driver': 'str', 'id': 'str'},
2319   'gen': false } # so we can get the additional arguments
2322 # @device_del:
2324 # Remove a device from a guest
2326 # @id: the name or QOM path of the device
2328 # Returns: Nothing on success
2329 #          If @id is not a valid device, DeviceNotFound
2331 # Notes: When this command completes, the device may not be removed from the
2332 #        guest.  Hot removal is an operation that requires guest cooperation.
2333 #        This command merely requests that the guest begin the hot removal
2334 #        process.  Completion of the device removal process is signaled with a
2335 #        DEVICE_DELETED event. Guest reset will automatically complete removal
2336 #        for all devices.
2338 # Since: 0.14.0
2340 { 'command': 'device_del', 'data': {'id': 'str'} }
2343 # @DumpGuestMemoryFormat:
2345 # An enumeration of guest-memory-dump's format.
2347 # @elf: elf format
2349 # @kdump-zlib: kdump-compressed format with zlib-compressed
2351 # @kdump-lzo: kdump-compressed format with lzo-compressed
2353 # @kdump-snappy: kdump-compressed format with snappy-compressed
2355 # Since: 2.0
2357 { 'enum': 'DumpGuestMemoryFormat',
2358   'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
2361 # @dump-guest-memory
2363 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2364 # very long depending on the amount of guest memory.
2366 # @paging: if true, do paging to get guest's memory mapping. This allows
2367 #          using gdb to process the core file.
2369 #          IMPORTANT: this option can make QEMU allocate several gigabytes
2370 #                     of RAM. This can happen for a large guest, or a
2371 #                     malicious guest pretending to be large.
2373 #          Also, paging=true has the following limitations:
2375 #             1. The guest may be in a catastrophic state or can have corrupted
2376 #                memory, which cannot be trusted
2377 #             2. The guest can be in real-mode even if paging is enabled. For
2378 #                example, the guest uses ACPI to sleep, and ACPI sleep state
2379 #                goes in real-mode
2380 #             3. Currently only supported on i386 and x86_64.
2382 # @protocol: the filename or file descriptor of the vmcore. The supported
2383 #            protocols are:
2385 #            1. file: the protocol starts with "file:", and the following
2386 #               string is the file's path.
2387 #            2. fd: the protocol starts with "fd:", and the following string
2388 #               is the fd's name.
2390 # @detach: #optional if true, QMP will return immediately rather than
2391 #          waiting for the dump to finish. The user can track progress
2392 #          using "query-dump". (since 2.6).
2394 # @begin: #optional if specified, the starting physical address.
2396 # @length: #optional if specified, the memory size, in bytes. If you don't
2397 #          want to dump all guest's memory, please specify the start @begin
2398 #          and @length
2400 # @format: #optional if specified, the format of guest memory dump. But non-elf
2401 #          format is conflict with paging and filter, ie. @paging, @begin and
2402 #          @length is not allowed to be specified with non-elf @format at the
2403 #          same time (since 2.0)
2405 # Returns: nothing on success
2407 # Since: 1.2
2409 { 'command': 'dump-guest-memory',
2410   'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
2411             '*begin': 'int', '*length': 'int',
2412             '*format': 'DumpGuestMemoryFormat'} }
2415 # @DumpStatus
2417 # Describe the status of a long-running background guest memory dump.
2419 # @none: no dump-guest-memory has started yet.
2421 # @active: there is one dump running in background.
2423 # @completed: the last dump has finished successfully.
2425 # @failed: the last dump has failed.
2427 # Since 2.6
2429 { 'enum': 'DumpStatus',
2430   'data': [ 'none', 'active', 'completed', 'failed' ] }
2433 # @DumpQueryResult
2435 # The result format for 'query-dump'.
2437 # @status: enum of @DumpStatus, which shows current dump status
2439 # @completed: bytes written in latest dump (uncompressed)
2441 # @total: total bytes to be written in latest dump (uncompressed)
2443 # Since 2.6
2445 { 'struct': 'DumpQueryResult',
2446   'data': { 'status': 'DumpStatus',
2447             'completed': 'int',
2448             'total': 'int' } }
2451 # @query-dump
2453 # Query latest dump status.
2455 # Returns: A @DumpStatus object showing the dump status.
2457 # Since: 2.6
2459 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
2462 # @DumpGuestMemoryCapability:
2464 # A list of the available formats for dump-guest-memory
2466 # Since: 2.0
2468 { 'struct': 'DumpGuestMemoryCapability',
2469   'data': {
2470       'formats': ['DumpGuestMemoryFormat'] } }
2473 # @query-dump-guest-memory-capability:
2475 # Returns the available formats for dump-guest-memory
2477 # Returns:  A @DumpGuestMemoryCapability object listing available formats for
2478 #           dump-guest-memory
2480 # Since: 2.0
2482 { 'command': 'query-dump-guest-memory-capability',
2483   'returns': 'DumpGuestMemoryCapability' }
2486 # @dump-skeys
2488 # Dump guest's storage keys
2490 # @filename: the path to the file to dump to
2492 # This command is only supported on s390 architecture.
2494 # Since: 2.5
2496 { 'command': 'dump-skeys',
2497   'data': { 'filename': 'str' } }
2500 # @netdev_add:
2502 # Add a network backend.
2504 # @type: the type of network backend.  Current valid values are 'user', 'tap',
2505 #        'vde', 'socket', 'dump' and 'bridge'
2507 # @id: the name of the new network backend
2509 # Additional arguments depend on the type.
2511 # TODO This command effectively bypasses QAPI completely due to its
2512 # "additional arguments" business.  It shouldn't have been added to
2513 # the schema in this form.  It should be qapified properly, or
2514 # replaced by a properly qapified command.
2516 # Since: 0.14.0
2518 # Returns: Nothing on success
2519 #          If @type is not a valid network backend, DeviceNotFound
2521 { 'command': 'netdev_add',
2522   'data': {'type': 'str', 'id': 'str'},
2523   'gen': false }                # so we can get the additional arguments
2526 # @netdev_del:
2528 # Remove a network backend.
2530 # @id: the name of the network backend to remove
2532 # Returns: Nothing on success
2533 #          If @id is not a valid network backend, DeviceNotFound
2535 # Since: 0.14.0
2537 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2540 # @object-add:
2542 # Create a QOM object.
2544 # @qom-type: the class name for the object to be created
2546 # @id: the name of the new object
2548 # @props: #optional a dictionary of properties to be passed to the backend
2550 # Returns: Nothing on success
2551 #          Error if @qom-type is not a valid class name
2553 # Since: 2.0
2555 { 'command': 'object-add',
2556   'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
2559 # @object-del:
2561 # Remove a QOM object.
2563 # @id: the name of the QOM object to remove
2565 # Returns: Nothing on success
2566 #          Error if @id is not a valid id for a QOM object
2568 # Since: 2.0
2570 { 'command': 'object-del', 'data': {'id': 'str'} }
2573 # @NetdevNoneOptions
2575 # Use it alone to have zero network devices.
2577 # Since 1.2
2579 { 'struct': 'NetdevNoneOptions',
2580   'data': { } }
2583 # @NetLegacyNicOptions
2585 # Create a new Network Interface Card.
2587 # @netdev: #optional id of -netdev to connect to
2589 # @macaddr: #optional MAC address
2591 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2593 # @addr: #optional PCI device address
2595 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2597 # Since 1.2
2599 { 'struct': 'NetLegacyNicOptions',
2600   'data': {
2601     '*netdev':  'str',
2602     '*macaddr': 'str',
2603     '*model':   'str',
2604     '*addr':    'str',
2605     '*vectors': 'uint32' } }
2608 # @String
2610 # A fat type wrapping 'str', to be embedded in lists.
2612 # Since 1.2
2614 { 'struct': 'String',
2615   'data': {
2616     'str': 'str' } }
2619 # @NetdevUserOptions
2621 # Use the user mode network stack which requires no administrator privilege to
2622 # run.
2624 # @hostname: #optional client hostname reported by the builtin DHCP server
2626 # @restrict: #optional isolate the guest from the host
2628 # @ipv4: #optional whether to support IPv4, default true for enabled
2629 #        (since 2.6)
2631 # @ipv6: #optional whether to support IPv6, default true for enabled
2632 #        (since 2.6)
2634 # @ip: #optional legacy parameter, use net= instead
2636 # @net: #optional IP network address that the guest will see, in the
2637 #       form addr[/netmask] The netmask is optional, and can be
2638 #       either in the form a.b.c.d or as a number of valid top-most
2639 #       bits. Default is 10.0.2.0/24.
2641 # @host: #optional guest-visible address of the host
2643 # @tftp: #optional root directory of the built-in TFTP server
2645 # @bootfile: #optional BOOTP filename, for use with tftp=
2647 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2648 #             assign
2650 # @dns: #optional guest-visible address of the virtual nameserver
2652 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2653 #             to the guest
2655 # @ipv6-prefix: #optional IPv6 network prefix (default is fec0::) (since
2656 #               2.6). The network prefix is given in the usual
2657 #               hexadecimal IPv6 address notation.
2659 # @ipv6-prefixlen: #optional IPv6 network prefix length (default is 64)
2660 #                  (since 2.6)
2662 # @ipv6-host: #optional guest-visible IPv6 address of the host (since 2.6)
2664 # @ipv6-dns: #optional guest-visible IPv6 address of the virtual
2665 #            nameserver (since 2.6)
2667 # @smb: #optional root directory of the built-in SMB server
2669 # @smbserver: #optional IP address of the built-in SMB server
2671 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2672 #           endpoints
2674 # @guestfwd: #optional forward guest TCP connections
2676 # Since 1.2
2678 { 'struct': 'NetdevUserOptions',
2679   'data': {
2680     '*hostname':  'str',
2681     '*restrict':  'bool',
2682     '*ipv4':      'bool',
2683     '*ipv6':      'bool',
2684     '*ip':        'str',
2685     '*net':       'str',
2686     '*host':      'str',
2687     '*tftp':      'str',
2688     '*bootfile':  'str',
2689     '*dhcpstart': 'str',
2690     '*dns':       'str',
2691     '*dnssearch': ['String'],
2692     '*ipv6-prefix':      'str',
2693     '*ipv6-prefixlen':   'int',
2694     '*ipv6-host':        'str',
2695     '*ipv6-dns':         'str',
2696     '*smb':       'str',
2697     '*smbserver': 'str',
2698     '*hostfwd':   ['String'],
2699     '*guestfwd':  ['String'] } }
2702 # @NetdevTapOptions
2704 # Connect the host TAP network interface name to the VLAN.
2706 # @ifname: #optional interface name
2708 # @fd: #optional file descriptor of an already opened tap
2710 # @fds: #optional multiple file descriptors of already opened multiqueue capable
2711 # tap
2713 # @script: #optional script to initialize the interface
2715 # @downscript: #optional script to shut down the interface
2717 # @br: #optional bridge name (since 2.8)
2719 # @helper: #optional command to execute to configure bridge
2721 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2723 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2725 # @vhost: #optional enable vhost-net network accelerator
2727 # @vhostfd: #optional file descriptor of an already opened vhost net device
2729 # @vhostfds: #optional file descriptors of multiple already opened vhost net
2730 # devices
2732 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2734 # @queues: #optional number of queues to be created for multiqueue capable tap
2736 # @poll-us: #optional maximum number of microseconds that could
2737 # be spent on busy polling for tap (since 2.7)
2739 # Since 1.2
2741 { 'struct': 'NetdevTapOptions',
2742   'data': {
2743     '*ifname':     'str',
2744     '*fd':         'str',
2745     '*fds':        'str',
2746     '*script':     'str',
2747     '*downscript': 'str',
2748     '*br':         'str',
2749     '*helper':     'str',
2750     '*sndbuf':     'size',
2751     '*vnet_hdr':   'bool',
2752     '*vhost':      'bool',
2753     '*vhostfd':    'str',
2754     '*vhostfds':   'str',
2755     '*vhostforce': 'bool',
2756     '*queues':     'uint32',
2757     '*poll-us':    'uint32'} }
2760 # @NetdevSocketOptions
2762 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2763 # socket connection.
2765 # @fd: #optional file descriptor of an already opened socket
2767 # @listen: #optional port number, and optional hostname, to listen on
2769 # @connect: #optional port number, and optional hostname, to connect to
2771 # @mcast: #optional UDP multicast address and port number
2773 # @localaddr: #optional source address and port for multicast and udp packets
2775 # @udp: #optional UDP unicast address and port number
2777 # Since 1.2
2779 { 'struct': 'NetdevSocketOptions',
2780   'data': {
2781     '*fd':        'str',
2782     '*listen':    'str',
2783     '*connect':   'str',
2784     '*mcast':     'str',
2785     '*localaddr': 'str',
2786     '*udp':       'str' } }
2789 # @NetdevL2TPv3Options
2791 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
2793 # @src: source address
2795 # @dst: destination address
2797 # @srcport: #optional source port - mandatory for udp, optional for ip
2799 # @dstport: #optional destination port - mandatory for udp, optional for ip
2801 # @ipv6: #optional - force the use of ipv6
2803 # @udp: #optional - use the udp version of l2tpv3 encapsulation
2805 # @cookie64: #optional - use 64 bit coookies
2807 # @counter: #optional have sequence counter
2809 # @pincounter: #optional pin sequence counter to zero -
2810 #              workaround for buggy implementations or
2811 #              networks with packet reorder
2813 # @txcookie: #optional 32 or 64 bit transmit cookie
2815 # @rxcookie: #optional 32 or 64 bit receive cookie
2817 # @txsession: 32 bit transmit session
2819 # @rxsession: #optional 32 bit receive session - if not specified
2820 #             set to the same value as transmit
2822 # @offset: #optional additional offset - allows the insertion of
2823 #          additional application-specific data before the packet payload
2825 # Since 2.1
2827 { 'struct': 'NetdevL2TPv3Options',
2828   'data': {
2829     'src':          'str',
2830     'dst':          'str',
2831     '*srcport':     'str',
2832     '*dstport':     'str',
2833     '*ipv6':        'bool',
2834     '*udp':         'bool',
2835     '*cookie64':    'bool',
2836     '*counter':     'bool',
2837     '*pincounter':  'bool',
2838     '*txcookie':    'uint64',
2839     '*rxcookie':    'uint64',
2840     'txsession':    'uint32',
2841     '*rxsession':   'uint32',
2842     '*offset':      'uint32' } }
2845 # @NetdevVdeOptions
2847 # Connect the VLAN to a vde switch running on the host.
2849 # @sock: #optional socket path
2851 # @port: #optional port number
2853 # @group: #optional group owner of socket
2855 # @mode: #optional permissions for socket
2857 # Since 1.2
2859 { 'struct': 'NetdevVdeOptions',
2860   'data': {
2861     '*sock':  'str',
2862     '*port':  'uint16',
2863     '*group': 'str',
2864     '*mode':  'uint16' } }
2867 # @NetdevDumpOptions
2869 # Dump VLAN network traffic to a file.
2871 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2872 # suffixes.
2874 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2876 # Since 1.2
2878 { 'struct': 'NetdevDumpOptions',
2879   'data': {
2880     '*len':  'size',
2881     '*file': 'str' } }
2884 # @NetdevBridgeOptions
2886 # Connect a host TAP network interface to a host bridge device.
2888 # @br: #optional bridge name
2890 # @helper: #optional command to execute to configure bridge
2892 # Since 1.2
2894 { 'struct': 'NetdevBridgeOptions',
2895   'data': {
2896     '*br':     'str',
2897     '*helper': 'str' } }
2900 # @NetdevHubPortOptions
2902 # Connect two or more net clients through a software hub.
2904 # @hubid: hub identifier number
2906 # Since 1.2
2908 { 'struct': 'NetdevHubPortOptions',
2909   'data': {
2910     'hubid':     'int32' } }
2913 # @NetdevNetmapOptions
2915 # Connect a client to a netmap-enabled NIC or to a VALE switch port
2917 # @ifname: Either the name of an existing network interface supported by
2918 #          netmap, or the name of a VALE port (created on the fly).
2919 #          A VALE port name is in the form 'valeXXX:YYY', where XXX and
2920 #          YYY are non-negative integers. XXX identifies a switch and
2921 #          YYY identifies a port of the switch. VALE ports having the
2922 #          same XXX are therefore connected to the same switch.
2924 # @devname: #optional path of the netmap device (default: '/dev/netmap').
2926 # Since 2.0
2928 { 'struct': 'NetdevNetmapOptions',
2929   'data': {
2930     'ifname':     'str',
2931     '*devname':    'str' } }
2934 # @NetdevVhostUserOptions
2936 # Vhost-user network backend
2938 # @chardev: name of a unix socket chardev
2940 # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
2942 # @queues: #optional number of queues to be created for multiqueue vhost-user
2943 #          (default: 1) (Since 2.5)
2945 # Since 2.1
2947 { 'struct': 'NetdevVhostUserOptions',
2948   'data': {
2949     'chardev':        'str',
2950     '*vhostforce':    'bool',
2951     '*queues':        'int' } }
2954 # @NetClientDriver
2956 # Available netdev drivers.
2958 # Since 2.7
2960 { 'enum': 'NetClientDriver',
2961   'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
2962             'bridge', 'hubport', 'netmap', 'vhost-user' ] }
2965 # @Netdev
2967 # Captures the configuration of a network device.
2969 # @id: identifier for monitor commands.
2971 # @type: Specify the driver used for interpreting remaining arguments.
2973 # Since 1.2
2975 # 'l2tpv3' - since 2.1
2977 { 'union': 'Netdev',
2978   'base': { 'id': 'str', 'type': 'NetClientDriver' },
2979   'discriminator': 'type',
2980   'data': {
2981     'none':     'NetdevNoneOptions',
2982     'nic':      'NetLegacyNicOptions',
2983     'user':     'NetdevUserOptions',
2984     'tap':      'NetdevTapOptions',
2985     'l2tpv3':   'NetdevL2TPv3Options',
2986     'socket':   'NetdevSocketOptions',
2987     'vde':      'NetdevVdeOptions',
2988     'dump':     'NetdevDumpOptions',
2989     'bridge':   'NetdevBridgeOptions',
2990     'hubport':  'NetdevHubPortOptions',
2991     'netmap':   'NetdevNetmapOptions',
2992     'vhost-user': 'NetdevVhostUserOptions' } }
2995 # @NetLegacy
2997 # Captures the configuration of a network device; legacy.
2999 # @vlan: #optional vlan number
3001 # @id: #optional identifier for monitor commands
3003 # @name: #optional identifier for monitor commands, ignored if @id is present
3005 # @opts: device type specific properties (legacy)
3007 # Since 1.2
3009 { 'struct': 'NetLegacy',
3010   'data': {
3011     '*vlan': 'int32',
3012     '*id':   'str',
3013     '*name': 'str',
3014     'opts':  'NetLegacyOptions' } }
3017 # @NetLegacyOptions
3019 # Like Netdev, but for use only by the legacy command line options
3021 # Since 1.2
3023 { 'union': 'NetLegacyOptions',
3024   'data': {
3025     'none':     'NetdevNoneOptions',
3026     'nic':      'NetLegacyNicOptions',
3027     'user':     'NetdevUserOptions',
3028     'tap':      'NetdevTapOptions',
3029     'l2tpv3':   'NetdevL2TPv3Options',
3030     'socket':   'NetdevSocketOptions',
3031     'vde':      'NetdevVdeOptions',
3032     'dump':     'NetdevDumpOptions',
3033     'bridge':   'NetdevBridgeOptions',
3034     'netmap':   'NetdevNetmapOptions',
3035     'vhost-user': 'NetdevVhostUserOptions' } }
3038 # @NetFilterDirection
3040 # Indicates whether a netfilter is attached to a netdev's transmit queue or
3041 # receive queue or both.
3043 # @all: the filter is attached both to the receive and the transmit
3044 #       queue of the netdev (default).
3046 # @rx: the filter is attached to the receive queue of the netdev,
3047 #      where it will receive packets sent to the netdev.
3049 # @tx: the filter is attached to the transmit queue of the netdev,
3050 #      where it will receive packets sent by the netdev.
3052 # Since 2.5
3054 { 'enum': 'NetFilterDirection',
3055   'data': [ 'all', 'rx', 'tx' ] }
3058 # @InetSocketAddress
3060 # Captures a socket address or address range in the Internet namespace.
3062 # @host: host part of the address
3064 # @port: port part of the address, or lowest port if @to is present
3066 # @to: highest port to try
3068 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
3069 #        #optional
3071 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
3072 #        #optional
3074 # Since 1.3
3076 { 'struct': 'InetSocketAddress',
3077   'data': {
3078     'host': 'str',
3079     'port': 'str',
3080     '*to': 'uint16',
3081     '*ipv4': 'bool',
3082     '*ipv6': 'bool' } }
3085 # @UnixSocketAddress
3087 # Captures a socket address in the local ("Unix socket") namespace.
3089 # @path: filesystem path to use
3091 # Since 1.3
3093 { 'struct': 'UnixSocketAddress',
3094   'data': {
3095     'path': 'str' } }
3098 # @SocketAddress
3100 # Captures the address of a socket, which could also be a named file descriptor
3102 # Since 1.3
3104 { 'union': 'SocketAddress',
3105   'data': {
3106     'inet': 'InetSocketAddress',
3107     'unix': 'UnixSocketAddress',
3108     'fd': 'String' } }
3111 # @getfd:
3113 # Receive a file descriptor via SCM rights and assign it a name
3115 # @fdname: file descriptor name
3117 # Returns: Nothing on success
3119 # Since: 0.14.0
3121 # Notes: If @fdname already exists, the file descriptor assigned to
3122 #        it will be closed and replaced by the received file
3123 #        descriptor.
3124 #        The 'closefd' command can be used to explicitly close the
3125 #        file descriptor when it is no longer needed.
3127 { 'command': 'getfd', 'data': {'fdname': 'str'} }
3130 # @closefd:
3132 # Close a file descriptor previously passed via SCM rights
3134 # @fdname: file descriptor name
3136 # Returns: Nothing on success
3138 # Since: 0.14.0
3140 { 'command': 'closefd', 'data': {'fdname': 'str'} }
3143 # @MachineInfo:
3145 # Information describing a machine.
3147 # @name: the name of the machine
3149 # @alias: #optional an alias for the machine name
3151 # @default: #optional whether the machine is default
3153 # @cpu-max: maximum number of CPUs supported by the machine type
3154 #           (since 1.5.0)
3156 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
3158 # Since: 1.2.0
3160 { 'struct': 'MachineInfo',
3161   'data': { 'name': 'str', '*alias': 'str',
3162             '*is-default': 'bool', 'cpu-max': 'int',
3163             'hotpluggable-cpus': 'bool'} }
3166 # @query-machines:
3168 # Return a list of supported machines
3170 # Returns: a list of MachineInfo
3172 # Since: 1.2.0
3174 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
3177 # @CpuDefinitionInfo:
3179 # Virtual CPU definition.
3181 # @name: the name of the CPU definition
3183 # @migration-safe: #optional whether a CPU definition can be safely used for
3184 #                  migration in combination with a QEMU compatibility machine
3185 #                  when migrating between different QMU versions and between
3186 #                  hosts with different sets of (hardware or software)
3187 #                  capabilities. If not provided, information is not available
3188 #                  and callers should not assume the CPU definition to be
3189 #                  migration-safe. (since 2.8)
3191 # @static: whether a CPU definition is static and will not change depending on
3192 #          QEMU version, machine type, machine options and accelerator options.
3193 #          A static model is always migration-safe. (since 2.8)
3195 # @unavailable-features: #optional List of properties that prevent
3196 #                        the CPU model from running in the current
3197 #                        host. (since 2.8)
3199 # @unavailable-features is a list of QOM property names that
3200 # represent CPU model attributes that prevent the CPU from running.
3201 # If the QOM property is read-only, that means there's no known
3202 # way to make the CPU model run in the current host. Implementations
3203 # that choose not to provide specific information return the
3204 # property name "type".
3205 # If the property is read-write, it means that it MAY be possible
3206 # to run the CPU model in the current host if that property is
3207 # changed. Management software can use it as hints to suggest or
3208 # choose an alternative for the user, or just to generate meaningful
3209 # error messages explaining why the CPU model can't be used.
3210 # If @unavailable-features is an empty list, the CPU model is
3211 # runnable using the current host and machine-type.
3212 # If @unavailable-features is not present, runnability
3213 # information for the CPU is not available.
3215 # Since: 1.2.0
3217 { 'struct': 'CpuDefinitionInfo',
3218   'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
3219             '*unavailable-features': [ 'str' ] } }
3222 # @query-cpu-definitions:
3224 # Return a list of supported virtual CPU definitions
3226 # Returns: a list of CpuDefInfo
3228 # Since: 1.2.0
3230 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3233 # @CpuModelInfo:
3235 # Virtual CPU model.
3237 # A CPU model consists of the name of a CPU definition, to which
3238 # delta changes are applied (e.g. features added/removed). Most magic values
3239 # that an architecture might require should be hidden behind the name.
3240 # However, if required, architectures can expose relevant properties.
3242 # @name: the name of the CPU definition the model is based on
3243 # @props: #optional a dictionary of QOM properties to be applied
3245 # Since: 2.8.0
3247 { 'struct': 'CpuModelInfo',
3248   'data': { 'name': 'str',
3249             '*props': 'any' } }
3252 # @CpuModelExpansionType
3254 # An enumeration of CPU model expansion types.
3256 # @static: Expand to a static CPU model, a combination of a static base
3257 #          model name and property delta changes. As the static base model will
3258 #          never change, the expanded CPU model will be the same, independant of
3259 #          independent of QEMU version, machine type, machine options, and
3260 #          accelerator options. Therefore, the resulting model can be used by
3261 #          tooling without having to specify a compatibility machine - e.g. when
3262 #          displaying the "host" model. static CPU models are migration-safe.
3264 # @full: Expand all properties. The produced model is not guaranteed to be
3265 #        migration-safe, but allows tooling to get an insight and work with
3266 #        model details.
3268 # Since: 2.8.0
3270 { 'enum': 'CpuModelExpansionType',
3271   'data': [ 'static', 'full' ] }
3275 # @CpuModelExpansionInfo
3277 # The result of a cpu model expansion.
3279 # @model: the expanded CpuModelInfo.
3281 # Since: 2.8.0
3283 { 'struct': 'CpuModelExpansionInfo',
3284   'data': { 'model': 'CpuModelInfo' } }
3288 # @query-cpu-model-expansion:
3290 # Expands a given CPU model (or a combination of CPU model + additional options)
3291 # to different granularities, allowing tooling to get an understanding what a
3292 # specific CPU model looks like in QEMU under a certain configuration.
3294 # This interface can be used to query the "host" CPU model.
3296 # The data returned by this command may be affected by:
3298 # * QEMU version: CPU models may look different depending on the QEMU version.
3299 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3300 # * machine-type: CPU model  may look different depending on the machine-type.
3301 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3302 # * machine options (including accelerator): in some architectures, CPU models
3303 #   may look different depending on machine and accelerator options. (Except for
3304 #   CPU models reported as "static" in query-cpu-definitions.)
3305 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3306 #   global properties may affect expansion of CPU models. Using
3307 #   query-cpu-model-expansion while using these is not advised.
3309 # Some architectures may not support all expansion types. s390x supports
3310 # "full" and "static".
3312 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
3313 #          not supported, if the model cannot be expanded, if the model contains
3314 #          an unknown CPU definition name, unknown properties or properties
3315 #          with a wrong type. Also returns an error if an expansion type is
3316 #          not supported.
3318 # Since: 2.8.0
3320 { 'command': 'query-cpu-model-expansion',
3321   'data': { 'type': 'CpuModelExpansionType',
3322             'model': 'CpuModelInfo' },
3323   'returns': 'CpuModelExpansionInfo' }
3326 # @CpuModelCompareResult:
3328 # An enumeration of CPU model comparation results. The result is usually
3329 # calculated using e.g. CPU features or CPU generations.
3331 # @incompatible: If model A is incompatible to model B, model A is not
3332 #                guaranteed to run where model B runs and the other way around.
3334 # @identical: If model A is identical to model B, model A is guaranteed to run
3335 #             where model B runs and the other way around.
3337 # @superset: If model A is a superset of model B, model B is guaranteed to run
3338 #            where model A runs. There are no guarantees about the other way.
3340 # @subset: If model A is a subset of model B, model A is guaranteed to run
3341 #          where model B runs. There are no guarantees about the other way.
3343 # Since: 2.8.0
3345 { 'enum': 'CpuModelCompareResult',
3346   'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
3349 # @CpuModelCompareInfo
3351 # The result of a CPU model comparison.
3353 # @result: The result of the compare operation.
3354 # @responsible-properties: List of properties that led to the comparison result
3355 #                          not being identical.
3357 # @responsible-properties is a list of QOM property names that led to
3358 # both CPUs not being detected as identical. For identical models, this
3359 # list is empty.
3360 # If a QOM property is read-only, that means there's no known way to make the
3361 # CPU models identical. If the special property name "type" is included, the
3362 # models are by definition not identical and cannot be made identical.
3364 # Since: 2.8.0
3366 { 'struct': 'CpuModelCompareInfo',
3367   'data': {'result': 'CpuModelCompareResult',
3368            'responsible-properties': ['str']
3369           }
3373 # @query-cpu-model-comparison:
3375 # Compares two CPU models, returning how they compare in a specific
3376 # configuration. The results indicates how both models compare regarding
3377 # runnability. This result can be used by tooling to make decisions if a
3378 # certain CPU model will run in a certain configuration or if a compatible
3379 # CPU model has to be created by baselining.
3381 # Usually, a CPU model is compared against the maximum possible CPU model
3382 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
3383 # model is identical or a subset, it will run in that configuration.
3385 # The result returned by this command may be affected by:
3387 # * QEMU version: CPU models may look different depending on the QEMU version.
3388 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3389 # * machine-type: CPU model may look different depending on the machine-type.
3390 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3391 # * machine options (including accelerator): in some architectures, CPU models
3392 #   may look different depending on machine and accelerator options. (Except for
3393 #   CPU models reported as "static" in query-cpu-definitions.)
3394 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3395 #   global properties may affect expansion of CPU models. Using
3396 #   query-cpu-model-expansion while using these is not advised.
3398 # Some architectures may not support comparing CPU models. s390x supports
3399 # comparing CPU models.
3401 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
3402 #          not supported, if a model cannot be used, if a model contains
3403 #          an unknown cpu definition name, unknown properties or properties
3404 #          with wrong types.
3406 # Since: 2.8.0
3408 { 'command': 'query-cpu-model-comparison',
3409   'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
3410   'returns': 'CpuModelCompareInfo' }
3413 # @CpuModelBaselineInfo
3415 # The result of a CPU model baseline.
3417 # @model: the baselined CpuModelInfo.
3419 # Since: 2.8.0
3421 { 'struct': 'CpuModelBaselineInfo',
3422   'data': { 'model': 'CpuModelInfo' } }
3425 # @query-cpu-model-baseline:
3427 # Baseline two CPU models, creating a compatible third model. The created
3428 # model will always be a static, migration-safe CPU model (see "static"
3429 # CPU model expansion for details).
3431 # This interface can be used by tooling to create a compatible CPU model out
3432 # two CPU models. The created CPU model will be identical to or a subset of
3433 # both CPU models when comparing them. Therefore, the created CPU model is
3434 # guaranteed to run where the given CPU models run.
3436 # The result returned by this command may be affected by:
3438 # * QEMU version: CPU models may look different depending on the QEMU version.
3439 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3440 # * machine-type: CPU model may look different depending on the machine-type.
3441 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3442 # * machine options (including accelerator): in some architectures, CPU models
3443 #   may look different depending on machine and accelerator options. (Except for
3444 #   CPU models reported as "static" in query-cpu-definitions.)
3445 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3446 #   global properties may affect expansion of CPU models. Using
3447 #   query-cpu-model-expansion while using these is not advised.
3449 # Some architectures may not support baselining CPU models. s390x supports
3450 # baselining CPU models.
3452 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
3453 #          not supported, if a model cannot be used, if a model contains
3454 #          an unknown cpu definition name, unknown properties or properties
3455 #          with wrong types.
3457 # Since: 2.8.0
3459 { 'command': 'query-cpu-model-baseline',
3460   'data': { 'modela': 'CpuModelInfo',
3461             'modelb': 'CpuModelInfo' },
3462   'returns': 'CpuModelBaselineInfo' }
3464 # @AddfdInfo:
3466 # Information about a file descriptor that was added to an fd set.
3468 # @fdset-id: The ID of the fd set that @fd was added to.
3470 # @fd: The file descriptor that was received via SCM rights and
3471 #      added to the fd set.
3473 # Since: 1.2.0
3475 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3478 # @add-fd:
3480 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3482 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3484 # @opaque: #optional A free-form string that can be used to describe the fd.
3486 # Returns: @AddfdInfo on success
3487 #          If file descriptor was not received, FdNotSupplied
3488 #          If @fdset-id is a negative value, InvalidParameterValue
3490 # Notes: The list of fd sets is shared by all monitor connections.
3492 #        If @fdset-id is not specified, a new fd set will be created.
3494 # Since: 1.2.0
3496 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3497   'returns': 'AddfdInfo' }
3500 # @remove-fd:
3502 # Remove a file descriptor from an fd set.
3504 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3506 # @fd: #optional The file descriptor that is to be removed.
3508 # Returns: Nothing on success
3509 #          If @fdset-id or @fd is not found, FdNotFound
3511 # Since: 1.2.0
3513 # Notes: The list of fd sets is shared by all monitor connections.
3515 #        If @fd is not specified, all file descriptors in @fdset-id
3516 #        will be removed.
3518 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3521 # @FdsetFdInfo:
3523 # Information about a file descriptor that belongs to an fd set.
3525 # @fd: The file descriptor value.
3527 # @opaque: #optional A free-form string that can be used to describe the fd.
3529 # Since: 1.2.0
3531 { 'struct': 'FdsetFdInfo',
3532   'data': {'fd': 'int', '*opaque': 'str'} }
3535 # @FdsetInfo:
3537 # Information about an fd set.
3539 # @fdset-id: The ID of the fd set.
3541 # @fds: A list of file descriptors that belong to this fd set.
3543 # Since: 1.2.0
3545 { 'struct': 'FdsetInfo',
3546   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3549 # @query-fdsets:
3551 # Return information describing all fd sets.
3553 # Returns: A list of @FdsetInfo
3555 # Since: 1.2.0
3557 # Note: The list of fd sets is shared by all monitor connections.
3560 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3563 # @TargetInfo:
3565 # Information describing the QEMU target.
3567 # @arch: the target architecture (eg "x86_64", "i386", etc)
3569 # Since: 1.2.0
3571 { 'struct': 'TargetInfo',
3572   'data': { 'arch': 'str' } }
3575 # @query-target:
3577 # Return information about the target for this QEMU
3579 # Returns: TargetInfo
3581 # Since: 1.2.0
3583 { 'command': 'query-target', 'returns': 'TargetInfo' }
3586 # @QKeyCode:
3588 # An enumeration of key name.
3590 # This is used by the send-key command.
3592 # Since: 1.3.0
3594 # 'unmapped' and 'pause' since 2.0
3595 # 'ro' and 'kp_comma' since 2.4
3596 # 'kp_equals' and 'power' since 2.6
3598 { 'enum': 'QKeyCode',
3599   'data': [ 'unmapped',
3600             'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3601             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3602             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3603             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3604             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3605             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3606             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3607             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3608             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3609             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3610             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3611             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3612             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3613             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3614             'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro',
3615             'kp_comma', 'kp_equals', 'power' ] }
3618 # @KeyValue
3620 # Represents a keyboard key.
3622 # Since: 1.3.0
3624 { 'union': 'KeyValue',
3625   'data': {
3626     'number': 'int',
3627     'qcode': 'QKeyCode' } }
3630 # @send-key:
3632 # Send keys to guest.
3634 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3635 #        simultaneously sent to the guest. A @KeyValue.number value is sent
3636 #        directly to the guest, while @KeyValue.qcode must be a valid
3637 #        @QKeyCode value
3639 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3640 #             to 100
3642 # Returns: Nothing on success
3643 #          If key is unknown or redundant, InvalidParameter
3645 # Since: 1.3.0
3648 { 'command': 'send-key',
3649   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3652 # @screendump:
3654 # Write a PPM of the VGA screen to a file.
3656 # @filename: the path of a new PPM file to store the image
3658 # Returns: Nothing on success
3660 # Since: 0.14.0
3662 { 'command': 'screendump', 'data': {'filename': 'str'} }
3666 # @ChardevCommon:
3668 # Configuration shared across all chardev backends
3670 # @logfile: #optional The name of a logfile to save output
3671 # @logappend: #optional true to append instead of truncate
3672 #             (default to false to truncate)
3674 # Since: 2.6
3676 { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
3677                                        '*logappend': 'bool' } }
3680 # @ChardevFile:
3682 # Configuration info for file chardevs.
3684 # @in:  #optional The name of the input file
3685 # @out: The name of the output file
3686 # @append: #optional Open the file in append mode (default false to
3687 #          truncate) (Since 2.6)
3689 # Since: 1.4
3691 { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
3692                                    'out' : 'str',
3693                                    '*append': 'bool' },
3694   'base': 'ChardevCommon' }
3697 # @ChardevHostdev:
3699 # Configuration info for device and pipe chardevs.
3701 # @device: The name of the special file for the device,
3702 #          i.e. /dev/ttyS0 on Unix or COM1: on Windows
3703 # @type: What kind of device this is.
3705 # Since: 1.4
3707 { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
3708   'base': 'ChardevCommon' }
3711 # @ChardevSocket:
3713 # Configuration info for (stream) socket chardevs.
3715 # @addr: socket address to listen on (server=true)
3716 #        or connect to (server=false)
3717 # @tls-creds: #optional the ID of the TLS credentials object (since 2.6)
3718 # @server: #optional create server socket (default: true)
3719 # @wait: #optional wait for incoming connection on server
3720 #        sockets (default: false).
3721 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3722 # @telnet: #optional enable telnet protocol on server
3723 #          sockets (default: false)
3724 # @reconnect: #optional For a client socket, if a socket is disconnected,
3725 #          then attempt a reconnect after the given number of seconds.
3726 #          Setting this to zero disables this function. (default: 0)
3727 #          (Since: 2.2)
3729 # Since: 1.4
3731 { 'struct': 'ChardevSocket', 'data': { 'addr'       : 'SocketAddress',
3732                                      '*tls-creds'  : 'str',
3733                                      '*server'    : 'bool',
3734                                      '*wait'      : 'bool',
3735                                      '*nodelay'   : 'bool',
3736                                      '*telnet'    : 'bool',
3737                                      '*reconnect' : 'int' },
3738   'base': 'ChardevCommon' }
3741 # @ChardevUdp:
3743 # Configuration info for datagram socket chardevs.
3745 # @remote: remote address
3746 # @local: #optional local address
3748 # Since: 1.5
3750 { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3751                                   '*local' : 'SocketAddress' },
3752   'base': 'ChardevCommon' }
3755 # @ChardevMux:
3757 # Configuration info for mux chardevs.
3759 # @chardev: name of the base chardev.
3761 # Since: 1.5
3763 { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
3764   'base': 'ChardevCommon' }
3767 # @ChardevStdio:
3769 # Configuration info for stdio chardevs.
3771 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3772 #          be delivered to qemu.  Default: true in -nographic mode,
3773 #          false otherwise.
3775 # Since: 1.5
3777 { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
3778   'base': 'ChardevCommon' }
3782 # @ChardevSpiceChannel:
3784 # Configuration info for spice vm channel chardevs.
3786 # @type: kind of channel (for example vdagent).
3788 # Since: 1.5
3790 { 'struct': 'ChardevSpiceChannel', 'data': { 'type'  : 'str' },
3791   'base': 'ChardevCommon' }
3794 # @ChardevSpicePort:
3796 # Configuration info for spice port chardevs.
3798 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3800 # Since: 1.5
3802 { 'struct': 'ChardevSpicePort', 'data': { 'fqdn'  : 'str' },
3803   'base': 'ChardevCommon' }
3806 # @ChardevVC:
3808 # Configuration info for virtual console chardevs.
3810 # @width:  console width,  in pixels
3811 # @height: console height, in pixels
3812 # @cols:   console width,  in chars
3813 # @rows:   console height, in chars
3815 # Since: 1.5
3817 { 'struct': 'ChardevVC', 'data': { '*width'  : 'int',
3818                                  '*height' : 'int',
3819                                  '*cols'   : 'int',
3820                                  '*rows'   : 'int' },
3821   'base': 'ChardevCommon' }
3824 # @ChardevRingbuf:
3826 # Configuration info for ring buffer chardevs.
3828 # @size: #optional ring buffer size, must be power of two, default is 65536
3830 # Since: 1.5
3832 { 'struct': 'ChardevRingbuf', 'data': { '*size'  : 'int' },
3833   'base': 'ChardevCommon' }
3836 # @ChardevBackend:
3838 # Configuration info for the new chardev backend.
3840 # Since: 1.4 (testdev since 2.2)
3842 { 'union': 'ChardevBackend', 'data': { 'file'   : 'ChardevFile',
3843                                        'serial' : 'ChardevHostdev',
3844                                        'parallel': 'ChardevHostdev',
3845                                        'pipe'   : 'ChardevHostdev',
3846                                        'socket' : 'ChardevSocket',
3847                                        'udp'    : 'ChardevUdp',
3848                                        'pty'    : 'ChardevCommon',
3849                                        'null'   : 'ChardevCommon',
3850                                        'mux'    : 'ChardevMux',
3851                                        'msmouse': 'ChardevCommon',
3852                                        'braille': 'ChardevCommon',
3853                                        'testdev': 'ChardevCommon',
3854                                        'stdio'  : 'ChardevStdio',
3855                                        'console': 'ChardevCommon',
3856                                        'spicevmc' : 'ChardevSpiceChannel',
3857                                        'spiceport' : 'ChardevSpicePort',
3858                                        'vc'     : 'ChardevVC',
3859                                        'ringbuf': 'ChardevRingbuf',
3860                                        # next one is just for compatibility
3861                                        'memory' : 'ChardevRingbuf' } }
3864 # @ChardevReturn:
3866 # Return info about the chardev backend just created.
3868 # @pty: #optional name of the slave pseudoterminal device, present if
3869 #       and only if a chardev of type 'pty' was created
3871 # Since: 1.4
3873 { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3876 # @chardev-add:
3878 # Add a character device backend
3880 # @id: the chardev's ID, must be unique
3881 # @backend: backend type and parameters
3883 # Returns: ChardevReturn.
3885 # Since: 1.4
3887 { 'command': 'chardev-add', 'data': {'id'      : 'str',
3888                                      'backend' : 'ChardevBackend' },
3889   'returns': 'ChardevReturn' }
3892 # @chardev-remove:
3894 # Remove a character device backend
3896 # @id: the chardev's ID, must exist and not be in use
3898 # Returns: Nothing on success
3900 # Since: 1.4
3902 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3905 # @TpmModel:
3907 # An enumeration of TPM models
3909 # @tpm-tis: TPM TIS model
3911 # Since: 1.5
3913 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3916 # @query-tpm-models:
3918 # Return a list of supported TPM models
3920 # Returns: a list of TpmModel
3922 # Since: 1.5
3924 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3927 # @TpmType:
3929 # An enumeration of TPM types
3931 # @passthrough: TPM passthrough type
3933 # Since: 1.5
3935 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3938 # @query-tpm-types:
3940 # Return a list of supported TPM types
3942 # Returns: a list of TpmType
3944 # Since: 1.5
3946 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3949 # @TPMPassthroughOptions:
3951 # Information about the TPM passthrough type
3953 # @path: #optional string describing the path used for accessing the TPM device
3955 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3956 #               for cancellation of TPM commands while they are executing
3958 # Since: 1.5
3960 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3961                                              '*cancel-path' : 'str'} }
3964 # @TpmTypeOptions:
3966 # A union referencing different TPM backend types' configuration options
3968 # @passthrough: The configuration options for the TPM passthrough type
3970 # Since: 1.5
3972 { 'union': 'TpmTypeOptions',
3973    'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3976 # @TpmInfo:
3978 # Information about the TPM
3980 # @id: The Id of the TPM
3982 # @model: The TPM frontend model
3984 # @options: The TPM (backend) type configuration options
3986 # Since: 1.5
3988 { 'struct': 'TPMInfo',
3989   'data': {'id': 'str',
3990            'model': 'TpmModel',
3991            'options': 'TpmTypeOptions' } }
3994 # @query-tpm:
3996 # Return information about the TPM device
3998 # Returns: @TPMInfo on success
4000 # Since: 1.5
4002 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
4005 # @AcpiTableOptions
4007 # Specify an ACPI table on the command line to load.
4009 # At most one of @file and @data can be specified. The list of files specified
4010 # by any one of them is loaded and concatenated in order. If both are omitted,
4011 # @data is implied.
4013 # Other fields / optargs can be used to override fields of the generic ACPI
4014 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
4015 # Description Table Header. If a header field is not overridden, then the
4016 # corresponding value from the concatenated blob is used (in case of @file), or
4017 # it is filled in with a hard-coded value (in case of @data).
4019 # String fields are copied into the matching ACPI member from lowest address
4020 # upwards, and silently truncated / NUL-padded to length.
4022 # @sig: #optional table signature / identifier (4 bytes)
4024 # @rev: #optional table revision number (dependent on signature, 1 byte)
4026 # @oem_id: #optional OEM identifier (6 bytes)
4028 # @oem_table_id: #optional OEM table identifier (8 bytes)
4030 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
4032 # @asl_compiler_id: #optional identifier of the utility that created the table
4033 #                   (4 bytes)
4035 # @asl_compiler_rev: #optional revision number of the utility that created the
4036 #                    table (4 bytes)
4038 # @file: #optional colon (:) separated list of pathnames to load and
4039 #        concatenate as table data. The resultant binary blob is expected to
4040 #        have an ACPI table header. At least one file is required. This field
4041 #        excludes @data.
4043 # @data: #optional colon (:) separated list of pathnames to load and
4044 #        concatenate as table data. The resultant binary blob must not have an
4045 #        ACPI table header. At least one file is required. This field excludes
4046 #        @file.
4048 # Since 1.5
4050 { 'struct': 'AcpiTableOptions',
4051   'data': {
4052     '*sig':               'str',
4053     '*rev':               'uint8',
4054     '*oem_id':            'str',
4055     '*oem_table_id':      'str',
4056     '*oem_rev':           'uint32',
4057     '*asl_compiler_id':   'str',
4058     '*asl_compiler_rev':  'uint32',
4059     '*file':              'str',
4060     '*data':              'str' }}
4063 # @CommandLineParameterType:
4065 # Possible types for an option parameter.
4067 # @string: accepts a character string
4069 # @boolean: accepts "on" or "off"
4071 # @number: accepts a number
4073 # @size: accepts a number followed by an optional suffix (K)ilo,
4074 #        (M)ega, (G)iga, (T)era
4076 # Since 1.5
4078 { 'enum': 'CommandLineParameterType',
4079   'data': ['string', 'boolean', 'number', 'size'] }
4082 # @CommandLineParameterInfo:
4084 # Details about a single parameter of a command line option.
4086 # @name: parameter name
4088 # @type: parameter @CommandLineParameterType
4090 # @help: #optional human readable text string, not suitable for parsing.
4092 # @default: #optional default value string (since 2.1)
4094 # Since 1.5
4096 { 'struct': 'CommandLineParameterInfo',
4097   'data': { 'name': 'str',
4098             'type': 'CommandLineParameterType',
4099             '*help': 'str',
4100             '*default': 'str' } }
4103 # @CommandLineOptionInfo:
4105 # Details about a command line option, including its list of parameter details
4107 # @option: option name
4109 # @parameters: an array of @CommandLineParameterInfo
4111 # Since 1.5
4113 { 'struct': 'CommandLineOptionInfo',
4114   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
4117 # @query-command-line-options:
4119 # Query command line option schema.
4121 # @option: #optional option name
4123 # Returns: list of @CommandLineOptionInfo for all options (or for the given
4124 #          @option).  Returns an error if the given @option doesn't exist.
4126 # Since 1.5
4128 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
4129  'returns': ['CommandLineOptionInfo'] }
4132 # @X86CPURegister32
4134 # A X86 32-bit register
4136 # Since: 1.5
4138 { 'enum': 'X86CPURegister32',
4139   'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4142 # @X86CPUFeatureWordInfo
4144 # Information about a X86 CPU feature word
4146 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4148 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
4149 #                   feature word
4151 # @cpuid-register: Output register containing the feature bits
4153 # @features: value of output register, containing the feature bits
4155 # Since: 1.5
4157 { 'struct': 'X86CPUFeatureWordInfo',
4158   'data': { 'cpuid-input-eax': 'int',
4159             '*cpuid-input-ecx': 'int',
4160             'cpuid-register': 'X86CPURegister32',
4161             'features': 'int' } }
4164 # @DummyForceArrays
4166 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
4168 # Since 2.5
4170 { 'struct': 'DummyForceArrays',
4171   'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
4175 # @RxState:
4177 # Packets receiving state
4179 # @normal: filter assigned packets according to the mac-table
4181 # @none: don't receive any assigned packet
4183 # @all: receive all assigned packets
4185 # Since: 1.6
4187 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
4190 # @RxFilterInfo:
4192 # Rx-filter information for a NIC.
4194 # @name: net client name
4196 # @promiscuous: whether promiscuous mode is enabled
4198 # @multicast: multicast receive state
4200 # @unicast: unicast receive state
4202 # @vlan: vlan receive state (Since 2.0)
4204 # @broadcast-allowed: whether to receive broadcast
4206 # @multicast-overflow: multicast table is overflowed or not
4208 # @unicast-overflow: unicast table is overflowed or not
4210 # @main-mac: the main macaddr string
4212 # @vlan-table: a list of active vlan id
4214 # @unicast-table: a list of unicast macaddr string
4216 # @multicast-table: a list of multicast macaddr string
4218 # Since 1.6
4220 { 'struct': 'RxFilterInfo',
4221   'data': {
4222     'name':               'str',
4223     'promiscuous':        'bool',
4224     'multicast':          'RxState',
4225     'unicast':            'RxState',
4226     'vlan':               'RxState',
4227     'broadcast-allowed':  'bool',
4228     'multicast-overflow': 'bool',
4229     'unicast-overflow':   'bool',
4230     'main-mac':           'str',
4231     'vlan-table':         ['int'],
4232     'unicast-table':      ['str'],
4233     'multicast-table':    ['str'] }}
4236 # @query-rx-filter:
4238 # Return rx-filter information for all NICs (or for the given NIC).
4240 # @name: #optional net client name
4242 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4243 #          Returns an error if the given @name doesn't exist, or given
4244 #          NIC doesn't support rx-filter querying, or given net client
4245 #          isn't a NIC.
4247 # Since: 1.6
4249 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4250   'returns': ['RxFilterInfo'] }
4253 # @InputButton
4255 # Button of a pointer input device (mouse, tablet).
4257 # Since: 2.0
4259 { 'enum'  : 'InputButton',
4260   'data'  : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down' ] }
4263 # @InputAxis
4265 # Position axis of a pointer input device (mouse, tablet).
4267 # Since: 2.0
4269 { 'enum'  : 'InputAxis',
4270   'data'  : [ 'x', 'y' ] }
4273 # @InputKeyEvent
4275 # Keyboard input event.
4277 # @key:    Which key this event is for.
4278 # @down:   True for key-down and false for key-up events.
4280 # Since: 2.0
4282 { 'struct'  : 'InputKeyEvent',
4283   'data'  : { 'key'     : 'KeyValue',
4284               'down'    : 'bool' } }
4287 # @InputBtnEvent
4289 # Pointer button input event.
4291 # @button: Which button this event is for.
4292 # @down:   True for key-down and false for key-up events.
4294 # Since: 2.0
4296 { 'struct'  : 'InputBtnEvent',
4297   'data'  : { 'button'  : 'InputButton',
4298               'down'    : 'bool' } }
4301 # @InputMoveEvent
4303 # Pointer motion input event.
4305 # @axis:   Which axis is referenced by @value.
4306 # @value:  Pointer position.  For absolute coordinates the
4307 #          valid range is 0 -> 0x7ffff
4309 # Since: 2.0
4311 { 'struct'  : 'InputMoveEvent',
4312   'data'  : { 'axis'    : 'InputAxis',
4313               'value'   : 'int' } }
4316 # @InputEvent
4318 # Input event union.
4320 # @key: Input event of Keyboard
4321 # @btn: Input event of pointer buttons
4322 # @rel: Input event of relative pointer motion
4323 # @abs: Input event of absolute pointer motion
4325 # Since: 2.0
4327 { 'union' : 'InputEvent',
4328   'data'  : { 'key'     : 'InputKeyEvent',
4329               'btn'     : 'InputBtnEvent',
4330               'rel'     : 'InputMoveEvent',
4331               'abs'     : 'InputMoveEvent' } }
4334 # @input-send-event
4336 # Send input event(s) to guest.
4338 # @device: #optional display device to send event(s) to.
4339 # @head: #optional head to send event(s) to, in case the
4340 #        display device supports multiple scanouts.
4341 # @events: List of InputEvent union.
4343 # Returns: Nothing on success.
4345 # The @display and @head parameters can be used to send the input
4346 # event to specific input devices in case (a) multiple input devices
4347 # of the same kind are added to the virtual machine and (b) you have
4348 # configured input routing (see docs/multiseat.txt) for those input
4349 # devices.  The parameters work exactly like the device and head
4350 # properties of input devices.  If @device is missing, only devices
4351 # that have no input routing config are admissible.  If @device is
4352 # specified, both input devices with and without input routing config
4353 # are admissible, but devices with input routing config take
4354 # precedence.
4356 # Since: 2.6
4358 { 'command': 'input-send-event',
4359   'data': { '*device': 'str',
4360             '*head'  : 'int',
4361             'events' : [ 'InputEvent' ] } }
4364 # @NumaOptions
4366 # A discriminated record of NUMA options. (for OptsVisitor)
4368 # Since 2.1
4370 { 'union': 'NumaOptions',
4371   'data': {
4372     'node': 'NumaNodeOptions' }}
4375 # @NumaNodeOptions
4377 # Create a guest NUMA node. (for OptsVisitor)
4379 # @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
4381 # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
4382 #         if omitted)
4384 # @mem: #optional memory size of this node; mutually exclusive with @memdev.
4385 #       Equally divide total memory among nodes if both @mem and @memdev are
4386 #       omitted.
4388 # @memdev: #optional memory backend object.  If specified for one node,
4389 #          it must be specified for all nodes.
4391 # Since: 2.1
4393 { 'struct': 'NumaNodeOptions',
4394   'data': {
4395    '*nodeid': 'uint16',
4396    '*cpus':   ['uint16'],
4397    '*mem':    'size',
4398    '*memdev': 'str' }}
4401 # @HostMemPolicy
4403 # Host memory policy types
4405 # @default: restore default policy, remove any nondefault policy
4407 # @preferred: set the preferred host nodes for allocation
4409 # @bind: a strict policy that restricts memory allocation to the
4410 #        host nodes specified
4412 # @interleave: memory allocations are interleaved across the set
4413 #              of host nodes specified
4415 # Since 2.1
4417 { 'enum': 'HostMemPolicy',
4418   'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
4421 # @Memdev:
4423 # Information about memory backend
4425 # @size: memory backend size
4427 # @merge: enables or disables memory merge support
4429 # @dump: includes memory backend's memory in a core dump or not
4431 # @prealloc: enables or disables memory preallocation
4433 # @host-nodes: host nodes for its memory policy
4435 # @policy: memory policy of memory backend
4437 # Since: 2.1
4439 { 'struct': 'Memdev',
4440   'data': {
4441     'size':       'size',
4442     'merge':      'bool',
4443     'dump':       'bool',
4444     'prealloc':   'bool',
4445     'host-nodes': ['uint16'],
4446     'policy':     'HostMemPolicy' }}
4449 # @query-memdev:
4451 # Returns information for all memory backends.
4453 # Returns: a list of @Memdev.
4455 # Since: 2.1
4457 { 'command': 'query-memdev', 'returns': ['Memdev'] }
4460 # @PCDIMMDeviceInfo:
4462 # PCDIMMDevice state information
4464 # @id: #optional device's ID
4466 # @addr: physical address, where device is mapped
4468 # @size: size of memory that the device provides
4470 # @slot: slot number at which device is plugged in
4472 # @node: NUMA node number where device is plugged in
4474 # @memdev: memory backend linked with device
4476 # @hotplugged: true if device was hotplugged
4478 # @hotpluggable: true if device if could be added/removed while machine is running
4480 # Since: 2.1
4482 { 'struct': 'PCDIMMDeviceInfo',
4483   'data': { '*id': 'str',
4484             'addr': 'int',
4485             'size': 'int',
4486             'slot': 'int',
4487             'node': 'int',
4488             'memdev': 'str',
4489             'hotplugged': 'bool',
4490             'hotpluggable': 'bool'
4491           }
4495 # @MemoryDeviceInfo:
4497 # Union containing information about a memory device
4499 # Since: 2.1
4501 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
4504 # @query-memory-devices
4506 # Lists available memory devices and their state
4508 # Since: 2.1
4510 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
4512 ## @ACPISlotType
4514 # @DIMM: memory slot
4515 # @CPU: logical CPU slot (since 2.7)
4517 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
4519 ## @ACPIOSTInfo
4521 # OSPM Status Indication for a device
4522 # For description of possible values of @source and @status fields
4523 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
4525 # @device: #optional device ID associated with slot
4527 # @slot: slot ID, unique per slot of a given @slot-type
4529 # @slot-type: type of the slot
4531 # @source: an integer containing the source event
4533 # @status: an integer containing the status code
4535 # Since: 2.1
4537 { 'struct': 'ACPIOSTInfo',
4538   'data'  : { '*device': 'str',
4539               'slot': 'str',
4540               'slot-type': 'ACPISlotType',
4541               'source': 'int',
4542               'status': 'int' } }
4545 # @query-acpi-ospm-status
4547 # Lists ACPI OSPM status of ACPI device objects,
4548 # which might be reported via _OST method
4550 # Since: 2.1
4552 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
4555 # @WatchdogExpirationAction
4557 # An enumeration of the actions taken when the watchdog device's timer is
4558 # expired
4560 # @reset: system resets
4562 # @shutdown: system shutdown, note that it is similar to @powerdown, which
4563 #            tries to set to system status and notify guest
4565 # @poweroff: system poweroff, the emulator program exits
4567 # @pause: system pauses, similar to @stop
4569 # @debug: system enters debug state
4571 # @none: nothing is done
4573 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
4574 #              VCPUS on x86) (since 2.4)
4576 # Since: 2.1
4578 { 'enum': 'WatchdogExpirationAction',
4579   'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
4580             'inject-nmi' ] }
4583 # @IoOperationType
4585 # An enumeration of the I/O operation types
4587 # @read: read operation
4589 # @write: write operation
4591 # Since: 2.1
4593 { 'enum': 'IoOperationType',
4594   'data': [ 'read', 'write' ] }
4597 # @GuestPanicAction
4599 # An enumeration of the actions taken when guest OS panic is detected
4601 # @pause: system pauses
4603 # Since: 2.1
4605 { 'enum': 'GuestPanicAction',
4606   'data': [ 'pause' ] }
4609 # @rtc-reset-reinjection
4611 # This command will reset the RTC interrupt reinjection backlog.
4612 # Can be used if another mechanism to synchronize guest time
4613 # is in effect, for example QEMU guest agent's guest-set-time
4614 # command.
4616 # Since: 2.1
4618 { 'command': 'rtc-reset-reinjection' }
4620 # Rocker ethernet network switch
4621 { 'include': 'qapi/rocker.json' }
4624 # ReplayMode:
4626 # Mode of the replay subsystem.
4628 # @none: normal execution mode. Replay or record are not enabled.
4630 # @record: record mode. All non-deterministic data is written into the
4631 #          replay log.
4633 # @play: replay mode. Non-deterministic data required for system execution
4634 #        is read from the log.
4636 # Since: 2.5
4638 { 'enum': 'ReplayMode',
4639   'data': [ 'none', 'record', 'play' ] }
4642 # @xen-load-devices-state:
4644 # Load the state of all devices from file. The RAM and the block devices
4645 # of the VM are not loaded by this command.
4647 # @filename: the file to load the state of the devices from as binary
4648 # data. See xen-save-devices-state.txt for a description of the binary
4649 # format.
4651 # Since: 2.7
4653 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
4656 # @GICCapability:
4658 # The struct describes capability for a specific GIC (Generic
4659 # Interrupt Controller) version. These bits are not only decided by
4660 # QEMU/KVM software version, but also decided by the hardware that
4661 # the program is running upon.
4663 # @version:  version of GIC to be described. Currently, only 2 and 3
4664 #            are supported.
4666 # @emulated: whether current QEMU/hardware supports emulated GIC
4667 #            device in user space.
4669 # @kernel:   whether current QEMU/hardware supports hardware
4670 #            accelerated GIC device in kernel.
4672 # Since: 2.6
4674 { 'struct': 'GICCapability',
4675   'data': { 'version': 'int',
4676             'emulated': 'bool',
4677             'kernel': 'bool' } }
4680 # @query-gic-capabilities:
4682 # This command is ARM-only. It will return a list of GICCapability
4683 # objects that describe its capability bits.
4685 # Returns: a list of GICCapability objects.
4687 # Since: 2.6
4689 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
4692 # CpuInstanceProperties
4694 # List of properties to be used for hotplugging a CPU instance,
4695 # it should be passed by management with device_add command when
4696 # a CPU is being hotplugged.
4698 # Note: currently there are 4 properties that could be present
4699 # but management should be prepared to pass through other
4700 # properties with device_add command to allow for future
4701 # interface extension. This also requires the filed names to be kept in
4702 # sync with the properties passed to -device/device_add.
4704 # @node-id: #optional NUMA node ID the CPU belongs to
4705 # @socket-id: #optional socket number within node/board the CPU belongs to
4706 # @core-id: #optional core number within socket the CPU belongs to
4707 # @thread-id: #optional thread number within core the CPU belongs to
4709 # Since: 2.7
4711 { 'struct': 'CpuInstanceProperties',
4712   'data': { '*node-id': 'int',
4713             '*socket-id': 'int',
4714             '*core-id': 'int',
4715             '*thread-id': 'int'
4716   }
4720 # @HotpluggableCPU
4722 # @type: CPU object type for usage with device_add command
4723 # @props: list of properties to be used for hotplugging CPU
4724 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
4725 # @qom-path: #optional link to existing CPU object if CPU is present or
4726 #            omitted if CPU is not present.
4728 # Since: 2.7
4730 { 'struct': 'HotpluggableCPU',
4731   'data': { 'type': 'str',
4732             'vcpus-count': 'int',
4733             'props': 'CpuInstanceProperties',
4734             '*qom-path': 'str'
4735           }
4739 # @query-hotpluggable-cpus
4741 # Returns: a list of HotpluggableCPU objects.
4743 # Since: 2.7
4745 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }