block: add drive-backup QMP command
[qemu-kvm.git] / qapi-schema.json
blob6fe7efc65a5e1077fe9e80443864ff280542ee4b
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 # Since: 1.2
27 { 'enum': 'ErrorClass',
28   'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
29             'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
32 # @add_client
34 # Allow client connections for VNC, Spice and socket based
35 # character devices to be passed in to QEMU via SCM_RIGHTS.
37 # @protocol: protocol name. Valid names are "vnc", "spice" or the
38 #            name of a character device (eg. from -chardev id=XXXX)
40 # @fdname: file descriptor name previously passed via 'getfd' command
42 # @skipauth: #optional whether to skip authentication. Only applies
43 #            to "vnc" and "spice" protocols
45 # @tls: #optional whether to perform TLS. Only applies to the "spice"
46 #       protocol
48 # Returns: nothing on success.
50 # Since: 0.14.0
52 { 'command': 'add_client',
53   'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
54             '*tls': 'bool' } }
57 # @NameInfo:
59 # Guest name information.
61 # @name: #optional The name of the guest
63 # Since 0.14.0
65 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
68 # @query-name:
70 # Return the name information of a guest.
72 # Returns: @NameInfo of the guest
74 # Since 0.14.0
76 { 'command': 'query-name', 'returns': 'NameInfo' }
79 # @VersionInfo:
81 # A description of QEMU's version.
83 # @qemu.major:  The major version of QEMU
85 # @qemu.minor:  The minor version of QEMU
87 # @qemu.micro:  The micro version of QEMU.  By current convention, a micro
88 #               version of 50 signifies a development branch.  A micro version
89 #               greater than or equal to 90 signifies a release candidate for
90 #               the next minor version.  A micro version of less than 50
91 #               signifies a stable release.
93 # @package:     QEMU will always set this field to an empty string.  Downstream
94 #               versions of QEMU should set this to a non-empty string.  The
95 #               exact format depends on the downstream however it highly
96 #               recommended that a unique name is used.
98 # Since: 0.14.0
100 { 'type': 'VersionInfo',
101   'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
102            'package': 'str'} }
105 # @query-version:
107 # Returns the current version of QEMU.
109 # Returns:  A @VersionInfo object describing the current version of QEMU.
111 # Since: 0.14.0
113 { 'command': 'query-version', 'returns': 'VersionInfo' }
116 # @KvmInfo:
118 # Information about support for KVM acceleration
120 # @enabled: true if KVM acceleration is active
122 # @present: true if KVM acceleration is built into this executable
124 # Since: 0.14.0
126 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
129 # @query-kvm:
131 # Returns information about KVM acceleration
133 # Returns: @KvmInfo
135 # Since: 0.14.0
137 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
140 # @RunState
142 # An enumeration of VM run states.
144 # @debug: QEMU is running on a debugger
146 # @finish-migrate: guest is paused to finish the migration process
148 # @inmigrate: guest is paused waiting for an incoming migration.  Note
149 # that this state does not tell whether the machine will start at the
150 # end of the migration.  This depends on the command-line -S option and
151 # any invocation of 'stop' or 'cont' that has happened since QEMU was
152 # started.
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 # @guest-panicked: guest has been panicked as a result of guest OS panic
180 { 'enum': 'RunState',
181   'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
182             'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
183             'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
184             'guest-panicked' ] }
187 # @SnapshotInfo
189 # @id: unique snapshot id
191 # @name: user chosen name
193 # @vm-state-size: size of the VM state
195 # @date-sec: UTC date of the snapshot in seconds
197 # @date-nsec: fractional part in nano seconds to be used with date-sec
199 # @vm-clock-sec: VM clock relative to boot in seconds
201 # @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec
203 # Since: 1.3
207 { 'type': 'SnapshotInfo',
208   'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
209             'date-sec': 'int', 'date-nsec': 'int',
210             'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } }
213 # @ImageInfo:
215 # Information about a QEMU image file
217 # @filename: name of the image file
219 # @format: format of the image file
221 # @virtual-size: maximum capacity in bytes of the image
223 # @actual-size: #optional actual size on disk in bytes of the image
225 # @dirty-flag: #optional true if image is not cleanly closed
227 # @cluster-size: #optional size of a cluster in bytes
229 # @encrypted: #optional true if the image is encrypted
231 # @backing-filename: #optional name of the backing file
233 # @full-backing-filename: #optional full path of the backing file
235 # @backing-filename-format: #optional the format of the backing file
237 # @snapshots: #optional list of VM snapshots
239 # @backing-image: #optional info of the backing image (since 1.6)
241 # Since: 1.3
245 { 'type': 'ImageInfo',
246   'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
247            '*actual-size': 'int', 'virtual-size': 'int',
248            '*cluster-size': 'int', '*encrypted': 'bool',
249            '*backing-filename': 'str', '*full-backing-filename': 'str',
250            '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'],
251            '*backing-image': 'ImageInfo' } }
254 # @ImageCheck:
256 # Information about a QEMU image file check
258 # @filename: name of the image file checked
260 # @format: format of the image file checked
262 # @check-errors: number of unexpected errors occurred during check
264 # @image-end-offset: #optional offset (in bytes) where the image ends, this
265 #                    field is present if the driver for the image format
266 #                    supports it
268 # @corruptions: #optional number of corruptions found during the check if any
270 # @leaks: #optional number of leaks found during the check if any
272 # @corruptions-fixed: #optional number of corruptions fixed during the check
273 #                     if any
275 # @leaks-fixed: #optional number of leaks fixed during the check if any
277 # @total-clusters: #optional total number of clusters, this field is present
278 #                  if the driver for the image format supports it
280 # @allocated-clusters: #optional total number of allocated clusters, this
281 #                      field is present if the driver for the image format
282 #                      supports it
284 # @fragmented-clusters: #optional total number of fragmented clusters, this
285 #                       field is present if the driver for the image format
286 #                       supports it
288 # @compressed-clusters: #optional total number of compressed clusters, this
289 #                       field is present if the driver for the image format
290 #                       supports it
292 # Since: 1.4
296 { 'type': 'ImageCheck',
297   'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
298            '*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int',
299            '*corruptions-fixed': 'int', '*leaks-fixed': 'int',
300            '*total-clusters': 'int', '*allocated-clusters': 'int',
301            '*fragmented-clusters': 'int', '*compressed-clusters': 'int' } }
304 # @StatusInfo:
306 # Information about VCPU run state
308 # @running: true if all VCPUs are runnable, false if not runnable
310 # @singlestep: true if VCPUs are in single-step mode
312 # @status: the virtual machine @RunState
314 # Since:  0.14.0
316 # Notes: @singlestep is enabled through the GDB stub
318 { 'type': 'StatusInfo',
319   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
322 # @query-status:
324 # Query the run status of all VCPUs
326 # Returns: @StatusInfo reflecting all VCPUs
328 # Since:  0.14.0
330 { 'command': 'query-status', 'returns': 'StatusInfo' }
333 # @UuidInfo:
335 # Guest UUID information.
337 # @UUID: the UUID of the guest
339 # Since: 0.14.0
341 # Notes: If no UUID was specified for the guest, a null UUID is returned.
343 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
346 # @query-uuid:
348 # Query the guest UUID information.
350 # Returns: The @UuidInfo for the guest
352 # Since 0.14.0
354 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
357 # @ChardevInfo:
359 # Information about a character device.
361 # @label: the label of the character device
363 # @filename: the filename of the character device
365 # Notes: @filename is encoded using the QEMU command line character device
366 #        encoding.  See the QEMU man page for details.
368 # Since: 0.14.0
370 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
373 # @query-chardev:
375 # Returns information about current character devices.
377 # Returns: a list of @ChardevInfo
379 # Since: 0.14.0
381 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
384 # @DataFormat:
386 # An enumeration of data format.
388 # @utf8: Data is a UTF-8 string (RFC 3629)
390 # @base64: Data is Base64 encoded binary (RFC 3548)
392 # Since: 1.4
394 { 'enum': 'DataFormat',
395   'data': [ 'utf8', 'base64' ] }
398 # @ringbuf-write:
400 # Write to a ring buffer character device.
402 # @device: the ring buffer character device name
404 # @data: data to write
406 # @format: #optional data encoding (default 'utf8').
407 #          - base64: data must be base64 encoded text.  Its binary
408 #            decoding gets written.
409 #            Bug: invalid base64 is currently not rejected.
410 #            Whitespace *is* invalid.
411 #          - utf8: data's UTF-8 encoding is written
412 #          - data itself is always Unicode regardless of format, like
413 #            any other string.
415 # Returns: Nothing on success
417 # Since: 1.4
419 { 'command': 'ringbuf-write',
420   'data': {'device': 'str', 'data': 'str',
421            '*format': 'DataFormat'} }
424 # @ringbuf-read:
426 # Read from a ring buffer character device.
428 # @device: the ring buffer character device name
430 # @size: how many bytes to read at most
432 # @format: #optional data encoding (default 'utf8').
433 #          - base64: the data read is returned in base64 encoding.
434 #          - utf8: the data read is interpreted as UTF-8.
435 #            Bug: can screw up when the buffer contains invalid UTF-8
436 #            sequences, NUL characters, after the ring buffer lost
437 #            data, and when reading stops because the size limit is
438 #            reached.
439 #          - The return value is always Unicode regardless of format,
440 #            like any other string.
442 # Returns: data read from the device
444 # Since: 1.4
446 { 'command': 'ringbuf-read',
447   'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
448   'returns': 'str' }
451 # @CommandInfo:
453 # Information about a QMP command
455 # @name: The command name
457 # Since: 0.14.0
459 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
462 # @query-commands:
464 # Return a list of supported QMP commands by this server
466 # Returns: A list of @CommandInfo for all supported commands
468 # Since: 0.14.0
470 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
473 # @EventInfo:
475 # Information about a QMP event
477 # @name: The event name
479 # Since: 1.2.0
481 { 'type': 'EventInfo', 'data': {'name': 'str'} }
484 # @query-events:
486 # Return a list of supported QMP events by this server
488 # Returns: A list of @EventInfo for all supported events
490 # Since: 1.2.0
492 { 'command': 'query-events', 'returns': ['EventInfo'] }
495 # @MigrationStats
497 # Detailed migration status.
499 # @transferred: amount of bytes already transferred to the target VM
501 # @remaining: amount of bytes remaining to be transferred to the target VM
503 # @total: total amount of bytes involved in the migration process
505 # @duplicate: number of duplicate (zero) pages (since 1.2)
507 # @skipped: number of skipped zero pages (since 1.5)
509 # @normal : number of normal pages (since 1.2)
511 # @normal-bytes: number of normal bytes sent (since 1.2)
513 # @dirty-pages-rate: number of pages dirtied by second by the
514 #        guest (since 1.3)
516 # @mbps: throughput in megabits/sec. (since 1.6)
518 # Since: 0.14.0
520 { 'type': 'MigrationStats',
521   'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
522            'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
523            'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
524            'mbps' : 'number' } }
527 # @XBZRLECacheStats
529 # Detailed XBZRLE migration cache statistics
531 # @cache-size: XBZRLE cache size
533 # @bytes: amount of bytes already transferred to the target VM
535 # @pages: amount of pages transferred to the target VM
537 # @cache-miss: number of cache miss
539 # @overflow: number of overflows
541 # Since: 1.2
543 { 'type': 'XBZRLECacheStats',
544   'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
545            'cache-miss': 'int', 'overflow': 'int' } }
548 # @MigrationInfo
550 # Information about current migration process.
552 # @status: #optional string describing the current migration status.
553 #          As of 0.14.0 this can be 'active', 'completed', 'failed' or
554 #          'cancelled'. If this field is not returned, no migration process
555 #          has been initiated
557 # @ram: #optional @MigrationStats containing detailed migration
558 #       status, only returned if status is 'active' or
559 #       'completed'. 'comppleted' (since 1.2)
561 # @disk: #optional @MigrationStats containing detailed disk migration
562 #        status, only returned if status is 'active' and it is a block
563 #        migration
565 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
566 #                migration statistics, only returned if XBZRLE feature is on and
567 #                status is 'active' or 'completed' (since 1.2)
569 # @total-time: #optional total amount of milliseconds since migration started.
570 #        If migration has ended, it returns the total migration
571 #        time. (since 1.2)
573 # @downtime: #optional only present when migration finishes correctly
574 #        total downtime in milliseconds for the guest.
575 #        (since 1.3)
577 # @expected-downtime: #optional only present while migration is active
578 #        expected downtime in milliseconds for the guest in last walk
579 #        of the dirty bitmap. (since 1.3)
581 # Since: 0.14.0
583 { 'type': 'MigrationInfo',
584   'data': {'*status': 'str', '*ram': 'MigrationStats',
585            '*disk': 'MigrationStats',
586            '*xbzrle-cache': 'XBZRLECacheStats',
587            '*total-time': 'int',
588            '*expected-downtime': 'int',
589            '*downtime': 'int'} }
592 # @query-migrate
594 # Returns information about current migration process.
596 # Returns: @MigrationInfo
598 # Since: 0.14.0
600 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
603 # @MigrationCapability
605 # Migration capabilities enumeration
607 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
608 #          This feature allows us to minimize migration traffic for certain work
609 #          loads, by sending compressed difference of the pages
611 # @x-rdma-pin-all: Controls whether or not the entire VM memory footprint is
612 #          mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
613 #          Disabled by default. Experimental: may (or may not) be renamed after
614 #          further testing is complete. (since 1.6)
616 # Since: 1.2
618 { 'enum': 'MigrationCapability',
619   'data': ['xbzrle', 'x-rdma-pin-all'] }
622 # @MigrationCapabilityStatus
624 # Migration capability information
626 # @capability: capability enum
628 # @state: capability state bool
630 # Since: 1.2
632 { 'type': 'MigrationCapabilityStatus',
633   'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
636 # @migrate-set-capabilities
638 # Enable/Disable the following migration capabilities (like xbzrle)
640 # @capabilities: json array of capability modifications to make
642 # Since: 1.2
644 { 'command': 'migrate-set-capabilities',
645   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
648 # @query-migrate-capabilities
650 # Returns information about the current migration capabilities status
652 # Returns: @MigrationCapabilitiesStatus
654 # Since: 1.2
656 { 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}
659 # @MouseInfo:
661 # Information about a mouse device.
663 # @name: the name of the mouse device
665 # @index: the index of the mouse device
667 # @current: true if this device is currently receiving mouse events
669 # @absolute: true if this device supports absolute coordinates as input
671 # Since: 0.14.0
673 { 'type': 'MouseInfo',
674   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
675            'absolute': 'bool'} }
678 # @query-mice:
680 # Returns information about each active mouse device
682 # Returns: a list of @MouseInfo for each device
684 # Since: 0.14.0
686 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
689 # @CpuInfo:
691 # Information about a virtual CPU
693 # @CPU: the index of the virtual CPU
695 # @current: this only exists for backwards compatible and should be ignored
697 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
698 #          to a processor specific low power mode.
700 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
701 #                pointer.
702 #                If the target is Sparc, this is the PC component of the
703 #                instruction pointer.
705 # @nip: #optional If the target is PPC, the instruction pointer
707 # @npc: #optional If the target is Sparc, the NPC component of the instruction
708 #                 pointer
710 # @PC: #optional If the target is MIPS, the instruction pointer
712 # @thread_id: ID of the underlying host thread
714 # Since: 0.14.0
716 # Notes: @halted is a transient state that changes frequently.  By the time the
717 #        data is sent to the client, the guest may no longer be halted.
719 { 'type': 'CpuInfo',
720   'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
721            '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
724 # @query-cpus:
726 # Returns a list of information about each virtual CPU.
728 # Returns: a list of @CpuInfo for each virtual CPU
730 # Since: 0.14.0
732 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
735 # @BlockDeviceInfo:
737 # Information about the backing device for a block device.
739 # @file: the filename of the backing device
741 # @ro: true if the backing device was open read-only
743 # @drv: the name of the block format used to open the backing device. As of
744 #       0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
745 #       'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
746 #       'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
747 #       'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
749 # @backing_file: #optional the name of the backing file (for copy-on-write)
751 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
753 # @encrypted: true if the backing device is encrypted
755 # @encryption_key_missing: true if the backing device is encrypted but an
756 #                          valid encryption key is missing
758 # @bps: total throughput limit in bytes per second is specified
760 # @bps_rd: read throughput limit in bytes per second is specified
762 # @bps_wr: write throughput limit in bytes per second is specified
764 # @iops: total I/O operations per second is specified
766 # @iops_rd: read I/O operations per second is specified
768 # @iops_wr: write I/O operations per second is specified
770 # @image: the info of image used (since: 1.6)
772 # Since: 0.14.0
774 # Notes: This interface is only found in @BlockInfo.
776 { 'type': 'BlockDeviceInfo',
777   'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
778             '*backing_file': 'str', 'backing_file_depth': 'int',
779             'encrypted': 'bool', 'encryption_key_missing': 'bool',
780             'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
781             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
782             'image': 'ImageInfo' } }
785 # @BlockDeviceIoStatus:
787 # An enumeration of block device I/O status.
789 # @ok: The last I/O operation has succeeded
791 # @failed: The last I/O operation has failed
793 # @nospace: The last I/O operation has failed due to a no-space condition
795 # Since: 1.0
797 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
800 # @BlockDirtyInfo:
802 # Block dirty bitmap information.
804 # @count: number of dirty bytes according to the dirty bitmap
806 # @granularity: granularity of the dirty bitmap in bytes (since 1.4)
808 # Since: 1.3
810 { 'type': 'BlockDirtyInfo',
811   'data': {'count': 'int', 'granularity': 'int'} }
814 # @BlockInfo:
816 # Block device information.  This structure describes a virtual device and
817 # the backing device associated with it.
819 # @device: The device name associated with the virtual device.
821 # @type: This field is returned only for compatibility reasons, it should
822 #        not be used (always returns 'unknown')
824 # @removable: True if the device supports removable media.
826 # @locked: True if the guest has locked this device from having its media
827 #          removed
829 # @tray_open: #optional True if the device has a tray and it is open
830 #             (only present if removable is true)
832 # @dirty: #optional dirty bitmap information (only present if the dirty
833 #         bitmap is enabled)
835 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
836 #             supports it and the VM is configured to stop on errors
838 # @inserted: #optional @BlockDeviceInfo describing the device if media is
839 #            present
841 # Since:  0.14.0
843 { 'type': 'BlockInfo',
844   'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
845            'locked': 'bool', '*inserted': 'BlockDeviceInfo',
846            '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
847            '*dirty': 'BlockDirtyInfo' } }
850 # @query-block:
852 # Get a list of BlockInfo for all virtual block devices.
854 # Returns: a list of @BlockInfo describing each virtual block device
856 # Since: 0.14.0
858 { 'command': 'query-block', 'returns': ['BlockInfo'] }
861 # @BlockDeviceStats:
863 # Statistics of a virtual block device or a block backing device.
865 # @rd_bytes:      The number of bytes read by the device.
867 # @wr_bytes:      The number of bytes written by the device.
869 # @rd_operations: The number of read operations performed by the device.
871 # @wr_operations: The number of write operations performed by the device.
873 # @flush_operations: The number of cache flush operations performed by the
874 #                    device (since 0.15.0)
876 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
877 #                       (since 0.15.0).
879 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
881 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
883 # @wr_highest_offset: The offset after the greatest byte written to the
884 #                     device.  The intended use of this information is for
885 #                     growable sparse files (like qcow2) that are used on top
886 #                     of a physical device.
888 # Since: 0.14.0
890 { 'type': 'BlockDeviceStats',
891   'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
892            'wr_operations': 'int', 'flush_operations': 'int',
893            'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
894            'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
897 # @BlockStats:
899 # Statistics of a virtual block device or a block backing device.
901 # @device: #optional If the stats are for a virtual block device, the name
902 #          corresponding to the virtual block device.
904 # @stats:  A @BlockDeviceStats for the device.
906 # @parent: #optional This may point to the backing block device if this is a
907 #          a virtual block device.  If it's a backing block, this will point
908 #          to the backing file is one is present.
910 # Since: 0.14.0
912 { 'type': 'BlockStats',
913   'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
914            '*parent': 'BlockStats'} }
917 # @query-blockstats:
919 # Query the @BlockStats for all virtual block devices.
921 # Returns: A list of @BlockStats for each virtual block devices.
923 # Since: 0.14.0
925 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
928 # @VncClientInfo:
930 # Information about a connected VNC client.
932 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
933 #        when possible.
935 # @family: 'ipv6' if the client is connected via IPv6 and TCP
936 #          'ipv4' if the client is connected via IPv4 and TCP
937 #          'unix' if the client is connected via a unix domain socket
938 #          'unknown' otherwise
940 # @service: The service name of the client's port.  This may depends on the
941 #           host system's service database so symbolic names should not be
942 #           relied on.
944 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
945 #              Name of the client.
947 # @sasl_username: #optional If SASL authentication is in use, the SASL username
948 #                 used for authentication.
950 # Since: 0.14.0
952 { 'type': 'VncClientInfo',
953   'data': {'host': 'str', 'family': 'str', 'service': 'str',
954            '*x509_dname': 'str', '*sasl_username': 'str'} }
957 # @VncInfo:
959 # Information about the VNC session.
961 # @enabled: true if the VNC server is enabled, false otherwise
963 # @host: #optional The hostname the VNC server is bound to.  This depends on
964 #        the name resolution on the host and may be an IP address.
966 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
967 #                    'ipv4' if the host is listening for IPv4 connections
968 #                    'unix' if the host is listening on a unix domain socket
969 #                    'unknown' otherwise
971 # @service: #optional The service name of the server's port.  This may depends
972 #           on the host system's service database so symbolic names should not
973 #           be relied on.
975 # @auth: #optional the current authentication type used by the server
976 #        'none' if no authentication is being used
977 #        'vnc' if VNC authentication is being used
978 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
979 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
980 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
981 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
982 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
983 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
984 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
985 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
986 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
988 # @clients: a list of @VncClientInfo of all currently connected clients
990 # Since: 0.14.0
992 { 'type': 'VncInfo',
993   'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
994            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
997 # @query-vnc:
999 # Returns information about the current VNC server
1001 # Returns: @VncInfo
1003 # Since: 0.14.0
1005 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1008 # @SpiceChannel
1010 # Information about a SPICE client channel.
1012 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
1013 #        when possible.
1015 # @family: 'ipv6' if the client is connected via IPv6 and TCP
1016 #          'ipv4' if the client is connected via IPv4 and TCP
1017 #          'unix' if the client is connected via a unix domain socket
1018 #          'unknown' otherwise
1020 # @port: The client's port number.
1022 # @connection-id: SPICE connection id number.  All channels with the same id
1023 #                 belong to the same SPICE session.
1025 # @connection-type: SPICE channel type number.  "1" is the main control
1026 #                   channel, filter for this one if you want to track spice
1027 #                   sessions only
1029 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
1030 #              multiple channels of the same type exist, such as multiple
1031 #              display channels in a multihead setup
1033 # @tls: true if the channel is encrypted, false otherwise.
1035 # Since: 0.14.0
1037 { 'type': 'SpiceChannel',
1038   'data': {'host': 'str', 'family': 'str', 'port': 'str',
1039            'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1040            'tls': 'bool'} }
1043 # @SpiceQueryMouseMode
1045 # An enumeration of Spice mouse states.
1047 # @client: Mouse cursor position is determined by the client.
1049 # @server: Mouse cursor position is determined by the server.
1051 # @unknown: No information is available about mouse mode used by
1052 #           the spice server.
1054 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1056 # Since: 1.1
1058 { 'enum': 'SpiceQueryMouseMode',
1059   'data': [ 'client', 'server', 'unknown' ] }
1062 # @SpiceInfo
1064 # Information about the SPICE session.
1066 # @enabled: true if the SPICE server is enabled, false otherwise
1068 # @migrated: true if the last guest migration completed and spice
1069 #            migration had completed as well. false otherwise.
1071 # @host: #optional The hostname the SPICE server is bound to.  This depends on
1072 #        the name resolution on the host and may be an IP address.
1074 # @port: #optional The SPICE server's port number.
1076 # @compiled-version: #optional SPICE server version.
1078 # @tls-port: #optional The SPICE server's TLS port number.
1080 # @auth: #optional the current authentication type used by the server
1081 #        'none'  if no authentication is being used
1082 #        'spice' uses SASL or direct TLS authentication, depending on command
1083 #                line options
1085 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1086 #              be determined by the client or the server, or unknown if spice
1087 #              server doesn't provide this information.
1089 #              Since: 1.1
1091 # @channels: a list of @SpiceChannel for each active spice channel
1093 # Since: 0.14.0
1095 { 'type': 'SpiceInfo',
1096   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1097            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1098            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1101 # @query-spice
1103 # Returns information about the current SPICE server
1105 # Returns: @SpiceInfo
1107 # Since: 0.14.0
1109 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1112 # @BalloonInfo:
1114 # Information about the guest balloon device.
1116 # @actual: the number of bytes the balloon currently contains
1118 # Since: 0.14.0
1121 { 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
1124 # @query-balloon:
1126 # Return information about the balloon device.
1128 # Returns: @BalloonInfo on success
1129 #          If the balloon driver is enabled but not functional because the KVM
1130 #          kernel module cannot support it, KvmMissingCap
1131 #          If no balloon device is present, DeviceNotActive
1133 # Since: 0.14.0
1135 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1138 # @PciMemoryRange:
1140 # A PCI device memory region
1142 # @base: the starting address (guest physical)
1144 # @limit: the ending address (guest physical)
1146 # Since: 0.14.0
1148 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1151 # @PciMemoryRegion
1153 # Information about a PCI device I/O region.
1155 # @bar: the index of the Base Address Register for this region
1157 # @type: 'io' if the region is a PIO region
1158 #        'memory' if the region is a MMIO region
1160 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1162 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1164 # Since: 0.14.0
1166 { 'type': 'PciMemoryRegion',
1167   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1168            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1171 # @PciBridgeInfo:
1173 # Information about a PCI Bridge device
1175 # @bus.number: primary bus interface number.  This should be the number of the
1176 #              bus the device resides on.
1178 # @bus.secondary: secondary bus interface number.  This is the number of the
1179 #                 main bus for the bridge
1181 # @bus.subordinate: This is the highest number bus that resides below the
1182 #                   bridge.
1184 # @bus.io_range: The PIO range for all devices on this bridge
1186 # @bus.memory_range: The MMIO range for all devices on this bridge
1188 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1189 #                          this bridge
1191 # @devices: a list of @PciDeviceInfo for each device on this bridge
1193 # Since: 0.14.0
1195 { 'type': 'PciBridgeInfo',
1196   'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1197                     'io_range': 'PciMemoryRange',
1198                     'memory_range': 'PciMemoryRange',
1199                     'prefetchable_range': 'PciMemoryRange' },
1200            '*devices': ['PciDeviceInfo']} }
1203 # @PciDeviceInfo:
1205 # Information about a PCI device
1207 # @bus: the bus number of the device
1209 # @slot: the slot the device is located in
1211 # @function: the function of the slot used by the device
1213 # @class_info.desc: #optional a string description of the device's class
1215 # @class_info.class: the class code of the device
1217 # @id.device: the PCI device id
1219 # @id.vendor: the PCI vendor id
1221 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1223 # @qdev_id: the device name of the PCI device
1225 # @pci_bridge: if the device is a PCI bridge, the bridge information
1227 # @regions: a list of the PCI I/O regions associated with the device
1229 # Notes: the contents of @class_info.desc are not stable and should only be
1230 #        treated as informational.
1232 # Since: 0.14.0
1234 { 'type': 'PciDeviceInfo',
1235   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1236            'class_info': {'*desc': 'str', 'class': 'int'},
1237            'id': {'device': 'int', 'vendor': 'int'},
1238            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1239            'regions': ['PciMemoryRegion']} }
1242 # @PciInfo:
1244 # Information about a PCI bus
1246 # @bus: the bus index
1248 # @devices: a list of devices on this bus
1250 # Since: 0.14.0
1252 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1255 # @query-pci:
1257 # Return information about the PCI bus topology of the guest.
1259 # Returns: a list of @PciInfo for each PCI bus
1261 # Since: 0.14.0
1263 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1266 # @BlockdevOnError:
1268 # An enumeration of possible behaviors for errors on I/O operations.
1269 # The exact meaning depends on whether the I/O was initiated by a guest
1270 # or by a block job
1272 # @report: for guest operations, report the error to the guest;
1273 #          for jobs, cancel the job
1275 # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1276 #          or BLOCK_JOB_ERROR)
1278 # @enospc: same as @stop on ENOSPC, same as @report otherwise.
1280 # @stop: for guest operations, stop the virtual machine;
1281 #        for jobs, pause the job
1283 # Since: 1.3
1285 { 'enum': 'BlockdevOnError',
1286   'data': ['report', 'ignore', 'enospc', 'stop'] }
1289 # @MirrorSyncMode:
1291 # An enumeration of possible behaviors for the initial synchronization
1292 # phase of storage mirroring.
1294 # @top: copies data in the topmost image to the destination
1296 # @full: copies data from all images to the destination
1298 # @none: only copy data written from now on
1300 # Since: 1.3
1302 { 'enum': 'MirrorSyncMode',
1303   'data': ['top', 'full', 'none'] }
1306 # @BlockJobInfo:
1308 # Information about a long-running block device operation.
1310 # @type: the job type ('stream' for image streaming)
1312 # @device: the block device name
1314 # @len: the maximum progress value
1316 # @busy: false if the job is known to be in a quiescent state, with
1317 #        no pending I/O.  Since 1.3.
1319 # @paused: whether the job is paused or, if @busy is true, will
1320 #          pause itself as soon as possible.  Since 1.3.
1322 # @offset: the current progress value
1324 # @speed: the rate limit, bytes per second
1326 # @io-status: the status of the job (since 1.3)
1328 # Since: 1.1
1330 { 'type': 'BlockJobInfo',
1331   'data': {'type': 'str', 'device': 'str', 'len': 'int',
1332            'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1333            'io-status': 'BlockDeviceIoStatus'} }
1336 # @query-block-jobs:
1338 # Return information about long-running block device operations.
1340 # Returns: a list of @BlockJobInfo for each active block job
1342 # Since: 1.1
1344 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1347 # @quit:
1349 # This command will cause the QEMU process to exit gracefully.  While every
1350 # attempt is made to send the QMP response before terminating, this is not
1351 # guaranteed.  When using this interface, a premature EOF would not be
1352 # unexpected.
1354 # Since: 0.14.0
1356 { 'command': 'quit' }
1359 # @stop:
1361 # Stop all guest VCPU execution.
1363 # Since:  0.14.0
1365 # Notes:  This function will succeed even if the guest is already in the stopped
1366 #         state.  In "inmigrate" state, it will ensure that the guest
1367 #         remains paused once migration finishes, as if the -S option was
1368 #         passed on the command line.
1370 { 'command': 'stop' }
1373 # @system_reset:
1375 # Performs a hard reset of a guest.
1377 # Since: 0.14.0
1379 { 'command': 'system_reset' }
1382 # @system_powerdown:
1384 # Requests that a guest perform a powerdown operation.
1386 # Since: 0.14.0
1388 # Notes: A guest may or may not respond to this command.  This command
1389 #        returning does not indicate that a guest has accepted the request or
1390 #        that it has shut down.  Many guests will respond to this command by
1391 #        prompting the user in some way.
1393 { 'command': 'system_powerdown' }
1396 # @cpu:
1398 # This command is a nop that is only provided for the purposes of compatibility.
1400 # Since: 0.14.0
1402 # Notes: Do not use this command.
1404 { 'command': 'cpu', 'data': {'index': 'int'} }
1407 # @cpu-add
1409 # Adds CPU with specified ID
1411 # @id: ID of CPU to be created, valid values [0..max_cpus)
1413 # Returns: Nothing on success
1415 # Since 1.5
1417 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1420 # @memsave:
1422 # Save a portion of guest memory to a file.
1424 # @val: the virtual address of the guest to start from
1426 # @size: the size of memory region to save
1428 # @filename: the file to save the memory to as binary data
1430 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1431 #                       virtual address (defaults to CPU 0)
1433 # Returns: Nothing on success
1435 # Since: 0.14.0
1437 # Notes: Errors were not reliably returned until 1.1
1439 { 'command': 'memsave',
1440   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1443 # @pmemsave:
1445 # Save a portion of guest physical memory to a file.
1447 # @val: the physical address of the guest to start from
1449 # @size: the size of memory region to save
1451 # @filename: the file to save the memory to as binary data
1453 # Returns: Nothing on success
1455 # Since: 0.14.0
1457 # Notes: Errors were not reliably returned until 1.1
1459 { 'command': 'pmemsave',
1460   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1463 # @cont:
1465 # Resume guest VCPU execution.
1467 # Since:  0.14.0
1469 # Returns:  If successful, nothing
1470 #           If QEMU was started with an encrypted block device and a key has
1471 #              not yet been set, DeviceEncrypted.
1473 # Notes:  This command will succeed if the guest is currently running.  It
1474 #         will also succeed if the guest is in the "inmigrate" state; in
1475 #         this case, the effect of the command is to make sure the guest
1476 #         starts once migration finishes, removing the effect of the -S
1477 #         command line option if it was passed.
1479 { 'command': 'cont' }
1482 # @system_wakeup:
1484 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1486 # Since:  1.1
1488 # Returns:  nothing.
1490 { 'command': 'system_wakeup' }
1493 # @inject-nmi:
1495 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1497 # Returns:  If successful, nothing
1499 # Since:  0.14.0
1501 # Notes: Only x86 Virtual Machines support this command.
1503 { 'command': 'inject-nmi' }
1506 # @set_link:
1508 # Sets the link status of a virtual network adapter.
1510 # @name: the device name of the virtual network adapter
1512 # @up: true to set the link status to be up
1514 # Returns: Nothing on success
1515 #          If @name is not a valid network device, DeviceNotFound
1517 # Since: 0.14.0
1519 # Notes: Not all network adapters support setting link status.  This command
1520 #        will succeed even if the network adapter does not support link status
1521 #        notification.
1523 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1526 # @block_passwd:
1528 # This command sets the password of a block device that has not been open
1529 # with a password and requires one.
1531 # The two cases where this can happen are a block device is created through
1532 # QEMU's initial command line or a block device is changed through the legacy
1533 # @change interface.
1535 # In the event that the block device is created through the initial command
1536 # line, the VM will start in the stopped state regardless of whether '-S' is
1537 # used.  The intention is for a management tool to query the block devices to
1538 # determine which ones are encrypted, set the passwords with this command, and
1539 # then start the guest with the @cont command.
1541 # @device:   the name of the device to set the password on
1543 # @password: the password to use for the device
1545 # Returns: nothing on success
1546 #          If @device is not a valid block device, DeviceNotFound
1547 #          If @device is not encrypted, DeviceNotEncrypted
1549 # Notes:  Not all block formats support encryption and some that do are not
1550 #         able to validate that a password is correct.  Disk corruption may
1551 #         occur if an invalid password is specified.
1553 # Since: 0.14.0
1555 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1558 # @balloon:
1560 # Request the balloon driver to change its balloon size.
1562 # @value: the target size of the balloon in bytes
1564 # Returns: Nothing on success
1565 #          If the balloon driver is enabled but not functional because the KVM
1566 #            kernel module cannot support it, KvmMissingCap
1567 #          If no balloon device is present, DeviceNotActive
1569 # Notes: This command just issues a request to the guest.  When it returns,
1570 #        the balloon size may not have changed.  A guest can change the balloon
1571 #        size independent of this command.
1573 # Since: 0.14.0
1575 { 'command': 'balloon', 'data': {'value': 'int'} }
1578 # @block_resize
1580 # Resize a block image while a guest is running.
1582 # @device:  the name of the device to get the image resized
1584 # @size:  new image size in bytes
1586 # Returns: nothing on success
1587 #          If @device is not a valid block device, DeviceNotFound
1589 # Since: 0.14.0
1591 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1594 # @NewImageMode
1596 # An enumeration that tells QEMU how to set the backing file path in
1597 # a new image file.
1599 # @existing: QEMU should look for an existing image file.
1601 # @absolute-paths: QEMU should create a new image with absolute paths
1602 # for the backing file.
1604 # Since: 1.1
1606 { 'enum': 'NewImageMode',
1607   'data': [ 'existing', 'absolute-paths' ] }
1610 # @BlockdevSnapshot
1612 # @device:  the name of the device to generate the snapshot from.
1614 # @snapshot-file: the target of the new image. A new file will be created.
1616 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1618 # @mode: #optional whether and how QEMU should create a new image, default is
1619 #        'absolute-paths'.
1621 { 'type': 'BlockdevSnapshot',
1622   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1623             '*mode': 'NewImageMode' } }
1626 # @TransactionAction
1628 # A discriminated record of operations that can be performed with
1629 # @transaction.
1631 { 'union': 'TransactionAction',
1632   'data': {
1633        'blockdev-snapshot-sync': 'BlockdevSnapshot'
1634    } }
1637 # @transaction
1639 # Executes a number of transactionable QMP commands atomically. If any
1640 # operation fails, then the entire set of actions will be abandoned and the
1641 # appropriate error returned.
1643 #  List of:
1644 #  @TransactionAction: information needed for the respective operation
1646 # Returns: nothing on success
1647 #          Errors depend on the operations of the transaction
1649 # Note: The transaction aborts on the first failure.  Therefore, there will be
1650 # information on only one failed operation returned in an error condition, and
1651 # subsequent actions will not have been attempted.
1653 # Since 1.1
1655 { 'command': 'transaction',
1656   'data': { 'actions': [ 'TransactionAction' ] } }
1659 # @blockdev-snapshot-sync
1661 # Generates a synchronous snapshot of a block device.
1663 # @device:  the name of the device to generate the snapshot from.
1665 # @snapshot-file: the target of the new image. If the file exists, or if it
1666 #                 is a device, the snapshot will be created in the existing
1667 #                 file/device. If does not exist, a new file will be created.
1669 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1671 # @mode: #optional whether and how QEMU should create a new image, default is
1672 #        'absolute-paths'.
1674 # Returns: nothing on success
1675 #          If @device is not a valid block device, DeviceNotFound
1677 # Since 0.14.0
1679 { 'command': 'blockdev-snapshot-sync',
1680   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1681             '*mode': 'NewImageMode'} }
1684 # @human-monitor-command:
1686 # Execute a command on the human monitor and return the output.
1688 # @command-line: the command to execute in the human monitor
1690 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1692 # Returns: the output of the command as a string
1694 # Since: 0.14.0
1696 # Notes: This command only exists as a stop-gap.  It's use is highly
1697 #        discouraged.  The semantics of this command are not guaranteed.
1699 #        Known limitations:
1701 #        o This command is stateless, this means that commands that depend
1702 #          on state information (such as getfd) might not work
1704 #       o Commands that prompt the user for data (eg. 'cont' when the block
1705 #         device is encrypted) don't currently work
1707 { 'command': 'human-monitor-command',
1708   'data': {'command-line': 'str', '*cpu-index': 'int'},
1709   'returns': 'str' }
1712 # @block-commit
1714 # Live commit of data from overlay image nodes into backing nodes - i.e.,
1715 # writes data between 'top' and 'base' into 'base'.
1717 # @device:  the name of the device
1719 # @base:   #optional The file name of the backing image to write data into.
1720 #                    If not specified, this is the deepest backing image
1722 # @top:              The file name of the backing image within the image chain,
1723 #                    which contains the topmost data to be committed down.
1724 #                    Note, the active layer as 'top' is currently unsupported.
1726 #                    If top == base, that is an error.
1729 # @speed:  #optional the maximum speed, in bytes per second
1731 # Returns: Nothing on success
1732 #          If commit or stream is already active on this device, DeviceInUse
1733 #          If @device does not exist, DeviceNotFound
1734 #          If image commit is not supported by this device, NotSupported
1735 #          If @base or @top is invalid, a generic error is returned
1736 #          If @top is the active layer, or omitted, a generic error is returned
1737 #          If @speed is invalid, InvalidParameter
1739 # Since: 1.3
1742 { 'command': 'block-commit',
1743   'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1744             '*speed': 'int' } }
1747 # @drive-backup
1749 # Start a point-in-time copy of a block device to a new destination.  The
1750 # status of ongoing drive-backup operations can be checked with
1751 # query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
1752 # The operation can be stopped before it has completed using the
1753 # block-job-cancel command.
1755 # @device: the name of the device which should be copied.
1757 # @target: the target of the new image. If the file exists, or if it
1758 #          is a device, the existing file/device will be used as the new
1759 #          destination.  If it does not exist, a new file will be created.
1761 # @format: #optional the format of the new destination, default is to
1762 #          probe if @mode is 'existing', else the format of the source
1764 # @mode: #optional whether and how QEMU should create a new image, default is
1765 #        'absolute-paths'.
1767 # @speed: #optional the maximum speed, in bytes per second
1769 # @on-source-error: #optional the action to take on an error on the source,
1770 #                   default 'report'.  'stop' and 'enospc' can only be used
1771 #                   if the block device supports io-status (see BlockInfo).
1773 # @on-target-error: #optional the action to take on an error on the target,
1774 #                   default 'report' (no limitations, since this applies to
1775 #                   a different block device than @device).
1777 # Note that @on-source-error and @on-target-error only affect background I/O.
1778 # If an error occurs during a guest write request, the device's rerror/werror
1779 # actions will be used.
1781 # Returns: nothing on success
1782 #          If @device is not a valid block device, DeviceNotFound
1784 # Since 1.6
1786 { 'command': 'drive-backup',
1787   'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1788             '*mode': 'NewImageMode', '*speed': 'int',
1789             '*on-source-error': 'BlockdevOnError',
1790             '*on-target-error': 'BlockdevOnError' } }
1793 # @drive-mirror
1795 # Start mirroring a block device's writes to a new destination.
1797 # @device:  the name of the device whose writes should be mirrored.
1799 # @target: the target of the new image. If the file exists, or if it
1800 #          is a device, the existing file/device will be used as the new
1801 #          destination.  If it does not exist, a new file will be created.
1803 # @format: #optional the format of the new destination, default is to
1804 #          probe if @mode is 'existing', else the format of the source
1806 # @mode: #optional whether and how QEMU should create a new image, default is
1807 #        'absolute-paths'.
1809 # @speed:  #optional the maximum speed, in bytes per second
1811 # @sync: what parts of the disk image should be copied to the destination
1812 #        (all the disk, only the sectors allocated in the topmost image, or
1813 #        only new I/O).
1815 # @granularity: #optional granularity of the dirty bitmap, default is 64K
1816 #               if the image format doesn't have clusters, 4K if the clusters
1817 #               are smaller than that, else the cluster size.  Must be a
1818 #               power of 2 between 512 and 64M (since 1.4).
1820 # @buf-size: #optional maximum amount of data in flight from source to
1821 #            target (since 1.4).
1823 # @on-source-error: #optional the action to take on an error on the source,
1824 #                   default 'report'.  'stop' and 'enospc' can only be used
1825 #                   if the block device supports io-status (see BlockInfo).
1827 # @on-target-error: #optional the action to take on an error on the target,
1828 #                   default 'report' (no limitations, since this applies to
1829 #                   a different block device than @device).
1831 # Returns: nothing on success
1832 #          If @device is not a valid block device, DeviceNotFound
1834 # Since 1.3
1836 { 'command': 'drive-mirror',
1837   'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1838             'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
1839             '*speed': 'int', '*granularity': 'uint32',
1840             '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
1841             '*on-target-error': 'BlockdevOnError' } }
1844 # @migrate_cancel
1846 # Cancel the current executing migration process.
1848 # Returns: nothing on success
1850 # Notes: This command succeeds even if there is no migration process running.
1852 # Since: 0.14.0
1854 { 'command': 'migrate_cancel' }
1857 # @migrate_set_downtime
1859 # Set maximum tolerated downtime for migration.
1861 # @value: maximum downtime in seconds
1863 # Returns: nothing on success
1865 # Since: 0.14.0
1867 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1870 # @migrate_set_speed
1872 # Set maximum speed for migration.
1874 # @value: maximum speed in bytes.
1876 # Returns: nothing on success
1878 # Notes: A value lesser than zero will be automatically round up to zero.
1880 # Since: 0.14.0
1882 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1885 # @migrate-set-cache-size
1887 # Set XBZRLE cache size
1889 # @value: cache size in bytes
1891 # The size will be rounded down to the nearest power of 2.
1892 # The cache size can be modified before and during ongoing migration
1894 # Returns: nothing on success
1896 # Since: 1.2
1898 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1901 # @query-migrate-cache-size
1903 # query XBZRLE cache size
1905 # Returns: XBZRLE cache size in bytes
1907 # Since: 1.2
1909 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1912 # @ObjectPropertyInfo:
1914 # @name: the name of the property
1916 # @type: the type of the property.  This will typically come in one of four
1917 #        forms:
1919 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1920 #           These types are mapped to the appropriate JSON type.
1922 #        2) A legacy type in the form 'legacy<subtype>' where subtype is the
1923 #           legacy qdev typename.  These types are always treated as strings.
1925 #        3) A child type in the form 'child<subtype>' where subtype is a qdev
1926 #           device type name.  Child properties create the composition tree.
1928 #        4) A link type in the form 'link<subtype>' where subtype is a qdev
1929 #           device type name.  Link properties form the device model graph.
1931 # Since: 1.2
1933 { 'type': 'ObjectPropertyInfo',
1934   'data': { 'name': 'str', 'type': 'str' } }
1937 # @qom-list:
1939 # This command will list any properties of a object given a path in the object
1940 # model.
1942 # @path: the path within the object model.  See @qom-get for a description of
1943 #        this parameter.
1945 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1946 #          object.
1948 # Since: 1.2
1950 { 'command': 'qom-list',
1951   'data': { 'path': 'str' },
1952   'returns': [ 'ObjectPropertyInfo' ] }
1955 # @qom-get:
1957 # This command will get a property from a object model path and return the
1958 # value.
1960 # @path: The path within the object model.  There are two forms of supported
1961 #        paths--absolute and partial paths.
1963 #        Absolute paths are derived from the root object and can follow child<>
1964 #        or link<> properties.  Since they can follow link<> properties, they
1965 #        can be arbitrarily long.  Absolute paths look like absolute filenames
1966 #        and are prefixed  with a leading slash.
1968 #        Partial paths look like relative filenames.  They do not begin
1969 #        with a prefix.  The matching rules for partial paths are subtle but
1970 #        designed to make specifying objects easy.  At each level of the
1971 #        composition tree, the partial path is matched as an absolute path.
1972 #        The first match is not returned.  At least two matches are searched
1973 #        for.  A successful result is only returned if only one match is
1974 #        found.  If more than one match is found, a flag is return to
1975 #        indicate that the match was ambiguous.
1977 # @property: The property name to read
1979 # Returns: The property value.  The type depends on the property type.  legacy<>
1980 #          properties are returned as #str.  child<> and link<> properties are
1981 #          returns as #str pathnames.  All integer property types (u8, u16, etc)
1982 #          are returned as #int.
1984 # Since: 1.2
1986 { 'command': 'qom-get',
1987   'data': { 'path': 'str', 'property': 'str' },
1988   'returns': 'visitor',
1989   'gen': 'no' }
1992 # @qom-set:
1994 # This command will set a property from a object model path.
1996 # @path: see @qom-get for a description of this parameter
1998 # @property: the property name to set
2000 # @value: a value who's type is appropriate for the property type.  See @qom-get
2001 #         for a description of type mapping.
2003 # Since: 1.2
2005 { 'command': 'qom-set',
2006   'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
2007   'gen': 'no' }
2010 # @set_password:
2012 # Sets the password of a remote display session.
2014 # @protocol: `vnc' to modify the VNC server password
2015 #            `spice' to modify the Spice server password
2017 # @password: the new password
2019 # @connected: #optional how to handle existing clients when changing the
2020 #                       password.  If nothing is specified, defaults to `keep'
2021 #                       `fail' to fail the command if clients are connected
2022 #                       `disconnect' to disconnect existing clients
2023 #                       `keep' to maintain existing clients
2025 # Returns: Nothing on success
2026 #          If Spice is not enabled, DeviceNotFound
2028 # Since: 0.14.0
2030 { 'command': 'set_password',
2031   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2034 # @expire_password:
2036 # Expire the password of a remote display server.
2038 # @protocol: the name of the remote display protocol `vnc' or `spice'
2040 # @time: when to expire the password.
2041 #        `now' to expire the password immediately
2042 #        `never' to cancel password expiration
2043 #        `+INT' where INT is the number of seconds from now (integer)
2044 #        `INT' where INT is the absolute time in seconds
2046 # Returns: Nothing on success
2047 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
2049 # Since: 0.14.0
2051 # Notes: Time is relative to the server and currently there is no way to
2052 #        coordinate server time with client time.  It is not recommended to
2053 #        use the absolute time version of the @time parameter unless you're
2054 #        sure you are on the same machine as the QEMU instance.
2056 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2059 # @eject:
2061 # Ejects a device from a removable drive.
2063 # @device:  The name of the device
2065 # @force:   @optional If true, eject regardless of whether the drive is locked.
2066 #           If not specified, the default value is false.
2068 # Returns:  Nothing on success
2069 #           If @device is not a valid block device, DeviceNotFound
2071 # Notes:    Ejecting a device will no media results in success
2073 # Since: 0.14.0
2075 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
2078 # @change-vnc-password:
2080 # Change the VNC server password.
2082 # @target:  the new password to use with VNC authentication
2084 # Since: 1.1
2086 # Notes:  An empty password in this command will set the password to the empty
2087 #         string.  Existing clients are unaffected by executing this command.
2089 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2092 # @change:
2094 # This command is multiple commands multiplexed together.
2096 # @device: This is normally the name of a block device but it may also be 'vnc'.
2097 #          when it's 'vnc', then sub command depends on @target
2099 # @target: If @device is a block device, then this is the new filename.
2100 #          If @device is 'vnc', then if the value 'password' selects the vnc
2101 #          change password command.   Otherwise, this specifies a new server URI
2102 #          address to listen to for VNC connections.
2104 # @arg:    If @device is a block device, then this is an optional format to open
2105 #          the device with.
2106 #          If @device is 'vnc' and @target is 'password', this is the new VNC
2107 #          password to set.  If this argument is an empty string, then no future
2108 #          logins will be allowed.
2110 # Returns: Nothing on success.
2111 #          If @device is not a valid block device, DeviceNotFound
2112 #          If the new block device is encrypted, DeviceEncrypted.  Note that
2113 #          if this error is returned, the device has been opened successfully
2114 #          and an additional call to @block_passwd is required to set the
2115 #          device's password.  The behavior of reads and writes to the block
2116 #          device between when these calls are executed is undefined.
2118 # Notes:  It is strongly recommended that this interface is not used especially
2119 #         for changing block devices.
2121 # Since: 0.14.0
2123 { 'command': 'change',
2124   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2127 # @block_set_io_throttle:
2129 # Change I/O throttle limits for a block drive.
2131 # @device: The name of the device
2133 # @bps: total throughput limit in bytes per second
2135 # @bps_rd: read throughput limit in bytes per second
2137 # @bps_wr: write throughput limit in bytes per second
2139 # @iops: total I/O operations per second
2141 # @ops_rd: read I/O operations per second
2143 # @iops_wr: write I/O operations per second
2145 # Returns: Nothing on success
2146 #          If @device is not a valid block device, DeviceNotFound
2148 # Since: 1.1
2150 { 'command': 'block_set_io_throttle',
2151   'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
2152             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
2155 # @block-stream:
2157 # Copy data from a backing file into a block device.
2159 # The block streaming operation is performed in the background until the entire
2160 # backing file has been copied.  This command returns immediately once streaming
2161 # has started.  The status of ongoing block streaming operations can be checked
2162 # with query-block-jobs.  The operation can be stopped before it has completed
2163 # using the block-job-cancel command.
2165 # If a base file is specified then sectors are not copied from that base file and
2166 # its backing chain.  When streaming completes the image file will have the base
2167 # file as its backing file.  This can be used to stream a subset of the backing
2168 # file chain instead of flattening the entire image.
2170 # On successful completion the image file is updated to drop the backing file
2171 # and the BLOCK_JOB_COMPLETED event is emitted.
2173 # @device: the device name
2175 # @base:   #optional the common backing file name
2177 # @speed:  #optional the maximum speed, in bytes per second
2179 # @on-error: #optional the action to take on an error (default report).
2180 #            'stop' and 'enospc' can only be used if the block device
2181 #            supports io-status (see BlockInfo).  Since 1.3.
2183 # Returns: Nothing on success
2184 #          If @device does not exist, DeviceNotFound
2186 # Since: 1.1
2188 { 'command': 'block-stream',
2189   'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
2190             '*on-error': 'BlockdevOnError' } }
2193 # @block-job-set-speed:
2195 # Set maximum speed for a background block operation.
2197 # This command can only be issued when there is an active block job.
2199 # Throttling can be disabled by setting the speed to 0.
2201 # @device: the device name
2203 # @speed:  the maximum speed, in bytes per second, or 0 for unlimited.
2204 #          Defaults to 0.
2206 # Returns: Nothing on success
2207 #          If no background operation is active on this device, DeviceNotActive
2209 # Since: 1.1
2211 { 'command': 'block-job-set-speed',
2212   'data': { 'device': 'str', 'speed': 'int' } }
2215 # @block-job-cancel:
2217 # Stop an active background block operation.
2219 # This command returns immediately after marking the active background block
2220 # operation for cancellation.  It is an error to call this command if no
2221 # operation is in progress.
2223 # The operation will cancel as soon as possible and then emit the
2224 # BLOCK_JOB_CANCELLED event.  Before that happens the job is still visible when
2225 # enumerated using query-block-jobs.
2227 # For streaming, the image file retains its backing file unless the streaming
2228 # operation happens to complete just as it is being cancelled.  A new streaming
2229 # operation can be started at a later time to finish copying all data from the
2230 # backing file.
2232 # @device: the device name
2234 # @force: #optional whether to allow cancellation of a paused job (default
2235 #         false).  Since 1.3.
2237 # Returns: Nothing on success
2238 #          If no background operation is active on this device, DeviceNotActive
2240 # Since: 1.1
2242 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
2245 # @block-job-pause:
2247 # Pause an active background block operation.
2249 # This command returns immediately after marking the active background block
2250 # operation for pausing.  It is an error to call this command if no
2251 # operation is in progress.  Pausing an already paused job has no cumulative
2252 # effect; a single block-job-resume command will resume the job.
2254 # The operation will pause as soon as possible.  No event is emitted when
2255 # the operation is actually paused.  Cancelling a paused job automatically
2256 # resumes it.
2258 # @device: the device name
2260 # Returns: Nothing on success
2261 #          If no background operation is active on this device, DeviceNotActive
2263 # Since: 1.3
2265 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2268 # @block-job-resume:
2270 # Resume an active background block operation.
2272 # This command returns immediately after resuming a paused background block
2273 # operation.  It is an error to call this command if no operation is in
2274 # progress.  Resuming an already running job is not an error.
2276 # This command also clears the error status of the job.
2278 # @device: the device name
2280 # Returns: Nothing on success
2281 #          If no background operation is active on this device, DeviceNotActive
2283 # Since: 1.3
2285 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
2288 # @block-job-complete:
2290 # Manually trigger completion of an active background block operation.  This
2291 # is supported for drive mirroring, where it also switches the device to
2292 # write to the target path only.  The ability to complete is signaled with
2293 # a BLOCK_JOB_READY event.
2295 # This command completes an active background block operation synchronously.
2296 # The ordering of this command's return with the BLOCK_JOB_COMPLETED event
2297 # is not defined.  Note that if an I/O error occurs during the processing of
2298 # this command: 1) the command itself will fail; 2) the error will be processed
2299 # according to the rerror/werror arguments that were specified when starting
2300 # the operation.
2302 # A cancelled or paused job cannot be completed.
2304 # @device: the device name
2306 # Returns: Nothing on success
2307 #          If no background operation is active on this device, DeviceNotActive
2309 # Since: 1.3
2311 { 'command': 'block-job-complete', 'data': { 'device': 'str' } }
2314 # @ObjectTypeInfo:
2316 # This structure describes a search result from @qom-list-types
2318 # @name: the type name found in the search
2320 # Since: 1.1
2322 # Notes: This command is experimental and may change syntax in future releases.
2324 { 'type': 'ObjectTypeInfo',
2325   'data': { 'name': 'str' } }
2328 # @qom-list-types:
2330 # This command will return a list of types given search parameters
2332 # @implements: if specified, only return types that implement this type name
2334 # @abstract: if true, include abstract types in the results
2336 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2338 # Since: 1.1
2340 { 'command': 'qom-list-types',
2341   'data': { '*implements': 'str', '*abstract': 'bool' },
2342   'returns': [ 'ObjectTypeInfo' ] }
2345 # @DevicePropertyInfo:
2347 # Information about device properties.
2349 # @name: the name of the property
2350 # @type: the typename of the property
2352 # Since: 1.2
2354 { 'type': 'DevicePropertyInfo',
2355   'data': { 'name': 'str', 'type': 'str' } }
2358 # @device-list-properties:
2360 # List properties associated with a device.
2362 # @typename: the type name of a device
2364 # Returns: a list of DevicePropertyInfo describing a devices properties
2366 # Since: 1.2
2368 { 'command': 'device-list-properties',
2369   'data': { 'typename': 'str'},
2370   'returns': [ 'DevicePropertyInfo' ] }
2373 # @migrate
2375 # Migrates the current running guest to another Virtual Machine.
2377 # @uri: the Uniform Resource Identifier of the destination VM
2379 # @blk: #optional do block migration (full disk copy)
2381 # @inc: #optional incremental disk copy migration
2383 # @detach: this argument exists only for compatibility reasons and
2384 #          is ignored by QEMU
2386 # Returns: nothing on success
2388 # Since: 0.14.0
2390 { 'command': 'migrate',
2391   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2393 # @xen-save-devices-state:
2395 # Save the state of all devices to file. The RAM and the block devices
2396 # of the VM are not saved by this command.
2398 # @filename: the file to save the state of the devices to as binary
2399 # data. See xen-save-devices-state.txt for a description of the binary
2400 # format.
2402 # Returns: Nothing on success
2404 # Since: 1.1
2406 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2409 # @xen-set-global-dirty-log
2411 # Enable or disable the global dirty log mode.
2413 # @enable: true to enable, false to disable.
2415 # Returns: nothing
2417 # Since: 1.3
2419 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2422 # @device_del:
2424 # Remove a device from a guest
2426 # @id: the name of the device
2428 # Returns: Nothing on success
2429 #          If @id is not a valid device, DeviceNotFound
2431 # Notes: When this command completes, the device may not be removed from the
2432 #        guest.  Hot removal is an operation that requires guest cooperation.
2433 #        This command merely requests that the guest begin the hot removal
2434 #        process.  Completion of the device removal process is signaled with a
2435 #        DEVICE_DELETED event. Guest reset will automatically complete removal
2436 #        for all devices.
2438 # Since: 0.14.0
2440 { 'command': 'device_del', 'data': {'id': 'str'} }
2443 # @dump-guest-memory
2445 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2446 # very long depending on the amount of guest memory. This command is only
2447 # supported on i386 and x86_64.
2449 # @paging: if true, do paging to get guest's memory mapping. This allows
2450 #          using gdb to process the core file.
2452 #          IMPORTANT: this option can make QEMU allocate several gigabytes
2453 #                     of RAM. This can happen for a large guest, or a
2454 #                     malicious guest pretending to be large.
2456 #          Also, paging=true has the following limitations:
2458 #             1. The guest may be in a catastrophic state or can have corrupted
2459 #                memory, which cannot be trusted
2460 #             2. The guest can be in real-mode even if paging is enabled. For
2461 #                example, the guest uses ACPI to sleep, and ACPI sleep state
2462 #                goes in real-mode
2464 # @protocol: the filename or file descriptor of the vmcore. The supported
2465 #            protocols are:
2467 #            1. file: the protocol starts with "file:", and the following
2468 #               string is the file's path.
2469 #            2. fd: the protocol starts with "fd:", and the following string
2470 #               is the fd's name.
2472 # @begin: #optional if specified, the starting physical address.
2474 # @length: #optional if specified, the memory size, in bytes. If you don't
2475 #          want to dump all guest's memory, please specify the start @begin
2476 #          and @length
2478 # Returns: nothing on success
2480 # Since: 1.2
2482 { 'command': 'dump-guest-memory',
2483   'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2484             '*length': 'int' } }
2487 # @netdev_add:
2489 # Add a network backend.
2491 # @type: the type of network backend.  Current valid values are 'user', 'tap',
2492 #        'vde', 'socket', 'dump' and 'bridge'
2494 # @id: the name of the new network backend
2496 # @props: #optional a list of properties to be passed to the backend in
2497 #         the format 'name=value', like 'ifname=tap0,script=no'
2499 # Notes: The semantics of @props is not well defined.  Future commands will be
2500 #        introduced that provide stronger typing for backend creation.
2502 # Since: 0.14.0
2504 # Returns: Nothing on success
2505 #          If @type is not a valid network backend, DeviceNotFound
2507 { 'command': 'netdev_add',
2508   'data': {'type': 'str', 'id': 'str', '*props': '**'},
2509   'gen': 'no' }
2512 # @netdev_del:
2514 # Remove a network backend.
2516 # @id: the name of the network backend to remove
2518 # Returns: Nothing on success
2519 #          If @id is not a valid network backend, DeviceNotFound
2521 # Since: 0.14.0
2523 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2526 # @NetdevNoneOptions
2528 # Use it alone to have zero network devices.
2530 # Since 1.2
2532 { 'type': 'NetdevNoneOptions',
2533   'data': { } }
2536 # @NetLegacyNicOptions
2538 # Create a new Network Interface Card.
2540 # @netdev: #optional id of -netdev to connect to
2542 # @macaddr: #optional MAC address
2544 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2546 # @addr: #optional PCI device address
2548 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2550 # Since 1.2
2552 { 'type': 'NetLegacyNicOptions',
2553   'data': {
2554     '*netdev':  'str',
2555     '*macaddr': 'str',
2556     '*model':   'str',
2557     '*addr':    'str',
2558     '*vectors': 'uint32' } }
2561 # @String
2563 # A fat type wrapping 'str', to be embedded in lists.
2565 # Since 1.2
2567 { 'type': 'String',
2568   'data': {
2569     'str': 'str' } }
2572 # @NetdevUserOptions
2574 # Use the user mode network stack which requires no administrator privilege to
2575 # run.
2577 # @hostname: #optional client hostname reported by the builtin DHCP server
2579 # @restrict: #optional isolate the guest from the host
2581 # @ip: #optional legacy parameter, use net= instead
2583 # @net: #optional IP address and optional netmask
2585 # @host: #optional guest-visible address of the host
2587 # @tftp: #optional root directory of the built-in TFTP server
2589 # @bootfile: #optional BOOTP filename, for use with tftp=
2591 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2592 #             assign
2594 # @dns: #optional guest-visible address of the virtual nameserver
2596 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2597 #             to the guest
2599 # @smb: #optional root directory of the built-in SMB server
2601 # @smbserver: #optional IP address of the built-in SMB server
2603 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2604 #           endpoints
2606 # @guestfwd: #optional forward guest TCP connections
2608 # Since 1.2
2610 { 'type': 'NetdevUserOptions',
2611   'data': {
2612     '*hostname':  'str',
2613     '*restrict':  'bool',
2614     '*ip':        'str',
2615     '*net':       'str',
2616     '*host':      'str',
2617     '*tftp':      'str',
2618     '*bootfile':  'str',
2619     '*dhcpstart': 'str',
2620     '*dns':       'str',
2621     '*dnssearch': ['String'],
2622     '*smb':       'str',
2623     '*smbserver': 'str',
2624     '*hostfwd':   ['String'],
2625     '*guestfwd':  ['String'] } }
2628 # @NetdevTapOptions
2630 # Connect the host TAP network interface name to the VLAN.
2632 # @ifname: #optional interface name
2634 # @fd: #optional file descriptor of an already opened tap
2636 # @fds: #optional multiple file descriptors of already opened multiqueue capable
2637 # tap
2639 # @script: #optional script to initialize the interface
2641 # @downscript: #optional script to shut down the interface
2643 # @helper: #optional command to execute to configure bridge
2645 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2647 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2649 # @vhost: #optional enable vhost-net network accelerator
2651 # @vhostfd: #optional file descriptor of an already opened vhost net device
2653 # @vhostfds: #optional file descriptors of multiple already opened vhost net
2654 # devices
2656 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2658 # @queues: #optional number of queues to be created for multiqueue capable tap
2660 # Since 1.2
2662 { 'type': 'NetdevTapOptions',
2663   'data': {
2664     '*ifname':     'str',
2665     '*fd':         'str',
2666     '*fds':        'str',
2667     '*script':     'str',
2668     '*downscript': 'str',
2669     '*helper':     'str',
2670     '*sndbuf':     'size',
2671     '*vnet_hdr':   'bool',
2672     '*vhost':      'bool',
2673     '*vhostfd':    'str',
2674     '*vhostfds':   'str',
2675     '*vhostforce': 'bool',
2676     '*queues':     'uint32'} }
2679 # @NetdevSocketOptions
2681 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2682 # socket connection.
2684 # @fd: #optional file descriptor of an already opened socket
2686 # @listen: #optional port number, and optional hostname, to listen on
2688 # @connect: #optional port number, and optional hostname, to connect to
2690 # @mcast: #optional UDP multicast address and port number
2692 # @localaddr: #optional source address and port for multicast and udp packets
2694 # @udp: #optional UDP unicast address and port number
2696 # Since 1.2
2698 { 'type': 'NetdevSocketOptions',
2699   'data': {
2700     '*fd':        'str',
2701     '*listen':    'str',
2702     '*connect':   'str',
2703     '*mcast':     'str',
2704     '*localaddr': 'str',
2705     '*udp':       'str' } }
2708 # @NetdevVdeOptions
2710 # Connect the VLAN to a vde switch running on the host.
2712 # @sock: #optional socket path
2714 # @port: #optional port number
2716 # @group: #optional group owner of socket
2718 # @mode: #optional permissions for socket
2720 # Since 1.2
2722 { 'type': 'NetdevVdeOptions',
2723   'data': {
2724     '*sock':  'str',
2725     '*port':  'uint16',
2726     '*group': 'str',
2727     '*mode':  'uint16' } }
2730 # @NetdevDumpOptions
2732 # Dump VLAN network traffic to a file.
2734 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2735 # suffixes.
2737 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2739 # Since 1.2
2741 { 'type': 'NetdevDumpOptions',
2742   'data': {
2743     '*len':  'size',
2744     '*file': 'str' } }
2747 # @NetdevBridgeOptions
2749 # Connect a host TAP network interface to a host bridge device.
2751 # @br: #optional bridge name
2753 # @helper: #optional command to execute to configure bridge
2755 # Since 1.2
2757 { 'type': 'NetdevBridgeOptions',
2758   'data': {
2759     '*br':     'str',
2760     '*helper': 'str' } }
2763 # @NetdevHubPortOptions
2765 # Connect two or more net clients through a software hub.
2767 # @hubid: hub identifier number
2769 # Since 1.2
2771 { 'type': 'NetdevHubPortOptions',
2772   'data': {
2773     'hubid':     'int32' } }
2776 # @NetClientOptions
2778 # A discriminated record of network device traits.
2780 # Since 1.2
2782 { 'union': 'NetClientOptions',
2783   'data': {
2784     'none':     'NetdevNoneOptions',
2785     'nic':      'NetLegacyNicOptions',
2786     'user':     'NetdevUserOptions',
2787     'tap':      'NetdevTapOptions',
2788     'socket':   'NetdevSocketOptions',
2789     'vde':      'NetdevVdeOptions',
2790     'dump':     'NetdevDumpOptions',
2791     'bridge':   'NetdevBridgeOptions',
2792     'hubport':  'NetdevHubPortOptions' } }
2795 # @NetLegacy
2797 # Captures the configuration of a network device; legacy.
2799 # @vlan: #optional vlan number
2801 # @id: #optional identifier for monitor commands
2803 # @name: #optional identifier for monitor commands, ignored if @id is present
2805 # @opts: device type specific properties (legacy)
2807 # Since 1.2
2809 { 'type': 'NetLegacy',
2810   'data': {
2811     '*vlan': 'int32',
2812     '*id':   'str',
2813     '*name': 'str',
2814     'opts':  'NetClientOptions' } }
2817 # @Netdev
2819 # Captures the configuration of a network device.
2821 # @id: identifier for monitor commands.
2823 # @opts: device type specific properties
2825 # Since 1.2
2827 { 'type': 'Netdev',
2828   'data': {
2829     'id':   'str',
2830     'opts': 'NetClientOptions' } }
2833 # @InetSocketAddress
2835 # Captures a socket address or address range in the Internet namespace.
2837 # @host: host part of the address
2839 # @port: port part of the address, or lowest port if @to is present
2841 # @to: highest port to try
2843 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2844 #        #optional
2846 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2847 #        #optional
2849 # Since 1.3
2851 { 'type': 'InetSocketAddress',
2852   'data': {
2853     'host': 'str',
2854     'port': 'str',
2855     '*to': 'uint16',
2856     '*ipv4': 'bool',
2857     '*ipv6': 'bool' } }
2860 # @UnixSocketAddress
2862 # Captures a socket address in the local ("Unix socket") namespace.
2864 # @path: filesystem path to use
2866 # Since 1.3
2868 { 'type': 'UnixSocketAddress',
2869   'data': {
2870     'path': 'str' } }
2873 # @SocketAddress
2875 # Captures the address of a socket, which could also be a named file descriptor
2877 # Since 1.3
2879 { 'union': 'SocketAddress',
2880   'data': {
2881     'inet': 'InetSocketAddress',
2882     'unix': 'UnixSocketAddress',
2883     'fd': 'String' } }
2886 # @getfd:
2888 # Receive a file descriptor via SCM rights and assign it a name
2890 # @fdname: file descriptor name
2892 # Returns: Nothing on success
2894 # Since: 0.14.0
2896 # Notes: If @fdname already exists, the file descriptor assigned to
2897 #        it will be closed and replaced by the received file
2898 #        descriptor.
2899 #        The 'closefd' command can be used to explicitly close the
2900 #        file descriptor when it is no longer needed.
2902 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2905 # @closefd:
2907 # Close a file descriptor previously passed via SCM rights
2909 # @fdname: file descriptor name
2911 # Returns: Nothing on success
2913 # Since: 0.14.0
2915 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2918 # @MachineInfo:
2920 # Information describing a machine.
2922 # @name: the name of the machine
2924 # @alias: #optional an alias for the machine name
2926 # @default: #optional whether the machine is default
2928 # @cpu-max: maximum number of CPUs supported by the machine type
2929 #           (since 1.5.0)
2931 # Since: 1.2.0
2933 { 'type': 'MachineInfo',
2934   'data': { 'name': 'str', '*alias': 'str',
2935             '*is-default': 'bool', 'cpu-max': 'int' } }
2938 # @query-machines:
2940 # Return a list of supported machines
2942 # Returns: a list of MachineInfo
2944 # Since: 1.2.0
2946 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2949 # @CpuDefinitionInfo:
2951 # Virtual CPU definition.
2953 # @name: the name of the CPU definition
2955 # Since: 1.2.0
2957 { 'type': 'CpuDefinitionInfo',
2958   'data': { 'name': 'str' } }
2961 # @query-cpu-definitions:
2963 # Return a list of supported virtual CPU definitions
2965 # Returns: a list of CpuDefInfo
2967 # Since: 1.2.0
2969 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2971 # @AddfdInfo:
2973 # Information about a file descriptor that was added to an fd set.
2975 # @fdset-id: The ID of the fd set that @fd was added to.
2977 # @fd: The file descriptor that was received via SCM rights and
2978 #      added to the fd set.
2980 # Since: 1.2.0
2982 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2985 # @add-fd:
2987 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2989 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2991 # @opaque: #optional A free-form string that can be used to describe the fd.
2993 # Returns: @AddfdInfo on success
2994 #          If file descriptor was not received, FdNotSupplied
2995 #          If @fdset-id is a negative value, InvalidParameterValue
2997 # Notes: The list of fd sets is shared by all monitor connections.
2999 #        If @fdset-id is not specified, a new fd set will be created.
3001 # Since: 1.2.0
3003 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3004   'returns': 'AddfdInfo' }
3007 # @remove-fd:
3009 # Remove a file descriptor from an fd set.
3011 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3013 # @fd: #optional The file descriptor that is to be removed.
3015 # Returns: Nothing on success
3016 #          If @fdset-id or @fd is not found, FdNotFound
3018 # Since: 1.2.0
3020 # Notes: The list of fd sets is shared by all monitor connections.
3022 #        If @fd is not specified, all file descriptors in @fdset-id
3023 #        will be removed.
3025 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3028 # @FdsetFdInfo:
3030 # Information about a file descriptor that belongs to an fd set.
3032 # @fd: The file descriptor value.
3034 # @opaque: #optional A free-form string that can be used to describe the fd.
3036 # Since: 1.2.0
3038 { 'type': 'FdsetFdInfo',
3039   'data': {'fd': 'int', '*opaque': 'str'} }
3042 # @FdsetInfo:
3044 # Information about an fd set.
3046 # @fdset-id: The ID of the fd set.
3048 # @fds: A list of file descriptors that belong to this fd set.
3050 # Since: 1.2.0
3052 { 'type': 'FdsetInfo',
3053   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3056 # @query-fdsets:
3058 # Return information describing all fd sets.
3060 # Returns: A list of @FdsetInfo
3062 # Since: 1.2.0
3064 # Note: The list of fd sets is shared by all monitor connections.
3067 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3070 # @TargetInfo:
3072 # Information describing the QEMU target.
3074 # @arch: the target architecture (eg "x86_64", "i386", etc)
3076 # Since: 1.2.0
3078 { 'type': 'TargetInfo',
3079   'data': { 'arch': 'str' } }
3082 # @query-target:
3084 # Return information about the target for this QEMU
3086 # Returns: TargetInfo
3088 # Since: 1.2.0
3090 { 'command': 'query-target', 'returns': 'TargetInfo' }
3093 # @QKeyCode:
3095 # An enumeration of key name.
3097 # This is used by the send-key command.
3099 # Since: 1.3.0
3101 { 'enum': 'QKeyCode',
3102   'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3103             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3104             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3105             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3106             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3107             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3108             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3109             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3110             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3111             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3112             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3113             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3114             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3115             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3116              'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
3119 # @KeyValue
3121 # Represents a keyboard key.
3123 # Since: 1.3.0
3125 { 'union': 'KeyValue',
3126   'data': {
3127     'number': 'int',
3128     'qcode': 'QKeyCode' } }
3131 # @send-key:
3133 # Send keys to guest.
3135 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3136 #        simultaneously sent to the guest. A @KeyValue.number value is sent
3137 #        directly to the guest, while @KeyValue.qcode must be a valid
3138 #        @QKeyCode value
3140 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3141 #             to 100
3143 # Returns: Nothing on success
3144 #          If key is unknown or redundant, InvalidParameter
3146 # Since: 1.3.0
3149 { 'command': 'send-key',
3150   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3153 # @screendump:
3155 # Write a PPM of the VGA screen to a file.
3157 # @filename: the path of a new PPM file to store the image
3159 # Returns: Nothing on success
3161 # Since: 0.14.0
3163 { 'command': 'screendump', 'data': {'filename': 'str'} }
3166 # @nbd-server-start:
3168 # Start an NBD server listening on the given host and port.  Block
3169 # devices can then be exported using @nbd-server-add.  The NBD
3170 # server will present them as named exports; for example, another
3171 # QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
3173 # @addr: Address on which to listen.
3175 # Returns: error if the server is already running.
3177 # Since: 1.3.0
3179 { 'command': 'nbd-server-start',
3180   'data': { 'addr': 'SocketAddress' } }
3183 # @nbd-server-add:
3185 # Export a device to QEMU's embedded NBD server.
3187 # @device: Block device to be exported
3189 # @writable: Whether clients should be able to write to the device via the
3190 #     NBD connection (default false). #optional
3192 # Returns: error if the device is already marked for export.
3194 # Since: 1.3.0
3196 { 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3199 # @nbd-server-stop:
3201 # Stop QEMU's embedded NBD server, and unregister all devices previously
3202 # added via @nbd-server-add.
3204 # Since: 1.3.0
3206 { 'command': 'nbd-server-stop' }
3209 # @ChardevFile:
3211 # Configuration info for file chardevs.
3213 # @in:  #optional The name of the input file
3214 # @out: The name of the output file
3216 # Since: 1.4
3218 { 'type': 'ChardevFile', 'data': { '*in' : 'str',
3219                                    'out' : 'str' } }
3222 # @ChardevHostdev:
3224 # Configuration info for device and pipe chardevs.
3226 # @device: The name of the special file for the device,
3227 #          i.e. /dev/ttyS0 on Unix or COM1: on Windows
3228 # @type: What kind of device this is.
3230 # Since: 1.4
3232 { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
3235 # @ChardevSocket:
3237 # Configuration info for (stream) socket chardevs.
3239 # @addr: socket address to listen on (server=true)
3240 #        or connect to (server=false)
3241 # @server: #optional create server socket (default: true)
3242 # @wait: #optional wait for connect (not used for server
3243 #        sockets, default: false)
3244 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3245 # @telnet: #optional enable telnet protocol (default: false)
3247 # Since: 1.4
3249 { 'type': 'ChardevSocket', 'data': { 'addr'     : 'SocketAddress',
3250                                      '*server'  : 'bool',
3251                                      '*wait'    : 'bool',
3252                                      '*nodelay' : 'bool',
3253                                      '*telnet'  : 'bool' } }
3256 # @ChardevUdp:
3258 # Configuration info for datagram socket chardevs.
3260 # @remote: remote address
3261 # @local: #optional local address
3263 # Since: 1.5
3265 { 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3266                                   '*local' : 'SocketAddress' } }
3269 # @ChardevMux:
3271 # Configuration info for mux chardevs.
3273 # @chardev: name of the base chardev.
3275 # Since: 1.5
3277 { 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
3280 # @ChardevStdio:
3282 # Configuration info for stdio chardevs.
3284 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3285 #          be delivered to qemu.  Default: true in -nographic mode,
3286 #          false otherwise.
3288 # Since: 1.5
3290 { 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
3293 # @ChardevSpiceChannel:
3295 # Configuration info for spice vm channel chardevs.
3297 # @type: kind of channel (for example vdagent).
3299 # Since: 1.5
3301 { 'type': 'ChardevSpiceChannel', 'data': { 'type'  : 'str' } }
3304 # @ChardevSpicePort:
3306 # Configuration info for spice port chardevs.
3308 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3310 # Since: 1.5
3312 { 'type': 'ChardevSpicePort', 'data': { 'fqdn'  : 'str' } }
3315 # @ChardevVC:
3317 # Configuration info for virtual console chardevs.
3319 # @width:  console width,  in pixels
3320 # @height: console height, in pixels
3321 # @cols:   console width,  in chars
3322 # @rows:   console height, in chars
3324 # Since: 1.5
3326 { 'type': 'ChardevVC', 'data': { '*width'  : 'int',
3327                                  '*height' : 'int',
3328                                  '*cols'   : 'int',
3329                                  '*rows'   : 'int' } }
3332 # @ChardevMemory:
3334 # Configuration info for memory chardevs
3336 # @size: #optional Ringbuffer size, must be power of two, default is 65536
3338 # Since: 1.5
3340 { 'type': 'ChardevMemory', 'data': { '*size'  : 'int' } }
3343 # @ChardevBackend:
3345 # Configuration info for the new chardev backend.
3347 # Since: 1.4
3349 { 'type': 'ChardevDummy', 'data': { } }
3351 { 'union': 'ChardevBackend', 'data': { 'file'   : 'ChardevFile',
3352                                        'serial' : 'ChardevHostdev',
3353                                        'parallel': 'ChardevHostdev',
3354                                        'pipe'   : 'ChardevHostdev',
3355                                        'socket' : 'ChardevSocket',
3356                                        'udp'    : 'ChardevUdp',
3357                                        'pty'    : 'ChardevDummy',
3358                                        'null'   : 'ChardevDummy',
3359                                        'mux'    : 'ChardevMux',
3360                                        'msmouse': 'ChardevDummy',
3361                                        'braille': 'ChardevDummy',
3362                                        'stdio'  : 'ChardevStdio',
3363                                        'console': 'ChardevDummy',
3364                                        'spicevmc' : 'ChardevSpiceChannel',
3365                                        'spiceport' : 'ChardevSpicePort',
3366                                        'vc'     : 'ChardevVC',
3367                                        'memory' : 'ChardevMemory' } }
3370 # @ChardevReturn:
3372 # Return info about the chardev backend just created.
3374 # @pty: #optional name of the slave pseudoterminal device, present if
3375 #       and only if a chardev of type 'pty' was created
3377 # Since: 1.4
3379 { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3382 # @chardev-add:
3384 # Add a character device backend
3386 # @id: the chardev's ID, must be unique
3387 # @backend: backend type and parameters
3389 # Returns: ChardevReturn.
3391 # Since: 1.4
3393 { 'command': 'chardev-add', 'data': {'id'      : 'str',
3394                                      'backend' : 'ChardevBackend' },
3395   'returns': 'ChardevReturn' }
3398 # @chardev-remove:
3400 # Remove a character device backend
3402 # @id: the chardev's ID, must exist and not be in use
3404 # Returns: Nothing on success
3406 # Since: 1.4
3408 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3411 # @TpmModel:
3413 # An enumeration of TPM models
3415 # @tpm-tis: TPM TIS model
3417 # Since: 1.5
3419 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3422 # @query-tpm-models:
3424 # Return a list of supported TPM models
3426 # Returns: a list of TpmModel
3428 # Since: 1.5
3430 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3433 # @TpmType:
3435 # An enumeration of TPM types
3437 # @passthrough: TPM passthrough type
3439 # Since: 1.5
3441 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3444 # @query-tpm-types:
3446 # Return a list of supported TPM types
3448 # Returns: a list of TpmType
3450 # Since: 1.5
3452 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3455 # @TPMPassthroughOptions:
3457 # Information about the TPM passthrough type
3459 # @path: #optional string describing the path used for accessing the TPM device
3461 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3462 #               for cancellation of TPM commands while they are executing
3464 # Since: 1.5
3466 { 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3467                                              '*cancel-path' : 'str'} }
3470 # @TpmTypeOptions:
3472 # A union referencing different TPM backend types' configuration options
3474 # @passthrough: The configuration options for the TPM passthrough type
3476 # Since: 1.5
3478 { 'union': 'TpmTypeOptions',
3479    'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3482 # @TpmInfo:
3484 # Information about the TPM
3486 # @id: The Id of the TPM
3488 # @model: The TPM frontend model
3490 # @options: The TPM (backend) type configuration options
3492 # Since: 1.5
3494 { 'type': 'TPMInfo',
3495   'data': {'id': 'str',
3496            'model': 'TpmModel',
3497            'options': 'TpmTypeOptions' } }
3500 # @query-tpm:
3502 # Return information about the TPM device
3504 # Returns: @TPMInfo on success
3506 # Since: 1.5
3508 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
3511 # @AcpiTableOptions
3513 # Specify an ACPI table on the command line to load.
3515 # At most one of @file and @data can be specified. The list of files specified
3516 # by any one of them is loaded and concatenated in order. If both are omitted,
3517 # @data is implied.
3519 # Other fields / optargs can be used to override fields of the generic ACPI
3520 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
3521 # Description Table Header. If a header field is not overridden, then the
3522 # corresponding value from the concatenated blob is used (in case of @file), or
3523 # it is filled in with a hard-coded value (in case of @data).
3525 # String fields are copied into the matching ACPI member from lowest address
3526 # upwards, and silently truncated / NUL-padded to length.
3528 # @sig: #optional table signature / identifier (4 bytes)
3530 # @rev: #optional table revision number (dependent on signature, 1 byte)
3532 # @oem_id: #optional OEM identifier (6 bytes)
3534 # @oem_table_id: #optional OEM table identifier (8 bytes)
3536 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
3538 # @asl_compiler_id: #optional identifier of the utility that created the table
3539 #                   (4 bytes)
3541 # @asl_compiler_rev: #optional revision number of the utility that created the
3542 #                    table (4 bytes)
3544 # @file: #optional colon (:) separated list of pathnames to load and
3545 #        concatenate as table data. The resultant binary blob is expected to
3546 #        have an ACPI table header. At least one file is required. This field
3547 #        excludes @data.
3549 # @data: #optional colon (:) separated list of pathnames to load and
3550 #        concatenate as table data. The resultant binary blob must not have an
3551 #        ACPI table header. At least one file is required. This field excludes
3552 #        @file.
3554 # Since 1.5
3556 { 'type': 'AcpiTableOptions',
3557   'data': {
3558     '*sig':               'str',
3559     '*rev':               'uint8',
3560     '*oem_id':            'str',
3561     '*oem_table_id':      'str',
3562     '*oem_rev':           'uint32',
3563     '*asl_compiler_id':   'str',
3564     '*asl_compiler_rev':  'uint32',
3565     '*file':              'str',
3566     '*data':              'str' }}
3569 # @CommandLineParameterType:
3571 # Possible types for an option parameter.
3573 # @string: accepts a character string
3575 # @boolean: accepts "on" or "off"
3577 # @number: accepts a number
3579 # @size: accepts a number followed by an optional suffix (K)ilo,
3580 #        (M)ega, (G)iga, (T)era
3582 # Since 1.5
3584 { 'enum': 'CommandLineParameterType',
3585   'data': ['string', 'boolean', 'number', 'size'] }
3588 # @CommandLineParameterInfo:
3590 # Details about a single parameter of a command line option.
3592 # @name: parameter name
3594 # @type: parameter @CommandLineParameterType
3596 # @help: #optional human readable text string, not suitable for parsing.
3598 # Since 1.5
3600 { 'type': 'CommandLineParameterInfo',
3601   'data': { 'name': 'str',
3602             'type': 'CommandLineParameterType',
3603             '*help': 'str' } }
3606 # @CommandLineOptionInfo:
3608 # Details about a command line option, including its list of parameter details
3610 # @option: option name
3612 # @parameters: an array of @CommandLineParameterInfo
3614 # Since 1.5
3616 { 'type': 'CommandLineOptionInfo',
3617   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
3620 # @query-command-line-options:
3622 # Query command line option schema.
3624 # @option: #optional option name
3626 # Returns: list of @CommandLineOptionInfo for all options (or for the given
3627 #          @option).  Returns an error if the given @option doesn't exist.
3629 # Since 1.5
3631 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
3632  'returns': ['CommandLineOptionInfo'] }
3635 # @X86CPURegister32
3637 # A X86 32-bit register
3639 # Since: 1.5
3641 { 'enum': 'X86CPURegister32',
3642   'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
3645 # @X86CPUFeatureWordInfo
3647 # Information about a X86 CPU feature word
3649 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
3651 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
3652 #                   feature word
3654 # @cpuid-register: Output register containing the feature bits
3656 # @features: value of output register, containing the feature bits
3658 # Since: 1.5
3660 { 'type': 'X86CPUFeatureWordInfo',
3661   'data': { 'cpuid-input-eax': 'int',
3662             '*cpuid-input-ecx': 'int',
3663             'cpuid-register': 'X86CPURegister32',
3664             'features': 'int' } }