stellaris: Removed SSI mux
[qemu-kvm.git] / qapi-schema.json
blobf9dbdae6993e4662681d22086ae87d7e89aa5b44
1 # -*- Mode: Python -*-
3 # QAPI Schema
5 ##
6 # @ErrorClass
8 # QEMU error classes
10 # @GenericError: this is used for errors that don't require a specific error
11 #                class. This should be the default case for most errors
13 # @CommandNotFound: the requested command has not been found
15 # @DeviceEncrypted: the requested operation can't be fulfilled because the
16 #                   selected device is encrypted
18 # @DeviceNotActive: a device has failed to be become active
20 # @DeviceNotFound: the requested device has not been found
22 # @KVMMissingCap: the requested operation can't be fulfilled because a
23 #                 required KVM capability is missing
25 # @MigrationExpected: the requested operation can't be fulfilled because a
26 #                     migration process is expected
28 # Since: 1.2
30 { 'enum': 'ErrorClass',
31   'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
32             'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap',
33             'MigrationExpected' ] }
36 # @add_client
38 # Allow client connections for VNC, Spice and socket based
39 # character devices to be passed in to QEMU via SCM_RIGHTS.
41 # @protocol: protocol name. Valid names are "vnc", "spice" or the
42 #            name of a character device (eg. from -chardev id=XXXX)
44 # @fdname: file descriptor name previously passed via 'getfd' command
46 # @skipauth: #optional whether to skip authentication. Only applies
47 #            to "vnc" and "spice" protocols
49 # @tls: #optional whether to perform TLS. Only applies to the "spice"
50 #       protocol
52 # Returns: nothing on success.
54 # Since: 0.14.0
56 { 'command': 'add_client',
57   'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
58             '*tls': 'bool' } }
61 # @NameInfo:
63 # Guest name information.
65 # @name: #optional The name of the guest
67 # Since 0.14.0
69 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
72 # @query-name:
74 # Return the name information of a guest.
76 # Returns: @NameInfo of the guest
78 # Since 0.14.0
80 { 'command': 'query-name', 'returns': 'NameInfo' }
83 # @VersionInfo:
85 # A description of QEMU's version.
87 # @qemu.major:  The major version of QEMU
89 # @qemu.minor:  The minor version of QEMU
91 # @qemu.micro:  The micro version of QEMU.  By current convention, a micro
92 #               version of 50 signifies a development branch.  A micro version
93 #               greater than or equal to 90 signifies a release candidate for
94 #               the next minor version.  A micro version of less than 50
95 #               signifies a stable release.
97 # @package:     QEMU will always set this field to an empty string.  Downstream
98 #               versions of QEMU should set this to a non-empty string.  The
99 #               exact format depends on the downstream however it highly
100 #               recommended that a unique name is used.
102 # Since: 0.14.0
104 { 'type': 'VersionInfo',
105   'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
106            'package': 'str'} }
109 # @query-version:
111 # Returns the current version of QEMU.
113 # Returns:  A @VersionInfo object describing the current version of QEMU.
115 # Since: 0.14.0
117 { 'command': 'query-version', 'returns': 'VersionInfo' }
120 # @KvmInfo:
122 # Information about support for KVM acceleration
124 # @enabled: true if KVM acceleration is active
126 # @present: true if KVM acceleration is built into this executable
128 # Since: 0.14.0
130 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
133 # @query-kvm:
135 # Returns information about KVM acceleration
137 # Returns: @KvmInfo
139 # Since: 0.14.0
141 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
144 # @RunState
146 # An enumeration of VM run states.
148 # @debug: QEMU is running on a debugger
150 # @finish-migrate: guest is paused to finish the migration process
152 # @inmigrate: guest is paused waiting for an incoming migration
154 # @internal-error: An internal error that prevents further guest execution
155 # has occurred
157 # @io-error: the last IOP has failed and the device is configured to pause
158 # on I/O errors
160 # @paused: guest has been paused via the 'stop' command
162 # @postmigrate: guest is paused following a successful 'migrate'
164 # @prelaunch: QEMU was started with -S and guest has not started
166 # @restore-vm: guest is paused to restore VM state
168 # @running: guest is actively running
170 # @save-vm: guest is paused to save the VM state
172 # @shutdown: guest is shut down (and -no-shutdown is in use)
174 # @suspended: guest is suspended (ACPI S3)
176 # @watchdog: the watchdog action is configured to pause and has been triggered
178 { 'enum': 'RunState',
179   'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
180             'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
181             'running', 'save-vm', 'shutdown', 'suspended', 'watchdog' ] }
184 # @SnapshotInfo
186 # @id: unique snapshot id
188 # @name: user chosen name
190 # @vm-state-size: size of the VM state
192 # @date-sec: UTC date of the snapshot in seconds
194 # @date-nsec: fractional part in nano seconds to be used with date-sec
196 # @vm-clock-sec: VM clock relative to boot in seconds
198 # @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec
200 # Since: 1.3
204 { 'type': 'SnapshotInfo',
205   'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
206             'date-sec': 'int', 'date-nsec': 'int',
207             'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } }
210 # @ImageInfo:
212 # Information about a QEMU image file
214 # @filename: name of the image file
216 # @format: format of the image file
218 # @virtual-size: maximum capacity in bytes of the image
220 # @actual-size: #optional actual size on disk in bytes of the image
222 # @dirty-flag: #optional true if image is not cleanly closed
224 # @cluster-size: #optional size of a cluster in bytes
226 # @encrypted: #optional true if the image is encrypted
228 # @backing-filename: #optional name of the backing file
230 # @full-backing-filename: #optional full path of the backing file
232 # @backing-filename-format: #optional the format of the backing file
234 # @snapshots: #optional list of VM snapshots
236 # Since: 1.3
240 { 'type': 'ImageInfo',
241   'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
242            '*actual-size': 'int', 'virtual-size': 'int',
243            '*cluster-size': 'int', '*encrypted': 'bool',
244            '*backing-filename': 'str', '*full-backing-filename': 'str',
245            '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'] } }
248 # @StatusInfo:
250 # Information about VCPU run state
252 # @running: true if all VCPUs are runnable, false if not runnable
254 # @singlestep: true if VCPUs are in single-step mode
256 # @status: the virtual machine @RunState
258 # Since:  0.14.0
260 # Notes: @singlestep is enabled through the GDB stub
262 { 'type': 'StatusInfo',
263   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
266 # @query-status:
268 # Query the run status of all VCPUs
270 # Returns: @StatusInfo reflecting all VCPUs
272 # Since:  0.14.0
274 { 'command': 'query-status', 'returns': 'StatusInfo' }
277 # @UuidInfo:
279 # Guest UUID information.
281 # @UUID: the UUID of the guest
283 # Since: 0.14.0
285 # Notes: If no UUID was specified for the guest, a null UUID is returned.
287 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
290 # @query-uuid:
292 # Query the guest UUID information.
294 # Returns: The @UuidInfo for the guest
296 # Since 0.14.0
298 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
301 # @ChardevInfo:
303 # Information about a character device.
305 # @label: the label of the character device
307 # @filename: the filename of the character device
309 # Notes: @filename is encoded using the QEMU command line character device
310 #        encoding.  See the QEMU man page for details.
312 # Since: 0.14.0
314 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
317 # @query-chardev:
319 # Returns information about current character devices.
321 # Returns: a list of @ChardevInfo
323 # Since: 0.14.0
325 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
328 # @CommandInfo:
330 # Information about a QMP command
332 # @name: The command name
334 # Since: 0.14.0
336 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
339 # @query-commands:
341 # Return a list of supported QMP commands by this server
343 # Returns: A list of @CommandInfo for all supported commands
345 # Since: 0.14.0
347 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
350 # @EventInfo:
352 # Information about a QMP event
354 # @name: The event name
356 # Since: 1.2.0
358 { 'type': 'EventInfo', 'data': {'name': 'str'} }
361 # @query-events:
363 # Return a list of supported QMP events by this server
365 # Returns: A list of @EventInfo for all supported events
367 # Since: 1.2.0
369 { 'command': 'query-events', 'returns': ['EventInfo'] }
372 # @MigrationStats
374 # Detailed migration status.
376 # @transferred: amount of bytes already transferred to the target VM
378 # @remaining: amount of bytes remaining to be transferred to the target VM
380 # @total: total amount of bytes involved in the migration process
382 # @duplicate: number of duplicate pages (since 1.2)
384 # @normal : number of normal pages (since 1.2)
386 # @normal-bytes : number of normal bytes sent (since 1.2)
388 # Since: 0.14.0
390 { 'type': 'MigrationStats',
391   'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
392            'duplicate': 'int', 'normal': 'int', 'normal-bytes': 'int' } }
395 # @XBZRLECacheStats
397 # Detailed XBZRLE migration cache statistics
399 # @cache-size: XBZRLE cache size
401 # @bytes: amount of bytes already transferred to the target VM
403 # @pages: amount of pages transferred to the target VM
405 # @cache-miss: number of cache miss
407 # @overflow: number of overflows
409 # Since: 1.2
411 { 'type': 'XBZRLECacheStats',
412   'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
413            'cache-miss': 'int', 'overflow': 'int' } }
416 # @MigrationInfo
418 # Information about current migration process.
420 # @status: #optional string describing the current migration status.
421 #          As of 0.14.0 this can be 'active', 'completed', 'failed' or
422 #          'cancelled'. If this field is not returned, no migration process
423 #          has been initiated
425 # @ram: #optional @MigrationStats containing detailed migration
426 #       status, only returned if status is 'active' or
427 #       'completed'. 'comppleted' (since 1.2)
429 # @disk: #optional @MigrationStats containing detailed disk migration
430 #        status, only returned if status is 'active' and it is a block
431 #        migration
433 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
434 #                migration statistics, only returned if XBZRLE feature is on and
435 #                status is 'active' or 'completed' (since 1.2)
437 # @total-time: #optional total amount of milliseconds since migration started.
438 #        If migration has ended, it returns the total migration
439 #        time. (since 1.2)
441 # Since: 0.14.0
443 { 'type': 'MigrationInfo',
444   'data': {'*status': 'str', '*ram': 'MigrationStats',
445            '*disk': 'MigrationStats',
446            '*xbzrle-cache': 'XBZRLECacheStats',
447            '*total-time': 'int'} }
450 # @query-migrate
452 # Returns information about current migration process.
454 # Returns: @MigrationInfo
456 # Since: 0.14.0
458 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
461 # @MigrationCapability
463 # Migration capabilities enumeration
465 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
466 #          This feature allows us to minimize migration traffic for certain work
467 #          loads, by sending compressed difference of the pages
469 # Since: 1.2
471 { 'enum': 'MigrationCapability',
472   'data': ['xbzrle'] }
475 # @MigrationCapabilityStatus
477 # Migration capability information
479 # @capability: capability enum
481 # @state: capability state bool
483 # Since: 1.2
485 { 'type': 'MigrationCapabilityStatus',
486   'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
489 # @migrate-set-capabilities
491 # Enable/Disable the following migration capabilities (like xbzrle)
493 # @capabilities: json array of capability modifications to make
495 # Since: 1.2
497 { 'command': 'migrate-set-capabilities',
498   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
501 # @query-migrate-capabilities
503 # Returns information about the current migration capabilities status
505 # Returns: @MigrationCapabilitiesStatus
507 # Since: 1.2
509 { 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}
512 # @MouseInfo:
514 # Information about a mouse device.
516 # @name: the name of the mouse device
518 # @index: the index of the mouse device
520 # @current: true if this device is currently receiving mouse events
522 # @absolute: true if this device supports absolute coordinates as input
524 # Since: 0.14.0
526 { 'type': 'MouseInfo',
527   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
528            'absolute': 'bool'} }
531 # @query-mice:
533 # Returns information about each active mouse device
535 # Returns: a list of @MouseInfo for each device
537 # Since: 0.14.0
539 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
542 # @CpuInfo:
544 # Information about a virtual CPU
546 # @CPU: the index of the virtual CPU
548 # @current: this only exists for backwards compatible and should be ignored
550 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
551 #          to a processor specific low power mode.
553 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
554 #                pointer.
555 #                If the target is Sparc, this is the PC component of the
556 #                instruction pointer.
558 # @nip: #optional If the target is PPC, the instruction pointer
560 # @npc: #optional If the target is Sparc, the NPC component of the instruction
561 #                 pointer
563 # @PC: #optional If the target is MIPS, the instruction pointer
565 # @thread_id: ID of the underlying host thread
567 # Since: 0.14.0
569 # Notes: @halted is a transient state that changes frequently.  By the time the
570 #        data is sent to the client, the guest may no longer be halted.
572 { 'type': 'CpuInfo',
573   'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
574            '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
577 # @query-cpus:
579 # Returns a list of information about each virtual CPU.
581 # Returns: a list of @CpuInfo for each virtual CPU
583 # Since: 0.14.0
585 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
588 # @BlockDeviceInfo:
590 # Information about the backing device for a block device.
592 # @file: the filename of the backing device
594 # @ro: true if the backing device was open read-only
596 # @drv: the name of the block format used to open the backing device. As of
597 #       0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
598 #       'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
599 #       'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
600 #       'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
602 # @backing_file: #optional the name of the backing file (for copy-on-write)
604 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
606 # @encrypted: true if the backing device is encrypted
608 # @encryption_key_missing: true if the backing device is encrypted but an
609 #                          valid encryption key is missing
611 # @bps: total throughput limit in bytes per second is specified
613 # @bps_rd: read throughput limit in bytes per second is specified
615 # @bps_wr: write throughput limit in bytes per second is specified
617 # @iops: total I/O operations per second is specified
619 # @iops_rd: read I/O operations per second is specified
621 # @iops_wr: write I/O operations per second is specified
623 # Since: 0.14.0
625 # Notes: This interface is only found in @BlockInfo.
627 { 'type': 'BlockDeviceInfo',
628   'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
629             '*backing_file': 'str', 'backing_file_depth': 'int',
630             'encrypted': 'bool', 'encryption_key_missing': 'bool',
631             'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
632             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} }
635 # @BlockDeviceIoStatus:
637 # An enumeration of block device I/O status.
639 # @ok: The last I/O operation has succeeded
641 # @failed: The last I/O operation has failed
643 # @nospace: The last I/O operation has failed due to a no-space condition
645 # Since: 1.0
647 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
650 # @BlockInfo:
652 # Block device information.  This structure describes a virtual device and
653 # the backing device associated with it.
655 # @device: The device name associated with the virtual device.
657 # @type: This field is returned only for compatibility reasons, it should
658 #        not be used (always returns 'unknown')
660 # @removable: True if the device supports removable media.
662 # @locked: True if the guest has locked this device from having its media
663 #          removed
665 # @tray_open: #optional True if the device has a tray and it is open
666 #             (only present if removable is true)
668 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
669 #             supports it and the VM is configured to stop on errors
671 # @inserted: #optional @BlockDeviceInfo describing the device if media is
672 #            present
674 # Since:  0.14.0
676 { 'type': 'BlockInfo',
677   'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
678            'locked': 'bool', '*inserted': 'BlockDeviceInfo',
679            '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} }
682 # @query-block:
684 # Get a list of BlockInfo for all virtual block devices.
686 # Returns: a list of @BlockInfo describing each virtual block device
688 # Since: 0.14.0
690 { 'command': 'query-block', 'returns': ['BlockInfo'] }
693 # @BlockDeviceStats:
695 # Statistics of a virtual block device or a block backing device.
697 # @rd_bytes:      The number of bytes read by the device.
699 # @wr_bytes:      The number of bytes written by the device.
701 # @rd_operations: The number of read operations performed by the device.
703 # @wr_operations: The number of write operations performed by the device.
705 # @flush_operations: The number of cache flush operations performed by the
706 #                    device (since 0.15.0)
708 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
709 #                       (since 0.15.0).
711 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
713 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
715 # @wr_highest_offset: The offset after the greatest byte written to the
716 #                     device.  The intended use of this information is for
717 #                     growable sparse files (like qcow2) that are used on top
718 #                     of a physical device.
720 # Since: 0.14.0
722 { 'type': 'BlockDeviceStats',
723   'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
724            'wr_operations': 'int', 'flush_operations': 'int',
725            'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
726            'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
729 # @BlockStats:
731 # Statistics of a virtual block device or a block backing device.
733 # @device: #optional If the stats are for a virtual block device, the name
734 #          corresponding to the virtual block device.
736 # @stats:  A @BlockDeviceStats for the device.
738 # @parent: #optional This may point to the backing block device if this is a
739 #          a virtual block device.  If it's a backing block, this will point
740 #          to the backing file is one is present.
742 # Since: 0.14.0
744 { 'type': 'BlockStats',
745   'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
746            '*parent': 'BlockStats'} }
749 # @query-blockstats:
751 # Query the @BlockStats for all virtual block devices.
753 # Returns: A list of @BlockStats for each virtual block devices.
755 # Since: 0.14.0
757 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
760 # @VncClientInfo:
762 # Information about a connected VNC client.
764 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
765 #        when possible.
767 # @family: 'ipv6' if the client is connected via IPv6 and TCP
768 #          'ipv4' if the client is connected via IPv4 and TCP
769 #          'unix' if the client is connected via a unix domain socket
770 #          'unknown' otherwise
772 # @service: The service name of the client's port.  This may depends on the
773 #           host system's service database so symbolic names should not be
774 #           relied on.
776 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
777 #              Name of the client.
779 # @sasl_username: #optional If SASL authentication is in use, the SASL username
780 #                 used for authentication.
782 # Since: 0.14.0
784 { 'type': 'VncClientInfo',
785   'data': {'host': 'str', 'family': 'str', 'service': 'str',
786            '*x509_dname': 'str', '*sasl_username': 'str'} }
789 # @VncInfo:
791 # Information about the VNC session.
793 # @enabled: true if the VNC server is enabled, false otherwise
795 # @host: #optional The hostname the VNC server is bound to.  This depends on
796 #        the name resolution on the host and may be an IP address.
798 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
799 #                    'ipv4' if the host is listening for IPv4 connections
800 #                    'unix' if the host is listening on a unix domain socket
801 #                    'unknown' otherwise
803 # @service: #optional The service name of the server's port.  This may depends
804 #           on the host system's service database so symbolic names should not
805 #           be relied on.
807 # @auth: #optional the current authentication type used by the server
808 #        'none' if no authentication is being used
809 #        'vnc' if VNC authentication is being used
810 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
811 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
812 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
813 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
814 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
815 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
816 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
817 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
818 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
820 # @clients: a list of @VncClientInfo of all currently connected clients
822 # Since: 0.14.0
824 { 'type': 'VncInfo',
825   'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
826            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
829 # @query-vnc:
831 # Returns information about the current VNC server
833 # Returns: @VncInfo
835 # Since: 0.14.0
837 { 'command': 'query-vnc', 'returns': 'VncInfo' }
840 # @SpiceChannel
842 # Information about a SPICE client channel.
844 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
845 #        when possible.
847 # @family: 'ipv6' if the client is connected via IPv6 and TCP
848 #          'ipv4' if the client is connected via IPv4 and TCP
849 #          'unix' if the client is connected via a unix domain socket
850 #          'unknown' otherwise
852 # @port: The client's port number.
854 # @connection-id: SPICE connection id number.  All channels with the same id
855 #                 belong to the same SPICE session.
857 # @connection-type: SPICE channel type number.  "1" is the main control
858 #                   channel, filter for this one if you want to track spice
859 #                   sessions only
861 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
862 #              multiple channels of the same type exist, such as multiple
863 #              display channels in a multihead setup
865 # @tls: true if the channel is encrypted, false otherwise.
867 # Since: 0.14.0
869 { 'type': 'SpiceChannel',
870   'data': {'host': 'str', 'family': 'str', 'port': 'str',
871            'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
872            'tls': 'bool'} }
875 # @SpiceQueryMouseMode
877 # An enumeration of Spice mouse states.
879 # @client: Mouse cursor position is determined by the client.
881 # @server: Mouse cursor position is determined by the server.
883 # @unknown: No information is available about mouse mode used by
884 #           the spice server.
886 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
888 # Since: 1.1
890 { 'enum': 'SpiceQueryMouseMode',
891   'data': [ 'client', 'server', 'unknown' ] }
894 # @SpiceInfo
896 # Information about the SPICE session.
898 # @enabled: true if the SPICE server is enabled, false otherwise
900 # @migrated: true if the last guest migration completed and spice
901 #            migration had completed as well. false otherwise.
903 # @host: #optional The hostname the SPICE server is bound to.  This depends on
904 #        the name resolution on the host and may be an IP address.
906 # @port: #optional The SPICE server's port number.
908 # @compiled-version: #optional SPICE server version.
910 # @tls-port: #optional The SPICE server's TLS port number.
912 # @auth: #optional the current authentication type used by the server
913 #        'none'  if no authentication is being used
914 #        'spice' uses SASL or direct TLS authentication, depending on command
915 #                line options
917 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
918 #              be determined by the client or the server, or unknown if spice
919 #              server doesn't provide this information.
921 #              Since: 1.1
923 # @channels: a list of @SpiceChannel for each active spice channel
925 # Since: 0.14.0
927 { 'type': 'SpiceInfo',
928   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
929            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
930            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
933 # @query-spice
935 # Returns information about the current SPICE server
937 # Returns: @SpiceInfo
939 # Since: 0.14.0
941 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
944 # @BalloonInfo:
946 # Information about the guest balloon device.
948 # @actual: the number of bytes the balloon currently contains
950 # @mem_swapped_in: #optional number of pages swapped in within the guest
952 # @mem_swapped_out: #optional number of pages swapped out within the guest
954 # @major_page_faults: #optional number of major page faults within the guest
956 # @minor_page_faults: #optional number of minor page faults within the guest
958 # @free_mem: #optional amount of memory (in bytes) free in the guest
960 # @total_mem: #optional amount of memory (in bytes) visible to the guest
962 # Since: 0.14.0
964 # Notes: all current versions of QEMU do not fill out optional information in
965 #        this structure.
967 { 'type': 'BalloonInfo',
968   'data': {'actual': 'int', '*mem_swapped_in': 'int',
969            '*mem_swapped_out': 'int', '*major_page_faults': 'int',
970            '*minor_page_faults': 'int', '*free_mem': 'int',
971            '*total_mem': 'int'} }
974 # @query-balloon:
976 # Return information about the balloon device.
978 # Returns: @BalloonInfo on success
979 #          If the balloon driver is enabled but not functional because the KVM
980 #          kernel module cannot support it, KvmMissingCap
981 #          If no balloon device is present, DeviceNotActive
983 # Since: 0.14.0
985 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
988 # @PciMemoryRange:
990 # A PCI device memory region
992 # @base: the starting address (guest physical)
994 # @limit: the ending address (guest physical)
996 # Since: 0.14.0
998 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1001 # @PciMemoryRegion
1003 # Information about a PCI device I/O region.
1005 # @bar: the index of the Base Address Register for this region
1007 # @type: 'io' if the region is a PIO region
1008 #        'memory' if the region is a MMIO region
1010 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1012 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1014 # Since: 0.14.0
1016 { 'type': 'PciMemoryRegion',
1017   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1018            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1021 # @PciBridgeInfo:
1023 # Information about a PCI Bridge device
1025 # @bus.number: primary bus interface number.  This should be the number of the
1026 #              bus the device resides on.
1028 # @bus.secondary: secondary bus interface number.  This is the number of the
1029 #                 main bus for the bridge
1031 # @bus.subordinate: This is the highest number bus that resides below the
1032 #                   bridge.
1034 # @bus.io_range: The PIO range for all devices on this bridge
1036 # @bus.memory_range: The MMIO range for all devices on this bridge
1038 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1039 #                          this bridge
1041 # @devices: a list of @PciDeviceInfo for each device on this bridge
1043 # Since: 0.14.0
1045 { 'type': 'PciBridgeInfo',
1046   'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1047                     'io_range': 'PciMemoryRange',
1048                     'memory_range': 'PciMemoryRange',
1049                     'prefetchable_range': 'PciMemoryRange' },
1050            '*devices': ['PciDeviceInfo']} }
1053 # @PciDeviceInfo:
1055 # Information about a PCI device
1057 # @bus: the bus number of the device
1059 # @slot: the slot the device is located in
1061 # @function: the function of the slot used by the device
1063 # @class_info.desc: #optional a string description of the device's class
1065 # @class_info.class: the class code of the device
1067 # @id.device: the PCI device id
1069 # @id.vendor: the PCI vendor id
1071 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1073 # @qdev_id: the device name of the PCI device
1075 # @pci_bridge: if the device is a PCI bridge, the bridge information
1077 # @regions: a list of the PCI I/O regions associated with the device
1079 # Notes: the contents of @class_info.desc are not stable and should only be
1080 #        treated as informational.
1082 # Since: 0.14.0
1084 { 'type': 'PciDeviceInfo',
1085   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1086            'class_info': {'*desc': 'str', 'class': 'int'},
1087            'id': {'device': 'int', 'vendor': 'int'},
1088            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1089            'regions': ['PciMemoryRegion']} }
1092 # @PciInfo:
1094 # Information about a PCI bus
1096 # @bus: the bus index
1098 # @devices: a list of devices on this bus
1100 # Since: 0.14.0
1102 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1105 # @query-pci:
1107 # Return information about the PCI bus topology of the guest.
1109 # Returns: a list of @PciInfo for each PCI bus
1111 # Since: 0.14.0
1113 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1116 # @BlockdevOnError:
1118 # An enumeration of possible behaviors for errors on I/O operations.
1119 # The exact meaning depends on whether the I/O was initiated by a guest
1120 # or by a block job
1122 # @report: for guest operations, report the error to the guest;
1123 #          for jobs, cancel the job
1125 # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1126 #          or BLOCK_JOB_ERROR)
1128 # @enospc: same as @stop on ENOSPC, same as @report otherwise.
1130 # @stop: for guest operations, stop the virtual machine;
1131 #        for jobs, pause the job
1133 # Since: 1.3
1135 { 'enum': 'BlockdevOnError',
1136   'data': ['report', 'ignore', 'enospc', 'stop'] }
1139 # @BlockJobInfo:
1141 # Information about a long-running block device operation.
1143 # @type: the job type ('stream' for image streaming)
1145 # @device: the block device name
1147 # @len: the maximum progress value
1149 # @busy: false if the job is known to be in a quiescent state, with
1150 #        no pending I/O.  Since 1.3.
1152 # @paused: whether the job is paused or, if @busy is true, will
1153 #          pause itself as soon as possible.  Since 1.3.
1155 # @offset: the current progress value
1157 # @speed: the rate limit, bytes per second
1159 # @io-status: the status of the job (since 1.3)
1161 # Since: 1.1
1163 { 'type': 'BlockJobInfo',
1164   'data': {'type': 'str', 'device': 'str', 'len': 'int',
1165            'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1166            'io-status': 'BlockDeviceIoStatus'} }
1169 # @query-block-jobs:
1171 # Return information about long-running block device operations.
1173 # Returns: a list of @BlockJobInfo for each active block job
1175 # Since: 1.1
1177 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1180 # @quit:
1182 # This command will cause the QEMU process to exit gracefully.  While every
1183 # attempt is made to send the QMP response before terminating, this is not
1184 # guaranteed.  When using this interface, a premature EOF would not be
1185 # unexpected.
1187 # Since: 0.14.0
1189 { 'command': 'quit' }
1192 # @stop:
1194 # Stop all guest VCPU execution.
1196 # Since:  0.14.0
1198 # Notes:  This function will succeed even if the guest is already in the stopped
1199 #         state
1201 { 'command': 'stop' }
1204 # @system_reset:
1206 # Performs a hard reset of a guest.
1208 # Since: 0.14.0
1210 { 'command': 'system_reset' }
1213 # @system_powerdown:
1215 # Requests that a guest perform a powerdown operation.
1217 # Since: 0.14.0
1219 # Notes: A guest may or may not respond to this command.  This command
1220 #        returning does not indicate that a guest has accepted the request or
1221 #        that it has shut down.  Many guests will respond to this command by
1222 #        prompting the user in some way.
1224 { 'command': 'system_powerdown' }
1227 # @cpu:
1229 # This command is a nop that is only provided for the purposes of compatibility.
1231 # Since: 0.14.0
1233 # Notes: Do not use this command.
1235 { 'command': 'cpu', 'data': {'index': 'int'} }
1238 # @memsave:
1240 # Save a portion of guest memory to a file.
1242 # @val: the virtual address of the guest to start from
1244 # @size: the size of memory region to save
1246 # @filename: the file to save the memory to as binary data
1248 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1249 #                       virtual address (defaults to CPU 0)
1251 # Returns: Nothing on success
1253 # Since: 0.14.0
1255 # Notes: Errors were not reliably returned until 1.1
1257 { 'command': 'memsave',
1258   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1261 # @pmemsave:
1263 # Save a portion of guest physical memory to a file.
1265 # @val: the physical address of the guest to start from
1267 # @size: the size of memory region to save
1269 # @filename: the file to save the memory to as binary data
1271 # Returns: Nothing on success
1273 # Since: 0.14.0
1275 # Notes: Errors were not reliably returned until 1.1
1277 { 'command': 'pmemsave',
1278   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1281 # @cont:
1283 # Resume guest VCPU execution.
1285 # Since:  0.14.0
1287 # Returns:  If successful, nothing
1288 #           If the QEMU is waiting for an incoming migration, MigrationExpected
1289 #           If QEMU was started with an encrypted block device and a key has
1290 #              not yet been set, DeviceEncrypted.
1292 # Notes:  This command will succeed if the guest is currently running.
1294 { 'command': 'cont' }
1297 # @system_wakeup:
1299 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1301 # Since:  1.1
1303 # Returns:  nothing.
1305 { 'command': 'system_wakeup' }
1308 # @inject-nmi:
1310 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1312 # Returns:  If successful, nothing
1314 # Since:  0.14.0
1316 # Notes: Only x86 Virtual Machines support this command.
1318 { 'command': 'inject-nmi' }
1321 # @set_link:
1323 # Sets the link status of a virtual network adapter.
1325 # @name: the device name of the virtual network adapter
1327 # @up: true to set the link status to be up
1329 # Returns: Nothing on success
1330 #          If @name is not a valid network device, DeviceNotFound
1332 # Since: 0.14.0
1334 # Notes: Not all network adapters support setting link status.  This command
1335 #        will succeed even if the network adapter does not support link status
1336 #        notification.
1338 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1341 # @block_passwd:
1343 # This command sets the password of a block device that has not been open
1344 # with a password and requires one.
1346 # The two cases where this can happen are a block device is created through
1347 # QEMU's initial command line or a block device is changed through the legacy
1348 # @change interface.
1350 # In the event that the block device is created through the initial command
1351 # line, the VM will start in the stopped state regardless of whether '-S' is
1352 # used.  The intention is for a management tool to query the block devices to
1353 # determine which ones are encrypted, set the passwords with this command, and
1354 # then start the guest with the @cont command.
1356 # @device:   the name of the device to set the password on
1358 # @password: the password to use for the device
1360 # Returns: nothing on success
1361 #          If @device is not a valid block device, DeviceNotFound
1362 #          If @device is not encrypted, DeviceNotEncrypted
1364 # Notes:  Not all block formats support encryption and some that do are not
1365 #         able to validate that a password is correct.  Disk corruption may
1366 #         occur if an invalid password is specified.
1368 # Since: 0.14.0
1370 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1373 # @balloon:
1375 # Request the balloon driver to change its balloon size.
1377 # @value: the target size of the balloon in bytes
1379 # Returns: Nothing on success
1380 #          If the balloon driver is enabled but not functional because the KVM
1381 #            kernel module cannot support it, KvmMissingCap
1382 #          If no balloon device is present, DeviceNotActive
1384 # Notes: This command just issues a request to the guest.  When it returns,
1385 #        the balloon size may not have changed.  A guest can change the balloon
1386 #        size independent of this command.
1388 # Since: 0.14.0
1390 { 'command': 'balloon', 'data': {'value': 'int'} }
1393 # @block_resize
1395 # Resize a block image while a guest is running.
1397 # @device:  the name of the device to get the image resized
1399 # @size:  new image size in bytes
1401 # Returns: nothing on success
1402 #          If @device is not a valid block device, DeviceNotFound
1404 # Since: 0.14.0
1406 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1409 # @NewImageMode
1411 # An enumeration that tells QEMU how to set the backing file path in
1412 # a new image file.
1414 # @existing: QEMU should look for an existing image file.
1416 # @absolute-paths: QEMU should create a new image with absolute paths
1417 # for the backing file.
1419 # Since: 1.1
1421 { 'enum': 'NewImageMode'
1422   'data': [ 'existing', 'absolute-paths' ] }
1425 # @BlockdevSnapshot
1427 # @device:  the name of the device to generate the snapshot from.
1429 # @snapshot-file: the target of the new image. A new file will be created.
1431 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1433 # @mode: #optional whether and how QEMU should create a new image, default is
1434 #        'absolute-paths'.
1436 { 'type': 'BlockdevSnapshot',
1437   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1438             '*mode': 'NewImageMode' } }
1441 # @BlockdevAction
1443 # A discriminated record of operations that can be performed with
1444 # @transaction.
1446 { 'union': 'BlockdevAction',
1447   'data': {
1448        'blockdev-snapshot-sync': 'BlockdevSnapshot',
1449    } }
1452 # @transaction
1454 # Atomically operate on a group of one or more block devices.  If
1455 # any operation fails, then the entire set of actions will be
1456 # abandoned and the appropriate error returned.  The only operation
1457 # supported is currently blockdev-snapshot-sync.
1459 #  List of:
1460 #  @BlockdevAction: information needed for the device snapshot
1462 # Returns: nothing on success
1463 #          If @device is not a valid block device, DeviceNotFound
1465 # Note: The transaction aborts on the first failure.  Therefore, there will
1466 # be only one device or snapshot file returned in an error condition, and
1467 # subsequent actions will not have been attempted.
1469 # Since 1.1
1471 { 'command': 'transaction',
1472   'data': { 'actions': [ 'BlockdevAction' ] } }
1475 # @blockdev-snapshot-sync
1477 # Generates a synchronous snapshot of a block device.
1479 # @device:  the name of the device to generate the snapshot from.
1481 # @snapshot-file: the target of the new image. If the file exists, or if it
1482 #                 is a device, the snapshot will be created in the existing
1483 #                 file/device. If does not exist, a new file will be created.
1485 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1487 # @mode: #optional whether and how QEMU should create a new image, default is
1488 #        'absolute-paths'.
1490 # Returns: nothing on success
1491 #          If @device is not a valid block device, DeviceNotFound
1493 # Since 0.14.0
1495 { 'command': 'blockdev-snapshot-sync',
1496   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1497             '*mode': 'NewImageMode'} }
1500 # @human-monitor-command:
1502 # Execute a command on the human monitor and return the output.
1504 # @command-line: the command to execute in the human monitor
1506 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1508 # Returns: the output of the command as a string
1510 # Since: 0.14.0
1512 # Notes: This command only exists as a stop-gap.  It's use is highly
1513 #        discouraged.  The semantics of this command are not guaranteed.
1515 #        Known limitations:
1517 #        o This command is stateless, this means that commands that depend
1518 #          on state information (such as getfd) might not work
1520 #       o Commands that prompt the user for data (eg. 'cont' when the block
1521 #         device is encrypted) don't currently work
1523 { 'command': 'human-monitor-command',
1524   'data': {'command-line': 'str', '*cpu-index': 'int'},
1525   'returns': 'str' }
1528 # @block-commit
1530 # Live commit of data from overlay image nodes into backing nodes - i.e.,
1531 # writes data between 'top' and 'base' into 'base'.
1533 # @device:  the name of the device
1535 # @base:   #optional The file name of the backing image to write data into.
1536 #                    If not specified, this is the deepest backing image
1538 # @top:              The file name of the backing image within the image chain,
1539 #                    which contains the topmost data to be committed down.
1540 #                    Note, the active layer as 'top' is currently unsupported.
1542 #                    If top == base, that is an error.
1545 # @speed:  #optional the maximum speed, in bytes per second
1547 # Returns: Nothing on success
1548 #          If commit or stream is already active on this device, DeviceInUse
1549 #          If @device does not exist, DeviceNotFound
1550 #          If image commit is not supported by this device, NotSupported
1551 #          If @base or @top is invalid, a generic error is returned
1552 #          If @top is the active layer, or omitted, a generic error is returned
1553 #          If @speed is invalid, InvalidParameter
1555 # Since: 1.3
1558 { 'command': 'block-commit',
1559   'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1560             '*speed': 'int' } }
1562 # @migrate_cancel
1564 # Cancel the current executing migration process.
1566 # Returns: nothing on success
1568 # Notes: This command succeeds even if there is no migration process running.
1570 # Since: 0.14.0
1572 { 'command': 'migrate_cancel' }
1575 # @migrate_set_downtime
1577 # Set maximum tolerated downtime for migration.
1579 # @value: maximum downtime in seconds
1581 # Returns: nothing on success
1583 # Since: 0.14.0
1585 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1588 # @migrate_set_speed
1590 # Set maximum speed for migration.
1592 # @value: maximum speed in bytes.
1594 # Returns: nothing on success
1596 # Notes: A value lesser than zero will be automatically round up to zero.
1598 # Since: 0.14.0
1600 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1603 # @migrate-set-cache-size
1605 # Set XBZRLE cache size
1607 # @value: cache size in bytes
1609 # The size will be rounded down to the nearest power of 2.
1610 # The cache size can be modified before and during ongoing migration
1612 # Returns: nothing on success
1614 # Since: 1.2
1616 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1619 # @query-migrate-cache-size
1621 # query XBZRLE cache size
1623 # Returns: XBZRLE cache size in bytes
1625 # Since: 1.2
1627 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1630 # @ObjectPropertyInfo:
1632 # @name: the name of the property
1634 # @type: the type of the property.  This will typically come in one of four
1635 #        forms:
1637 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1638 #           These types are mapped to the appropriate JSON type.
1640 #        2) A legacy type in the form 'legacy<subtype>' where subtype is the
1641 #           legacy qdev typename.  These types are always treated as strings.
1643 #        3) A child type in the form 'child<subtype>' where subtype is a qdev
1644 #           device type name.  Child properties create the composition tree.
1646 #        4) A link type in the form 'link<subtype>' where subtype is a qdev
1647 #           device type name.  Link properties form the device model graph.
1649 # Since: 1.2
1651 { 'type': 'ObjectPropertyInfo',
1652   'data': { 'name': 'str', 'type': 'str' } }
1655 # @qom-list:
1657 # This command will list any properties of a object given a path in the object
1658 # model.
1660 # @path: the path within the object model.  See @qom-get for a description of
1661 #        this parameter.
1663 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1664 #          object.
1666 # Since: 1.2
1668 { 'command': 'qom-list',
1669   'data': { 'path': 'str' },
1670   'returns': [ 'ObjectPropertyInfo' ] }
1673 # @qom-get:
1675 # This command will get a property from a object model path and return the
1676 # value.
1678 # @path: The path within the object model.  There are two forms of supported
1679 #        paths--absolute and partial paths.
1681 #        Absolute paths are derived from the root object and can follow child<>
1682 #        or link<> properties.  Since they can follow link<> properties, they
1683 #        can be arbitrarily long.  Absolute paths look like absolute filenames
1684 #        and are prefixed  with a leading slash.
1686 #        Partial paths look like relative filenames.  They do not begin
1687 #        with a prefix.  The matching rules for partial paths are subtle but
1688 #        designed to make specifying objects easy.  At each level of the
1689 #        composition tree, the partial path is matched as an absolute path.
1690 #        The first match is not returned.  At least two matches are searched
1691 #        for.  A successful result is only returned if only one match is
1692 #        found.  If more than one match is found, a flag is return to
1693 #        indicate that the match was ambiguous.
1695 # @property: The property name to read
1697 # Returns: The property value.  The type depends on the property type.  legacy<>
1698 #          properties are returned as #str.  child<> and link<> properties are
1699 #          returns as #str pathnames.  All integer property types (u8, u16, etc)
1700 #          are returned as #int.
1702 # Since: 1.2
1704 { 'command': 'qom-get',
1705   'data': { 'path': 'str', 'property': 'str' },
1706   'returns': 'visitor',
1707   'gen': 'no' }
1710 # @qom-set:
1712 # This command will set a property from a object model path.
1714 # @path: see @qom-get for a description of this parameter
1716 # @property: the property name to set
1718 # @value: a value who's type is appropriate for the property type.  See @qom-get
1719 #         for a description of type mapping.
1721 # Since: 1.2
1723 { 'command': 'qom-set',
1724   'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1725   'gen': 'no' }
1728 # @set_password:
1730 # Sets the password of a remote display session.
1732 # @protocol: `vnc' to modify the VNC server password
1733 #            `spice' to modify the Spice server password
1735 # @password: the new password
1737 # @connected: #optional how to handle existing clients when changing the
1738 #                       password.  If nothing is specified, defaults to `keep'
1739 #                       `fail' to fail the command if clients are connected
1740 #                       `disconnect' to disconnect existing clients
1741 #                       `keep' to maintain existing clients
1743 # Returns: Nothing on success
1744 #          If Spice is not enabled, DeviceNotFound
1746 # Since: 0.14.0
1748 { 'command': 'set_password',
1749   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1752 # @expire_password:
1754 # Expire the password of a remote display server.
1756 # @protocol: the name of the remote display protocol `vnc' or `spice'
1758 # @time: when to expire the password.
1759 #        `now' to expire the password immediately
1760 #        `never' to cancel password expiration
1761 #        `+INT' where INT is the number of seconds from now (integer)
1762 #        `INT' where INT is the absolute time in seconds
1764 # Returns: Nothing on success
1765 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
1767 # Since: 0.14.0
1769 # Notes: Time is relative to the server and currently there is no way to
1770 #        coordinate server time with client time.  It is not recommended to
1771 #        use the absolute time version of the @time parameter unless you're
1772 #        sure you are on the same machine as the QEMU instance.
1774 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1777 # @eject:
1779 # Ejects a device from a removable drive.
1781 # @device:  The name of the device
1783 # @force:   @optional If true, eject regardless of whether the drive is locked.
1784 #           If not specified, the default value is false.
1786 # Returns:  Nothing on success
1787 #           If @device is not a valid block device, DeviceNotFound
1789 # Notes:    Ejecting a device will no media results in success
1791 # Since: 0.14.0
1793 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
1796 # @change-vnc-password:
1798 # Change the VNC server password.
1800 # @target:  the new password to use with VNC authentication
1802 # Since: 1.1
1804 # Notes:  An empty password in this command will set the password to the empty
1805 #         string.  Existing clients are unaffected by executing this command.
1807 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1810 # @change:
1812 # This command is multiple commands multiplexed together.
1814 # @device: This is normally the name of a block device but it may also be 'vnc'.
1815 #          when it's 'vnc', then sub command depends on @target
1817 # @target: If @device is a block device, then this is the new filename.
1818 #          If @device is 'vnc', then if the value 'password' selects the vnc
1819 #          change password command.   Otherwise, this specifies a new server URI
1820 #          address to listen to for VNC connections.
1822 # @arg:    If @device is a block device, then this is an optional format to open
1823 #          the device with.
1824 #          If @device is 'vnc' and @target is 'password', this is the new VNC
1825 #          password to set.  If this argument is an empty string, then no future
1826 #          logins will be allowed.
1828 # Returns: Nothing on success.
1829 #          If @device is not a valid block device, DeviceNotFound
1830 #          If the new block device is encrypted, DeviceEncrypted.  Note that
1831 #          if this error is returned, the device has been opened successfully
1832 #          and an additional call to @block_passwd is required to set the
1833 #          device's password.  The behavior of reads and writes to the block
1834 #          device between when these calls are executed is undefined.
1836 # Notes:  It is strongly recommended that this interface is not used especially
1837 #         for changing block devices.
1839 # Since: 0.14.0
1841 { 'command': 'change',
1842   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1845 # @block_set_io_throttle:
1847 # Change I/O throttle limits for a block drive.
1849 # @device: The name of the device
1851 # @bps: total throughput limit in bytes per second
1853 # @bps_rd: read throughput limit in bytes per second
1855 # @bps_wr: write throughput limit in bytes per second
1857 # @iops: total I/O operations per second
1859 # @ops_rd: read I/O operations per second
1861 # @iops_wr: write I/O operations per second
1863 # Returns: Nothing on success
1864 #          If @device is not a valid block device, DeviceNotFound
1866 # Since: 1.1
1868 { 'command': 'block_set_io_throttle',
1869   'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
1870             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
1873 # @block-stream:
1875 # Copy data from a backing file into a block device.
1877 # The block streaming operation is performed in the background until the entire
1878 # backing file has been copied.  This command returns immediately once streaming
1879 # has started.  The status of ongoing block streaming operations can be checked
1880 # with query-block-jobs.  The operation can be stopped before it has completed
1881 # using the block-job-cancel command.
1883 # If a base file is specified then sectors are not copied from that base file and
1884 # its backing chain.  When streaming completes the image file will have the base
1885 # file as its backing file.  This can be used to stream a subset of the backing
1886 # file chain instead of flattening the entire image.
1888 # On successful completion the image file is updated to drop the backing file
1889 # and the BLOCK_JOB_COMPLETED event is emitted.
1891 # @device: the device name
1893 # @base:   #optional the common backing file name
1895 # @speed:  #optional the maximum speed, in bytes per second
1897 # @on-error: #optional the action to take on an error (default report).
1898 #            'stop' and 'enospc' can only be used if the block device
1899 #            supports io-status (see BlockInfo).  Since 1.3.
1901 # Returns: Nothing on success
1902 #          If @device does not exist, DeviceNotFound
1904 # Since: 1.1
1906 { 'command': 'block-stream',
1907   'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
1908             '*on-error': 'BlockdevOnError' } }
1911 # @block-job-set-speed:
1913 # Set maximum speed for a background block operation.
1915 # This command can only be issued when there is an active block job.
1917 # Throttling can be disabled by setting the speed to 0.
1919 # @device: the device name
1921 # @speed:  the maximum speed, in bytes per second, or 0 for unlimited.
1922 #          Defaults to 0.
1924 # Returns: Nothing on success
1925 #          If no background operation is active on this device, DeviceNotActive
1927 # Since: 1.1
1929 { 'command': 'block-job-set-speed',
1930   'data': { 'device': 'str', 'speed': 'int' } }
1933 # @block-job-cancel:
1935 # Stop an active background block operation.
1937 # This command returns immediately after marking the active background block
1938 # operation for cancellation.  It is an error to call this command if no
1939 # operation is in progress.
1941 # The operation will cancel as soon as possible and then emit the
1942 # BLOCK_JOB_CANCELLED event.  Before that happens the job is still visible when
1943 # enumerated using query-block-jobs.
1945 # For streaming, the image file retains its backing file unless the streaming
1946 # operation happens to complete just as it is being cancelled.  A new streaming
1947 # operation can be started at a later time to finish copying all data from the
1948 # backing file.
1950 # @device: the device name
1952 # @force: #optional whether to allow cancellation of a paused job (default
1953 #         false).  Since 1.3.
1955 # Returns: Nothing on success
1956 #          If no background operation is active on this device, DeviceNotActive
1958 # Since: 1.1
1960 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
1963 # @block-job-pause:
1965 # Pause an active background block operation.
1967 # This command returns immediately after marking the active background block
1968 # operation for pausing.  It is an error to call this command if no
1969 # operation is in progress.  Pausing an already paused job has no cumulative
1970 # effect; a single block-job-resume command will resume the job.
1972 # The operation will pause as soon as possible.  No event is emitted when
1973 # the operation is actually paused.  Cancelling a paused job automatically
1974 # resumes it.
1976 # @device: the device name
1978 # Returns: Nothing on success
1979 #          If no background operation is active on this device, DeviceNotActive
1981 # Since: 1.3
1983 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
1986 # @block-job-resume:
1988 # Resume an active background block operation.
1990 # This command returns immediately after resuming a paused background block
1991 # operation.  It is an error to call this command if no operation is in
1992 # progress.  Resuming an already running job is not an error.
1994 # This command also clears the error status of the job.
1996 # @device: the device name
1998 # Returns: Nothing on success
1999 #          If no background operation is active on this device, DeviceNotActive
2001 # Since: 1.3
2003 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
2006 # @ObjectTypeInfo:
2008 # This structure describes a search result from @qom-list-types
2010 # @name: the type name found in the search
2012 # Since: 1.1
2014 # Notes: This command is experimental and may change syntax in future releases.
2016 { 'type': 'ObjectTypeInfo',
2017   'data': { 'name': 'str' } }
2020 # @qom-list-types:
2022 # This command will return a list of types given search parameters
2024 # @implements: if specified, only return types that implement this type name
2026 # @abstract: if true, include abstract types in the results
2028 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2030 # Since: 1.1
2032 { 'command': 'qom-list-types',
2033   'data': { '*implements': 'str', '*abstract': 'bool' },
2034   'returns': [ 'ObjectTypeInfo' ] }
2037 # @DevicePropertyInfo:
2039 # Information about device properties.
2041 # @name: the name of the property
2042 # @type: the typename of the property
2044 # Since: 1.2
2046 { 'type': 'DevicePropertyInfo',
2047   'data': { 'name': 'str', 'type': 'str' } }
2050 # @device-list-properties:
2052 # List properties associated with a device.
2054 # @typename: the type name of a device
2056 # Returns: a list of DevicePropertyInfo describing a devices properties
2058 # Since: 1.2
2060 { 'command': 'device-list-properties',
2061   'data': { 'typename': 'str'},
2062   'returns': [ 'DevicePropertyInfo' ] }
2065 # @migrate
2067 # Migrates the current running guest to another Virtual Machine.
2069 # @uri: the Uniform Resource Identifier of the destination VM
2071 # @blk: #optional do block migration (full disk copy)
2073 # @inc: #optional incremental disk copy migration
2075 # @detach: this argument exists only for compatibility reasons and
2076 #          is ignored by QEMU
2078 # Returns: nothing on success
2080 # Since: 0.14.0
2082 { 'command': 'migrate',
2083   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2085 # @xen-save-devices-state:
2087 # Save the state of all devices to file. The RAM and the block devices
2088 # of the VM are not saved by this command.
2090 # @filename: the file to save the state of the devices to as binary
2091 # data. See xen-save-devices-state.txt for a description of the binary
2092 # format.
2094 # Returns: Nothing on success
2096 # Since: 1.1
2098 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2101 # @xen-set-global-dirty-log
2103 # Enable or disable the global dirty log mode.
2105 # @enable: true to enable, false to disable.
2107 # Returns: nothing
2109 # Since: 1.3
2111 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2114 # @device_del:
2116 # Remove a device from a guest
2118 # @id: the name of the device
2120 # Returns: Nothing on success
2121 #          If @id is not a valid device, DeviceNotFound
2123 # Notes: When this command completes, the device may not be removed from the
2124 #        guest.  Hot removal is an operation that requires guest cooperation.
2125 #        This command merely requests that the guest begin the hot removal
2126 #        process.
2128 # Since: 0.14.0
2130 { 'command': 'device_del', 'data': {'id': 'str'} }
2133 # @dump-guest-memory
2135 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2136 # very long depending on the amount of guest memory. This command is only
2137 # supported on i386 and x86_64.
2139 # @paging: if true, do paging to get guest's memory mapping. This allows
2140 #          using gdb to process the core file.
2142 #          IMPORTANT: this option can make QEMU allocate several gigabytes
2143 #                     of RAM. This can happen for a large guest, or a
2144 #                     malicious guest pretending to be large.
2146 #          Also, paging=true has the following limitations:
2148 #             1. The guest may be in a catastrophic state or can have corrupted
2149 #                memory, which cannot be trusted
2150 #             2. The guest can be in real-mode even if paging is enabled. For
2151 #                example, the guest uses ACPI to sleep, and ACPI sleep state
2152 #                goes in real-mode
2154 # @protocol: the filename or file descriptor of the vmcore. The supported
2155 #            protocols are:
2157 #            1. file: the protocol starts with "file:", and the following
2158 #               string is the file's path.
2159 #            2. fd: the protocol starts with "fd:", and the following string
2160 #               is the fd's name.
2162 # @begin: #optional if specified, the starting physical address.
2164 # @length: #optional if specified, the memory size, in bytes. If you don't
2165 #          want to dump all guest's memory, please specify the start @begin
2166 #          and @length
2168 # Returns: nothing on success
2170 # Since: 1.2
2172 { 'command': 'dump-guest-memory',
2173   'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2174             '*length': 'int' } }
2177 # @netdev_add:
2179 # Add a network backend.
2181 # @type: the type of network backend.  Current valid values are 'user', 'tap',
2182 #        'vde', 'socket', 'dump' and 'bridge'
2184 # @id: the name of the new network backend
2186 # @props: #optional a list of properties to be passed to the backend in
2187 #         the format 'name=value', like 'ifname=tap0,script=no'
2189 # Notes: The semantics of @props is not well defined.  Future commands will be
2190 #        introduced that provide stronger typing for backend creation.
2192 # Since: 0.14.0
2194 # Returns: Nothing on success
2195 #          If @type is not a valid network backend, DeviceNotFound
2197 { 'command': 'netdev_add',
2198   'data': {'type': 'str', 'id': 'str', '*props': '**'},
2199   'gen': 'no' }
2202 # @netdev_del:
2204 # Remove a network backend.
2206 # @id: the name of the network backend to remove
2208 # Returns: Nothing on success
2209 #          If @id is not a valid network backend, DeviceNotFound
2211 # Since: 0.14.0
2213 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2216 # @NetdevNoneOptions
2218 # Use it alone to have zero network devices.
2220 # Since 1.2
2222 { 'type': 'NetdevNoneOptions',
2223   'data': { } }
2226 # @NetLegacyNicOptions
2228 # Create a new Network Interface Card.
2230 # @netdev: #optional id of -netdev to connect to
2232 # @macaddr: #optional MAC address
2234 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2236 # @addr: #optional PCI device address
2238 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2240 # Since 1.2
2242 { 'type': 'NetLegacyNicOptions',
2243   'data': {
2244     '*netdev':  'str',
2245     '*macaddr': 'str',
2246     '*model':   'str',
2247     '*addr':    'str',
2248     '*vectors': 'uint32' } }
2251 # @String
2253 # A fat type wrapping 'str', to be embedded in lists.
2255 # Since 1.2
2257 { 'type': 'String',
2258   'data': {
2259     'str': 'str' } }
2262 # @NetdevUserOptions
2264 # Use the user mode network stack which requires no administrator privilege to
2265 # run.
2267 # @hostname: #optional client hostname reported by the builtin DHCP server
2269 # @restrict: #optional isolate the guest from the host
2271 # @ip: #optional legacy parameter, use net= instead
2273 # @net: #optional IP address and optional netmask
2275 # @host: #optional guest-visible address of the host
2277 # @tftp: #optional root directory of the built-in TFTP server
2279 # @bootfile: #optional BOOTP filename, for use with tftp=
2281 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2282 #             assign
2284 # @dns: #optional guest-visible address of the virtual nameserver
2286 # @smb: #optional root directory of the built-in SMB server
2288 # @smbserver: #optional IP address of the built-in SMB server
2290 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2291 #           endpoints
2293 # @guestfwd: #optional forward guest TCP connections
2295 # Since 1.2
2297 { 'type': 'NetdevUserOptions',
2298   'data': {
2299     '*hostname':  'str',
2300     '*restrict':  'bool',
2301     '*ip':        'str',
2302     '*net':       'str',
2303     '*host':      'str',
2304     '*tftp':      'str',
2305     '*bootfile':  'str',
2306     '*dhcpstart': 'str',
2307     '*dns':       'str',
2308     '*smb':       'str',
2309     '*smbserver': 'str',
2310     '*hostfwd':   ['String'],
2311     '*guestfwd':  ['String'] } }
2314 # @NetdevTapOptions
2316 # Connect the host TAP network interface name to the VLAN.
2318 # @ifname: #optional interface name
2320 # @fd: #optional file descriptor of an already opened tap
2322 # @script: #optional script to initialize the interface
2324 # @downscript: #optional script to shut down the interface
2326 # @helper: #optional command to execute to configure bridge
2328 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2330 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2332 # @vhost: #optional enable vhost-net network accelerator
2334 # @vhostfd: #optional file descriptor of an already opened vhost net device
2336 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2338 # Since 1.2
2340 { 'type': 'NetdevTapOptions',
2341   'data': {
2342     '*ifname':     'str',
2343     '*fd':         'str',
2344     '*script':     'str',
2345     '*downscript': 'str',
2346     '*helper':     'str',
2347     '*sndbuf':     'size',
2348     '*vnet_hdr':   'bool',
2349     '*vhost':      'bool',
2350     '*vhostfd':    'str',
2351     '*vhostforce': 'bool' } }
2354 # @NetdevSocketOptions
2356 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2357 # socket connection.
2359 # @fd: #optional file descriptor of an already opened socket
2361 # @listen: #optional port number, and optional hostname, to listen on
2363 # @connect: #optional port number, and optional hostname, to connect to
2365 # @mcast: #optional UDP multicast address and port number
2367 # @localaddr: #optional source address and port for multicast and udp packets
2369 # @udp: #optional UDP unicast address and port number
2371 # Since 1.2
2373 { 'type': 'NetdevSocketOptions',
2374   'data': {
2375     '*fd':        'str',
2376     '*listen':    'str',
2377     '*connect':   'str',
2378     '*mcast':     'str',
2379     '*localaddr': 'str',
2380     '*udp':       'str' } }
2383 # @NetdevVdeOptions
2385 # Connect the VLAN to a vde switch running on the host.
2387 # @sock: #optional socket path
2389 # @port: #optional port number
2391 # @group: #optional group owner of socket
2393 # @mode: #optional permissions for socket
2395 # Since 1.2
2397 { 'type': 'NetdevVdeOptions',
2398   'data': {
2399     '*sock':  'str',
2400     '*port':  'uint16',
2401     '*group': 'str',
2402     '*mode':  'uint16' } }
2405 # @NetdevDumpOptions
2407 # Dump VLAN network traffic to a file.
2409 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2410 # suffixes.
2412 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2414 # Since 1.2
2416 { 'type': 'NetdevDumpOptions',
2417   'data': {
2418     '*len':  'size',
2419     '*file': 'str' } }
2422 # @NetdevBridgeOptions
2424 # Connect a host TAP network interface to a host bridge device.
2426 # @br: #optional bridge name
2428 # @helper: #optional command to execute to configure bridge
2430 # Since 1.2
2432 { 'type': 'NetdevBridgeOptions',
2433   'data': {
2434     '*br':     'str',
2435     '*helper': 'str' } }
2438 # @NetdevHubPortOptions
2440 # Connect two or more net clients through a software hub.
2442 # @hubid: hub identifier number
2444 # Since 1.2
2446 { 'type': 'NetdevHubPortOptions',
2447   'data': {
2448     'hubid':     'int32' } }
2451 # @NetClientOptions
2453 # A discriminated record of network device traits.
2455 # Since 1.2
2457 { 'union': 'NetClientOptions',
2458   'data': {
2459     'none':     'NetdevNoneOptions',
2460     'nic':      'NetLegacyNicOptions',
2461     'user':     'NetdevUserOptions',
2462     'tap':      'NetdevTapOptions',
2463     'socket':   'NetdevSocketOptions',
2464     'vde':      'NetdevVdeOptions',
2465     'dump':     'NetdevDumpOptions',
2466     'bridge':   'NetdevBridgeOptions',
2467     'hubport':  'NetdevHubPortOptions' } }
2470 # @NetLegacy
2472 # Captures the configuration of a network device; legacy.
2474 # @vlan: #optional vlan number
2476 # @id: #optional identifier for monitor commands
2478 # @name: #optional identifier for monitor commands, ignored if @id is present
2480 # @opts: device type specific properties (legacy)
2482 # Since 1.2
2484 { 'type': 'NetLegacy',
2485   'data': {
2486     '*vlan': 'int32',
2487     '*id':   'str',
2488     '*name': 'str',
2489     'opts':  'NetClientOptions' } }
2492 # @Netdev
2494 # Captures the configuration of a network device.
2496 # @id: identifier for monitor commands.
2498 # @opts: device type specific properties
2500 # Since 1.2
2502 { 'type': 'Netdev',
2503   'data': {
2504     'id':   'str',
2505     'opts': 'NetClientOptions' } }
2508 # @getfd:
2510 # Receive a file descriptor via SCM rights and assign it a name
2512 # @fdname: file descriptor name
2514 # Returns: Nothing on success
2516 # Since: 0.14.0
2518 # Notes: If @fdname already exists, the file descriptor assigned to
2519 #        it will be closed and replaced by the received file
2520 #        descriptor.
2521 #        The 'closefd' command can be used to explicitly close the
2522 #        file descriptor when it is no longer needed.
2524 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2527 # @closefd:
2529 # Close a file descriptor previously passed via SCM rights
2531 # @fdname: file descriptor name
2533 # Returns: Nothing on success
2535 # Since: 0.14.0
2537 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2540 # @MachineInfo:
2542 # Information describing a machine.
2544 # @name: the name of the machine
2546 # @alias: #optional an alias for the machine name
2548 # @default: #optional whether the machine is default
2550 # Since: 1.2.0
2552 { 'type': 'MachineInfo',
2553   'data': { 'name': 'str', '*alias': 'str',
2554             '*is-default': 'bool' } }
2557 # @query-machines:
2559 # Return a list of supported machines
2561 # Returns: a list of MachineInfo
2563 # Since: 1.2.0
2565 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2568 # @CpuDefinitionInfo:
2570 # Virtual CPU definition.
2572 # @name: the name of the CPU definition
2574 # Since: 1.2.0
2576 { 'type': 'CpuDefinitionInfo',
2577   'data': { 'name': 'str' } }
2580 # @query-cpu-definitions:
2582 # Return a list of supported virtual CPU definitions
2584 # Returns: a list of CpuDefInfo
2586 # Since: 1.2.0
2588 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2590 # @AddfdInfo:
2592 # Information about a file descriptor that was added to an fd set.
2594 # @fdset-id: The ID of the fd set that @fd was added to.
2596 # @fd: The file descriptor that was received via SCM rights and
2597 #      added to the fd set.
2599 # Since: 1.2.0
2601 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2604 # @add-fd:
2606 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2608 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2610 # @opaque: #optional A free-form string that can be used to describe the fd.
2612 # Returns: @AddfdInfo on success
2613 #          If file descriptor was not received, FdNotSupplied
2614 #          If @fdset-id does not exist, InvalidParameterValue
2616 # Notes: The list of fd sets is shared by all monitor connections.
2618 #        If @fdset-id is not specified, a new fd set will be created.
2620 # Since: 1.2.0
2622 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2623   'returns': 'AddfdInfo' }
2626 # @remove-fd:
2628 # Remove a file descriptor from an fd set.
2630 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2632 # @fd: #optional The file descriptor that is to be removed.
2634 # Returns: Nothing on success
2635 #          If @fdset-id or @fd is not found, FdNotFound
2637 # Since: 1.2.0
2639 # Notes: The list of fd sets is shared by all monitor connections.
2641 #        If @fd is not specified, all file descriptors in @fdset-id
2642 #        will be removed.
2644 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2647 # @FdsetFdInfo:
2649 # Information about a file descriptor that belongs to an fd set.
2651 # @fd: The file descriptor value.
2653 # @opaque: #optional A free-form string that can be used to describe the fd.
2655 # Since: 1.2.0
2657 { 'type': 'FdsetFdInfo',
2658   'data': {'fd': 'int', '*opaque': 'str'} }
2661 # @FdsetInfo:
2663 # Information about an fd set.
2665 # @fdset-id: The ID of the fd set.
2667 # @fds: A list of file descriptors that belong to this fd set.
2669 # Since: 1.2.0
2671 { 'type': 'FdsetInfo',
2672   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2675 # @query-fdsets:
2677 # Return information describing all fd sets.
2679 # Returns: A list of @FdsetInfo
2681 # Since: 1.2.0
2683 # Note: The list of fd sets is shared by all monitor connections.
2686 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2689 # @TargetType
2691 # Target CPU emulation type
2693 # These parameters correspond to the softmmu binary CPU name that is currently
2694 # running.
2696 # Since: 1.2.0
2698 { 'enum': 'TargetType',
2699   'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel',
2700             'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'or32',
2701             'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4', 'sparc64',
2702             'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] }
2705 # @TargetInfo:
2707 # Information describing the QEMU target.
2709 # @arch: the target architecture (eg "x86_64", "i386", etc)
2711 # Since: 1.2.0
2713 { 'type': 'TargetInfo',
2714   'data': { 'arch': 'TargetType' } }
2717 # @query-target:
2719 # Return information about the target for this QEMU
2721 # Returns: TargetInfo
2723 # Since: 1.2.0
2725 { 'command': 'query-target', 'returns': 'TargetInfo' }
2728 # @QKeyCode:
2730 # An enumeration of key name.
2732 # This is used by the send-key command.
2734 # Since: 1.3.0
2736 { 'enum': 'QKeyCode',
2737   'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
2738             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
2739             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
2740             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
2741             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
2742             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
2743             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
2744             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
2745             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
2746             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
2747             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
2748             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
2749             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
2750             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
2751              'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
2754 # @KeyValue
2756 # Represents a keyboard key.
2758 # Since: 1.3.0
2760 { 'union': 'KeyValue',
2761   'data': {
2762     'number': 'int',
2763     'qcode': 'QKeyCode' } }
2766 # @send-key:
2768 # Send keys to guest.
2770 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
2771 #        simultaneously sent to the guest. A @KeyValue.number value is sent
2772 #        directly to the guest, while @KeyValue.qcode must be a valid
2773 #        @QKeyCode value
2775 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
2776 #             to 100
2778 # Returns: Nothing on success
2779 #          If key is unknown or redundant, InvalidParameter
2781 # Since: 1.3.0
2784 { 'command': 'send-key',
2785   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
2788 # @screendump:
2790 # Write a PPM of the VGA screen to a file.
2792 # @filename: the path of a new PPM file to store the image
2794 # Returns: Nothing on success
2796 # Since: 0.14.0
2798 { 'command': 'screendump', 'data': {'filename': 'str'} }