rdma: export qemu_fflush()
[qemu.git] / qapi-schema.json
blob78da5577af90ed1739978998bfc729981281b20b
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 # Since: 1.2
613 { 'enum': 'MigrationCapability',
614   'data': ['xbzrle'] }
617 # @MigrationCapabilityStatus
619 # Migration capability information
621 # @capability: capability enum
623 # @state: capability state bool
625 # Since: 1.2
627 { 'type': 'MigrationCapabilityStatus',
628   'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
631 # @migrate-set-capabilities
633 # Enable/Disable the following migration capabilities (like xbzrle)
635 # @capabilities: json array of capability modifications to make
637 # Since: 1.2
639 { 'command': 'migrate-set-capabilities',
640   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
643 # @query-migrate-capabilities
645 # Returns information about the current migration capabilities status
647 # Returns: @MigrationCapabilitiesStatus
649 # Since: 1.2
651 { 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}
654 # @MouseInfo:
656 # Information about a mouse device.
658 # @name: the name of the mouse device
660 # @index: the index of the mouse device
662 # @current: true if this device is currently receiving mouse events
664 # @absolute: true if this device supports absolute coordinates as input
666 # Since: 0.14.0
668 { 'type': 'MouseInfo',
669   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
670            'absolute': 'bool'} }
673 # @query-mice:
675 # Returns information about each active mouse device
677 # Returns: a list of @MouseInfo for each device
679 # Since: 0.14.0
681 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
684 # @CpuInfo:
686 # Information about a virtual CPU
688 # @CPU: the index of the virtual CPU
690 # @current: this only exists for backwards compatible and should be ignored
692 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
693 #          to a processor specific low power mode.
695 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
696 #                pointer.
697 #                If the target is Sparc, this is the PC component of the
698 #                instruction pointer.
700 # @nip: #optional If the target is PPC, the instruction pointer
702 # @npc: #optional If the target is Sparc, the NPC component of the instruction
703 #                 pointer
705 # @PC: #optional If the target is MIPS, the instruction pointer
707 # @thread_id: ID of the underlying host thread
709 # Since: 0.14.0
711 # Notes: @halted is a transient state that changes frequently.  By the time the
712 #        data is sent to the client, the guest may no longer be halted.
714 { 'type': 'CpuInfo',
715   'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
716            '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
719 # @query-cpus:
721 # Returns a list of information about each virtual CPU.
723 # Returns: a list of @CpuInfo for each virtual CPU
725 # Since: 0.14.0
727 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
730 # @BlockDeviceInfo:
732 # Information about the backing device for a block device.
734 # @file: the filename of the backing device
736 # @ro: true if the backing device was open read-only
738 # @drv: the name of the block format used to open the backing device. As of
739 #       0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
740 #       'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
741 #       'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
742 #       'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
744 # @backing_file: #optional the name of the backing file (for copy-on-write)
746 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
748 # @encrypted: true if the backing device is encrypted
750 # @encryption_key_missing: true if the backing device is encrypted but an
751 #                          valid encryption key is missing
753 # @bps: total throughput limit in bytes per second is specified
755 # @bps_rd: read throughput limit in bytes per second is specified
757 # @bps_wr: write throughput limit in bytes per second is specified
759 # @iops: total I/O operations per second is specified
761 # @iops_rd: read I/O operations per second is specified
763 # @iops_wr: write I/O operations per second is specified
765 # @image: the info of image used (since: 1.6)
767 # Since: 0.14.0
769 # Notes: This interface is only found in @BlockInfo.
771 { 'type': 'BlockDeviceInfo',
772   'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
773             '*backing_file': 'str', 'backing_file_depth': 'int',
774             'encrypted': 'bool', 'encryption_key_missing': 'bool',
775             'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
776             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
777             'image': 'ImageInfo' } }
780 # @BlockDeviceIoStatus:
782 # An enumeration of block device I/O status.
784 # @ok: The last I/O operation has succeeded
786 # @failed: The last I/O operation has failed
788 # @nospace: The last I/O operation has failed due to a no-space condition
790 # Since: 1.0
792 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
795 # @BlockDirtyInfo:
797 # Block dirty bitmap information.
799 # @count: number of dirty bytes according to the dirty bitmap
801 # @granularity: granularity of the dirty bitmap in bytes (since 1.4)
803 # Since: 1.3
805 { 'type': 'BlockDirtyInfo',
806   'data': {'count': 'int', 'granularity': 'int'} }
809 # @BlockInfo:
811 # Block device information.  This structure describes a virtual device and
812 # the backing device associated with it.
814 # @device: The device name associated with the virtual device.
816 # @type: This field is returned only for compatibility reasons, it should
817 #        not be used (always returns 'unknown')
819 # @removable: True if the device supports removable media.
821 # @locked: True if the guest has locked this device from having its media
822 #          removed
824 # @tray_open: #optional True if the device has a tray and it is open
825 #             (only present if removable is true)
827 # @dirty: #optional dirty bitmap information (only present if the dirty
828 #         bitmap is enabled)
830 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
831 #             supports it and the VM is configured to stop on errors
833 # @inserted: #optional @BlockDeviceInfo describing the device if media is
834 #            present
836 # Since:  0.14.0
838 { 'type': 'BlockInfo',
839   'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
840            'locked': 'bool', '*inserted': 'BlockDeviceInfo',
841            '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
842            '*dirty': 'BlockDirtyInfo' } }
845 # @query-block:
847 # Get a list of BlockInfo for all virtual block devices.
849 # Returns: a list of @BlockInfo describing each virtual block device
851 # Since: 0.14.0
853 { 'command': 'query-block', 'returns': ['BlockInfo'] }
856 # @BlockDeviceStats:
858 # Statistics of a virtual block device or a block backing device.
860 # @rd_bytes:      The number of bytes read by the device.
862 # @wr_bytes:      The number of bytes written by the device.
864 # @rd_operations: The number of read operations performed by the device.
866 # @wr_operations: The number of write operations performed by the device.
868 # @flush_operations: The number of cache flush operations performed by the
869 #                    device (since 0.15.0)
871 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
872 #                       (since 0.15.0).
874 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
876 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
878 # @wr_highest_offset: The offset after the greatest byte written to the
879 #                     device.  The intended use of this information is for
880 #                     growable sparse files (like qcow2) that are used on top
881 #                     of a physical device.
883 # Since: 0.14.0
885 { 'type': 'BlockDeviceStats',
886   'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
887            'wr_operations': 'int', 'flush_operations': 'int',
888            'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
889            'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
892 # @BlockStats:
894 # Statistics of a virtual block device or a block backing device.
896 # @device: #optional If the stats are for a virtual block device, the name
897 #          corresponding to the virtual block device.
899 # @stats:  A @BlockDeviceStats for the device.
901 # @parent: #optional This may point to the backing block device if this is a
902 #          a virtual block device.  If it's a backing block, this will point
903 #          to the backing file is one is present.
905 # Since: 0.14.0
907 { 'type': 'BlockStats',
908   'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
909            '*parent': 'BlockStats'} }
912 # @query-blockstats:
914 # Query the @BlockStats for all virtual block devices.
916 # Returns: A list of @BlockStats for each virtual block devices.
918 # Since: 0.14.0
920 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
923 # @VncClientInfo:
925 # Information about a connected VNC client.
927 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
928 #        when possible.
930 # @family: 'ipv6' if the client is connected via IPv6 and TCP
931 #          'ipv4' if the client is connected via IPv4 and TCP
932 #          'unix' if the client is connected via a unix domain socket
933 #          'unknown' otherwise
935 # @service: The service name of the client's port.  This may depends on the
936 #           host system's service database so symbolic names should not be
937 #           relied on.
939 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
940 #              Name of the client.
942 # @sasl_username: #optional If SASL authentication is in use, the SASL username
943 #                 used for authentication.
945 # Since: 0.14.0
947 { 'type': 'VncClientInfo',
948   'data': {'host': 'str', 'family': 'str', 'service': 'str',
949            '*x509_dname': 'str', '*sasl_username': 'str'} }
952 # @VncInfo:
954 # Information about the VNC session.
956 # @enabled: true if the VNC server is enabled, false otherwise
958 # @host: #optional The hostname the VNC server is bound to.  This depends on
959 #        the name resolution on the host and may be an IP address.
961 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
962 #                    'ipv4' if the host is listening for IPv4 connections
963 #                    'unix' if the host is listening on a unix domain socket
964 #                    'unknown' otherwise
966 # @service: #optional The service name of the server's port.  This may depends
967 #           on the host system's service database so symbolic names should not
968 #           be relied on.
970 # @auth: #optional the current authentication type used by the server
971 #        'none' if no authentication is being used
972 #        'vnc' if VNC authentication is being used
973 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
974 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
975 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
976 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
977 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
978 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
979 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
980 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
981 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
983 # @clients: a list of @VncClientInfo of all currently connected clients
985 # Since: 0.14.0
987 { 'type': 'VncInfo',
988   'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
989            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
992 # @query-vnc:
994 # Returns information about the current VNC server
996 # Returns: @VncInfo
998 # Since: 0.14.0
1000 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1003 # @SpiceChannel
1005 # Information about a SPICE client channel.
1007 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
1008 #        when possible.
1010 # @family: 'ipv6' if the client is connected via IPv6 and TCP
1011 #          'ipv4' if the client is connected via IPv4 and TCP
1012 #          'unix' if the client is connected via a unix domain socket
1013 #          'unknown' otherwise
1015 # @port: The client's port number.
1017 # @connection-id: SPICE connection id number.  All channels with the same id
1018 #                 belong to the same SPICE session.
1020 # @connection-type: SPICE channel type number.  "1" is the main control
1021 #                   channel, filter for this one if you want to track spice
1022 #                   sessions only
1024 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
1025 #              multiple channels of the same type exist, such as multiple
1026 #              display channels in a multihead setup
1028 # @tls: true if the channel is encrypted, false otherwise.
1030 # Since: 0.14.0
1032 { 'type': 'SpiceChannel',
1033   'data': {'host': 'str', 'family': 'str', 'port': 'str',
1034            'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1035            'tls': 'bool'} }
1038 # @SpiceQueryMouseMode
1040 # An enumeration of Spice mouse states.
1042 # @client: Mouse cursor position is determined by the client.
1044 # @server: Mouse cursor position is determined by the server.
1046 # @unknown: No information is available about mouse mode used by
1047 #           the spice server.
1049 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1051 # Since: 1.1
1053 { 'enum': 'SpiceQueryMouseMode',
1054   'data': [ 'client', 'server', 'unknown' ] }
1057 # @SpiceInfo
1059 # Information about the SPICE session.
1061 # @enabled: true if the SPICE server is enabled, false otherwise
1063 # @migrated: true if the last guest migration completed and spice
1064 #            migration had completed as well. false otherwise.
1066 # @host: #optional The hostname the SPICE server is bound to.  This depends on
1067 #        the name resolution on the host and may be an IP address.
1069 # @port: #optional The SPICE server's port number.
1071 # @compiled-version: #optional SPICE server version.
1073 # @tls-port: #optional The SPICE server's TLS port number.
1075 # @auth: #optional the current authentication type used by the server
1076 #        'none'  if no authentication is being used
1077 #        'spice' uses SASL or direct TLS authentication, depending on command
1078 #                line options
1080 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1081 #              be determined by the client or the server, or unknown if spice
1082 #              server doesn't provide this information.
1084 #              Since: 1.1
1086 # @channels: a list of @SpiceChannel for each active spice channel
1088 # Since: 0.14.0
1090 { 'type': 'SpiceInfo',
1091   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1092            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1093            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1096 # @query-spice
1098 # Returns information about the current SPICE server
1100 # Returns: @SpiceInfo
1102 # Since: 0.14.0
1104 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1107 # @BalloonInfo:
1109 # Information about the guest balloon device.
1111 # @actual: the number of bytes the balloon currently contains
1113 # Since: 0.14.0
1116 { 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
1119 # @query-balloon:
1121 # Return information about the balloon device.
1123 # Returns: @BalloonInfo on success
1124 #          If the balloon driver is enabled but not functional because the KVM
1125 #          kernel module cannot support it, KvmMissingCap
1126 #          If no balloon device is present, DeviceNotActive
1128 # Since: 0.14.0
1130 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1133 # @PciMemoryRange:
1135 # A PCI device memory region
1137 # @base: the starting address (guest physical)
1139 # @limit: the ending address (guest physical)
1141 # Since: 0.14.0
1143 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1146 # @PciMemoryRegion
1148 # Information about a PCI device I/O region.
1150 # @bar: the index of the Base Address Register for this region
1152 # @type: 'io' if the region is a PIO region
1153 #        'memory' if the region is a MMIO region
1155 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1157 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1159 # Since: 0.14.0
1161 { 'type': 'PciMemoryRegion',
1162   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1163            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1166 # @PciBridgeInfo:
1168 # Information about a PCI Bridge device
1170 # @bus.number: primary bus interface number.  This should be the number of the
1171 #              bus the device resides on.
1173 # @bus.secondary: secondary bus interface number.  This is the number of the
1174 #                 main bus for the bridge
1176 # @bus.subordinate: This is the highest number bus that resides below the
1177 #                   bridge.
1179 # @bus.io_range: The PIO range for all devices on this bridge
1181 # @bus.memory_range: The MMIO range for all devices on this bridge
1183 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1184 #                          this bridge
1186 # @devices: a list of @PciDeviceInfo for each device on this bridge
1188 # Since: 0.14.0
1190 { 'type': 'PciBridgeInfo',
1191   'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1192                     'io_range': 'PciMemoryRange',
1193                     'memory_range': 'PciMemoryRange',
1194                     'prefetchable_range': 'PciMemoryRange' },
1195            '*devices': ['PciDeviceInfo']} }
1198 # @PciDeviceInfo:
1200 # Information about a PCI device
1202 # @bus: the bus number of the device
1204 # @slot: the slot the device is located in
1206 # @function: the function of the slot used by the device
1208 # @class_info.desc: #optional a string description of the device's class
1210 # @class_info.class: the class code of the device
1212 # @id.device: the PCI device id
1214 # @id.vendor: the PCI vendor id
1216 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1218 # @qdev_id: the device name of the PCI device
1220 # @pci_bridge: if the device is a PCI bridge, the bridge information
1222 # @regions: a list of the PCI I/O regions associated with the device
1224 # Notes: the contents of @class_info.desc are not stable and should only be
1225 #        treated as informational.
1227 # Since: 0.14.0
1229 { 'type': 'PciDeviceInfo',
1230   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1231            'class_info': {'*desc': 'str', 'class': 'int'},
1232            'id': {'device': 'int', 'vendor': 'int'},
1233            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1234            'regions': ['PciMemoryRegion']} }
1237 # @PciInfo:
1239 # Information about a PCI bus
1241 # @bus: the bus index
1243 # @devices: a list of devices on this bus
1245 # Since: 0.14.0
1247 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1250 # @query-pci:
1252 # Return information about the PCI bus topology of the guest.
1254 # Returns: a list of @PciInfo for each PCI bus
1256 # Since: 0.14.0
1258 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1261 # @BlockdevOnError:
1263 # An enumeration of possible behaviors for errors on I/O operations.
1264 # The exact meaning depends on whether the I/O was initiated by a guest
1265 # or by a block job
1267 # @report: for guest operations, report the error to the guest;
1268 #          for jobs, cancel the job
1270 # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1271 #          or BLOCK_JOB_ERROR)
1273 # @enospc: same as @stop on ENOSPC, same as @report otherwise.
1275 # @stop: for guest operations, stop the virtual machine;
1276 #        for jobs, pause the job
1278 # Since: 1.3
1280 { 'enum': 'BlockdevOnError',
1281   'data': ['report', 'ignore', 'enospc', 'stop'] }
1284 # @MirrorSyncMode:
1286 # An enumeration of possible behaviors for the initial synchronization
1287 # phase of storage mirroring.
1289 # @top: copies data in the topmost image to the destination
1291 # @full: copies data from all images to the destination
1293 # @none: only copy data written from now on
1295 # Since: 1.3
1297 { 'enum': 'MirrorSyncMode',
1298   'data': ['top', 'full', 'none'] }
1301 # @BlockJobInfo:
1303 # Information about a long-running block device operation.
1305 # @type: the job type ('stream' for image streaming)
1307 # @device: the block device name
1309 # @len: the maximum progress value
1311 # @busy: false if the job is known to be in a quiescent state, with
1312 #        no pending I/O.  Since 1.3.
1314 # @paused: whether the job is paused or, if @busy is true, will
1315 #          pause itself as soon as possible.  Since 1.3.
1317 # @offset: the current progress value
1319 # @speed: the rate limit, bytes per second
1321 # @io-status: the status of the job (since 1.3)
1323 # Since: 1.1
1325 { 'type': 'BlockJobInfo',
1326   'data': {'type': 'str', 'device': 'str', 'len': 'int',
1327            'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1328            'io-status': 'BlockDeviceIoStatus'} }
1331 # @query-block-jobs:
1333 # Return information about long-running block device operations.
1335 # Returns: a list of @BlockJobInfo for each active block job
1337 # Since: 1.1
1339 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1342 # @quit:
1344 # This command will cause the QEMU process to exit gracefully.  While every
1345 # attempt is made to send the QMP response before terminating, this is not
1346 # guaranteed.  When using this interface, a premature EOF would not be
1347 # unexpected.
1349 # Since: 0.14.0
1351 { 'command': 'quit' }
1354 # @stop:
1356 # Stop all guest VCPU execution.
1358 # Since:  0.14.0
1360 # Notes:  This function will succeed even if the guest is already in the stopped
1361 #         state.  In "inmigrate" state, it will ensure that the guest
1362 #         remains paused once migration finishes, as if the -S option was
1363 #         passed on the command line.
1365 { 'command': 'stop' }
1368 # @system_reset:
1370 # Performs a hard reset of a guest.
1372 # Since: 0.14.0
1374 { 'command': 'system_reset' }
1377 # @system_powerdown:
1379 # Requests that a guest perform a powerdown operation.
1381 # Since: 0.14.0
1383 # Notes: A guest may or may not respond to this command.  This command
1384 #        returning does not indicate that a guest has accepted the request or
1385 #        that it has shut down.  Many guests will respond to this command by
1386 #        prompting the user in some way.
1388 { 'command': 'system_powerdown' }
1391 # @cpu:
1393 # This command is a nop that is only provided for the purposes of compatibility.
1395 # Since: 0.14.0
1397 # Notes: Do not use this command.
1399 { 'command': 'cpu', 'data': {'index': 'int'} }
1402 # @cpu-add
1404 # Adds CPU with specified ID
1406 # @id: ID of CPU to be created, valid values [0..max_cpus)
1408 # Returns: Nothing on success
1410 # Since 1.5
1412 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1415 # @memsave:
1417 # Save a portion of guest memory to a file.
1419 # @val: the virtual address of the guest to start from
1421 # @size: the size of memory region to save
1423 # @filename: the file to save the memory to as binary data
1425 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1426 #                       virtual address (defaults to CPU 0)
1428 # Returns: Nothing on success
1430 # Since: 0.14.0
1432 # Notes: Errors were not reliably returned until 1.1
1434 { 'command': 'memsave',
1435   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1438 # @pmemsave:
1440 # Save a portion of guest physical memory to a file.
1442 # @val: the physical address of the guest to start from
1444 # @size: the size of memory region to save
1446 # @filename: the file to save the memory to as binary data
1448 # Returns: Nothing on success
1450 # Since: 0.14.0
1452 # Notes: Errors were not reliably returned until 1.1
1454 { 'command': 'pmemsave',
1455   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1458 # @cont:
1460 # Resume guest VCPU execution.
1462 # Since:  0.14.0
1464 # Returns:  If successful, nothing
1465 #           If QEMU was started with an encrypted block device and a key has
1466 #              not yet been set, DeviceEncrypted.
1468 # Notes:  This command will succeed if the guest is currently running.  It
1469 #         will also succeed if the guest is in the "inmigrate" state; in
1470 #         this case, the effect of the command is to make sure the guest
1471 #         starts once migration finishes, removing the effect of the -S
1472 #         command line option if it was passed.
1474 { 'command': 'cont' }
1477 # @system_wakeup:
1479 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1481 # Since:  1.1
1483 # Returns:  nothing.
1485 { 'command': 'system_wakeup' }
1488 # @inject-nmi:
1490 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1492 # Returns:  If successful, nothing
1494 # Since:  0.14.0
1496 # Notes: Only x86 Virtual Machines support this command.
1498 { 'command': 'inject-nmi' }
1501 # @set_link:
1503 # Sets the link status of a virtual network adapter.
1505 # @name: the device name of the virtual network adapter
1507 # @up: true to set the link status to be up
1509 # Returns: Nothing on success
1510 #          If @name is not a valid network device, DeviceNotFound
1512 # Since: 0.14.0
1514 # Notes: Not all network adapters support setting link status.  This command
1515 #        will succeed even if the network adapter does not support link status
1516 #        notification.
1518 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1521 # @block_passwd:
1523 # This command sets the password of a block device that has not been open
1524 # with a password and requires one.
1526 # The two cases where this can happen are a block device is created through
1527 # QEMU's initial command line or a block device is changed through the legacy
1528 # @change interface.
1530 # In the event that the block device is created through the initial command
1531 # line, the VM will start in the stopped state regardless of whether '-S' is
1532 # used.  The intention is for a management tool to query the block devices to
1533 # determine which ones are encrypted, set the passwords with this command, and
1534 # then start the guest with the @cont command.
1536 # @device:   the name of the device to set the password on
1538 # @password: the password to use for the device
1540 # Returns: nothing on success
1541 #          If @device is not a valid block device, DeviceNotFound
1542 #          If @device is not encrypted, DeviceNotEncrypted
1544 # Notes:  Not all block formats support encryption and some that do are not
1545 #         able to validate that a password is correct.  Disk corruption may
1546 #         occur if an invalid password is specified.
1548 # Since: 0.14.0
1550 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1553 # @balloon:
1555 # Request the balloon driver to change its balloon size.
1557 # @value: the target size of the balloon in bytes
1559 # Returns: Nothing on success
1560 #          If the balloon driver is enabled but not functional because the KVM
1561 #            kernel module cannot support it, KvmMissingCap
1562 #          If no balloon device is present, DeviceNotActive
1564 # Notes: This command just issues a request to the guest.  When it returns,
1565 #        the balloon size may not have changed.  A guest can change the balloon
1566 #        size independent of this command.
1568 # Since: 0.14.0
1570 { 'command': 'balloon', 'data': {'value': 'int'} }
1573 # @block_resize
1575 # Resize a block image while a guest is running.
1577 # @device:  the name of the device to get the image resized
1579 # @size:  new image size in bytes
1581 # Returns: nothing on success
1582 #          If @device is not a valid block device, DeviceNotFound
1584 # Since: 0.14.0
1586 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1589 # @NewImageMode
1591 # An enumeration that tells QEMU how to set the backing file path in
1592 # a new image file.
1594 # @existing: QEMU should look for an existing image file.
1596 # @absolute-paths: QEMU should create a new image with absolute paths
1597 # for the backing file.
1599 # Since: 1.1
1601 { 'enum': 'NewImageMode',
1602   'data': [ 'existing', 'absolute-paths' ] }
1605 # @BlockdevSnapshot
1607 # @device:  the name of the device to generate the snapshot from.
1609 # @snapshot-file: the target of the new image. A new file will be created.
1611 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1613 # @mode: #optional whether and how QEMU should create a new image, default is
1614 #        'absolute-paths'.
1616 { 'type': 'BlockdevSnapshot',
1617   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1618             '*mode': 'NewImageMode' } }
1621 # @TransactionAction
1623 # A discriminated record of operations that can be performed with
1624 # @transaction.
1626 { 'union': 'TransactionAction',
1627   'data': {
1628        'blockdev-snapshot-sync': 'BlockdevSnapshot'
1629    } }
1632 # @transaction
1634 # Executes a number of transactionable QMP commands atomically. If any
1635 # operation fails, then the entire set of actions will be abandoned and the
1636 # appropriate error returned.
1638 #  List of:
1639 #  @TransactionAction: information needed for the respective operation
1641 # Returns: nothing on success
1642 #          Errors depend on the operations of the transaction
1644 # Note: The transaction aborts on the first failure.  Therefore, there will be
1645 # information on only one failed operation returned in an error condition, and
1646 # subsequent actions will not have been attempted.
1648 # Since 1.1
1650 { 'command': 'transaction',
1651   'data': { 'actions': [ 'TransactionAction' ] } }
1654 # @blockdev-snapshot-sync
1656 # Generates a synchronous snapshot of a block device.
1658 # @device:  the name of the device to generate the snapshot from.
1660 # @snapshot-file: the target of the new image. If the file exists, or if it
1661 #                 is a device, the snapshot will be created in the existing
1662 #                 file/device. If does not exist, a new file will be created.
1664 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1666 # @mode: #optional whether and how QEMU should create a new image, default is
1667 #        'absolute-paths'.
1669 # Returns: nothing on success
1670 #          If @device is not a valid block device, DeviceNotFound
1672 # Since 0.14.0
1674 { 'command': 'blockdev-snapshot-sync',
1675   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1676             '*mode': 'NewImageMode'} }
1679 # @human-monitor-command:
1681 # Execute a command on the human monitor and return the output.
1683 # @command-line: the command to execute in the human monitor
1685 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1687 # Returns: the output of the command as a string
1689 # Since: 0.14.0
1691 # Notes: This command only exists as a stop-gap.  It's use is highly
1692 #        discouraged.  The semantics of this command are not guaranteed.
1694 #        Known limitations:
1696 #        o This command is stateless, this means that commands that depend
1697 #          on state information (such as getfd) might not work
1699 #       o Commands that prompt the user for data (eg. 'cont' when the block
1700 #         device is encrypted) don't currently work
1702 { 'command': 'human-monitor-command',
1703   'data': {'command-line': 'str', '*cpu-index': 'int'},
1704   'returns': 'str' }
1707 # @block-commit
1709 # Live commit of data from overlay image nodes into backing nodes - i.e.,
1710 # writes data between 'top' and 'base' into 'base'.
1712 # @device:  the name of the device
1714 # @base:   #optional The file name of the backing image to write data into.
1715 #                    If not specified, this is the deepest backing image
1717 # @top:              The file name of the backing image within the image chain,
1718 #                    which contains the topmost data to be committed down.
1719 #                    Note, the active layer as 'top' is currently unsupported.
1721 #                    If top == base, that is an error.
1724 # @speed:  #optional the maximum speed, in bytes per second
1726 # Returns: Nothing on success
1727 #          If commit or stream is already active on this device, DeviceInUse
1728 #          If @device does not exist, DeviceNotFound
1729 #          If image commit is not supported by this device, NotSupported
1730 #          If @base or @top is invalid, a generic error is returned
1731 #          If @top is the active layer, or omitted, a generic error is returned
1732 #          If @speed is invalid, InvalidParameter
1734 # Since: 1.3
1737 { 'command': 'block-commit',
1738   'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1739             '*speed': 'int' } }
1742 # @drive-mirror
1744 # Start mirroring a block device's writes to a new destination.
1746 # @device:  the name of the device whose writes should be mirrored.
1748 # @target: the target of the new image. If the file exists, or if it
1749 #          is a device, the existing file/device will be used as the new
1750 #          destination.  If it does not exist, a new file will be created.
1752 # @format: #optional the format of the new destination, default is to
1753 #          probe if @mode is 'existing', else the format of the source
1755 # @mode: #optional whether and how QEMU should create a new image, default is
1756 #        'absolute-paths'.
1758 # @speed:  #optional the maximum speed, in bytes per second
1760 # @sync: what parts of the disk image should be copied to the destination
1761 #        (all the disk, only the sectors allocated in the topmost image, or
1762 #        only new I/O).
1764 # @granularity: #optional granularity of the dirty bitmap, default is 64K
1765 #               if the image format doesn't have clusters, 4K if the clusters
1766 #               are smaller than that, else the cluster size.  Must be a
1767 #               power of 2 between 512 and 64M (since 1.4).
1769 # @buf-size: #optional maximum amount of data in flight from source to
1770 #            target (since 1.4).
1772 # @on-source-error: #optional the action to take on an error on the source,
1773 #                   default 'report'.  'stop' and 'enospc' can only be used
1774 #                   if the block device supports io-status (see BlockInfo).
1776 # @on-target-error: #optional the action to take on an error on the target,
1777 #                   default 'report' (no limitations, since this applies to
1778 #                   a different block device than @device).
1780 # Returns: nothing on success
1781 #          If @device is not a valid block device, DeviceNotFound
1783 # Since 1.3
1785 { 'command': 'drive-mirror',
1786   'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1787             'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
1788             '*speed': 'int', '*granularity': 'uint32',
1789             '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
1790             '*on-target-error': 'BlockdevOnError' } }
1793 # @migrate_cancel
1795 # Cancel the current executing migration process.
1797 # Returns: nothing on success
1799 # Notes: This command succeeds even if there is no migration process running.
1801 # Since: 0.14.0
1803 { 'command': 'migrate_cancel' }
1806 # @migrate_set_downtime
1808 # Set maximum tolerated downtime for migration.
1810 # @value: maximum downtime in seconds
1812 # Returns: nothing on success
1814 # Since: 0.14.0
1816 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1819 # @migrate_set_speed
1821 # Set maximum speed for migration.
1823 # @value: maximum speed in bytes.
1825 # Returns: nothing on success
1827 # Notes: A value lesser than zero will be automatically round up to zero.
1829 # Since: 0.14.0
1831 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1834 # @migrate-set-cache-size
1836 # Set XBZRLE cache size
1838 # @value: cache size in bytes
1840 # The size will be rounded down to the nearest power of 2.
1841 # The cache size can be modified before and during ongoing migration
1843 # Returns: nothing on success
1845 # Since: 1.2
1847 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1850 # @query-migrate-cache-size
1852 # query XBZRLE cache size
1854 # Returns: XBZRLE cache size in bytes
1856 # Since: 1.2
1858 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1861 # @ObjectPropertyInfo:
1863 # @name: the name of the property
1865 # @type: the type of the property.  This will typically come in one of four
1866 #        forms:
1868 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1869 #           These types are mapped to the appropriate JSON type.
1871 #        2) A legacy type in the form 'legacy<subtype>' where subtype is the
1872 #           legacy qdev typename.  These types are always treated as strings.
1874 #        3) A child type in the form 'child<subtype>' where subtype is a qdev
1875 #           device type name.  Child properties create the composition tree.
1877 #        4) A link type in the form 'link<subtype>' where subtype is a qdev
1878 #           device type name.  Link properties form the device model graph.
1880 # Since: 1.2
1882 { 'type': 'ObjectPropertyInfo',
1883   'data': { 'name': 'str', 'type': 'str' } }
1886 # @qom-list:
1888 # This command will list any properties of a object given a path in the object
1889 # model.
1891 # @path: the path within the object model.  See @qom-get for a description of
1892 #        this parameter.
1894 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1895 #          object.
1897 # Since: 1.2
1899 { 'command': 'qom-list',
1900   'data': { 'path': 'str' },
1901   'returns': [ 'ObjectPropertyInfo' ] }
1904 # @qom-get:
1906 # This command will get a property from a object model path and return the
1907 # value.
1909 # @path: The path within the object model.  There are two forms of supported
1910 #        paths--absolute and partial paths.
1912 #        Absolute paths are derived from the root object and can follow child<>
1913 #        or link<> properties.  Since they can follow link<> properties, they
1914 #        can be arbitrarily long.  Absolute paths look like absolute filenames
1915 #        and are prefixed  with a leading slash.
1917 #        Partial paths look like relative filenames.  They do not begin
1918 #        with a prefix.  The matching rules for partial paths are subtle but
1919 #        designed to make specifying objects easy.  At each level of the
1920 #        composition tree, the partial path is matched as an absolute path.
1921 #        The first match is not returned.  At least two matches are searched
1922 #        for.  A successful result is only returned if only one match is
1923 #        found.  If more than one match is found, a flag is return to
1924 #        indicate that the match was ambiguous.
1926 # @property: The property name to read
1928 # Returns: The property value.  The type depends on the property type.  legacy<>
1929 #          properties are returned as #str.  child<> and link<> properties are
1930 #          returns as #str pathnames.  All integer property types (u8, u16, etc)
1931 #          are returned as #int.
1933 # Since: 1.2
1935 { 'command': 'qom-get',
1936   'data': { 'path': 'str', 'property': 'str' },
1937   'returns': 'visitor',
1938   'gen': 'no' }
1941 # @qom-set:
1943 # This command will set a property from a object model path.
1945 # @path: see @qom-get for a description of this parameter
1947 # @property: the property name to set
1949 # @value: a value who's type is appropriate for the property type.  See @qom-get
1950 #         for a description of type mapping.
1952 # Since: 1.2
1954 { 'command': 'qom-set',
1955   'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1956   'gen': 'no' }
1959 # @set_password:
1961 # Sets the password of a remote display session.
1963 # @protocol: `vnc' to modify the VNC server password
1964 #            `spice' to modify the Spice server password
1966 # @password: the new password
1968 # @connected: #optional how to handle existing clients when changing the
1969 #                       password.  If nothing is specified, defaults to `keep'
1970 #                       `fail' to fail the command if clients are connected
1971 #                       `disconnect' to disconnect existing clients
1972 #                       `keep' to maintain existing clients
1974 # Returns: Nothing on success
1975 #          If Spice is not enabled, DeviceNotFound
1977 # Since: 0.14.0
1979 { 'command': 'set_password',
1980   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1983 # @expire_password:
1985 # Expire the password of a remote display server.
1987 # @protocol: the name of the remote display protocol `vnc' or `spice'
1989 # @time: when to expire the password.
1990 #        `now' to expire the password immediately
1991 #        `never' to cancel password expiration
1992 #        `+INT' where INT is the number of seconds from now (integer)
1993 #        `INT' where INT is the absolute time in seconds
1995 # Returns: Nothing on success
1996 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
1998 # Since: 0.14.0
2000 # Notes: Time is relative to the server and currently there is no way to
2001 #        coordinate server time with client time.  It is not recommended to
2002 #        use the absolute time version of the @time parameter unless you're
2003 #        sure you are on the same machine as the QEMU instance.
2005 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2008 # @eject:
2010 # Ejects a device from a removable drive.
2012 # @device:  The name of the device
2014 # @force:   @optional If true, eject regardless of whether the drive is locked.
2015 #           If not specified, the default value is false.
2017 # Returns:  Nothing on success
2018 #           If @device is not a valid block device, DeviceNotFound
2020 # Notes:    Ejecting a device will no media results in success
2022 # Since: 0.14.0
2024 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
2027 # @change-vnc-password:
2029 # Change the VNC server password.
2031 # @target:  the new password to use with VNC authentication
2033 # Since: 1.1
2035 # Notes:  An empty password in this command will set the password to the empty
2036 #         string.  Existing clients are unaffected by executing this command.
2038 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2041 # @change:
2043 # This command is multiple commands multiplexed together.
2045 # @device: This is normally the name of a block device but it may also be 'vnc'.
2046 #          when it's 'vnc', then sub command depends on @target
2048 # @target: If @device is a block device, then this is the new filename.
2049 #          If @device is 'vnc', then if the value 'password' selects the vnc
2050 #          change password command.   Otherwise, this specifies a new server URI
2051 #          address to listen to for VNC connections.
2053 # @arg:    If @device is a block device, then this is an optional format to open
2054 #          the device with.
2055 #          If @device is 'vnc' and @target is 'password', this is the new VNC
2056 #          password to set.  If this argument is an empty string, then no future
2057 #          logins will be allowed.
2059 # Returns: Nothing on success.
2060 #          If @device is not a valid block device, DeviceNotFound
2061 #          If the new block device is encrypted, DeviceEncrypted.  Note that
2062 #          if this error is returned, the device has been opened successfully
2063 #          and an additional call to @block_passwd is required to set the
2064 #          device's password.  The behavior of reads and writes to the block
2065 #          device between when these calls are executed is undefined.
2067 # Notes:  It is strongly recommended that this interface is not used especially
2068 #         for changing block devices.
2070 # Since: 0.14.0
2072 { 'command': 'change',
2073   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2076 # @block_set_io_throttle:
2078 # Change I/O throttle limits for a block drive.
2080 # @device: The name of the device
2082 # @bps: total throughput limit in bytes per second
2084 # @bps_rd: read throughput limit in bytes per second
2086 # @bps_wr: write throughput limit in bytes per second
2088 # @iops: total I/O operations per second
2090 # @ops_rd: read I/O operations per second
2092 # @iops_wr: write I/O operations per second
2094 # Returns: Nothing on success
2095 #          If @device is not a valid block device, DeviceNotFound
2097 # Since: 1.1
2099 { 'command': 'block_set_io_throttle',
2100   'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
2101             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
2104 # @block-stream:
2106 # Copy data from a backing file into a block device.
2108 # The block streaming operation is performed in the background until the entire
2109 # backing file has been copied.  This command returns immediately once streaming
2110 # has started.  The status of ongoing block streaming operations can be checked
2111 # with query-block-jobs.  The operation can be stopped before it has completed
2112 # using the block-job-cancel command.
2114 # If a base file is specified then sectors are not copied from that base file and
2115 # its backing chain.  When streaming completes the image file will have the base
2116 # file as its backing file.  This can be used to stream a subset of the backing
2117 # file chain instead of flattening the entire image.
2119 # On successful completion the image file is updated to drop the backing file
2120 # and the BLOCK_JOB_COMPLETED event is emitted.
2122 # @device: the device name
2124 # @base:   #optional the common backing file name
2126 # @speed:  #optional the maximum speed, in bytes per second
2128 # @on-error: #optional the action to take on an error (default report).
2129 #            'stop' and 'enospc' can only be used if the block device
2130 #            supports io-status (see BlockInfo).  Since 1.3.
2132 # Returns: Nothing on success
2133 #          If @device does not exist, DeviceNotFound
2135 # Since: 1.1
2137 { 'command': 'block-stream',
2138   'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
2139             '*on-error': 'BlockdevOnError' } }
2142 # @block-job-set-speed:
2144 # Set maximum speed for a background block operation.
2146 # This command can only be issued when there is an active block job.
2148 # Throttling can be disabled by setting the speed to 0.
2150 # @device: the device name
2152 # @speed:  the maximum speed, in bytes per second, or 0 for unlimited.
2153 #          Defaults to 0.
2155 # Returns: Nothing on success
2156 #          If no background operation is active on this device, DeviceNotActive
2158 # Since: 1.1
2160 { 'command': 'block-job-set-speed',
2161   'data': { 'device': 'str', 'speed': 'int' } }
2164 # @block-job-cancel:
2166 # Stop an active background block operation.
2168 # This command returns immediately after marking the active background block
2169 # operation for cancellation.  It is an error to call this command if no
2170 # operation is in progress.
2172 # The operation will cancel as soon as possible and then emit the
2173 # BLOCK_JOB_CANCELLED event.  Before that happens the job is still visible when
2174 # enumerated using query-block-jobs.
2176 # For streaming, the image file retains its backing file unless the streaming
2177 # operation happens to complete just as it is being cancelled.  A new streaming
2178 # operation can be started at a later time to finish copying all data from the
2179 # backing file.
2181 # @device: the device name
2183 # @force: #optional whether to allow cancellation of a paused job (default
2184 #         false).  Since 1.3.
2186 # Returns: Nothing on success
2187 #          If no background operation is active on this device, DeviceNotActive
2189 # Since: 1.1
2191 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
2194 # @block-job-pause:
2196 # Pause an active background block operation.
2198 # This command returns immediately after marking the active background block
2199 # operation for pausing.  It is an error to call this command if no
2200 # operation is in progress.  Pausing an already paused job has no cumulative
2201 # effect; a single block-job-resume command will resume the job.
2203 # The operation will pause as soon as possible.  No event is emitted when
2204 # the operation is actually paused.  Cancelling a paused job automatically
2205 # resumes it.
2207 # @device: the device name
2209 # Returns: Nothing on success
2210 #          If no background operation is active on this device, DeviceNotActive
2212 # Since: 1.3
2214 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2217 # @block-job-resume:
2219 # Resume an active background block operation.
2221 # This command returns immediately after resuming a paused background block
2222 # operation.  It is an error to call this command if no operation is in
2223 # progress.  Resuming an already running job is not an error.
2225 # This command also clears the error status of the job.
2227 # @device: the device name
2229 # Returns: Nothing on success
2230 #          If no background operation is active on this device, DeviceNotActive
2232 # Since: 1.3
2234 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
2237 # @block-job-complete:
2239 # Manually trigger completion of an active background block operation.  This
2240 # is supported for drive mirroring, where it also switches the device to
2241 # write to the target path only.  The ability to complete is signaled with
2242 # a BLOCK_JOB_READY event.
2244 # This command completes an active background block operation synchronously.
2245 # The ordering of this command's return with the BLOCK_JOB_COMPLETED event
2246 # is not defined.  Note that if an I/O error occurs during the processing of
2247 # this command: 1) the command itself will fail; 2) the error will be processed
2248 # according to the rerror/werror arguments that were specified when starting
2249 # the operation.
2251 # A cancelled or paused job cannot be completed.
2253 # @device: the device name
2255 # Returns: Nothing on success
2256 #          If no background operation is active on this device, DeviceNotActive
2258 # Since: 1.3
2260 { 'command': 'block-job-complete', 'data': { 'device': 'str' } }
2263 # @ObjectTypeInfo:
2265 # This structure describes a search result from @qom-list-types
2267 # @name: the type name found in the search
2269 # Since: 1.1
2271 # Notes: This command is experimental and may change syntax in future releases.
2273 { 'type': 'ObjectTypeInfo',
2274   'data': { 'name': 'str' } }
2277 # @qom-list-types:
2279 # This command will return a list of types given search parameters
2281 # @implements: if specified, only return types that implement this type name
2283 # @abstract: if true, include abstract types in the results
2285 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2287 # Since: 1.1
2289 { 'command': 'qom-list-types',
2290   'data': { '*implements': 'str', '*abstract': 'bool' },
2291   'returns': [ 'ObjectTypeInfo' ] }
2294 # @DevicePropertyInfo:
2296 # Information about device properties.
2298 # @name: the name of the property
2299 # @type: the typename of the property
2301 # Since: 1.2
2303 { 'type': 'DevicePropertyInfo',
2304   'data': { 'name': 'str', 'type': 'str' } }
2307 # @device-list-properties:
2309 # List properties associated with a device.
2311 # @typename: the type name of a device
2313 # Returns: a list of DevicePropertyInfo describing a devices properties
2315 # Since: 1.2
2317 { 'command': 'device-list-properties',
2318   'data': { 'typename': 'str'},
2319   'returns': [ 'DevicePropertyInfo' ] }
2322 # @migrate
2324 # Migrates the current running guest to another Virtual Machine.
2326 # @uri: the Uniform Resource Identifier of the destination VM
2328 # @blk: #optional do block migration (full disk copy)
2330 # @inc: #optional incremental disk copy migration
2332 # @detach: this argument exists only for compatibility reasons and
2333 #          is ignored by QEMU
2335 # Returns: nothing on success
2337 # Since: 0.14.0
2339 { 'command': 'migrate',
2340   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2342 # @xen-save-devices-state:
2344 # Save the state of all devices to file. The RAM and the block devices
2345 # of the VM are not saved by this command.
2347 # @filename: the file to save the state of the devices to as binary
2348 # data. See xen-save-devices-state.txt for a description of the binary
2349 # format.
2351 # Returns: Nothing on success
2353 # Since: 1.1
2355 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2358 # @xen-set-global-dirty-log
2360 # Enable or disable the global dirty log mode.
2362 # @enable: true to enable, false to disable.
2364 # Returns: nothing
2366 # Since: 1.3
2368 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2371 # @device_del:
2373 # Remove a device from a guest
2375 # @id: the name of the device
2377 # Returns: Nothing on success
2378 #          If @id is not a valid device, DeviceNotFound
2380 # Notes: When this command completes, the device may not be removed from the
2381 #        guest.  Hot removal is an operation that requires guest cooperation.
2382 #        This command merely requests that the guest begin the hot removal
2383 #        process.  Completion of the device removal process is signaled with a
2384 #        DEVICE_DELETED event. Guest reset will automatically complete removal
2385 #        for all devices.
2387 # Since: 0.14.0
2389 { 'command': 'device_del', 'data': {'id': 'str'} }
2392 # @dump-guest-memory
2394 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2395 # very long depending on the amount of guest memory. This command is only
2396 # supported on i386 and x86_64.
2398 # @paging: if true, do paging to get guest's memory mapping. This allows
2399 #          using gdb to process the core file.
2401 #          IMPORTANT: this option can make QEMU allocate several gigabytes
2402 #                     of RAM. This can happen for a large guest, or a
2403 #                     malicious guest pretending to be large.
2405 #          Also, paging=true has the following limitations:
2407 #             1. The guest may be in a catastrophic state or can have corrupted
2408 #                memory, which cannot be trusted
2409 #             2. The guest can be in real-mode even if paging is enabled. For
2410 #                example, the guest uses ACPI to sleep, and ACPI sleep state
2411 #                goes in real-mode
2413 # @protocol: the filename or file descriptor of the vmcore. The supported
2414 #            protocols are:
2416 #            1. file: the protocol starts with "file:", and the following
2417 #               string is the file's path.
2418 #            2. fd: the protocol starts with "fd:", and the following string
2419 #               is the fd's name.
2421 # @begin: #optional if specified, the starting physical address.
2423 # @length: #optional if specified, the memory size, in bytes. If you don't
2424 #          want to dump all guest's memory, please specify the start @begin
2425 #          and @length
2427 # Returns: nothing on success
2429 # Since: 1.2
2431 { 'command': 'dump-guest-memory',
2432   'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2433             '*length': 'int' } }
2436 # @netdev_add:
2438 # Add a network backend.
2440 # @type: the type of network backend.  Current valid values are 'user', 'tap',
2441 #        'vde', 'socket', 'dump' and 'bridge'
2443 # @id: the name of the new network backend
2445 # @props: #optional a list of properties to be passed to the backend in
2446 #         the format 'name=value', like 'ifname=tap0,script=no'
2448 # Notes: The semantics of @props is not well defined.  Future commands will be
2449 #        introduced that provide stronger typing for backend creation.
2451 # Since: 0.14.0
2453 # Returns: Nothing on success
2454 #          If @type is not a valid network backend, DeviceNotFound
2456 { 'command': 'netdev_add',
2457   'data': {'type': 'str', 'id': 'str', '*props': '**'},
2458   'gen': 'no' }
2461 # @netdev_del:
2463 # Remove a network backend.
2465 # @id: the name of the network backend to remove
2467 # Returns: Nothing on success
2468 #          If @id is not a valid network backend, DeviceNotFound
2470 # Since: 0.14.0
2472 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2475 # @NetdevNoneOptions
2477 # Use it alone to have zero network devices.
2479 # Since 1.2
2481 { 'type': 'NetdevNoneOptions',
2482   'data': { } }
2485 # @NetLegacyNicOptions
2487 # Create a new Network Interface Card.
2489 # @netdev: #optional id of -netdev to connect to
2491 # @macaddr: #optional MAC address
2493 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2495 # @addr: #optional PCI device address
2497 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2499 # Since 1.2
2501 { 'type': 'NetLegacyNicOptions',
2502   'data': {
2503     '*netdev':  'str',
2504     '*macaddr': 'str',
2505     '*model':   'str',
2506     '*addr':    'str',
2507     '*vectors': 'uint32' } }
2510 # @String
2512 # A fat type wrapping 'str', to be embedded in lists.
2514 # Since 1.2
2516 { 'type': 'String',
2517   'data': {
2518     'str': 'str' } }
2521 # @NetdevUserOptions
2523 # Use the user mode network stack which requires no administrator privilege to
2524 # run.
2526 # @hostname: #optional client hostname reported by the builtin DHCP server
2528 # @restrict: #optional isolate the guest from the host
2530 # @ip: #optional legacy parameter, use net= instead
2532 # @net: #optional IP address and optional netmask
2534 # @host: #optional guest-visible address of the host
2536 # @tftp: #optional root directory of the built-in TFTP server
2538 # @bootfile: #optional BOOTP filename, for use with tftp=
2540 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2541 #             assign
2543 # @dns: #optional guest-visible address of the virtual nameserver
2545 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2546 #             to the guest
2548 # @smb: #optional root directory of the built-in SMB server
2550 # @smbserver: #optional IP address of the built-in SMB server
2552 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2553 #           endpoints
2555 # @guestfwd: #optional forward guest TCP connections
2557 # Since 1.2
2559 { 'type': 'NetdevUserOptions',
2560   'data': {
2561     '*hostname':  'str',
2562     '*restrict':  'bool',
2563     '*ip':        'str',
2564     '*net':       'str',
2565     '*host':      'str',
2566     '*tftp':      'str',
2567     '*bootfile':  'str',
2568     '*dhcpstart': 'str',
2569     '*dns':       'str',
2570     '*dnssearch': ['String'],
2571     '*smb':       'str',
2572     '*smbserver': 'str',
2573     '*hostfwd':   ['String'],
2574     '*guestfwd':  ['String'] } }
2577 # @NetdevTapOptions
2579 # Connect the host TAP network interface name to the VLAN.
2581 # @ifname: #optional interface name
2583 # @fd: #optional file descriptor of an already opened tap
2585 # @fds: #optional multiple file descriptors of already opened multiqueue capable
2586 # tap
2588 # @script: #optional script to initialize the interface
2590 # @downscript: #optional script to shut down the interface
2592 # @helper: #optional command to execute to configure bridge
2594 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2596 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2598 # @vhost: #optional enable vhost-net network accelerator
2600 # @vhostfd: #optional file descriptor of an already opened vhost net device
2602 # @vhostfds: #optional file descriptors of multiple already opened vhost net
2603 # devices
2605 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2607 # @queues: #optional number of queues to be created for multiqueue capable tap
2609 # Since 1.2
2611 { 'type': 'NetdevTapOptions',
2612   'data': {
2613     '*ifname':     'str',
2614     '*fd':         'str',
2615     '*fds':        'str',
2616     '*script':     'str',
2617     '*downscript': 'str',
2618     '*helper':     'str',
2619     '*sndbuf':     'size',
2620     '*vnet_hdr':   'bool',
2621     '*vhost':      'bool',
2622     '*vhostfd':    'str',
2623     '*vhostfds':   'str',
2624     '*vhostforce': 'bool',
2625     '*queues':     'uint32'} }
2628 # @NetdevSocketOptions
2630 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2631 # socket connection.
2633 # @fd: #optional file descriptor of an already opened socket
2635 # @listen: #optional port number, and optional hostname, to listen on
2637 # @connect: #optional port number, and optional hostname, to connect to
2639 # @mcast: #optional UDP multicast address and port number
2641 # @localaddr: #optional source address and port for multicast and udp packets
2643 # @udp: #optional UDP unicast address and port number
2645 # Since 1.2
2647 { 'type': 'NetdevSocketOptions',
2648   'data': {
2649     '*fd':        'str',
2650     '*listen':    'str',
2651     '*connect':   'str',
2652     '*mcast':     'str',
2653     '*localaddr': 'str',
2654     '*udp':       'str' } }
2657 # @NetdevVdeOptions
2659 # Connect the VLAN to a vde switch running on the host.
2661 # @sock: #optional socket path
2663 # @port: #optional port number
2665 # @group: #optional group owner of socket
2667 # @mode: #optional permissions for socket
2669 # Since 1.2
2671 { 'type': 'NetdevVdeOptions',
2672   'data': {
2673     '*sock':  'str',
2674     '*port':  'uint16',
2675     '*group': 'str',
2676     '*mode':  'uint16' } }
2679 # @NetdevDumpOptions
2681 # Dump VLAN network traffic to a file.
2683 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2684 # suffixes.
2686 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2688 # Since 1.2
2690 { 'type': 'NetdevDumpOptions',
2691   'data': {
2692     '*len':  'size',
2693     '*file': 'str' } }
2696 # @NetdevBridgeOptions
2698 # Connect a host TAP network interface to a host bridge device.
2700 # @br: #optional bridge name
2702 # @helper: #optional command to execute to configure bridge
2704 # Since 1.2
2706 { 'type': 'NetdevBridgeOptions',
2707   'data': {
2708     '*br':     'str',
2709     '*helper': 'str' } }
2712 # @NetdevHubPortOptions
2714 # Connect two or more net clients through a software hub.
2716 # @hubid: hub identifier number
2718 # Since 1.2
2720 { 'type': 'NetdevHubPortOptions',
2721   'data': {
2722     'hubid':     'int32' } }
2725 # @NetClientOptions
2727 # A discriminated record of network device traits.
2729 # Since 1.2
2731 { 'union': 'NetClientOptions',
2732   'data': {
2733     'none':     'NetdevNoneOptions',
2734     'nic':      'NetLegacyNicOptions',
2735     'user':     'NetdevUserOptions',
2736     'tap':      'NetdevTapOptions',
2737     'socket':   'NetdevSocketOptions',
2738     'vde':      'NetdevVdeOptions',
2739     'dump':     'NetdevDumpOptions',
2740     'bridge':   'NetdevBridgeOptions',
2741     'hubport':  'NetdevHubPortOptions' } }
2744 # @NetLegacy
2746 # Captures the configuration of a network device; legacy.
2748 # @vlan: #optional vlan number
2750 # @id: #optional identifier for monitor commands
2752 # @name: #optional identifier for monitor commands, ignored if @id is present
2754 # @opts: device type specific properties (legacy)
2756 # Since 1.2
2758 { 'type': 'NetLegacy',
2759   'data': {
2760     '*vlan': 'int32',
2761     '*id':   'str',
2762     '*name': 'str',
2763     'opts':  'NetClientOptions' } }
2766 # @Netdev
2768 # Captures the configuration of a network device.
2770 # @id: identifier for monitor commands.
2772 # @opts: device type specific properties
2774 # Since 1.2
2776 { 'type': 'Netdev',
2777   'data': {
2778     'id':   'str',
2779     'opts': 'NetClientOptions' } }
2782 # @InetSocketAddress
2784 # Captures a socket address or address range in the Internet namespace.
2786 # @host: host part of the address
2788 # @port: port part of the address, or lowest port if @to is present
2790 # @to: highest port to try
2792 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2793 #        #optional
2795 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2796 #        #optional
2798 # Since 1.3
2800 { 'type': 'InetSocketAddress',
2801   'data': {
2802     'host': 'str',
2803     'port': 'str',
2804     '*to': 'uint16',
2805     '*ipv4': 'bool',
2806     '*ipv6': 'bool' } }
2809 # @UnixSocketAddress
2811 # Captures a socket address in the local ("Unix socket") namespace.
2813 # @path: filesystem path to use
2815 # Since 1.3
2817 { 'type': 'UnixSocketAddress',
2818   'data': {
2819     'path': 'str' } }
2822 # @SocketAddress
2824 # Captures the address of a socket, which could also be a named file descriptor
2826 # Since 1.3
2828 { 'union': 'SocketAddress',
2829   'data': {
2830     'inet': 'InetSocketAddress',
2831     'unix': 'UnixSocketAddress',
2832     'fd': 'String' } }
2835 # @getfd:
2837 # Receive a file descriptor via SCM rights and assign it a name
2839 # @fdname: file descriptor name
2841 # Returns: Nothing on success
2843 # Since: 0.14.0
2845 # Notes: If @fdname already exists, the file descriptor assigned to
2846 #        it will be closed and replaced by the received file
2847 #        descriptor.
2848 #        The 'closefd' command can be used to explicitly close the
2849 #        file descriptor when it is no longer needed.
2851 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2854 # @closefd:
2856 # Close a file descriptor previously passed via SCM rights
2858 # @fdname: file descriptor name
2860 # Returns: Nothing on success
2862 # Since: 0.14.0
2864 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2867 # @MachineInfo:
2869 # Information describing a machine.
2871 # @name: the name of the machine
2873 # @alias: #optional an alias for the machine name
2875 # @default: #optional whether the machine is default
2877 # @cpu-max: maximum number of CPUs supported by the machine type
2878 #           (since 1.5.0)
2880 # Since: 1.2.0
2882 { 'type': 'MachineInfo',
2883   'data': { 'name': 'str', '*alias': 'str',
2884             '*is-default': 'bool', 'cpu-max': 'int' } }
2887 # @query-machines:
2889 # Return a list of supported machines
2891 # Returns: a list of MachineInfo
2893 # Since: 1.2.0
2895 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2898 # @CpuDefinitionInfo:
2900 # Virtual CPU definition.
2902 # @name: the name of the CPU definition
2904 # Since: 1.2.0
2906 { 'type': 'CpuDefinitionInfo',
2907   'data': { 'name': 'str' } }
2910 # @query-cpu-definitions:
2912 # Return a list of supported virtual CPU definitions
2914 # Returns: a list of CpuDefInfo
2916 # Since: 1.2.0
2918 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2920 # @AddfdInfo:
2922 # Information about a file descriptor that was added to an fd set.
2924 # @fdset-id: The ID of the fd set that @fd was added to.
2926 # @fd: The file descriptor that was received via SCM rights and
2927 #      added to the fd set.
2929 # Since: 1.2.0
2931 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2934 # @add-fd:
2936 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2938 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2940 # @opaque: #optional A free-form string that can be used to describe the fd.
2942 # Returns: @AddfdInfo on success
2943 #          If file descriptor was not received, FdNotSupplied
2944 #          If @fdset-id is a negative value, InvalidParameterValue
2946 # Notes: The list of fd sets is shared by all monitor connections.
2948 #        If @fdset-id is not specified, a new fd set will be created.
2950 # Since: 1.2.0
2952 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2953   'returns': 'AddfdInfo' }
2956 # @remove-fd:
2958 # Remove a file descriptor from an fd set.
2960 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2962 # @fd: #optional The file descriptor that is to be removed.
2964 # Returns: Nothing on success
2965 #          If @fdset-id or @fd is not found, FdNotFound
2967 # Since: 1.2.0
2969 # Notes: The list of fd sets is shared by all monitor connections.
2971 #        If @fd is not specified, all file descriptors in @fdset-id
2972 #        will be removed.
2974 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2977 # @FdsetFdInfo:
2979 # Information about a file descriptor that belongs to an fd set.
2981 # @fd: The file descriptor value.
2983 # @opaque: #optional A free-form string that can be used to describe the fd.
2985 # Since: 1.2.0
2987 { 'type': 'FdsetFdInfo',
2988   'data': {'fd': 'int', '*opaque': 'str'} }
2991 # @FdsetInfo:
2993 # Information about an fd set.
2995 # @fdset-id: The ID of the fd set.
2997 # @fds: A list of file descriptors that belong to this fd set.
2999 # Since: 1.2.0
3001 { 'type': 'FdsetInfo',
3002   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3005 # @query-fdsets:
3007 # Return information describing all fd sets.
3009 # Returns: A list of @FdsetInfo
3011 # Since: 1.2.0
3013 # Note: The list of fd sets is shared by all monitor connections.
3016 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3019 # @TargetInfo:
3021 # Information describing the QEMU target.
3023 # @arch: the target architecture (eg "x86_64", "i386", etc)
3025 # Since: 1.2.0
3027 { 'type': 'TargetInfo',
3028   'data': { 'arch': 'str' } }
3031 # @query-target:
3033 # Return information about the target for this QEMU
3035 # Returns: TargetInfo
3037 # Since: 1.2.0
3039 { 'command': 'query-target', 'returns': 'TargetInfo' }
3042 # @QKeyCode:
3044 # An enumeration of key name.
3046 # This is used by the send-key command.
3048 # Since: 1.3.0
3050 { 'enum': 'QKeyCode',
3051   'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3052             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3053             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3054             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3055             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3056             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3057             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3058             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3059             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3060             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3061             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3062             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3063             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3064             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3065              'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
3068 # @KeyValue
3070 # Represents a keyboard key.
3072 # Since: 1.3.0
3074 { 'union': 'KeyValue',
3075   'data': {
3076     'number': 'int',
3077     'qcode': 'QKeyCode' } }
3080 # @send-key:
3082 # Send keys to guest.
3084 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3085 #        simultaneously sent to the guest. A @KeyValue.number value is sent
3086 #        directly to the guest, while @KeyValue.qcode must be a valid
3087 #        @QKeyCode value
3089 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3090 #             to 100
3092 # Returns: Nothing on success
3093 #          If key is unknown or redundant, InvalidParameter
3095 # Since: 1.3.0
3098 { 'command': 'send-key',
3099   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3102 # @screendump:
3104 # Write a PPM of the VGA screen to a file.
3106 # @filename: the path of a new PPM file to store the image
3108 # Returns: Nothing on success
3110 # Since: 0.14.0
3112 { 'command': 'screendump', 'data': {'filename': 'str'} }
3115 # @nbd-server-start:
3117 # Start an NBD server listening on the given host and port.  Block
3118 # devices can then be exported using @nbd-server-add.  The NBD
3119 # server will present them as named exports; for example, another
3120 # QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
3122 # @addr: Address on which to listen.
3124 # Returns: error if the server is already running.
3126 # Since: 1.3.0
3128 { 'command': 'nbd-server-start',
3129   'data': { 'addr': 'SocketAddress' } }
3132 # @nbd-server-add:
3134 # Export a device to QEMU's embedded NBD server.
3136 # @device: Block device to be exported
3138 # @writable: Whether clients should be able to write to the device via the
3139 #     NBD connection (default false). #optional
3141 # Returns: error if the device is already marked for export.
3143 # Since: 1.3.0
3145 { 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3148 # @nbd-server-stop:
3150 # Stop QEMU's embedded NBD server, and unregister all devices previously
3151 # added via @nbd-server-add.
3153 # Since: 1.3.0
3155 { 'command': 'nbd-server-stop' }
3158 # @ChardevFile:
3160 # Configuration info for file chardevs.
3162 # @in:  #optional The name of the input file
3163 # @out: The name of the output file
3165 # Since: 1.4
3167 { 'type': 'ChardevFile', 'data': { '*in' : 'str',
3168                                    'out' : 'str' } }
3171 # @ChardevHostdev:
3173 # Configuration info for device and pipe chardevs.
3175 # @device: The name of the special file for the device,
3176 #          i.e. /dev/ttyS0 on Unix or COM1: on Windows
3177 # @type: What kind of device this is.
3179 # Since: 1.4
3181 { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
3184 # @ChardevSocket:
3186 # Configuration info for (stream) socket chardevs.
3188 # @addr: socket address to listen on (server=true)
3189 #        or connect to (server=false)
3190 # @server: #optional create server socket (default: true)
3191 # @wait: #optional wait for connect (not used for server
3192 #        sockets, default: false)
3193 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3194 # @telnet: #optional enable telnet protocol (default: false)
3196 # Since: 1.4
3198 { 'type': 'ChardevSocket', 'data': { 'addr'     : 'SocketAddress',
3199                                      '*server'  : 'bool',
3200                                      '*wait'    : 'bool',
3201                                      '*nodelay' : 'bool',
3202                                      '*telnet'  : 'bool' } }
3205 # @ChardevUdp:
3207 # Configuration info for datagram socket chardevs.
3209 # @remote: remote address
3210 # @local: #optional local address
3212 # Since: 1.5
3214 { 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3215                                   '*local' : 'SocketAddress' } }
3218 # @ChardevMux:
3220 # Configuration info for mux chardevs.
3222 # @chardev: name of the base chardev.
3224 # Since: 1.5
3226 { 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
3229 # @ChardevStdio:
3231 # Configuration info for stdio chardevs.
3233 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3234 #          be delivered to qemu.  Default: true in -nographic mode,
3235 #          false otherwise.
3237 # Since: 1.5
3239 { 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
3242 # @ChardevSpiceChannel:
3244 # Configuration info for spice vm channel chardevs.
3246 # @type: kind of channel (for example vdagent).
3248 # Since: 1.5
3250 { 'type': 'ChardevSpiceChannel', 'data': { 'type'  : 'str' } }
3253 # @ChardevSpicePort:
3255 # Configuration info for spice port chardevs.
3257 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3259 # Since: 1.5
3261 { 'type': 'ChardevSpicePort', 'data': { 'fqdn'  : 'str' } }
3264 # @ChardevVC:
3266 # Configuration info for virtual console chardevs.
3268 # @width:  console width,  in pixels
3269 # @height: console height, in pixels
3270 # @cols:   console width,  in chars
3271 # @rows:   console height, in chars
3273 # Since: 1.5
3275 { 'type': 'ChardevVC', 'data': { '*width'  : 'int',
3276                                  '*height' : 'int',
3277                                  '*cols'   : 'int',
3278                                  '*rows'   : 'int' } }
3281 # @ChardevMemory:
3283 # Configuration info for memory chardevs
3285 # @size: #optional Ringbuffer size, must be power of two, default is 65536
3287 # Since: 1.5
3289 { 'type': 'ChardevMemory', 'data': { '*size'  : 'int' } }
3292 # @ChardevBackend:
3294 # Configuration info for the new chardev backend.
3296 # Since: 1.4
3298 { 'type': 'ChardevDummy', 'data': { } }
3300 { 'union': 'ChardevBackend', 'data': { 'file'   : 'ChardevFile',
3301                                        'serial' : 'ChardevHostdev',
3302                                        'parallel': 'ChardevHostdev',
3303                                        'pipe'   : 'ChardevHostdev',
3304                                        'socket' : 'ChardevSocket',
3305                                        'udp'    : 'ChardevUdp',
3306                                        'pty'    : 'ChardevDummy',
3307                                        'null'   : 'ChardevDummy',
3308                                        'mux'    : 'ChardevMux',
3309                                        'msmouse': 'ChardevDummy',
3310                                        'braille': 'ChardevDummy',
3311                                        'stdio'  : 'ChardevStdio',
3312                                        'console': 'ChardevDummy',
3313                                        'spicevmc' : 'ChardevSpiceChannel',
3314                                        'spiceport' : 'ChardevSpicePort',
3315                                        'vc'     : 'ChardevVC',
3316                                        'memory' : 'ChardevMemory' } }
3319 # @ChardevReturn:
3321 # Return info about the chardev backend just created.
3323 # @pty: #optional name of the slave pseudoterminal device, present if
3324 #       and only if a chardev of type 'pty' was created
3326 # Since: 1.4
3328 { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3331 # @chardev-add:
3333 # Add a character device backend
3335 # @id: the chardev's ID, must be unique
3336 # @backend: backend type and parameters
3338 # Returns: ChardevReturn.
3340 # Since: 1.4
3342 { 'command': 'chardev-add', 'data': {'id'      : 'str',
3343                                      'backend' : 'ChardevBackend' },
3344   'returns': 'ChardevReturn' }
3347 # @chardev-remove:
3349 # Remove a character device backend
3351 # @id: the chardev's ID, must exist and not be in use
3353 # Returns: Nothing on success
3355 # Since: 1.4
3357 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3360 # @TpmModel:
3362 # An enumeration of TPM models
3364 # @tpm-tis: TPM TIS model
3366 # Since: 1.5
3368 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3371 # @query-tpm-models:
3373 # Return a list of supported TPM models
3375 # Returns: a list of TpmModel
3377 # Since: 1.5
3379 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3382 # @TpmType:
3384 # An enumeration of TPM types
3386 # @passthrough: TPM passthrough type
3388 # Since: 1.5
3390 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3393 # @query-tpm-types:
3395 # Return a list of supported TPM types
3397 # Returns: a list of TpmType
3399 # Since: 1.5
3401 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3404 # @TPMPassthroughOptions:
3406 # Information about the TPM passthrough type
3408 # @path: #optional string describing the path used for accessing the TPM device
3410 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3411 #               for cancellation of TPM commands while they are executing
3413 # Since: 1.5
3415 { 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3416                                              '*cancel-path' : 'str'} }
3419 # @TpmTypeOptions:
3421 # A union referencing different TPM backend types' configuration options
3423 # @passthrough: The configuration options for the TPM passthrough type
3425 # Since: 1.5
3427 { 'union': 'TpmTypeOptions',
3428    'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3431 # @TpmInfo:
3433 # Information about the TPM
3435 # @id: The Id of the TPM
3437 # @model: The TPM frontend model
3439 # @options: The TPM (backend) type configuration options
3441 # Since: 1.5
3443 { 'type': 'TPMInfo',
3444   'data': {'id': 'str',
3445            'model': 'TpmModel',
3446            'options': 'TpmTypeOptions' } }
3449 # @query-tpm:
3451 # Return information about the TPM device
3453 # Returns: @TPMInfo on success
3455 # Since: 1.5
3457 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
3460 # @AcpiTableOptions
3462 # Specify an ACPI table on the command line to load.
3464 # At most one of @file and @data can be specified. The list of files specified
3465 # by any one of them is loaded and concatenated in order. If both are omitted,
3466 # @data is implied.
3468 # Other fields / optargs can be used to override fields of the generic ACPI
3469 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
3470 # Description Table Header. If a header field is not overridden, then the
3471 # corresponding value from the concatenated blob is used (in case of @file), or
3472 # it is filled in with a hard-coded value (in case of @data).
3474 # String fields are copied into the matching ACPI member from lowest address
3475 # upwards, and silently truncated / NUL-padded to length.
3477 # @sig: #optional table signature / identifier (4 bytes)
3479 # @rev: #optional table revision number (dependent on signature, 1 byte)
3481 # @oem_id: #optional OEM identifier (6 bytes)
3483 # @oem_table_id: #optional OEM table identifier (8 bytes)
3485 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
3487 # @asl_compiler_id: #optional identifier of the utility that created the table
3488 #                   (4 bytes)
3490 # @asl_compiler_rev: #optional revision number of the utility that created the
3491 #                    table (4 bytes)
3493 # @file: #optional colon (:) separated list of pathnames to load and
3494 #        concatenate as table data. The resultant binary blob is expected to
3495 #        have an ACPI table header. At least one file is required. This field
3496 #        excludes @data.
3498 # @data: #optional colon (:) separated list of pathnames to load and
3499 #        concatenate as table data. The resultant binary blob must not have an
3500 #        ACPI table header. At least one file is required. This field excludes
3501 #        @file.
3503 # Since 1.5
3505 { 'type': 'AcpiTableOptions',
3506   'data': {
3507     '*sig':               'str',
3508     '*rev':               'uint8',
3509     '*oem_id':            'str',
3510     '*oem_table_id':      'str',
3511     '*oem_rev':           'uint32',
3512     '*asl_compiler_id':   'str',
3513     '*asl_compiler_rev':  'uint32',
3514     '*file':              'str',
3515     '*data':              'str' }}
3518 # @CommandLineParameterType:
3520 # Possible types for an option parameter.
3522 # @string: accepts a character string
3524 # @boolean: accepts "on" or "off"
3526 # @number: accepts a number
3528 # @size: accepts a number followed by an optional suffix (K)ilo,
3529 #        (M)ega, (G)iga, (T)era
3531 # Since 1.5
3533 { 'enum': 'CommandLineParameterType',
3534   'data': ['string', 'boolean', 'number', 'size'] }
3537 # @CommandLineParameterInfo:
3539 # Details about a single parameter of a command line option.
3541 # @name: parameter name
3543 # @type: parameter @CommandLineParameterType
3545 # @help: #optional human readable text string, not suitable for parsing.
3547 # Since 1.5
3549 { 'type': 'CommandLineParameterInfo',
3550   'data': { 'name': 'str',
3551             'type': 'CommandLineParameterType',
3552             '*help': 'str' } }
3555 # @CommandLineOptionInfo:
3557 # Details about a command line option, including its list of parameter details
3559 # @option: option name
3561 # @parameters: an array of @CommandLineParameterInfo
3563 # Since 1.5
3565 { 'type': 'CommandLineOptionInfo',
3566   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
3569 # @query-command-line-options:
3571 # Query command line option schema.
3573 # @option: #optional option name
3575 # Returns: list of @CommandLineOptionInfo for all options (or for the given
3576 #          @option).  Returns an error if the given @option doesn't exist.
3578 # Since 1.5
3580 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
3581  'returns': ['CommandLineOptionInfo'] }
3584 # @X86CPURegister32
3586 # A X86 32-bit register
3588 # Since: 1.5
3590 { 'enum': 'X86CPURegister32',
3591   'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
3594 # @X86CPUFeatureWordInfo
3596 # Information about a X86 CPU feature word
3598 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
3600 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
3601 #                   feature word
3603 # @cpuid-register: Output register containing the feature bits
3605 # @features: value of output register, containing the feature bits
3607 # Since: 1.5
3609 { 'type': 'X86CPUFeatureWordInfo',
3610   'data': { 'cpuid-input-eax': 'int',
3611             '*cpuid-input-ecx': 'int',
3612             'cpuid-register': 'X86CPURegister32',
3613             'features': 'int' } }