5 # QAPI common definitions
6 { 'include': 'qapi/common.json' }
8 # QAPI block definitions
9 { 'include': 'qapi/block.json' }
11 # QAPI event definitions
12 { 'include': 'qapi/event.json' }
17 # Policy for handling lost ticks in timer devices.
19 # @discard: throw away the missed tick(s) and continue with future injection
20 # normally. Guest time may be delayed, unless the OS has explicit
21 # handling of lost ticks
23 # @delay: continue to deliver ticks at the normal rate. Guest time will be
24 # delayed due to the late tick
26 # @merge: merge the missed tick(s) into one tick and inject. Guest time
27 # may be delayed, depending on how the OS reacts to the merging
30 # @slew: deliver ticks at a higher rate to catch up with the missed tick. The
31 # guest time should not be delayed once catchup is complete.
35 { 'enum': 'LostTickPolicy',
36 'data': ['discard', 'delay', 'merge', 'slew' ] }
40 # Allow client connections for VNC, Spice and socket based
41 # character devices to be passed in to QEMU via SCM_RIGHTS.
43 # @protocol: protocol name. Valid names are "vnc", "spice" or the
44 # name of a character device (eg. from -chardev id=XXXX)
46 # @fdname: file descriptor name previously passed via 'getfd' command
48 # @skipauth: #optional whether to skip authentication. Only applies
49 # to "vnc" and "spice" protocols
51 # @tls: #optional whether to perform TLS. Only applies to the "spice"
54 # Returns: nothing on success.
58 { 'command': 'add_client',
59 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
65 # Guest name information.
67 # @name: #optional The name of the guest
71 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
76 # Return the name information of a guest.
78 # Returns: @NameInfo of the guest
82 { 'command': 'query-name', 'returns': 'NameInfo' }
87 # Information about support for KVM acceleration
89 # @enabled: true if KVM acceleration is active
91 # @present: true if KVM acceleration is built into this executable
95 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
100 # Returns information about KVM acceleration
106 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
111 # An enumeration of VM run states.
113 # @debug: QEMU is running on a debugger
115 # @finish-migrate: guest is paused to finish the migration process
117 # @inmigrate: guest is paused waiting for an incoming migration. Note
118 # that this state does not tell whether the machine will start at the
119 # end of the migration. This depends on the command-line -S option and
120 # any invocation of 'stop' or 'cont' that has happened since QEMU was
123 # @internal-error: An internal error that prevents further guest execution
126 # @io-error: the last IOP has failed and the device is configured to pause
129 # @paused: guest has been paused via the 'stop' command
131 # @postmigrate: guest is paused following a successful 'migrate'
133 # @prelaunch: QEMU was started with -S and guest has not started
135 # @restore-vm: guest is paused to restore VM state
137 # @running: guest is actively running
139 # @save-vm: guest is paused to save the VM state
141 # @shutdown: guest is shut down (and -no-shutdown is in use)
143 # @suspended: guest is suspended (ACPI S3)
145 # @watchdog: the watchdog action is configured to pause and has been triggered
147 # @guest-panicked: guest has been panicked as a result of guest OS panic
149 { 'enum': 'RunState',
150 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
151 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
152 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
158 # Information about VCPU run state
160 # @running: true if all VCPUs are runnable, false if not runnable
162 # @singlestep: true if VCPUs are in single-step mode
164 # @status: the virtual machine @RunState
168 # Notes: @singlestep is enabled through the GDB stub
170 { 'type': 'StatusInfo',
171 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
176 # Query the run status of all VCPUs
178 # Returns: @StatusInfo reflecting all VCPUs
182 { 'command': 'query-status', 'returns': 'StatusInfo' }
187 # Guest UUID information.
189 # @UUID: the UUID of the guest
193 # Notes: If no UUID was specified for the guest, a null UUID is returned.
195 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
200 # Query the guest UUID information.
202 # Returns: The @UuidInfo for the guest
206 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
211 # Information about a character device.
213 # @label: the label of the character device
215 # @filename: the filename of the character device
217 # Notes: @filename is encoded using the QEMU command line character device
218 # encoding. See the QEMU man page for details.
222 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
227 # Returns information about current character devices.
229 # Returns: a list of @ChardevInfo
233 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
236 # @ChardevBackendInfo:
238 # Information about a character device backend
240 # @name: The backend name
244 { 'type': 'ChardevBackendInfo', 'data': {'name': 'str'} }
247 # @query-chardev-backends:
249 # Returns information about character device backends.
251 # Returns: a list of @ChardevBackendInfo
255 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
260 # An enumeration of data format.
262 # @utf8: Data is a UTF-8 string (RFC 3629)
264 # @base64: Data is Base64 encoded binary (RFC 3548)
268 { 'enum': 'DataFormat',
269 'data': [ 'utf8', 'base64' ] }
274 # Write to a ring buffer character device.
276 # @device: the ring buffer character device name
278 # @data: data to write
280 # @format: #optional data encoding (default 'utf8').
281 # - base64: data must be base64 encoded text. Its binary
282 # decoding gets written.
283 # Bug: invalid base64 is currently not rejected.
284 # Whitespace *is* invalid.
285 # - utf8: data's UTF-8 encoding is written
286 # - data itself is always Unicode regardless of format, like
289 # Returns: Nothing on success
293 { 'command': 'ringbuf-write',
294 'data': {'device': 'str', 'data': 'str',
295 '*format': 'DataFormat'} }
300 # Read from a ring buffer character device.
302 # @device: the ring buffer character device name
304 # @size: how many bytes to read at most
306 # @format: #optional data encoding (default 'utf8').
307 # - base64: the data read is returned in base64 encoding.
308 # - utf8: the data read is interpreted as UTF-8.
309 # Bug: can screw up when the buffer contains invalid UTF-8
310 # sequences, NUL characters, after the ring buffer lost
311 # data, and when reading stops because the size limit is
313 # - The return value is always Unicode regardless of format,
314 # like any other string.
316 # Returns: data read from the device
320 { 'command': 'ringbuf-read',
321 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
327 # Information about a QMP event
329 # @name: The event name
333 { 'type': 'EventInfo', 'data': {'name': 'str'} }
338 # Return a list of supported QMP events by this server
340 # Returns: A list of @EventInfo for all supported events
344 { 'command': 'query-events', 'returns': ['EventInfo'] }
349 # Detailed migration status.
351 # @transferred: amount of bytes already transferred to the target VM
353 # @remaining: amount of bytes remaining to be transferred to the target VM
355 # @total: total amount of bytes involved in the migration process
357 # @duplicate: number of duplicate (zero) pages (since 1.2)
359 # @skipped: number of skipped zero pages (since 1.5)
361 # @normal : number of normal pages (since 1.2)
363 # @normal-bytes: number of normal bytes sent (since 1.2)
365 # @dirty-pages-rate: number of pages dirtied by second by the
368 # @mbps: throughput in megabits/sec. (since 1.6)
370 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
374 { 'type': 'MigrationStats',
375 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
376 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
377 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
378 'mbps' : 'number', 'dirty-sync-count' : 'int' } }
383 # Detailed XBZRLE migration cache statistics
385 # @cache-size: XBZRLE cache size
387 # @bytes: amount of bytes already transferred to the target VM
389 # @pages: amount of pages transferred to the target VM
391 # @cache-miss: number of cache miss
393 # @cache-miss-rate: rate of cache miss (since 2.1)
395 # @overflow: number of overflows
399 { 'type': 'XBZRLECacheStats',
400 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
401 'cache-miss': 'int', 'cache-miss-rate': 'number',
402 'overflow': 'int' } }
407 # Information about current migration process.
409 # @status: #optional string describing the current migration status.
410 # As of 0.14.0 this can be 'setup', 'active', 'completed', 'failed' or
411 # 'cancelled'. If this field is not returned, no migration process
414 # @ram: #optional @MigrationStats containing detailed migration
415 # status, only returned if status is 'active' or
416 # 'completed'. 'comppleted' (since 1.2)
418 # @disk: #optional @MigrationStats containing detailed disk migration
419 # status, only returned if status is 'active' and it is a block
422 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
423 # migration statistics, only returned if XBZRLE feature is on and
424 # status is 'active' or 'completed' (since 1.2)
426 # @total-time: #optional total amount of milliseconds since migration started.
427 # If migration has ended, it returns the total migration
430 # @downtime: #optional only present when migration finishes correctly
431 # total downtime in milliseconds for the guest.
434 # @expected-downtime: #optional only present while migration is active
435 # expected downtime in milliseconds for the guest in last walk
436 # of the dirty bitmap. (since 1.3)
438 # @setup-time: #optional amount of setup time in milliseconds _before_ the
439 # iterations begin but _after_ the QMP command is issued. This is designed
440 # to provide an accounting of any activities (such as RDMA pinning) which
441 # may be expensive, but do not actually occur during the iterative
442 # migration rounds themselves. (since 1.6)
446 { 'type': 'MigrationInfo',
447 'data': {'*status': 'str', '*ram': 'MigrationStats',
448 '*disk': 'MigrationStats',
449 '*xbzrle-cache': 'XBZRLECacheStats',
450 '*total-time': 'int',
451 '*expected-downtime': 'int',
453 '*setup-time': 'int'} }
458 # Returns information about current migration process.
460 # Returns: @MigrationInfo
464 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
467 # @MigrationCapability
469 # Migration capabilities enumeration
471 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
472 # This feature allows us to minimize migration traffic for certain work
473 # loads, by sending compressed difference of the pages
475 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
476 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
477 # Disabled by default. (since 2.0)
479 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
480 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
481 # source and target VM to support this feature. To enable it is sufficient
482 # to enable the capability on the source VM. The feature is disabled by
483 # default. (since 1.6)
485 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
486 # to speed up convergence of RAM migration. (since 1.6)
490 { 'enum': 'MigrationCapability',
491 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks'] }
494 # @MigrationCapabilityStatus
496 # Migration capability information
498 # @capability: capability enum
500 # @state: capability state bool
504 { 'type': 'MigrationCapabilityStatus',
505 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
508 # @migrate-set-capabilities
510 # Enable/Disable the following migration capabilities (like xbzrle)
512 # @capabilities: json array of capability modifications to make
516 { 'command': 'migrate-set-capabilities',
517 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
520 # @query-migrate-capabilities
522 # Returns information about the current migration capabilities status
524 # Returns: @MigrationCapabilitiesStatus
528 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
533 # Information about a mouse device.
535 # @name: the name of the mouse device
537 # @index: the index of the mouse device
539 # @current: true if this device is currently receiving mouse events
541 # @absolute: true if this device supports absolute coordinates as input
545 { 'type': 'MouseInfo',
546 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
547 'absolute': 'bool'} }
552 # Returns information about each active mouse device
554 # Returns: a list of @MouseInfo for each device
558 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
563 # Information about a virtual CPU
565 # @CPU: the index of the virtual CPU
567 # @current: this only exists for backwards compatible and should be ignored
569 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
570 # to a processor specific low power mode.
572 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
574 # If the target is Sparc, this is the PC component of the
575 # instruction pointer.
577 # @nip: #optional If the target is PPC, the instruction pointer
579 # @npc: #optional If the target is Sparc, the NPC component of the instruction
582 # @PC: #optional If the target is MIPS, the instruction pointer
584 # @thread_id: ID of the underlying host thread
588 # Notes: @halted is a transient state that changes frequently. By the time the
589 # data is sent to the client, the guest may no longer be halted.
592 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
593 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
598 # Returns a list of information about each virtual CPU.
600 # Returns: a list of @CpuInfo for each virtual CPU
604 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
609 # Information about an iothread
611 # @id: the identifier of the iothread
613 # @thread-id: ID of the underlying host thread
617 { 'type': 'IOThreadInfo',
618 'data': {'id': 'str', 'thread-id': 'int'} }
623 # Returns a list of information about each iothread.
625 # Note this list excludes the QEMU main loop thread, which is not declared
626 # using the -object iothread command-line option. It is always the main thread
629 # Returns: a list of @IOThreadInfo for each iothread
633 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
636 # @NetworkAddressFamily
638 # The network address family
646 # @unknown: otherwise
650 { 'enum': 'NetworkAddressFamily',
651 'data': [ 'ipv4', 'ipv6', 'unix', 'unknown' ] }
656 # The basic information for vnc network connection
660 # @service: The service name of the vnc port. This may depend on the host
661 # system's service database so symbolic names should not be relied
664 # @family: address family
668 { 'type': 'VncBasicInfo',
669 'data': { 'host': 'str',
671 'family': 'NetworkAddressFamily' } }
676 # The network connection information for server
678 # @auth: #optional, authentication method
682 { 'type': 'VncServerInfo',
683 'base': 'VncBasicInfo',
684 'data': { '*auth': 'str' } }
689 # Information about a connected VNC client.
691 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
692 # Name of the client.
694 # @sasl_username: #optional If SASL authentication is in use, the SASL username
695 # used for authentication.
699 { 'type': 'VncClientInfo',
700 'base': 'VncBasicInfo',
701 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
706 # Information about the VNC session.
708 # @enabled: true if the VNC server is enabled, false otherwise
710 # @host: #optional The hostname the VNC server is bound to. This depends on
711 # the name resolution on the host and may be an IP address.
713 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
714 # 'ipv4' if the host is listening for IPv4 connections
715 # 'unix' if the host is listening on a unix domain socket
716 # 'unknown' otherwise
718 # @service: #optional The service name of the server's port. This may depends
719 # on the host system's service database so symbolic names should not
722 # @auth: #optional the current authentication type used by the server
723 # 'none' if no authentication is being used
724 # 'vnc' if VNC authentication is being used
725 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
726 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
727 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
728 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
729 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
730 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
731 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
732 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
733 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
735 # @clients: a list of @VncClientInfo of all currently connected clients
740 'data': {'enabled': 'bool', '*host': 'str',
741 '*family': 'NetworkAddressFamily',
742 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
747 # Returns information about the current VNC server
753 { 'command': 'query-vnc', 'returns': 'VncInfo' }
758 # The basic information for SPICE network connection
764 # @family: address family
768 { 'type': 'SpiceBasicInfo',
769 'data': { 'host': 'str',
771 'family': 'NetworkAddressFamily' } }
776 # Information about a SPICE server
778 # @auth: #optional, authentication method
782 { 'type': 'SpiceServerInfo',
783 'base': 'SpiceBasicInfo',
784 'data': { '*auth': 'str' } }
789 # Information about a SPICE client channel.
791 # @connection-id: SPICE connection id number. All channels with the same id
792 # belong to the same SPICE session.
794 # @connection-type: SPICE channel type number. "1" is the main control
795 # channel, filter for this one if you want to track spice
798 # @channel-id: SPICE channel ID number. Usually "0", might be different when
799 # multiple channels of the same type exist, such as multiple
800 # display channels in a multihead setup
802 # @tls: true if the channel is encrypted, false otherwise.
806 { 'type': 'SpiceChannel',
807 'base': 'SpiceBasicInfo',
808 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
812 # @SpiceQueryMouseMode
814 # An enumeration of Spice mouse states.
816 # @client: Mouse cursor position is determined by the client.
818 # @server: Mouse cursor position is determined by the server.
820 # @unknown: No information is available about mouse mode used by
823 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
827 { 'enum': 'SpiceQueryMouseMode',
828 'data': [ 'client', 'server', 'unknown' ] }
833 # Information about the SPICE session.
835 # @enabled: true if the SPICE server is enabled, false otherwise
837 # @migrated: true if the last guest migration completed and spice
838 # migration had completed as well. false otherwise.
840 # @host: #optional The hostname the SPICE server is bound to. This depends on
841 # the name resolution on the host and may be an IP address.
843 # @port: #optional The SPICE server's port number.
845 # @compiled-version: #optional SPICE server version.
847 # @tls-port: #optional The SPICE server's TLS port number.
849 # @auth: #optional the current authentication type used by the server
850 # 'none' if no authentication is being used
851 # 'spice' uses SASL or direct TLS authentication, depending on command
854 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
855 # be determined by the client or the server, or unknown if spice
856 # server doesn't provide this information.
860 # @channels: a list of @SpiceChannel for each active spice channel
864 { 'type': 'SpiceInfo',
865 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
866 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
867 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
872 # Returns information about the current SPICE server
874 # Returns: @SpiceInfo
878 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
883 # Information about the guest balloon device.
885 # @actual: the number of bytes the balloon currently contains
890 { 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
895 # Return information about the balloon device.
897 # Returns: @BalloonInfo on success
898 # If the balloon driver is enabled but not functional because the KVM
899 # kernel module cannot support it, KvmMissingCap
900 # If no balloon device is present, DeviceNotActive
904 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
909 # A PCI device memory region
911 # @base: the starting address (guest physical)
913 # @limit: the ending address (guest physical)
917 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
922 # Information about a PCI device I/O region.
924 # @bar: the index of the Base Address Register for this region
926 # @type: 'io' if the region is a PIO region
927 # 'memory' if the region is a MMIO region
929 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
931 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
935 { 'type': 'PciMemoryRegion',
936 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
937 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
942 # Information about a PCI Bridge device
944 # @bus.number: primary bus interface number. This should be the number of the
945 # bus the device resides on.
947 # @bus.secondary: secondary bus interface number. This is the number of the
948 # main bus for the bridge
950 # @bus.subordinate: This is the highest number bus that resides below the
953 # @bus.io_range: The PIO range for all devices on this bridge
955 # @bus.memory_range: The MMIO range for all devices on this bridge
957 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
960 # @devices: a list of @PciDeviceInfo for each device on this bridge
964 { 'type': 'PciBridgeInfo',
965 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
966 'io_range': 'PciMemoryRange',
967 'memory_range': 'PciMemoryRange',
968 'prefetchable_range': 'PciMemoryRange' },
969 '*devices': ['PciDeviceInfo']} }
974 # Information about a PCI device
976 # @bus: the bus number of the device
978 # @slot: the slot the device is located in
980 # @function: the function of the slot used by the device
982 # @class_info.desc: #optional a string description of the device's class
984 # @class_info.class: the class code of the device
986 # @id.device: the PCI device id
988 # @id.vendor: the PCI vendor id
990 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
992 # @qdev_id: the device name of the PCI device
994 # @pci_bridge: if the device is a PCI bridge, the bridge information
996 # @regions: a list of the PCI I/O regions associated with the device
998 # Notes: the contents of @class_info.desc are not stable and should only be
999 # treated as informational.
1003 { 'type': 'PciDeviceInfo',
1004 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1005 'class_info': {'*desc': 'str', 'class': 'int'},
1006 'id': {'device': 'int', 'vendor': 'int'},
1007 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1008 'regions': ['PciMemoryRegion']} }
1013 # Information about a PCI bus
1015 # @bus: the bus index
1017 # @devices: a list of devices on this bus
1021 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1026 # Return information about the PCI bus topology of the guest.
1028 # Returns: a list of @PciInfo for each PCI bus
1032 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1037 # This command will cause the QEMU process to exit gracefully. While every
1038 # attempt is made to send the QMP response before terminating, this is not
1039 # guaranteed. When using this interface, a premature EOF would not be
1044 { 'command': 'quit' }
1049 # Stop all guest VCPU execution.
1053 # Notes: This function will succeed even if the guest is already in the stopped
1054 # state. In "inmigrate" state, it will ensure that the guest
1055 # remains paused once migration finishes, as if the -S option was
1056 # passed on the command line.
1058 { 'command': 'stop' }
1063 # Performs a hard reset of a guest.
1067 { 'command': 'system_reset' }
1070 # @system_powerdown:
1072 # Requests that a guest perform a powerdown operation.
1076 # Notes: A guest may or may not respond to this command. This command
1077 # returning does not indicate that a guest has accepted the request or
1078 # that it has shut down. Many guests will respond to this command by
1079 # prompting the user in some way.
1081 { 'command': 'system_powerdown' }
1086 # This command is a nop that is only provided for the purposes of compatibility.
1090 # Notes: Do not use this command.
1092 { 'command': 'cpu', 'data': {'index': 'int'} }
1097 # Adds CPU with specified ID
1099 # @id: ID of CPU to be created, valid values [0..max_cpus)
1101 # Returns: Nothing on success
1105 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1110 # Save a portion of guest memory to a file.
1112 # @val: the virtual address of the guest to start from
1114 # @size: the size of memory region to save
1116 # @filename: the file to save the memory to as binary data
1118 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1119 # virtual address (defaults to CPU 0)
1121 # Returns: Nothing on success
1125 # Notes: Errors were not reliably returned until 1.1
1127 { 'command': 'memsave',
1128 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1133 # Save a portion of guest physical memory to a file.
1135 # @val: the physical address of the guest to start from
1137 # @size: the size of memory region to save
1139 # @filename: the file to save the memory to as binary data
1141 # Returns: Nothing on success
1145 # Notes: Errors were not reliably returned until 1.1
1147 { 'command': 'pmemsave',
1148 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1153 # Resume guest VCPU execution.
1157 # Returns: If successful, nothing
1158 # If QEMU was started with an encrypted block device and a key has
1159 # not yet been set, DeviceEncrypted.
1161 # Notes: This command will succeed if the guest is currently running. It
1162 # will also succeed if the guest is in the "inmigrate" state; in
1163 # this case, the effect of the command is to make sure the guest
1164 # starts once migration finishes, removing the effect of the -S
1165 # command line option if it was passed.
1167 { 'command': 'cont' }
1172 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1178 { 'command': 'system_wakeup' }
1183 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1185 # Returns: If successful, nothing
1189 # Notes: Only x86 Virtual Machines support this command.
1191 { 'command': 'inject-nmi' }
1196 # Sets the link status of a virtual network adapter.
1198 # @name: the device name of the virtual network adapter
1200 # @up: true to set the link status to be up
1202 # Returns: Nothing on success
1203 # If @name is not a valid network device, DeviceNotFound
1207 # Notes: Not all network adapters support setting link status. This command
1208 # will succeed even if the network adapter does not support link status
1211 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1216 # Request the balloon driver to change its balloon size.
1218 # @value: the target size of the balloon in bytes
1220 # Returns: Nothing on success
1221 # If the balloon driver is enabled but not functional because the KVM
1222 # kernel module cannot support it, KvmMissingCap
1223 # If no balloon device is present, DeviceNotActive
1225 # Notes: This command just issues a request to the guest. When it returns,
1226 # the balloon size may not have changed. A guest can change the balloon
1227 # size independent of this command.
1231 { 'command': 'balloon', 'data': {'value': 'int'} }
1236 # This action can be used to test transaction failure.
1244 # @TransactionAction
1246 # A discriminated record of operations that can be performed with
1249 { 'union': 'TransactionAction',
1251 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1252 'drive-backup': 'DriveBackup',
1254 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal'
1260 # Executes a number of transactionable QMP commands atomically. If any
1261 # operation fails, then the entire set of actions will be abandoned and the
1262 # appropriate error returned.
1265 # @TransactionAction: information needed for the respective operation
1267 # Returns: nothing on success
1268 # Errors depend on the operations of the transaction
1270 # Note: The transaction aborts on the first failure. Therefore, there will be
1271 # information on only one failed operation returned in an error condition, and
1272 # subsequent actions will not have been attempted.
1276 { 'command': 'transaction',
1277 'data': { 'actions': [ 'TransactionAction' ] } }
1280 # @human-monitor-command:
1282 # Execute a command on the human monitor and return the output.
1284 # @command-line: the command to execute in the human monitor
1286 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1288 # Returns: the output of the command as a string
1292 # Notes: This command only exists as a stop-gap. Its use is highly
1293 # discouraged. The semantics of this command are not guaranteed.
1295 # Known limitations:
1297 # o This command is stateless, this means that commands that depend
1298 # on state information (such as getfd) might not work
1300 # o Commands that prompt the user for data (eg. 'cont' when the block
1301 # device is encrypted) don't currently work
1303 { 'command': 'human-monitor-command',
1304 'data': {'command-line': 'str', '*cpu-index': 'int'},
1310 # Cancel the current executing migration process.
1312 # Returns: nothing on success
1314 # Notes: This command succeeds even if there is no migration process running.
1318 { 'command': 'migrate_cancel' }
1321 # @migrate_set_downtime
1323 # Set maximum tolerated downtime for migration.
1325 # @value: maximum downtime in seconds
1327 # Returns: nothing on success
1331 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1334 # @migrate_set_speed
1336 # Set maximum speed for migration.
1338 # @value: maximum speed in bytes.
1340 # Returns: nothing on success
1342 # Notes: A value lesser than zero will be automatically round up to zero.
1346 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1349 # @migrate-set-cache-size
1351 # Set XBZRLE cache size
1353 # @value: cache size in bytes
1355 # The size will be rounded down to the nearest power of 2.
1356 # The cache size can be modified before and during ongoing migration
1358 # Returns: nothing on success
1362 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1365 # @query-migrate-cache-size
1367 # query XBZRLE cache size
1369 # Returns: XBZRLE cache size in bytes
1373 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1376 # @ObjectPropertyInfo:
1378 # @name: the name of the property
1380 # @type: the type of the property. This will typically come in one of four
1383 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1384 # These types are mapped to the appropriate JSON type.
1386 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1387 # legacy qdev typename. These types are always treated as strings.
1389 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
1390 # device type name. Child properties create the composition tree.
1392 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
1393 # device type name. Link properties form the device model graph.
1397 { 'type': 'ObjectPropertyInfo',
1398 'data': { 'name': 'str', 'type': 'str' } }
1403 # This command will list any properties of a object given a path in the object
1406 # @path: the path within the object model. See @qom-get for a description of
1409 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1414 { 'command': 'qom-list',
1415 'data': { 'path': 'str' },
1416 'returns': [ 'ObjectPropertyInfo' ] }
1421 # This command will get a property from a object model path and return the
1424 # @path: The path within the object model. There are two forms of supported
1425 # paths--absolute and partial paths.
1427 # Absolute paths are derived from the root object and can follow child<>
1428 # or link<> properties. Since they can follow link<> properties, they
1429 # can be arbitrarily long. Absolute paths look like absolute filenames
1430 # and are prefixed with a leading slash.
1432 # Partial paths look like relative filenames. They do not begin
1433 # with a prefix. The matching rules for partial paths are subtle but
1434 # designed to make specifying objects easy. At each level of the
1435 # composition tree, the partial path is matched as an absolute path.
1436 # The first match is not returned. At least two matches are searched
1437 # for. A successful result is only returned if only one match is
1438 # found. If more than one match is found, a flag is return to
1439 # indicate that the match was ambiguous.
1441 # @property: The property name to read
1443 # Returns: The property value. The type depends on the property type. legacy<>
1444 # properties are returned as #str. child<> and link<> properties are
1445 # returns as #str pathnames. All integer property types (u8, u16, etc)
1446 # are returned as #int.
1450 { 'command': 'qom-get',
1451 'data': { 'path': 'str', 'property': 'str' },
1452 'returns': 'visitor',
1458 # This command will set a property from a object model path.
1460 # @path: see @qom-get for a description of this parameter
1462 # @property: the property name to set
1464 # @value: a value who's type is appropriate for the property type. See @qom-get
1465 # for a description of type mapping.
1469 { 'command': 'qom-set',
1470 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1476 # Sets the password of a remote display session.
1478 # @protocol: `vnc' to modify the VNC server password
1479 # `spice' to modify the Spice server password
1481 # @password: the new password
1483 # @connected: #optional how to handle existing clients when changing the
1484 # password. If nothing is specified, defaults to `keep'
1485 # `fail' to fail the command if clients are connected
1486 # `disconnect' to disconnect existing clients
1487 # `keep' to maintain existing clients
1489 # Returns: Nothing on success
1490 # If Spice is not enabled, DeviceNotFound
1494 { 'command': 'set_password',
1495 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1500 # Expire the password of a remote display server.
1502 # @protocol: the name of the remote display protocol `vnc' or `spice'
1504 # @time: when to expire the password.
1505 # `now' to expire the password immediately
1506 # `never' to cancel password expiration
1507 # `+INT' where INT is the number of seconds from now (integer)
1508 # `INT' where INT is the absolute time in seconds
1510 # Returns: Nothing on success
1511 # If @protocol is `spice' and Spice is not active, DeviceNotFound
1515 # Notes: Time is relative to the server and currently there is no way to
1516 # coordinate server time with client time. It is not recommended to
1517 # use the absolute time version of the @time parameter unless you're
1518 # sure you are on the same machine as the QEMU instance.
1520 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1523 # @change-vnc-password:
1525 # Change the VNC server password.
1527 # @target: the new password to use with VNC authentication
1531 # Notes: An empty password in this command will set the password to the empty
1532 # string. Existing clients are unaffected by executing this command.
1534 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1539 # This command is multiple commands multiplexed together.
1541 # @device: This is normally the name of a block device but it may also be 'vnc'.
1542 # when it's 'vnc', then sub command depends on @target
1544 # @target: If @device is a block device, then this is the new filename.
1545 # If @device is 'vnc', then if the value 'password' selects the vnc
1546 # change password command. Otherwise, this specifies a new server URI
1547 # address to listen to for VNC connections.
1549 # @arg: If @device is a block device, then this is an optional format to open
1551 # If @device is 'vnc' and @target is 'password', this is the new VNC
1552 # password to set. If this argument is an empty string, then no future
1553 # logins will be allowed.
1555 # Returns: Nothing on success.
1556 # If @device is not a valid block device, DeviceNotFound
1557 # If the new block device is encrypted, DeviceEncrypted. Note that
1558 # if this error is returned, the device has been opened successfully
1559 # and an additional call to @block_passwd is required to set the
1560 # device's password. The behavior of reads and writes to the block
1561 # device between when these calls are executed is undefined.
1563 # Notes: It is strongly recommended that this interface is not used especially
1564 # for changing block devices.
1568 { 'command': 'change',
1569 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1574 # This structure describes a search result from @qom-list-types
1576 # @name: the type name found in the search
1580 # Notes: This command is experimental and may change syntax in future releases.
1582 { 'type': 'ObjectTypeInfo',
1583 'data': { 'name': 'str' } }
1588 # This command will return a list of types given search parameters
1590 # @implements: if specified, only return types that implement this type name
1592 # @abstract: if true, include abstract types in the results
1594 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1598 { 'command': 'qom-list-types',
1599 'data': { '*implements': 'str', '*abstract': 'bool' },
1600 'returns': [ 'ObjectTypeInfo' ] }
1603 # @DevicePropertyInfo:
1605 # Information about device properties.
1607 # @name: the name of the property
1608 # @type: the typename of the property
1612 { 'type': 'DevicePropertyInfo',
1613 'data': { 'name': 'str', 'type': 'str' } }
1616 # @device-list-properties:
1618 # List properties associated with a device.
1620 # @typename: the type name of a device
1622 # Returns: a list of DevicePropertyInfo describing a devices properties
1626 { 'command': 'device-list-properties',
1627 'data': { 'typename': 'str'},
1628 'returns': [ 'DevicePropertyInfo' ] }
1633 # Migrates the current running guest to another Virtual Machine.
1635 # @uri: the Uniform Resource Identifier of the destination VM
1637 # @blk: #optional do block migration (full disk copy)
1639 # @inc: #optional incremental disk copy migration
1641 # @detach: this argument exists only for compatibility reasons and
1642 # is ignored by QEMU
1644 # Returns: nothing on success
1648 { 'command': 'migrate',
1649 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
1651 # @xen-save-devices-state:
1653 # Save the state of all devices to file. The RAM and the block devices
1654 # of the VM are not saved by this command.
1656 # @filename: the file to save the state of the devices to as binary
1657 # data. See xen-save-devices-state.txt for a description of the binary
1660 # Returns: Nothing on success
1664 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
1667 # @xen-set-global-dirty-log
1669 # Enable or disable the global dirty log mode.
1671 # @enable: true to enable, false to disable.
1677 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1682 # Remove a device from a guest
1684 # @id: the name of the device
1686 # Returns: Nothing on success
1687 # If @id is not a valid device, DeviceNotFound
1689 # Notes: When this command completes, the device may not be removed from the
1690 # guest. Hot removal is an operation that requires guest cooperation.
1691 # This command merely requests that the guest begin the hot removal
1692 # process. Completion of the device removal process is signaled with a
1693 # DEVICE_DELETED event. Guest reset will automatically complete removal
1698 { 'command': 'device_del', 'data': {'id': 'str'} }
1701 # @DumpGuestMemoryFormat:
1703 # An enumeration of guest-memory-dump's format.
1707 # @kdump-zlib: kdump-compressed format with zlib-compressed
1709 # @kdump-lzo: kdump-compressed format with lzo-compressed
1711 # @kdump-snappy: kdump-compressed format with snappy-compressed
1715 { 'enum': 'DumpGuestMemoryFormat',
1716 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
1719 # @dump-guest-memory
1721 # Dump guest's memory to vmcore. It is a synchronous operation that can take
1722 # very long depending on the amount of guest memory. This command is only
1723 # supported on i386 and x86_64.
1725 # @paging: if true, do paging to get guest's memory mapping. This allows
1726 # using gdb to process the core file.
1728 # IMPORTANT: this option can make QEMU allocate several gigabytes
1729 # of RAM. This can happen for a large guest, or a
1730 # malicious guest pretending to be large.
1732 # Also, paging=true has the following limitations:
1734 # 1. The guest may be in a catastrophic state or can have corrupted
1735 # memory, which cannot be trusted
1736 # 2. The guest can be in real-mode even if paging is enabled. For
1737 # example, the guest uses ACPI to sleep, and ACPI sleep state
1740 # @protocol: the filename or file descriptor of the vmcore. The supported
1743 # 1. file: the protocol starts with "file:", and the following
1744 # string is the file's path.
1745 # 2. fd: the protocol starts with "fd:", and the following string
1748 # @begin: #optional if specified, the starting physical address.
1750 # @length: #optional if specified, the memory size, in bytes. If you don't
1751 # want to dump all guest's memory, please specify the start @begin
1754 # @format: #optional if specified, the format of guest memory dump. But non-elf
1755 # format is conflict with paging and filter, ie. @paging, @begin and
1756 # @length is not allowed to be specified with non-elf @format at the
1757 # same time (since 2.0)
1759 # Returns: nothing on success
1763 { 'command': 'dump-guest-memory',
1764 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
1765 '*length': 'int', '*format': 'DumpGuestMemoryFormat' } }
1768 # @DumpGuestMemoryCapability:
1770 # A list of the available formats for dump-guest-memory
1774 { 'type': 'DumpGuestMemoryCapability',
1776 'formats': ['DumpGuestMemoryFormat'] } }
1779 # @query-dump-guest-memory-capability:
1781 # Returns the available formats for dump-guest-memory
1783 # Returns: A @DumpGuestMemoryCapability object listing available formats for
1788 { 'command': 'query-dump-guest-memory-capability',
1789 'returns': 'DumpGuestMemoryCapability' }
1794 # Add a network backend.
1796 # @type: the type of network backend. Current valid values are 'user', 'tap',
1797 # 'vde', 'socket', 'dump' and 'bridge'
1799 # @id: the name of the new network backend
1801 # @props: #optional a list of properties to be passed to the backend in
1802 # the format 'name=value', like 'ifname=tap0,script=no'
1804 # Notes: The semantics of @props is not well defined. Future commands will be
1805 # introduced that provide stronger typing for backend creation.
1809 # Returns: Nothing on success
1810 # If @type is not a valid network backend, DeviceNotFound
1812 { 'command': 'netdev_add',
1813 'data': {'type': 'str', 'id': 'str', '*props': '**'},
1819 # Remove a network backend.
1821 # @id: the name of the network backend to remove
1823 # Returns: Nothing on success
1824 # If @id is not a valid network backend, DeviceNotFound
1828 { 'command': 'netdev_del', 'data': {'id': 'str'} }
1833 # Create a QOM object.
1835 # @qom-type: the class name for the object to be created
1837 # @id: the name of the new object
1839 # @props: #optional a dictionary of properties to be passed to the backend
1841 # Returns: Nothing on success
1842 # Error if @qom-type is not a valid class name
1846 { 'command': 'object-add',
1847 'data': {'qom-type': 'str', 'id': 'str', '*props': 'dict'},
1853 # Remove a QOM object.
1855 # @id: the name of the QOM object to remove
1857 # Returns: Nothing on success
1858 # Error if @id is not a valid id for a QOM object
1862 { 'command': 'object-del', 'data': {'id': 'str'} }
1865 # @NetdevNoneOptions
1867 # Use it alone to have zero network devices.
1871 { 'type': 'NetdevNoneOptions',
1875 # @NetLegacyNicOptions
1877 # Create a new Network Interface Card.
1879 # @netdev: #optional id of -netdev to connect to
1881 # @macaddr: #optional MAC address
1883 # @model: #optional device model (e1000, rtl8139, virtio etc.)
1885 # @addr: #optional PCI device address
1887 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
1891 { 'type': 'NetLegacyNicOptions',
1897 '*vectors': 'uint32' } }
1902 # A fat type wrapping 'str', to be embedded in lists.
1911 # @NetdevUserOptions
1913 # Use the user mode network stack which requires no administrator privilege to
1916 # @hostname: #optional client hostname reported by the builtin DHCP server
1918 # @restrict: #optional isolate the guest from the host
1920 # @ip: #optional legacy parameter, use net= instead
1922 # @net: #optional IP address and optional netmask
1924 # @host: #optional guest-visible address of the host
1926 # @tftp: #optional root directory of the built-in TFTP server
1928 # @bootfile: #optional BOOTP filename, for use with tftp=
1930 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
1933 # @dns: #optional guest-visible address of the virtual nameserver
1935 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
1938 # @smb: #optional root directory of the built-in SMB server
1940 # @smbserver: #optional IP address of the built-in SMB server
1942 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
1945 # @guestfwd: #optional forward guest TCP connections
1949 { 'type': 'NetdevUserOptions',
1952 '*restrict': 'bool',
1958 '*dhcpstart': 'str',
1960 '*dnssearch': ['String'],
1962 '*smbserver': 'str',
1963 '*hostfwd': ['String'],
1964 '*guestfwd': ['String'] } }
1969 # Connect the host TAP network interface name to the VLAN.
1971 # @ifname: #optional interface name
1973 # @fd: #optional file descriptor of an already opened tap
1975 # @fds: #optional multiple file descriptors of already opened multiqueue capable
1978 # @script: #optional script to initialize the interface
1980 # @downscript: #optional script to shut down the interface
1982 # @helper: #optional command to execute to configure bridge
1984 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
1986 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
1988 # @vhost: #optional enable vhost-net network accelerator
1990 # @vhostfd: #optional file descriptor of an already opened vhost net device
1992 # @vhostfds: #optional file descriptors of multiple already opened vhost net
1995 # @vhostforce: #optional vhost on for non-MSIX virtio guests
1997 # @queues: #optional number of queues to be created for multiqueue capable tap
2001 { 'type': 'NetdevTapOptions',
2007 '*downscript': 'str',
2010 '*vnet_hdr': 'bool',
2014 '*vhostforce': 'bool',
2015 '*queues': 'uint32'} }
2018 # @NetdevSocketOptions
2020 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2021 # socket connection.
2023 # @fd: #optional file descriptor of an already opened socket
2025 # @listen: #optional port number, and optional hostname, to listen on
2027 # @connect: #optional port number, and optional hostname, to connect to
2029 # @mcast: #optional UDP multicast address and port number
2031 # @localaddr: #optional source address and port for multicast and udp packets
2033 # @udp: #optional UDP unicast address and port number
2037 { 'type': 'NetdevSocketOptions',
2043 '*localaddr': 'str',
2049 # Connect the VLAN to a vde switch running on the host.
2051 # @sock: #optional socket path
2053 # @port: #optional port number
2055 # @group: #optional group owner of socket
2057 # @mode: #optional permissions for socket
2061 { 'type': 'NetdevVdeOptions',
2066 '*mode': 'uint16' } }
2069 # @NetdevDumpOptions
2071 # Dump VLAN network traffic to a file.
2073 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2076 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2080 { 'type': 'NetdevDumpOptions',
2086 # @NetdevBridgeOptions
2088 # Connect a host TAP network interface to a host bridge device.
2090 # @br: #optional bridge name
2092 # @helper: #optional command to execute to configure bridge
2096 { 'type': 'NetdevBridgeOptions',
2099 '*helper': 'str' } }
2102 # @NetdevHubPortOptions
2104 # Connect two or more net clients through a software hub.
2106 # @hubid: hub identifier number
2110 { 'type': 'NetdevHubPortOptions',
2112 'hubid': 'int32' } }
2115 # @NetdevNetmapOptions
2117 # Connect a client to a netmap-enabled NIC or to a VALE switch port
2119 # @ifname: Either the name of an existing network interface supported by
2120 # netmap, or the name of a VALE port (created on the fly).
2121 # A VALE port name is in the form 'valeXXX:YYY', where XXX and
2122 # YYY are non-negative integers. XXX identifies a switch and
2123 # YYY identifies a port of the switch. VALE ports having the
2124 # same XXX are therefore connected to the same switch.
2126 # @devname: #optional path of the netmap device (default: '/dev/netmap').
2130 { 'type': 'NetdevNetmapOptions',
2133 '*devname': 'str' } }
2136 # @NetdevVhostUserOptions
2138 # Vhost-user network backend
2140 # @chardev: name of a unix socket chardev
2142 # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
2146 { 'type': 'NetdevVhostUserOptions',
2149 '*vhostforce': 'bool' } }
2154 # A discriminated record of network device traits.
2158 { 'union': 'NetClientOptions',
2160 'none': 'NetdevNoneOptions',
2161 'nic': 'NetLegacyNicOptions',
2162 'user': 'NetdevUserOptions',
2163 'tap': 'NetdevTapOptions',
2164 'socket': 'NetdevSocketOptions',
2165 'vde': 'NetdevVdeOptions',
2166 'dump': 'NetdevDumpOptions',
2167 'bridge': 'NetdevBridgeOptions',
2168 'hubport': 'NetdevHubPortOptions',
2169 'netmap': 'NetdevNetmapOptions',
2170 'vhost-user': 'NetdevVhostUserOptions' } }
2175 # Captures the configuration of a network device; legacy.
2177 # @vlan: #optional vlan number
2179 # @id: #optional identifier for monitor commands
2181 # @name: #optional identifier for monitor commands, ignored if @id is present
2183 # @opts: device type specific properties (legacy)
2187 { 'type': 'NetLegacy',
2192 'opts': 'NetClientOptions' } }
2197 # Captures the configuration of a network device.
2199 # @id: identifier for monitor commands.
2201 # @opts: device type specific properties
2208 'opts': 'NetClientOptions' } }
2211 # @InetSocketAddress
2213 # Captures a socket address or address range in the Internet namespace.
2215 # @host: host part of the address
2217 # @port: port part of the address, or lowest port if @to is present
2219 # @to: highest port to try
2221 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2224 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2229 { 'type': 'InetSocketAddress',
2238 # @UnixSocketAddress
2240 # Captures a socket address in the local ("Unix socket") namespace.
2242 # @path: filesystem path to use
2246 { 'type': 'UnixSocketAddress',
2253 # Captures the address of a socket, which could also be a named file descriptor
2257 { 'union': 'SocketAddress',
2259 'inet': 'InetSocketAddress',
2260 'unix': 'UnixSocketAddress',
2266 # Receive a file descriptor via SCM rights and assign it a name
2268 # @fdname: file descriptor name
2270 # Returns: Nothing on success
2274 # Notes: If @fdname already exists, the file descriptor assigned to
2275 # it will be closed and replaced by the received file
2277 # The 'closefd' command can be used to explicitly close the
2278 # file descriptor when it is no longer needed.
2280 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2285 # Close a file descriptor previously passed via SCM rights
2287 # @fdname: file descriptor name
2289 # Returns: Nothing on success
2293 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2298 # Information describing a machine.
2300 # @name: the name of the machine
2302 # @alias: #optional an alias for the machine name
2304 # @default: #optional whether the machine is default
2306 # @cpu-max: maximum number of CPUs supported by the machine type
2311 { 'type': 'MachineInfo',
2312 'data': { 'name': 'str', '*alias': 'str',
2313 '*is-default': 'bool', 'cpu-max': 'int' } }
2318 # Return a list of supported machines
2320 # Returns: a list of MachineInfo
2324 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2327 # @CpuDefinitionInfo:
2329 # Virtual CPU definition.
2331 # @name: the name of the CPU definition
2335 { 'type': 'CpuDefinitionInfo',
2336 'data': { 'name': 'str' } }
2339 # @query-cpu-definitions:
2341 # Return a list of supported virtual CPU definitions
2343 # Returns: a list of CpuDefInfo
2347 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2351 # Information about a file descriptor that was added to an fd set.
2353 # @fdset-id: The ID of the fd set that @fd was added to.
2355 # @fd: The file descriptor that was received via SCM rights and
2356 # added to the fd set.
2360 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2365 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2367 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2369 # @opaque: #optional A free-form string that can be used to describe the fd.
2371 # Returns: @AddfdInfo on success
2372 # If file descriptor was not received, FdNotSupplied
2373 # If @fdset-id is a negative value, InvalidParameterValue
2375 # Notes: The list of fd sets is shared by all monitor connections.
2377 # If @fdset-id is not specified, a new fd set will be created.
2381 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2382 'returns': 'AddfdInfo' }
2387 # Remove a file descriptor from an fd set.
2389 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2391 # @fd: #optional The file descriptor that is to be removed.
2393 # Returns: Nothing on success
2394 # If @fdset-id or @fd is not found, FdNotFound
2398 # Notes: The list of fd sets is shared by all monitor connections.
2400 # If @fd is not specified, all file descriptors in @fdset-id
2403 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2408 # Information about a file descriptor that belongs to an fd set.
2410 # @fd: The file descriptor value.
2412 # @opaque: #optional A free-form string that can be used to describe the fd.
2416 { 'type': 'FdsetFdInfo',
2417 'data': {'fd': 'int', '*opaque': 'str'} }
2422 # Information about an fd set.
2424 # @fdset-id: The ID of the fd set.
2426 # @fds: A list of file descriptors that belong to this fd set.
2430 { 'type': 'FdsetInfo',
2431 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2436 # Return information describing all fd sets.
2438 # Returns: A list of @FdsetInfo
2442 # Note: The list of fd sets is shared by all monitor connections.
2445 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2450 # Information describing the QEMU target.
2452 # @arch: the target architecture (eg "x86_64", "i386", etc)
2456 { 'type': 'TargetInfo',
2457 'data': { 'arch': 'str' } }
2462 # Return information about the target for this QEMU
2464 # Returns: TargetInfo
2468 { 'command': 'query-target', 'returns': 'TargetInfo' }
2473 # An enumeration of key name.
2475 # This is used by the send-key command.
2479 # 'unmapped' and 'pause' since 2.0
2481 { 'enum': 'QKeyCode',
2482 'data': [ 'unmapped',
2483 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
2484 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
2485 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
2486 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
2487 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
2488 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
2489 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
2490 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
2491 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
2492 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
2493 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
2494 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
2495 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
2496 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
2497 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause' ] }
2502 # Represents a keyboard key.
2506 { 'union': 'KeyValue',
2509 'qcode': 'QKeyCode' } }
2514 # Send keys to guest.
2516 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
2517 # simultaneously sent to the guest. A @KeyValue.number value is sent
2518 # directly to the guest, while @KeyValue.qcode must be a valid
2521 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
2524 # Returns: Nothing on success
2525 # If key is unknown or redundant, InvalidParameter
2530 { 'command': 'send-key',
2531 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
2536 # Write a PPM of the VGA screen to a file.
2538 # @filename: the path of a new PPM file to store the image
2540 # Returns: Nothing on success
2544 { 'command': 'screendump', 'data': {'filename': 'str'} }
2549 # Configuration info for file chardevs.
2551 # @in: #optional The name of the input file
2552 # @out: The name of the output file
2556 { 'type': 'ChardevFile', 'data': { '*in' : 'str',
2562 # Configuration info for device and pipe chardevs.
2564 # @device: The name of the special file for the device,
2565 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
2566 # @type: What kind of device this is.
2570 { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
2575 # Configuration info for (stream) socket chardevs.
2577 # @addr: socket address to listen on (server=true)
2578 # or connect to (server=false)
2579 # @server: #optional create server socket (default: true)
2580 # @wait: #optional wait for incoming connection on server
2581 # sockets (default: false).
2582 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
2583 # @telnet: #optional enable telnet protocol on server
2584 # sockets (default: false)
2588 { 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
2591 '*nodelay' : 'bool',
2592 '*telnet' : 'bool' } }
2597 # Configuration info for datagram socket chardevs.
2599 # @remote: remote address
2600 # @local: #optional local address
2604 { 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
2605 '*local' : 'SocketAddress' } }
2610 # Configuration info for mux chardevs.
2612 # @chardev: name of the base chardev.
2616 { 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
2621 # Configuration info for stdio chardevs.
2623 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
2624 # be delivered to qemu. Default: true in -nographic mode,
2629 { 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
2632 # @ChardevSpiceChannel:
2634 # Configuration info for spice vm channel chardevs.
2636 # @type: kind of channel (for example vdagent).
2640 { 'type': 'ChardevSpiceChannel', 'data': { 'type' : 'str' } }
2643 # @ChardevSpicePort:
2645 # Configuration info for spice port chardevs.
2647 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
2651 { 'type': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' } }
2656 # Configuration info for virtual console chardevs.
2658 # @width: console width, in pixels
2659 # @height: console height, in pixels
2660 # @cols: console width, in chars
2661 # @rows: console height, in chars
2665 { 'type': 'ChardevVC', 'data': { '*width' : 'int',
2673 # Configuration info for ring buffer chardevs.
2675 # @size: #optional ring buffer size, must be power of two, default is 65536
2679 { 'type': 'ChardevRingbuf', 'data': { '*size' : 'int' } }
2684 # Configuration info for the new chardev backend.
2688 { 'type': 'ChardevDummy', 'data': { } }
2690 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
2691 'serial' : 'ChardevHostdev',
2692 'parallel': 'ChardevHostdev',
2693 'pipe' : 'ChardevHostdev',
2694 'socket' : 'ChardevSocket',
2695 'udp' : 'ChardevUdp',
2696 'pty' : 'ChardevDummy',
2697 'null' : 'ChardevDummy',
2698 'mux' : 'ChardevMux',
2699 'msmouse': 'ChardevDummy',
2700 'braille': 'ChardevDummy',
2701 'stdio' : 'ChardevStdio',
2702 'console': 'ChardevDummy',
2703 'spicevmc' : 'ChardevSpiceChannel',
2704 'spiceport' : 'ChardevSpicePort',
2706 'ringbuf': 'ChardevRingbuf',
2707 # next one is just for compatibility
2708 'memory' : 'ChardevRingbuf' } }
2713 # Return info about the chardev backend just created.
2715 # @pty: #optional name of the slave pseudoterminal device, present if
2716 # and only if a chardev of type 'pty' was created
2720 { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
2725 # Add a character device backend
2727 # @id: the chardev's ID, must be unique
2728 # @backend: backend type and parameters
2730 # Returns: ChardevReturn.
2734 { 'command': 'chardev-add', 'data': {'id' : 'str',
2735 'backend' : 'ChardevBackend' },
2736 'returns': 'ChardevReturn' }
2741 # Remove a character device backend
2743 # @id: the chardev's ID, must exist and not be in use
2745 # Returns: Nothing on success
2749 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
2754 # An enumeration of TPM models
2756 # @tpm-tis: TPM TIS model
2760 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
2763 # @query-tpm-models:
2765 # Return a list of supported TPM models
2767 # Returns: a list of TpmModel
2771 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
2776 # An enumeration of TPM types
2778 # @passthrough: TPM passthrough type
2782 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
2787 # Return a list of supported TPM types
2789 # Returns: a list of TpmType
2793 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
2796 # @TPMPassthroughOptions:
2798 # Information about the TPM passthrough type
2800 # @path: #optional string describing the path used for accessing the TPM device
2802 # @cancel-path: #optional string showing the TPM's sysfs cancel file
2803 # for cancellation of TPM commands while they are executing
2807 { 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
2808 '*cancel-path' : 'str'} }
2813 # A union referencing different TPM backend types' configuration options
2815 # @passthrough: The configuration options for the TPM passthrough type
2819 { 'union': 'TpmTypeOptions',
2820 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
2825 # Information about the TPM
2827 # @id: The Id of the TPM
2829 # @model: The TPM frontend model
2831 # @options: The TPM (backend) type configuration options
2835 { 'type': 'TPMInfo',
2836 'data': {'id': 'str',
2837 'model': 'TpmModel',
2838 'options': 'TpmTypeOptions' } }
2843 # Return information about the TPM device
2845 # Returns: @TPMInfo on success
2849 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
2854 # Specify an ACPI table on the command line to load.
2856 # At most one of @file and @data can be specified. The list of files specified
2857 # by any one of them is loaded and concatenated in order. If both are omitted,
2860 # Other fields / optargs can be used to override fields of the generic ACPI
2861 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
2862 # Description Table Header. If a header field is not overridden, then the
2863 # corresponding value from the concatenated blob is used (in case of @file), or
2864 # it is filled in with a hard-coded value (in case of @data).
2866 # String fields are copied into the matching ACPI member from lowest address
2867 # upwards, and silently truncated / NUL-padded to length.
2869 # @sig: #optional table signature / identifier (4 bytes)
2871 # @rev: #optional table revision number (dependent on signature, 1 byte)
2873 # @oem_id: #optional OEM identifier (6 bytes)
2875 # @oem_table_id: #optional OEM table identifier (8 bytes)
2877 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
2879 # @asl_compiler_id: #optional identifier of the utility that created the table
2882 # @asl_compiler_rev: #optional revision number of the utility that created the
2885 # @file: #optional colon (:) separated list of pathnames to load and
2886 # concatenate as table data. The resultant binary blob is expected to
2887 # have an ACPI table header. At least one file is required. This field
2890 # @data: #optional colon (:) separated list of pathnames to load and
2891 # concatenate as table data. The resultant binary blob must not have an
2892 # ACPI table header. At least one file is required. This field excludes
2897 { 'type': 'AcpiTableOptions',
2902 '*oem_table_id': 'str',
2903 '*oem_rev': 'uint32',
2904 '*asl_compiler_id': 'str',
2905 '*asl_compiler_rev': 'uint32',
2910 # @CommandLineParameterType:
2912 # Possible types for an option parameter.
2914 # @string: accepts a character string
2916 # @boolean: accepts "on" or "off"
2918 # @number: accepts a number
2920 # @size: accepts a number followed by an optional suffix (K)ilo,
2921 # (M)ega, (G)iga, (T)era
2925 { 'enum': 'CommandLineParameterType',
2926 'data': ['string', 'boolean', 'number', 'size'] }
2929 # @CommandLineParameterInfo:
2931 # Details about a single parameter of a command line option.
2933 # @name: parameter name
2935 # @type: parameter @CommandLineParameterType
2937 # @help: #optional human readable text string, not suitable for parsing.
2939 # @default: #optional default value string (since 2.1)
2943 { 'type': 'CommandLineParameterInfo',
2944 'data': { 'name': 'str',
2945 'type': 'CommandLineParameterType',
2947 '*default': 'str' } }
2950 # @CommandLineOptionInfo:
2952 # Details about a command line option, including its list of parameter details
2954 # @option: option name
2956 # @parameters: an array of @CommandLineParameterInfo
2960 { 'type': 'CommandLineOptionInfo',
2961 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
2964 # @query-command-line-options:
2966 # Query command line option schema.
2968 # @option: #optional option name
2970 # Returns: list of @CommandLineOptionInfo for all options (or for the given
2971 # @option). Returns an error if the given @option doesn't exist.
2975 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
2976 'returns': ['CommandLineOptionInfo'] }
2981 # A X86 32-bit register
2985 { 'enum': 'X86CPURegister32',
2986 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
2989 # @X86CPUFeatureWordInfo
2991 # Information about a X86 CPU feature word
2993 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
2995 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
2998 # @cpuid-register: Output register containing the feature bits
3000 # @features: value of output register, containing the feature bits
3004 { 'type': 'X86CPUFeatureWordInfo',
3005 'data': { 'cpuid-input-eax': 'int',
3006 '*cpuid-input-ecx': 'int',
3007 'cpuid-register': 'X86CPURegister32',
3008 'features': 'int' } }
3013 # Packets receiving state
3015 # @normal: filter assigned packets according to the mac-table
3017 # @none: don't receive any assigned packet
3019 # @all: receive all assigned packets
3023 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
3028 # Rx-filter information for a NIC.
3030 # @name: net client name
3032 # @promiscuous: whether promiscuous mode is enabled
3034 # @multicast: multicast receive state
3036 # @unicast: unicast receive state
3038 # @vlan: vlan receive state (Since 2.0)
3040 # @broadcast-allowed: whether to receive broadcast
3042 # @multicast-overflow: multicast table is overflowed or not
3044 # @unicast-overflow: unicast table is overflowed or not
3046 # @main-mac: the main macaddr string
3048 # @vlan-table: a list of active vlan id
3050 # @unicast-table: a list of unicast macaddr string
3052 # @multicast-table: a list of multicast macaddr string
3057 { 'type': 'RxFilterInfo',
3060 'promiscuous': 'bool',
3061 'multicast': 'RxState',
3062 'unicast': 'RxState',
3064 'broadcast-allowed': 'bool',
3065 'multicast-overflow': 'bool',
3066 'unicast-overflow': 'bool',
3068 'vlan-table': ['int'],
3069 'unicast-table': ['str'],
3070 'multicast-table': ['str'] }}
3075 # Return rx-filter information for all NICs (or for the given NIC).
3077 # @name: #optional net client name
3079 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
3080 # Returns an error if the given @name doesn't exist, or given
3081 # NIC doesn't support rx-filter querying, or given net client
3086 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
3087 'returns': ['RxFilterInfo'] }
3092 # Button of a pointer input device (mouse, tablet).
3096 { 'enum' : 'InputButton',
3097 'data' : [ 'Left', 'Middle', 'Right', 'WheelUp', 'WheelDown' ] }
3102 # Position axis of a pointer input device (mouse, tablet).
3106 { 'enum' : 'InputAxis',
3107 'data' : [ 'X', 'Y' ] }
3112 # Keyboard input event.
3114 # @key: Which key this event is for.
3115 # @down: True for key-down and false for key-up events.
3119 { 'type' : 'InputKeyEvent',
3120 'data' : { 'key' : 'KeyValue',
3126 # Pointer button input event.
3128 # @button: Which button this event is for.
3129 # @down: True for key-down and false for key-up events.
3133 { 'type' : 'InputBtnEvent',
3134 'data' : { 'button' : 'InputButton',
3140 # Pointer motion input event.
3142 # @axis: Which axis is referenced by @value.
3143 # @value: Pointer position. For absolute coordinates the
3144 # valid range is 0 -> 0x7ffff
3148 { 'type' : 'InputMoveEvent',
3149 'data' : { 'axis' : 'InputAxis',
3155 # Input event union.
3159 { 'union' : 'InputEvent',
3160 'data' : { 'key' : 'InputKeyEvent',
3161 'btn' : 'InputBtnEvent',
3162 'rel' : 'InputMoveEvent',
3163 'abs' : 'InputMoveEvent' } }
3168 # A discriminated record of NUMA options. (for OptsVisitor)
3172 { 'union': 'NumaOptions',
3174 'node': 'NumaNodeOptions' }}
3179 # Create a guest NUMA node. (for OptsVisitor)
3181 # @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
3183 # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
3186 # @mem: #optional memory size of this node; mutually exclusive with @memdev.
3187 # Equally divide total memory among nodes if both @mem and @memdev are
3190 # @memdev: #optional memory backend object. If specified for one node,
3191 # it must be specified for all nodes.
3195 { 'type': 'NumaNodeOptions',
3197 '*nodeid': 'uint16',
3198 '*cpus': ['uint16'],
3205 # Host memory policy types
3207 # @default: restore default policy, remove any nondefault policy
3209 # @preferred: set the preferred host nodes for allocation
3211 # @bind: a strict policy that restricts memory allocation to the
3212 # host nodes specified
3214 # @interleave: memory allocations are interleaved across the set
3215 # of host nodes specified
3219 { 'enum': 'HostMemPolicy',
3220 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
3225 # Information about memory backend
3227 # @size: memory backend size
3229 # @merge: enables or disables memory merge support
3231 # @dump: includes memory backend's memory in a core dump or not
3233 # @prealloc: enables or disables memory preallocation
3235 # @host-nodes: host nodes for its memory policy
3237 # @policy: memory policy of memory backend
3248 'host-nodes': ['uint16'],
3249 'policy': 'HostMemPolicy' }}
3254 # Returns information for all memory backends.
3256 # Returns: a list of @Memdev.
3260 { 'command': 'query-memdev', 'returns': ['Memdev'] }
3263 # @PCDIMMDeviceInfo:
3265 # PCDIMMDevice state information
3267 # @id: #optional device's ID
3269 # @addr: physical address, where device is mapped
3271 # @size: size of memory that the device provides
3273 # @slot: slot number at which device is plugged in
3275 # @node: NUMA node number where device is plugged in
3277 # @memdev: memory backend linked with device
3279 # @hotplugged: true if device was hotplugged
3281 # @hotpluggable: true if device if could be added/removed while machine is running
3285 { 'type': 'PCDIMMDeviceInfo',
3286 'data': { '*id': 'str',
3292 'hotplugged': 'bool',
3293 'hotpluggable': 'bool'
3298 # @MemoryDeviceInfo:
3300 # Union containing information about a memory device
3304 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
3307 # @query-memory-devices
3309 # Lists available memory devices and their state
3313 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
3317 # @DIMM: memory slot
3319 { 'enum': 'ACPISlotType', 'data': [ 'DIMM' ] }
3323 # OSPM Status Indication for a device
3324 # For description of possible values of @source and @status fields
3325 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
3327 # @device: #optional device ID associated with slot
3329 # @slot: slot ID, unique per slot of a given @slot-type
3331 # @slot-type: type of the slot
3333 # @source: an integer containing the source event
3335 # @status: an integer containing the status code
3339 { 'type': 'ACPIOSTInfo',
3340 'data' : { '*device': 'str',
3342 'slot-type': 'ACPISlotType',
3347 # @query-acpi-ospm-status
3349 # Lists ACPI OSPM status of ACPI device objects,
3350 # which might be reported via _OST method
3354 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
3357 # @WatchdogExpirationAction
3359 # An enumeration of the actions taken when the watchdog device's timer is
3362 # @reset: system resets
3364 # @shutdown: system shutdown, note that it is similar to @powerdown, which
3365 # tries to set to system status and notify guest
3367 # @poweroff: system poweroff, the emulator program exits
3369 # @pause: system pauses, similar to @stop
3371 # @debug: system enters debug state
3373 # @none: nothing is done
3377 { 'enum': 'WatchdogExpirationAction',
3378 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none' ] }
3383 # An enumeration of the I/O operation types
3385 # @read: read operation
3387 # @write: write operation
3391 { 'enum': 'IoOperationType',
3392 'data': [ 'read', 'write' ] }
3397 # An enumeration of the actions taken when guest OS panic is detected
3399 # @pause: system pauses
3403 { 'enum': 'GuestPanicAction',
3404 'data': [ 'pause' ] }