hw/qxl.c: qxl_phys2virt: replace panics with guest_bug
[qemu/ar7.git] / qapi-schema.json
blob4279259bc171de5ca3ad738a1bb91dd58e1482d6
1 # -*- Mode: Python -*-
3 # QAPI Schema
5 ##
6 # @NameInfo:
8 # Guest name information.
10 # @name: #optional The name of the guest
12 # Since 0.14.0
14 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
17 # @query-name:
19 # Return the name information of a guest.
21 # Returns: @NameInfo of the guest
23 # Since 0.14.0
25 { 'command': 'query-name', 'returns': 'NameInfo' }
28 # @VersionInfo:
30 # A description of QEMU's version.
32 # @qemu.major:  The major version of QEMU
34 # @qemu.minor:  The minor version of QEMU
36 # @qemu.micro:  The micro version of QEMU.  By current convention, a micro
37 #               version of 50 signifies a development branch.  A micro version
38 #               greater than or equal to 90 signifies a release candidate for
39 #               the next minor version.  A micro version of less than 50
40 #               signifies a stable release.
42 # @package:     QEMU will always set this field to an empty string.  Downstream
43 #               versions of QEMU should set this to a non-empty string.  The
44 #               exact format depends on the downstream however it highly
45 #               recommended that a unique name is used.
47 # Since: 0.14.0
49 { 'type': 'VersionInfo',
50   'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
51            'package': 'str'} }
54 # @query-version:
56 # Returns the current version of QEMU.
58 # Returns:  A @VersionInfo object describing the current version of QEMU.
60 # Since: 0.14.0
62 { 'command': 'query-version', 'returns': 'VersionInfo' }
65 # @KvmInfo:
67 # Information about support for KVM acceleration
69 # @enabled: true if KVM acceleration is active
71 # @present: true if KVM acceleration is built into this executable
73 # Since: 0.14.0
75 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
78 # @query-kvm:
80 # Returns information about KVM acceleration
82 # Returns: @KvmInfo
84 # Since: 0.14.0
86 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
89 # @RunState
91 # An enumation of VM run states.
93 # @debug: QEMU is running on a debugger
95 # @inmigrate: guest is paused waiting for an incoming migration
97 # @internal-error: An internal error that prevents further guest execution
98 # has occurred
100 # @io-error: the last IOP has failed and the device is configured to pause
101 # on I/O errors
103 # @paused: guest has been paused via the 'stop' command
105 # @postmigrate: guest is paused following a successful 'migrate'
107 # @prelaunch: QEMU was started with -S and guest has not started
109 # @finish-migrate: guest is paused to finish the migration process
111 # @restore-vm: guest is paused to restore VM state
113 # @running: guest is actively running
115 # @save-vm: guest is paused to save the VM state
117 # @shutdown: guest is shut down (and -no-shutdown is in use)
119 # @watchdog: the watchdog action is configured to pause and has been triggered
121 { 'enum': 'RunState',
122   'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
123             'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
124             'running', 'save-vm', 'shutdown', 'watchdog' ] }
127 # @StatusInfo:
129 # Information about VCPU run state
131 # @running: true if all VCPUs are runnable, false if not runnable
133 # @singlestep: true if VCPUs are in single-step mode
135 # @status: the virtual machine @RunState
137 # Since:  0.14.0
139 # Notes: @singlestep is enabled through the GDB stub
141 { 'type': 'StatusInfo',
142   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
145 # @query-status:
147 # Query the run status of all VCPUs
149 # Returns: @StatusInfo reflecting all VCPUs
151 # Since:  0.14.0
153 { 'command': 'query-status', 'returns': 'StatusInfo' }
156 # @UuidInfo:
158 # Guest UUID information.
160 # @UUID: the UUID of the guest
162 # Since: 0.14.0
164 # Notes: If no UUID was specified for the guest, a null UUID is returned.
166 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
169 # @query-uuid:
171 # Query the guest UUID information.
173 # Returns: The @UuidInfo for the guest
175 # Since 0.14.0
177 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
180 # @ChardevInfo:
182 # Information about a character device.
184 # @label: the label of the character device
186 # @filename: the filename of the character device
188 # Notes: @filename is encoded using the QEMU command line character device
189 #        encoding.  See the QEMU man page for details.
191 # Since: 0.14.0
193 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
196 # @query-chardev:
198 # Returns information about current character devices.
200 # Returns: a list of @ChardevInfo
202 # Since: 0.14.0
204 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
207 # @CommandInfo:
209 # Information about a QMP command
211 # @name: The command name
213 # Since: 0.14.0
215 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
218 # @query-commands:
220 # Return a list of supported QMP commands by this server
222 # Returns: A list of @CommandInfo for all supported commands
224 # Since: 0.14.0
226 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
229 # @MigrationStats
231 # Detailed migration status.
233 # @transferred: amount of bytes already transferred to the target VM
235 # @remaining: amount of bytes remaining to be transferred to the target VM
237 # @total: total amount of bytes involved in the migration process
239 # Since: 0.14.0.
241 { 'type': 'MigrationStats',
242   'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' } }
245 # @MigrationInfo
247 # Information about current migration process.
249 # @status: #optional string describing the current migration status.
250 #          As of 0.14.0 this can be 'active', 'completed', 'failed' or
251 #          'cancelled'. If this field is not returned, no migration process
252 #          has been initiated
254 # @ram: #optional @MigrationStats containing detailed migration status,
255 #       only returned if status is 'active'
257 # @disk: #optional @MigrationStats containing detailed disk migration
258 #        status, only returned if status is 'active' and it is a block
259 #        migration
261 # Since: 0.14.0
263 { 'type': 'MigrationInfo',
264   'data': {'*status': 'str', '*ram': 'MigrationStats',
265            '*disk': 'MigrationStats'} }
268 # @query-migrate
270 # Returns information about current migration process.
272 # Returns: @MigrationInfo
274 # Since: 0.14.0
276 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
279 # @MouseInfo:
281 # Information about a mouse device.
283 # @name: the name of the mouse device
285 # @index: the index of the mouse device
287 # @current: true if this device is currently receiving mouse events
289 # @absolute: true if this device supports absolute coordinates as input
291 # Since: 0.14.0
293 { 'type': 'MouseInfo',
294   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
295            'absolute': 'bool'} }
298 # @query-mice:
300 # Returns information about each active mouse device
302 # Returns: a list of @MouseInfo for each device
304 # Since: 0.14.0
306 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
309 # @CpuInfo:
311 # Information about a virtual CPU
313 # @CPU: the index of the virtual CPU
315 # @current: this only exists for backwards compatible and should be ignored
317 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
318 #          to a processor specific low power mode.
320 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
321 #                pointer.
322 #                If the target is Sparc, this is the PC component of the
323 #                instruction pointer.
325 # @nip: #optional If the target is PPC, the instruction pointer
327 # @npc: #optional If the target is Sparc, the NPC component of the instruction
328 #                 pointer
330 # @PC: #optional If the target is MIPS, the instruction pointer
332 # @thread_id: ID of the underlying host thread
334 # Since: 0.14.0
336 # Notes: @halted is a transient state that changes frequently.  By the time the
337 #        data is sent to the client, the guest may no longer be halted.
339 { 'type': 'CpuInfo',
340   'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
341            '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
344 # @query-cpus:
346 # Returns a list of information about each virtual CPU.
348 # Returns: a list of @CpuInfo for each virtual CPU
350 # Since: 0.14.0
352 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
355 # @BlockDeviceInfo:
357 # Information about the backing device for a block device.
359 # @file: the filename of the backing device
361 # @ro: true if the backing device was open read-only
363 # @drv: the name of the block format used to open the backing device. As of
364 #       0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
365 #       'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
366 #       'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
367 #       'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
369 # @backing_file: #optional the name of the backing file (for copy-on-write)
371 # @encrypted: true if the backing device is encrypted
373 # @bps: total throughput limit in bytes per second is specified
375 # @bps_rd: read throughput limit in bytes per second is specified
377 # @bps_wr: write throughput limit in bytes per second is specified
379 # @iops: total I/O operations per second is specified
381 # @iops_rd: read I/O operations per second is specified
383 # @iops_wr: write I/O operations per second is specified
385 # Since: 0.14.0
387 # Notes: This interface is only found in @BlockInfo.
389 { 'type': 'BlockDeviceInfo',
390   'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
391             '*backing_file': 'str', 'encrypted': 'bool',
392             'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
393             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} }
396 # @BlockDeviceIoStatus:
398 # An enumeration of block device I/O status.
400 # @ok: The last I/O operation has succeeded
402 # @failed: The last I/O operation has failed
404 # @nospace: The last I/O operation has failed due to a no-space condition
406 # Since: 1.0
408 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
411 # @BlockInfo:
413 # Block device information.  This structure describes a virtual device and
414 # the backing device associated with it.
416 # @device: The device name associated with the virtual device.
418 # @type: This field is returned only for compatibility reasons, it should
419 #        not be used (always returns 'unknown')
421 # @removable: True if the device supports removable media.
423 # @locked: True if the guest has locked this device from having its media
424 #          removed
426 # @tray_open: #optional True if the device has a tray and it is open
427 #             (only present if removable is true)
429 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
430 #             supports it and the VM is configured to stop on errors
432 # @inserted: #optional @BlockDeviceInfo describing the device if media is
433 #            present
435 # Since:  0.14.0
437 { 'type': 'BlockInfo',
438   'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
439            'locked': 'bool', '*inserted': 'BlockDeviceInfo',
440            '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} }
443 # @query-block:
445 # Get a list of BlockInfo for all virtual block devices.
447 # Returns: a list of @BlockInfo describing each virtual block device
449 # Since: 0.14.0
451 { 'command': 'query-block', 'returns': ['BlockInfo'] }
454 # @BlockDeviceStats:
456 # Statistics of a virtual block device or a block backing device.
458 # @rd_bytes:      The number of bytes read by the device.
460 # @wr_bytes:      The number of bytes written by the device.
462 # @rd_operations: The number of read operations performed by the device.
464 # @wr_operations: The number of write operations performed by the device.
466 # @flush_operations: The number of cache flush operations performed by the
467 #                    device (since 0.15.0)
469 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
470 #                       (since 0.15.0).
472 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
474 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
476 # @wr_highest_offset: The offset after the greatest byte written to the
477 #                     device.  The intended use of this information is for
478 #                     growable sparse files (like qcow2) that are used on top
479 #                     of a physical device.
481 # Since: 0.14.0
483 { 'type': 'BlockDeviceStats',
484   'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
485            'wr_operations': 'int', 'flush_operations': 'int',
486            'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
487            'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
490 # @BlockStats:
492 # Statistics of a virtual block device or a block backing device.
494 # @device: #optional If the stats are for a virtual block device, the name
495 #          corresponding to the virtual block device.
497 # @stats:  A @BlockDeviceStats for the device.
499 # @parent: #optional This may point to the backing block device if this is a
500 #          a virtual block device.  If it's a backing block, this will point
501 #          to the backing file is one is present.
503 # Since: 0.14.0
505 { 'type': 'BlockStats',
506   'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
507            '*parent': 'BlockStats'} }
510 # @query-blockstats:
512 # Query the @BlockStats for all virtual block devices.
514 # Returns: A list of @BlockStats for each virtual block devices.
516 # Since: 0.14.0
518 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
521 # @VncClientInfo:
523 # Information about a connected VNC client.
525 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
526 #        when possible.
528 # @family: 'ipv6' if the client is connected via IPv6 and TCP
529 #          'ipv4' if the client is connected via IPv4 and TCP
530 #          'unix' if the client is connected via a unix domain socket
531 #          'unknown' otherwise
533 # @service: The service name of the client's port.  This may depends on the
534 #           host system's service database so symbolic names should not be
535 #           relied on.
537 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
538 #              Name of the client.
540 # @sasl_username: #optional If SASL authentication is in use, the SASL username
541 #                 used for authentication.
543 # Since: 0.14.0
545 { 'type': 'VncClientInfo',
546   'data': {'host': 'str', 'family': 'str', 'service': 'str',
547            '*x509_dname': 'str', '*sasl_username': 'str'} }
550 # @VncInfo:
552 # Information about the VNC session.
554 # @enabled: true if the VNC server is enabled, false otherwise
556 # @host: #optional The hostname the VNC server is bound to.  This depends on
557 #        the name resolution on the host and may be an IP address.
559 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
560 #                    'ipv4' if the host is listening for IPv4 connections
561 #                    'unix' if the host is listening on a unix domain socket
562 #                    'unknown' otherwise
564 # @service: #optional The service name of the server's port.  This may depends
565 #           on the host system's service database so symbolic names should not
566 #           be relied on.
568 # @auth: #optional the current authentication type used by the server
569 #        'none' if no authentication is being used
570 #        'vnc' if VNC authentication is being used
571 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
572 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
573 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
574 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
575 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
576 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
577 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
578 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
579 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
581 # @clients: a list of @VncClientInfo of all currently connected clients
583 # Since: 0.14.0
585 { 'type': 'VncInfo',
586   'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
587            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
590 # @query-vnc:
592 # Returns information about the current VNC server
594 # Returns: @VncInfo
595 #          If VNC support is not compiled in, FeatureDisabled
597 # Since: 0.14.0
599 { 'command': 'query-vnc', 'returns': 'VncInfo' }
602 # @SpiceChannel
604 # Information about a SPICE client channel.
606 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
607 #        when possible.
609 # @family: 'ipv6' if the client is connected via IPv6 and TCP
610 #          'ipv4' if the client is connected via IPv4 and TCP
611 #          'unix' if the client is connected via a unix domain socket
612 #          'unknown' otherwise
614 # @port: The client's port number.
616 # @connection-id: SPICE connection id number.  All channels with the same id
617 #                 belong to the same SPICE session.
619 # @connection-type: SPICE channel type number.  "1" is the main control
620 #                   channel, filter for this one if you want to track spice
621 #                   sessions only
623 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
624 #              multiple channels of the same type exist, such as multiple
625 #              display channels in a multihead setup
627 # @tls: true if the channel is encrypted, false otherwise.
629 # Since: 0.14.0
631 { 'type': 'SpiceChannel',
632   'data': {'host': 'str', 'family': 'str', 'port': 'str',
633            'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
634            'tls': 'bool'} }
637 # @SpiceQueryMouseMode
639 # An enumation of Spice mouse states.
641 # @client: Mouse cursor position is determined by the client.
643 # @server: Mouse cursor position is determined by the server.
645 # @unknown: No information is available about mouse mode used by
646 #           the spice server.
648 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
650 # Since: 1.1
652 { 'enum': 'SpiceQueryMouseMode',
653   'data': [ 'client', 'server', 'unknown' ] }
656 # @SpiceInfo
658 # Information about the SPICE session.
660 # @enabled: true if the SPICE server is enabled, false otherwise
662 # @host: #optional The hostname the SPICE server is bound to.  This depends on
663 #        the name resolution on the host and may be an IP address.
665 # @port: #optional The SPICE server's port number.
667 # @compiled-version: #optional SPICE server version.
669 # @tls-port: #optional The SPICE server's TLS port number.
671 # @auth: #optional the current authentication type used by the server
672 #        'none'  if no authentication is being used
673 #        'spice' uses SASL or direct TLS authentication, depending on command
674 #                line options
676 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
677 #              be determined by the client or the server, or unknown if spice
678 #              server doesn't provide this information.
680 #              Since: 1.1
682 # @channels: a list of @SpiceChannel for each active spice channel
684 # Since: 0.14.0
686 { 'type': 'SpiceInfo',
687   'data': {'enabled': 'bool', '*host': 'str', '*port': 'int',
688            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
689            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
692 # @query-spice
694 # Returns information about the current SPICE server
696 # Returns: @SpiceInfo
698 # Since: 0.14.0
700 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
703 # @BalloonInfo:
705 # Information about the guest balloon device.
707 # @actual: the number of bytes the balloon currently contains
709 # @mem_swapped_in: #optional number of pages swapped in within the guest
711 # @mem_swapped_out: #optional number of pages swapped out within the guest
713 # @major_page_faults: #optional number of major page faults within the guest
715 # @minor_page_faults: #optional number of minor page faults within the guest
717 # @free_mem: #optional amount of memory (in bytes) free in the guest
719 # @total_mem: #optional amount of memory (in bytes) visible to the guest
721 # Since: 0.14.0
723 # Notes: all current versions of QEMU do not fill out optional information in
724 #        this structure.
726 { 'type': 'BalloonInfo',
727   'data': {'actual': 'int', '*mem_swapped_in': 'int',
728            '*mem_swapped_out': 'int', '*major_page_faults': 'int',
729            '*minor_page_faults': 'int', '*free_mem': 'int',
730            '*total_mem': 'int'} }
733 # @query-balloon:
735 # Return information about the balloon device.
737 # Returns: @BalloonInfo on success
738 #          If the balloon driver is enabled but not functional because the KVM
739 #          kernel module cannot support it, KvmMissingCap
740 #          If no balloon device is present, DeviceNotActive
742 # Since: 0.14.0
744 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
747 # @PciMemoryRange:
749 # A PCI device memory region
751 # @base: the starting address (guest physical)
753 # @limit: the ending address (guest physical)
755 # Since: 0.14.0
757 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
760 # @PciMemoryRegion
762 # Information about a PCI device I/O region.
764 # @bar: the index of the Base Address Register for this region
766 # @type: 'io' if the region is a PIO region
767 #        'memory' if the region is a MMIO region
769 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
771 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
773 # Since: 0.14.0
775 { 'type': 'PciMemoryRegion',
776   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
777            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
780 # @PciBridgeInfo:
782 # Information about a PCI Bridge device
784 # @bus.number: primary bus interface number.  This should be the number of the
785 #              bus the device resides on.
787 # @bus.secondary: secondary bus interface number.  This is the number of the
788 #                 main bus for the bridge
790 # @bus.subordinate: This is the highest number bus that resides below the
791 #                   bridge.
793 # @bus.io_range: The PIO range for all devices on this bridge
795 # @bus.memory_range: The MMIO range for all devices on this bridge
797 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
798 #                          this bridge
800 # @devices: a list of @PciDeviceInfo for each device on this bridge
802 # Since: 0.14.0
804 { 'type': 'PciBridgeInfo',
805   'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
806                     'io_range': 'PciMemoryRange',
807                     'memory_range': 'PciMemoryRange',
808                     'prefetchable_range': 'PciMemoryRange' },
809            '*devices': ['PciDeviceInfo']} }
812 # @PciDeviceInfo:
814 # Information about a PCI device
816 # @bus: the bus number of the device
818 # @slot: the slot the device is located in
820 # @function: the function of the slot used by the device
822 # @class_info.desc: #optional a string description of the device's class
824 # @class_info.class: the class code of the device
826 # @id.device: the PCI device id
828 # @id.vendor: the PCI vendor id
830 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
832 # @qdev_id: the device name of the PCI device
834 # @pci_bridge: if the device is a PCI bridge, the bridge information
836 # @regions: a list of the PCI I/O regions associated with the device
838 # Notes: the contents of @class_info.desc are not stable and should only be
839 #        treated as informational.
841 # Since: 0.14.0
843 { 'type': 'PciDeviceInfo',
844   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
845            'class_info': {'*desc': 'str', 'class': 'int'},
846            'id': {'device': 'int', 'vendor': 'int'},
847            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
848            'regions': ['PciMemoryRegion']} }
851 # @PciInfo:
853 # Information about a PCI bus
855 # @bus: the bus index
857 # @devices: a list of devices on this bus
859 # Since: 0.14.0
861 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
864 # @query-pci:
866 # Return information about the PCI bus topology of the guest.
868 # Returns: a list of @PciInfo for each PCI bus
870 # Since: 0.14.0
872 { 'command': 'query-pci', 'returns': ['PciInfo'] }
875 # @BlockJobInfo:
877 # Information about a long-running block device operation.
879 # @type: the job type ('stream' for image streaming)
881 # @device: the block device name
883 # @len: the maximum progress value
885 # @offset: the current progress value
887 # @speed: the rate limit, bytes per second
889 # Since: 1.1
891 { 'type': 'BlockJobInfo',
892   'data': {'type': 'str', 'device': 'str', 'len': 'int',
893            'offset': 'int', 'speed': 'int'} }
896 # @query-block-jobs:
898 # Return information about long-running block device operations.
900 # Returns: a list of @BlockJobInfo for each active block job
902 # Since: 1.1
904 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
907 # @quit:
909 # This command will cause the QEMU process to exit gracefully.  While every
910 # attempt is made to send the QMP response before terminating, this is not
911 # guaranteed.  When using this interface, a premature EOF would not be
912 # unexpected.
914 # Since: 0.14.0
916 { 'command': 'quit' }
919 # @stop:
921 # Stop all guest VCPU execution.
923 # Since:  0.14.0
925 # Notes:  This function will succeed even if the guest is already in the stopped
926 #         state
928 { 'command': 'stop' }
931 # @system_reset:
933 # Performs a hard reset of a guest.
935 # Since: 0.14.0
937 { 'command': 'system_reset' }
940 # @system_powerdown:
942 # Requests that a guest perform a powerdown operation.
944 # Since: 0.14.0
946 # Notes: A guest may or may not respond to this command.  This command
947 #        returning does not indicate that a guest has accepted the request or
948 #        that it has shut down.  Many guests will respond to this command by
949 #        prompting the user in some way.
951 { 'command': 'system_powerdown' }
954 # @cpu:
956 # This command is a nop that is only provided for the purposes of compatibility.
958 # Since: 0.14.0
960 # Notes: Do not use this command.
962 { 'command': 'cpu', 'data': {'index': 'int'} }
965 # @memsave:
967 # Save a portion of guest memory to a file.
969 # @val: the virtual address of the guest to start from
971 # @size: the size of memory region to save
973 # @filename: the file to save the memory to as binary data
975 # @cpu-index: #optional the index of the virtual CPU to use for translating the
976 #                       virtual address (defaults to CPU 0)
978 # Returns: Nothing on success
979 #          If @cpu is not a valid VCPU, InvalidParameterValue
980 #          If @filename cannot be opened, OpenFileFailed
981 #          If an I/O error occurs while writing the file, IOError
983 # Since: 0.14.0
985 # Notes: Errors were not reliably returned until 1.1
987 { 'command': 'memsave',
988   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
991 # @pmemsave:
993 # Save a portion of guest physical memory to a file.
995 # @val: the physical address of the guest to start from
997 # @size: the size of memory region to save
999 # @filename: the file to save the memory to as binary data
1001 # Returns: Nothing on success
1002 #          If @filename cannot be opened, OpenFileFailed
1003 #          If an I/O error occurs while writing the file, IOError
1005 # Since: 0.14.0
1007 # Notes: Errors were not reliably returned until 1.1
1009 { 'command': 'pmemsave',
1010   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1013 # @cont:
1015 # Resume guest VCPU execution.
1017 # Since:  0.14.0
1019 # Returns:  If successful, nothing
1020 #           If the QEMU is waiting for an incoming migration, MigrationExpected
1021 #           If QEMU was started with an encrypted block device and a key has
1022 #              not yet been set, DeviceEncrypted.
1024 # Notes:  This command will succeed if the guest is currently running.
1026 { 'command': 'cont' }
1029 # @system_wakeup:
1031 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1033 # Since:  1.1
1035 # Returns:  nothing.
1037 { 'command': 'system_wakeup' }
1040 # @inject-nmi:
1042 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1044 # Returns:  If successful, nothing
1045 #           If the Virtual Machine doesn't support NMI injection, Unsupported
1047 # Since:  0.14.0
1049 # Notes: Only x86 Virtual Machines support this command.
1051 { 'command': 'inject-nmi' }
1054 # @set_link:
1056 # Sets the link status of a virtual network adapter.
1058 # @name: the device name of the virtual network adapter
1060 # @up: true to set the link status to be up
1062 # Returns: Nothing on success
1063 #          If @name is not a valid network device, DeviceNotFound
1065 # Since: 0.14.0
1067 # Notes: Not all network adapters support setting link status.  This command
1068 #        will succeed even if the network adapter does not support link status
1069 #        notification.
1071 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1074 # @block_passwd:
1076 # This command sets the password of a block device that has not been open
1077 # with a password and requires one.
1079 # The two cases where this can happen are a block device is created through
1080 # QEMU's initial command line or a block device is changed through the legacy
1081 # @change interface.
1083 # In the event that the block device is created through the initial command
1084 # line, the VM will start in the stopped state regardless of whether '-S' is
1085 # used.  The intention is for a management tool to query the block devices to
1086 # determine which ones are encrypted, set the passwords with this command, and
1087 # then start the guest with the @cont command.
1089 # @device:   the name of the device to set the password on
1091 # @password: the password to use for the device
1093 # Returns: nothing on success
1094 #          If @device is not a valid block device, DeviceNotFound
1095 #          If @device is not encrypted, DeviceNotEncrypted
1096 #          If @password is not valid for this device, InvalidPassword
1098 # Notes:  Not all block formats support encryption and some that do are not
1099 #         able to validate that a password is correct.  Disk corruption may
1100 #         occur if an invalid password is specified.
1102 # Since: 0.14.0
1104 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1107 # @balloon:
1109 # Request the balloon driver to change its balloon size.
1111 # @value: the target size of the balloon in bytes
1113 # Returns: Nothing on success
1114 #          If the balloon driver is enabled but not functional because the KVM
1115 #            kernel module cannot support it, KvmMissingCap
1116 #          If no balloon device is present, DeviceNotActive
1118 # Notes: This command just issues a request to the guest.  When it returns,
1119 #        the balloon size may not have changed.  A guest can change the balloon
1120 #        size independent of this command.
1122 # Since: 0.14.0
1124 { 'command': 'balloon', 'data': {'value': 'int'} }
1127 # @block_resize
1129 # Resize a block image while a guest is running.
1131 # @device:  the name of the device to get the image resized
1133 # @size:  new image size in bytes
1135 # Returns: nothing on success
1136 #          If @device is not a valid block device, DeviceNotFound
1137 #          If @size is negative, InvalidParameterValue
1138 #          If the block device has no medium inserted, DeviceHasNoMedium
1139 #          If the block device does not support resize, Unsupported
1140 #          If the block device is read-only, DeviceIsReadOnly
1141 #          If a long-running operation is using the device, DeviceInUse
1143 # Since: 0.14.0
1145 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1148 # @NewImageMode
1150 # An enumeration that tells QEMU how to set the backing file path in
1151 # a new image file.
1153 # @existing: QEMU should look for an existing image file.
1155 # @absolute-paths: QEMU should create a new image with absolute paths
1156 # for the backing file.
1158 # Since: 1.1
1160 { 'enum': 'NewImageMode'
1161   'data': [ 'existing', 'absolute-paths' ] }
1164 # @BlockdevSnapshot
1166 # @device:  the name of the device to generate the snapshot from.
1168 # @snapshot-file: the target of the new image. A new file will be created.
1170 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1172 # @mode: #optional whether and how QEMU should create a new image, default is
1173 # 'absolute-paths'.
1175 { 'type': 'BlockdevSnapshot',
1176   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1177             '*mode': 'NewImageMode' } }
1180 # @BlockdevAction
1182 # A discriminated record of operations that can be performed with
1183 # @transaction.
1185 { 'union': 'BlockdevAction',
1186   'data': {
1187        'blockdev-snapshot-sync': 'BlockdevSnapshot',
1188    } }
1191 # @transaction
1193 # Atomically operate on a group of one or more block devices.  If
1194 # any operation fails, then the entire set of actions will be
1195 # abandoned and the appropriate error returned.  The only operation
1196 # supported is currently blockdev-snapshot-sync.
1198 #  List of:
1199 #  @BlockdevAction: information needed for the device snapshot
1201 # Returns: nothing on success
1202 #          If @device is not a valid block device, DeviceNotFound
1203 #          If @device is busy, DeviceInUse will be returned
1204 #          If @snapshot-file can't be created, OpenFileFailed
1205 #          If @snapshot-file can't be opened, OpenFileFailed
1206 #          If @format is invalid, InvalidBlockFormat
1208 # Note: The transaction aborts on the first failure.  Therefore, there will
1209 # be only one device or snapshot file returned in an error condition, and
1210 # subsequent actions will not have been attempted.
1212 # Since 1.1
1214 { 'command': 'transaction',
1215   'data': { 'actions': [ 'BlockdevAction' ] } }
1218 # @blockdev-snapshot-sync
1220 # Generates a synchronous snapshot of a block device.
1222 # @device:  the name of the device to generate the snapshot from.
1224 # @snapshot-file: the target of the new image. If the file exists, or if it
1225 #                 is a device, the snapshot will be created in the existing
1226 #                 file/device. If does not exist, a new file will be created.
1228 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1230 # @mode: #optional whether and how QEMU should create a new image, default is
1231 # 'absolute-paths'.
1233 # Returns: nothing on success
1234 #          If @device is not a valid block device, DeviceNotFound
1235 #          If @snapshot-file can't be opened, OpenFileFailed
1236 #          If @format is invalid, InvalidBlockFormat
1238 # Since 0.14.0
1240 { 'command': 'blockdev-snapshot-sync',
1241   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1242             '*mode': 'NewImageMode'} }
1245 # @human-monitor-command:
1247 # Execute a command on the human monitor and return the output.
1249 # @command-line: the command to execute in the human monitor
1251 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1253 # Returns: the output of the command as a string
1255 # Since: 0.14.0
1257 # Notes: This command only exists as a stop-gap.  It's use is highly
1258 #        discouraged.  The semantics of this command are not guaranteed.
1260 #        Known limitations:
1262 #        o This command is stateless, this means that commands that depend
1263 #          on state information (such as getfd) might not work
1265 #       o Commands that prompt the user for data (eg. 'cont' when the block
1266 #         device is encrypted) don't currently work
1268 { 'command': 'human-monitor-command',
1269   'data': {'command-line': 'str', '*cpu-index': 'int'},
1270   'returns': 'str' } 
1273 # @migrate_cancel
1275 # Cancel the current executing migration process.
1277 # Returns: nothing on success
1279 # Notes: This command succeeds even if there is no migration process running.
1281 # Since: 0.14.0
1283 { 'command': 'migrate_cancel' }
1286 # @migrate_set_downtime
1288 # Set maximum tolerated downtime for migration.
1290 # @value: maximum downtime in seconds
1292 # Returns: nothing on success
1294 # Since: 0.14.0
1296 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1299 # @migrate_set_speed
1301 # Set maximum speed for migration.
1303 # @value: maximum speed in bytes.
1305 # Returns: nothing on success
1307 # Notes: A value lesser than zero will be automatically round up to zero.
1309 # Since: 0.14.0
1311 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1314 # @ObjectPropertyInfo:
1316 # @name: the name of the property
1318 # @type: the type of the property.  This will typically come in one of four
1319 #        forms:
1321 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1322 #           These types are mapped to the appropriate JSON type.
1324 #        2) A legacy type in the form 'legacy<subtype>' where subtype is the
1325 #           legacy qdev typename.  These types are always treated as strings.
1327 #        3) A child type in the form 'child<subtype>' where subtype is a qdev
1328 #           device type name.  Child properties create the composition tree.
1330 #        4) A link type in the form 'link<subtype>' where subtype is a qdev
1331 #           device type name.  Link properties form the device model graph.
1333 # Since: 1.1
1335 # Notes: This type is experimental.  Its syntax may change in future releases.
1337 { 'type': 'ObjectPropertyInfo',
1338   'data': { 'name': 'str', 'type': 'str' } }
1341 # @qom-list:
1343 # This command will list any properties of a object given a path in the object
1344 # model.
1346 # @path: the path within the object model.  See @qom-get for a description of
1347 #        this parameter.
1349 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1350 #          object.
1352 # Since: 1.1
1354 # Notes: This command is experimental.  It's syntax may change in future
1355 #        releases.
1357 { 'command': 'qom-list',
1358   'data': { 'path': 'str' },
1359   'returns': [ 'ObjectPropertyInfo' ] }
1362 # @qom-get:
1364 # This command will get a property from a object model path and return the
1365 # value.
1367 # @path: The path within the object model.  There are two forms of supported
1368 #        paths--absolute and partial paths.
1370 #        Absolute paths are derived from the root object and can follow child<>
1371 #        or link<> properties.  Since they can follow link<> properties, they
1372 #        can be arbitrarily long.  Absolute paths look like absolute filenames
1373 #        and are prefixed  with a leading slash.
1375 #        Partial paths look like relative filenames.  They do not begin
1376 #        with a prefix.  The matching rules for partial paths are subtle but
1377 #        designed to make specifying objects easy.  At each level of the
1378 #        composition tree, the partial path is matched as an absolute path.
1379 #        The first match is not returned.  At least two matches are searched
1380 #        for.  A successful result is only returned if only one match is
1381 #        found.  If more than one match is found, a flag is return to
1382 #        indicate that the match was ambiguous.
1384 # @property: The property name to read
1386 # Returns: The property value.  The type depends on the property type.  legacy<>
1387 #          properties are returned as #str.  child<> and link<> properties are
1388 #          returns as #str pathnames.  All integer property types (u8, u16, etc)
1389 #          are returned as #int.
1391 # Since: 1.1
1393 # Notes: This command is experimental and may change syntax in future releases.
1395 { 'command': 'qom-get',
1396   'data': { 'path': 'str', 'property': 'str' },
1397   'returns': 'visitor',
1398   'gen': 'no' }
1401 # @qom-set:
1403 # This command will set a property from a object model path.
1405 # @path: see @qom-get for a description of this parameter
1407 # @property: the property name to set
1409 # @value: a value who's type is appropriate for the property type.  See @qom-get
1410 #         for a description of type mapping.
1412 # Since: 1.1
1414 # Notes: This command is experimental and may change syntax in future releases.
1416 { 'command': 'qom-set',
1417   'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1418   'gen': 'no' }
1421 # @set_password:
1423 # Sets the password of a remote display session.
1425 # @protocol: `vnc' to modify the VNC server password
1426 #            `spice' to modify the Spice server password
1428 # @password: the new password
1430 # @connected: #optional how to handle existing clients when changing the
1431 #                       password.  If nothing is specified, defaults to `keep' 
1432 #                       `fail' to fail the command if clients are connected
1433 #                       `disconnect' to disconnect existing clients
1434 #                       `keep' to maintain existing clients
1436 # Returns: Nothing on success
1437 #          If Spice is not enabled, DeviceNotFound
1438 #          If @protocol does not support connected, InvalidParameter
1439 #          If @protocol is invalid, InvalidParameter
1440 #          If any other error occurs, SetPasswdFailed
1442 # Notes: If VNC is not enabled, SetPasswdFailed is returned.
1444 # Since: 0.14.0
1446 { 'command': 'set_password',
1447   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1450 # @expire_password:
1452 # Expire the password of a remote display server.
1454 # @protocol: the name of the remote display protocol `vnc' or `spice'
1456 # @time: when to expire the password.
1457 #        `now' to expire the password immediately
1458 #        `never' to cancel password expiration
1459 #        `+INT' where INT is the number of seconds from now (integer)
1460 #        `INT' where INT is the absolute time in seconds
1462 # Returns: Nothing on success
1463 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
1464 #          If an error occurs setting password expiration, SetPasswdFailed
1465 #          If @protocol is not `spice' or 'vnc', InvalidParameter
1467 # Since: 0.14.0
1469 # Notes: Time is relative to the server and currently there is no way to
1470 #        coordinate server time with client time.  It is not recommended to
1471 #        use the absolute time version of the @time parameter unless you're
1472 #        sure you are on the same machine as the QEMU instance.
1474 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1477 # @eject:
1479 # Ejects a device from a removable drive.
1481 # @device:  The name of the device
1483 # @force:   @optional If true, eject regardless of whether the drive is locked.
1484 #           If not specified, the default value is false.
1486 # Returns:  Nothing on success
1487 #           If @device is not a valid block device, DeviceNotFound
1488 #           If @device is not removable and @force is false, DeviceNotRemovable
1489 #           If @force is false and @device is locked, DeviceLocked
1491 # Notes:    Ejecting a device will no media results in success
1493 # Since: 0.14.0
1495 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
1498 # @change-vnc-password:
1500 # Change the VNC server password.
1502 # @target:  the new password to use with VNC authentication
1504 # Since: 1.1
1506 # Notes:  An empty password in this command will set the password to the empty
1507 #         string.  Existing clients are unaffected by executing this command.
1509 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1512 # @change:
1514 # This command is multiple commands multiplexed together.
1516 # @device: This is normally the name of a block device but it may also be 'vnc'.
1517 #          when it's 'vnc', then sub command depends on @target
1519 # @target: If @device is a block device, then this is the new filename.
1520 #          If @device is 'vnc', then if the value 'password' selects the vnc
1521 #          change password command.   Otherwise, this specifies a new server URI
1522 #          address to listen to for VNC connections.
1524 # @arg:    If @device is a block device, then this is an optional format to open
1525 #          the device with.
1526 #          If @device is 'vnc' and @target is 'password', this is the new VNC
1527 #          password to set.  If this argument is an empty string, then no future
1528 #          logins will be allowed.
1530 # Returns: Nothing on success.
1531 #          If @device is not a valid block device, DeviceNotFound
1532 #          If @format is not a valid block format, InvalidBlockFormat
1533 #          If the new block device is encrypted, DeviceEncrypted.  Note that
1534 #          if this error is returned, the device has been opened successfully
1535 #          and an additional call to @block_passwd is required to set the
1536 #          device's password.  The behavior of reads and writes to the block
1537 #          device between when these calls are executed is undefined.
1539 # Notes:  It is strongly recommended that this interface is not used especially
1540 #         for changing block devices.
1542 # Since: 0.14.0
1544 { 'command': 'change',
1545   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1548 # @block_set_io_throttle:
1550 # Change I/O throttle limits for a block drive.
1552 # @device: The name of the device
1554 # @bps: total throughput limit in bytes per second
1556 # @bps_rd: read throughput limit in bytes per second
1558 # @bps_wr: write throughput limit in bytes per second
1560 # @iops: total I/O operations per second
1562 # @ops_rd: read I/O operations per second
1564 # @iops_wr: write I/O operations per second
1566 # Returns: Nothing on success
1567 #          If @device is not a valid block device, DeviceNotFound
1568 #          If the argument combination is invalid, InvalidParameterCombination
1570 # Since: 1.1
1571 ## 
1572 { 'command': 'block_set_io_throttle',
1573   'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
1574             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
1577 # @block-stream:
1579 # Copy data from a backing file into a block device.
1581 # The block streaming operation is performed in the background until the entire
1582 # backing file has been copied.  This command returns immediately once streaming
1583 # has started.  The status of ongoing block streaming operations can be checked
1584 # with query-block-jobs.  The operation can be stopped before it has completed
1585 # using the block-job-cancel command.
1587 # If a base file is specified then sectors are not copied from that base file and
1588 # its backing chain.  When streaming completes the image file will have the base
1589 # file as its backing file.  This can be used to stream a subset of the backing
1590 # file chain instead of flattening the entire image.
1592 # On successful completion the image file is updated to drop the backing file
1593 # and the BLOCK_JOB_COMPLETED event is emitted.
1595 # @device: the device name
1597 # @base:   #optional the common backing file name
1599 # @speed:  #optional the maximum speed, in bytes per second
1601 # Returns: Nothing on success
1602 #          If streaming is already active on this device, DeviceInUse
1603 #          If @device does not exist, DeviceNotFound
1604 #          If image streaming is not supported by this device, NotSupported
1605 #          If @base does not exist, BaseNotFound
1606 #          If @speed is invalid, InvalidParameter
1608 # Since: 1.1
1610 { 'command': 'block-stream', 'data': { 'device': 'str', '*base': 'str',
1611                                        '*speed': 'int' } }
1614 # @block-job-set-speed:
1616 # Set maximum speed for a background block operation.
1618 # This command can only be issued when there is an active block job.
1620 # Throttling can be disabled by setting the speed to 0.
1622 # @device: the device name
1624 # @speed:  the maximum speed, in bytes per second, or 0 for unlimited.
1625 #          Defaults to 0.
1627 # Returns: Nothing on success
1628 #          If the job type does not support throttling, NotSupported
1629 #          If the speed value is invalid, InvalidParameter
1630 #          If streaming is not active on this device, DeviceNotActive
1632 # Since: 1.1
1634 { 'command': 'block-job-set-speed',
1635   'data': { 'device': 'str', 'speed': 'int' } }
1638 # @block-job-cancel:
1640 # Stop an active block streaming operation.
1642 # This command returns immediately after marking the active block streaming
1643 # operation for cancellation.  It is an error to call this command if no
1644 # operation is in progress.
1646 # The operation will cancel as soon as possible and then emit the
1647 # BLOCK_JOB_CANCELLED event.  Before that happens the job is still visible when
1648 # enumerated using query-block-jobs.
1650 # The image file retains its backing file unless the streaming operation happens
1651 # to complete just as it is being cancelled.
1653 # A new block streaming operation can be started at a later time to finish
1654 # copying all data from the backing file.
1656 # @device: the device name
1658 # Returns: Nothing on success
1659 #          If streaming is not active on this device, DeviceNotActive
1660 #          If cancellation already in progress, DeviceInUse
1662 # Since: 1.1
1664 { 'command': 'block-job-cancel', 'data': { 'device': 'str' } }
1667 # @ObjectTypeInfo:
1669 # This structure describes a search result from @qom-list-types
1671 # @name: the type name found in the search
1673 # Since: 1.1
1675 # Notes: This command is experimental and may change syntax in future releases.
1677 { 'type': 'ObjectTypeInfo',
1678   'data': { 'name': 'str' } }
1681 # @qom-list-types:
1683 # This command will return a list of types given search parameters
1685 # @implements: if specified, only return types that implement this type name
1687 # @abstract: if true, include abstract types in the results
1689 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1691 # Since: 1.1
1693 # Notes: This command is experimental and may change syntax in future releases.
1695 { 'command': 'qom-list-types',
1696   'data': { '*implements': 'str', '*abstract': 'bool' },
1697   'returns': [ 'ObjectTypeInfo' ] }
1700 # @migrate
1702 # Migrates the current running guest to another Virtual Machine.
1704 # @uri: the Uniform Resource Identifier of the destination VM
1706 # @blk: #optional do block migration (full disk copy)
1708 # @inc: #optional incremental disk copy migration
1710 # @detach: this argument exists only for compatibility reasons and
1711 #          is ignored by QEMU
1713 # Returns: nothing on success
1715 # Since: 0.14.0
1717 { 'command': 'migrate',
1718   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
1720 # @xen-save-devices-state:
1722 # Save the state of all devices to file. The RAM and the block devices
1723 # of the VM are not saved by this command.
1725 # @filename: the file to save the state of the devices to as binary
1726 # data. See xen-save-devices-state.txt for a description of the binary
1727 # format.
1729 # Returns: Nothing on success
1730 #          If @filename cannot be opened, OpenFileFailed
1731 #          If an I/O error occurs while writing the file, IOError
1733 # Since: 1.1
1735 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
1738 # @device_del:
1740 # Remove a device from a guest
1742 # @id: the name of the device
1744 # Returns: Nothing on success
1745 #          If @id is not a valid device, DeviceNotFound
1746 #          If the device does not support unplug, BusNoHotplug
1748 # Notes: When this command completes, the device may not be removed from the
1749 #        guest.  Hot removal is an operation that requires guest cooperation.
1750 #        This command merely requests that the guest begin the hot removal
1751 #        process.
1753 # Since: 0.14.0
1755 { 'command': 'device_del', 'data': {'id': 'str'} }