target-arm: Make the ARM PMCCNTR register 64-bit
[qemu.git] / qapi-schema.json
blob689b548abfd6620b3694650563f7fe8b5b27d175
1 # -*- Mode: Python -*-
3 # QAPI Schema
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' }
15 # LostTickPolicy:
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
28 #         of ticks
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.
33 # Since: 2.0
35 { 'enum': 'LostTickPolicy',
36   'data': ['discard', 'delay', 'merge', 'slew' ] }
38 # @add_client
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"
52 #       protocol
54 # Returns: nothing on success.
56 # Since: 0.14.0
58 { 'command': 'add_client',
59   'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
60             '*tls': 'bool' } }
63 # @NameInfo:
65 # Guest name information.
67 # @name: #optional The name of the guest
69 # Since 0.14.0
71 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
74 # @query-name:
76 # Return the name information of a guest.
78 # Returns: @NameInfo of the guest
80 # Since 0.14.0
82 { 'command': 'query-name', 'returns': 'NameInfo' }
85 # @KvmInfo:
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
93 # Since: 0.14.0
95 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
98 # @query-kvm:
100 # Returns information about KVM acceleration
102 # Returns: @KvmInfo
104 # Since: 0.14.0
106 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
109 # @RunState
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
121 # started.
123 # @internal-error: An internal error that prevents further guest execution
124 # has occurred
126 # @io-error: the last IOP has failed and the device is configured to pause
127 # on I/O errors
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',
153             'guest-panicked' ] }
156 # @StatusInfo:
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
166 # Since:  0.14.0
168 # Notes: @singlestep is enabled through the GDB stub
170 { 'type': 'StatusInfo',
171   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
174 # @query-status:
176 # Query the run status of all VCPUs
178 # Returns: @StatusInfo reflecting all VCPUs
180 # Since:  0.14.0
182 { 'command': 'query-status', 'returns': 'StatusInfo' }
185 # @UuidInfo:
187 # Guest UUID information.
189 # @UUID: the UUID of the guest
191 # Since: 0.14.0
193 # Notes: If no UUID was specified for the guest, a null UUID is returned.
195 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
198 # @query-uuid:
200 # Query the guest UUID information.
202 # Returns: The @UuidInfo for the guest
204 # Since 0.14.0
206 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
209 # @ChardevInfo:
211 # Information about a character device.
213 # @label: the label of the character device
215 # @filename: the filename of the character device
217 # @frontend-open: shows whether the frontend device attached to this backend
218 #                 (eg. with the chardev=... option) is in open or closed state
219 #                 (since 2.1)
221 # Notes: @filename is encoded using the QEMU command line character device
222 #        encoding.  See the QEMU man page for details.
224 # Since: 0.14.0
226 { 'type': 'ChardevInfo', 'data': {'label': 'str',
227                                   'filename': 'str',
228                                   'frontend-open': 'bool'} }
231 # @query-chardev:
233 # Returns information about current character devices.
235 # Returns: a list of @ChardevInfo
237 # Since: 0.14.0
239 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
242 # @ChardevBackendInfo:
244 # Information about a character device backend
246 # @name: The backend name
248 # Since: 2.0
250 { 'type': 'ChardevBackendInfo', 'data': {'name': 'str'} }
253 # @query-chardev-backends:
255 # Returns information about character device backends.
257 # Returns: a list of @ChardevBackendInfo
259 # Since: 2.0
261 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
264 # @DataFormat:
266 # An enumeration of data format.
268 # @utf8: Data is a UTF-8 string (RFC 3629)
270 # @base64: Data is Base64 encoded binary (RFC 3548)
272 # Since: 1.4
274 { 'enum': 'DataFormat',
275   'data': [ 'utf8', 'base64' ] }
278 # @ringbuf-write:
280 # Write to a ring buffer character device.
282 # @device: the ring buffer character device name
284 # @data: data to write
286 # @format: #optional data encoding (default 'utf8').
287 #          - base64: data must be base64 encoded text.  Its binary
288 #            decoding gets written.
289 #            Bug: invalid base64 is currently not rejected.
290 #            Whitespace *is* invalid.
291 #          - utf8: data's UTF-8 encoding is written
292 #          - data itself is always Unicode regardless of format, like
293 #            any other string.
295 # Returns: Nothing on success
297 # Since: 1.4
299 { 'command': 'ringbuf-write',
300   'data': {'device': 'str', 'data': 'str',
301            '*format': 'DataFormat'} }
304 # @ringbuf-read:
306 # Read from a ring buffer character device.
308 # @device: the ring buffer character device name
310 # @size: how many bytes to read at most
312 # @format: #optional data encoding (default 'utf8').
313 #          - base64: the data read is returned in base64 encoding.
314 #          - utf8: the data read is interpreted as UTF-8.
315 #            Bug: can screw up when the buffer contains invalid UTF-8
316 #            sequences, NUL characters, after the ring buffer lost
317 #            data, and when reading stops because the size limit is
318 #            reached.
319 #          - The return value is always Unicode regardless of format,
320 #            like any other string.
322 # Returns: data read from the device
324 # Since: 1.4
326 { 'command': 'ringbuf-read',
327   'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
328   'returns': 'str' }
331 # @EventInfo:
333 # Information about a QMP event
335 # @name: The event name
337 # Since: 1.2.0
339 { 'type': 'EventInfo', 'data': {'name': 'str'} }
342 # @query-events:
344 # Return a list of supported QMP events by this server
346 # Returns: A list of @EventInfo for all supported events
348 # Since: 1.2.0
350 { 'command': 'query-events', 'returns': ['EventInfo'] }
353 # @MigrationStats
355 # Detailed migration status.
357 # @transferred: amount of bytes already transferred to the target VM
359 # @remaining: amount of bytes remaining to be transferred to the target VM
361 # @total: total amount of bytes involved in the migration process
363 # @duplicate: number of duplicate (zero) pages (since 1.2)
365 # @skipped: number of skipped zero pages (since 1.5)
367 # @normal : number of normal pages (since 1.2)
369 # @normal-bytes: number of normal bytes sent (since 1.2)
371 # @dirty-pages-rate: number of pages dirtied by second by the
372 #        guest (since 1.3)
374 # @mbps: throughput in megabits/sec. (since 1.6)
376 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
378 # Since: 0.14.0
380 { 'type': 'MigrationStats',
381   'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
382            'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
383            'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
384            'mbps' : 'number', 'dirty-sync-count' : 'int' } }
387 # @XBZRLECacheStats
389 # Detailed XBZRLE migration cache statistics
391 # @cache-size: XBZRLE cache size
393 # @bytes: amount of bytes already transferred to the target VM
395 # @pages: amount of pages transferred to the target VM
397 # @cache-miss: number of cache miss
399 # @cache-miss-rate: rate of cache miss (since 2.1)
401 # @overflow: number of overflows
403 # Since: 1.2
405 { 'type': 'XBZRLECacheStats',
406   'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
407            'cache-miss': 'int', 'cache-miss-rate': 'number',
408            'overflow': 'int' } }
411 # @MigrationInfo
413 # Information about current migration process.
415 # @status: #optional string describing the current migration status.
416 #          As of 0.14.0 this can be 'setup', 'active', 'completed', 'failed' or
417 #          'cancelled'. If this field is not returned, no migration process
418 #          has been initiated
420 # @ram: #optional @MigrationStats containing detailed migration
421 #       status, only returned if status is 'active' or
422 #       'completed'. 'comppleted' (since 1.2)
424 # @disk: #optional @MigrationStats containing detailed disk migration
425 #        status, only returned if status is 'active' and it is a block
426 #        migration
428 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
429 #                migration statistics, only returned if XBZRLE feature is on and
430 #                status is 'active' or 'completed' (since 1.2)
432 # @total-time: #optional total amount of milliseconds since migration started.
433 #        If migration has ended, it returns the total migration
434 #        time. (since 1.2)
436 # @downtime: #optional only present when migration finishes correctly
437 #        total downtime in milliseconds for the guest.
438 #        (since 1.3)
440 # @expected-downtime: #optional only present while migration is active
441 #        expected downtime in milliseconds for the guest in last walk
442 #        of the dirty bitmap. (since 1.3)
444 # @setup-time: #optional amount of setup time in milliseconds _before_ the
445 #        iterations begin but _after_ the QMP command is issued. This is designed
446 #        to provide an accounting of any activities (such as RDMA pinning) which
447 #        may be expensive, but do not actually occur during the iterative
448 #        migration rounds themselves. (since 1.6)
450 # Since: 0.14.0
452 { 'type': 'MigrationInfo',
453   'data': {'*status': 'str', '*ram': 'MigrationStats',
454            '*disk': 'MigrationStats',
455            '*xbzrle-cache': 'XBZRLECacheStats',
456            '*total-time': 'int',
457            '*expected-downtime': 'int',
458            '*downtime': 'int',
459            '*setup-time': 'int'} }
462 # @query-migrate
464 # Returns information about current migration process.
466 # Returns: @MigrationInfo
468 # Since: 0.14.0
470 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
473 # @MigrationCapability
475 # Migration capabilities enumeration
477 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
478 #          This feature allows us to minimize migration traffic for certain work
479 #          loads, by sending compressed difference of the pages
481 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
482 #          mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
483 #          Disabled by default. (since 2.0)
485 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
486 #          essentially saves 1MB of zeroes per block on the wire. Enabling requires
487 #          source and target VM to support this feature. To enable it is sufficient
488 #          to enable the capability on the source VM. The feature is disabled by
489 #          default. (since 1.6)
491 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
492 #          to speed up convergence of RAM migration. (since 1.6)
494 # Since: 1.2
496 { 'enum': 'MigrationCapability',
497   'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks'] }
500 # @MigrationCapabilityStatus
502 # Migration capability information
504 # @capability: capability enum
506 # @state: capability state bool
508 # Since: 1.2
510 { 'type': 'MigrationCapabilityStatus',
511   'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
514 # @migrate-set-capabilities
516 # Enable/Disable the following migration capabilities (like xbzrle)
518 # @capabilities: json array of capability modifications to make
520 # Since: 1.2
522 { 'command': 'migrate-set-capabilities',
523   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
526 # @query-migrate-capabilities
528 # Returns information about the current migration capabilities status
530 # Returns: @MigrationCapabilitiesStatus
532 # Since: 1.2
534 { 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}
537 # @MouseInfo:
539 # Information about a mouse device.
541 # @name: the name of the mouse device
543 # @index: the index of the mouse device
545 # @current: true if this device is currently receiving mouse events
547 # @absolute: true if this device supports absolute coordinates as input
549 # Since: 0.14.0
551 { 'type': 'MouseInfo',
552   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
553            'absolute': 'bool'} }
556 # @query-mice:
558 # Returns information about each active mouse device
560 # Returns: a list of @MouseInfo for each device
562 # Since: 0.14.0
564 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
567 # @CpuInfo:
569 # Information about a virtual CPU
571 # @CPU: the index of the virtual CPU
573 # @current: this only exists for backwards compatible and should be ignored
575 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
576 #          to a processor specific low power mode.
578 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
579 #                pointer.
580 #                If the target is Sparc, this is the PC component of the
581 #                instruction pointer.
583 # @nip: #optional If the target is PPC, the instruction pointer
585 # @npc: #optional If the target is Sparc, the NPC component of the instruction
586 #                 pointer
588 # @PC: #optional If the target is MIPS, the instruction pointer
590 # @thread_id: ID of the underlying host thread
592 # Since: 0.14.0
594 # Notes: @halted is a transient state that changes frequently.  By the time the
595 #        data is sent to the client, the guest may no longer be halted.
597 { 'type': 'CpuInfo',
598   'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
599            '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
602 # @query-cpus:
604 # Returns a list of information about each virtual CPU.
606 # Returns: a list of @CpuInfo for each virtual CPU
608 # Since: 0.14.0
610 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
613 # @IOThreadInfo:
615 # Information about an iothread
617 # @id: the identifier of the iothread
619 # @thread-id: ID of the underlying host thread
621 # Since: 2.0
623 { 'type': 'IOThreadInfo',
624   'data': {'id': 'str', 'thread-id': 'int'} }
627 # @query-iothreads:
629 # Returns a list of information about each iothread.
631 # Note this list excludes the QEMU main loop thread, which is not declared
632 # using the -object iothread command-line option.  It is always the main thread
633 # of the process.
635 # Returns: a list of @IOThreadInfo for each iothread
637 # Since: 2.0
639 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
642 # @NetworkAddressFamily
644 # The network address family
646 # @ipv4: IPV4 family
648 # @ipv6: IPV6 family
650 # @unix: unix socket
652 # @unknown: otherwise
654 # Since: 2.1
656 { 'enum': 'NetworkAddressFamily',
657   'data': [ 'ipv4', 'ipv6', 'unix', 'unknown' ] }
660 # @VncBasicInfo
662 # The basic information for vnc network connection
664 # @host: IP address
666 # @service: The service name of the vnc port. This may depend on the host
667 #           system's service database so symbolic names should not be relied
668 #           on.
670 # @family: address family
672 # Since: 2.1
674 { 'type': 'VncBasicInfo',
675   'data': { 'host': 'str',
676             'service': 'str',
677             'family': 'NetworkAddressFamily' } }
680 # @VncServerInfo
682 # The network connection information for server
684 # @auth: #optional, authentication method
686 # Since: 2.1
688 { 'type': 'VncServerInfo',
689   'base': 'VncBasicInfo',
690   'data': { '*auth': 'str' } }
693 # @VncClientInfo:
695 # Information about a connected VNC client.
697 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
698 #              Name of the client.
700 # @sasl_username: #optional If SASL authentication is in use, the SASL username
701 #                 used for authentication.
703 # Since: 0.14.0
705 { 'type': 'VncClientInfo',
706   'base': 'VncBasicInfo',
707   'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
710 # @VncInfo:
712 # Information about the VNC session.
714 # @enabled: true if the VNC server is enabled, false otherwise
716 # @host: #optional The hostname the VNC server is bound to.  This depends on
717 #        the name resolution on the host and may be an IP address.
719 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
720 #                    'ipv4' if the host is listening for IPv4 connections
721 #                    'unix' if the host is listening on a unix domain socket
722 #                    'unknown' otherwise
724 # @service: #optional The service name of the server's port.  This may depends
725 #           on the host system's service database so symbolic names should not
726 #           be relied on.
728 # @auth: #optional the current authentication type used by the server
729 #        'none' if no authentication is being used
730 #        'vnc' if VNC authentication is being used
731 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
732 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
733 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
734 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
735 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
736 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
737 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
738 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
739 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
741 # @clients: a list of @VncClientInfo of all currently connected clients
743 # Since: 0.14.0
745 { 'type': 'VncInfo',
746   'data': {'enabled': 'bool', '*host': 'str',
747            '*family': 'NetworkAddressFamily',
748            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
751 # @query-vnc:
753 # Returns information about the current VNC server
755 # Returns: @VncInfo
757 # Since: 0.14.0
759 { 'command': 'query-vnc', 'returns': 'VncInfo' }
762 # @SpiceBasicInfo
764 # The basic information for SPICE network connection
766 # @host: IP address
768 # @port: port number
770 # @family: address family
772 # Since: 2.1
774 { 'type': 'SpiceBasicInfo',
775   'data': { 'host': 'str',
776             'port': 'str',
777             'family': 'NetworkAddressFamily' } }
780 # @SpiceServerInfo
782 # Information about a SPICE server
784 # @auth: #optional, authentication method
786 # Since: 2.1
788 { 'type': 'SpiceServerInfo',
789   'base': 'SpiceBasicInfo',
790   'data': { '*auth': 'str' } }
793 # @SpiceChannel
795 # Information about a SPICE client channel.
797 # @connection-id: SPICE connection id number.  All channels with the same id
798 #                 belong to the same SPICE session.
800 # @connection-type: SPICE channel type number.  "1" is the main control
801 #                   channel, filter for this one if you want to track spice
802 #                   sessions only
804 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
805 #              multiple channels of the same type exist, such as multiple
806 #              display channels in a multihead setup
808 # @tls: true if the channel is encrypted, false otherwise.
810 # Since: 0.14.0
812 { 'type': 'SpiceChannel',
813   'base': 'SpiceBasicInfo',
814   'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
815            'tls': 'bool'} }
818 # @SpiceQueryMouseMode
820 # An enumeration of Spice mouse states.
822 # @client: Mouse cursor position is determined by the client.
824 # @server: Mouse cursor position is determined by the server.
826 # @unknown: No information is available about mouse mode used by
827 #           the spice server.
829 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
831 # Since: 1.1
833 { 'enum': 'SpiceQueryMouseMode',
834   'data': [ 'client', 'server', 'unknown' ] }
837 # @SpiceInfo
839 # Information about the SPICE session.
841 # @enabled: true if the SPICE server is enabled, false otherwise
843 # @migrated: true if the last guest migration completed and spice
844 #            migration had completed as well. false otherwise.
846 # @host: #optional The hostname the SPICE server is bound to.  This depends on
847 #        the name resolution on the host and may be an IP address.
849 # @port: #optional The SPICE server's port number.
851 # @compiled-version: #optional SPICE server version.
853 # @tls-port: #optional The SPICE server's TLS port number.
855 # @auth: #optional the current authentication type used by the server
856 #        'none'  if no authentication is being used
857 #        'spice' uses SASL or direct TLS authentication, depending on command
858 #                line options
860 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
861 #              be determined by the client or the server, or unknown if spice
862 #              server doesn't provide this information.
864 #              Since: 1.1
866 # @channels: a list of @SpiceChannel for each active spice channel
868 # Since: 0.14.0
870 { 'type': 'SpiceInfo',
871   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
872            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
873            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
876 # @query-spice
878 # Returns information about the current SPICE server
880 # Returns: @SpiceInfo
882 # Since: 0.14.0
884 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
887 # @BalloonInfo:
889 # Information about the guest balloon device.
891 # @actual: the number of bytes the balloon currently contains
893 # Since: 0.14.0
896 { 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
899 # @query-balloon:
901 # Return information about the balloon device.
903 # Returns: @BalloonInfo on success
904 #          If the balloon driver is enabled but not functional because the KVM
905 #          kernel module cannot support it, KvmMissingCap
906 #          If no balloon device is present, DeviceNotActive
908 # Since: 0.14.0
910 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
913 # @PciMemoryRange:
915 # A PCI device memory region
917 # @base: the starting address (guest physical)
919 # @limit: the ending address (guest physical)
921 # Since: 0.14.0
923 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
926 # @PciMemoryRegion
928 # Information about a PCI device I/O region.
930 # @bar: the index of the Base Address Register for this region
932 # @type: 'io' if the region is a PIO region
933 #        'memory' if the region is a MMIO region
935 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
937 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
939 # Since: 0.14.0
941 { 'type': 'PciMemoryRegion',
942   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
943            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
946 # @PciBridgeInfo:
948 # Information about a PCI Bridge device
950 # @bus.number: primary bus interface number.  This should be the number of the
951 #              bus the device resides on.
953 # @bus.secondary: secondary bus interface number.  This is the number of the
954 #                 main bus for the bridge
956 # @bus.subordinate: This is the highest number bus that resides below the
957 #                   bridge.
959 # @bus.io_range: The PIO range for all devices on this bridge
961 # @bus.memory_range: The MMIO range for all devices on this bridge
963 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
964 #                          this bridge
966 # @devices: a list of @PciDeviceInfo for each device on this bridge
968 # Since: 0.14.0
970 { 'type': 'PciBridgeInfo',
971   'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
972                     'io_range': 'PciMemoryRange',
973                     'memory_range': 'PciMemoryRange',
974                     'prefetchable_range': 'PciMemoryRange' },
975            '*devices': ['PciDeviceInfo']} }
978 # @PciDeviceInfo:
980 # Information about a PCI device
982 # @bus: the bus number of the device
984 # @slot: the slot the device is located in
986 # @function: the function of the slot used by the device
988 # @class_info.desc: #optional a string description of the device's class
990 # @class_info.class: the class code of the device
992 # @id.device: the PCI device id
994 # @id.vendor: the PCI vendor id
996 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
998 # @qdev_id: the device name of the PCI device
1000 # @pci_bridge: if the device is a PCI bridge, the bridge information
1002 # @regions: a list of the PCI I/O regions associated with the device
1004 # Notes: the contents of @class_info.desc are not stable and should only be
1005 #        treated as informational.
1007 # Since: 0.14.0
1009 { 'type': 'PciDeviceInfo',
1010   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1011            'class_info': {'*desc': 'str', 'class': 'int'},
1012            'id': {'device': 'int', 'vendor': 'int'},
1013            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1014            'regions': ['PciMemoryRegion']} }
1017 # @PciInfo:
1019 # Information about a PCI bus
1021 # @bus: the bus index
1023 # @devices: a list of devices on this bus
1025 # Since: 0.14.0
1027 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1030 # @query-pci:
1032 # Return information about the PCI bus topology of the guest.
1034 # Returns: a list of @PciInfo for each PCI bus
1036 # Since: 0.14.0
1038 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1041 # @quit:
1043 # This command will cause the QEMU process to exit gracefully.  While every
1044 # attempt is made to send the QMP response before terminating, this is not
1045 # guaranteed.  When using this interface, a premature EOF would not be
1046 # unexpected.
1048 # Since: 0.14.0
1050 { 'command': 'quit' }
1053 # @stop:
1055 # Stop all guest VCPU execution.
1057 # Since:  0.14.0
1059 # Notes:  This function will succeed even if the guest is already in the stopped
1060 #         state.  In "inmigrate" state, it will ensure that the guest
1061 #         remains paused once migration finishes, as if the -S option was
1062 #         passed on the command line.
1064 { 'command': 'stop' }
1067 # @system_reset:
1069 # Performs a hard reset of a guest.
1071 # Since: 0.14.0
1073 { 'command': 'system_reset' }
1076 # @system_powerdown:
1078 # Requests that a guest perform a powerdown operation.
1080 # Since: 0.14.0
1082 # Notes: A guest may or may not respond to this command.  This command
1083 #        returning does not indicate that a guest has accepted the request or
1084 #        that it has shut down.  Many guests will respond to this command by
1085 #        prompting the user in some way.
1087 { 'command': 'system_powerdown' }
1090 # @cpu:
1092 # This command is a nop that is only provided for the purposes of compatibility.
1094 # Since: 0.14.0
1096 # Notes: Do not use this command.
1098 { 'command': 'cpu', 'data': {'index': 'int'} }
1101 # @cpu-add
1103 # Adds CPU with specified ID
1105 # @id: ID of CPU to be created, valid values [0..max_cpus)
1107 # Returns: Nothing on success
1109 # Since 1.5
1111 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1114 # @memsave:
1116 # Save a portion of guest memory to a file.
1118 # @val: the virtual address of the guest to start from
1120 # @size: the size of memory region to save
1122 # @filename: the file to save the memory to as binary data
1124 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1125 #                       virtual address (defaults to CPU 0)
1127 # Returns: Nothing on success
1129 # Since: 0.14.0
1131 # Notes: Errors were not reliably returned until 1.1
1133 { 'command': 'memsave',
1134   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1137 # @pmemsave:
1139 # Save a portion of guest physical memory to a file.
1141 # @val: the physical address of the guest to start from
1143 # @size: the size of memory region to save
1145 # @filename: the file to save the memory to as binary data
1147 # Returns: Nothing on success
1149 # Since: 0.14.0
1151 # Notes: Errors were not reliably returned until 1.1
1153 { 'command': 'pmemsave',
1154   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1157 # @cont:
1159 # Resume guest VCPU execution.
1161 # Since:  0.14.0
1163 # Returns:  If successful, nothing
1164 #           If QEMU was started with an encrypted block device and a key has
1165 #              not yet been set, DeviceEncrypted.
1167 # Notes:  This command will succeed if the guest is currently running.  It
1168 #         will also succeed if the guest is in the "inmigrate" state; in
1169 #         this case, the effect of the command is to make sure the guest
1170 #         starts once migration finishes, removing the effect of the -S
1171 #         command line option if it was passed.
1173 { 'command': 'cont' }
1176 # @system_wakeup:
1178 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1180 # Since:  1.1
1182 # Returns:  nothing.
1184 { 'command': 'system_wakeup' }
1187 # @inject-nmi:
1189 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
1191 # Returns:  If successful, nothing
1193 # Since:  0.14.0
1195 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
1197 { 'command': 'inject-nmi' }
1200 # @set_link:
1202 # Sets the link status of a virtual network adapter.
1204 # @name: the device name of the virtual network adapter
1206 # @up: true to set the link status to be up
1208 # Returns: Nothing on success
1209 #          If @name is not a valid network device, DeviceNotFound
1211 # Since: 0.14.0
1213 # Notes: Not all network adapters support setting link status.  This command
1214 #        will succeed even if the network adapter does not support link status
1215 #        notification.
1217 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1220 # @balloon:
1222 # Request the balloon driver to change its balloon size.
1224 # @value: the target size of the balloon in bytes
1226 # Returns: Nothing on success
1227 #          If the balloon driver is enabled but not functional because the KVM
1228 #            kernel module cannot support it, KvmMissingCap
1229 #          If no balloon device is present, DeviceNotActive
1231 # Notes: This command just issues a request to the guest.  When it returns,
1232 #        the balloon size may not have changed.  A guest can change the balloon
1233 #        size independent of this command.
1235 # Since: 0.14.0
1237 { 'command': 'balloon', 'data': {'value': 'int'} }
1240 # @Abort
1242 # This action can be used to test transaction failure.
1244 # Since: 1.6
1246 { 'type': 'Abort',
1247   'data': { } }
1250 # @TransactionAction
1252 # A discriminated record of operations that can be performed with
1253 # @transaction.
1255 { 'union': 'TransactionAction',
1256   'data': {
1257        'blockdev-snapshot-sync': 'BlockdevSnapshot',
1258        'drive-backup': 'DriveBackup',
1259        'abort': 'Abort',
1260        'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal'
1261    } }
1264 # @transaction
1266 # Executes a number of transactionable QMP commands atomically. If any
1267 # operation fails, then the entire set of actions will be abandoned and the
1268 # appropriate error returned.
1270 #  List of:
1271 #  @TransactionAction: information needed for the respective operation
1273 # Returns: nothing on success
1274 #          Errors depend on the operations of the transaction
1276 # Note: The transaction aborts on the first failure.  Therefore, there will be
1277 # information on only one failed operation returned in an error condition, and
1278 # subsequent actions will not have been attempted.
1280 # Since 1.1
1282 { 'command': 'transaction',
1283   'data': { 'actions': [ 'TransactionAction' ] } }
1286 # @human-monitor-command:
1288 # Execute a command on the human monitor and return the output.
1290 # @command-line: the command to execute in the human monitor
1292 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1294 # Returns: the output of the command as a string
1296 # Since: 0.14.0
1298 # Notes: This command only exists as a stop-gap.  Its use is highly
1299 #        discouraged.  The semantics of this command are not guaranteed.
1301 #        Known limitations:
1303 #        o This command is stateless, this means that commands that depend
1304 #          on state information (such as getfd) might not work
1306 #       o Commands that prompt the user for data (eg. 'cont' when the block
1307 #         device is encrypted) don't currently work
1309 { 'command': 'human-monitor-command',
1310   'data': {'command-line': 'str', '*cpu-index': 'int'},
1311   'returns': 'str' }
1314 # @migrate_cancel
1316 # Cancel the current executing migration process.
1318 # Returns: nothing on success
1320 # Notes: This command succeeds even if there is no migration process running.
1322 # Since: 0.14.0
1324 { 'command': 'migrate_cancel' }
1327 # @migrate_set_downtime
1329 # Set maximum tolerated downtime for migration.
1331 # @value: maximum downtime in seconds
1333 # Returns: nothing on success
1335 # Since: 0.14.0
1337 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1340 # @migrate_set_speed
1342 # Set maximum speed for migration.
1344 # @value: maximum speed in bytes.
1346 # Returns: nothing on success
1348 # Notes: A value lesser than zero will be automatically round up to zero.
1350 # Since: 0.14.0
1352 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1355 # @migrate-set-cache-size
1357 # Set XBZRLE cache size
1359 # @value: cache size in bytes
1361 # The size will be rounded down to the nearest power of 2.
1362 # The cache size can be modified before and during ongoing migration
1364 # Returns: nothing on success
1366 # Since: 1.2
1368 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1371 # @query-migrate-cache-size
1373 # query XBZRLE cache size
1375 # Returns: XBZRLE cache size in bytes
1377 # Since: 1.2
1379 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1382 # @ObjectPropertyInfo:
1384 # @name: the name of the property
1386 # @type: the type of the property.  This will typically come in one of four
1387 #        forms:
1389 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1390 #           These types are mapped to the appropriate JSON type.
1392 #        2) A legacy type in the form 'legacy<subtype>' where subtype is the
1393 #           legacy qdev typename.  These types are always treated as strings.
1395 #        3) A child type in the form 'child<subtype>' where subtype is a qdev
1396 #           device type name.  Child properties create the composition tree.
1398 #        4) A link type in the form 'link<subtype>' where subtype is a qdev
1399 #           device type name.  Link properties form the device model graph.
1401 # Since: 1.2
1403 { 'type': 'ObjectPropertyInfo',
1404   'data': { 'name': 'str', 'type': 'str' } }
1407 # @qom-list:
1409 # This command will list any properties of a object given a path in the object
1410 # model.
1412 # @path: the path within the object model.  See @qom-get for a description of
1413 #        this parameter.
1415 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1416 #          object.
1418 # Since: 1.2
1420 { 'command': 'qom-list',
1421   'data': { 'path': 'str' },
1422   'returns': [ 'ObjectPropertyInfo' ] }
1425 # @qom-get:
1427 # This command will get a property from a object model path and return the
1428 # value.
1430 # @path: The path within the object model.  There are two forms of supported
1431 #        paths--absolute and partial paths.
1433 #        Absolute paths are derived from the root object and can follow child<>
1434 #        or link<> properties.  Since they can follow link<> properties, they
1435 #        can be arbitrarily long.  Absolute paths look like absolute filenames
1436 #        and are prefixed  with a leading slash.
1438 #        Partial paths look like relative filenames.  They do not begin
1439 #        with a prefix.  The matching rules for partial paths are subtle but
1440 #        designed to make specifying objects easy.  At each level of the
1441 #        composition tree, the partial path is matched as an absolute path.
1442 #        The first match is not returned.  At least two matches are searched
1443 #        for.  A successful result is only returned if only one match is
1444 #        found.  If more than one match is found, a flag is return to
1445 #        indicate that the match was ambiguous.
1447 # @property: The property name to read
1449 # Returns: The property value.  The type depends on the property type.  legacy<>
1450 #          properties are returned as #str.  child<> and link<> properties are
1451 #          returns as #str pathnames.  All integer property types (u8, u16, etc)
1452 #          are returned as #int.
1454 # Since: 1.2
1456 { 'command': 'qom-get',
1457   'data': { 'path': 'str', 'property': 'str' },
1458   'returns': 'visitor',
1459   'gen': 'no' }
1462 # @qom-set:
1464 # This command will set a property from a object model path.
1466 # @path: see @qom-get for a description of this parameter
1468 # @property: the property name to set
1470 # @value: a value who's type is appropriate for the property type.  See @qom-get
1471 #         for a description of type mapping.
1473 # Since: 1.2
1475 { 'command': 'qom-set',
1476   'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1477   'gen': 'no' }
1480 # @set_password:
1482 # Sets the password of a remote display session.
1484 # @protocol: `vnc' to modify the VNC server password
1485 #            `spice' to modify the Spice server password
1487 # @password: the new password
1489 # @connected: #optional how to handle existing clients when changing the
1490 #                       password.  If nothing is specified, defaults to `keep'
1491 #                       `fail' to fail the command if clients are connected
1492 #                       `disconnect' to disconnect existing clients
1493 #                       `keep' to maintain existing clients
1495 # Returns: Nothing on success
1496 #          If Spice is not enabled, DeviceNotFound
1498 # Since: 0.14.0
1500 { 'command': 'set_password',
1501   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1504 # @expire_password:
1506 # Expire the password of a remote display server.
1508 # @protocol: the name of the remote display protocol `vnc' or `spice'
1510 # @time: when to expire the password.
1511 #        `now' to expire the password immediately
1512 #        `never' to cancel password expiration
1513 #        `+INT' where INT is the number of seconds from now (integer)
1514 #        `INT' where INT is the absolute time in seconds
1516 # Returns: Nothing on success
1517 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
1519 # Since: 0.14.0
1521 # Notes: Time is relative to the server and currently there is no way to
1522 #        coordinate server time with client time.  It is not recommended to
1523 #        use the absolute time version of the @time parameter unless you're
1524 #        sure you are on the same machine as the QEMU instance.
1526 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1529 # @change-vnc-password:
1531 # Change the VNC server password.
1533 # @target:  the new password to use with VNC authentication
1535 # Since: 1.1
1537 # Notes:  An empty password in this command will set the password to the empty
1538 #         string.  Existing clients are unaffected by executing this command.
1540 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1543 # @change:
1545 # This command is multiple commands multiplexed together.
1547 # @device: This is normally the name of a block device but it may also be 'vnc'.
1548 #          when it's 'vnc', then sub command depends on @target
1550 # @target: If @device is a block device, then this is the new filename.
1551 #          If @device is 'vnc', then if the value 'password' selects the vnc
1552 #          change password command.   Otherwise, this specifies a new server URI
1553 #          address to listen to for VNC connections.
1555 # @arg:    If @device is a block device, then this is an optional format to open
1556 #          the device with.
1557 #          If @device is 'vnc' and @target is 'password', this is the new VNC
1558 #          password to set.  If this argument is an empty string, then no future
1559 #          logins will be allowed.
1561 # Returns: Nothing on success.
1562 #          If @device is not a valid block device, DeviceNotFound
1563 #          If the new block device is encrypted, DeviceEncrypted.  Note that
1564 #          if this error is returned, the device has been opened successfully
1565 #          and an additional call to @block_passwd is required to set the
1566 #          device's password.  The behavior of reads and writes to the block
1567 #          device between when these calls are executed is undefined.
1569 # Notes:  It is strongly recommended that this interface is not used especially
1570 #         for changing block devices.
1572 # Since: 0.14.0
1574 { 'command': 'change',
1575   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1578 # @ObjectTypeInfo:
1580 # This structure describes a search result from @qom-list-types
1582 # @name: the type name found in the search
1584 # Since: 1.1
1586 # Notes: This command is experimental and may change syntax in future releases.
1588 { 'type': 'ObjectTypeInfo',
1589   'data': { 'name': 'str' } }
1592 # @qom-list-types:
1594 # This command will return a list of types given search parameters
1596 # @implements: if specified, only return types that implement this type name
1598 # @abstract: if true, include abstract types in the results
1600 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1602 # Since: 1.1
1604 { 'command': 'qom-list-types',
1605   'data': { '*implements': 'str', '*abstract': 'bool' },
1606   'returns': [ 'ObjectTypeInfo' ] }
1609 # @DevicePropertyInfo:
1611 # Information about device properties.
1613 # @name: the name of the property
1614 # @type: the typename of the property
1616 # Since: 1.2
1618 { 'type': 'DevicePropertyInfo',
1619   'data': { 'name': 'str', 'type': 'str' } }
1622 # @device-list-properties:
1624 # List properties associated with a device.
1626 # @typename: the type name of a device
1628 # Returns: a list of DevicePropertyInfo describing a devices properties
1630 # Since: 1.2
1632 { 'command': 'device-list-properties',
1633   'data': { 'typename': 'str'},
1634   'returns': [ 'DevicePropertyInfo' ] }
1637 # @migrate
1639 # Migrates the current running guest to another Virtual Machine.
1641 # @uri: the Uniform Resource Identifier of the destination VM
1643 # @blk: #optional do block migration (full disk copy)
1645 # @inc: #optional incremental disk copy migration
1647 # @detach: this argument exists only for compatibility reasons and
1648 #          is ignored by QEMU
1650 # Returns: nothing on success
1652 # Since: 0.14.0
1654 { 'command': 'migrate',
1655   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
1657 # @xen-save-devices-state:
1659 # Save the state of all devices to file. The RAM and the block devices
1660 # of the VM are not saved by this command.
1662 # @filename: the file to save the state of the devices to as binary
1663 # data. See xen-save-devices-state.txt for a description of the binary
1664 # format.
1666 # Returns: Nothing on success
1668 # Since: 1.1
1670 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
1673 # @xen-set-global-dirty-log
1675 # Enable or disable the global dirty log mode.
1677 # @enable: true to enable, false to disable.
1679 # Returns: nothing
1681 # Since: 1.3
1683 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1686 # @device_del:
1688 # Remove a device from a guest
1690 # @id: the name of the device
1692 # Returns: Nothing on success
1693 #          If @id is not a valid device, DeviceNotFound
1695 # Notes: When this command completes, the device may not be removed from the
1696 #        guest.  Hot removal is an operation that requires guest cooperation.
1697 #        This command merely requests that the guest begin the hot removal
1698 #        process.  Completion of the device removal process is signaled with a
1699 #        DEVICE_DELETED event. Guest reset will automatically complete removal
1700 #        for all devices.
1702 # Since: 0.14.0
1704 { 'command': 'device_del', 'data': {'id': 'str'} }
1707 # @DumpGuestMemoryFormat:
1709 # An enumeration of guest-memory-dump's format.
1711 # @elf: elf format
1713 # @kdump-zlib: kdump-compressed format with zlib-compressed
1715 # @kdump-lzo: kdump-compressed format with lzo-compressed
1717 # @kdump-snappy: kdump-compressed format with snappy-compressed
1719 # Since: 2.0
1721 { 'enum': 'DumpGuestMemoryFormat',
1722   'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
1725 # @dump-guest-memory
1727 # Dump guest's memory to vmcore. It is a synchronous operation that can take
1728 # very long depending on the amount of guest memory. This command is only
1729 # supported on i386 and x86_64.
1731 # @paging: if true, do paging to get guest's memory mapping. This allows
1732 #          using gdb to process the core file.
1734 #          IMPORTANT: this option can make QEMU allocate several gigabytes
1735 #                     of RAM. This can happen for a large guest, or a
1736 #                     malicious guest pretending to be large.
1738 #          Also, paging=true has the following limitations:
1740 #             1. The guest may be in a catastrophic state or can have corrupted
1741 #                memory, which cannot be trusted
1742 #             2. The guest can be in real-mode even if paging is enabled. For
1743 #                example, the guest uses ACPI to sleep, and ACPI sleep state
1744 #                goes in real-mode
1746 # @protocol: the filename or file descriptor of the vmcore. The supported
1747 #            protocols are:
1749 #            1. file: the protocol starts with "file:", and the following
1750 #               string is the file's path.
1751 #            2. fd: the protocol starts with "fd:", and the following string
1752 #               is the fd's name.
1754 # @begin: #optional if specified, the starting physical address.
1756 # @length: #optional if specified, the memory size, in bytes. If you don't
1757 #          want to dump all guest's memory, please specify the start @begin
1758 #          and @length
1760 # @format: #optional if specified, the format of guest memory dump. But non-elf
1761 #          format is conflict with paging and filter, ie. @paging, @begin and
1762 #          @length is not allowed to be specified with non-elf @format at the
1763 #          same time (since 2.0)
1765 # Returns: nothing on success
1767 # Since: 1.2
1769 { 'command': 'dump-guest-memory',
1770   'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
1771             '*length': 'int', '*format': 'DumpGuestMemoryFormat' } }
1774 # @DumpGuestMemoryCapability:
1776 # A list of the available formats for dump-guest-memory
1778 # Since: 2.0
1780 { 'type': 'DumpGuestMemoryCapability',
1781   'data': {
1782       'formats': ['DumpGuestMemoryFormat'] } }
1785 # @query-dump-guest-memory-capability:
1787 # Returns the available formats for dump-guest-memory
1789 # Returns:  A @DumpGuestMemoryCapability object listing available formats for
1790 #           dump-guest-memory
1792 # Since: 2.0
1794 { 'command': 'query-dump-guest-memory-capability',
1795   'returns': 'DumpGuestMemoryCapability' }
1798 # @netdev_add:
1800 # Add a network backend.
1802 # @type: the type of network backend.  Current valid values are 'user', 'tap',
1803 #        'vde', 'socket', 'dump' and 'bridge'
1805 # @id: the name of the new network backend
1807 # @props: #optional a list of properties to be passed to the backend in
1808 #         the format 'name=value', like 'ifname=tap0,script=no'
1810 # Notes: The semantics of @props is not well defined.  Future commands will be
1811 #        introduced that provide stronger typing for backend creation.
1813 # Since: 0.14.0
1815 # Returns: Nothing on success
1816 #          If @type is not a valid network backend, DeviceNotFound
1818 { 'command': 'netdev_add',
1819   'data': {'type': 'str', 'id': 'str', '*props': '**'},
1820   'gen': 'no' }
1823 # @netdev_del:
1825 # Remove a network backend.
1827 # @id: the name of the network backend to remove
1829 # Returns: Nothing on success
1830 #          If @id is not a valid network backend, DeviceNotFound
1832 # Since: 0.14.0
1834 { 'command': 'netdev_del', 'data': {'id': 'str'} }
1837 # @object-add:
1839 # Create a QOM object.
1841 # @qom-type: the class name for the object to be created
1843 # @id: the name of the new object
1845 # @props: #optional a dictionary of properties to be passed to the backend
1847 # Returns: Nothing on success
1848 #          Error if @qom-type is not a valid class name
1850 # Since: 2.0
1852 { 'command': 'object-add',
1853   'data': {'qom-type': 'str', 'id': 'str', '*props': 'dict'},
1854   'gen': 'no' }
1857 # @object-del:
1859 # Remove a QOM object.
1861 # @id: the name of the QOM object to remove
1863 # Returns: Nothing on success
1864 #          Error if @id is not a valid id for a QOM object
1866 # Since: 2.0
1868 { 'command': 'object-del', 'data': {'id': 'str'} }
1871 # @NetdevNoneOptions
1873 # Use it alone to have zero network devices.
1875 # Since 1.2
1877 { 'type': 'NetdevNoneOptions',
1878   'data': { } }
1881 # @NetLegacyNicOptions
1883 # Create a new Network Interface Card.
1885 # @netdev: #optional id of -netdev to connect to
1887 # @macaddr: #optional MAC address
1889 # @model: #optional device model (e1000, rtl8139, virtio etc.)
1891 # @addr: #optional PCI device address
1893 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
1895 # Since 1.2
1897 { 'type': 'NetLegacyNicOptions',
1898   'data': {
1899     '*netdev':  'str',
1900     '*macaddr': 'str',
1901     '*model':   'str',
1902     '*addr':    'str',
1903     '*vectors': 'uint32' } }
1906 # @String
1908 # A fat type wrapping 'str', to be embedded in lists.
1910 # Since 1.2
1912 { 'type': 'String',
1913   'data': {
1914     'str': 'str' } }
1917 # @NetdevUserOptions
1919 # Use the user mode network stack which requires no administrator privilege to
1920 # run.
1922 # @hostname: #optional client hostname reported by the builtin DHCP server
1924 # @restrict: #optional isolate the guest from the host
1926 # @ip: #optional legacy parameter, use net= instead
1928 # @net: #optional IP address and optional netmask
1930 # @host: #optional guest-visible address of the host
1932 # @tftp: #optional root directory of the built-in TFTP server
1934 # @bootfile: #optional BOOTP filename, for use with tftp=
1936 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
1937 #             assign
1939 # @dns: #optional guest-visible address of the virtual nameserver
1941 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
1942 #             to the guest
1944 # @smb: #optional root directory of the built-in SMB server
1946 # @smbserver: #optional IP address of the built-in SMB server
1948 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
1949 #           endpoints
1951 # @guestfwd: #optional forward guest TCP connections
1953 # Since 1.2
1955 { 'type': 'NetdevUserOptions',
1956   'data': {
1957     '*hostname':  'str',
1958     '*restrict':  'bool',
1959     '*ip':        'str',
1960     '*net':       'str',
1961     '*host':      'str',
1962     '*tftp':      'str',
1963     '*bootfile':  'str',
1964     '*dhcpstart': 'str',
1965     '*dns':       'str',
1966     '*dnssearch': ['String'],
1967     '*smb':       'str',
1968     '*smbserver': 'str',
1969     '*hostfwd':   ['String'],
1970     '*guestfwd':  ['String'] } }
1973 # @NetdevTapOptions
1975 # Connect the host TAP network interface name to the VLAN.
1977 # @ifname: #optional interface name
1979 # @fd: #optional file descriptor of an already opened tap
1981 # @fds: #optional multiple file descriptors of already opened multiqueue capable
1982 # tap
1984 # @script: #optional script to initialize the interface
1986 # @downscript: #optional script to shut down the interface
1988 # @helper: #optional command to execute to configure bridge
1990 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
1992 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
1994 # @vhost: #optional enable vhost-net network accelerator
1996 # @vhostfd: #optional file descriptor of an already opened vhost net device
1998 # @vhostfds: #optional file descriptors of multiple already opened vhost net
1999 # devices
2001 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2003 # @queues: #optional number of queues to be created for multiqueue capable tap
2005 # Since 1.2
2007 { 'type': 'NetdevTapOptions',
2008   'data': {
2009     '*ifname':     'str',
2010     '*fd':         'str',
2011     '*fds':        'str',
2012     '*script':     'str',
2013     '*downscript': 'str',
2014     '*helper':     'str',
2015     '*sndbuf':     'size',
2016     '*vnet_hdr':   'bool',
2017     '*vhost':      'bool',
2018     '*vhostfd':    'str',
2019     '*vhostfds':   'str',
2020     '*vhostforce': 'bool',
2021     '*queues':     'uint32'} }
2024 # @NetdevSocketOptions
2026 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2027 # socket connection.
2029 # @fd: #optional file descriptor of an already opened socket
2031 # @listen: #optional port number, and optional hostname, to listen on
2033 # @connect: #optional port number, and optional hostname, to connect to
2035 # @mcast: #optional UDP multicast address and port number
2037 # @localaddr: #optional source address and port for multicast and udp packets
2039 # @udp: #optional UDP unicast address and port number
2041 # Since 1.2
2043 { 'type': 'NetdevSocketOptions',
2044   'data': {
2045     '*fd':        'str',
2046     '*listen':    'str',
2047     '*connect':   'str',
2048     '*mcast':     'str',
2049     '*localaddr': 'str',
2050     '*udp':       'str' } }
2053 # @NetdevL2TPv3Options
2055 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
2057 # @src: source address
2059 # @dst: destination address
2061 # @srcport: #optional source port - mandatory for udp, optional for ip
2063 # @dstport: #optional destination port - mandatory for udp, optional for ip
2065 # @ipv6: #optional - force the use of ipv6
2067 # @udp: #optional - use the udp version of l2tpv3 encapsulation
2069 # @cookie64: #optional - use 64 bit coookies
2071 # @counter: #optional have sequence counter
2073 # @pincounter: #optional pin sequence counter to zero -
2074 #              workaround for buggy implementations or
2075 #              networks with packet reorder
2077 # @txcookie: #optional 32 or 64 bit transmit cookie
2079 # @rxcookie: #optional 32 or 64 bit receive cookie
2081 # @txsession: 32 bit transmit session
2083 # @rxsession: #optional 32 bit receive session - if not specified
2084 #             set to the same value as transmit
2086 # @offset: #optional additional offset - allows the insertion of
2087 #          additional application-specific data before the packet payload
2089 # Since 2.1
2091 { 'type': 'NetdevL2TPv3Options',
2092   'data': {
2093     'src':          'str',
2094     'dst':          'str',
2095     '*srcport':     'str',
2096     '*dstport':     'str',
2097     '*ipv6':        'bool',
2098     '*udp':         'bool',
2099     '*cookie64':    'bool',
2100     '*counter':     'bool',
2101     '*pincounter':  'bool',
2102     '*txcookie':    'uint64',
2103     '*rxcookie':    'uint64',
2104     'txsession':    'uint32',
2105     '*rxsession':   'uint32',
2106     '*offset':      'uint32' } }
2109 # @NetdevVdeOptions
2111 # Connect the VLAN to a vde switch running on the host.
2113 # @sock: #optional socket path
2115 # @port: #optional port number
2117 # @group: #optional group owner of socket
2119 # @mode: #optional permissions for socket
2121 # Since 1.2
2123 { 'type': 'NetdevVdeOptions',
2124   'data': {
2125     '*sock':  'str',
2126     '*port':  'uint16',
2127     '*group': 'str',
2128     '*mode':  'uint16' } }
2131 # @NetdevDumpOptions
2133 # Dump VLAN network traffic to a file.
2135 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2136 # suffixes.
2138 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2140 # Since 1.2
2142 { 'type': 'NetdevDumpOptions',
2143   'data': {
2144     '*len':  'size',
2145     '*file': 'str' } }
2148 # @NetdevBridgeOptions
2150 # Connect a host TAP network interface to a host bridge device.
2152 # @br: #optional bridge name
2154 # @helper: #optional command to execute to configure bridge
2156 # Since 1.2
2158 { 'type': 'NetdevBridgeOptions',
2159   'data': {
2160     '*br':     'str',
2161     '*helper': 'str' } }
2164 # @NetdevHubPortOptions
2166 # Connect two or more net clients through a software hub.
2168 # @hubid: hub identifier number
2170 # Since 1.2
2172 { 'type': 'NetdevHubPortOptions',
2173   'data': {
2174     'hubid':     'int32' } }
2177 # @NetdevNetmapOptions
2179 # Connect a client to a netmap-enabled NIC or to a VALE switch port
2181 # @ifname: Either the name of an existing network interface supported by
2182 #          netmap, or the name of a VALE port (created on the fly).
2183 #          A VALE port name is in the form 'valeXXX:YYY', where XXX and
2184 #          YYY are non-negative integers. XXX identifies a switch and
2185 #          YYY identifies a port of the switch. VALE ports having the
2186 #          same XXX are therefore connected to the same switch.
2188 # @devname: #optional path of the netmap device (default: '/dev/netmap').
2190 # Since 2.0
2192 { 'type': 'NetdevNetmapOptions',
2193   'data': {
2194     'ifname':     'str',
2195     '*devname':    'str' } }
2198 # @NetdevVhostUserOptions
2200 # Vhost-user network backend
2202 # @chardev: name of a unix socket chardev
2204 # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
2206 # Since 2.1
2208 { 'type': 'NetdevVhostUserOptions',
2209   'data': {
2210     'chardev':        'str',
2211     '*vhostforce':    'bool' } }
2214 # @NetClientOptions
2216 # A discriminated record of network device traits.
2218 # Since 1.2
2220 # 'l2tpv3' - since 2.1
2223 { 'union': 'NetClientOptions',
2224   'data': {
2225     'none':     'NetdevNoneOptions',
2226     'nic':      'NetLegacyNicOptions',
2227     'user':     'NetdevUserOptions',
2228     'tap':      'NetdevTapOptions',
2229     'l2tpv3':   'NetdevL2TPv3Options',
2230     'socket':   'NetdevSocketOptions',
2231     'vde':      'NetdevVdeOptions',
2232     'dump':     'NetdevDumpOptions',
2233     'bridge':   'NetdevBridgeOptions',
2234     'hubport':  'NetdevHubPortOptions',
2235     'netmap':   'NetdevNetmapOptions',
2236     'vhost-user': 'NetdevVhostUserOptions' } }
2239 # @NetLegacy
2241 # Captures the configuration of a network device; legacy.
2243 # @vlan: #optional vlan number
2245 # @id: #optional identifier for monitor commands
2247 # @name: #optional identifier for monitor commands, ignored if @id is present
2249 # @opts: device type specific properties (legacy)
2251 # Since 1.2
2253 { 'type': 'NetLegacy',
2254   'data': {
2255     '*vlan': 'int32',
2256     '*id':   'str',
2257     '*name': 'str',
2258     'opts':  'NetClientOptions' } }
2261 # @Netdev
2263 # Captures the configuration of a network device.
2265 # @id: identifier for monitor commands.
2267 # @opts: device type specific properties
2269 # Since 1.2
2271 { 'type': 'Netdev',
2272   'data': {
2273     'id':   'str',
2274     'opts': 'NetClientOptions' } }
2277 # @InetSocketAddress
2279 # Captures a socket address or address range in the Internet namespace.
2281 # @host: host part of the address
2283 # @port: port part of the address, or lowest port if @to is present
2285 # @to: highest port to try
2287 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2288 #        #optional
2290 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2291 #        #optional
2293 # Since 1.3
2295 { 'type': 'InetSocketAddress',
2296   'data': {
2297     'host': 'str',
2298     'port': 'str',
2299     '*to': 'uint16',
2300     '*ipv4': 'bool',
2301     '*ipv6': 'bool' } }
2304 # @UnixSocketAddress
2306 # Captures a socket address in the local ("Unix socket") namespace.
2308 # @path: filesystem path to use
2310 # Since 1.3
2312 { 'type': 'UnixSocketAddress',
2313   'data': {
2314     'path': 'str' } }
2317 # @SocketAddress
2319 # Captures the address of a socket, which could also be a named file descriptor
2321 # Since 1.3
2323 { 'union': 'SocketAddress',
2324   'data': {
2325     'inet': 'InetSocketAddress',
2326     'unix': 'UnixSocketAddress',
2327     'fd': 'String' } }
2330 # @getfd:
2332 # Receive a file descriptor via SCM rights and assign it a name
2334 # @fdname: file descriptor name
2336 # Returns: Nothing on success
2338 # Since: 0.14.0
2340 # Notes: If @fdname already exists, the file descriptor assigned to
2341 #        it will be closed and replaced by the received file
2342 #        descriptor.
2343 #        The 'closefd' command can be used to explicitly close the
2344 #        file descriptor when it is no longer needed.
2346 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2349 # @closefd:
2351 # Close a file descriptor previously passed via SCM rights
2353 # @fdname: file descriptor name
2355 # Returns: Nothing on success
2357 # Since: 0.14.0
2359 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2362 # @MachineInfo:
2364 # Information describing a machine.
2366 # @name: the name of the machine
2368 # @alias: #optional an alias for the machine name
2370 # @default: #optional whether the machine is default
2372 # @cpu-max: maximum number of CPUs supported by the machine type
2373 #           (since 1.5.0)
2375 # Since: 1.2.0
2377 { 'type': 'MachineInfo',
2378   'data': { 'name': 'str', '*alias': 'str',
2379             '*is-default': 'bool', 'cpu-max': 'int' } }
2382 # @query-machines:
2384 # Return a list of supported machines
2386 # Returns: a list of MachineInfo
2388 # Since: 1.2.0
2390 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2393 # @CpuDefinitionInfo:
2395 # Virtual CPU definition.
2397 # @name: the name of the CPU definition
2399 # Since: 1.2.0
2401 { 'type': 'CpuDefinitionInfo',
2402   'data': { 'name': 'str' } }
2405 # @query-cpu-definitions:
2407 # Return a list of supported virtual CPU definitions
2409 # Returns: a list of CpuDefInfo
2411 # Since: 1.2.0
2413 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2415 # @AddfdInfo:
2417 # Information about a file descriptor that was added to an fd set.
2419 # @fdset-id: The ID of the fd set that @fd was added to.
2421 # @fd: The file descriptor that was received via SCM rights and
2422 #      added to the fd set.
2424 # Since: 1.2.0
2426 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2429 # @add-fd:
2431 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2433 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2435 # @opaque: #optional A free-form string that can be used to describe the fd.
2437 # Returns: @AddfdInfo on success
2438 #          If file descriptor was not received, FdNotSupplied
2439 #          If @fdset-id is a negative value, InvalidParameterValue
2441 # Notes: The list of fd sets is shared by all monitor connections.
2443 #        If @fdset-id is not specified, a new fd set will be created.
2445 # Since: 1.2.0
2447 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2448   'returns': 'AddfdInfo' }
2451 # @remove-fd:
2453 # Remove a file descriptor from an fd set.
2455 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2457 # @fd: #optional The file descriptor that is to be removed.
2459 # Returns: Nothing on success
2460 #          If @fdset-id or @fd is not found, FdNotFound
2462 # Since: 1.2.0
2464 # Notes: The list of fd sets is shared by all monitor connections.
2466 #        If @fd is not specified, all file descriptors in @fdset-id
2467 #        will be removed.
2469 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2472 # @FdsetFdInfo:
2474 # Information about a file descriptor that belongs to an fd set.
2476 # @fd: The file descriptor value.
2478 # @opaque: #optional A free-form string that can be used to describe the fd.
2480 # Since: 1.2.0
2482 { 'type': 'FdsetFdInfo',
2483   'data': {'fd': 'int', '*opaque': 'str'} }
2486 # @FdsetInfo:
2488 # Information about an fd set.
2490 # @fdset-id: The ID of the fd set.
2492 # @fds: A list of file descriptors that belong to this fd set.
2494 # Since: 1.2.0
2496 { 'type': 'FdsetInfo',
2497   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2500 # @query-fdsets:
2502 # Return information describing all fd sets.
2504 # Returns: A list of @FdsetInfo
2506 # Since: 1.2.0
2508 # Note: The list of fd sets is shared by all monitor connections.
2511 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2514 # @TargetInfo:
2516 # Information describing the QEMU target.
2518 # @arch: the target architecture (eg "x86_64", "i386", etc)
2520 # Since: 1.2.0
2522 { 'type': 'TargetInfo',
2523   'data': { 'arch': 'str' } }
2526 # @query-target:
2528 # Return information about the target for this QEMU
2530 # Returns: TargetInfo
2532 # Since: 1.2.0
2534 { 'command': 'query-target', 'returns': 'TargetInfo' }
2537 # @QKeyCode:
2539 # An enumeration of key name.
2541 # This is used by the send-key command.
2543 # Since: 1.3.0
2545 # 'unmapped' and 'pause' since 2.0
2547 { 'enum': 'QKeyCode',
2548   'data': [ 'unmapped',
2549             'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
2550             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
2551             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
2552             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
2553             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
2554             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
2555             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
2556             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
2557             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
2558             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
2559             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
2560             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
2561             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
2562             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
2563              'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause' ] }
2566 # @KeyValue
2568 # Represents a keyboard key.
2570 # Since: 1.3.0
2572 { 'union': 'KeyValue',
2573   'data': {
2574     'number': 'int',
2575     'qcode': 'QKeyCode' } }
2578 # @send-key:
2580 # Send keys to guest.
2582 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
2583 #        simultaneously sent to the guest. A @KeyValue.number value is sent
2584 #        directly to the guest, while @KeyValue.qcode must be a valid
2585 #        @QKeyCode value
2587 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
2588 #             to 100
2590 # Returns: Nothing on success
2591 #          If key is unknown or redundant, InvalidParameter
2593 # Since: 1.3.0
2596 { 'command': 'send-key',
2597   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
2600 # @screendump:
2602 # Write a PPM of the VGA screen to a file.
2604 # @filename: the path of a new PPM file to store the image
2606 # Returns: Nothing on success
2608 # Since: 0.14.0
2610 { 'command': 'screendump', 'data': {'filename': 'str'} }
2613 # @ChardevFile:
2615 # Configuration info for file chardevs.
2617 # @in:  #optional The name of the input file
2618 # @out: The name of the output file
2620 # Since: 1.4
2622 { 'type': 'ChardevFile', 'data': { '*in' : 'str',
2623                                    'out' : 'str' } }
2626 # @ChardevHostdev:
2628 # Configuration info for device and pipe chardevs.
2630 # @device: The name of the special file for the device,
2631 #          i.e. /dev/ttyS0 on Unix or COM1: on Windows
2632 # @type: What kind of device this is.
2634 # Since: 1.4
2636 { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
2639 # @ChardevSocket:
2641 # Configuration info for (stream) socket chardevs.
2643 # @addr: socket address to listen on (server=true)
2644 #        or connect to (server=false)
2645 # @server: #optional create server socket (default: true)
2646 # @wait: #optional wait for incoming connection on server
2647 #        sockets (default: false).
2648 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
2649 # @telnet: #optional enable telnet protocol on server
2650 #          sockets (default: false)
2652 # Since: 1.4
2654 { 'type': 'ChardevSocket', 'data': { 'addr'     : 'SocketAddress',
2655                                      '*server'  : 'bool',
2656                                      '*wait'    : 'bool',
2657                                      '*nodelay' : 'bool',
2658                                      '*telnet'  : 'bool' } }
2661 # @ChardevUdp:
2663 # Configuration info for datagram socket chardevs.
2665 # @remote: remote address
2666 # @local: #optional local address
2668 # Since: 1.5
2670 { 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
2671                                   '*local' : 'SocketAddress' } }
2674 # @ChardevMux:
2676 # Configuration info for mux chardevs.
2678 # @chardev: name of the base chardev.
2680 # Since: 1.5
2682 { 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
2685 # @ChardevStdio:
2687 # Configuration info for stdio chardevs.
2689 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
2690 #          be delivered to qemu.  Default: true in -nographic mode,
2691 #          false otherwise.
2693 # Since: 1.5
2695 { 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
2698 # @ChardevSpiceChannel:
2700 # Configuration info for spice vm channel chardevs.
2702 # @type: kind of channel (for example vdagent).
2704 # Since: 1.5
2706 { 'type': 'ChardevSpiceChannel', 'data': { 'type'  : 'str' } }
2709 # @ChardevSpicePort:
2711 # Configuration info for spice port chardevs.
2713 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
2715 # Since: 1.5
2717 { 'type': 'ChardevSpicePort', 'data': { 'fqdn'  : 'str' } }
2720 # @ChardevVC:
2722 # Configuration info for virtual console chardevs.
2724 # @width:  console width,  in pixels
2725 # @height: console height, in pixels
2726 # @cols:   console width,  in chars
2727 # @rows:   console height, in chars
2729 # Since: 1.5
2731 { 'type': 'ChardevVC', 'data': { '*width'  : 'int',
2732                                  '*height' : 'int',
2733                                  '*cols'   : 'int',
2734                                  '*rows'   : 'int' } }
2737 # @ChardevRingbuf:
2739 # Configuration info for ring buffer chardevs.
2741 # @size: #optional ring buffer size, must be power of two, default is 65536
2743 # Since: 1.5
2745 { 'type': 'ChardevRingbuf', 'data': { '*size'  : 'int' } }
2748 # @ChardevBackend:
2750 # Configuration info for the new chardev backend.
2752 # Since: 1.4 (testdev since 2.2)
2754 { 'type': 'ChardevDummy', 'data': { } }
2756 { 'union': 'ChardevBackend', 'data': { 'file'   : 'ChardevFile',
2757                                        'serial' : 'ChardevHostdev',
2758                                        'parallel': 'ChardevHostdev',
2759                                        'pipe'   : 'ChardevHostdev',
2760                                        'socket' : 'ChardevSocket',
2761                                        'udp'    : 'ChardevUdp',
2762                                        'pty'    : 'ChardevDummy',
2763                                        'null'   : 'ChardevDummy',
2764                                        'mux'    : 'ChardevMux',
2765                                        'msmouse': 'ChardevDummy',
2766                                        'braille': 'ChardevDummy',
2767                                        'testdev': 'ChardevDummy',
2768                                        'stdio'  : 'ChardevStdio',
2769                                        'console': 'ChardevDummy',
2770                                        'spicevmc' : 'ChardevSpiceChannel',
2771                                        'spiceport' : 'ChardevSpicePort',
2772                                        'vc'     : 'ChardevVC',
2773                                        'ringbuf': 'ChardevRingbuf',
2774                                        # next one is just for compatibility
2775                                        'memory' : 'ChardevRingbuf' } }
2778 # @ChardevReturn:
2780 # Return info about the chardev backend just created.
2782 # @pty: #optional name of the slave pseudoterminal device, present if
2783 #       and only if a chardev of type 'pty' was created
2785 # Since: 1.4
2787 { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
2790 # @chardev-add:
2792 # Add a character device backend
2794 # @id: the chardev's ID, must be unique
2795 # @backend: backend type and parameters
2797 # Returns: ChardevReturn.
2799 # Since: 1.4
2801 { 'command': 'chardev-add', 'data': {'id'      : 'str',
2802                                      'backend' : 'ChardevBackend' },
2803   'returns': 'ChardevReturn' }
2806 # @chardev-remove:
2808 # Remove a character device backend
2810 # @id: the chardev's ID, must exist and not be in use
2812 # Returns: Nothing on success
2814 # Since: 1.4
2816 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
2819 # @TpmModel:
2821 # An enumeration of TPM models
2823 # @tpm-tis: TPM TIS model
2825 # Since: 1.5
2827 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
2830 # @query-tpm-models:
2832 # Return a list of supported TPM models
2834 # Returns: a list of TpmModel
2836 # Since: 1.5
2838 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
2841 # @TpmType:
2843 # An enumeration of TPM types
2845 # @passthrough: TPM passthrough type
2847 # Since: 1.5
2849 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
2852 # @query-tpm-types:
2854 # Return a list of supported TPM types
2856 # Returns: a list of TpmType
2858 # Since: 1.5
2860 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
2863 # @TPMPassthroughOptions:
2865 # Information about the TPM passthrough type
2867 # @path: #optional string describing the path used for accessing the TPM device
2869 # @cancel-path: #optional string showing the TPM's sysfs cancel file
2870 #               for cancellation of TPM commands while they are executing
2872 # Since: 1.5
2874 { 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
2875                                              '*cancel-path' : 'str'} }
2878 # @TpmTypeOptions:
2880 # A union referencing different TPM backend types' configuration options
2882 # @passthrough: The configuration options for the TPM passthrough type
2884 # Since: 1.5
2886 { 'union': 'TpmTypeOptions',
2887    'data': { 'passthrough' : 'TPMPassthroughOptions' } }
2890 # @TpmInfo:
2892 # Information about the TPM
2894 # @id: The Id of the TPM
2896 # @model: The TPM frontend model
2898 # @options: The TPM (backend) type configuration options
2900 # Since: 1.5
2902 { 'type': 'TPMInfo',
2903   'data': {'id': 'str',
2904            'model': 'TpmModel',
2905            'options': 'TpmTypeOptions' } }
2908 # @query-tpm:
2910 # Return information about the TPM device
2912 # Returns: @TPMInfo on success
2914 # Since: 1.5
2916 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
2919 # @AcpiTableOptions
2921 # Specify an ACPI table on the command line to load.
2923 # At most one of @file and @data can be specified. The list of files specified
2924 # by any one of them is loaded and concatenated in order. If both are omitted,
2925 # @data is implied.
2927 # Other fields / optargs can be used to override fields of the generic ACPI
2928 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
2929 # Description Table Header. If a header field is not overridden, then the
2930 # corresponding value from the concatenated blob is used (in case of @file), or
2931 # it is filled in with a hard-coded value (in case of @data).
2933 # String fields are copied into the matching ACPI member from lowest address
2934 # upwards, and silently truncated / NUL-padded to length.
2936 # @sig: #optional table signature / identifier (4 bytes)
2938 # @rev: #optional table revision number (dependent on signature, 1 byte)
2940 # @oem_id: #optional OEM identifier (6 bytes)
2942 # @oem_table_id: #optional OEM table identifier (8 bytes)
2944 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
2946 # @asl_compiler_id: #optional identifier of the utility that created the table
2947 #                   (4 bytes)
2949 # @asl_compiler_rev: #optional revision number of the utility that created the
2950 #                    table (4 bytes)
2952 # @file: #optional colon (:) separated list of pathnames to load and
2953 #        concatenate as table data. The resultant binary blob is expected to
2954 #        have an ACPI table header. At least one file is required. This field
2955 #        excludes @data.
2957 # @data: #optional colon (:) separated list of pathnames to load and
2958 #        concatenate as table data. The resultant binary blob must not have an
2959 #        ACPI table header. At least one file is required. This field excludes
2960 #        @file.
2962 # Since 1.5
2964 { 'type': 'AcpiTableOptions',
2965   'data': {
2966     '*sig':               'str',
2967     '*rev':               'uint8',
2968     '*oem_id':            'str',
2969     '*oem_table_id':      'str',
2970     '*oem_rev':           'uint32',
2971     '*asl_compiler_id':   'str',
2972     '*asl_compiler_rev':  'uint32',
2973     '*file':              'str',
2974     '*data':              'str' }}
2977 # @CommandLineParameterType:
2979 # Possible types for an option parameter.
2981 # @string: accepts a character string
2983 # @boolean: accepts "on" or "off"
2985 # @number: accepts a number
2987 # @size: accepts a number followed by an optional suffix (K)ilo,
2988 #        (M)ega, (G)iga, (T)era
2990 # Since 1.5
2992 { 'enum': 'CommandLineParameterType',
2993   'data': ['string', 'boolean', 'number', 'size'] }
2996 # @CommandLineParameterInfo:
2998 # Details about a single parameter of a command line option.
3000 # @name: parameter name
3002 # @type: parameter @CommandLineParameterType
3004 # @help: #optional human readable text string, not suitable for parsing.
3006 # @default: #optional default value string (since 2.1)
3008 # Since 1.5
3010 { 'type': 'CommandLineParameterInfo',
3011   'data': { 'name': 'str',
3012             'type': 'CommandLineParameterType',
3013             '*help': 'str',
3014             '*default': 'str' } }
3017 # @CommandLineOptionInfo:
3019 # Details about a command line option, including its list of parameter details
3021 # @option: option name
3023 # @parameters: an array of @CommandLineParameterInfo
3025 # Since 1.5
3027 { 'type': 'CommandLineOptionInfo',
3028   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
3031 # @query-command-line-options:
3033 # Query command line option schema.
3035 # @option: #optional option name
3037 # Returns: list of @CommandLineOptionInfo for all options (or for the given
3038 #          @option).  Returns an error if the given @option doesn't exist.
3040 # Since 1.5
3042 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
3043  'returns': ['CommandLineOptionInfo'] }
3046 # @X86CPURegister32
3048 # A X86 32-bit register
3050 # Since: 1.5
3052 { 'enum': 'X86CPURegister32',
3053   'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
3056 # @X86CPUFeatureWordInfo
3058 # Information about a X86 CPU feature word
3060 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
3062 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
3063 #                   feature word
3065 # @cpuid-register: Output register containing the feature bits
3067 # @features: value of output register, containing the feature bits
3069 # Since: 1.5
3071 { 'type': 'X86CPUFeatureWordInfo',
3072   'data': { 'cpuid-input-eax': 'int',
3073             '*cpuid-input-ecx': 'int',
3074             'cpuid-register': 'X86CPURegister32',
3075             'features': 'int' } }
3078 # @RxState:
3080 # Packets receiving state
3082 # @normal: filter assigned packets according to the mac-table
3084 # @none: don't receive any assigned packet
3086 # @all: receive all assigned packets
3088 # Since: 1.6
3090 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
3093 # @RxFilterInfo:
3095 # Rx-filter information for a NIC.
3097 # @name: net client name
3099 # @promiscuous: whether promiscuous mode is enabled
3101 # @multicast: multicast receive state
3103 # @unicast: unicast receive state
3105 # @vlan: vlan receive state (Since 2.0)
3107 # @broadcast-allowed: whether to receive broadcast
3109 # @multicast-overflow: multicast table is overflowed or not
3111 # @unicast-overflow: unicast table is overflowed or not
3113 # @main-mac: the main macaddr string
3115 # @vlan-table: a list of active vlan id
3117 # @unicast-table: a list of unicast macaddr string
3119 # @multicast-table: a list of multicast macaddr string
3121 # Since 1.6
3124 { 'type': 'RxFilterInfo',
3125   'data': {
3126     'name':               'str',
3127     'promiscuous':        'bool',
3128     'multicast':          'RxState',
3129     'unicast':            'RxState',
3130     'vlan':               'RxState',
3131     'broadcast-allowed':  'bool',
3132     'multicast-overflow': 'bool',
3133     'unicast-overflow':   'bool',
3134     'main-mac':           'str',
3135     'vlan-table':         ['int'],
3136     'unicast-table':      ['str'],
3137     'multicast-table':    ['str'] }}
3140 # @query-rx-filter:
3142 # Return rx-filter information for all NICs (or for the given NIC).
3144 # @name: #optional net client name
3146 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
3147 #          Returns an error if the given @name doesn't exist, or given
3148 #          NIC doesn't support rx-filter querying, or given net client
3149 #          isn't a NIC.
3151 # Since: 1.6
3153 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
3154   'returns': ['RxFilterInfo'] }
3157 # @InputButton
3159 # Button of a pointer input device (mouse, tablet).
3161 # Since: 2.0
3163 { 'enum'  : 'InputButton',
3164   'data'  : [ 'Left', 'Middle', 'Right', 'WheelUp', 'WheelDown' ] }
3167 # @InputButton
3169 # Position axis of a pointer input device (mouse, tablet).
3171 # Since: 2.0
3173 { 'enum'  : 'InputAxis',
3174   'data'  : [ 'X', 'Y' ] }
3177 # @InputKeyEvent
3179 # Keyboard input event.
3181 # @key:    Which key this event is for.
3182 # @down:   True for key-down and false for key-up events.
3184 # Since: 2.0
3186 { 'type'  : 'InputKeyEvent',
3187   'data'  : { 'key'     : 'KeyValue',
3188               'down'    : 'bool' } }
3191 # @InputBtnEvent
3193 # Pointer button input event.
3195 # @button: Which button this event is for.
3196 # @down:   True for key-down and false for key-up events.
3198 # Since: 2.0
3200 { 'type'  : 'InputBtnEvent',
3201   'data'  : { 'button'  : 'InputButton',
3202               'down'    : 'bool' } }
3205 # @InputMoveEvent
3207 # Pointer motion input event.
3209 # @axis:   Which axis is referenced by @value.
3210 # @value:  Pointer position.  For absolute coordinates the
3211 #          valid range is 0 -> 0x7ffff
3213 # Since: 2.0
3215 { 'type'  : 'InputMoveEvent',
3216   'data'  : { 'axis'    : 'InputAxis',
3217               'value'   : 'int' } }
3220 # @InputEvent
3222 # Input event union.
3224 # Since: 2.0
3226 { 'union' : 'InputEvent',
3227   'data'  : { 'key'     : 'InputKeyEvent',
3228               'btn'     : 'InputBtnEvent',
3229               'rel'     : 'InputMoveEvent',
3230               'abs'     : 'InputMoveEvent' } }
3233 # @NumaOptions
3235 # A discriminated record of NUMA options. (for OptsVisitor)
3237 # Since 2.1
3239 { 'union': 'NumaOptions',
3240   'data': {
3241     'node': 'NumaNodeOptions' }}
3244 # @NumaNodeOptions
3246 # Create a guest NUMA node. (for OptsVisitor)
3248 # @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
3250 # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
3251 #         if omitted)
3253 # @mem: #optional memory size of this node; mutually exclusive with @memdev.
3254 #       Equally divide total memory among nodes if both @mem and @memdev are
3255 #       omitted.
3257 # @memdev: #optional memory backend object.  If specified for one node,
3258 #          it must be specified for all nodes.
3260 # Since: 2.1
3262 { 'type': 'NumaNodeOptions',
3263   'data': {
3264    '*nodeid': 'uint16',
3265    '*cpus':   ['uint16'],
3266    '*mem':    'size',
3267    '*memdev': 'str' }}
3270 # @HostMemPolicy
3272 # Host memory policy types
3274 # @default: restore default policy, remove any nondefault policy
3276 # @preferred: set the preferred host nodes for allocation
3278 # @bind: a strict policy that restricts memory allocation to the
3279 #        host nodes specified
3281 # @interleave: memory allocations are interleaved across the set
3282 #              of host nodes specified
3284 # Since 2.1
3286 { 'enum': 'HostMemPolicy',
3287   'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
3290 # @Memdev:
3292 # Information about memory backend
3294 # @size: memory backend size
3296 # @merge: enables or disables memory merge support
3298 # @dump: includes memory backend's memory in a core dump or not
3300 # @prealloc: enables or disables memory preallocation
3302 # @host-nodes: host nodes for its memory policy
3304 # @policy: memory policy of memory backend
3306 # Since: 2.1
3309 { 'type': 'Memdev',
3310   'data': {
3311     'size':       'size',
3312     'merge':      'bool',
3313     'dump':       'bool',
3314     'prealloc':   'bool',
3315     'host-nodes': ['uint16'],
3316     'policy':     'HostMemPolicy' }}
3319 # @query-memdev:
3321 # Returns information for all memory backends.
3323 # Returns: a list of @Memdev.
3325 # Since: 2.1
3327 { 'command': 'query-memdev', 'returns': ['Memdev'] }
3330 # @PCDIMMDeviceInfo:
3332 # PCDIMMDevice state information
3334 # @id: #optional device's ID
3336 # @addr: physical address, where device is mapped
3338 # @size: size of memory that the device provides
3340 # @slot: slot number at which device is plugged in
3342 # @node: NUMA node number where device is plugged in
3344 # @memdev: memory backend linked with device
3346 # @hotplugged: true if device was hotplugged
3348 # @hotpluggable: true if device if could be added/removed while machine is running
3350 # Since: 2.1
3352 { 'type': 'PCDIMMDeviceInfo',
3353   'data': { '*id': 'str',
3354             'addr': 'int',
3355             'size': 'int',
3356             'slot': 'int',
3357             'node': 'int',
3358             'memdev': 'str',
3359             'hotplugged': 'bool',
3360             'hotpluggable': 'bool'
3361           }
3365 # @MemoryDeviceInfo:
3367 # Union containing information about a memory device
3369 # Since: 2.1
3371 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
3374 # @query-memory-devices
3376 # Lists available memory devices and their state
3378 # Since: 2.1
3380 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
3382 ## @ACPISlotType
3384 # @DIMM: memory slot
3386 { 'enum': 'ACPISlotType', 'data': [ 'DIMM' ] }
3388 ## @ACPIOSTInfo
3390 # OSPM Status Indication for a device
3391 # For description of possible values of @source and @status fields
3392 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
3394 # @device: #optional device ID associated with slot
3396 # @slot: slot ID, unique per slot of a given @slot-type
3398 # @slot-type: type of the slot
3400 # @source: an integer containing the source event
3402 # @status: an integer containing the status code
3404 # Since: 2.1
3406 { 'type': 'ACPIOSTInfo',
3407   'data'  : { '*device': 'str',
3408               'slot': 'str',
3409               'slot-type': 'ACPISlotType',
3410               'source': 'int',
3411               'status': 'int' } }
3414 # @query-acpi-ospm-status
3416 # Lists ACPI OSPM status of ACPI device objects,
3417 # which might be reported via _OST method
3419 # Since: 2.1
3421 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
3424 # @WatchdogExpirationAction
3426 # An enumeration of the actions taken when the watchdog device's timer is
3427 # expired
3429 # @reset: system resets
3431 # @shutdown: system shutdown, note that it is similar to @powerdown, which
3432 #            tries to set to system status and notify guest
3434 # @poweroff: system poweroff, the emulator program exits
3436 # @pause: system pauses, similar to @stop
3438 # @debug: system enters debug state
3440 # @none: nothing is done
3442 # Since: 2.1
3444 { 'enum': 'WatchdogExpirationAction',
3445   'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none' ] }
3448 # @IoOperationType
3450 # An enumeration of the I/O operation types
3452 # @read: read operation
3454 # @write: write operation
3456 # Since: 2.1
3458 { 'enum': 'IoOperationType',
3459   'data': [ 'read', 'write' ] }
3462 # @GuestPanicAction
3464 # An enumeration of the actions taken when guest OS panic is detected
3466 # @pause: system pauses
3468 # Since: 2.1
3470 { 'enum': 'GuestPanicAction',
3471   'data': [ 'pause' ] }
3474 # @rtc-reset-reinjection
3476 # This command will reset the RTC interrupt reinjection backlog.
3477 # Can be used if another mechanism to synchronize guest time
3478 # is in effect, for example QEMU guest agent's guest-set-time
3479 # command.
3481 # Since: 2.1
3483 { 'command': 'rtc-reset-reinjection' }