pc-bios/s390-ccw: update binary
[qemu/qmp-unstable.git] / qapi-schema.json
blobe7727a1153b030fa8c3a5933763e804a7aa289bd
1 # -*- Mode: Python -*-
3 # QAPI Schema
5 # QAPI common definitions
6 { 'include': 'qapi/common.json' }
8 # QAPI block definitions
9 { 'include': 'qapi/block.json' }
12 # LostTickPolicy:
14 # Policy for handling lost ticks in timer devices.
16 # @discard: throw away the missed tick(s) and continue with future injection
17 #           normally.  Guest time may be delayed, unless the OS has explicit
18 #           handling of lost ticks
20 # @delay: continue to deliver ticks at the normal rate.  Guest time will be
21 #         delayed due to the late tick
23 # @merge: merge the missed tick(s) into one tick and inject.  Guest time
24 #         may be delayed, depending on how the OS reacts to the merging
25 #         of ticks
27 # @slew: deliver ticks at a higher rate to catch up with the missed tick. The
28 #        guest time should not be delayed once catchup is complete.
30 # Since: 2.0
32 { 'enum': 'LostTickPolicy',
33   'data': ['discard', 'delay', 'merge', 'slew' ] }
35 # @add_client
37 # Allow client connections for VNC, Spice and socket based
38 # character devices to be passed in to QEMU via SCM_RIGHTS.
40 # @protocol: protocol name. Valid names are "vnc", "spice" or the
41 #            name of a character device (eg. from -chardev id=XXXX)
43 # @fdname: file descriptor name previously passed via 'getfd' command
45 # @skipauth: #optional whether to skip authentication. Only applies
46 #            to "vnc" and "spice" protocols
48 # @tls: #optional whether to perform TLS. Only applies to the "spice"
49 #       protocol
51 # Returns: nothing on success.
53 # Since: 0.14.0
55 { 'command': 'add_client',
56   'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
57             '*tls': 'bool' } }
60 # @NameInfo:
62 # Guest name information.
64 # @name: #optional The name of the guest
66 # Since 0.14.0
68 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
71 # @query-name:
73 # Return the name information of a guest.
75 # Returns: @NameInfo of the guest
77 # Since 0.14.0
79 { 'command': 'query-name', 'returns': 'NameInfo' }
82 # @KvmInfo:
84 # Information about support for KVM acceleration
86 # @enabled: true if KVM acceleration is active
88 # @present: true if KVM acceleration is built into this executable
90 # Since: 0.14.0
92 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
95 # @query-kvm:
97 # Returns information about KVM acceleration
99 # Returns: @KvmInfo
101 # Since: 0.14.0
103 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
106 # @RunState
108 # An enumeration of VM run states.
110 # @debug: QEMU is running on a debugger
112 # @finish-migrate: guest is paused to finish the migration process
114 # @inmigrate: guest is paused waiting for an incoming migration.  Note
115 # that this state does not tell whether the machine will start at the
116 # end of the migration.  This depends on the command-line -S option and
117 # any invocation of 'stop' or 'cont' that has happened since QEMU was
118 # started.
120 # @internal-error: An internal error that prevents further guest execution
121 # has occurred
123 # @io-error: the last IOP has failed and the device is configured to pause
124 # on I/O errors
126 # @paused: guest has been paused via the 'stop' command
128 # @postmigrate: guest is paused following a successful 'migrate'
130 # @prelaunch: QEMU was started with -S and guest has not started
132 # @restore-vm: guest is paused to restore VM state
134 # @running: guest is actively running
136 # @save-vm: guest is paused to save the VM state
138 # @shutdown: guest is shut down (and -no-shutdown is in use)
140 # @suspended: guest is suspended (ACPI S3)
142 # @watchdog: the watchdog action is configured to pause and has been triggered
144 # @guest-panicked: guest has been panicked as a result of guest OS panic
146 { 'enum': 'RunState',
147   'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
148             'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
149             'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
150             'guest-panicked' ] }
153 # @StatusInfo:
155 # Information about VCPU run state
157 # @running: true if all VCPUs are runnable, false if not runnable
159 # @singlestep: true if VCPUs are in single-step mode
161 # @status: the virtual machine @RunState
163 # Since:  0.14.0
165 # Notes: @singlestep is enabled through the GDB stub
167 { 'type': 'StatusInfo',
168   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
171 # @query-status:
173 # Query the run status of all VCPUs
175 # Returns: @StatusInfo reflecting all VCPUs
177 # Since:  0.14.0
179 { 'command': 'query-status', 'returns': 'StatusInfo' }
182 # @UuidInfo:
184 # Guest UUID information.
186 # @UUID: the UUID of the guest
188 # Since: 0.14.0
190 # Notes: If no UUID was specified for the guest, a null UUID is returned.
192 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
195 # @query-uuid:
197 # Query the guest UUID information.
199 # Returns: The @UuidInfo for the guest
201 # Since 0.14.0
203 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
206 # @ChardevInfo:
208 # Information about a character device.
210 # @label: the label of the character device
212 # @filename: the filename of the character device
214 # Notes: @filename is encoded using the QEMU command line character device
215 #        encoding.  See the QEMU man page for details.
217 # Since: 0.14.0
219 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
222 # @query-chardev:
224 # Returns information about current character devices.
226 # Returns: a list of @ChardevInfo
228 # Since: 0.14.0
230 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
233 # @ChardevBackendInfo:
235 # Information about a character device backend
237 # @name: The backend name
239 # Since: 2.0
241 { 'type': 'ChardevBackendInfo', 'data': {'name': 'str'} }
244 # @query-chardev-backends:
246 # Returns information about character device backends.
248 # Returns: a list of @ChardevBackendInfo
250 # Since: 2.0
252 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
255 # @DataFormat:
257 # An enumeration of data format.
259 # @utf8: Data is a UTF-8 string (RFC 3629)
261 # @base64: Data is Base64 encoded binary (RFC 3548)
263 # Since: 1.4
265 { 'enum': 'DataFormat',
266   'data': [ 'utf8', 'base64' ] }
269 # @ringbuf-write:
271 # Write to a ring buffer character device.
273 # @device: the ring buffer character device name
275 # @data: data to write
277 # @format: #optional data encoding (default 'utf8').
278 #          - base64: data must be base64 encoded text.  Its binary
279 #            decoding gets written.
280 #            Bug: invalid base64 is currently not rejected.
281 #            Whitespace *is* invalid.
282 #          - utf8: data's UTF-8 encoding is written
283 #          - data itself is always Unicode regardless of format, like
284 #            any other string.
286 # Returns: Nothing on success
288 # Since: 1.4
290 { 'command': 'ringbuf-write',
291   'data': {'device': 'str', 'data': 'str',
292            '*format': 'DataFormat'} }
295 # @ringbuf-read:
297 # Read from a ring buffer character device.
299 # @device: the ring buffer character device name
301 # @size: how many bytes to read at most
303 # @format: #optional data encoding (default 'utf8').
304 #          - base64: the data read is returned in base64 encoding.
305 #          - utf8: the data read is interpreted as UTF-8.
306 #            Bug: can screw up when the buffer contains invalid UTF-8
307 #            sequences, NUL characters, after the ring buffer lost
308 #            data, and when reading stops because the size limit is
309 #            reached.
310 #          - The return value is always Unicode regardless of format,
311 #            like any other string.
313 # Returns: data read from the device
315 # Since: 1.4
317 { 'command': 'ringbuf-read',
318   'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
319   'returns': 'str' }
322 # @EventInfo:
324 # Information about a QMP event
326 # @name: The event name
328 # Since: 1.2.0
330 { 'type': 'EventInfo', 'data': {'name': 'str'} }
333 # @query-events:
335 # Return a list of supported QMP events by this server
337 # Returns: A list of @EventInfo for all supported events
339 # Since: 1.2.0
341 { 'command': 'query-events', 'returns': ['EventInfo'] }
344 # @MigrationStats
346 # Detailed migration status.
348 # @transferred: amount of bytes already transferred to the target VM
350 # @remaining: amount of bytes remaining to be transferred to the target VM
352 # @total: total amount of bytes involved in the migration process
354 # @duplicate: number of duplicate (zero) pages (since 1.2)
356 # @skipped: number of skipped zero pages (since 1.5)
358 # @normal : number of normal pages (since 1.2)
360 # @normal-bytes: number of normal bytes sent (since 1.2)
362 # @dirty-pages-rate: number of pages dirtied by second by the
363 #        guest (since 1.3)
365 # @mbps: throughput in megabits/sec. (since 1.6)
367 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
369 # Since: 0.14.0
371 { 'type': 'MigrationStats',
372   'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
373            'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
374            'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
375            'mbps' : 'number', 'dirty-sync-count' : 'int' } }
378 # @XBZRLECacheStats
380 # Detailed XBZRLE migration cache statistics
382 # @cache-size: XBZRLE cache size
384 # @bytes: amount of bytes already transferred to the target VM
386 # @pages: amount of pages transferred to the target VM
388 # @cache-miss: number of cache miss
390 # @cache-miss-rate: rate of cache miss (since 2.1)
392 # @overflow: number of overflows
394 # Since: 1.2
396 { 'type': 'XBZRLECacheStats',
397   'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
398            'cache-miss': 'int', 'cache-miss-rate': 'number',
399            'overflow': 'int' } }
402 # @MigrationInfo
404 # Information about current migration process.
406 # @status: #optional string describing the current migration status.
407 #          As of 0.14.0 this can be 'setup', 'active', 'completed', 'failed' or
408 #          'cancelled'. If this field is not returned, no migration process
409 #          has been initiated
411 # @ram: #optional @MigrationStats containing detailed migration
412 #       status, only returned if status is 'active' or
413 #       'completed'. 'comppleted' (since 1.2)
415 # @disk: #optional @MigrationStats containing detailed disk migration
416 #        status, only returned if status is 'active' and it is a block
417 #        migration
419 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
420 #                migration statistics, only returned if XBZRLE feature is on and
421 #                status is 'active' or 'completed' (since 1.2)
423 # @total-time: #optional total amount of milliseconds since migration started.
424 #        If migration has ended, it returns the total migration
425 #        time. (since 1.2)
427 # @downtime: #optional only present when migration finishes correctly
428 #        total downtime in milliseconds for the guest.
429 #        (since 1.3)
431 # @expected-downtime: #optional only present while migration is active
432 #        expected downtime in milliseconds for the guest in last walk
433 #        of the dirty bitmap. (since 1.3)
435 # @setup-time: #optional amount of setup time in milliseconds _before_ the
436 #        iterations begin but _after_ the QMP command is issued. This is designed
437 #        to provide an accounting of any activities (such as RDMA pinning) which
438 #        may be expensive, but do not actually occur during the iterative
439 #        migration rounds themselves. (since 1.6)
441 # Since: 0.14.0
443 { 'type': 'MigrationInfo',
444   'data': {'*status': 'str', '*ram': 'MigrationStats',
445            '*disk': 'MigrationStats',
446            '*xbzrle-cache': 'XBZRLECacheStats',
447            '*total-time': 'int',
448            '*expected-downtime': 'int',
449            '*downtime': 'int',
450            '*setup-time': 'int'} }
453 # @query-migrate
455 # Returns information about current migration process.
457 # Returns: @MigrationInfo
459 # Since: 0.14.0
461 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
464 # @MigrationCapability
466 # Migration capabilities enumeration
468 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
469 #          This feature allows us to minimize migration traffic for certain work
470 #          loads, by sending compressed difference of the pages
472 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
473 #          mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
474 #          Disabled by default. (since 2.0)
476 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
477 #          essentially saves 1MB of zeroes per block on the wire. Enabling requires
478 #          source and target VM to support this feature. To enable it is sufficient
479 #          to enable the capability on the source VM. The feature is disabled by
480 #          default. (since 1.6)
482 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
483 #          to speed up convergence of RAM migration. (since 1.6)
485 # Since: 1.2
487 { 'enum': 'MigrationCapability',
488   'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks'] }
491 # @MigrationCapabilityStatus
493 # Migration capability information
495 # @capability: capability enum
497 # @state: capability state bool
499 # Since: 1.2
501 { 'type': 'MigrationCapabilityStatus',
502   'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
505 # @migrate-set-capabilities
507 # Enable/Disable the following migration capabilities (like xbzrle)
509 # @capabilities: json array of capability modifications to make
511 # Since: 1.2
513 { 'command': 'migrate-set-capabilities',
514   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
517 # @query-migrate-capabilities
519 # Returns information about the current migration capabilities status
521 # Returns: @MigrationCapabilitiesStatus
523 # Since: 1.2
525 { 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}
528 # @MouseInfo:
530 # Information about a mouse device.
532 # @name: the name of the mouse device
534 # @index: the index of the mouse device
536 # @current: true if this device is currently receiving mouse events
538 # @absolute: true if this device supports absolute coordinates as input
540 # Since: 0.14.0
542 { 'type': 'MouseInfo',
543   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
544            'absolute': 'bool'} }
547 # @query-mice:
549 # Returns information about each active mouse device
551 # Returns: a list of @MouseInfo for each device
553 # Since: 0.14.0
555 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
558 # @CpuInfo:
560 # Information about a virtual CPU
562 # @CPU: the index of the virtual CPU
564 # @current: this only exists for backwards compatible and should be ignored
566 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
567 #          to a processor specific low power mode.
569 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
570 #                pointer.
571 #                If the target is Sparc, this is the PC component of the
572 #                instruction pointer.
574 # @nip: #optional If the target is PPC, the instruction pointer
576 # @npc: #optional If the target is Sparc, the NPC component of the instruction
577 #                 pointer
579 # @PC: #optional If the target is MIPS, the instruction pointer
581 # @thread_id: ID of the underlying host thread
583 # Since: 0.14.0
585 # Notes: @halted is a transient state that changes frequently.  By the time the
586 #        data is sent to the client, the guest may no longer be halted.
588 { 'type': 'CpuInfo',
589   'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
590            '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
593 # @query-cpus:
595 # Returns a list of information about each virtual CPU.
597 # Returns: a list of @CpuInfo for each virtual CPU
599 # Since: 0.14.0
601 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
604 # @IOThreadInfo:
606 # Information about an iothread
608 # @id: the identifier of the iothread
610 # @thread-id: ID of the underlying host thread
612 # Since: 2.0
614 { 'type': 'IOThreadInfo',
615   'data': {'id': 'str', 'thread-id': 'int'} }
618 # @query-iothreads:
620 # Returns a list of information about each iothread.
622 # Note this list excludes the QEMU main loop thread, which is not declared
623 # using the -object iothread command-line option.  It is always the main thread
624 # of the process.
626 # Returns: a list of @IOThreadInfo for each iothread
628 # Since: 2.0
630 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
633 # @NetworkAddressFamily
635 # The network address family
637 # @ipv4: IPV4 family
639 # @ipv6: IPV6 family
641 # @unix: unix socket
643 # @unknown: otherwise
645 # Since: 2.1
647 { 'enum': 'NetworkAddressFamily',
648   'data': [ 'ipv4', 'ipv6', 'unix', 'unknown' ] }
651 # @VncBasicInfo
653 # The basic information for vnc network connection
655 # @host: IP address
657 # @service: The service name of vnc port. This may depend on the host system's
658 #           service database so symbolic names should not be relied on.
660 # @family: address family
662 # Since: 2.1
664 { 'type': 'VncBasicInfo',
665   'data': { 'host': 'str',
666             'service': 'str',
667             'family': 'NetworkAddressFamily' } }
670 # @VncServerInfo
672 # The network connection information for server
674 # @auth: #optional, authentication method
676 # Since: 2.1
678 { 'type': 'VncServerInfo',
679   'base': 'VncBasicInfo',
680   'data': { '*auth': 'str' } }
683 # @VncClientInfo:
685 # Information about a connected VNC client.
687 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
688 #              Name of the client.
690 # @sasl_username: #optional If SASL authentication is in use, the SASL username
691 #                 used for authentication.
693 # Since: 0.14.0
695 { 'type': 'VncClientInfo',
696   'base': 'VncBasicInfo',
697   'data': { '*x509_dname'   : 'str', '*sasl_username': 'str' } }
700 # @VncInfo:
702 # Information about the VNC session.
704 # @enabled: true if the VNC server is enabled, false otherwise
706 # @host: #optional The hostname the VNC server is bound to.  This depends on
707 #        the name resolution on the host and may be an IP address.
709 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
710 #                    'ipv4' if the host is listening for IPv4 connections
711 #                    'unix' if the host is listening on a unix domain socket
712 #                    'unknown' otherwise
714 # @service: #optional The service name of the server's port.  This may depends
715 #           on the host system's service database so symbolic names should not
716 #           be relied on.
718 # @auth: #optional the current authentication type used by the server
719 #        'none' if no authentication is being used
720 #        'vnc' if VNC authentication is being used
721 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
722 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
723 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
724 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
725 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
726 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
727 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
728 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
729 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
731 # @clients: a list of @VncClientInfo of all currently connected clients
733 # Since: 0.14.0
735 { 'type': 'VncInfo',
736   'data': {'enabled': 'bool', '*host': 'str',
737            '*family': 'NetworkAddressFamily',
738            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
741 # @query-vnc:
743 # Returns information about the current VNC server
745 # Returns: @VncInfo
747 # Since: 0.14.0
749 { 'command': 'query-vnc', 'returns': 'VncInfo' }
752 # @SpiceBasicInfo
754 # The basic information for SPICE network connection
756 # @host: IP address
758 # @port: port number
760 # @family: address family
762 # Since: 2.1
764 { 'type': 'SpiceBasicInfo',
765   'data': { 'host': 'str',
766             'port': 'str',
767             'family': 'NetworkAddressFamily' } }
770 # @SpiceServerInfo
772 # Information about a SPICE server
774 # @auth: #optional, authentication method
776 # Since: 2.1
778 { 'type': 'SpiceServerInfo',
779   'base': 'SpiceBasicInfo',
780   'data': { '*auth': 'str' } }
783 # @SpiceChannel
785 # Information about a SPICE client channel.
787 # @connection-id: SPICE connection id number.  All channels with the same id
788 #                 belong to the same SPICE session.
790 # @connection-type: SPICE channel type number.  "1" is the main control
791 #                   channel, filter for this one if you want to track spice
792 #                   sessions only
794 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
795 #              multiple channels of the same type exist, such as multiple
796 #              display channels in a multihead setup
798 # @tls: true if the channel is encrypted, false otherwise.
800 # Since: 0.14.0
802 { 'type': 'SpiceChannel',
803   'base': 'SpiceBasicInfo',
804   'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
805            'tls': 'bool'} }
808 # @SpiceQueryMouseMode
810 # An enumeration of Spice mouse states.
812 # @client: Mouse cursor position is determined by the client.
814 # @server: Mouse cursor position is determined by the server.
816 # @unknown: No information is available about mouse mode used by
817 #           the spice server.
819 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
821 # Since: 1.1
823 { 'enum': 'SpiceQueryMouseMode',
824   'data': [ 'client', 'server', 'unknown' ] }
827 # @SpiceInfo
829 # Information about the SPICE session.
831 # @enabled: true if the SPICE server is enabled, false otherwise
833 # @migrated: true if the last guest migration completed and spice
834 #            migration had completed as well. false otherwise.
836 # @host: #optional The hostname the SPICE server is bound to.  This depends on
837 #        the name resolution on the host and may be an IP address.
839 # @port: #optional The SPICE server's port number.
841 # @compiled-version: #optional SPICE server version.
843 # @tls-port: #optional The SPICE server's TLS port number.
845 # @auth: #optional the current authentication type used by the server
846 #        'none'  if no authentication is being used
847 #        'spice' uses SASL or direct TLS authentication, depending on command
848 #                line options
850 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
851 #              be determined by the client or the server, or unknown if spice
852 #              server doesn't provide this information.
854 #              Since: 1.1
856 # @channels: a list of @SpiceChannel for each active spice channel
858 # Since: 0.14.0
860 { 'type': 'SpiceInfo',
861   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
862            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
863            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
866 # @query-spice
868 # Returns information about the current SPICE server
870 # Returns: @SpiceInfo
872 # Since: 0.14.0
874 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
877 # @BalloonInfo:
879 # Information about the guest balloon device.
881 # @actual: the number of bytes the balloon currently contains
883 # Since: 0.14.0
886 { 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
889 # @query-balloon:
891 # Return information about the balloon device.
893 # Returns: @BalloonInfo on success
894 #          If the balloon driver is enabled but not functional because the KVM
895 #          kernel module cannot support it, KvmMissingCap
896 #          If no balloon device is present, DeviceNotActive
898 # Since: 0.14.0
900 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
903 # @PciMemoryRange:
905 # A PCI device memory region
907 # @base: the starting address (guest physical)
909 # @limit: the ending address (guest physical)
911 # Since: 0.14.0
913 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
916 # @PciMemoryRegion
918 # Information about a PCI device I/O region.
920 # @bar: the index of the Base Address Register for this region
922 # @type: 'io' if the region is a PIO region
923 #        'memory' if the region is a MMIO region
925 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
927 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
929 # Since: 0.14.0
931 { 'type': 'PciMemoryRegion',
932   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
933            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
936 # @PciBridgeInfo:
938 # Information about a PCI Bridge device
940 # @bus.number: primary bus interface number.  This should be the number of the
941 #              bus the device resides on.
943 # @bus.secondary: secondary bus interface number.  This is the number of the
944 #                 main bus for the bridge
946 # @bus.subordinate: This is the highest number bus that resides below the
947 #                   bridge.
949 # @bus.io_range: The PIO range for all devices on this bridge
951 # @bus.memory_range: The MMIO range for all devices on this bridge
953 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
954 #                          this bridge
956 # @devices: a list of @PciDeviceInfo for each device on this bridge
958 # Since: 0.14.0
960 { 'type': 'PciBridgeInfo',
961   'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
962                     'io_range': 'PciMemoryRange',
963                     'memory_range': 'PciMemoryRange',
964                     'prefetchable_range': 'PciMemoryRange' },
965            '*devices': ['PciDeviceInfo']} }
968 # @PciDeviceInfo:
970 # Information about a PCI device
972 # @bus: the bus number of the device
974 # @slot: the slot the device is located in
976 # @function: the function of the slot used by the device
978 # @class_info.desc: #optional a string description of the device's class
980 # @class_info.class: the class code of the device
982 # @id.device: the PCI device id
984 # @id.vendor: the PCI vendor id
986 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
988 # @qdev_id: the device name of the PCI device
990 # @pci_bridge: if the device is a PCI bridge, the bridge information
992 # @regions: a list of the PCI I/O regions associated with the device
994 # Notes: the contents of @class_info.desc are not stable and should only be
995 #        treated as informational.
997 # Since: 0.14.0
999 { 'type': 'PciDeviceInfo',
1000   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1001            'class_info': {'*desc': 'str', 'class': 'int'},
1002            'id': {'device': 'int', 'vendor': 'int'},
1003            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1004            'regions': ['PciMemoryRegion']} }
1007 # @PciInfo:
1009 # Information about a PCI bus
1011 # @bus: the bus index
1013 # @devices: a list of devices on this bus
1015 # Since: 0.14.0
1017 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1020 # @query-pci:
1022 # Return information about the PCI bus topology of the guest.
1024 # Returns: a list of @PciInfo for each PCI bus
1026 # Since: 0.14.0
1028 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1031 # @quit:
1033 # This command will cause the QEMU process to exit gracefully.  While every
1034 # attempt is made to send the QMP response before terminating, this is not
1035 # guaranteed.  When using this interface, a premature EOF would not be
1036 # unexpected.
1038 # Since: 0.14.0
1040 { 'command': 'quit' }
1043 # @stop:
1045 # Stop all guest VCPU execution.
1047 # Since:  0.14.0
1049 # Notes:  This function will succeed even if the guest is already in the stopped
1050 #         state.  In "inmigrate" state, it will ensure that the guest
1051 #         remains paused once migration finishes, as if the -S option was
1052 #         passed on the command line.
1054 { 'command': 'stop' }
1057 # @system_reset:
1059 # Performs a hard reset of a guest.
1061 # Since: 0.14.0
1063 { 'command': 'system_reset' }
1066 # @system_powerdown:
1068 # Requests that a guest perform a powerdown operation.
1070 # Since: 0.14.0
1072 # Notes: A guest may or may not respond to this command.  This command
1073 #        returning does not indicate that a guest has accepted the request or
1074 #        that it has shut down.  Many guests will respond to this command by
1075 #        prompting the user in some way.
1077 { 'command': 'system_powerdown' }
1080 # @cpu:
1082 # This command is a nop that is only provided for the purposes of compatibility.
1084 # Since: 0.14.0
1086 # Notes: Do not use this command.
1088 { 'command': 'cpu', 'data': {'index': 'int'} }
1091 # @cpu-add
1093 # Adds CPU with specified ID
1095 # @id: ID of CPU to be created, valid values [0..max_cpus)
1097 # Returns: Nothing on success
1099 # Since 1.5
1101 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1104 # @memsave:
1106 # Save a portion of guest memory to a file.
1108 # @val: the virtual address of the guest to start from
1110 # @size: the size of memory region to save
1112 # @filename: the file to save the memory to as binary data
1114 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1115 #                       virtual address (defaults to CPU 0)
1117 # Returns: Nothing on success
1119 # Since: 0.14.0
1121 # Notes: Errors were not reliably returned until 1.1
1123 { 'command': 'memsave',
1124   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1127 # @pmemsave:
1129 # Save a portion of guest physical memory to a file.
1131 # @val: the physical address of the guest to start from
1133 # @size: the size of memory region to save
1135 # @filename: the file to save the memory to as binary data
1137 # Returns: Nothing on success
1139 # Since: 0.14.0
1141 # Notes: Errors were not reliably returned until 1.1
1143 { 'command': 'pmemsave',
1144   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1147 # @cont:
1149 # Resume guest VCPU execution.
1151 # Since:  0.14.0
1153 # Returns:  If successful, nothing
1154 #           If QEMU was started with an encrypted block device and a key has
1155 #              not yet been set, DeviceEncrypted.
1157 # Notes:  This command will succeed if the guest is currently running.  It
1158 #         will also succeed if the guest is in the "inmigrate" state; in
1159 #         this case, the effect of the command is to make sure the guest
1160 #         starts once migration finishes, removing the effect of the -S
1161 #         command line option if it was passed.
1163 { 'command': 'cont' }
1166 # @system_wakeup:
1168 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1170 # Since:  1.1
1172 # Returns:  nothing.
1174 { 'command': 'system_wakeup' }
1177 # @inject-nmi:
1179 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1181 # Returns:  If successful, nothing
1183 # Since:  0.14.0
1185 # Notes: Only x86 Virtual Machines support this command.
1187 { 'command': 'inject-nmi' }
1190 # @set_link:
1192 # Sets the link status of a virtual network adapter.
1194 # @name: the device name of the virtual network adapter
1196 # @up: true to set the link status to be up
1198 # Returns: Nothing on success
1199 #          If @name is not a valid network device, DeviceNotFound
1201 # Since: 0.14.0
1203 # Notes: Not all network adapters support setting link status.  This command
1204 #        will succeed even if the network adapter does not support link status
1205 #        notification.
1207 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1210 # @balloon:
1212 # Request the balloon driver to change its balloon size.
1214 # @value: the target size of the balloon in bytes
1216 # Returns: Nothing on success
1217 #          If the balloon driver is enabled but not functional because the KVM
1218 #            kernel module cannot support it, KvmMissingCap
1219 #          If no balloon device is present, DeviceNotActive
1221 # Notes: This command just issues a request to the guest.  When it returns,
1222 #        the balloon size may not have changed.  A guest can change the balloon
1223 #        size independent of this command.
1225 # Since: 0.14.0
1227 { 'command': 'balloon', 'data': {'value': 'int'} }
1230 # @Abort
1232 # This action can be used to test transaction failure.
1234 # Since: 1.6
1236 { 'type': 'Abort',
1237   'data': { } }
1240 # @TransactionAction
1242 # A discriminated record of operations that can be performed with
1243 # @transaction.
1245 { 'union': 'TransactionAction',
1246   'data': {
1247        'blockdev-snapshot-sync': 'BlockdevSnapshot',
1248        'drive-backup': 'DriveBackup',
1249        'abort': 'Abort',
1250        'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal'
1251    } }
1254 # @transaction
1256 # Executes a number of transactionable QMP commands atomically. If any
1257 # operation fails, then the entire set of actions will be abandoned and the
1258 # appropriate error returned.
1260 #  List of:
1261 #  @TransactionAction: information needed for the respective operation
1263 # Returns: nothing on success
1264 #          Errors depend on the operations of the transaction
1266 # Note: The transaction aborts on the first failure.  Therefore, there will be
1267 # information on only one failed operation returned in an error condition, and
1268 # subsequent actions will not have been attempted.
1270 # Since 1.1
1272 { 'command': 'transaction',
1273   'data': { 'actions': [ 'TransactionAction' ] } }
1276 # @human-monitor-command:
1278 # Execute a command on the human monitor and return the output.
1280 # @command-line: the command to execute in the human monitor
1282 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1284 # Returns: the output of the command as a string
1286 # Since: 0.14.0
1288 # Notes: This command only exists as a stop-gap.  Its use is highly
1289 #        discouraged.  The semantics of this command are not guaranteed.
1291 #        Known limitations:
1293 #        o This command is stateless, this means that commands that depend
1294 #          on state information (such as getfd) might not work
1296 #       o Commands that prompt the user for data (eg. 'cont' when the block
1297 #         device is encrypted) don't currently work
1299 { 'command': 'human-monitor-command',
1300   'data': {'command-line': 'str', '*cpu-index': 'int'},
1301   'returns': 'str' }
1304 # @migrate_cancel
1306 # Cancel the current executing migration process.
1308 # Returns: nothing on success
1310 # Notes: This command succeeds even if there is no migration process running.
1312 # Since: 0.14.0
1314 { 'command': 'migrate_cancel' }
1317 # @migrate_set_downtime
1319 # Set maximum tolerated downtime for migration.
1321 # @value: maximum downtime in seconds
1323 # Returns: nothing on success
1325 # Since: 0.14.0
1327 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1330 # @migrate_set_speed
1332 # Set maximum speed for migration.
1334 # @value: maximum speed in bytes.
1336 # Returns: nothing on success
1338 # Notes: A value lesser than zero will be automatically round up to zero.
1340 # Since: 0.14.0
1342 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1345 # @migrate-set-cache-size
1347 # Set XBZRLE cache size
1349 # @value: cache size in bytes
1351 # The size will be rounded down to the nearest power of 2.
1352 # The cache size can be modified before and during ongoing migration
1354 # Returns: nothing on success
1356 # Since: 1.2
1358 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1361 # @query-migrate-cache-size
1363 # query XBZRLE cache size
1365 # Returns: XBZRLE cache size in bytes
1367 # Since: 1.2
1369 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1372 # @ObjectPropertyInfo:
1374 # @name: the name of the property
1376 # @type: the type of the property.  This will typically come in one of four
1377 #        forms:
1379 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1380 #           These types are mapped to the appropriate JSON type.
1382 #        2) A legacy type in the form 'legacy<subtype>' where subtype is the
1383 #           legacy qdev typename.  These types are always treated as strings.
1385 #        3) A child type in the form 'child<subtype>' where subtype is a qdev
1386 #           device type name.  Child properties create the composition tree.
1388 #        4) A link type in the form 'link<subtype>' where subtype is a qdev
1389 #           device type name.  Link properties form the device model graph.
1391 # Since: 1.2
1393 { 'type': 'ObjectPropertyInfo',
1394   'data': { 'name': 'str', 'type': 'str' } }
1397 # @qom-list:
1399 # This command will list any properties of a object given a path in the object
1400 # model.
1402 # @path: the path within the object model.  See @qom-get for a description of
1403 #        this parameter.
1405 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1406 #          object.
1408 # Since: 1.2
1410 { 'command': 'qom-list',
1411   'data': { 'path': 'str' },
1412   'returns': [ 'ObjectPropertyInfo' ] }
1415 # @qom-get:
1417 # This command will get a property from a object model path and return the
1418 # value.
1420 # @path: The path within the object model.  There are two forms of supported
1421 #        paths--absolute and partial paths.
1423 #        Absolute paths are derived from the root object and can follow child<>
1424 #        or link<> properties.  Since they can follow link<> properties, they
1425 #        can be arbitrarily long.  Absolute paths look like absolute filenames
1426 #        and are prefixed  with a leading slash.
1428 #        Partial paths look like relative filenames.  They do not begin
1429 #        with a prefix.  The matching rules for partial paths are subtle but
1430 #        designed to make specifying objects easy.  At each level of the
1431 #        composition tree, the partial path is matched as an absolute path.
1432 #        The first match is not returned.  At least two matches are searched
1433 #        for.  A successful result is only returned if only one match is
1434 #        found.  If more than one match is found, a flag is return to
1435 #        indicate that the match was ambiguous.
1437 # @property: The property name to read
1439 # Returns: The property value.  The type depends on the property type.  legacy<>
1440 #          properties are returned as #str.  child<> and link<> properties are
1441 #          returns as #str pathnames.  All integer property types (u8, u16, etc)
1442 #          are returned as #int.
1444 # Since: 1.2
1446 { 'command': 'qom-get',
1447   'data': { 'path': 'str', 'property': 'str' },
1448   'returns': 'visitor',
1449   'gen': 'no' }
1452 # @qom-set:
1454 # This command will set a property from a object model path.
1456 # @path: see @qom-get for a description of this parameter
1458 # @property: the property name to set
1460 # @value: a value who's type is appropriate for the property type.  See @qom-get
1461 #         for a description of type mapping.
1463 # Since: 1.2
1465 { 'command': 'qom-set',
1466   'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1467   'gen': 'no' }
1470 # @set_password:
1472 # Sets the password of a remote display session.
1474 # @protocol: `vnc' to modify the VNC server password
1475 #            `spice' to modify the Spice server password
1477 # @password: the new password
1479 # @connected: #optional how to handle existing clients when changing the
1480 #                       password.  If nothing is specified, defaults to `keep'
1481 #                       `fail' to fail the command if clients are connected
1482 #                       `disconnect' to disconnect existing clients
1483 #                       `keep' to maintain existing clients
1485 # Returns: Nothing on success
1486 #          If Spice is not enabled, DeviceNotFound
1488 # Since: 0.14.0
1490 { 'command': 'set_password',
1491   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1494 # @expire_password:
1496 # Expire the password of a remote display server.
1498 # @protocol: the name of the remote display protocol `vnc' or `spice'
1500 # @time: when to expire the password.
1501 #        `now' to expire the password immediately
1502 #        `never' to cancel password expiration
1503 #        `+INT' where INT is the number of seconds from now (integer)
1504 #        `INT' where INT is the absolute time in seconds
1506 # Returns: Nothing on success
1507 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
1509 # Since: 0.14.0
1511 # Notes: Time is relative to the server and currently there is no way to
1512 #        coordinate server time with client time.  It is not recommended to
1513 #        use the absolute time version of the @time parameter unless you're
1514 #        sure you are on the same machine as the QEMU instance.
1516 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1519 # @change-vnc-password:
1521 # Change the VNC server password.
1523 # @target:  the new password to use with VNC authentication
1525 # Since: 1.1
1527 # Notes:  An empty password in this command will set the password to the empty
1528 #         string.  Existing clients are unaffected by executing this command.
1530 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1533 # @change:
1535 # This command is multiple commands multiplexed together.
1537 # @device: This is normally the name of a block device but it may also be 'vnc'.
1538 #          when it's 'vnc', then sub command depends on @target
1540 # @target: If @device is a block device, then this is the new filename.
1541 #          If @device is 'vnc', then if the value 'password' selects the vnc
1542 #          change password command.   Otherwise, this specifies a new server URI
1543 #          address to listen to for VNC connections.
1545 # @arg:    If @device is a block device, then this is an optional format to open
1546 #          the device with.
1547 #          If @device is 'vnc' and @target is 'password', this is the new VNC
1548 #          password to set.  If this argument is an empty string, then no future
1549 #          logins will be allowed.
1551 # Returns: Nothing on success.
1552 #          If @device is not a valid block device, DeviceNotFound
1553 #          If the new block device is encrypted, DeviceEncrypted.  Note that
1554 #          if this error is returned, the device has been opened successfully
1555 #          and an additional call to @block_passwd is required to set the
1556 #          device's password.  The behavior of reads and writes to the block
1557 #          device between when these calls are executed is undefined.
1559 # Notes:  It is strongly recommended that this interface is not used especially
1560 #         for changing block devices.
1562 # Since: 0.14.0
1564 { 'command': 'change',
1565   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1568 # @ObjectTypeInfo:
1570 # This structure describes a search result from @qom-list-types
1572 # @name: the type name found in the search
1574 # Since: 1.1
1576 # Notes: This command is experimental and may change syntax in future releases.
1578 { 'type': 'ObjectTypeInfo',
1579   'data': { 'name': 'str' } }
1582 # @qom-list-types:
1584 # This command will return a list of types given search parameters
1586 # @implements: if specified, only return types that implement this type name
1588 # @abstract: if true, include abstract types in the results
1590 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1592 # Since: 1.1
1594 { 'command': 'qom-list-types',
1595   'data': { '*implements': 'str', '*abstract': 'bool' },
1596   'returns': [ 'ObjectTypeInfo' ] }
1599 # @DevicePropertyInfo:
1601 # Information about device properties.
1603 # @name: the name of the property
1604 # @type: the typename of the property
1606 # Since: 1.2
1608 { 'type': 'DevicePropertyInfo',
1609   'data': { 'name': 'str', 'type': 'str' } }
1612 # @device-list-properties:
1614 # List properties associated with a device.
1616 # @typename: the type name of a device
1618 # Returns: a list of DevicePropertyInfo describing a devices properties
1620 # Since: 1.2
1622 { 'command': 'device-list-properties',
1623   'data': { 'typename': 'str'},
1624   'returns': [ 'DevicePropertyInfo' ] }
1627 # @migrate
1629 # Migrates the current running guest to another Virtual Machine.
1631 # @uri: the Uniform Resource Identifier of the destination VM
1633 # @blk: #optional do block migration (full disk copy)
1635 # @inc: #optional incremental disk copy migration
1637 # @detach: this argument exists only for compatibility reasons and
1638 #          is ignored by QEMU
1640 # Returns: nothing on success
1642 # Since: 0.14.0
1644 { 'command': 'migrate',
1645   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
1647 # @xen-save-devices-state:
1649 # Save the state of all devices to file. The RAM and the block devices
1650 # of the VM are not saved by this command.
1652 # @filename: the file to save the state of the devices to as binary
1653 # data. See xen-save-devices-state.txt for a description of the binary
1654 # format.
1656 # Returns: Nothing on success
1658 # Since: 1.1
1660 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
1663 # @xen-set-global-dirty-log
1665 # Enable or disable the global dirty log mode.
1667 # @enable: true to enable, false to disable.
1669 # Returns: nothing
1671 # Since: 1.3
1673 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1676 # @device_del:
1678 # Remove a device from a guest
1680 # @id: the name of the device
1682 # Returns: Nothing on success
1683 #          If @id is not a valid device, DeviceNotFound
1685 # Notes: When this command completes, the device may not be removed from the
1686 #        guest.  Hot removal is an operation that requires guest cooperation.
1687 #        This command merely requests that the guest begin the hot removal
1688 #        process.  Completion of the device removal process is signaled with a
1689 #        DEVICE_DELETED event. Guest reset will automatically complete removal
1690 #        for all devices.
1692 # Since: 0.14.0
1694 { 'command': 'device_del', 'data': {'id': 'str'} }
1697 # @DumpGuestMemoryFormat:
1699 # An enumeration of guest-memory-dump's format.
1701 # @elf: elf format
1703 # @kdump-zlib: kdump-compressed format with zlib-compressed
1705 # @kdump-lzo: kdump-compressed format with lzo-compressed
1707 # @kdump-snappy: kdump-compressed format with snappy-compressed
1709 # Since: 2.0
1711 { 'enum': 'DumpGuestMemoryFormat',
1712   'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
1715 # @dump-guest-memory
1717 # Dump guest's memory to vmcore. It is a synchronous operation that can take
1718 # very long depending on the amount of guest memory. This command is only
1719 # supported on i386 and x86_64.
1721 # @paging: if true, do paging to get guest's memory mapping. This allows
1722 #          using gdb to process the core file.
1724 #          IMPORTANT: this option can make QEMU allocate several gigabytes
1725 #                     of RAM. This can happen for a large guest, or a
1726 #                     malicious guest pretending to be large.
1728 #          Also, paging=true has the following limitations:
1730 #             1. The guest may be in a catastrophic state or can have corrupted
1731 #                memory, which cannot be trusted
1732 #             2. The guest can be in real-mode even if paging is enabled. For
1733 #                example, the guest uses ACPI to sleep, and ACPI sleep state
1734 #                goes in real-mode
1736 # @protocol: the filename or file descriptor of the vmcore. The supported
1737 #            protocols are:
1739 #            1. file: the protocol starts with "file:", and the following
1740 #               string is the file's path.
1741 #            2. fd: the protocol starts with "fd:", and the following string
1742 #               is the fd's name.
1744 # @begin: #optional if specified, the starting physical address.
1746 # @length: #optional if specified, the memory size, in bytes. If you don't
1747 #          want to dump all guest's memory, please specify the start @begin
1748 #          and @length
1750 # @format: #optional if specified, the format of guest memory dump. But non-elf
1751 #          format is conflict with paging and filter, ie. @paging, @begin and
1752 #          @length is not allowed to be specified with non-elf @format at the
1753 #          same time (since 2.0)
1755 # Returns: nothing on success
1757 # Since: 1.2
1759 { 'command': 'dump-guest-memory',
1760   'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
1761             '*length': 'int', '*format': 'DumpGuestMemoryFormat' } }
1764 # @DumpGuestMemoryCapability:
1766 # A list of the available formats for dump-guest-memory
1768 # Since: 2.0
1770 { 'type': 'DumpGuestMemoryCapability',
1771   'data': {
1772       'formats': ['DumpGuestMemoryFormat'] } }
1775 # @query-dump-guest-memory-capability:
1777 # Returns the available formats for dump-guest-memory
1779 # Returns:  A @DumpGuestMemoryCapability object listing available formats for
1780 #           dump-guest-memory
1782 # Since: 2.0
1784 { 'command': 'query-dump-guest-memory-capability',
1785   'returns': 'DumpGuestMemoryCapability' }
1788 # @netdev_add:
1790 # Add a network backend.
1792 # @type: the type of network backend.  Current valid values are 'user', 'tap',
1793 #        'vde', 'socket', 'dump' and 'bridge'
1795 # @id: the name of the new network backend
1797 # @props: #optional a list of properties to be passed to the backend in
1798 #         the format 'name=value', like 'ifname=tap0,script=no'
1800 # Notes: The semantics of @props is not well defined.  Future commands will be
1801 #        introduced that provide stronger typing for backend creation.
1803 # Since: 0.14.0
1805 # Returns: Nothing on success
1806 #          If @type is not a valid network backend, DeviceNotFound
1808 { 'command': 'netdev_add',
1809   'data': {'type': 'str', 'id': 'str', '*props': '**'},
1810   'gen': 'no' }
1813 # @netdev_del:
1815 # Remove a network backend.
1817 # @id: the name of the network backend to remove
1819 # Returns: Nothing on success
1820 #          If @id is not a valid network backend, DeviceNotFound
1822 # Since: 0.14.0
1824 { 'command': 'netdev_del', 'data': {'id': 'str'} }
1827 # @object-add:
1829 # Create a QOM object.
1831 # @qom-type: the class name for the object to be created
1833 # @id: the name of the new object
1835 # @props: #optional a dictionary of properties to be passed to the backend
1837 # Returns: Nothing on success
1838 #          Error if @qom-type is not a valid class name
1840 # Since: 2.0
1842 { 'command': 'object-add',
1843   'data': {'qom-type': 'str', 'id': 'str', '*props': 'dict'},
1844   'gen': 'no' }
1847 # @object-del:
1849 # Remove a QOM object.
1851 # @id: the name of the QOM object to remove
1853 # Returns: Nothing on success
1854 #          Error if @id is not a valid id for a QOM object
1856 # Since: 2.0
1858 { 'command': 'object-del', 'data': {'id': 'str'} }
1861 # @NetdevNoneOptions
1863 # Use it alone to have zero network devices.
1865 # Since 1.2
1867 { 'type': 'NetdevNoneOptions',
1868   'data': { } }
1871 # @NetLegacyNicOptions
1873 # Create a new Network Interface Card.
1875 # @netdev: #optional id of -netdev to connect to
1877 # @macaddr: #optional MAC address
1879 # @model: #optional device model (e1000, rtl8139, virtio etc.)
1881 # @addr: #optional PCI device address
1883 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
1885 # Since 1.2
1887 { 'type': 'NetLegacyNicOptions',
1888   'data': {
1889     '*netdev':  'str',
1890     '*macaddr': 'str',
1891     '*model':   'str',
1892     '*addr':    'str',
1893     '*vectors': 'uint32' } }
1896 # @String
1898 # A fat type wrapping 'str', to be embedded in lists.
1900 # Since 1.2
1902 { 'type': 'String',
1903   'data': {
1904     'str': 'str' } }
1907 # @NetdevUserOptions
1909 # Use the user mode network stack which requires no administrator privilege to
1910 # run.
1912 # @hostname: #optional client hostname reported by the builtin DHCP server
1914 # @restrict: #optional isolate the guest from the host
1916 # @ip: #optional legacy parameter, use net= instead
1918 # @net: #optional IP address and optional netmask
1920 # @host: #optional guest-visible address of the host
1922 # @tftp: #optional root directory of the built-in TFTP server
1924 # @bootfile: #optional BOOTP filename, for use with tftp=
1926 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
1927 #             assign
1929 # @dns: #optional guest-visible address of the virtual nameserver
1931 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
1932 #             to the guest
1934 # @smb: #optional root directory of the built-in SMB server
1936 # @smbserver: #optional IP address of the built-in SMB server
1938 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
1939 #           endpoints
1941 # @guestfwd: #optional forward guest TCP connections
1943 # Since 1.2
1945 { 'type': 'NetdevUserOptions',
1946   'data': {
1947     '*hostname':  'str',
1948     '*restrict':  'bool',
1949     '*ip':        'str',
1950     '*net':       'str',
1951     '*host':      'str',
1952     '*tftp':      'str',
1953     '*bootfile':  'str',
1954     '*dhcpstart': 'str',
1955     '*dns':       'str',
1956     '*dnssearch': ['String'],
1957     '*smb':       'str',
1958     '*smbserver': 'str',
1959     '*hostfwd':   ['String'],
1960     '*guestfwd':  ['String'] } }
1963 # @NetdevTapOptions
1965 # Connect the host TAP network interface name to the VLAN.
1967 # @ifname: #optional interface name
1969 # @fd: #optional file descriptor of an already opened tap
1971 # @fds: #optional multiple file descriptors of already opened multiqueue capable
1972 # tap
1974 # @script: #optional script to initialize the interface
1976 # @downscript: #optional script to shut down the interface
1978 # @helper: #optional command to execute to configure bridge
1980 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
1982 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
1984 # @vhost: #optional enable vhost-net network accelerator
1986 # @vhostfd: #optional file descriptor of an already opened vhost net device
1988 # @vhostfds: #optional file descriptors of multiple already opened vhost net
1989 # devices
1991 # @vhostforce: #optional vhost on for non-MSIX virtio guests
1993 # @queues: #optional number of queues to be created for multiqueue capable tap
1995 # Since 1.2
1997 { 'type': 'NetdevTapOptions',
1998   'data': {
1999     '*ifname':     'str',
2000     '*fd':         'str',
2001     '*fds':        'str',
2002     '*script':     'str',
2003     '*downscript': 'str',
2004     '*helper':     'str',
2005     '*sndbuf':     'size',
2006     '*vnet_hdr':   'bool',
2007     '*vhost':      'bool',
2008     '*vhostfd':    'str',
2009     '*vhostfds':   'str',
2010     '*vhostforce': 'bool',
2011     '*queues':     'uint32'} }
2014 # @NetdevSocketOptions
2016 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2017 # socket connection.
2019 # @fd: #optional file descriptor of an already opened socket
2021 # @listen: #optional port number, and optional hostname, to listen on
2023 # @connect: #optional port number, and optional hostname, to connect to
2025 # @mcast: #optional UDP multicast address and port number
2027 # @localaddr: #optional source address and port for multicast and udp packets
2029 # @udp: #optional UDP unicast address and port number
2031 # Since 1.2
2033 { 'type': 'NetdevSocketOptions',
2034   'data': {
2035     '*fd':        'str',
2036     '*listen':    'str',
2037     '*connect':   'str',
2038     '*mcast':     'str',
2039     '*localaddr': 'str',
2040     '*udp':       'str' } }
2043 # @NetdevVdeOptions
2045 # Connect the VLAN to a vde switch running on the host.
2047 # @sock: #optional socket path
2049 # @port: #optional port number
2051 # @group: #optional group owner of socket
2053 # @mode: #optional permissions for socket
2055 # Since 1.2
2057 { 'type': 'NetdevVdeOptions',
2058   'data': {
2059     '*sock':  'str',
2060     '*port':  'uint16',
2061     '*group': 'str',
2062     '*mode':  'uint16' } }
2065 # @NetdevDumpOptions
2067 # Dump VLAN network traffic to a file.
2069 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2070 # suffixes.
2072 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2074 # Since 1.2
2076 { 'type': 'NetdevDumpOptions',
2077   'data': {
2078     '*len':  'size',
2079     '*file': 'str' } }
2082 # @NetdevBridgeOptions
2084 # Connect a host TAP network interface to a host bridge device.
2086 # @br: #optional bridge name
2088 # @helper: #optional command to execute to configure bridge
2090 # Since 1.2
2092 { 'type': 'NetdevBridgeOptions',
2093   'data': {
2094     '*br':     'str',
2095     '*helper': 'str' } }
2098 # @NetdevHubPortOptions
2100 # Connect two or more net clients through a software hub.
2102 # @hubid: hub identifier number
2104 # Since 1.2
2106 { 'type': 'NetdevHubPortOptions',
2107   'data': {
2108     'hubid':     'int32' } }
2111 # @NetdevNetmapOptions
2113 # Connect a client to a netmap-enabled NIC or to a VALE switch port
2115 # @ifname: Either the name of an existing network interface supported by
2116 #          netmap, or the name of a VALE port (created on the fly).
2117 #          A VALE port name is in the form 'valeXXX:YYY', where XXX and
2118 #          YYY are non-negative integers. XXX identifies a switch and
2119 #          YYY identifies a port of the switch. VALE ports having the
2120 #          same XXX are therefore connected to the same switch.
2122 # @devname: #optional path of the netmap device (default: '/dev/netmap').
2124 # Since 2.0
2126 { 'type': 'NetdevNetmapOptions',
2127   'data': {
2128     'ifname':     'str',
2129     '*devname':    'str' } }
2132 # @NetdevVhostUserOptions
2134 # Vhost-user network backend
2136 # @chardev: name of a unix socket chardev
2138 # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
2140 # Since 2.1
2142 { 'type': 'NetdevVhostUserOptions',
2143   'data': {
2144     'chardev':        'str',
2145     '*vhostforce':    'bool' } }
2148 # @NetClientOptions
2150 # A discriminated record of network device traits.
2152 # Since 1.2
2154 { 'union': 'NetClientOptions',
2155   'data': {
2156     'none':     'NetdevNoneOptions',
2157     'nic':      'NetLegacyNicOptions',
2158     'user':     'NetdevUserOptions',
2159     'tap':      'NetdevTapOptions',
2160     'socket':   'NetdevSocketOptions',
2161     'vde':      'NetdevVdeOptions',
2162     'dump':     'NetdevDumpOptions',
2163     'bridge':   'NetdevBridgeOptions',
2164     'hubport':  'NetdevHubPortOptions',
2165     'netmap':   'NetdevNetmapOptions',
2166     'vhost-user': 'NetdevVhostUserOptions' } }
2169 # @NetLegacy
2171 # Captures the configuration of a network device; legacy.
2173 # @vlan: #optional vlan number
2175 # @id: #optional identifier for monitor commands
2177 # @name: #optional identifier for monitor commands, ignored if @id is present
2179 # @opts: device type specific properties (legacy)
2181 # Since 1.2
2183 { 'type': 'NetLegacy',
2184   'data': {
2185     '*vlan': 'int32',
2186     '*id':   'str',
2187     '*name': 'str',
2188     'opts':  'NetClientOptions' } }
2191 # @Netdev
2193 # Captures the configuration of a network device.
2195 # @id: identifier for monitor commands.
2197 # @opts: device type specific properties
2199 # Since 1.2
2201 { 'type': 'Netdev',
2202   'data': {
2203     'id':   'str',
2204     'opts': 'NetClientOptions' } }
2207 # @InetSocketAddress
2209 # Captures a socket address or address range in the Internet namespace.
2211 # @host: host part of the address
2213 # @port: port part of the address, or lowest port if @to is present
2215 # @to: highest port to try
2217 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2218 #        #optional
2220 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2221 #        #optional
2223 # Since 1.3
2225 { 'type': 'InetSocketAddress',
2226   'data': {
2227     'host': 'str',
2228     'port': 'str',
2229     '*to': 'uint16',
2230     '*ipv4': 'bool',
2231     '*ipv6': 'bool' } }
2234 # @UnixSocketAddress
2236 # Captures a socket address in the local ("Unix socket") namespace.
2238 # @path: filesystem path to use
2240 # Since 1.3
2242 { 'type': 'UnixSocketAddress',
2243   'data': {
2244     'path': 'str' } }
2247 # @SocketAddress
2249 # Captures the address of a socket, which could also be a named file descriptor
2251 # Since 1.3
2253 { 'union': 'SocketAddress',
2254   'data': {
2255     'inet': 'InetSocketAddress',
2256     'unix': 'UnixSocketAddress',
2257     'fd': 'String' } }
2260 # @getfd:
2262 # Receive a file descriptor via SCM rights and assign it a name
2264 # @fdname: file descriptor name
2266 # Returns: Nothing on success
2268 # Since: 0.14.0
2270 # Notes: If @fdname already exists, the file descriptor assigned to
2271 #        it will be closed and replaced by the received file
2272 #        descriptor.
2273 #        The 'closefd' command can be used to explicitly close the
2274 #        file descriptor when it is no longer needed.
2276 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2279 # @closefd:
2281 # Close a file descriptor previously passed via SCM rights
2283 # @fdname: file descriptor name
2285 # Returns: Nothing on success
2287 # Since: 0.14.0
2289 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2292 # @MachineInfo:
2294 # Information describing a machine.
2296 # @name: the name of the machine
2298 # @alias: #optional an alias for the machine name
2300 # @default: #optional whether the machine is default
2302 # @cpu-max: maximum number of CPUs supported by the machine type
2303 #           (since 1.5.0)
2305 # Since: 1.2.0
2307 { 'type': 'MachineInfo',
2308   'data': { 'name': 'str', '*alias': 'str',
2309             '*is-default': 'bool', 'cpu-max': 'int' } }
2312 # @query-machines:
2314 # Return a list of supported machines
2316 # Returns: a list of MachineInfo
2318 # Since: 1.2.0
2320 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2323 # @CpuDefinitionInfo:
2325 # Virtual CPU definition.
2327 # @name: the name of the CPU definition
2329 # Since: 1.2.0
2331 { 'type': 'CpuDefinitionInfo',
2332   'data': { 'name': 'str' } }
2335 # @query-cpu-definitions:
2337 # Return a list of supported virtual CPU definitions
2339 # Returns: a list of CpuDefInfo
2341 # Since: 1.2.0
2343 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2345 # @AddfdInfo:
2347 # Information about a file descriptor that was added to an fd set.
2349 # @fdset-id: The ID of the fd set that @fd was added to.
2351 # @fd: The file descriptor that was received via SCM rights and
2352 #      added to the fd set.
2354 # Since: 1.2.0
2356 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2359 # @add-fd:
2361 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2363 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2365 # @opaque: #optional A free-form string that can be used to describe the fd.
2367 # Returns: @AddfdInfo on success
2368 #          If file descriptor was not received, FdNotSupplied
2369 #          If @fdset-id is a negative value, InvalidParameterValue
2371 # Notes: The list of fd sets is shared by all monitor connections.
2373 #        If @fdset-id is not specified, a new fd set will be created.
2375 # Since: 1.2.0
2377 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2378   'returns': 'AddfdInfo' }
2381 # @remove-fd:
2383 # Remove a file descriptor from an fd set.
2385 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2387 # @fd: #optional The file descriptor that is to be removed.
2389 # Returns: Nothing on success
2390 #          If @fdset-id or @fd is not found, FdNotFound
2392 # Since: 1.2.0
2394 # Notes: The list of fd sets is shared by all monitor connections.
2396 #        If @fd is not specified, all file descriptors in @fdset-id
2397 #        will be removed.
2399 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2402 # @FdsetFdInfo:
2404 # Information about a file descriptor that belongs to an fd set.
2406 # @fd: The file descriptor value.
2408 # @opaque: #optional A free-form string that can be used to describe the fd.
2410 # Since: 1.2.0
2412 { 'type': 'FdsetFdInfo',
2413   'data': {'fd': 'int', '*opaque': 'str'} }
2416 # @FdsetInfo:
2418 # Information about an fd set.
2420 # @fdset-id: The ID of the fd set.
2422 # @fds: A list of file descriptors that belong to this fd set.
2424 # Since: 1.2.0
2426 { 'type': 'FdsetInfo',
2427   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2430 # @query-fdsets:
2432 # Return information describing all fd sets.
2434 # Returns: A list of @FdsetInfo
2436 # Since: 1.2.0
2438 # Note: The list of fd sets is shared by all monitor connections.
2441 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2444 # @TargetInfo:
2446 # Information describing the QEMU target.
2448 # @arch: the target architecture (eg "x86_64", "i386", etc)
2450 # Since: 1.2.0
2452 { 'type': 'TargetInfo',
2453   'data': { 'arch': 'str' } }
2456 # @query-target:
2458 # Return information about the target for this QEMU
2460 # Returns: TargetInfo
2462 # Since: 1.2.0
2464 { 'command': 'query-target', 'returns': 'TargetInfo' }
2467 # @QKeyCode:
2469 # An enumeration of key name.
2471 # This is used by the send-key command.
2473 # Since: 1.3.0
2475 # 'unmapped' and 'pause' since 2.0
2477 { 'enum': 'QKeyCode',
2478   'data': [ 'unmapped',
2479             'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
2480             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
2481             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
2482             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
2483             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
2484             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
2485             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
2486             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
2487             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
2488             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
2489             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
2490             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
2491             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
2492             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
2493              'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause' ] }
2496 # @KeyValue
2498 # Represents a keyboard key.
2500 # Since: 1.3.0
2502 { 'union': 'KeyValue',
2503   'data': {
2504     'number': 'int',
2505     'qcode': 'QKeyCode' } }
2508 # @send-key:
2510 # Send keys to guest.
2512 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
2513 #        simultaneously sent to the guest. A @KeyValue.number value is sent
2514 #        directly to the guest, while @KeyValue.qcode must be a valid
2515 #        @QKeyCode value
2517 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
2518 #             to 100
2520 # Returns: Nothing on success
2521 #          If key is unknown or redundant, InvalidParameter
2523 # Since: 1.3.0
2526 { 'command': 'send-key',
2527   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
2530 # @screendump:
2532 # Write a PPM of the VGA screen to a file.
2534 # @filename: the path of a new PPM file to store the image
2536 # Returns: Nothing on success
2538 # Since: 0.14.0
2540 { 'command': 'screendump', 'data': {'filename': 'str'} }
2543 # @ChardevFile:
2545 # Configuration info for file chardevs.
2547 # @in:  #optional The name of the input file
2548 # @out: The name of the output file
2550 # Since: 1.4
2552 { 'type': 'ChardevFile', 'data': { '*in' : 'str',
2553                                    'out' : 'str' } }
2556 # @ChardevHostdev:
2558 # Configuration info for device and pipe chardevs.
2560 # @device: The name of the special file for the device,
2561 #          i.e. /dev/ttyS0 on Unix or COM1: on Windows
2562 # @type: What kind of device this is.
2564 # Since: 1.4
2566 { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
2569 # @ChardevSocket:
2571 # Configuration info for (stream) socket chardevs.
2573 # @addr: socket address to listen on (server=true)
2574 #        or connect to (server=false)
2575 # @server: #optional create server socket (default: true)
2576 # @wait: #optional wait for incoming connection on server
2577 #        sockets (default: false).
2578 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
2579 # @telnet: #optional enable telnet protocol on server
2580 #          sockets (default: false)
2582 # Since: 1.4
2584 { 'type': 'ChardevSocket', 'data': { 'addr'     : 'SocketAddress',
2585                                      '*server'  : 'bool',
2586                                      '*wait'    : 'bool',
2587                                      '*nodelay' : 'bool',
2588                                      '*telnet'  : 'bool' } }
2591 # @ChardevUdp:
2593 # Configuration info for datagram socket chardevs.
2595 # @remote: remote address
2596 # @local: #optional local address
2598 # Since: 1.5
2600 { 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
2601                                   '*local' : 'SocketAddress' } }
2604 # @ChardevMux:
2606 # Configuration info for mux chardevs.
2608 # @chardev: name of the base chardev.
2610 # Since: 1.5
2612 { 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
2615 # @ChardevStdio:
2617 # Configuration info for stdio chardevs.
2619 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
2620 #          be delivered to qemu.  Default: true in -nographic mode,
2621 #          false otherwise.
2623 # Since: 1.5
2625 { 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
2628 # @ChardevSpiceChannel:
2630 # Configuration info for spice vm channel chardevs.
2632 # @type: kind of channel (for example vdagent).
2634 # Since: 1.5
2636 { 'type': 'ChardevSpiceChannel', 'data': { 'type'  : 'str' } }
2639 # @ChardevSpicePort:
2641 # Configuration info for spice port chardevs.
2643 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
2645 # Since: 1.5
2647 { 'type': 'ChardevSpicePort', 'data': { 'fqdn'  : 'str' } }
2650 # @ChardevVC:
2652 # Configuration info for virtual console chardevs.
2654 # @width:  console width,  in pixels
2655 # @height: console height, in pixels
2656 # @cols:   console width,  in chars
2657 # @rows:   console height, in chars
2659 # Since: 1.5
2661 { 'type': 'ChardevVC', 'data': { '*width'  : 'int',
2662                                  '*height' : 'int',
2663                                  '*cols'   : 'int',
2664                                  '*rows'   : 'int' } }
2667 # @ChardevRingbuf:
2669 # Configuration info for ring buffer chardevs.
2671 # @size: #optional ring buffer size, must be power of two, default is 65536
2673 # Since: 1.5
2675 { 'type': 'ChardevRingbuf', 'data': { '*size'  : 'int' } }
2678 # @ChardevBackend:
2680 # Configuration info for the new chardev backend.
2682 # Since: 1.4
2684 { 'type': 'ChardevDummy', 'data': { } }
2686 { 'union': 'ChardevBackend', 'data': { 'file'   : 'ChardevFile',
2687                                        'serial' : 'ChardevHostdev',
2688                                        'parallel': 'ChardevHostdev',
2689                                        'pipe'   : 'ChardevHostdev',
2690                                        'socket' : 'ChardevSocket',
2691                                        'udp'    : 'ChardevUdp',
2692                                        'pty'    : 'ChardevDummy',
2693                                        'null'   : 'ChardevDummy',
2694                                        'mux'    : 'ChardevMux',
2695                                        'msmouse': 'ChardevDummy',
2696                                        'braille': 'ChardevDummy',
2697                                        'stdio'  : 'ChardevStdio',
2698                                        'console': 'ChardevDummy',
2699                                        'spicevmc' : 'ChardevSpiceChannel',
2700                                        'spiceport' : 'ChardevSpicePort',
2701                                        'vc'     : 'ChardevVC',
2702                                        'ringbuf': 'ChardevRingbuf',
2703                                        # next one is just for compatibility
2704                                        'memory' : 'ChardevRingbuf' } }
2707 # @ChardevReturn:
2709 # Return info about the chardev backend just created.
2711 # @pty: #optional name of the slave pseudoterminal device, present if
2712 #       and only if a chardev of type 'pty' was created
2714 # Since: 1.4
2716 { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
2719 # @chardev-add:
2721 # Add a character device backend
2723 # @id: the chardev's ID, must be unique
2724 # @backend: backend type and parameters
2726 # Returns: ChardevReturn.
2728 # Since: 1.4
2730 { 'command': 'chardev-add', 'data': {'id'      : 'str',
2731                                      'backend' : 'ChardevBackend' },
2732   'returns': 'ChardevReturn' }
2735 # @chardev-remove:
2737 # Remove a character device backend
2739 # @id: the chardev's ID, must exist and not be in use
2741 # Returns: Nothing on success
2743 # Since: 1.4
2745 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
2748 # @TpmModel:
2750 # An enumeration of TPM models
2752 # @tpm-tis: TPM TIS model
2754 # Since: 1.5
2756 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
2759 # @query-tpm-models:
2761 # Return a list of supported TPM models
2763 # Returns: a list of TpmModel
2765 # Since: 1.5
2767 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
2770 # @TpmType:
2772 # An enumeration of TPM types
2774 # @passthrough: TPM passthrough type
2776 # Since: 1.5
2778 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
2781 # @query-tpm-types:
2783 # Return a list of supported TPM types
2785 # Returns: a list of TpmType
2787 # Since: 1.5
2789 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
2792 # @TPMPassthroughOptions:
2794 # Information about the TPM passthrough type
2796 # @path: #optional string describing the path used for accessing the TPM device
2798 # @cancel-path: #optional string showing the TPM's sysfs cancel file
2799 #               for cancellation of TPM commands while they are executing
2801 # Since: 1.5
2803 { 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
2804                                              '*cancel-path' : 'str'} }
2807 # @TpmTypeOptions:
2809 # A union referencing different TPM backend types' configuration options
2811 # @passthrough: The configuration options for the TPM passthrough type
2813 # Since: 1.5
2815 { 'union': 'TpmTypeOptions',
2816    'data': { 'passthrough' : 'TPMPassthroughOptions' } }
2819 # @TpmInfo:
2821 # Information about the TPM
2823 # @id: The Id of the TPM
2825 # @model: The TPM frontend model
2827 # @options: The TPM (backend) type configuration options
2829 # Since: 1.5
2831 { 'type': 'TPMInfo',
2832   'data': {'id': 'str',
2833            'model': 'TpmModel',
2834            'options': 'TpmTypeOptions' } }
2837 # @query-tpm:
2839 # Return information about the TPM device
2841 # Returns: @TPMInfo on success
2843 # Since: 1.5
2845 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
2848 # @AcpiTableOptions
2850 # Specify an ACPI table on the command line to load.
2852 # At most one of @file and @data can be specified. The list of files specified
2853 # by any one of them is loaded and concatenated in order. If both are omitted,
2854 # @data is implied.
2856 # Other fields / optargs can be used to override fields of the generic ACPI
2857 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
2858 # Description Table Header. If a header field is not overridden, then the
2859 # corresponding value from the concatenated blob is used (in case of @file), or
2860 # it is filled in with a hard-coded value (in case of @data).
2862 # String fields are copied into the matching ACPI member from lowest address
2863 # upwards, and silently truncated / NUL-padded to length.
2865 # @sig: #optional table signature / identifier (4 bytes)
2867 # @rev: #optional table revision number (dependent on signature, 1 byte)
2869 # @oem_id: #optional OEM identifier (6 bytes)
2871 # @oem_table_id: #optional OEM table identifier (8 bytes)
2873 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
2875 # @asl_compiler_id: #optional identifier of the utility that created the table
2876 #                   (4 bytes)
2878 # @asl_compiler_rev: #optional revision number of the utility that created the
2879 #                    table (4 bytes)
2881 # @file: #optional colon (:) separated list of pathnames to load and
2882 #        concatenate as table data. The resultant binary blob is expected to
2883 #        have an ACPI table header. At least one file is required. This field
2884 #        excludes @data.
2886 # @data: #optional colon (:) separated list of pathnames to load and
2887 #        concatenate as table data. The resultant binary blob must not have an
2888 #        ACPI table header. At least one file is required. This field excludes
2889 #        @file.
2891 # Since 1.5
2893 { 'type': 'AcpiTableOptions',
2894   'data': {
2895     '*sig':               'str',
2896     '*rev':               'uint8',
2897     '*oem_id':            'str',
2898     '*oem_table_id':      'str',
2899     '*oem_rev':           'uint32',
2900     '*asl_compiler_id':   'str',
2901     '*asl_compiler_rev':  'uint32',
2902     '*file':              'str',
2903     '*data':              'str' }}
2906 # @CommandLineParameterType:
2908 # Possible types for an option parameter.
2910 # @string: accepts a character string
2912 # @boolean: accepts "on" or "off"
2914 # @number: accepts a number
2916 # @size: accepts a number followed by an optional suffix (K)ilo,
2917 #        (M)ega, (G)iga, (T)era
2919 # Since 1.5
2921 { 'enum': 'CommandLineParameterType',
2922   'data': ['string', 'boolean', 'number', 'size'] }
2925 # @CommandLineParameterInfo:
2927 # Details about a single parameter of a command line option.
2929 # @name: parameter name
2931 # @type: parameter @CommandLineParameterType
2933 # @help: #optional human readable text string, not suitable for parsing.
2935 # @default: #optional default value string (since 2.1)
2937 # Since 1.5
2939 { 'type': 'CommandLineParameterInfo',
2940   'data': { 'name': 'str',
2941             'type': 'CommandLineParameterType',
2942             '*help': 'str',
2943             '*default': 'str' } }
2946 # @CommandLineOptionInfo:
2948 # Details about a command line option, including its list of parameter details
2950 # @option: option name
2952 # @parameters: an array of @CommandLineParameterInfo
2954 # Since 1.5
2956 { 'type': 'CommandLineOptionInfo',
2957   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
2960 # @query-command-line-options:
2962 # Query command line option schema.
2964 # @option: #optional option name
2966 # Returns: list of @CommandLineOptionInfo for all options (or for the given
2967 #          @option).  Returns an error if the given @option doesn't exist.
2969 # Since 1.5
2971 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
2972  'returns': ['CommandLineOptionInfo'] }
2975 # @X86CPURegister32
2977 # A X86 32-bit register
2979 # Since: 1.5
2981 { 'enum': 'X86CPURegister32',
2982   'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
2985 # @X86CPUFeatureWordInfo
2987 # Information about a X86 CPU feature word
2989 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
2991 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
2992 #                   feature word
2994 # @cpuid-register: Output register containing the feature bits
2996 # @features: value of output register, containing the feature bits
2998 # Since: 1.5
3000 { 'type': 'X86CPUFeatureWordInfo',
3001   'data': { 'cpuid-input-eax': 'int',
3002             '*cpuid-input-ecx': 'int',
3003             'cpuid-register': 'X86CPURegister32',
3004             'features': 'int' } }
3007 # @RxState:
3009 # Packets receiving state
3011 # @normal: filter assigned packets according to the mac-table
3013 # @none: don't receive any assigned packet
3015 # @all: receive all assigned packets
3017 # Since: 1.6
3019 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
3022 # @RxFilterInfo:
3024 # Rx-filter information for a NIC.
3026 # @name: net client name
3028 # @promiscuous: whether promiscuous mode is enabled
3030 # @multicast: multicast receive state
3032 # @unicast: unicast receive state
3034 # @vlan: vlan receive state (Since 2.0)
3036 # @broadcast-allowed: whether to receive broadcast
3038 # @multicast-overflow: multicast table is overflowed or not
3040 # @unicast-overflow: unicast table is overflowed or not
3042 # @main-mac: the main macaddr string
3044 # @vlan-table: a list of active vlan id
3046 # @unicast-table: a list of unicast macaddr string
3048 # @multicast-table: a list of multicast macaddr string
3050 # Since 1.6
3053 { 'type': 'RxFilterInfo',
3054   'data': {
3055     'name':               'str',
3056     'promiscuous':        'bool',
3057     'multicast':          'RxState',
3058     'unicast':            'RxState',
3059     'vlan':               'RxState',
3060     'broadcast-allowed':  'bool',
3061     'multicast-overflow': 'bool',
3062     'unicast-overflow':   'bool',
3063     'main-mac':           'str',
3064     'vlan-table':         ['int'],
3065     'unicast-table':      ['str'],
3066     'multicast-table':    ['str'] }}
3069 # @query-rx-filter:
3071 # Return rx-filter information for all NICs (or for the given NIC).
3073 # @name: #optional net client name
3075 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
3076 #          Returns an error if the given @name doesn't exist, or given
3077 #          NIC doesn't support rx-filter querying, or given net client
3078 #          isn't a NIC.
3080 # Since: 1.6
3082 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
3083   'returns': ['RxFilterInfo'] }
3086 # @InputButton
3088 # Button of a pointer input device (mouse, tablet).
3090 # Since: 2.0
3092 { 'enum'  : 'InputButton',
3093   'data'  : [ 'Left', 'Middle', 'Right', 'WheelUp', 'WheelDown' ] }
3096 # @InputButton
3098 # Position axis of a pointer input device (mouse, tablet).
3100 # Since: 2.0
3102 { 'enum'  : 'InputAxis',
3103   'data'  : [ 'X', 'Y' ] }
3106 # @InputKeyEvent
3108 # Keyboard input event.
3110 # @key:    Which key this event is for.
3111 # @down:   True for key-down and false for key-up events.
3113 # Since: 2.0
3115 { 'type'  : 'InputKeyEvent',
3116   'data'  : { 'key'     : 'KeyValue',
3117               'down'    : 'bool' } }
3120 # @InputBtnEvent
3122 # Pointer button input event.
3124 # @button: Which button this event is for.
3125 # @down:   True for key-down and false for key-up events.
3127 # Since: 2.0
3129 { 'type'  : 'InputBtnEvent',
3130   'data'  : { 'button'  : 'InputButton',
3131               'down'    : 'bool' } }
3134 # @InputMoveEvent
3136 # Pointer motion input event.
3138 # @axis:   Which axis is referenced by @value.
3139 # @value:  Pointer position.  For absolute coordinates the
3140 #          valid range is 0 -> 0x7ffff
3142 # Since: 2.0
3144 { 'type'  : 'InputMoveEvent',
3145   'data'  : { 'axis'    : 'InputAxis',
3146               'value'   : 'int' } }
3149 # @InputEvent
3151 # Input event union.
3153 # Since: 2.0
3155 { 'union' : 'InputEvent',
3156   'data'  : { 'key'     : 'InputKeyEvent',
3157               'btn'     : 'InputBtnEvent',
3158               'rel'     : 'InputMoveEvent',
3159               'abs'     : 'InputMoveEvent' } }
3162 # @NumaOptions
3164 # A discriminated record of NUMA options. (for OptsVisitor)
3166 # Since 2.1
3168 { 'union': 'NumaOptions',
3169   'data': {
3170     'node': 'NumaNodeOptions' }}
3173 # @NumaNodeOptions
3175 # Create a guest NUMA node. (for OptsVisitor)
3177 # @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
3179 # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
3180 #         if omitted)
3182 # @mem: #optional memory size of this node; mutually exclusive with @memdev.
3183 #       Equally divide total memory among nodes if both @mem and @memdev are
3184 #       omitted.
3186 # @memdev: #optional memory backend object.  If specified for one node,
3187 #          it must be specified for all nodes.
3189 # Since: 2.1
3191 { 'type': 'NumaNodeOptions',
3192   'data': {
3193    '*nodeid': 'uint16',
3194    '*cpus':   ['uint16'],
3195    '*mem':    'size',
3196    '*memdev': 'str' }}
3199 # @HostMemPolicy
3201 # Host memory policy types
3203 # @default: restore default policy, remove any nondefault policy
3205 # @preferred: set the preferred host nodes for allocation
3207 # @bind: a strict policy that restricts memory allocation to the
3208 #        host nodes specified
3210 # @interleave: memory allocations are interleaved across the set
3211 #              of host nodes specified
3213 # Since 2.1
3215 { 'enum': 'HostMemPolicy',
3216   'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
3219 # @Memdev:
3221 # Information about memory backend
3223 # @size: memory backend size
3225 # @merge: enables or disables memory merge support
3227 # @dump: includes memory backend's memory in a core dump or not
3229 # @prealloc: enables or disables memory preallocation
3231 # @host-nodes: host nodes for its memory policy
3233 # @policy: memory policy of memory backend
3235 # Since: 2.1
3238 { 'type': 'Memdev',
3239   'data': {
3240     'size':       'size',
3241     'merge':      'bool',
3242     'dump':       'bool',
3243     'prealloc':   'bool',
3244     'host-nodes': ['uint16'],
3245     'policy':     'HostMemPolicy' }}
3248 # @query-memdev:
3250 # Returns information for all memory backends.
3252 # Returns: a list of @Memdev.
3254 # Since: 2.1
3256 { 'command': 'query-memdev', 'returns': ['Memdev'] }
3259 # @PCDIMMDeviceInfo:
3261 # PCDIMMDevice state information
3263 # @id: #optional device's ID
3265 # @addr: physical address, where device is mapped
3267 # @size: size of memory that the device provides
3269 # @slot: slot number at which device is plugged in
3271 # @node: NUMA node number where device is plugged in
3273 # @memdev: memory backend linked with device
3275 # @hotplugged: true if device was hotplugged
3277 # @hotpluggable: true if device if could be added/removed while machine is running
3279 # Since: 2.1
3281 { 'type': 'PCDIMMDeviceInfo',
3282   'data': { '*id': 'str',
3283             'addr': 'int',
3284             'size': 'int',
3285             'slot': 'int',
3286             'node': 'int',
3287             'memdev': 'str',
3288             'hotplugged': 'bool',
3289             'hotpluggable': 'bool'
3290           }
3294 # @MemoryDeviceInfo:
3296 # Union containing information about a memory device
3298 # Since: 2.1
3300 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
3303 # @query-memory-devices
3305 # Lists available memory devices and their state
3307 # Since: 2.1
3309 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
3311 ## @ACPISlotType
3313 # @DIMM: memory slot
3315 { 'enum': 'ACPISlotType', 'data': [ 'DIMM' ] }
3317 ## @ACPIOSTInfo
3319 # OSPM Status Indication for a device
3320 # For description of possible values of @source and @status fields
3321 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
3323 # @device: #optional device ID associated with slot
3325 # @slot: slot ID, unique per slot of a given @slot-type
3327 # @slot-type: type of the slot
3329 # @source: an integer containing the source event
3331 # @status: an integer containing the status code
3333 # Since: 2.1
3335 { 'type': 'ACPIOSTInfo',
3336   'data'  : { '*device': 'str',
3337               'slot': 'str',
3338               'slot-type': 'ACPISlotType',
3339               'source': 'int',
3340               'status': 'int' } }
3343 # @query-acpi-ospm-status
3345 # Lists ACPI OSPM status of ACPI device objects,
3346 # which might be reported via _OST method
3348 # Since: 2.1
3350 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
3353 # @WatchdogExpirationAction
3355 # An enumeration of the actions taken when the watchdog device's timer is
3356 # expired
3358 # @reset: system resets
3360 # @shutdown: system shutdown, note that it is similar to @powerdown, which
3361 #            tries to set to system status and notify guest
3363 # @poweroff: system poweroff, the emulator program exits
3365 # @pause: system pauses, similar to @stop
3367 # @debug: system enters debug state
3369 # @none: nothing is done
3371 # Since: 2.1
3373 { 'enum': 'WatchdogExpirationAction',
3374   'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none' ] }
3377 # @IoOperationType
3379 # An enumeration of the I/O operation types
3381 # @read: read operation
3383 # @write: write operation
3385 # Since: 2.1
3387 { 'enum': 'IoOperationType',
3388   'data': [ 'read', 'write' ] }
3391 # @GuestPanicAction
3393 # An enumeration of the actions taken when guest OS panic is detected
3395 # @pause: system pauses
3397 # Since: 2.1
3399 { 'enum': 'GuestPanicAction',
3400   'data': [ 'pause' ] }
3402 { 'include': 'qapi-event.json' }