xen/xen_platform: QOM casting sweep
[qemu.git] / qapi-schema.json
blob592bb9c7a1427a5ef3330fcb243f97d3224549ed
1 # -*- Mode: Python -*-
3 # QAPI Schema
5 ##
6 # @ErrorClass
8 # QEMU error classes
10 # @GenericError: this is used for errors that don't require a specific error
11 #                class. This should be the default case for most errors
13 # @CommandNotFound: the requested command has not been found
15 # @DeviceEncrypted: the requested operation can't be fulfilled because the
16 #                   selected device is encrypted
18 # @DeviceNotActive: a device has failed to be become active
20 # @DeviceNotFound: the requested device has not been found
22 # @KVMMissingCap: the requested operation can't be fulfilled because a
23 #                 required KVM capability is missing
25 # Since: 1.2
27 { 'enum': 'ErrorClass',
28   'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
29             'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
32 # @add_client
34 # Allow client connections for VNC, Spice and socket based
35 # character devices to be passed in to QEMU via SCM_RIGHTS.
37 # @protocol: protocol name. Valid names are "vnc", "spice" or the
38 #            name of a character device (eg. from -chardev id=XXXX)
40 # @fdname: file descriptor name previously passed via 'getfd' command
42 # @skipauth: #optional whether to skip authentication. Only applies
43 #            to "vnc" and "spice" protocols
45 # @tls: #optional whether to perform TLS. Only applies to the "spice"
46 #       protocol
48 # Returns: nothing on success.
50 # Since: 0.14.0
52 { 'command': 'add_client',
53   'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
54             '*tls': 'bool' } }
57 # @NameInfo:
59 # Guest name information.
61 # @name: #optional The name of the guest
63 # Since 0.14.0
65 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
68 # @query-name:
70 # Return the name information of a guest.
72 # Returns: @NameInfo of the guest
74 # Since 0.14.0
76 { 'command': 'query-name', 'returns': 'NameInfo' }
79 # @VersionInfo:
81 # A description of QEMU's version.
83 # @qemu.major:  The major version of QEMU
85 # @qemu.minor:  The minor version of QEMU
87 # @qemu.micro:  The micro version of QEMU.  By current convention, a micro
88 #               version of 50 signifies a development branch.  A micro version
89 #               greater than or equal to 90 signifies a release candidate for
90 #               the next minor version.  A micro version of less than 50
91 #               signifies a stable release.
93 # @package:     QEMU will always set this field to an empty string.  Downstream
94 #               versions of QEMU should set this to a non-empty string.  The
95 #               exact format depends on the downstream however it highly
96 #               recommended that a unique name is used.
98 # Since: 0.14.0
100 { 'type': 'VersionInfo',
101   'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
102            'package': 'str'} }
105 # @query-version:
107 # Returns the current version of QEMU.
109 # Returns:  A @VersionInfo object describing the current version of QEMU.
111 # Since: 0.14.0
113 { 'command': 'query-version', 'returns': 'VersionInfo' }
116 # @KvmInfo:
118 # Information about support for KVM acceleration
120 # @enabled: true if KVM acceleration is active
122 # @present: true if KVM acceleration is built into this executable
124 # Since: 0.14.0
126 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
129 # @query-kvm:
131 # Returns information about KVM acceleration
133 # Returns: @KvmInfo
135 # Since: 0.14.0
137 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
140 # @RunState
142 # An enumeration of VM run states.
144 # @debug: QEMU is running on a debugger
146 # @finish-migrate: guest is paused to finish the migration process
148 # @inmigrate: guest is paused waiting for an incoming migration.  Note
149 # that this state does not tell whether the machine will start at the
150 # end of the migration.  This depends on the command-line -S option and
151 # any invocation of 'stop' or 'cont' that has happened since QEMU was
152 # started.
154 # @internal-error: An internal error that prevents further guest execution
155 # has occurred
157 # @io-error: the last IOP has failed and the device is configured to pause
158 # on I/O errors
160 # @paused: guest has been paused via the 'stop' command
162 # @postmigrate: guest is paused following a successful 'migrate'
164 # @prelaunch: QEMU was started with -S and guest has not started
166 # @restore-vm: guest is paused to restore VM state
168 # @running: guest is actively running
170 # @save-vm: guest is paused to save the VM state
172 # @shutdown: guest is shut down (and -no-shutdown is in use)
174 # @suspended: guest is suspended (ACPI S3)
176 # @watchdog: the watchdog action is configured to pause and has been triggered
178 # @guest-panicked: guest has been panicked as a result of guest OS panic
180 { 'enum': 'RunState',
181   'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
182             'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
183             'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
184             'guest-panicked' ] }
187 # @SnapshotInfo
189 # @id: unique snapshot id
191 # @name: user chosen name
193 # @vm-state-size: size of the VM state
195 # @date-sec: UTC date of the snapshot in seconds
197 # @date-nsec: fractional part in nano seconds to be used with date-sec
199 # @vm-clock-sec: VM clock relative to boot in seconds
201 # @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec
203 # Since: 1.3
207 { 'type': 'SnapshotInfo',
208   'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
209             'date-sec': 'int', 'date-nsec': 'int',
210             'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } }
213 # @ImageInfo:
215 # Information about a QEMU image file
217 # @filename: name of the image file
219 # @format: format of the image file
221 # @virtual-size: maximum capacity in bytes of the image
223 # @actual-size: #optional actual size on disk in bytes of the image
225 # @dirty-flag: #optional true if image is not cleanly closed
227 # @cluster-size: #optional size of a cluster in bytes
229 # @encrypted: #optional true if the image is encrypted
231 # @backing-filename: #optional name of the backing file
233 # @full-backing-filename: #optional full path of the backing file
235 # @backing-filename-format: #optional the format of the backing file
237 # @snapshots: #optional list of VM snapshots
239 # @backing-image: #optional info of the backing image (since 1.6)
241 # Since: 1.3
245 { 'type': 'ImageInfo',
246   'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
247            '*actual-size': 'int', 'virtual-size': 'int',
248            '*cluster-size': 'int', '*encrypted': 'bool',
249            '*backing-filename': 'str', '*full-backing-filename': 'str',
250            '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'],
251            '*backing-image': 'ImageInfo' } }
254 # @ImageCheck:
256 # Information about a QEMU image file check
258 # @filename: name of the image file checked
260 # @format: format of the image file checked
262 # @check-errors: number of unexpected errors occurred during check
264 # @image-end-offset: #optional offset (in bytes) where the image ends, this
265 #                    field is present if the driver for the image format
266 #                    supports it
268 # @corruptions: #optional number of corruptions found during the check if any
270 # @leaks: #optional number of leaks found during the check if any
272 # @corruptions-fixed: #optional number of corruptions fixed during the check
273 #                     if any
275 # @leaks-fixed: #optional number of leaks fixed during the check if any
277 # @total-clusters: #optional total number of clusters, this field is present
278 #                  if the driver for the image format supports it
280 # @allocated-clusters: #optional total number of allocated clusters, this
281 #                      field is present if the driver for the image format
282 #                      supports it
284 # @fragmented-clusters: #optional total number of fragmented clusters, this
285 #                       field is present if the driver for the image format
286 #                       supports it
288 # @compressed-clusters: #optional total number of compressed clusters, this
289 #                       field is present if the driver for the image format
290 #                       supports it
292 # Since: 1.4
296 { 'type': 'ImageCheck',
297   'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
298            '*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int',
299            '*corruptions-fixed': 'int', '*leaks-fixed': 'int',
300            '*total-clusters': 'int', '*allocated-clusters': 'int',
301            '*fragmented-clusters': 'int', '*compressed-clusters': 'int' } }
304 # @StatusInfo:
306 # Information about VCPU run state
308 # @running: true if all VCPUs are runnable, false if not runnable
310 # @singlestep: true if VCPUs are in single-step mode
312 # @status: the virtual machine @RunState
314 # Since:  0.14.0
316 # Notes: @singlestep is enabled through the GDB stub
318 { 'type': 'StatusInfo',
319   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
322 # @query-status:
324 # Query the run status of all VCPUs
326 # Returns: @StatusInfo reflecting all VCPUs
328 # Since:  0.14.0
330 { 'command': 'query-status', 'returns': 'StatusInfo' }
333 # @UuidInfo:
335 # Guest UUID information.
337 # @UUID: the UUID of the guest
339 # Since: 0.14.0
341 # Notes: If no UUID was specified for the guest, a null UUID is returned.
343 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
346 # @query-uuid:
348 # Query the guest UUID information.
350 # Returns: The @UuidInfo for the guest
352 # Since 0.14.0
354 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
357 # @ChardevInfo:
359 # Information about a character device.
361 # @label: the label of the character device
363 # @filename: the filename of the character device
365 # Notes: @filename is encoded using the QEMU command line character device
366 #        encoding.  See the QEMU man page for details.
368 # Since: 0.14.0
370 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
373 # @query-chardev:
375 # Returns information about current character devices.
377 # Returns: a list of @ChardevInfo
379 # Since: 0.14.0
381 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
384 # @DataFormat:
386 # An enumeration of data format.
388 # @utf8: Data is a UTF-8 string (RFC 3629)
390 # @base64: Data is Base64 encoded binary (RFC 3548)
392 # Since: 1.4
394 { 'enum': 'DataFormat',
395   'data': [ 'utf8', 'base64' ] }
398 # @ringbuf-write:
400 # Write to a ring buffer character device.
402 # @device: the ring buffer character device name
404 # @data: data to write
406 # @format: #optional data encoding (default 'utf8').
407 #          - base64: data must be base64 encoded text.  Its binary
408 #            decoding gets written.
409 #            Bug: invalid base64 is currently not rejected.
410 #            Whitespace *is* invalid.
411 #          - utf8: data's UTF-8 encoding is written
412 #          - data itself is always Unicode regardless of format, like
413 #            any other string.
415 # Returns: Nothing on success
417 # Since: 1.4
419 { 'command': 'ringbuf-write',
420   'data': {'device': 'str', 'data': 'str',
421            '*format': 'DataFormat'} }
424 # @ringbuf-read:
426 # Read from a ring buffer character device.
428 # @device: the ring buffer character device name
430 # @size: how many bytes to read at most
432 # @format: #optional data encoding (default 'utf8').
433 #          - base64: the data read is returned in base64 encoding.
434 #          - utf8: the data read is interpreted as UTF-8.
435 #            Bug: can screw up when the buffer contains invalid UTF-8
436 #            sequences, NUL characters, after the ring buffer lost
437 #            data, and when reading stops because the size limit is
438 #            reached.
439 #          - The return value is always Unicode regardless of format,
440 #            like any other string.
442 # Returns: data read from the device
444 # Since: 1.4
446 { 'command': 'ringbuf-read',
447   'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
448   'returns': 'str' }
451 # @CommandInfo:
453 # Information about a QMP command
455 # @name: The command name
457 # Since: 0.14.0
459 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
462 # @query-commands:
464 # Return a list of supported QMP commands by this server
466 # Returns: A list of @CommandInfo for all supported commands
468 # Since: 0.14.0
470 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
473 # @EventInfo:
475 # Information about a QMP event
477 # @name: The event name
479 # Since: 1.2.0
481 { 'type': 'EventInfo', 'data': {'name': 'str'} }
484 # @query-events:
486 # Return a list of supported QMP events by this server
488 # Returns: A list of @EventInfo for all supported events
490 # Since: 1.2.0
492 { 'command': 'query-events', 'returns': ['EventInfo'] }
495 # @MigrationStats
497 # Detailed migration status.
499 # @transferred: amount of bytes already transferred to the target VM
501 # @remaining: amount of bytes remaining to be transferred to the target VM
503 # @total: total amount of bytes involved in the migration process
505 # @duplicate: number of duplicate (zero) pages (since 1.2)
507 # @skipped: number of skipped zero pages (since 1.5)
509 # @normal : number of normal pages (since 1.2)
511 # @normal-bytes: number of normal bytes sent (since 1.2)
513 # @dirty-pages-rate: number of pages dirtied by second by the
514 #        guest (since 1.3)
516 # @mbps: throughput in megabits/sec. (since 1.6)
518 # Since: 0.14.0
520 { 'type': 'MigrationStats',
521   'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
522            'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
523            'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
524            'mbps' : 'number' } }
527 # @XBZRLECacheStats
529 # Detailed XBZRLE migration cache statistics
531 # @cache-size: XBZRLE cache size
533 # @bytes: amount of bytes already transferred to the target VM
535 # @pages: amount of pages transferred to the target VM
537 # @cache-miss: number of cache miss
539 # @overflow: number of overflows
541 # Since: 1.2
543 { 'type': 'XBZRLECacheStats',
544   'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
545            'cache-miss': 'int', 'overflow': 'int' } }
548 # @MigrationInfo
550 # Information about current migration process.
552 # @status: #optional string describing the current migration status.
553 #          As of 0.14.0 this can be 'active', 'completed', 'failed' or
554 #          'cancelled'. If this field is not returned, no migration process
555 #          has been initiated
557 # @ram: #optional @MigrationStats containing detailed migration
558 #       status, only returned if status is 'active' or
559 #       'completed'. 'comppleted' (since 1.2)
561 # @disk: #optional @MigrationStats containing detailed disk migration
562 #        status, only returned if status is 'active' and it is a block
563 #        migration
565 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
566 #                migration statistics, only returned if XBZRLE feature is on and
567 #                status is 'active' or 'completed' (since 1.2)
569 # @total-time: #optional total amount of milliseconds since migration started.
570 #        If migration has ended, it returns the total migration
571 #        time. (since 1.2)
573 # @downtime: #optional only present when migration finishes correctly
574 #        total downtime in milliseconds for the guest.
575 #        (since 1.3)
577 # @expected-downtime: #optional only present while migration is active
578 #        expected downtime in milliseconds for the guest in last walk
579 #        of the dirty bitmap. (since 1.3)
581 # Since: 0.14.0
583 { 'type': 'MigrationInfo',
584   'data': {'*status': 'str', '*ram': 'MigrationStats',
585            '*disk': 'MigrationStats',
586            '*xbzrle-cache': 'XBZRLECacheStats',
587            '*total-time': 'int',
588            '*expected-downtime': 'int',
589            '*downtime': 'int'} }
592 # @query-migrate
594 # Returns information about current migration process.
596 # Returns: @MigrationInfo
598 # Since: 0.14.0
600 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
603 # @MigrationCapability
605 # Migration capabilities enumeration
607 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
608 #          This feature allows us to minimize migration traffic for certain work
609 #          loads, by sending compressed difference of the pages
611 # @x-rdma-pin-all: Controls whether or not the entire VM memory footprint is
612 #          mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
613 #          Disabled by default. Experimental: may (or may not) be renamed after
614 #          further testing is complete. (since 1.6)
616 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
617 #          essentially saves 1MB of zeroes per block on the wire. Enabling requires
618 #          source and target VM to support this feature. To enable it is sufficient
619 #          to enable the capability on the source VM. The feature is disabled by
620 #          default. (since 1.6)
622 # Since: 1.2
624 { 'enum': 'MigrationCapability',
625   'data': ['xbzrle', 'x-rdma-pin-all', 'auto-converge', 'zero-blocks'] }
628 # @MigrationCapabilityStatus
630 # Migration capability information
632 # @capability: capability enum
634 # @state: capability state bool
636 # Since: 1.2
638 { 'type': 'MigrationCapabilityStatus',
639   'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
642 # @migrate-set-capabilities
644 # Enable/Disable the following migration capabilities (like xbzrle)
646 # @capabilities: json array of capability modifications to make
648 # Since: 1.2
650 { 'command': 'migrate-set-capabilities',
651   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
654 # @query-migrate-capabilities
656 # Returns information about the current migration capabilities status
658 # Returns: @MigrationCapabilitiesStatus
660 # Since: 1.2
662 { 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}
665 # @MouseInfo:
667 # Information about a mouse device.
669 # @name: the name of the mouse device
671 # @index: the index of the mouse device
673 # @current: true if this device is currently receiving mouse events
675 # @absolute: true if this device supports absolute coordinates as input
677 # Since: 0.14.0
679 { 'type': 'MouseInfo',
680   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
681            'absolute': 'bool'} }
684 # @query-mice:
686 # Returns information about each active mouse device
688 # Returns: a list of @MouseInfo for each device
690 # Since: 0.14.0
692 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
695 # @CpuInfo:
697 # Information about a virtual CPU
699 # @CPU: the index of the virtual CPU
701 # @current: this only exists for backwards compatible and should be ignored
703 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
704 #          to a processor specific low power mode.
706 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
707 #                pointer.
708 #                If the target is Sparc, this is the PC component of the
709 #                instruction pointer.
711 # @nip: #optional If the target is PPC, the instruction pointer
713 # @npc: #optional If the target is Sparc, the NPC component of the instruction
714 #                 pointer
716 # @PC: #optional If the target is MIPS, the instruction pointer
718 # @thread_id: ID of the underlying host thread
720 # Since: 0.14.0
722 # Notes: @halted is a transient state that changes frequently.  By the time the
723 #        data is sent to the client, the guest may no longer be halted.
725 { 'type': 'CpuInfo',
726   'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
727            '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
730 # @query-cpus:
732 # Returns a list of information about each virtual CPU.
734 # Returns: a list of @CpuInfo for each virtual CPU
736 # Since: 0.14.0
738 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
741 # @BlockDeviceInfo:
743 # Information about the backing device for a block device.
745 # @file: the filename of the backing device
747 # @ro: true if the backing device was open read-only
749 # @drv: the name of the block format used to open the backing device. As of
750 #       0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
751 #       'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
752 #       'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
753 #       'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
755 # @backing_file: #optional the name of the backing file (for copy-on-write)
757 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
759 # @encrypted: true if the backing device is encrypted
761 # @encryption_key_missing: true if the backing device is encrypted but an
762 #                          valid encryption key is missing
764 # @bps: total throughput limit in bytes per second is specified
766 # @bps_rd: read throughput limit in bytes per second is specified
768 # @bps_wr: write throughput limit in bytes per second is specified
770 # @iops: total I/O operations per second is specified
772 # @iops_rd: read I/O operations per second is specified
774 # @iops_wr: write I/O operations per second is specified
776 # @image: the info of image used (since: 1.6)
778 # Since: 0.14.0
780 # Notes: This interface is only found in @BlockInfo.
782 { 'type': 'BlockDeviceInfo',
783   'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
784             '*backing_file': 'str', 'backing_file_depth': 'int',
785             'encrypted': 'bool', 'encryption_key_missing': 'bool',
786             'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
787             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
788             'image': 'ImageInfo' } }
791 # @BlockDeviceIoStatus:
793 # An enumeration of block device I/O status.
795 # @ok: The last I/O operation has succeeded
797 # @failed: The last I/O operation has failed
799 # @nospace: The last I/O operation has failed due to a no-space condition
801 # Since: 1.0
803 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
806 # @BlockDirtyInfo:
808 # Block dirty bitmap information.
810 # @count: number of dirty bytes according to the dirty bitmap
812 # @granularity: granularity of the dirty bitmap in bytes (since 1.4)
814 # Since: 1.3
816 { 'type': 'BlockDirtyInfo',
817   'data': {'count': 'int', 'granularity': 'int'} }
820 # @BlockInfo:
822 # Block device information.  This structure describes a virtual device and
823 # the backing device associated with it.
825 # @device: The device name associated with the virtual device.
827 # @type: This field is returned only for compatibility reasons, it should
828 #        not be used (always returns 'unknown')
830 # @removable: True if the device supports removable media.
832 # @locked: True if the guest has locked this device from having its media
833 #          removed
835 # @tray_open: #optional True if the device has a tray and it is open
836 #             (only present if removable is true)
838 # @dirty: #optional dirty bitmap information (only present if the dirty
839 #         bitmap is enabled)
841 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
842 #             supports it and the VM is configured to stop on errors
844 # @inserted: #optional @BlockDeviceInfo describing the device if media is
845 #            present
847 # Since:  0.14.0
849 { 'type': 'BlockInfo',
850   'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
851            'locked': 'bool', '*inserted': 'BlockDeviceInfo',
852            '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
853            '*dirty': 'BlockDirtyInfo' } }
856 # @query-block:
858 # Get a list of BlockInfo for all virtual block devices.
860 # Returns: a list of @BlockInfo describing each virtual block device
862 # Since: 0.14.0
864 { 'command': 'query-block', 'returns': ['BlockInfo'] }
867 # @BlockDeviceStats:
869 # Statistics of a virtual block device or a block backing device.
871 # @rd_bytes:      The number of bytes read by the device.
873 # @wr_bytes:      The number of bytes written by the device.
875 # @rd_operations: The number of read operations performed by the device.
877 # @wr_operations: The number of write operations performed by the device.
879 # @flush_operations: The number of cache flush operations performed by the
880 #                    device (since 0.15.0)
882 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
883 #                       (since 0.15.0).
885 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
887 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
889 # @wr_highest_offset: The offset after the greatest byte written to the
890 #                     device.  The intended use of this information is for
891 #                     growable sparse files (like qcow2) that are used on top
892 #                     of a physical device.
894 # Since: 0.14.0
896 { 'type': 'BlockDeviceStats',
897   'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
898            'wr_operations': 'int', 'flush_operations': 'int',
899            'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
900            'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
903 # @BlockStats:
905 # Statistics of a virtual block device or a block backing device.
907 # @device: #optional If the stats are for a virtual block device, the name
908 #          corresponding to the virtual block device.
910 # @stats:  A @BlockDeviceStats for the device.
912 # @parent: #optional This may point to the backing block device if this is a
913 #          a virtual block device.  If it's a backing block, this will point
914 #          to the backing file is one is present.
916 # Since: 0.14.0
918 { 'type': 'BlockStats',
919   'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
920            '*parent': 'BlockStats'} }
923 # @query-blockstats:
925 # Query the @BlockStats for all virtual block devices.
927 # Returns: A list of @BlockStats for each virtual block devices.
929 # Since: 0.14.0
931 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
934 # @VncClientInfo:
936 # Information about a connected VNC client.
938 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
939 #        when possible.
941 # @family: 'ipv6' if the client is connected via IPv6 and TCP
942 #          'ipv4' if the client is connected via IPv4 and TCP
943 #          'unix' if the client is connected via a unix domain socket
944 #          'unknown' otherwise
946 # @service: The service name of the client's port.  This may depends on the
947 #           host system's service database so symbolic names should not be
948 #           relied on.
950 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
951 #              Name of the client.
953 # @sasl_username: #optional If SASL authentication is in use, the SASL username
954 #                 used for authentication.
956 # Since: 0.14.0
958 { 'type': 'VncClientInfo',
959   'data': {'host': 'str', 'family': 'str', 'service': 'str',
960            '*x509_dname': 'str', '*sasl_username': 'str'} }
963 # @VncInfo:
965 # Information about the VNC session.
967 # @enabled: true if the VNC server is enabled, false otherwise
969 # @host: #optional The hostname the VNC server is bound to.  This depends on
970 #        the name resolution on the host and may be an IP address.
972 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
973 #                    'ipv4' if the host is listening for IPv4 connections
974 #                    'unix' if the host is listening on a unix domain socket
975 #                    'unknown' otherwise
977 # @service: #optional The service name of the server's port.  This may depends
978 #           on the host system's service database so symbolic names should not
979 #           be relied on.
981 # @auth: #optional the current authentication type used by the server
982 #        'none' if no authentication is being used
983 #        'vnc' if VNC authentication is being used
984 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
985 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
986 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
987 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
988 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
989 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
990 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
991 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
992 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
994 # @clients: a list of @VncClientInfo of all currently connected clients
996 # Since: 0.14.0
998 { 'type': 'VncInfo',
999   'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
1000            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1003 # @query-vnc:
1005 # Returns information about the current VNC server
1007 # Returns: @VncInfo
1009 # Since: 0.14.0
1011 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1014 # @SpiceChannel
1016 # Information about a SPICE client channel.
1018 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
1019 #        when possible.
1021 # @family: 'ipv6' if the client is connected via IPv6 and TCP
1022 #          'ipv4' if the client is connected via IPv4 and TCP
1023 #          'unix' if the client is connected via a unix domain socket
1024 #          'unknown' otherwise
1026 # @port: The client's port number.
1028 # @connection-id: SPICE connection id number.  All channels with the same id
1029 #                 belong to the same SPICE session.
1031 # @connection-type: SPICE channel type number.  "1" is the main control
1032 #                   channel, filter for this one if you want to track spice
1033 #                   sessions only
1035 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
1036 #              multiple channels of the same type exist, such as multiple
1037 #              display channels in a multihead setup
1039 # @tls: true if the channel is encrypted, false otherwise.
1041 # Since: 0.14.0
1043 { 'type': 'SpiceChannel',
1044   'data': {'host': 'str', 'family': 'str', 'port': 'str',
1045            'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1046            'tls': 'bool'} }
1049 # @SpiceQueryMouseMode
1051 # An enumeration of Spice mouse states.
1053 # @client: Mouse cursor position is determined by the client.
1055 # @server: Mouse cursor position is determined by the server.
1057 # @unknown: No information is available about mouse mode used by
1058 #           the spice server.
1060 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1062 # Since: 1.1
1064 { 'enum': 'SpiceQueryMouseMode',
1065   'data': [ 'client', 'server', 'unknown' ] }
1068 # @SpiceInfo
1070 # Information about the SPICE session.
1072 # @enabled: true if the SPICE server is enabled, false otherwise
1074 # @migrated: true if the last guest migration completed and spice
1075 #            migration had completed as well. false otherwise.
1077 # @host: #optional The hostname the SPICE server is bound to.  This depends on
1078 #        the name resolution on the host and may be an IP address.
1080 # @port: #optional The SPICE server's port number.
1082 # @compiled-version: #optional SPICE server version.
1084 # @tls-port: #optional The SPICE server's TLS port number.
1086 # @auth: #optional the current authentication type used by the server
1087 #        'none'  if no authentication is being used
1088 #        'spice' uses SASL or direct TLS authentication, depending on command
1089 #                line options
1091 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1092 #              be determined by the client or the server, or unknown if spice
1093 #              server doesn't provide this information.
1095 #              Since: 1.1
1097 # @channels: a list of @SpiceChannel for each active spice channel
1099 # Since: 0.14.0
1101 { 'type': 'SpiceInfo',
1102   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1103            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1104            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1107 # @query-spice
1109 # Returns information about the current SPICE server
1111 # Returns: @SpiceInfo
1113 # Since: 0.14.0
1115 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1118 # @BalloonInfo:
1120 # Information about the guest balloon device.
1122 # @actual: the number of bytes the balloon currently contains
1124 # Since: 0.14.0
1127 { 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
1130 # @query-balloon:
1132 # Return information about the balloon device.
1134 # Returns: @BalloonInfo on success
1135 #          If the balloon driver is enabled but not functional because the KVM
1136 #          kernel module cannot support it, KvmMissingCap
1137 #          If no balloon device is present, DeviceNotActive
1139 # Since: 0.14.0
1141 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1144 # @PciMemoryRange:
1146 # A PCI device memory region
1148 # @base: the starting address (guest physical)
1150 # @limit: the ending address (guest physical)
1152 # Since: 0.14.0
1154 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1157 # @PciMemoryRegion
1159 # Information about a PCI device I/O region.
1161 # @bar: the index of the Base Address Register for this region
1163 # @type: 'io' if the region is a PIO region
1164 #        'memory' if the region is a MMIO region
1166 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1168 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1170 # Since: 0.14.0
1172 { 'type': 'PciMemoryRegion',
1173   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1174            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1177 # @PciBridgeInfo:
1179 # Information about a PCI Bridge device
1181 # @bus.number: primary bus interface number.  This should be the number of the
1182 #              bus the device resides on.
1184 # @bus.secondary: secondary bus interface number.  This is the number of the
1185 #                 main bus for the bridge
1187 # @bus.subordinate: This is the highest number bus that resides below the
1188 #                   bridge.
1190 # @bus.io_range: The PIO range for all devices on this bridge
1192 # @bus.memory_range: The MMIO range for all devices on this bridge
1194 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1195 #                          this bridge
1197 # @devices: a list of @PciDeviceInfo for each device on this bridge
1199 # Since: 0.14.0
1201 { 'type': 'PciBridgeInfo',
1202   'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1203                     'io_range': 'PciMemoryRange',
1204                     'memory_range': 'PciMemoryRange',
1205                     'prefetchable_range': 'PciMemoryRange' },
1206            '*devices': ['PciDeviceInfo']} }
1209 # @PciDeviceInfo:
1211 # Information about a PCI device
1213 # @bus: the bus number of the device
1215 # @slot: the slot the device is located in
1217 # @function: the function of the slot used by the device
1219 # @class_info.desc: #optional a string description of the device's class
1221 # @class_info.class: the class code of the device
1223 # @id.device: the PCI device id
1225 # @id.vendor: the PCI vendor id
1227 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1229 # @qdev_id: the device name of the PCI device
1231 # @pci_bridge: if the device is a PCI bridge, the bridge information
1233 # @regions: a list of the PCI I/O regions associated with the device
1235 # Notes: the contents of @class_info.desc are not stable and should only be
1236 #        treated as informational.
1238 # Since: 0.14.0
1240 { 'type': 'PciDeviceInfo',
1241   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1242            'class_info': {'*desc': 'str', 'class': 'int'},
1243            'id': {'device': 'int', 'vendor': 'int'},
1244            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1245            'regions': ['PciMemoryRegion']} }
1248 # @PciInfo:
1250 # Information about a PCI bus
1252 # @bus: the bus index
1254 # @devices: a list of devices on this bus
1256 # Since: 0.14.0
1258 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1261 # @query-pci:
1263 # Return information about the PCI bus topology of the guest.
1265 # Returns: a list of @PciInfo for each PCI bus
1267 # Since: 0.14.0
1269 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1272 # @BlockdevOnError:
1274 # An enumeration of possible behaviors for errors on I/O operations.
1275 # The exact meaning depends on whether the I/O was initiated by a guest
1276 # or by a block job
1278 # @report: for guest operations, report the error to the guest;
1279 #          for jobs, cancel the job
1281 # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1282 #          or BLOCK_JOB_ERROR)
1284 # @enospc: same as @stop on ENOSPC, same as @report otherwise.
1286 # @stop: for guest operations, stop the virtual machine;
1287 #        for jobs, pause the job
1289 # Since: 1.3
1291 { 'enum': 'BlockdevOnError',
1292   'data': ['report', 'ignore', 'enospc', 'stop'] }
1295 # @MirrorSyncMode:
1297 # An enumeration of possible behaviors for the initial synchronization
1298 # phase of storage mirroring.
1300 # @top: copies data in the topmost image to the destination
1302 # @full: copies data from all images to the destination
1304 # @none: only copy data written from now on
1306 # Since: 1.3
1308 { 'enum': 'MirrorSyncMode',
1309   'data': ['top', 'full', 'none'] }
1312 # @BlockJobInfo:
1314 # Information about a long-running block device operation.
1316 # @type: the job type ('stream' for image streaming)
1318 # @device: the block device name
1320 # @len: the maximum progress value
1322 # @busy: false if the job is known to be in a quiescent state, with
1323 #        no pending I/O.  Since 1.3.
1325 # @paused: whether the job is paused or, if @busy is true, will
1326 #          pause itself as soon as possible.  Since 1.3.
1328 # @offset: the current progress value
1330 # @speed: the rate limit, bytes per second
1332 # @io-status: the status of the job (since 1.3)
1334 # Since: 1.1
1336 { 'type': 'BlockJobInfo',
1337   'data': {'type': 'str', 'device': 'str', 'len': 'int',
1338            'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1339            'io-status': 'BlockDeviceIoStatus'} }
1342 # @query-block-jobs:
1344 # Return information about long-running block device operations.
1346 # Returns: a list of @BlockJobInfo for each active block job
1348 # Since: 1.1
1350 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1353 # @quit:
1355 # This command will cause the QEMU process to exit gracefully.  While every
1356 # attempt is made to send the QMP response before terminating, this is not
1357 # guaranteed.  When using this interface, a premature EOF would not be
1358 # unexpected.
1360 # Since: 0.14.0
1362 { 'command': 'quit' }
1365 # @stop:
1367 # Stop all guest VCPU execution.
1369 # Since:  0.14.0
1371 # Notes:  This function will succeed even if the guest is already in the stopped
1372 #         state.  In "inmigrate" state, it will ensure that the guest
1373 #         remains paused once migration finishes, as if the -S option was
1374 #         passed on the command line.
1376 { 'command': 'stop' }
1379 # @system_reset:
1381 # Performs a hard reset of a guest.
1383 # Since: 0.14.0
1385 { 'command': 'system_reset' }
1388 # @system_powerdown:
1390 # Requests that a guest perform a powerdown operation.
1392 # Since: 0.14.0
1394 # Notes: A guest may or may not respond to this command.  This command
1395 #        returning does not indicate that a guest has accepted the request or
1396 #        that it has shut down.  Many guests will respond to this command by
1397 #        prompting the user in some way.
1399 { 'command': 'system_powerdown' }
1402 # @cpu:
1404 # This command is a nop that is only provided for the purposes of compatibility.
1406 # Since: 0.14.0
1408 # Notes: Do not use this command.
1410 { 'command': 'cpu', 'data': {'index': 'int'} }
1413 # @cpu-add
1415 # Adds CPU with specified ID
1417 # @id: ID of CPU to be created, valid values [0..max_cpus)
1419 # Returns: Nothing on success
1421 # Since 1.5
1423 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1426 # @memsave:
1428 # Save a portion of guest memory to a file.
1430 # @val: the virtual address of the guest to start from
1432 # @size: the size of memory region to save
1434 # @filename: the file to save the memory to as binary data
1436 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1437 #                       virtual address (defaults to CPU 0)
1439 # Returns: Nothing on success
1441 # Since: 0.14.0
1443 # Notes: Errors were not reliably returned until 1.1
1445 { 'command': 'memsave',
1446   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1449 # @pmemsave:
1451 # Save a portion of guest physical memory to a file.
1453 # @val: the physical address of the guest to start from
1455 # @size: the size of memory region to save
1457 # @filename: the file to save the memory to as binary data
1459 # Returns: Nothing on success
1461 # Since: 0.14.0
1463 # Notes: Errors were not reliably returned until 1.1
1465 { 'command': 'pmemsave',
1466   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1469 # @cont:
1471 # Resume guest VCPU execution.
1473 # Since:  0.14.0
1475 # Returns:  If successful, nothing
1476 #           If QEMU was started with an encrypted block device and a key has
1477 #              not yet been set, DeviceEncrypted.
1479 # Notes:  This command will succeed if the guest is currently running.  It
1480 #         will also succeed if the guest is in the "inmigrate" state; in
1481 #         this case, the effect of the command is to make sure the guest
1482 #         starts once migration finishes, removing the effect of the -S
1483 #         command line option if it was passed.
1485 { 'command': 'cont' }
1488 # @system_wakeup:
1490 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1492 # Since:  1.1
1494 # Returns:  nothing.
1496 { 'command': 'system_wakeup' }
1499 # @inject-nmi:
1501 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1503 # Returns:  If successful, nothing
1505 # Since:  0.14.0
1507 # Notes: Only x86 Virtual Machines support this command.
1509 { 'command': 'inject-nmi' }
1512 # @set_link:
1514 # Sets the link status of a virtual network adapter.
1516 # @name: the device name of the virtual network adapter
1518 # @up: true to set the link status to be up
1520 # Returns: Nothing on success
1521 #          If @name is not a valid network device, DeviceNotFound
1523 # Since: 0.14.0
1525 # Notes: Not all network adapters support setting link status.  This command
1526 #        will succeed even if the network adapter does not support link status
1527 #        notification.
1529 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1532 # @block_passwd:
1534 # This command sets the password of a block device that has not been open
1535 # with a password and requires one.
1537 # The two cases where this can happen are a block device is created through
1538 # QEMU's initial command line or a block device is changed through the legacy
1539 # @change interface.
1541 # In the event that the block device is created through the initial command
1542 # line, the VM will start in the stopped state regardless of whether '-S' is
1543 # used.  The intention is for a management tool to query the block devices to
1544 # determine which ones are encrypted, set the passwords with this command, and
1545 # then start the guest with the @cont command.
1547 # @device:   the name of the device to set the password on
1549 # @password: the password to use for the device
1551 # Returns: nothing on success
1552 #          If @device is not a valid block device, DeviceNotFound
1553 #          If @device is not encrypted, DeviceNotEncrypted
1555 # Notes:  Not all block formats support encryption and some that do are not
1556 #         able to validate that a password is correct.  Disk corruption may
1557 #         occur if an invalid password is specified.
1559 # Since: 0.14.0
1561 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1564 # @balloon:
1566 # Request the balloon driver to change its balloon size.
1568 # @value: the target size of the balloon in bytes
1570 # Returns: Nothing on success
1571 #          If the balloon driver is enabled but not functional because the KVM
1572 #            kernel module cannot support it, KvmMissingCap
1573 #          If no balloon device is present, DeviceNotActive
1575 # Notes: This command just issues a request to the guest.  When it returns,
1576 #        the balloon size may not have changed.  A guest can change the balloon
1577 #        size independent of this command.
1579 # Since: 0.14.0
1581 { 'command': 'balloon', 'data': {'value': 'int'} }
1584 # @block_resize
1586 # Resize a block image while a guest is running.
1588 # @device:  the name of the device to get the image resized
1590 # @size:  new image size in bytes
1592 # Returns: nothing on success
1593 #          If @device is not a valid block device, DeviceNotFound
1595 # Since: 0.14.0
1597 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1600 # @NewImageMode
1602 # An enumeration that tells QEMU how to set the backing file path in
1603 # a new image file.
1605 # @existing: QEMU should look for an existing image file.
1607 # @absolute-paths: QEMU should create a new image with absolute paths
1608 # for the backing file.
1610 # Since: 1.1
1612 { 'enum': 'NewImageMode',
1613   'data': [ 'existing', 'absolute-paths' ] }
1616 # @BlockdevSnapshot
1618 # @device:  the name of the device to generate the snapshot from.
1620 # @snapshot-file: the target of the new image. A new file will be created.
1622 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1624 # @mode: #optional whether and how QEMU should create a new image, default is
1625 #        'absolute-paths'.
1627 { 'type': 'BlockdevSnapshot',
1628   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1629             '*mode': 'NewImageMode' } }
1632 # @DriveBackup
1634 # @device: the name of the device which should be copied.
1636 # @target: the target of the new image. If the file exists, or if it
1637 #          is a device, the existing file/device will be used as the new
1638 #          destination.  If it does not exist, a new file will be created.
1640 # @format: #optional the format of the new destination, default is to
1641 #          probe if @mode is 'existing', else the format of the source
1643 # @sync: what parts of the disk image should be copied to the destination
1644 #        (all the disk, only the sectors allocated in the topmost image, or
1645 #        only new I/O).
1647 # @mode: #optional whether and how QEMU should create a new image, default is
1648 #        'absolute-paths'.
1650 # @speed: #optional the maximum speed, in bytes per second
1652 # @on-source-error: #optional the action to take on an error on the source,
1653 #                   default 'report'.  'stop' and 'enospc' can only be used
1654 #                   if the block device supports io-status (see BlockInfo).
1656 # @on-target-error: #optional the action to take on an error on the target,
1657 #                   default 'report' (no limitations, since this applies to
1658 #                   a different block device than @device).
1660 # Note that @on-source-error and @on-target-error only affect background I/O.
1661 # If an error occurs during a guest write request, the device's rerror/werror
1662 # actions will be used.
1664 # Since: 1.6
1666 { 'type': 'DriveBackup',
1667   'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1668             'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
1669             '*speed': 'int',
1670             '*on-source-error': 'BlockdevOnError',
1671             '*on-target-error': 'BlockdevOnError' } }
1674 # @Abort
1676 # This action can be used to test transaction failure.
1678 # Since: 1.6
1680 { 'type': 'Abort',
1681   'data': { } }
1684 # @TransactionAction
1686 # A discriminated record of operations that can be performed with
1687 # @transaction.
1689 { 'union': 'TransactionAction',
1690   'data': {
1691        'blockdev-snapshot-sync': 'BlockdevSnapshot',
1692        'drive-backup': 'DriveBackup',
1693        'abort': 'Abort'
1694    } }
1697 # @transaction
1699 # Executes a number of transactionable QMP commands atomically. If any
1700 # operation fails, then the entire set of actions will be abandoned and the
1701 # appropriate error returned.
1703 #  List of:
1704 #  @TransactionAction: information needed for the respective operation
1706 # Returns: nothing on success
1707 #          Errors depend on the operations of the transaction
1709 # Note: The transaction aborts on the first failure.  Therefore, there will be
1710 # information on only one failed operation returned in an error condition, and
1711 # subsequent actions will not have been attempted.
1713 # Since 1.1
1715 { 'command': 'transaction',
1716   'data': { 'actions': [ 'TransactionAction' ] } }
1719 # @blockdev-snapshot-sync
1721 # Generates a synchronous snapshot of a block device.
1723 # For the arguments, see the documentation of BlockdevSnapshot.
1725 # Returns: nothing on success
1726 #          If @device is not a valid block device, DeviceNotFound
1728 # Since 0.14.0
1730 { 'command': 'blockdev-snapshot-sync',
1731   'data': 'BlockdevSnapshot' }
1734 # @human-monitor-command:
1736 # Execute a command on the human monitor and return the output.
1738 # @command-line: the command to execute in the human monitor
1740 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1742 # Returns: the output of the command as a string
1744 # Since: 0.14.0
1746 # Notes: This command only exists as a stop-gap.  It's use is highly
1747 #        discouraged.  The semantics of this command are not guaranteed.
1749 #        Known limitations:
1751 #        o This command is stateless, this means that commands that depend
1752 #          on state information (such as getfd) might not work
1754 #       o Commands that prompt the user for data (eg. 'cont' when the block
1755 #         device is encrypted) don't currently work
1757 { 'command': 'human-monitor-command',
1758   'data': {'command-line': 'str', '*cpu-index': 'int'},
1759   'returns': 'str' }
1762 # @block-commit
1764 # Live commit of data from overlay image nodes into backing nodes - i.e.,
1765 # writes data between 'top' and 'base' into 'base'.
1767 # @device:  the name of the device
1769 # @base:   #optional The file name of the backing image to write data into.
1770 #                    If not specified, this is the deepest backing image
1772 # @top:              The file name of the backing image within the image chain,
1773 #                    which contains the topmost data to be committed down.
1774 #                    Note, the active layer as 'top' is currently unsupported.
1776 #                    If top == base, that is an error.
1779 # @speed:  #optional the maximum speed, in bytes per second
1781 # Returns: Nothing on success
1782 #          If commit or stream is already active on this device, DeviceInUse
1783 #          If @device does not exist, DeviceNotFound
1784 #          If image commit is not supported by this device, NotSupported
1785 #          If @base or @top is invalid, a generic error is returned
1786 #          If @top is the active layer, or omitted, a generic error is returned
1787 #          If @speed is invalid, InvalidParameter
1789 # Since: 1.3
1792 { 'command': 'block-commit',
1793   'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1794             '*speed': 'int' } }
1797 # @drive-backup
1799 # Start a point-in-time copy of a block device to a new destination.  The
1800 # status of ongoing drive-backup operations can be checked with
1801 # query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
1802 # The operation can be stopped before it has completed using the
1803 # block-job-cancel command.
1805 # For the arguments, see the documentation of DriveBackup.
1807 # Returns: nothing on success
1808 #          If @device is not a valid block device, DeviceNotFound
1810 # Since 1.6
1812 { 'command': 'drive-backup', 'data': 'DriveBackup' }
1815 # @drive-mirror
1817 # Start mirroring a block device's writes to a new destination.
1819 # @device:  the name of the device whose writes should be mirrored.
1821 # @target: the target of the new image. If the file exists, or if it
1822 #          is a device, the existing file/device will be used as the new
1823 #          destination.  If it does not exist, a new file will be created.
1825 # @format: #optional the format of the new destination, default is to
1826 #          probe if @mode is 'existing', else the format of the source
1828 # @mode: #optional whether and how QEMU should create a new image, default is
1829 #        'absolute-paths'.
1831 # @speed:  #optional the maximum speed, in bytes per second
1833 # @sync: what parts of the disk image should be copied to the destination
1834 #        (all the disk, only the sectors allocated in the topmost image, or
1835 #        only new I/O).
1837 # @granularity: #optional granularity of the dirty bitmap, default is 64K
1838 #               if the image format doesn't have clusters, 4K if the clusters
1839 #               are smaller than that, else the cluster size.  Must be a
1840 #               power of 2 between 512 and 64M (since 1.4).
1842 # @buf-size: #optional maximum amount of data in flight from source to
1843 #            target (since 1.4).
1845 # @on-source-error: #optional the action to take on an error on the source,
1846 #                   default 'report'.  'stop' and 'enospc' can only be used
1847 #                   if the block device supports io-status (see BlockInfo).
1849 # @on-target-error: #optional the action to take on an error on the target,
1850 #                   default 'report' (no limitations, since this applies to
1851 #                   a different block device than @device).
1853 # Returns: nothing on success
1854 #          If @device is not a valid block device, DeviceNotFound
1856 # Since 1.3
1858 { 'command': 'drive-mirror',
1859   'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1860             'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
1861             '*speed': 'int', '*granularity': 'uint32',
1862             '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
1863             '*on-target-error': 'BlockdevOnError' } }
1866 # @migrate_cancel
1868 # Cancel the current executing migration process.
1870 # Returns: nothing on success
1872 # Notes: This command succeeds even if there is no migration process running.
1874 # Since: 0.14.0
1876 { 'command': 'migrate_cancel' }
1879 # @migrate_set_downtime
1881 # Set maximum tolerated downtime for migration.
1883 # @value: maximum downtime in seconds
1885 # Returns: nothing on success
1887 # Since: 0.14.0
1889 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1892 # @migrate_set_speed
1894 # Set maximum speed for migration.
1896 # @value: maximum speed in bytes.
1898 # Returns: nothing on success
1900 # Notes: A value lesser than zero will be automatically round up to zero.
1902 # Since: 0.14.0
1904 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1907 # @migrate-set-cache-size
1909 # Set XBZRLE cache size
1911 # @value: cache size in bytes
1913 # The size will be rounded down to the nearest power of 2.
1914 # The cache size can be modified before and during ongoing migration
1916 # Returns: nothing on success
1918 # Since: 1.2
1920 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1923 # @query-migrate-cache-size
1925 # query XBZRLE cache size
1927 # Returns: XBZRLE cache size in bytes
1929 # Since: 1.2
1931 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1934 # @ObjectPropertyInfo:
1936 # @name: the name of the property
1938 # @type: the type of the property.  This will typically come in one of four
1939 #        forms:
1941 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1942 #           These types are mapped to the appropriate JSON type.
1944 #        2) A legacy type in the form 'legacy<subtype>' where subtype is the
1945 #           legacy qdev typename.  These types are always treated as strings.
1947 #        3) A child type in the form 'child<subtype>' where subtype is a qdev
1948 #           device type name.  Child properties create the composition tree.
1950 #        4) A link type in the form 'link<subtype>' where subtype is a qdev
1951 #           device type name.  Link properties form the device model graph.
1953 # Since: 1.2
1955 { 'type': 'ObjectPropertyInfo',
1956   'data': { 'name': 'str', 'type': 'str' } }
1959 # @qom-list:
1961 # This command will list any properties of a object given a path in the object
1962 # model.
1964 # @path: the path within the object model.  See @qom-get for a description of
1965 #        this parameter.
1967 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1968 #          object.
1970 # Since: 1.2
1972 { 'command': 'qom-list',
1973   'data': { 'path': 'str' },
1974   'returns': [ 'ObjectPropertyInfo' ] }
1977 # @qom-get:
1979 # This command will get a property from a object model path and return the
1980 # value.
1982 # @path: The path within the object model.  There are two forms of supported
1983 #        paths--absolute and partial paths.
1985 #        Absolute paths are derived from the root object and can follow child<>
1986 #        or link<> properties.  Since they can follow link<> properties, they
1987 #        can be arbitrarily long.  Absolute paths look like absolute filenames
1988 #        and are prefixed  with a leading slash.
1990 #        Partial paths look like relative filenames.  They do not begin
1991 #        with a prefix.  The matching rules for partial paths are subtle but
1992 #        designed to make specifying objects easy.  At each level of the
1993 #        composition tree, the partial path is matched as an absolute path.
1994 #        The first match is not returned.  At least two matches are searched
1995 #        for.  A successful result is only returned if only one match is
1996 #        found.  If more than one match is found, a flag is return to
1997 #        indicate that the match was ambiguous.
1999 # @property: The property name to read
2001 # Returns: The property value.  The type depends on the property type.  legacy<>
2002 #          properties are returned as #str.  child<> and link<> properties are
2003 #          returns as #str pathnames.  All integer property types (u8, u16, etc)
2004 #          are returned as #int.
2006 # Since: 1.2
2008 { 'command': 'qom-get',
2009   'data': { 'path': 'str', 'property': 'str' },
2010   'returns': 'visitor',
2011   'gen': 'no' }
2014 # @qom-set:
2016 # This command will set a property from a object model path.
2018 # @path: see @qom-get for a description of this parameter
2020 # @property: the property name to set
2022 # @value: a value who's type is appropriate for the property type.  See @qom-get
2023 #         for a description of type mapping.
2025 # Since: 1.2
2027 { 'command': 'qom-set',
2028   'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
2029   'gen': 'no' }
2032 # @set_password:
2034 # Sets the password of a remote display session.
2036 # @protocol: `vnc' to modify the VNC server password
2037 #            `spice' to modify the Spice server password
2039 # @password: the new password
2041 # @connected: #optional how to handle existing clients when changing the
2042 #                       password.  If nothing is specified, defaults to `keep'
2043 #                       `fail' to fail the command if clients are connected
2044 #                       `disconnect' to disconnect existing clients
2045 #                       `keep' to maintain existing clients
2047 # Returns: Nothing on success
2048 #          If Spice is not enabled, DeviceNotFound
2050 # Since: 0.14.0
2052 { 'command': 'set_password',
2053   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2056 # @expire_password:
2058 # Expire the password of a remote display server.
2060 # @protocol: the name of the remote display protocol `vnc' or `spice'
2062 # @time: when to expire the password.
2063 #        `now' to expire the password immediately
2064 #        `never' to cancel password expiration
2065 #        `+INT' where INT is the number of seconds from now (integer)
2066 #        `INT' where INT is the absolute time in seconds
2068 # Returns: Nothing on success
2069 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
2071 # Since: 0.14.0
2073 # Notes: Time is relative to the server and currently there is no way to
2074 #        coordinate server time with client time.  It is not recommended to
2075 #        use the absolute time version of the @time parameter unless you're
2076 #        sure you are on the same machine as the QEMU instance.
2078 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2081 # @eject:
2083 # Ejects a device from a removable drive.
2085 # @device:  The name of the device
2087 # @force:   @optional If true, eject regardless of whether the drive is locked.
2088 #           If not specified, the default value is false.
2090 # Returns:  Nothing on success
2091 #           If @device is not a valid block device, DeviceNotFound
2093 # Notes:    Ejecting a device will no media results in success
2095 # Since: 0.14.0
2097 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
2100 # @change-vnc-password:
2102 # Change the VNC server password.
2104 # @target:  the new password to use with VNC authentication
2106 # Since: 1.1
2108 # Notes:  An empty password in this command will set the password to the empty
2109 #         string.  Existing clients are unaffected by executing this command.
2111 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2114 # @change:
2116 # This command is multiple commands multiplexed together.
2118 # @device: This is normally the name of a block device but it may also be 'vnc'.
2119 #          when it's 'vnc', then sub command depends on @target
2121 # @target: If @device is a block device, then this is the new filename.
2122 #          If @device is 'vnc', then if the value 'password' selects the vnc
2123 #          change password command.   Otherwise, this specifies a new server URI
2124 #          address to listen to for VNC connections.
2126 # @arg:    If @device is a block device, then this is an optional format to open
2127 #          the device with.
2128 #          If @device is 'vnc' and @target is 'password', this is the new VNC
2129 #          password to set.  If this argument is an empty string, then no future
2130 #          logins will be allowed.
2132 # Returns: Nothing on success.
2133 #          If @device is not a valid block device, DeviceNotFound
2134 #          If the new block device is encrypted, DeviceEncrypted.  Note that
2135 #          if this error is returned, the device has been opened successfully
2136 #          and an additional call to @block_passwd is required to set the
2137 #          device's password.  The behavior of reads and writes to the block
2138 #          device between when these calls are executed is undefined.
2140 # Notes:  It is strongly recommended that this interface is not used especially
2141 #         for changing block devices.
2143 # Since: 0.14.0
2145 { 'command': 'change',
2146   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2149 # @block_set_io_throttle:
2151 # Change I/O throttle limits for a block drive.
2153 # @device: The name of the device
2155 # @bps: total throughput limit in bytes per second
2157 # @bps_rd: read throughput limit in bytes per second
2159 # @bps_wr: write throughput limit in bytes per second
2161 # @iops: total I/O operations per second
2163 # @ops_rd: read I/O operations per second
2165 # @iops_wr: write I/O operations per second
2167 # Returns: Nothing on success
2168 #          If @device is not a valid block device, DeviceNotFound
2170 # Since: 1.1
2172 { 'command': 'block_set_io_throttle',
2173   'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
2174             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
2177 # @block-stream:
2179 # Copy data from a backing file into a block device.
2181 # The block streaming operation is performed in the background until the entire
2182 # backing file has been copied.  This command returns immediately once streaming
2183 # has started.  The status of ongoing block streaming operations can be checked
2184 # with query-block-jobs.  The operation can be stopped before it has completed
2185 # using the block-job-cancel command.
2187 # If a base file is specified then sectors are not copied from that base file and
2188 # its backing chain.  When streaming completes the image file will have the base
2189 # file as its backing file.  This can be used to stream a subset of the backing
2190 # file chain instead of flattening the entire image.
2192 # On successful completion the image file is updated to drop the backing file
2193 # and the BLOCK_JOB_COMPLETED event is emitted.
2195 # @device: the device name
2197 # @base:   #optional the common backing file name
2199 # @speed:  #optional the maximum speed, in bytes per second
2201 # @on-error: #optional the action to take on an error (default report).
2202 #            'stop' and 'enospc' can only be used if the block device
2203 #            supports io-status (see BlockInfo).  Since 1.3.
2205 # Returns: Nothing on success
2206 #          If @device does not exist, DeviceNotFound
2208 # Since: 1.1
2210 { 'command': 'block-stream',
2211   'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
2212             '*on-error': 'BlockdevOnError' } }
2215 # @block-job-set-speed:
2217 # Set maximum speed for a background block operation.
2219 # This command can only be issued when there is an active block job.
2221 # Throttling can be disabled by setting the speed to 0.
2223 # @device: the device name
2225 # @speed:  the maximum speed, in bytes per second, or 0 for unlimited.
2226 #          Defaults to 0.
2228 # Returns: Nothing on success
2229 #          If no background operation is active on this device, DeviceNotActive
2231 # Since: 1.1
2233 { 'command': 'block-job-set-speed',
2234   'data': { 'device': 'str', 'speed': 'int' } }
2237 # @block-job-cancel:
2239 # Stop an active background block operation.
2241 # This command returns immediately after marking the active background block
2242 # operation for cancellation.  It is an error to call this command if no
2243 # operation is in progress.
2245 # The operation will cancel as soon as possible and then emit the
2246 # BLOCK_JOB_CANCELLED event.  Before that happens the job is still visible when
2247 # enumerated using query-block-jobs.
2249 # For streaming, the image file retains its backing file unless the streaming
2250 # operation happens to complete just as it is being cancelled.  A new streaming
2251 # operation can be started at a later time to finish copying all data from the
2252 # backing file.
2254 # @device: the device name
2256 # @force: #optional whether to allow cancellation of a paused job (default
2257 #         false).  Since 1.3.
2259 # Returns: Nothing on success
2260 #          If no background operation is active on this device, DeviceNotActive
2262 # Since: 1.1
2264 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
2267 # @block-job-pause:
2269 # Pause an active background block operation.
2271 # This command returns immediately after marking the active background block
2272 # operation for pausing.  It is an error to call this command if no
2273 # operation is in progress.  Pausing an already paused job has no cumulative
2274 # effect; a single block-job-resume command will resume the job.
2276 # The operation will pause as soon as possible.  No event is emitted when
2277 # the operation is actually paused.  Cancelling a paused job automatically
2278 # resumes it.
2280 # @device: the device name
2282 # Returns: Nothing on success
2283 #          If no background operation is active on this device, DeviceNotActive
2285 # Since: 1.3
2287 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2290 # @block-job-resume:
2292 # Resume an active background block operation.
2294 # This command returns immediately after resuming a paused background block
2295 # operation.  It is an error to call this command if no operation is in
2296 # progress.  Resuming an already running job is not an error.
2298 # This command also clears the error status of the job.
2300 # @device: the device name
2302 # Returns: Nothing on success
2303 #          If no background operation is active on this device, DeviceNotActive
2305 # Since: 1.3
2307 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
2310 # @block-job-complete:
2312 # Manually trigger completion of an active background block operation.  This
2313 # is supported for drive mirroring, where it also switches the device to
2314 # write to the target path only.  The ability to complete is signaled with
2315 # a BLOCK_JOB_READY event.
2317 # This command completes an active background block operation synchronously.
2318 # The ordering of this command's return with the BLOCK_JOB_COMPLETED event
2319 # is not defined.  Note that if an I/O error occurs during the processing of
2320 # this command: 1) the command itself will fail; 2) the error will be processed
2321 # according to the rerror/werror arguments that were specified when starting
2322 # the operation.
2324 # A cancelled or paused job cannot be completed.
2326 # @device: the device name
2328 # Returns: Nothing on success
2329 #          If no background operation is active on this device, DeviceNotActive
2331 # Since: 1.3
2333 { 'command': 'block-job-complete', 'data': { 'device': 'str' } }
2336 # @ObjectTypeInfo:
2338 # This structure describes a search result from @qom-list-types
2340 # @name: the type name found in the search
2342 # Since: 1.1
2344 # Notes: This command is experimental and may change syntax in future releases.
2346 { 'type': 'ObjectTypeInfo',
2347   'data': { 'name': 'str' } }
2350 # @qom-list-types:
2352 # This command will return a list of types given search parameters
2354 # @implements: if specified, only return types that implement this type name
2356 # @abstract: if true, include abstract types in the results
2358 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2360 # Since: 1.1
2362 { 'command': 'qom-list-types',
2363   'data': { '*implements': 'str', '*abstract': 'bool' },
2364   'returns': [ 'ObjectTypeInfo' ] }
2367 # @DevicePropertyInfo:
2369 # Information about device properties.
2371 # @name: the name of the property
2372 # @type: the typename of the property
2374 # Since: 1.2
2376 { 'type': 'DevicePropertyInfo',
2377   'data': { 'name': 'str', 'type': 'str' } }
2380 # @device-list-properties:
2382 # List properties associated with a device.
2384 # @typename: the type name of a device
2386 # Returns: a list of DevicePropertyInfo describing a devices properties
2388 # Since: 1.2
2390 { 'command': 'device-list-properties',
2391   'data': { 'typename': 'str'},
2392   'returns': [ 'DevicePropertyInfo' ] }
2395 # @migrate
2397 # Migrates the current running guest to another Virtual Machine.
2399 # @uri: the Uniform Resource Identifier of the destination VM
2401 # @blk: #optional do block migration (full disk copy)
2403 # @inc: #optional incremental disk copy migration
2405 # @detach: this argument exists only for compatibility reasons and
2406 #          is ignored by QEMU
2408 # Returns: nothing on success
2410 # Since: 0.14.0
2412 { 'command': 'migrate',
2413   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2415 # @xen-save-devices-state:
2417 # Save the state of all devices to file. The RAM and the block devices
2418 # of the VM are not saved by this command.
2420 # @filename: the file to save the state of the devices to as binary
2421 # data. See xen-save-devices-state.txt for a description of the binary
2422 # format.
2424 # Returns: Nothing on success
2426 # Since: 1.1
2428 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2431 # @xen-set-global-dirty-log
2433 # Enable or disable the global dirty log mode.
2435 # @enable: true to enable, false to disable.
2437 # Returns: nothing
2439 # Since: 1.3
2441 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2444 # @device_del:
2446 # Remove a device from a guest
2448 # @id: the name of the device
2450 # Returns: Nothing on success
2451 #          If @id is not a valid device, DeviceNotFound
2453 # Notes: When this command completes, the device may not be removed from the
2454 #        guest.  Hot removal is an operation that requires guest cooperation.
2455 #        This command merely requests that the guest begin the hot removal
2456 #        process.  Completion of the device removal process is signaled with a
2457 #        DEVICE_DELETED event. Guest reset will automatically complete removal
2458 #        for all devices.
2460 # Since: 0.14.0
2462 { 'command': 'device_del', 'data': {'id': 'str'} }
2465 # @dump-guest-memory
2467 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2468 # very long depending on the amount of guest memory. This command is only
2469 # supported on i386 and x86_64.
2471 # @paging: if true, do paging to get guest's memory mapping. This allows
2472 #          using gdb to process the core file.
2474 #          IMPORTANT: this option can make QEMU allocate several gigabytes
2475 #                     of RAM. This can happen for a large guest, or a
2476 #                     malicious guest pretending to be large.
2478 #          Also, paging=true has the following limitations:
2480 #             1. The guest may be in a catastrophic state or can have corrupted
2481 #                memory, which cannot be trusted
2482 #             2. The guest can be in real-mode even if paging is enabled. For
2483 #                example, the guest uses ACPI to sleep, and ACPI sleep state
2484 #                goes in real-mode
2486 # @protocol: the filename or file descriptor of the vmcore. The supported
2487 #            protocols are:
2489 #            1. file: the protocol starts with "file:", and the following
2490 #               string is the file's path.
2491 #            2. fd: the protocol starts with "fd:", and the following string
2492 #               is the fd's name.
2494 # @begin: #optional if specified, the starting physical address.
2496 # @length: #optional if specified, the memory size, in bytes. If you don't
2497 #          want to dump all guest's memory, please specify the start @begin
2498 #          and @length
2500 # Returns: nothing on success
2502 # Since: 1.2
2504 { 'command': 'dump-guest-memory',
2505   'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2506             '*length': 'int' } }
2509 # @netdev_add:
2511 # Add a network backend.
2513 # @type: the type of network backend.  Current valid values are 'user', 'tap',
2514 #        'vde', 'socket', 'dump' and 'bridge'
2516 # @id: the name of the new network backend
2518 # @props: #optional a list of properties to be passed to the backend in
2519 #         the format 'name=value', like 'ifname=tap0,script=no'
2521 # Notes: The semantics of @props is not well defined.  Future commands will be
2522 #        introduced that provide stronger typing for backend creation.
2524 # Since: 0.14.0
2526 # Returns: Nothing on success
2527 #          If @type is not a valid network backend, DeviceNotFound
2529 { 'command': 'netdev_add',
2530   'data': {'type': 'str', 'id': 'str', '*props': '**'},
2531   'gen': 'no' }
2534 # @netdev_del:
2536 # Remove a network backend.
2538 # @id: the name of the network backend to remove
2540 # Returns: Nothing on success
2541 #          If @id is not a valid network backend, DeviceNotFound
2543 # Since: 0.14.0
2545 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2548 # @NetdevNoneOptions
2550 # Use it alone to have zero network devices.
2552 # Since 1.2
2554 { 'type': 'NetdevNoneOptions',
2555   'data': { } }
2558 # @NetLegacyNicOptions
2560 # Create a new Network Interface Card.
2562 # @netdev: #optional id of -netdev to connect to
2564 # @macaddr: #optional MAC address
2566 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2568 # @addr: #optional PCI device address
2570 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2572 # Since 1.2
2574 { 'type': 'NetLegacyNicOptions',
2575   'data': {
2576     '*netdev':  'str',
2577     '*macaddr': 'str',
2578     '*model':   'str',
2579     '*addr':    'str',
2580     '*vectors': 'uint32' } }
2583 # @String
2585 # A fat type wrapping 'str', to be embedded in lists.
2587 # Since 1.2
2589 { 'type': 'String',
2590   'data': {
2591     'str': 'str' } }
2594 # @NetdevUserOptions
2596 # Use the user mode network stack which requires no administrator privilege to
2597 # run.
2599 # @hostname: #optional client hostname reported by the builtin DHCP server
2601 # @restrict: #optional isolate the guest from the host
2603 # @ip: #optional legacy parameter, use net= instead
2605 # @net: #optional IP address and optional netmask
2607 # @host: #optional guest-visible address of the host
2609 # @tftp: #optional root directory of the built-in TFTP server
2611 # @bootfile: #optional BOOTP filename, for use with tftp=
2613 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2614 #             assign
2616 # @dns: #optional guest-visible address of the virtual nameserver
2618 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2619 #             to the guest
2621 # @smb: #optional root directory of the built-in SMB server
2623 # @smbserver: #optional IP address of the built-in SMB server
2625 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2626 #           endpoints
2628 # @guestfwd: #optional forward guest TCP connections
2630 # Since 1.2
2632 { 'type': 'NetdevUserOptions',
2633   'data': {
2634     '*hostname':  'str',
2635     '*restrict':  'bool',
2636     '*ip':        'str',
2637     '*net':       'str',
2638     '*host':      'str',
2639     '*tftp':      'str',
2640     '*bootfile':  'str',
2641     '*dhcpstart': 'str',
2642     '*dns':       'str',
2643     '*dnssearch': ['String'],
2644     '*smb':       'str',
2645     '*smbserver': 'str',
2646     '*hostfwd':   ['String'],
2647     '*guestfwd':  ['String'] } }
2650 # @NetdevTapOptions
2652 # Connect the host TAP network interface name to the VLAN.
2654 # @ifname: #optional interface name
2656 # @fd: #optional file descriptor of an already opened tap
2658 # @fds: #optional multiple file descriptors of already opened multiqueue capable
2659 # tap
2661 # @script: #optional script to initialize the interface
2663 # @downscript: #optional script to shut down the interface
2665 # @helper: #optional command to execute to configure bridge
2667 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2669 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2671 # @vhost: #optional enable vhost-net network accelerator
2673 # @vhostfd: #optional file descriptor of an already opened vhost net device
2675 # @vhostfds: #optional file descriptors of multiple already opened vhost net
2676 # devices
2678 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2680 # @queues: #optional number of queues to be created for multiqueue capable tap
2682 # Since 1.2
2684 { 'type': 'NetdevTapOptions',
2685   'data': {
2686     '*ifname':     'str',
2687     '*fd':         'str',
2688     '*fds':        'str',
2689     '*script':     'str',
2690     '*downscript': 'str',
2691     '*helper':     'str',
2692     '*sndbuf':     'size',
2693     '*vnet_hdr':   'bool',
2694     '*vhost':      'bool',
2695     '*vhostfd':    'str',
2696     '*vhostfds':   'str',
2697     '*vhostforce': 'bool',
2698     '*queues':     'uint32'} }
2701 # @NetdevSocketOptions
2703 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2704 # socket connection.
2706 # @fd: #optional file descriptor of an already opened socket
2708 # @listen: #optional port number, and optional hostname, to listen on
2710 # @connect: #optional port number, and optional hostname, to connect to
2712 # @mcast: #optional UDP multicast address and port number
2714 # @localaddr: #optional source address and port for multicast and udp packets
2716 # @udp: #optional UDP unicast address and port number
2718 # Since 1.2
2720 { 'type': 'NetdevSocketOptions',
2721   'data': {
2722     '*fd':        'str',
2723     '*listen':    'str',
2724     '*connect':   'str',
2725     '*mcast':     'str',
2726     '*localaddr': 'str',
2727     '*udp':       'str' } }
2730 # @NetdevVdeOptions
2732 # Connect the VLAN to a vde switch running on the host.
2734 # @sock: #optional socket path
2736 # @port: #optional port number
2738 # @group: #optional group owner of socket
2740 # @mode: #optional permissions for socket
2742 # Since 1.2
2744 { 'type': 'NetdevVdeOptions',
2745   'data': {
2746     '*sock':  'str',
2747     '*port':  'uint16',
2748     '*group': 'str',
2749     '*mode':  'uint16' } }
2752 # @NetdevDumpOptions
2754 # Dump VLAN network traffic to a file.
2756 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2757 # suffixes.
2759 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2761 # Since 1.2
2763 { 'type': 'NetdevDumpOptions',
2764   'data': {
2765     '*len':  'size',
2766     '*file': 'str' } }
2769 # @NetdevBridgeOptions
2771 # Connect a host TAP network interface to a host bridge device.
2773 # @br: #optional bridge name
2775 # @helper: #optional command to execute to configure bridge
2777 # Since 1.2
2779 { 'type': 'NetdevBridgeOptions',
2780   'data': {
2781     '*br':     'str',
2782     '*helper': 'str' } }
2785 # @NetdevHubPortOptions
2787 # Connect two or more net clients through a software hub.
2789 # @hubid: hub identifier number
2791 # Since 1.2
2793 { 'type': 'NetdevHubPortOptions',
2794   'data': {
2795     'hubid':     'int32' } }
2798 # @NetClientOptions
2800 # A discriminated record of network device traits.
2802 # Since 1.2
2804 { 'union': 'NetClientOptions',
2805   'data': {
2806     'none':     'NetdevNoneOptions',
2807     'nic':      'NetLegacyNicOptions',
2808     'user':     'NetdevUserOptions',
2809     'tap':      'NetdevTapOptions',
2810     'socket':   'NetdevSocketOptions',
2811     'vde':      'NetdevVdeOptions',
2812     'dump':     'NetdevDumpOptions',
2813     'bridge':   'NetdevBridgeOptions',
2814     'hubport':  'NetdevHubPortOptions' } }
2817 # @NetLegacy
2819 # Captures the configuration of a network device; legacy.
2821 # @vlan: #optional vlan number
2823 # @id: #optional identifier for monitor commands
2825 # @name: #optional identifier for monitor commands, ignored if @id is present
2827 # @opts: device type specific properties (legacy)
2829 # Since 1.2
2831 { 'type': 'NetLegacy',
2832   'data': {
2833     '*vlan': 'int32',
2834     '*id':   'str',
2835     '*name': 'str',
2836     'opts':  'NetClientOptions' } }
2839 # @Netdev
2841 # Captures the configuration of a network device.
2843 # @id: identifier for monitor commands.
2845 # @opts: device type specific properties
2847 # Since 1.2
2849 { 'type': 'Netdev',
2850   'data': {
2851     'id':   'str',
2852     'opts': 'NetClientOptions' } }
2855 # @InetSocketAddress
2857 # Captures a socket address or address range in the Internet namespace.
2859 # @host: host part of the address
2861 # @port: port part of the address, or lowest port if @to is present
2863 # @to: highest port to try
2865 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2866 #        #optional
2868 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2869 #        #optional
2871 # Since 1.3
2873 { 'type': 'InetSocketAddress',
2874   'data': {
2875     'host': 'str',
2876     'port': 'str',
2877     '*to': 'uint16',
2878     '*ipv4': 'bool',
2879     '*ipv6': 'bool' } }
2882 # @UnixSocketAddress
2884 # Captures a socket address in the local ("Unix socket") namespace.
2886 # @path: filesystem path to use
2888 # Since 1.3
2890 { 'type': 'UnixSocketAddress',
2891   'data': {
2892     'path': 'str' } }
2895 # @SocketAddress
2897 # Captures the address of a socket, which could also be a named file descriptor
2899 # Since 1.3
2901 { 'union': 'SocketAddress',
2902   'data': {
2903     'inet': 'InetSocketAddress',
2904     'unix': 'UnixSocketAddress',
2905     'fd': 'String' } }
2908 # @getfd:
2910 # Receive a file descriptor via SCM rights and assign it a name
2912 # @fdname: file descriptor name
2914 # Returns: Nothing on success
2916 # Since: 0.14.0
2918 # Notes: If @fdname already exists, the file descriptor assigned to
2919 #        it will be closed and replaced by the received file
2920 #        descriptor.
2921 #        The 'closefd' command can be used to explicitly close the
2922 #        file descriptor when it is no longer needed.
2924 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2927 # @closefd:
2929 # Close a file descriptor previously passed via SCM rights
2931 # @fdname: file descriptor name
2933 # Returns: Nothing on success
2935 # Since: 0.14.0
2937 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2940 # @MachineInfo:
2942 # Information describing a machine.
2944 # @name: the name of the machine
2946 # @alias: #optional an alias for the machine name
2948 # @default: #optional whether the machine is default
2950 # @cpu-max: maximum number of CPUs supported by the machine type
2951 #           (since 1.5.0)
2953 # Since: 1.2.0
2955 { 'type': 'MachineInfo',
2956   'data': { 'name': 'str', '*alias': 'str',
2957             '*is-default': 'bool', 'cpu-max': 'int' } }
2960 # @query-machines:
2962 # Return a list of supported machines
2964 # Returns: a list of MachineInfo
2966 # Since: 1.2.0
2968 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2971 # @CpuDefinitionInfo:
2973 # Virtual CPU definition.
2975 # @name: the name of the CPU definition
2977 # Since: 1.2.0
2979 { 'type': 'CpuDefinitionInfo',
2980   'data': { 'name': 'str' } }
2983 # @query-cpu-definitions:
2985 # Return a list of supported virtual CPU definitions
2987 # Returns: a list of CpuDefInfo
2989 # Since: 1.2.0
2991 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2993 # @AddfdInfo:
2995 # Information about a file descriptor that was added to an fd set.
2997 # @fdset-id: The ID of the fd set that @fd was added to.
2999 # @fd: The file descriptor that was received via SCM rights and
3000 #      added to the fd set.
3002 # Since: 1.2.0
3004 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3007 # @add-fd:
3009 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3011 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3013 # @opaque: #optional A free-form string that can be used to describe the fd.
3015 # Returns: @AddfdInfo on success
3016 #          If file descriptor was not received, FdNotSupplied
3017 #          If @fdset-id is a negative value, InvalidParameterValue
3019 # Notes: The list of fd sets is shared by all monitor connections.
3021 #        If @fdset-id is not specified, a new fd set will be created.
3023 # Since: 1.2.0
3025 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3026   'returns': 'AddfdInfo' }
3029 # @remove-fd:
3031 # Remove a file descriptor from an fd set.
3033 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3035 # @fd: #optional The file descriptor that is to be removed.
3037 # Returns: Nothing on success
3038 #          If @fdset-id or @fd is not found, FdNotFound
3040 # Since: 1.2.0
3042 # Notes: The list of fd sets is shared by all monitor connections.
3044 #        If @fd is not specified, all file descriptors in @fdset-id
3045 #        will be removed.
3047 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3050 # @FdsetFdInfo:
3052 # Information about a file descriptor that belongs to an fd set.
3054 # @fd: The file descriptor value.
3056 # @opaque: #optional A free-form string that can be used to describe the fd.
3058 # Since: 1.2.0
3060 { 'type': 'FdsetFdInfo',
3061   'data': {'fd': 'int', '*opaque': 'str'} }
3064 # @FdsetInfo:
3066 # Information about an fd set.
3068 # @fdset-id: The ID of the fd set.
3070 # @fds: A list of file descriptors that belong to this fd set.
3072 # Since: 1.2.0
3074 { 'type': 'FdsetInfo',
3075   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3078 # @query-fdsets:
3080 # Return information describing all fd sets.
3082 # Returns: A list of @FdsetInfo
3084 # Since: 1.2.0
3086 # Note: The list of fd sets is shared by all monitor connections.
3089 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3092 # @TargetInfo:
3094 # Information describing the QEMU target.
3096 # @arch: the target architecture (eg "x86_64", "i386", etc)
3098 # Since: 1.2.0
3100 { 'type': 'TargetInfo',
3101   'data': { 'arch': 'str' } }
3104 # @query-target:
3106 # Return information about the target for this QEMU
3108 # Returns: TargetInfo
3110 # Since: 1.2.0
3112 { 'command': 'query-target', 'returns': 'TargetInfo' }
3115 # @QKeyCode:
3117 # An enumeration of key name.
3119 # This is used by the send-key command.
3121 # Since: 1.3.0
3123 { 'enum': 'QKeyCode',
3124   'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3125             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3126             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3127             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3128             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3129             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3130             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3131             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3132             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3133             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3134             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3135             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3136             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3137             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3138              'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
3141 # @KeyValue
3143 # Represents a keyboard key.
3145 # Since: 1.3.0
3147 { 'union': 'KeyValue',
3148   'data': {
3149     'number': 'int',
3150     'qcode': 'QKeyCode' } }
3153 # @send-key:
3155 # Send keys to guest.
3157 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3158 #        simultaneously sent to the guest. A @KeyValue.number value is sent
3159 #        directly to the guest, while @KeyValue.qcode must be a valid
3160 #        @QKeyCode value
3162 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3163 #             to 100
3165 # Returns: Nothing on success
3166 #          If key is unknown or redundant, InvalidParameter
3168 # Since: 1.3.0
3171 { 'command': 'send-key',
3172   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3175 # @screendump:
3177 # Write a PPM of the VGA screen to a file.
3179 # @filename: the path of a new PPM file to store the image
3181 # Returns: Nothing on success
3183 # Since: 0.14.0
3185 { 'command': 'screendump', 'data': {'filename': 'str'} }
3188 # @nbd-server-start:
3190 # Start an NBD server listening on the given host and port.  Block
3191 # devices can then be exported using @nbd-server-add.  The NBD
3192 # server will present them as named exports; for example, another
3193 # QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
3195 # @addr: Address on which to listen.
3197 # Returns: error if the server is already running.
3199 # Since: 1.3.0
3201 { 'command': 'nbd-server-start',
3202   'data': { 'addr': 'SocketAddress' } }
3205 # @nbd-server-add:
3207 # Export a device to QEMU's embedded NBD server.
3209 # @device: Block device to be exported
3211 # @writable: Whether clients should be able to write to the device via the
3212 #     NBD connection (default false). #optional
3214 # Returns: error if the device is already marked for export.
3216 # Since: 1.3.0
3218 { 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3221 # @nbd-server-stop:
3223 # Stop QEMU's embedded NBD server, and unregister all devices previously
3224 # added via @nbd-server-add.
3226 # Since: 1.3.0
3228 { 'command': 'nbd-server-stop' }
3231 # @ChardevFile:
3233 # Configuration info for file chardevs.
3235 # @in:  #optional The name of the input file
3236 # @out: The name of the output file
3238 # Since: 1.4
3240 { 'type': 'ChardevFile', 'data': { '*in' : 'str',
3241                                    'out' : 'str' } }
3244 # @ChardevHostdev:
3246 # Configuration info for device and pipe chardevs.
3248 # @device: The name of the special file for the device,
3249 #          i.e. /dev/ttyS0 on Unix or COM1: on Windows
3250 # @type: What kind of device this is.
3252 # Since: 1.4
3254 { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
3257 # @ChardevSocket:
3259 # Configuration info for (stream) socket chardevs.
3261 # @addr: socket address to listen on (server=true)
3262 #        or connect to (server=false)
3263 # @server: #optional create server socket (default: true)
3264 # @wait: #optional wait for incoming connection on server
3265 #        sockets (default: false).
3266 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3267 # @telnet: #optional enable telnet protocol on server
3268 #          sockets (default: false)
3270 # Since: 1.4
3272 { 'type': 'ChardevSocket', 'data': { 'addr'     : 'SocketAddress',
3273                                      '*server'  : 'bool',
3274                                      '*wait'    : 'bool',
3275                                      '*nodelay' : 'bool',
3276                                      '*telnet'  : 'bool' } }
3279 # @ChardevUdp:
3281 # Configuration info for datagram socket chardevs.
3283 # @remote: remote address
3284 # @local: #optional local address
3286 # Since: 1.5
3288 { 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3289                                   '*local' : 'SocketAddress' } }
3292 # @ChardevMux:
3294 # Configuration info for mux chardevs.
3296 # @chardev: name of the base chardev.
3298 # Since: 1.5
3300 { 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
3303 # @ChardevStdio:
3305 # Configuration info for stdio chardevs.
3307 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3308 #          be delivered to qemu.  Default: true in -nographic mode,
3309 #          false otherwise.
3311 # Since: 1.5
3313 { 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
3316 # @ChardevSpiceChannel:
3318 # Configuration info for spice vm channel chardevs.
3320 # @type: kind of channel (for example vdagent).
3322 # Since: 1.5
3324 { 'type': 'ChardevSpiceChannel', 'data': { 'type'  : 'str' } }
3327 # @ChardevSpicePort:
3329 # Configuration info for spice port chardevs.
3331 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3333 # Since: 1.5
3335 { 'type': 'ChardevSpicePort', 'data': { 'fqdn'  : 'str' } }
3338 # @ChardevVC:
3340 # Configuration info for virtual console chardevs.
3342 # @width:  console width,  in pixels
3343 # @height: console height, in pixels
3344 # @cols:   console width,  in chars
3345 # @rows:   console height, in chars
3347 # Since: 1.5
3349 { 'type': 'ChardevVC', 'data': { '*width'  : 'int',
3350                                  '*height' : 'int',
3351                                  '*cols'   : 'int',
3352                                  '*rows'   : 'int' } }
3355 # @ChardevMemory:
3357 # Configuration info for memory chardevs
3359 # @size: #optional Ringbuffer size, must be power of two, default is 65536
3361 # Since: 1.5
3363 { 'type': 'ChardevMemory', 'data': { '*size'  : 'int' } }
3366 # @ChardevBackend:
3368 # Configuration info for the new chardev backend.
3370 # Since: 1.4
3372 { 'type': 'ChardevDummy', 'data': { } }
3374 { 'union': 'ChardevBackend', 'data': { 'file'   : 'ChardevFile',
3375                                        'serial' : 'ChardevHostdev',
3376                                        'parallel': 'ChardevHostdev',
3377                                        'pipe'   : 'ChardevHostdev',
3378                                        'socket' : 'ChardevSocket',
3379                                        'udp'    : 'ChardevUdp',
3380                                        'pty'    : 'ChardevDummy',
3381                                        'null'   : 'ChardevDummy',
3382                                        'mux'    : 'ChardevMux',
3383                                        'msmouse': 'ChardevDummy',
3384                                        'braille': 'ChardevDummy',
3385                                        'stdio'  : 'ChardevStdio',
3386                                        'console': 'ChardevDummy',
3387                                        'spicevmc' : 'ChardevSpiceChannel',
3388                                        'spiceport' : 'ChardevSpicePort',
3389                                        'vc'     : 'ChardevVC',
3390                                        'memory' : 'ChardevMemory' } }
3393 # @ChardevReturn:
3395 # Return info about the chardev backend just created.
3397 # @pty: #optional name of the slave pseudoterminal device, present if
3398 #       and only if a chardev of type 'pty' was created
3400 # Since: 1.4
3402 { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3405 # @chardev-add:
3407 # Add a character device backend
3409 # @id: the chardev's ID, must be unique
3410 # @backend: backend type and parameters
3412 # Returns: ChardevReturn.
3414 # Since: 1.4
3416 { 'command': 'chardev-add', 'data': {'id'      : 'str',
3417                                      'backend' : 'ChardevBackend' },
3418   'returns': 'ChardevReturn' }
3421 # @chardev-remove:
3423 # Remove a character device backend
3425 # @id: the chardev's ID, must exist and not be in use
3427 # Returns: Nothing on success
3429 # Since: 1.4
3431 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3434 # @TpmModel:
3436 # An enumeration of TPM models
3438 # @tpm-tis: TPM TIS model
3440 # Since: 1.5
3442 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3445 # @query-tpm-models:
3447 # Return a list of supported TPM models
3449 # Returns: a list of TpmModel
3451 # Since: 1.5
3453 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3456 # @TpmType:
3458 # An enumeration of TPM types
3460 # @passthrough: TPM passthrough type
3462 # Since: 1.5
3464 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3467 # @query-tpm-types:
3469 # Return a list of supported TPM types
3471 # Returns: a list of TpmType
3473 # Since: 1.5
3475 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3478 # @TPMPassthroughOptions:
3480 # Information about the TPM passthrough type
3482 # @path: #optional string describing the path used for accessing the TPM device
3484 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3485 #               for cancellation of TPM commands while they are executing
3487 # Since: 1.5
3489 { 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3490                                              '*cancel-path' : 'str'} }
3493 # @TpmTypeOptions:
3495 # A union referencing different TPM backend types' configuration options
3497 # @passthrough: The configuration options for the TPM passthrough type
3499 # Since: 1.5
3501 { 'union': 'TpmTypeOptions',
3502    'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3505 # @TpmInfo:
3507 # Information about the TPM
3509 # @id: The Id of the TPM
3511 # @model: The TPM frontend model
3513 # @options: The TPM (backend) type configuration options
3515 # Since: 1.5
3517 { 'type': 'TPMInfo',
3518   'data': {'id': 'str',
3519            'model': 'TpmModel',
3520            'options': 'TpmTypeOptions' } }
3523 # @query-tpm:
3525 # Return information about the TPM device
3527 # Returns: @TPMInfo on success
3529 # Since: 1.5
3531 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
3534 # @AcpiTableOptions
3536 # Specify an ACPI table on the command line to load.
3538 # At most one of @file and @data can be specified. The list of files specified
3539 # by any one of them is loaded and concatenated in order. If both are omitted,
3540 # @data is implied.
3542 # Other fields / optargs can be used to override fields of the generic ACPI
3543 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
3544 # Description Table Header. If a header field is not overridden, then the
3545 # corresponding value from the concatenated blob is used (in case of @file), or
3546 # it is filled in with a hard-coded value (in case of @data).
3548 # String fields are copied into the matching ACPI member from lowest address
3549 # upwards, and silently truncated / NUL-padded to length.
3551 # @sig: #optional table signature / identifier (4 bytes)
3553 # @rev: #optional table revision number (dependent on signature, 1 byte)
3555 # @oem_id: #optional OEM identifier (6 bytes)
3557 # @oem_table_id: #optional OEM table identifier (8 bytes)
3559 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
3561 # @asl_compiler_id: #optional identifier of the utility that created the table
3562 #                   (4 bytes)
3564 # @asl_compiler_rev: #optional revision number of the utility that created the
3565 #                    table (4 bytes)
3567 # @file: #optional colon (:) separated list of pathnames to load and
3568 #        concatenate as table data. The resultant binary blob is expected to
3569 #        have an ACPI table header. At least one file is required. This field
3570 #        excludes @data.
3572 # @data: #optional colon (:) separated list of pathnames to load and
3573 #        concatenate as table data. The resultant binary blob must not have an
3574 #        ACPI table header. At least one file is required. This field excludes
3575 #        @file.
3577 # Since 1.5
3579 { 'type': 'AcpiTableOptions',
3580   'data': {
3581     '*sig':               'str',
3582     '*rev':               'uint8',
3583     '*oem_id':            'str',
3584     '*oem_table_id':      'str',
3585     '*oem_rev':           'uint32',
3586     '*asl_compiler_id':   'str',
3587     '*asl_compiler_rev':  'uint32',
3588     '*file':              'str',
3589     '*data':              'str' }}
3592 # @CommandLineParameterType:
3594 # Possible types for an option parameter.
3596 # @string: accepts a character string
3598 # @boolean: accepts "on" or "off"
3600 # @number: accepts a number
3602 # @size: accepts a number followed by an optional suffix (K)ilo,
3603 #        (M)ega, (G)iga, (T)era
3605 # Since 1.5
3607 { 'enum': 'CommandLineParameterType',
3608   'data': ['string', 'boolean', 'number', 'size'] }
3611 # @CommandLineParameterInfo:
3613 # Details about a single parameter of a command line option.
3615 # @name: parameter name
3617 # @type: parameter @CommandLineParameterType
3619 # @help: #optional human readable text string, not suitable for parsing.
3621 # Since 1.5
3623 { 'type': 'CommandLineParameterInfo',
3624   'data': { 'name': 'str',
3625             'type': 'CommandLineParameterType',
3626             '*help': 'str' } }
3629 # @CommandLineOptionInfo:
3631 # Details about a command line option, including its list of parameter details
3633 # @option: option name
3635 # @parameters: an array of @CommandLineParameterInfo
3637 # Since 1.5
3639 { 'type': 'CommandLineOptionInfo',
3640   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
3643 # @query-command-line-options:
3645 # Query command line option schema.
3647 # @option: #optional option name
3649 # Returns: list of @CommandLineOptionInfo for all options (or for the given
3650 #          @option).  Returns an error if the given @option doesn't exist.
3652 # Since 1.5
3654 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
3655  'returns': ['CommandLineOptionInfo'] }
3658 # @X86CPURegister32
3660 # A X86 32-bit register
3662 # Since: 1.5
3664 { 'enum': 'X86CPURegister32',
3665   'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
3668 # @X86CPUFeatureWordInfo
3670 # Information about a X86 CPU feature word
3672 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
3674 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
3675 #                   feature word
3677 # @cpuid-register: Output register containing the feature bits
3679 # @features: value of output register, containing the feature bits
3681 # Since: 1.5
3683 { 'type': 'X86CPUFeatureWordInfo',
3684   'data': { 'cpuid-input-eax': 'int',
3685             '*cpuid-input-ecx': 'int',
3686             'cpuid-register': 'X86CPURegister32',
3687             'features': 'int' } }
3690 # @RxState:
3692 # Packets receiving state
3694 # @normal: filter assigned packets according to the mac-table
3696 # @none: don't receive any assigned packet
3698 # @all: receive all assigned packets
3700 # Since: 1.6
3702 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
3705 # @RxFilterInfo:
3707 # Rx-filter information for a NIC.
3709 # @name: net client name
3711 # @promiscuous: whether promiscuous mode is enabled
3713 # @multicast: multicast receive state
3715 # @unicast: unicast receive state
3717 # @broadcast-allowed: whether to receive broadcast
3719 # @multicast-overflow: multicast table is overflowed or not
3721 # @unicast-overflow: unicast table is overflowed or not
3723 # @main-mac: the main macaddr string
3725 # @vlan-table: a list of active vlan id
3727 # @unicast-table: a list of unicast macaddr string
3729 # @multicast-table: a list of multicast macaddr string
3731 # Since 1.6
3734 { 'type': 'RxFilterInfo',
3735   'data': {
3736     'name':               'str',
3737     'promiscuous':        'bool',
3738     'multicast':          'RxState',
3739     'unicast':            'RxState',
3740     'broadcast-allowed':  'bool',
3741     'multicast-overflow': 'bool',
3742     'unicast-overflow':   'bool',
3743     'main-mac':           'str',
3744     'vlan-table':         ['int'],
3745     'unicast-table':      ['str'],
3746     'multicast-table':    ['str'] }}
3749 # @query-rx-filter:
3751 # Return rx-filter information for all NICs (or for the given NIC).
3753 # @name: #optional net client name
3755 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
3756 #          Returns an error if the given @name doesn't exist, or given
3757 #          NIC doesn't support rx-filter querying, or given net client
3758 #          isn't a NIC.
3760 # Since: 1.6
3762 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
3763   'returns': ['RxFilterInfo'] }