ram: Export last_ram_offset()
[qemu/kevin.git] / qapi-schema.json
blobbcb5edb89daaa8495ec208f4749a806cb46a4a4b
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 # @downtime: #optional only present when migration finishes correctly
442 #        total downtime in milliseconds for the guest.
443 #        (since 1.3)
445 # @expected-downtime: #optional only present while migration is active
446 #        expected downtime in milliseconds for the guest in last walk
447 #        of the dirty bitmap. (since 1.3)
449 # Since: 0.14.0
451 { 'type': 'MigrationInfo',
452   'data': {'*status': 'str', '*ram': 'MigrationStats',
453            '*disk': 'MigrationStats',
454            '*xbzrle-cache': 'XBZRLECacheStats',
455            '*total-time': 'int',
456            '*expected-downtime': 'int',
457            '*downtime': 'int'} }
460 # @query-migrate
462 # Returns information about current migration process.
464 # Returns: @MigrationInfo
466 # Since: 0.14.0
468 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
471 # @MigrationCapability
473 # Migration capabilities enumeration
475 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
476 #          This feature allows us to minimize migration traffic for certain work
477 #          loads, by sending compressed difference of the pages
479 # Since: 1.2
481 { 'enum': 'MigrationCapability',
482   'data': ['xbzrle'] }
485 # @MigrationCapabilityStatus
487 # Migration capability information
489 # @capability: capability enum
491 # @state: capability state bool
493 # Since: 1.2
495 { 'type': 'MigrationCapabilityStatus',
496   'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
499 # @migrate-set-capabilities
501 # Enable/Disable the following migration capabilities (like xbzrle)
503 # @capabilities: json array of capability modifications to make
505 # Since: 1.2
507 { 'command': 'migrate-set-capabilities',
508   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
511 # @query-migrate-capabilities
513 # Returns information about the current migration capabilities status
515 # Returns: @MigrationCapabilitiesStatus
517 # Since: 1.2
519 { 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}
522 # @MouseInfo:
524 # Information about a mouse device.
526 # @name: the name of the mouse device
528 # @index: the index of the mouse device
530 # @current: true if this device is currently receiving mouse events
532 # @absolute: true if this device supports absolute coordinates as input
534 # Since: 0.14.0
536 { 'type': 'MouseInfo',
537   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
538            'absolute': 'bool'} }
541 # @query-mice:
543 # Returns information about each active mouse device
545 # Returns: a list of @MouseInfo for each device
547 # Since: 0.14.0
549 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
552 # @CpuInfo:
554 # Information about a virtual CPU
556 # @CPU: the index of the virtual CPU
558 # @current: this only exists for backwards compatible and should be ignored
560 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
561 #          to a processor specific low power mode.
563 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
564 #                pointer.
565 #                If the target is Sparc, this is the PC component of the
566 #                instruction pointer.
568 # @nip: #optional If the target is PPC, the instruction pointer
570 # @npc: #optional If the target is Sparc, the NPC component of the instruction
571 #                 pointer
573 # @PC: #optional If the target is MIPS, the instruction pointer
575 # @thread_id: ID of the underlying host thread
577 # Since: 0.14.0
579 # Notes: @halted is a transient state that changes frequently.  By the time the
580 #        data is sent to the client, the guest may no longer be halted.
582 { 'type': 'CpuInfo',
583   'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
584            '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
587 # @query-cpus:
589 # Returns a list of information about each virtual CPU.
591 # Returns: a list of @CpuInfo for each virtual CPU
593 # Since: 0.14.0
595 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
598 # @BlockDeviceInfo:
600 # Information about the backing device for a block device.
602 # @file: the filename of the backing device
604 # @ro: true if the backing device was open read-only
606 # @drv: the name of the block format used to open the backing device. As of
607 #       0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
608 #       'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
609 #       'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
610 #       'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
612 # @backing_file: #optional the name of the backing file (for copy-on-write)
614 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
616 # @encrypted: true if the backing device is encrypted
618 # @encryption_key_missing: true if the backing device is encrypted but an
619 #                          valid encryption key is missing
621 # @bps: total throughput limit in bytes per second is specified
623 # @bps_rd: read throughput limit in bytes per second is specified
625 # @bps_wr: write throughput limit in bytes per second is specified
627 # @iops: total I/O operations per second is specified
629 # @iops_rd: read I/O operations per second is specified
631 # @iops_wr: write I/O operations per second is specified
633 # Since: 0.14.0
635 # Notes: This interface is only found in @BlockInfo.
637 { 'type': 'BlockDeviceInfo',
638   'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
639             '*backing_file': 'str', 'backing_file_depth': 'int',
640             'encrypted': 'bool', 'encryption_key_missing': 'bool',
641             'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
642             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} }
645 # @BlockDeviceIoStatus:
647 # An enumeration of block device I/O status.
649 # @ok: The last I/O operation has succeeded
651 # @failed: The last I/O operation has failed
653 # @nospace: The last I/O operation has failed due to a no-space condition
655 # Since: 1.0
657 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
660 # @BlockInfo:
662 # Block device information.  This structure describes a virtual device and
663 # the backing device associated with it.
665 # @device: The device name associated with the virtual device.
667 # @type: This field is returned only for compatibility reasons, it should
668 #        not be used (always returns 'unknown')
670 # @removable: True if the device supports removable media.
672 # @locked: True if the guest has locked this device from having its media
673 #          removed
675 # @tray_open: #optional True if the device has a tray and it is open
676 #             (only present if removable is true)
678 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
679 #             supports it and the VM is configured to stop on errors
681 # @inserted: #optional @BlockDeviceInfo describing the device if media is
682 #            present
684 # Since:  0.14.0
686 { 'type': 'BlockInfo',
687   'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
688            'locked': 'bool', '*inserted': 'BlockDeviceInfo',
689            '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} }
692 # @query-block:
694 # Get a list of BlockInfo for all virtual block devices.
696 # Returns: a list of @BlockInfo describing each virtual block device
698 # Since: 0.14.0
700 { 'command': 'query-block', 'returns': ['BlockInfo'] }
703 # @BlockDeviceStats:
705 # Statistics of a virtual block device or a block backing device.
707 # @rd_bytes:      The number of bytes read by the device.
709 # @wr_bytes:      The number of bytes written by the device.
711 # @rd_operations: The number of read operations performed by the device.
713 # @wr_operations: The number of write operations performed by the device.
715 # @flush_operations: The number of cache flush operations performed by the
716 #                    device (since 0.15.0)
718 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
719 #                       (since 0.15.0).
721 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
723 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
725 # @wr_highest_offset: The offset after the greatest byte written to the
726 #                     device.  The intended use of this information is for
727 #                     growable sparse files (like qcow2) that are used on top
728 #                     of a physical device.
730 # Since: 0.14.0
732 { 'type': 'BlockDeviceStats',
733   'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
734            'wr_operations': 'int', 'flush_operations': 'int',
735            'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
736            'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
739 # @BlockStats:
741 # Statistics of a virtual block device or a block backing device.
743 # @device: #optional If the stats are for a virtual block device, the name
744 #          corresponding to the virtual block device.
746 # @stats:  A @BlockDeviceStats for the device.
748 # @parent: #optional This may point to the backing block device if this is a
749 #          a virtual block device.  If it's a backing block, this will point
750 #          to the backing file is one is present.
752 # Since: 0.14.0
754 { 'type': 'BlockStats',
755   'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
756            '*parent': 'BlockStats'} }
759 # @query-blockstats:
761 # Query the @BlockStats for all virtual block devices.
763 # Returns: A list of @BlockStats for each virtual block devices.
765 # Since: 0.14.0
767 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
770 # @VncClientInfo:
772 # Information about a connected VNC client.
774 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
775 #        when possible.
777 # @family: 'ipv6' if the client is connected via IPv6 and TCP
778 #          'ipv4' if the client is connected via IPv4 and TCP
779 #          'unix' if the client is connected via a unix domain socket
780 #          'unknown' otherwise
782 # @service: The service name of the client's port.  This may depends on the
783 #           host system's service database so symbolic names should not be
784 #           relied on.
786 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
787 #              Name of the client.
789 # @sasl_username: #optional If SASL authentication is in use, the SASL username
790 #                 used for authentication.
792 # Since: 0.14.0
794 { 'type': 'VncClientInfo',
795   'data': {'host': 'str', 'family': 'str', 'service': 'str',
796            '*x509_dname': 'str', '*sasl_username': 'str'} }
799 # @VncInfo:
801 # Information about the VNC session.
803 # @enabled: true if the VNC server is enabled, false otherwise
805 # @host: #optional The hostname the VNC server is bound to.  This depends on
806 #        the name resolution on the host and may be an IP address.
808 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
809 #                    'ipv4' if the host is listening for IPv4 connections
810 #                    'unix' if the host is listening on a unix domain socket
811 #                    'unknown' otherwise
813 # @service: #optional The service name of the server's port.  This may depends
814 #           on the host system's service database so symbolic names should not
815 #           be relied on.
817 # @auth: #optional the current authentication type used by the server
818 #        'none' if no authentication is being used
819 #        'vnc' if VNC authentication is being used
820 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
821 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
822 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
823 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
824 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
825 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
826 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
827 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
828 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
830 # @clients: a list of @VncClientInfo of all currently connected clients
832 # Since: 0.14.0
834 { 'type': 'VncInfo',
835   'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
836            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
839 # @query-vnc:
841 # Returns information about the current VNC server
843 # Returns: @VncInfo
845 # Since: 0.14.0
847 { 'command': 'query-vnc', 'returns': 'VncInfo' }
850 # @SpiceChannel
852 # Information about a SPICE client channel.
854 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
855 #        when possible.
857 # @family: 'ipv6' if the client is connected via IPv6 and TCP
858 #          'ipv4' if the client is connected via IPv4 and TCP
859 #          'unix' if the client is connected via a unix domain socket
860 #          'unknown' otherwise
862 # @port: The client's port number.
864 # @connection-id: SPICE connection id number.  All channels with the same id
865 #                 belong to the same SPICE session.
867 # @connection-type: SPICE channel type number.  "1" is the main control
868 #                   channel, filter for this one if you want to track spice
869 #                   sessions only
871 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
872 #              multiple channels of the same type exist, such as multiple
873 #              display channels in a multihead setup
875 # @tls: true if the channel is encrypted, false otherwise.
877 # Since: 0.14.0
879 { 'type': 'SpiceChannel',
880   'data': {'host': 'str', 'family': 'str', 'port': 'str',
881            'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
882            'tls': 'bool'} }
885 # @SpiceQueryMouseMode
887 # An enumeration of Spice mouse states.
889 # @client: Mouse cursor position is determined by the client.
891 # @server: Mouse cursor position is determined by the server.
893 # @unknown: No information is available about mouse mode used by
894 #           the spice server.
896 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
898 # Since: 1.1
900 { 'enum': 'SpiceQueryMouseMode',
901   'data': [ 'client', 'server', 'unknown' ] }
904 # @SpiceInfo
906 # Information about the SPICE session.
908 # @enabled: true if the SPICE server is enabled, false otherwise
910 # @migrated: true if the last guest migration completed and spice
911 #            migration had completed as well. false otherwise.
913 # @host: #optional The hostname the SPICE server is bound to.  This depends on
914 #        the name resolution on the host and may be an IP address.
916 # @port: #optional The SPICE server's port number.
918 # @compiled-version: #optional SPICE server version.
920 # @tls-port: #optional The SPICE server's TLS port number.
922 # @auth: #optional the current authentication type used by the server
923 #        'none'  if no authentication is being used
924 #        'spice' uses SASL or direct TLS authentication, depending on command
925 #                line options
927 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
928 #              be determined by the client or the server, or unknown if spice
929 #              server doesn't provide this information.
931 #              Since: 1.1
933 # @channels: a list of @SpiceChannel for each active spice channel
935 # Since: 0.14.0
937 { 'type': 'SpiceInfo',
938   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
939            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
940            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
943 # @query-spice
945 # Returns information about the current SPICE server
947 # Returns: @SpiceInfo
949 # Since: 0.14.0
951 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
954 # @BalloonInfo:
956 # Information about the guest balloon device.
958 # @actual: the number of bytes the balloon currently contains
960 # @mem_swapped_in: #optional number of pages swapped in within the guest
962 # @mem_swapped_out: #optional number of pages swapped out within the guest
964 # @major_page_faults: #optional number of major page faults within the guest
966 # @minor_page_faults: #optional number of minor page faults within the guest
968 # @free_mem: #optional amount of memory (in bytes) free in the guest
970 # @total_mem: #optional amount of memory (in bytes) visible to the guest
972 # Since: 0.14.0
974 # Notes: all current versions of QEMU do not fill out optional information in
975 #        this structure.
977 { 'type': 'BalloonInfo',
978   'data': {'actual': 'int', '*mem_swapped_in': 'int',
979            '*mem_swapped_out': 'int', '*major_page_faults': 'int',
980            '*minor_page_faults': 'int', '*free_mem': 'int',
981            '*total_mem': 'int'} }
984 # @query-balloon:
986 # Return information about the balloon device.
988 # Returns: @BalloonInfo on success
989 #          If the balloon driver is enabled but not functional because the KVM
990 #          kernel module cannot support it, KvmMissingCap
991 #          If no balloon device is present, DeviceNotActive
993 # Since: 0.14.0
995 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
998 # @PciMemoryRange:
1000 # A PCI device memory region
1002 # @base: the starting address (guest physical)
1004 # @limit: the ending address (guest physical)
1006 # Since: 0.14.0
1008 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1011 # @PciMemoryRegion
1013 # Information about a PCI device I/O region.
1015 # @bar: the index of the Base Address Register for this region
1017 # @type: 'io' if the region is a PIO region
1018 #        'memory' if the region is a MMIO region
1020 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1022 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1024 # Since: 0.14.0
1026 { 'type': 'PciMemoryRegion',
1027   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1028            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1031 # @PciBridgeInfo:
1033 # Information about a PCI Bridge device
1035 # @bus.number: primary bus interface number.  This should be the number of the
1036 #              bus the device resides on.
1038 # @bus.secondary: secondary bus interface number.  This is the number of the
1039 #                 main bus for the bridge
1041 # @bus.subordinate: This is the highest number bus that resides below the
1042 #                   bridge.
1044 # @bus.io_range: The PIO range for all devices on this bridge
1046 # @bus.memory_range: The MMIO range for all devices on this bridge
1048 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1049 #                          this bridge
1051 # @devices: a list of @PciDeviceInfo for each device on this bridge
1053 # Since: 0.14.0
1055 { 'type': 'PciBridgeInfo',
1056   'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1057                     'io_range': 'PciMemoryRange',
1058                     'memory_range': 'PciMemoryRange',
1059                     'prefetchable_range': 'PciMemoryRange' },
1060            '*devices': ['PciDeviceInfo']} }
1063 # @PciDeviceInfo:
1065 # Information about a PCI device
1067 # @bus: the bus number of the device
1069 # @slot: the slot the device is located in
1071 # @function: the function of the slot used by the device
1073 # @class_info.desc: #optional a string description of the device's class
1075 # @class_info.class: the class code of the device
1077 # @id.device: the PCI device id
1079 # @id.vendor: the PCI vendor id
1081 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1083 # @qdev_id: the device name of the PCI device
1085 # @pci_bridge: if the device is a PCI bridge, the bridge information
1087 # @regions: a list of the PCI I/O regions associated with the device
1089 # Notes: the contents of @class_info.desc are not stable and should only be
1090 #        treated as informational.
1092 # Since: 0.14.0
1094 { 'type': 'PciDeviceInfo',
1095   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1096            'class_info': {'*desc': 'str', 'class': 'int'},
1097            'id': {'device': 'int', 'vendor': 'int'},
1098            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1099            'regions': ['PciMemoryRegion']} }
1102 # @PciInfo:
1104 # Information about a PCI bus
1106 # @bus: the bus index
1108 # @devices: a list of devices on this bus
1110 # Since: 0.14.0
1112 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1115 # @query-pci:
1117 # Return information about the PCI bus topology of the guest.
1119 # Returns: a list of @PciInfo for each PCI bus
1121 # Since: 0.14.0
1123 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1126 # @BlockdevOnError:
1128 # An enumeration of possible behaviors for errors on I/O operations.
1129 # The exact meaning depends on whether the I/O was initiated by a guest
1130 # or by a block job
1132 # @report: for guest operations, report the error to the guest;
1133 #          for jobs, cancel the job
1135 # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1136 #          or BLOCK_JOB_ERROR)
1138 # @enospc: same as @stop on ENOSPC, same as @report otherwise.
1140 # @stop: for guest operations, stop the virtual machine;
1141 #        for jobs, pause the job
1143 # Since: 1.3
1145 { 'enum': 'BlockdevOnError',
1146   'data': ['report', 'ignore', 'enospc', 'stop'] }
1149 # @BlockJobInfo:
1151 # Information about a long-running block device operation.
1153 # @type: the job type ('stream' for image streaming)
1155 # @device: the block device name
1157 # @len: the maximum progress value
1159 # @busy: false if the job is known to be in a quiescent state, with
1160 #        no pending I/O.  Since 1.3.
1162 # @paused: whether the job is paused or, if @busy is true, will
1163 #          pause itself as soon as possible.  Since 1.3.
1165 # @offset: the current progress value
1167 # @speed: the rate limit, bytes per second
1169 # @io-status: the status of the job (since 1.3)
1171 # Since: 1.1
1173 { 'type': 'BlockJobInfo',
1174   'data': {'type': 'str', 'device': 'str', 'len': 'int',
1175            'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1176            'io-status': 'BlockDeviceIoStatus'} }
1179 # @query-block-jobs:
1181 # Return information about long-running block device operations.
1183 # Returns: a list of @BlockJobInfo for each active block job
1185 # Since: 1.1
1187 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1190 # @quit:
1192 # This command will cause the QEMU process to exit gracefully.  While every
1193 # attempt is made to send the QMP response before terminating, this is not
1194 # guaranteed.  When using this interface, a premature EOF would not be
1195 # unexpected.
1197 # Since: 0.14.0
1199 { 'command': 'quit' }
1202 # @stop:
1204 # Stop all guest VCPU execution.
1206 # Since:  0.14.0
1208 # Notes:  This function will succeed even if the guest is already in the stopped
1209 #         state
1211 { 'command': 'stop' }
1214 # @system_reset:
1216 # Performs a hard reset of a guest.
1218 # Since: 0.14.0
1220 { 'command': 'system_reset' }
1223 # @system_powerdown:
1225 # Requests that a guest perform a powerdown operation.
1227 # Since: 0.14.0
1229 # Notes: A guest may or may not respond to this command.  This command
1230 #        returning does not indicate that a guest has accepted the request or
1231 #        that it has shut down.  Many guests will respond to this command by
1232 #        prompting the user in some way.
1234 { 'command': 'system_powerdown' }
1237 # @cpu:
1239 # This command is a nop that is only provided for the purposes of compatibility.
1241 # Since: 0.14.0
1243 # Notes: Do not use this command.
1245 { 'command': 'cpu', 'data': {'index': 'int'} }
1248 # @memsave:
1250 # Save a portion of guest memory to a file.
1252 # @val: the virtual address of the guest to start from
1254 # @size: the size of memory region to save
1256 # @filename: the file to save the memory to as binary data
1258 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1259 #                       virtual address (defaults to CPU 0)
1261 # Returns: Nothing on success
1263 # Since: 0.14.0
1265 # Notes: Errors were not reliably returned until 1.1
1267 { 'command': 'memsave',
1268   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1271 # @pmemsave:
1273 # Save a portion of guest physical memory to a file.
1275 # @val: the physical address of the guest to start from
1277 # @size: the size of memory region to save
1279 # @filename: the file to save the memory to as binary data
1281 # Returns: Nothing on success
1283 # Since: 0.14.0
1285 # Notes: Errors were not reliably returned until 1.1
1287 { 'command': 'pmemsave',
1288   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1291 # @cont:
1293 # Resume guest VCPU execution.
1295 # Since:  0.14.0
1297 # Returns:  If successful, nothing
1298 #           If the QEMU is waiting for an incoming migration, MigrationExpected
1299 #           If QEMU was started with an encrypted block device and a key has
1300 #              not yet been set, DeviceEncrypted.
1302 # Notes:  This command will succeed if the guest is currently running.
1304 { 'command': 'cont' }
1307 # @system_wakeup:
1309 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1311 # Since:  1.1
1313 # Returns:  nothing.
1315 { 'command': 'system_wakeup' }
1318 # @inject-nmi:
1320 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1322 # Returns:  If successful, nothing
1324 # Since:  0.14.0
1326 # Notes: Only x86 Virtual Machines support this command.
1328 { 'command': 'inject-nmi' }
1331 # @set_link:
1333 # Sets the link status of a virtual network adapter.
1335 # @name: the device name of the virtual network adapter
1337 # @up: true to set the link status to be up
1339 # Returns: Nothing on success
1340 #          If @name is not a valid network device, DeviceNotFound
1342 # Since: 0.14.0
1344 # Notes: Not all network adapters support setting link status.  This command
1345 #        will succeed even if the network adapter does not support link status
1346 #        notification.
1348 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1351 # @block_passwd:
1353 # This command sets the password of a block device that has not been open
1354 # with a password and requires one.
1356 # The two cases where this can happen are a block device is created through
1357 # QEMU's initial command line or a block device is changed through the legacy
1358 # @change interface.
1360 # In the event that the block device is created through the initial command
1361 # line, the VM will start in the stopped state regardless of whether '-S' is
1362 # used.  The intention is for a management tool to query the block devices to
1363 # determine which ones are encrypted, set the passwords with this command, and
1364 # then start the guest with the @cont command.
1366 # @device:   the name of the device to set the password on
1368 # @password: the password to use for the device
1370 # Returns: nothing on success
1371 #          If @device is not a valid block device, DeviceNotFound
1372 #          If @device is not encrypted, DeviceNotEncrypted
1374 # Notes:  Not all block formats support encryption and some that do are not
1375 #         able to validate that a password is correct.  Disk corruption may
1376 #         occur if an invalid password is specified.
1378 # Since: 0.14.0
1380 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1383 # @balloon:
1385 # Request the balloon driver to change its balloon size.
1387 # @value: the target size of the balloon in bytes
1389 # Returns: Nothing on success
1390 #          If the balloon driver is enabled but not functional because the KVM
1391 #            kernel module cannot support it, KvmMissingCap
1392 #          If no balloon device is present, DeviceNotActive
1394 # Notes: This command just issues a request to the guest.  When it returns,
1395 #        the balloon size may not have changed.  A guest can change the balloon
1396 #        size independent of this command.
1398 # Since: 0.14.0
1400 { 'command': 'balloon', 'data': {'value': 'int'} }
1403 # @block_resize
1405 # Resize a block image while a guest is running.
1407 # @device:  the name of the device to get the image resized
1409 # @size:  new image size in bytes
1411 # Returns: nothing on success
1412 #          If @device is not a valid block device, DeviceNotFound
1414 # Since: 0.14.0
1416 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1419 # @NewImageMode
1421 # An enumeration that tells QEMU how to set the backing file path in
1422 # a new image file.
1424 # @existing: QEMU should look for an existing image file.
1426 # @absolute-paths: QEMU should create a new image with absolute paths
1427 # for the backing file.
1429 # Since: 1.1
1431 { 'enum': 'NewImageMode'
1432   'data': [ 'existing', 'absolute-paths' ] }
1435 # @BlockdevSnapshot
1437 # @device:  the name of the device to generate the snapshot from.
1439 # @snapshot-file: the target of the new image. A new file will be created.
1441 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1443 # @mode: #optional whether and how QEMU should create a new image, default is
1444 #        'absolute-paths'.
1446 { 'type': 'BlockdevSnapshot',
1447   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1448             '*mode': 'NewImageMode' } }
1451 # @BlockdevAction
1453 # A discriminated record of operations that can be performed with
1454 # @transaction.
1456 { 'union': 'BlockdevAction',
1457   'data': {
1458        'blockdev-snapshot-sync': 'BlockdevSnapshot',
1459    } }
1462 # @transaction
1464 # Atomically operate on a group of one or more block devices.  If
1465 # any operation fails, then the entire set of actions will be
1466 # abandoned and the appropriate error returned.  The only operation
1467 # supported is currently blockdev-snapshot-sync.
1469 #  List of:
1470 #  @BlockdevAction: information needed for the device snapshot
1472 # Returns: nothing on success
1473 #          If @device is not a valid block device, DeviceNotFound
1475 # Note: The transaction aborts on the first failure.  Therefore, there will
1476 # be only one device or snapshot file returned in an error condition, and
1477 # subsequent actions will not have been attempted.
1479 # Since 1.1
1481 { 'command': 'transaction',
1482   'data': { 'actions': [ 'BlockdevAction' ] } }
1485 # @blockdev-snapshot-sync
1487 # Generates a synchronous snapshot of a block device.
1489 # @device:  the name of the device to generate the snapshot from.
1491 # @snapshot-file: the target of the new image. If the file exists, or if it
1492 #                 is a device, the snapshot will be created in the existing
1493 #                 file/device. If does not exist, a new file will be created.
1495 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1497 # @mode: #optional whether and how QEMU should create a new image, default is
1498 #        'absolute-paths'.
1500 # Returns: nothing on success
1501 #          If @device is not a valid block device, DeviceNotFound
1503 # Since 0.14.0
1505 { 'command': 'blockdev-snapshot-sync',
1506   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1507             '*mode': 'NewImageMode'} }
1510 # @human-monitor-command:
1512 # Execute a command on the human monitor and return the output.
1514 # @command-line: the command to execute in the human monitor
1516 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1518 # Returns: the output of the command as a string
1520 # Since: 0.14.0
1522 # Notes: This command only exists as a stop-gap.  It's use is highly
1523 #        discouraged.  The semantics of this command are not guaranteed.
1525 #        Known limitations:
1527 #        o This command is stateless, this means that commands that depend
1528 #          on state information (such as getfd) might not work
1530 #       o Commands that prompt the user for data (eg. 'cont' when the block
1531 #         device is encrypted) don't currently work
1533 { 'command': 'human-monitor-command',
1534   'data': {'command-line': 'str', '*cpu-index': 'int'},
1535   'returns': 'str' }
1538 # @block-commit
1540 # Live commit of data from overlay image nodes into backing nodes - i.e.,
1541 # writes data between 'top' and 'base' into 'base'.
1543 # @device:  the name of the device
1545 # @base:   #optional The file name of the backing image to write data into.
1546 #                    If not specified, this is the deepest backing image
1548 # @top:              The file name of the backing image within the image chain,
1549 #                    which contains the topmost data to be committed down.
1550 #                    Note, the active layer as 'top' is currently unsupported.
1552 #                    If top == base, that is an error.
1555 # @speed:  #optional the maximum speed, in bytes per second
1557 # Returns: Nothing on success
1558 #          If commit or stream is already active on this device, DeviceInUse
1559 #          If @device does not exist, DeviceNotFound
1560 #          If image commit is not supported by this device, NotSupported
1561 #          If @base or @top is invalid, a generic error is returned
1562 #          If @top is the active layer, or omitted, a generic error is returned
1563 #          If @speed is invalid, InvalidParameter
1565 # Since: 1.3
1568 { 'command': 'block-commit',
1569   'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1570             '*speed': 'int' } }
1572 # @migrate_cancel
1574 # Cancel the current executing migration process.
1576 # Returns: nothing on success
1578 # Notes: This command succeeds even if there is no migration process running.
1580 # Since: 0.14.0
1582 { 'command': 'migrate_cancel' }
1585 # @migrate_set_downtime
1587 # Set maximum tolerated downtime for migration.
1589 # @value: maximum downtime in seconds
1591 # Returns: nothing on success
1593 # Since: 0.14.0
1595 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1598 # @migrate_set_speed
1600 # Set maximum speed for migration.
1602 # @value: maximum speed in bytes.
1604 # Returns: nothing on success
1606 # Notes: A value lesser than zero will be automatically round up to zero.
1608 # Since: 0.14.0
1610 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1613 # @migrate-set-cache-size
1615 # Set XBZRLE cache size
1617 # @value: cache size in bytes
1619 # The size will be rounded down to the nearest power of 2.
1620 # The cache size can be modified before and during ongoing migration
1622 # Returns: nothing on success
1624 # Since: 1.2
1626 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1629 # @query-migrate-cache-size
1631 # query XBZRLE cache size
1633 # Returns: XBZRLE cache size in bytes
1635 # Since: 1.2
1637 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1640 # @ObjectPropertyInfo:
1642 # @name: the name of the property
1644 # @type: the type of the property.  This will typically come in one of four
1645 #        forms:
1647 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1648 #           These types are mapped to the appropriate JSON type.
1650 #        2) A legacy type in the form 'legacy<subtype>' where subtype is the
1651 #           legacy qdev typename.  These types are always treated as strings.
1653 #        3) A child type in the form 'child<subtype>' where subtype is a qdev
1654 #           device type name.  Child properties create the composition tree.
1656 #        4) A link type in the form 'link<subtype>' where subtype is a qdev
1657 #           device type name.  Link properties form the device model graph.
1659 # Since: 1.2
1661 { 'type': 'ObjectPropertyInfo',
1662   'data': { 'name': 'str', 'type': 'str' } }
1665 # @qom-list:
1667 # This command will list any properties of a object given a path in the object
1668 # model.
1670 # @path: the path within the object model.  See @qom-get for a description of
1671 #        this parameter.
1673 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1674 #          object.
1676 # Since: 1.2
1678 { 'command': 'qom-list',
1679   'data': { 'path': 'str' },
1680   'returns': [ 'ObjectPropertyInfo' ] }
1683 # @qom-get:
1685 # This command will get a property from a object model path and return the
1686 # value.
1688 # @path: The path within the object model.  There are two forms of supported
1689 #        paths--absolute and partial paths.
1691 #        Absolute paths are derived from the root object and can follow child<>
1692 #        or link<> properties.  Since they can follow link<> properties, they
1693 #        can be arbitrarily long.  Absolute paths look like absolute filenames
1694 #        and are prefixed  with a leading slash.
1696 #        Partial paths look like relative filenames.  They do not begin
1697 #        with a prefix.  The matching rules for partial paths are subtle but
1698 #        designed to make specifying objects easy.  At each level of the
1699 #        composition tree, the partial path is matched as an absolute path.
1700 #        The first match is not returned.  At least two matches are searched
1701 #        for.  A successful result is only returned if only one match is
1702 #        found.  If more than one match is found, a flag is return to
1703 #        indicate that the match was ambiguous.
1705 # @property: The property name to read
1707 # Returns: The property value.  The type depends on the property type.  legacy<>
1708 #          properties are returned as #str.  child<> and link<> properties are
1709 #          returns as #str pathnames.  All integer property types (u8, u16, etc)
1710 #          are returned as #int.
1712 # Since: 1.2
1714 { 'command': 'qom-get',
1715   'data': { 'path': 'str', 'property': 'str' },
1716   'returns': 'visitor',
1717   'gen': 'no' }
1720 # @qom-set:
1722 # This command will set a property from a object model path.
1724 # @path: see @qom-get for a description of this parameter
1726 # @property: the property name to set
1728 # @value: a value who's type is appropriate for the property type.  See @qom-get
1729 #         for a description of type mapping.
1731 # Since: 1.2
1733 { 'command': 'qom-set',
1734   'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1735   'gen': 'no' }
1738 # @set_password:
1740 # Sets the password of a remote display session.
1742 # @protocol: `vnc' to modify the VNC server password
1743 #            `spice' to modify the Spice server password
1745 # @password: the new password
1747 # @connected: #optional how to handle existing clients when changing the
1748 #                       password.  If nothing is specified, defaults to `keep'
1749 #                       `fail' to fail the command if clients are connected
1750 #                       `disconnect' to disconnect existing clients
1751 #                       `keep' to maintain existing clients
1753 # Returns: Nothing on success
1754 #          If Spice is not enabled, DeviceNotFound
1756 # Since: 0.14.0
1758 { 'command': 'set_password',
1759   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1762 # @expire_password:
1764 # Expire the password of a remote display server.
1766 # @protocol: the name of the remote display protocol `vnc' or `spice'
1768 # @time: when to expire the password.
1769 #        `now' to expire the password immediately
1770 #        `never' to cancel password expiration
1771 #        `+INT' where INT is the number of seconds from now (integer)
1772 #        `INT' where INT is the absolute time in seconds
1774 # Returns: Nothing on success
1775 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
1777 # Since: 0.14.0
1779 # Notes: Time is relative to the server and currently there is no way to
1780 #        coordinate server time with client time.  It is not recommended to
1781 #        use the absolute time version of the @time parameter unless you're
1782 #        sure you are on the same machine as the QEMU instance.
1784 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1787 # @eject:
1789 # Ejects a device from a removable drive.
1791 # @device:  The name of the device
1793 # @force:   @optional If true, eject regardless of whether the drive is locked.
1794 #           If not specified, the default value is false.
1796 # Returns:  Nothing on success
1797 #           If @device is not a valid block device, DeviceNotFound
1799 # Notes:    Ejecting a device will no media results in success
1801 # Since: 0.14.0
1803 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
1806 # @change-vnc-password:
1808 # Change the VNC server password.
1810 # @target:  the new password to use with VNC authentication
1812 # Since: 1.1
1814 # Notes:  An empty password in this command will set the password to the empty
1815 #         string.  Existing clients are unaffected by executing this command.
1817 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1820 # @change:
1822 # This command is multiple commands multiplexed together.
1824 # @device: This is normally the name of a block device but it may also be 'vnc'.
1825 #          when it's 'vnc', then sub command depends on @target
1827 # @target: If @device is a block device, then this is the new filename.
1828 #          If @device is 'vnc', then if the value 'password' selects the vnc
1829 #          change password command.   Otherwise, this specifies a new server URI
1830 #          address to listen to for VNC connections.
1832 # @arg:    If @device is a block device, then this is an optional format to open
1833 #          the device with.
1834 #          If @device is 'vnc' and @target is 'password', this is the new VNC
1835 #          password to set.  If this argument is an empty string, then no future
1836 #          logins will be allowed.
1838 # Returns: Nothing on success.
1839 #          If @device is not a valid block device, DeviceNotFound
1840 #          If the new block device is encrypted, DeviceEncrypted.  Note that
1841 #          if this error is returned, the device has been opened successfully
1842 #          and an additional call to @block_passwd is required to set the
1843 #          device's password.  The behavior of reads and writes to the block
1844 #          device between when these calls are executed is undefined.
1846 # Notes:  It is strongly recommended that this interface is not used especially
1847 #         for changing block devices.
1849 # Since: 0.14.0
1851 { 'command': 'change',
1852   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1855 # @block_set_io_throttle:
1857 # Change I/O throttle limits for a block drive.
1859 # @device: The name of the device
1861 # @bps: total throughput limit in bytes per second
1863 # @bps_rd: read throughput limit in bytes per second
1865 # @bps_wr: write throughput limit in bytes per second
1867 # @iops: total I/O operations per second
1869 # @ops_rd: read I/O operations per second
1871 # @iops_wr: write I/O operations per second
1873 # Returns: Nothing on success
1874 #          If @device is not a valid block device, DeviceNotFound
1876 # Since: 1.1
1878 { 'command': 'block_set_io_throttle',
1879   'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
1880             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
1883 # @block-stream:
1885 # Copy data from a backing file into a block device.
1887 # The block streaming operation is performed in the background until the entire
1888 # backing file has been copied.  This command returns immediately once streaming
1889 # has started.  The status of ongoing block streaming operations can be checked
1890 # with query-block-jobs.  The operation can be stopped before it has completed
1891 # using the block-job-cancel command.
1893 # If a base file is specified then sectors are not copied from that base file and
1894 # its backing chain.  When streaming completes the image file will have the base
1895 # file as its backing file.  This can be used to stream a subset of the backing
1896 # file chain instead of flattening the entire image.
1898 # On successful completion the image file is updated to drop the backing file
1899 # and the BLOCK_JOB_COMPLETED event is emitted.
1901 # @device: the device name
1903 # @base:   #optional the common backing file name
1905 # @speed:  #optional the maximum speed, in bytes per second
1907 # @on-error: #optional the action to take on an error (default report).
1908 #            'stop' and 'enospc' can only be used if the block device
1909 #            supports io-status (see BlockInfo).  Since 1.3.
1911 # Returns: Nothing on success
1912 #          If @device does not exist, DeviceNotFound
1914 # Since: 1.1
1916 { 'command': 'block-stream',
1917   'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
1918             '*on-error': 'BlockdevOnError' } }
1921 # @block-job-set-speed:
1923 # Set maximum speed for a background block operation.
1925 # This command can only be issued when there is an active block job.
1927 # Throttling can be disabled by setting the speed to 0.
1929 # @device: the device name
1931 # @speed:  the maximum speed, in bytes per second, or 0 for unlimited.
1932 #          Defaults to 0.
1934 # Returns: Nothing on success
1935 #          If no background operation is active on this device, DeviceNotActive
1937 # Since: 1.1
1939 { 'command': 'block-job-set-speed',
1940   'data': { 'device': 'str', 'speed': 'int' } }
1943 # @block-job-cancel:
1945 # Stop an active background block operation.
1947 # This command returns immediately after marking the active background block
1948 # operation for cancellation.  It is an error to call this command if no
1949 # operation is in progress.
1951 # The operation will cancel as soon as possible and then emit the
1952 # BLOCK_JOB_CANCELLED event.  Before that happens the job is still visible when
1953 # enumerated using query-block-jobs.
1955 # For streaming, the image file retains its backing file unless the streaming
1956 # operation happens to complete just as it is being cancelled.  A new streaming
1957 # operation can be started at a later time to finish copying all data from the
1958 # backing file.
1960 # @device: the device name
1962 # @force: #optional whether to allow cancellation of a paused job (default
1963 #         false).  Since 1.3.
1965 # Returns: Nothing on success
1966 #          If no background operation is active on this device, DeviceNotActive
1968 # Since: 1.1
1970 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
1973 # @block-job-pause:
1975 # Pause an active background block operation.
1977 # This command returns immediately after marking the active background block
1978 # operation for pausing.  It is an error to call this command if no
1979 # operation is in progress.  Pausing an already paused job has no cumulative
1980 # effect; a single block-job-resume command will resume the job.
1982 # The operation will pause as soon as possible.  No event is emitted when
1983 # the operation is actually paused.  Cancelling a paused job automatically
1984 # resumes it.
1986 # @device: the device name
1988 # Returns: Nothing on success
1989 #          If no background operation is active on this device, DeviceNotActive
1991 # Since: 1.3
1993 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
1996 # @block-job-resume:
1998 # Resume an active background block operation.
2000 # This command returns immediately after resuming a paused background block
2001 # operation.  It is an error to call this command if no operation is in
2002 # progress.  Resuming an already running job is not an error.
2004 # This command also clears the error status of the job.
2006 # @device: the device name
2008 # Returns: Nothing on success
2009 #          If no background operation is active on this device, DeviceNotActive
2011 # Since: 1.3
2013 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
2016 # @ObjectTypeInfo:
2018 # This structure describes a search result from @qom-list-types
2020 # @name: the type name found in the search
2022 # Since: 1.1
2024 # Notes: This command is experimental and may change syntax in future releases.
2026 { 'type': 'ObjectTypeInfo',
2027   'data': { 'name': 'str' } }
2030 # @qom-list-types:
2032 # This command will return a list of types given search parameters
2034 # @implements: if specified, only return types that implement this type name
2036 # @abstract: if true, include abstract types in the results
2038 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2040 # Since: 1.1
2042 { 'command': 'qom-list-types',
2043   'data': { '*implements': 'str', '*abstract': 'bool' },
2044   'returns': [ 'ObjectTypeInfo' ] }
2047 # @DevicePropertyInfo:
2049 # Information about device properties.
2051 # @name: the name of the property
2052 # @type: the typename of the property
2054 # Since: 1.2
2056 { 'type': 'DevicePropertyInfo',
2057   'data': { 'name': 'str', 'type': 'str' } }
2060 # @device-list-properties:
2062 # List properties associated with a device.
2064 # @typename: the type name of a device
2066 # Returns: a list of DevicePropertyInfo describing a devices properties
2068 # Since: 1.2
2070 { 'command': 'device-list-properties',
2071   'data': { 'typename': 'str'},
2072   'returns': [ 'DevicePropertyInfo' ] }
2075 # @migrate
2077 # Migrates the current running guest to another Virtual Machine.
2079 # @uri: the Uniform Resource Identifier of the destination VM
2081 # @blk: #optional do block migration (full disk copy)
2083 # @inc: #optional incremental disk copy migration
2085 # @detach: this argument exists only for compatibility reasons and
2086 #          is ignored by QEMU
2088 # Returns: nothing on success
2090 # Since: 0.14.0
2092 { 'command': 'migrate',
2093   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2095 # @xen-save-devices-state:
2097 # Save the state of all devices to file. The RAM and the block devices
2098 # of the VM are not saved by this command.
2100 # @filename: the file to save the state of the devices to as binary
2101 # data. See xen-save-devices-state.txt for a description of the binary
2102 # format.
2104 # Returns: Nothing on success
2106 # Since: 1.1
2108 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2111 # @xen-set-global-dirty-log
2113 # Enable or disable the global dirty log mode.
2115 # @enable: true to enable, false to disable.
2117 # Returns: nothing
2119 # Since: 1.3
2121 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2124 # @device_del:
2126 # Remove a device from a guest
2128 # @id: the name of the device
2130 # Returns: Nothing on success
2131 #          If @id is not a valid device, DeviceNotFound
2133 # Notes: When this command completes, the device may not be removed from the
2134 #        guest.  Hot removal is an operation that requires guest cooperation.
2135 #        This command merely requests that the guest begin the hot removal
2136 #        process.
2138 # Since: 0.14.0
2140 { 'command': 'device_del', 'data': {'id': 'str'} }
2143 # @dump-guest-memory
2145 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2146 # very long depending on the amount of guest memory. This command is only
2147 # supported on i386 and x86_64.
2149 # @paging: if true, do paging to get guest's memory mapping. This allows
2150 #          using gdb to process the core file.
2152 #          IMPORTANT: this option can make QEMU allocate several gigabytes
2153 #                     of RAM. This can happen for a large guest, or a
2154 #                     malicious guest pretending to be large.
2156 #          Also, paging=true has the following limitations:
2158 #             1. The guest may be in a catastrophic state or can have corrupted
2159 #                memory, which cannot be trusted
2160 #             2. The guest can be in real-mode even if paging is enabled. For
2161 #                example, the guest uses ACPI to sleep, and ACPI sleep state
2162 #                goes in real-mode
2164 # @protocol: the filename or file descriptor of the vmcore. The supported
2165 #            protocols are:
2167 #            1. file: the protocol starts with "file:", and the following
2168 #               string is the file's path.
2169 #            2. fd: the protocol starts with "fd:", and the following string
2170 #               is the fd's name.
2172 # @begin: #optional if specified, the starting physical address.
2174 # @length: #optional if specified, the memory size, in bytes. If you don't
2175 #          want to dump all guest's memory, please specify the start @begin
2176 #          and @length
2178 # Returns: nothing on success
2180 # Since: 1.2
2182 { 'command': 'dump-guest-memory',
2183   'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2184             '*length': 'int' } }
2187 # @netdev_add:
2189 # Add a network backend.
2191 # @type: the type of network backend.  Current valid values are 'user', 'tap',
2192 #        'vde', 'socket', 'dump' and 'bridge'
2194 # @id: the name of the new network backend
2196 # @props: #optional a list of properties to be passed to the backend in
2197 #         the format 'name=value', like 'ifname=tap0,script=no'
2199 # Notes: The semantics of @props is not well defined.  Future commands will be
2200 #        introduced that provide stronger typing for backend creation.
2202 # Since: 0.14.0
2204 # Returns: Nothing on success
2205 #          If @type is not a valid network backend, DeviceNotFound
2207 { 'command': 'netdev_add',
2208   'data': {'type': 'str', 'id': 'str', '*props': '**'},
2209   'gen': 'no' }
2212 # @netdev_del:
2214 # Remove a network backend.
2216 # @id: the name of the network backend to remove
2218 # Returns: Nothing on success
2219 #          If @id is not a valid network backend, DeviceNotFound
2221 # Since: 0.14.0
2223 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2226 # @NetdevNoneOptions
2228 # Use it alone to have zero network devices.
2230 # Since 1.2
2232 { 'type': 'NetdevNoneOptions',
2233   'data': { } }
2236 # @NetLegacyNicOptions
2238 # Create a new Network Interface Card.
2240 # @netdev: #optional id of -netdev to connect to
2242 # @macaddr: #optional MAC address
2244 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2246 # @addr: #optional PCI device address
2248 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2250 # Since 1.2
2252 { 'type': 'NetLegacyNicOptions',
2253   'data': {
2254     '*netdev':  'str',
2255     '*macaddr': 'str',
2256     '*model':   'str',
2257     '*addr':    'str',
2258     '*vectors': 'uint32' } }
2261 # @String
2263 # A fat type wrapping 'str', to be embedded in lists.
2265 # Since 1.2
2267 { 'type': 'String',
2268   'data': {
2269     'str': 'str' } }
2272 # @NetdevUserOptions
2274 # Use the user mode network stack which requires no administrator privilege to
2275 # run.
2277 # @hostname: #optional client hostname reported by the builtin DHCP server
2279 # @restrict: #optional isolate the guest from the host
2281 # @ip: #optional legacy parameter, use net= instead
2283 # @net: #optional IP address and optional netmask
2285 # @host: #optional guest-visible address of the host
2287 # @tftp: #optional root directory of the built-in TFTP server
2289 # @bootfile: #optional BOOTP filename, for use with tftp=
2291 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2292 #             assign
2294 # @dns: #optional guest-visible address of the virtual nameserver
2296 # @smb: #optional root directory of the built-in SMB server
2298 # @smbserver: #optional IP address of the built-in SMB server
2300 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2301 #           endpoints
2303 # @guestfwd: #optional forward guest TCP connections
2305 # Since 1.2
2307 { 'type': 'NetdevUserOptions',
2308   'data': {
2309     '*hostname':  'str',
2310     '*restrict':  'bool',
2311     '*ip':        'str',
2312     '*net':       'str',
2313     '*host':      'str',
2314     '*tftp':      'str',
2315     '*bootfile':  'str',
2316     '*dhcpstart': 'str',
2317     '*dns':       'str',
2318     '*smb':       'str',
2319     '*smbserver': 'str',
2320     '*hostfwd':   ['String'],
2321     '*guestfwd':  ['String'] } }
2324 # @NetdevTapOptions
2326 # Connect the host TAP network interface name to the VLAN.
2328 # @ifname: #optional interface name
2330 # @fd: #optional file descriptor of an already opened tap
2332 # @script: #optional script to initialize the interface
2334 # @downscript: #optional script to shut down the interface
2336 # @helper: #optional command to execute to configure bridge
2338 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2340 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2342 # @vhost: #optional enable vhost-net network accelerator
2344 # @vhostfd: #optional file descriptor of an already opened vhost net device
2346 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2348 # Since 1.2
2350 { 'type': 'NetdevTapOptions',
2351   'data': {
2352     '*ifname':     'str',
2353     '*fd':         'str',
2354     '*script':     'str',
2355     '*downscript': 'str',
2356     '*helper':     'str',
2357     '*sndbuf':     'size',
2358     '*vnet_hdr':   'bool',
2359     '*vhost':      'bool',
2360     '*vhostfd':    'str',
2361     '*vhostforce': 'bool' } }
2364 # @NetdevSocketOptions
2366 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2367 # socket connection.
2369 # @fd: #optional file descriptor of an already opened socket
2371 # @listen: #optional port number, and optional hostname, to listen on
2373 # @connect: #optional port number, and optional hostname, to connect to
2375 # @mcast: #optional UDP multicast address and port number
2377 # @localaddr: #optional source address and port for multicast and udp packets
2379 # @udp: #optional UDP unicast address and port number
2381 # Since 1.2
2383 { 'type': 'NetdevSocketOptions',
2384   'data': {
2385     '*fd':        'str',
2386     '*listen':    'str',
2387     '*connect':   'str',
2388     '*mcast':     'str',
2389     '*localaddr': 'str',
2390     '*udp':       'str' } }
2393 # @NetdevVdeOptions
2395 # Connect the VLAN to a vde switch running on the host.
2397 # @sock: #optional socket path
2399 # @port: #optional port number
2401 # @group: #optional group owner of socket
2403 # @mode: #optional permissions for socket
2405 # Since 1.2
2407 { 'type': 'NetdevVdeOptions',
2408   'data': {
2409     '*sock':  'str',
2410     '*port':  'uint16',
2411     '*group': 'str',
2412     '*mode':  'uint16' } }
2415 # @NetdevDumpOptions
2417 # Dump VLAN network traffic to a file.
2419 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2420 # suffixes.
2422 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2424 # Since 1.2
2426 { 'type': 'NetdevDumpOptions',
2427   'data': {
2428     '*len':  'size',
2429     '*file': 'str' } }
2432 # @NetdevBridgeOptions
2434 # Connect a host TAP network interface to a host bridge device.
2436 # @br: #optional bridge name
2438 # @helper: #optional command to execute to configure bridge
2440 # Since 1.2
2442 { 'type': 'NetdevBridgeOptions',
2443   'data': {
2444     '*br':     'str',
2445     '*helper': 'str' } }
2448 # @NetdevHubPortOptions
2450 # Connect two or more net clients through a software hub.
2452 # @hubid: hub identifier number
2454 # Since 1.2
2456 { 'type': 'NetdevHubPortOptions',
2457   'data': {
2458     'hubid':     'int32' } }
2461 # @NetClientOptions
2463 # A discriminated record of network device traits.
2465 # Since 1.2
2467 { 'union': 'NetClientOptions',
2468   'data': {
2469     'none':     'NetdevNoneOptions',
2470     'nic':      'NetLegacyNicOptions',
2471     'user':     'NetdevUserOptions',
2472     'tap':      'NetdevTapOptions',
2473     'socket':   'NetdevSocketOptions',
2474     'vde':      'NetdevVdeOptions',
2475     'dump':     'NetdevDumpOptions',
2476     'bridge':   'NetdevBridgeOptions',
2477     'hubport':  'NetdevHubPortOptions' } }
2480 # @NetLegacy
2482 # Captures the configuration of a network device; legacy.
2484 # @vlan: #optional vlan number
2486 # @id: #optional identifier for monitor commands
2488 # @name: #optional identifier for monitor commands, ignored if @id is present
2490 # @opts: device type specific properties (legacy)
2492 # Since 1.2
2494 { 'type': 'NetLegacy',
2495   'data': {
2496     '*vlan': 'int32',
2497     '*id':   'str',
2498     '*name': 'str',
2499     'opts':  'NetClientOptions' } }
2502 # @Netdev
2504 # Captures the configuration of a network device.
2506 # @id: identifier for monitor commands.
2508 # @opts: device type specific properties
2510 # Since 1.2
2512 { 'type': 'Netdev',
2513   'data': {
2514     'id':   'str',
2515     'opts': 'NetClientOptions' } }
2518 # @getfd:
2520 # Receive a file descriptor via SCM rights and assign it a name
2522 # @fdname: file descriptor name
2524 # Returns: Nothing on success
2526 # Since: 0.14.0
2528 # Notes: If @fdname already exists, the file descriptor assigned to
2529 #        it will be closed and replaced by the received file
2530 #        descriptor.
2531 #        The 'closefd' command can be used to explicitly close the
2532 #        file descriptor when it is no longer needed.
2534 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2537 # @closefd:
2539 # Close a file descriptor previously passed via SCM rights
2541 # @fdname: file descriptor name
2543 # Returns: Nothing on success
2545 # Since: 0.14.0
2547 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2550 # @MachineInfo:
2552 # Information describing a machine.
2554 # @name: the name of the machine
2556 # @alias: #optional an alias for the machine name
2558 # @default: #optional whether the machine is default
2560 # Since: 1.2.0
2562 { 'type': 'MachineInfo',
2563   'data': { 'name': 'str', '*alias': 'str',
2564             '*is-default': 'bool' } }
2567 # @query-machines:
2569 # Return a list of supported machines
2571 # Returns: a list of MachineInfo
2573 # Since: 1.2.0
2575 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2578 # @CpuDefinitionInfo:
2580 # Virtual CPU definition.
2582 # @name: the name of the CPU definition
2584 # Since: 1.2.0
2586 { 'type': 'CpuDefinitionInfo',
2587   'data': { 'name': 'str' } }
2590 # @query-cpu-definitions:
2592 # Return a list of supported virtual CPU definitions
2594 # Returns: a list of CpuDefInfo
2596 # Since: 1.2.0
2598 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2600 # @AddfdInfo:
2602 # Information about a file descriptor that was added to an fd set.
2604 # @fdset-id: The ID of the fd set that @fd was added to.
2606 # @fd: The file descriptor that was received via SCM rights and
2607 #      added to the fd set.
2609 # Since: 1.2.0
2611 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2614 # @add-fd:
2616 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2618 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2620 # @opaque: #optional A free-form string that can be used to describe the fd.
2622 # Returns: @AddfdInfo on success
2623 #          If file descriptor was not received, FdNotSupplied
2624 #          If @fdset-id does not exist, InvalidParameterValue
2626 # Notes: The list of fd sets is shared by all monitor connections.
2628 #        If @fdset-id is not specified, a new fd set will be created.
2630 # Since: 1.2.0
2632 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2633   'returns': 'AddfdInfo' }
2636 # @remove-fd:
2638 # Remove a file descriptor from an fd set.
2640 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2642 # @fd: #optional The file descriptor that is to be removed.
2644 # Returns: Nothing on success
2645 #          If @fdset-id or @fd is not found, FdNotFound
2647 # Since: 1.2.0
2649 # Notes: The list of fd sets is shared by all monitor connections.
2651 #        If @fd is not specified, all file descriptors in @fdset-id
2652 #        will be removed.
2654 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2657 # @FdsetFdInfo:
2659 # Information about a file descriptor that belongs to an fd set.
2661 # @fd: The file descriptor value.
2663 # @opaque: #optional A free-form string that can be used to describe the fd.
2665 # Since: 1.2.0
2667 { 'type': 'FdsetFdInfo',
2668   'data': {'fd': 'int', '*opaque': 'str'} }
2671 # @FdsetInfo:
2673 # Information about an fd set.
2675 # @fdset-id: The ID of the fd set.
2677 # @fds: A list of file descriptors that belong to this fd set.
2679 # Since: 1.2.0
2681 { 'type': 'FdsetInfo',
2682   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2685 # @query-fdsets:
2687 # Return information describing all fd sets.
2689 # Returns: A list of @FdsetInfo
2691 # Since: 1.2.0
2693 # Note: The list of fd sets is shared by all monitor connections.
2696 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2699 # @TargetType
2701 # Target CPU emulation type
2703 # These parameters correspond to the softmmu binary CPU name that is currently
2704 # running.
2706 # Since: 1.2.0
2708 { 'enum': 'TargetType',
2709   'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel',
2710             'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'or32',
2711             'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4', 'sparc64',
2712             'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] }
2715 # @TargetInfo:
2717 # Information describing the QEMU target.
2719 # @arch: the target architecture (eg "x86_64", "i386", etc)
2721 # Since: 1.2.0
2723 { 'type': 'TargetInfo',
2724   'data': { 'arch': 'TargetType' } }
2727 # @query-target:
2729 # Return information about the target for this QEMU
2731 # Returns: TargetInfo
2733 # Since: 1.2.0
2735 { 'command': 'query-target', 'returns': 'TargetInfo' }
2738 # @QKeyCode:
2740 # An enumeration of key name.
2742 # This is used by the send-key command.
2744 # Since: 1.3.0
2746 { 'enum': 'QKeyCode',
2747   'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
2748             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
2749             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
2750             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
2751             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
2752             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
2753             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
2754             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
2755             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
2756             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
2757             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
2758             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
2759             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
2760             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
2761              'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
2764 # @KeyValue
2766 # Represents a keyboard key.
2768 # Since: 1.3.0
2770 { 'union': 'KeyValue',
2771   'data': {
2772     'number': 'int',
2773     'qcode': 'QKeyCode' } }
2776 # @send-key:
2778 # Send keys to guest.
2780 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
2781 #        simultaneously sent to the guest. A @KeyValue.number value is sent
2782 #        directly to the guest, while @KeyValue.qcode must be a valid
2783 #        @QKeyCode value
2785 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
2786 #             to 100
2788 # Returns: Nothing on success
2789 #          If key is unknown or redundant, InvalidParameter
2791 # Since: 1.3.0
2794 { 'command': 'send-key',
2795   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
2798 # @screendump:
2800 # Write a PPM of the VGA screen to a file.
2802 # @filename: the path of a new PPM file to store the image
2804 # Returns: Nothing on success
2806 # Since: 0.14.0
2808 { 'command': 'screendump', 'data': {'filename': 'str'} }