Merge remote-tracking branch 'qemu/master'
[qemu/ar7.git] / qapi-schema.json
blob9c92482898dba5a92a39955977a43739e335189a
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' }
14 # Tracing commands
15 { 'include': 'qapi/trace.json' }
18 # LostTickPolicy:
20 # Policy for handling lost ticks in timer devices.
22 # @discard: throw away the missed tick(s) and continue with future injection
23 #           normally.  Guest time may be delayed, unless the OS has explicit
24 #           handling of lost ticks
26 # @delay: continue to deliver ticks at the normal rate.  Guest time will be
27 #         delayed due to the late tick
29 # @merge: merge the missed tick(s) into one tick and inject.  Guest time
30 #         may be delayed, depending on how the OS reacts to the merging
31 #         of ticks
33 # @slew: deliver ticks at a higher rate to catch up with the missed tick. The
34 #        guest time should not be delayed once catchup is complete.
36 # Since: 2.0
38 { 'enum': 'LostTickPolicy',
39   'data': ['discard', 'delay', 'merge', 'slew' ] }
41 # @add_client
43 # Allow client connections for VNC, Spice and socket based
44 # character devices to be passed in to QEMU via SCM_RIGHTS.
46 # @protocol: protocol name. Valid names are "vnc", "spice" or the
47 #            name of a character device (eg. from -chardev id=XXXX)
49 # @fdname: file descriptor name previously passed via 'getfd' command
51 # @skipauth: #optional whether to skip authentication. Only applies
52 #            to "vnc" and "spice" protocols
54 # @tls: #optional whether to perform TLS. Only applies to the "spice"
55 #       protocol
57 # Returns: nothing on success.
59 # Since: 0.14.0
61 { 'command': 'add_client',
62   'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
63             '*tls': 'bool' } }
66 # @NameInfo:
68 # Guest name information.
70 # @name: #optional The name of the guest
72 # Since 0.14.0
74 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
77 # @query-name:
79 # Return the name information of a guest.
81 # Returns: @NameInfo of the guest
83 # Since 0.14.0
85 { 'command': 'query-name', 'returns': 'NameInfo' }
88 # @KvmInfo:
90 # Information about support for KVM acceleration
92 # @enabled: true if KVM acceleration is active
94 # @present: true if KVM acceleration is built into this executable
96 # Since: 0.14.0
98 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
101 # @query-kvm:
103 # Returns information about KVM acceleration
105 # Returns: @KvmInfo
107 # Since: 0.14.0
109 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
112 # @RunState
114 # An enumeration of VM run states.
116 # @debug: QEMU is running on a debugger
118 # @finish-migrate: guest is paused to finish the migration process
120 # @inmigrate: guest is paused waiting for an incoming migration.  Note
121 # that this state does not tell whether the machine will start at the
122 # end of the migration.  This depends on the command-line -S option and
123 # any invocation of 'stop' or 'cont' that has happened since QEMU was
124 # started.
126 # @internal-error: An internal error that prevents further guest execution
127 # has occurred
129 # @io-error: the last IOP has failed and the device is configured to pause
130 # on I/O errors
132 # @paused: guest has been paused via the 'stop' command
134 # @postmigrate: guest is paused following a successful 'migrate'
136 # @prelaunch: QEMU was started with -S and guest has not started
138 # @restore-vm: guest is paused to restore VM state
140 # @running: guest is actively running
142 # @save-vm: guest is paused to save the VM state
144 # @shutdown: guest is shut down (and -no-shutdown is in use)
146 # @suspended: guest is suspended (ACPI S3)
148 # @watchdog: the watchdog action is configured to pause and has been triggered
150 # @guest-panicked: guest has been panicked as a result of guest OS panic
152 { 'enum': 'RunState',
153   'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
154             'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
155             'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
156             'guest-panicked' ] }
159 # @StatusInfo:
161 # Information about VCPU run state
163 # @running: true if all VCPUs are runnable, false if not runnable
165 # @singlestep: true if VCPUs are in single-step mode
167 # @status: the virtual machine @RunState
169 # Since:  0.14.0
171 # Notes: @singlestep is enabled through the GDB stub
173 { 'struct': 'StatusInfo',
174   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
177 # @query-status:
179 # Query the run status of all VCPUs
181 # Returns: @StatusInfo reflecting all VCPUs
183 # Since:  0.14.0
185 { 'command': 'query-status', 'returns': 'StatusInfo' }
188 # @UuidInfo:
190 # Guest UUID information.
192 # @UUID: the UUID of the guest
194 # Since: 0.14.0
196 # Notes: If no UUID was specified for the guest, a null UUID is returned.
198 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
201 # @query-uuid:
203 # Query the guest UUID information.
205 # Returns: The @UuidInfo for the guest
207 # Since 0.14.0
209 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
212 # @ChardevInfo:
214 # Information about a character device.
216 # @label: the label of the character device
218 # @filename: the filename of the character device
220 # @frontend-open: shows whether the frontend device attached to this backend
221 #                 (eg. with the chardev=... option) is in open or closed state
222 #                 (since 2.1)
224 # Notes: @filename is encoded using the QEMU command line character device
225 #        encoding.  See the QEMU man page for details.
227 # Since: 0.14.0
229 { 'struct': 'ChardevInfo', 'data': {'label': 'str',
230                                   'filename': 'str',
231                                   'frontend-open': 'bool'} }
234 # @query-chardev:
236 # Returns information about current character devices.
238 # Returns: a list of @ChardevInfo
240 # Since: 0.14.0
242 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
245 # @ChardevBackendInfo:
247 # Information about a character device backend
249 # @name: The backend name
251 # Since: 2.0
253 { 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} }
256 # @query-chardev-backends:
258 # Returns information about character device backends.
260 # Returns: a list of @ChardevBackendInfo
262 # Since: 2.0
264 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
267 # @DataFormat:
269 # An enumeration of data format.
271 # @utf8: Data is a UTF-8 string (RFC 3629)
273 # @base64: Data is Base64 encoded binary (RFC 3548)
275 # Since: 1.4
277 { 'enum': 'DataFormat',
278   'data': [ 'utf8', 'base64' ] }
281 # @ringbuf-write:
283 # Write to a ring buffer character device.
285 # @device: the ring buffer character device name
287 # @data: data to write
289 # @format: #optional data encoding (default 'utf8').
290 #          - base64: data must be base64 encoded text.  Its binary
291 #            decoding gets written.
292 #            Bug: invalid base64 is currently not rejected.
293 #            Whitespace *is* invalid.
294 #          - utf8: data's UTF-8 encoding is written
295 #          - data itself is always Unicode regardless of format, like
296 #            any other string.
298 # Returns: Nothing on success
300 # Since: 1.4
302 { 'command': 'ringbuf-write',
303   'data': {'device': 'str', 'data': 'str',
304            '*format': 'DataFormat'} }
307 # @ringbuf-read:
309 # Read from a ring buffer character device.
311 # @device: the ring buffer character device name
313 # @size: how many bytes to read at most
315 # @format: #optional data encoding (default 'utf8').
316 #          - base64: the data read is returned in base64 encoding.
317 #          - utf8: the data read is interpreted as UTF-8.
318 #            Bug: can screw up when the buffer contains invalid UTF-8
319 #            sequences, NUL characters, after the ring buffer lost
320 #            data, and when reading stops because the size limit is
321 #            reached.
322 #          - The return value is always Unicode regardless of format,
323 #            like any other string.
325 # Returns: data read from the device
327 # Since: 1.4
329 { 'command': 'ringbuf-read',
330   'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
331   'returns': 'str' }
334 # @EventInfo:
336 # Information about a QMP event
338 # @name: The event name
340 # Since: 1.2.0
342 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
345 # @query-events:
347 # Return a list of supported QMP events by this server
349 # Returns: A list of @EventInfo for all supported events
351 # Since: 1.2.0
353 { 'command': 'query-events', 'returns': ['EventInfo'] }
356 # @MigrationStats
358 # Detailed migration status.
360 # @transferred: amount of bytes already transferred to the target VM
362 # @remaining: amount of bytes remaining to be transferred to the target VM
364 # @total: total amount of bytes involved in the migration process
366 # @duplicate: number of duplicate (zero) pages (since 1.2)
368 # @skipped: number of skipped zero pages (since 1.5)
370 # @normal : number of normal pages (since 1.2)
372 # @normal-bytes: number of normal bytes sent (since 1.2)
374 # @dirty-pages-rate: number of pages dirtied by second by the
375 #        guest (since 1.3)
377 # @mbps: throughput in megabits/sec. (since 1.6)
379 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
381 # Since: 0.14.0
383 { 'struct': 'MigrationStats',
384   'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
385            'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
386            'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
387            'mbps' : 'number', 'dirty-sync-count' : 'int' } }
390 # @XBZRLECacheStats
392 # Detailed XBZRLE migration cache statistics
394 # @cache-size: XBZRLE cache size
396 # @bytes: amount of bytes already transferred to the target VM
398 # @pages: amount of pages transferred to the target VM
400 # @cache-miss: number of cache miss
402 # @cache-miss-rate: rate of cache miss (since 2.1)
404 # @overflow: number of overflows
406 # Since: 1.2
408 { 'struct': 'XBZRLECacheStats',
409   'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
410            'cache-miss': 'int', 'cache-miss-rate': 'number',
411            'overflow': 'int' } }
413 # @MigrationStatus:
415 # An enumeration of migration status.
417 # @none: no migration has ever happened.
419 # @setup: migration process has been initiated.
421 # @cancelling: in the process of cancelling migration.
423 # @cancelled: cancelling migration is finished.
425 # @active: in the process of doing migration.
427 # @completed: migration is finished.
429 # @failed: some error occurred during migration process.
431 # Since: 2.3
434 { 'enum': 'MigrationStatus',
435   'data': [ 'none', 'setup', 'cancelling', 'cancelled',
436             'active', 'completed', 'failed' ] }
439 # @MigrationInfo
441 # Information about current migration process.
443 # @status: #optional @MigrationStatus describing the current migration status.
444 #          If this field is not returned, no migration process
445 #          has been initiated
447 # @ram: #optional @MigrationStats containing detailed migration
448 #       status, only returned if status is 'active' or
449 #       'completed'(since 1.2)
451 # @disk: #optional @MigrationStats containing detailed disk migration
452 #        status, only returned if status is 'active' and it is a block
453 #        migration
455 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
456 #                migration statistics, only returned if XBZRLE feature is on and
457 #                status is 'active' or 'completed' (since 1.2)
459 # @total-time: #optional total amount of milliseconds since migration started.
460 #        If migration has ended, it returns the total migration
461 #        time. (since 1.2)
463 # @downtime: #optional only present when migration finishes correctly
464 #        total downtime in milliseconds for the guest.
465 #        (since 1.3)
467 # @expected-downtime: #optional only present while migration is active
468 #        expected downtime in milliseconds for the guest in last walk
469 #        of the dirty bitmap. (since 1.3)
471 # @setup-time: #optional amount of setup time in milliseconds _before_ the
472 #        iterations begin but _after_ the QMP command is issued. This is designed
473 #        to provide an accounting of any activities (such as RDMA pinning) which
474 #        may be expensive, but do not actually occur during the iterative
475 #        migration rounds themselves. (since 1.6)
477 # Since: 0.14.0
479 { 'struct': 'MigrationInfo',
480   'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
481            '*disk': 'MigrationStats',
482            '*xbzrle-cache': 'XBZRLECacheStats',
483            '*total-time': 'int',
484            '*expected-downtime': 'int',
485            '*downtime': 'int',
486            '*setup-time': 'int'} }
489 # @query-migrate
491 # Returns information about current migration process.
493 # Returns: @MigrationInfo
495 # Since: 0.14.0
497 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
500 # @MigrationCapability
502 # Migration capabilities enumeration
504 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
505 #          This feature allows us to minimize migration traffic for certain work
506 #          loads, by sending compressed difference of the pages
508 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
509 #          mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
510 #          Disabled by default. (since 2.0)
512 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
513 #          essentially saves 1MB of zeroes per block on the wire. Enabling requires
514 #          source and target VM to support this feature. To enable it is sufficient
515 #          to enable the capability on the source VM. The feature is disabled by
516 #          default. (since 1.6)
518 # @compress: Use multiple compression threads to accelerate live migration.
519 #          This feature can help to reduce the migration traffic, by sending
520 #          compressed pages. Please note that if compress and xbzrle are both
521 #          on, compress only takes effect in the ram bulk stage, after that,
522 #          it will be disabled and only xbzrle takes effect, this can help to
523 #          minimize migration traffic. The feature is disabled by default.
524 #          (since 2.4 )
526 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
527 #          to speed up convergence of RAM migration. (since 1.6)
529 # Since: 1.2
531 { 'enum': 'MigrationCapability',
532   'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
533            'compress'] }
536 # @MigrationCapabilityStatus
538 # Migration capability information
540 # @capability: capability enum
542 # @state: capability state bool
544 # Since: 1.2
546 { 'struct': 'MigrationCapabilityStatus',
547   'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
550 # @migrate-set-capabilities
552 # Enable/Disable the following migration capabilities (like xbzrle)
554 # @capabilities: json array of capability modifications to make
556 # Since: 1.2
558 { 'command': 'migrate-set-capabilities',
559   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
562 # @query-migrate-capabilities
564 # Returns information about the current migration capabilities status
566 # Returns: @MigrationCapabilitiesStatus
568 # Since: 1.2
570 { 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}
572 # @MigrationParameter
574 # Migration parameters enumeration
576 # @compress-level: Set the compression level to be used in live migration,
577 #          the compression level is an integer between 0 and 9, where 0 means
578 #          no compression, 1 means the best compression speed, and 9 means best
579 #          compression ratio which will consume more CPU.
581 # @compress-threads: Set compression thread count to be used in live migration,
582 #          the compression thread count is an integer between 1 and 255.
584 # @decompress-threads: Set decompression thread count to be used in live
585 #          migration, the decompression thread count is an integer between 1
586 #          and 255. Usually, decompression is at least 4 times as fast as
587 #          compression, so set the decompress-threads to the number about 1/4
588 #          of compress-threads is adequate.
590 # Since: 2.4
592 { 'enum': 'MigrationParameter',
593   'data': ['compress-level', 'compress-threads', 'decompress-threads'] }
596 # @migrate-set-parameters
598 # Set the following migration parameters
600 # @compress-level: compression level
602 # @compress-threads: compression thread count
604 # @decompress-threads: decompression thread count
606 # Since: 2.4
608 { 'command': 'migrate-set-parameters',
609   'data': { '*compress-level': 'int',
610             '*compress-threads': 'int',
611             '*decompress-threads': 'int'} }
614 # @MigrationParameters
616 # @compress-level: compression level
618 # @compress-threads: compression thread count
620 # @decompress-threads: decompression thread count
622 # Since: 2.4
624 { 'struct': 'MigrationParameters',
625   'data': { 'compress-level': 'int',
626             'compress-threads': 'int',
627             'decompress-threads': 'int'} }
629 # @query-migrate-parameters
631 # Returns information about the current migration parameters
633 # Returns: @MigrationParameters
635 # Since: 2.4
637 { 'command': 'query-migrate-parameters',
638   'returns': 'MigrationParameters' }
641 # @MouseInfo:
643 # Information about a mouse device.
645 # @name: the name of the mouse device
647 # @index: the index of the mouse device
649 # @current: true if this device is currently receiving mouse events
651 # @absolute: true if this device supports absolute coordinates as input
653 # Since: 0.14.0
655 { 'struct': 'MouseInfo',
656   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
657            'absolute': 'bool'} }
660 # @query-mice:
662 # Returns information about each active mouse device
664 # Returns: a list of @MouseInfo for each device
666 # Since: 0.14.0
668 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
671 # @CpuInfo:
673 # Information about a virtual CPU
675 # @CPU: the index of the virtual CPU
677 # @current: this only exists for backwards compatible and should be ignored
679 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
680 #          to a processor specific low power mode.
682 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
683 #                pointer.
684 #                If the target is Sparc, this is the PC component of the
685 #                instruction pointer.
687 # @nip: #optional If the target is PPC, the instruction pointer
689 # @npc: #optional If the target is Sparc, the NPC component of the instruction
690 #                 pointer
692 # @PC: #optional If the target is MIPS, the instruction pointer
694 # @thread_id: ID of the underlying host thread
696 # Since: 0.14.0
698 # Notes: @halted is a transient state that changes frequently.  By the time the
699 #        data is sent to the client, the guest may no longer be halted.
701 { 'struct': 'CpuInfo',
702   'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
703            '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
706 # @query-cpus:
708 # Returns a list of information about each virtual CPU.
710 # Returns: a list of @CpuInfo for each virtual CPU
712 # Since: 0.14.0
714 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
717 # @IOThreadInfo:
719 # Information about an iothread
721 # @id: the identifier of the iothread
723 # @thread-id: ID of the underlying host thread
725 # Since: 2.0
727 { 'struct': 'IOThreadInfo',
728   'data': {'id': 'str', 'thread-id': 'int'} }
731 # @query-iothreads:
733 # Returns a list of information about each iothread.
735 # Note this list excludes the QEMU main loop thread, which is not declared
736 # using the -object iothread command-line option.  It is always the main thread
737 # of the process.
739 # Returns: a list of @IOThreadInfo for each iothread
741 # Since: 2.0
743 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
746 # @NetworkAddressFamily
748 # The network address family
750 # @ipv4: IPV4 family
752 # @ipv6: IPV6 family
754 # @unix: unix socket
756 # @unknown: otherwise
758 # Since: 2.1
760 { 'enum': 'NetworkAddressFamily',
761   'data': [ 'ipv4', 'ipv6', 'unix', 'unknown' ] }
764 # @VncBasicInfo
766 # The basic information for vnc network connection
768 # @host: IP address
770 # @service: The service name of the vnc port. This may depend on the host
771 #           system's service database so symbolic names should not be relied
772 #           on.
774 # @family: address family
776 # @websocket: true in case the socket is a websocket (since 2.3).
778 # Since: 2.1
780 { 'struct': 'VncBasicInfo',
781   'data': { 'host': 'str',
782             'service': 'str',
783             'family': 'NetworkAddressFamily',
784             'websocket': 'bool' } }
787 # @VncServerInfo
789 # The network connection information for server
791 # @auth: #optional, authentication method
793 # Since: 2.1
795 { 'struct': 'VncServerInfo',
796   'base': 'VncBasicInfo',
797   'data': { '*auth': 'str' } }
800 # @VncClientInfo:
802 # Information about a connected VNC client.
804 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
805 #              Name of the client.
807 # @sasl_username: #optional If SASL authentication is in use, the SASL username
808 #                 used for authentication.
810 # Since: 0.14.0
812 { 'struct': 'VncClientInfo',
813   'base': 'VncBasicInfo',
814   'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
817 # @VncInfo:
819 # Information about the VNC session.
821 # @enabled: true if the VNC server is enabled, false otherwise
823 # @host: #optional The hostname the VNC server is bound to.  This depends on
824 #        the name resolution on the host and may be an IP address.
826 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
827 #                    'ipv4' if the host is listening for IPv4 connections
828 #                    'unix' if the host is listening on a unix domain socket
829 #                    'unknown' otherwise
831 # @service: #optional The service name of the server's port.  This may depends
832 #           on the host system's service database so symbolic names should not
833 #           be relied on.
835 # @auth: #optional the current authentication type used by the server
836 #        'none' if no authentication is being used
837 #        'vnc' if VNC authentication is being used
838 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
839 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
840 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
841 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
842 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
843 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
844 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
845 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
846 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
848 # @clients: a list of @VncClientInfo of all currently connected clients
850 # Since: 0.14.0
852 { 'struct': 'VncInfo',
853   'data': {'enabled': 'bool', '*host': 'str',
854            '*family': 'NetworkAddressFamily',
855            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
858 # @VncPriAuth:
860 # vnc primary authentication method.
862 # Since: 2.3
864 { 'enum': 'VncPrimaryAuth',
865   'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
866             'tls', 'vencrypt', 'sasl' ] }
869 # @VncVencryptSubAuth:
871 # vnc sub authentication method with vencrypt.
873 # Since: 2.3
875 { 'enum': 'VncVencryptSubAuth',
876   'data': [ 'plain',
877             'tls-none',  'x509-none',
878             'tls-vnc',   'x509-vnc',
879             'tls-plain', 'x509-plain',
880             'tls-sasl',  'x509-sasl' ] }
883 # @VncInfo2:
885 # Information about a vnc server
887 # @id: vnc server name.
889 # @server: A list of @VncBasincInfo describing all listening sockets.
890 #          The list can be empty (in case the vnc server is disabled).
891 #          It also may have multiple entries: normal + websocket,
892 #          possibly also ipv4 + ipv6 in the future.
894 # @clients: A list of @VncClientInfo of all currently connected clients.
895 #           The list can be empty, for obvious reasons.
897 # @auth: The current authentication type used by the server
899 # @vencrypt: #optional The vencrypt sub authentication type used by the server,
900 #            only specified in case auth == vencrypt.
902 # @display: #optional The display device the vnc server is linked to.
904 # Since: 2.3
906 { 'struct': 'VncInfo2',
907   'data': { 'id'        : 'str',
908             'server'    : ['VncBasicInfo'],
909             'clients'   : ['VncClientInfo'],
910             'auth'      : 'VncPrimaryAuth',
911             '*vencrypt' : 'VncVencryptSubAuth',
912             '*display'  : 'str' } }
915 # @query-vnc:
917 # Returns information about the current VNC server
919 # Returns: @VncInfo
921 # Since: 0.14.0
923 { 'command': 'query-vnc', 'returns': 'VncInfo' }
926 # @query-vnc-servers:
928 # Returns a list of vnc servers.  The list can be empty.
930 # Returns: a list of @VncInfo2
932 # Since: 2.3
934 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
937 # @SpiceBasicInfo
939 # The basic information for SPICE network connection
941 # @host: IP address
943 # @port: port number
945 # @family: address family
947 # Since: 2.1
949 { 'struct': 'SpiceBasicInfo',
950   'data': { 'host': 'str',
951             'port': 'str',
952             'family': 'NetworkAddressFamily' } }
955 # @SpiceServerInfo
957 # Information about a SPICE server
959 # @auth: #optional, authentication method
961 # Since: 2.1
963 { 'struct': 'SpiceServerInfo',
964   'base': 'SpiceBasicInfo',
965   'data': { '*auth': 'str' } }
968 # @SpiceChannel
970 # Information about a SPICE client channel.
972 # @connection-id: SPICE connection id number.  All channels with the same id
973 #                 belong to the same SPICE session.
975 # @channel-type: SPICE channel type number.  "1" is the main control
976 #                channel, filter for this one if you want to track spice
977 #                sessions only
979 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
980 #              multiple channels of the same type exist, such as multiple
981 #              display channels in a multihead setup
983 # @tls: true if the channel is encrypted, false otherwise.
985 # Since: 0.14.0
987 { 'struct': 'SpiceChannel',
988   'base': 'SpiceBasicInfo',
989   'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
990            'tls': 'bool'} }
993 # @SpiceQueryMouseMode
995 # An enumeration of Spice mouse states.
997 # @client: Mouse cursor position is determined by the client.
999 # @server: Mouse cursor position is determined by the server.
1001 # @unknown: No information is available about mouse mode used by
1002 #           the spice server.
1004 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1006 # Since: 1.1
1008 { 'enum': 'SpiceQueryMouseMode',
1009   'data': [ 'client', 'server', 'unknown' ] }
1012 # @SpiceInfo
1014 # Information about the SPICE session.
1016 # @enabled: true if the SPICE server is enabled, false otherwise
1018 # @migrated: true if the last guest migration completed and spice
1019 #            migration had completed as well. false otherwise.
1021 # @host: #optional The hostname the SPICE server is bound to.  This depends on
1022 #        the name resolution on the host and may be an IP address.
1024 # @port: #optional The SPICE server's port number.
1026 # @compiled-version: #optional SPICE server version.
1028 # @tls-port: #optional The SPICE server's TLS port number.
1030 # @auth: #optional the current authentication type used by the server
1031 #        'none'  if no authentication is being used
1032 #        'spice' uses SASL or direct TLS authentication, depending on command
1033 #                line options
1035 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1036 #              be determined by the client or the server, or unknown if spice
1037 #              server doesn't provide this information.
1039 #              Since: 1.1
1041 # @channels: a list of @SpiceChannel for each active spice channel
1043 # Since: 0.14.0
1045 { 'struct': 'SpiceInfo',
1046   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1047            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1048            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1051 # @query-spice
1053 # Returns information about the current SPICE server
1055 # Returns: @SpiceInfo
1057 # Since: 0.14.0
1059 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1062 # @BalloonInfo:
1064 # Information about the guest balloon device.
1066 # @actual: the number of bytes the balloon currently contains
1068 # Since: 0.14.0
1071 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1074 # @query-balloon:
1076 # Return information about the balloon device.
1078 # Returns: @BalloonInfo on success
1079 #          If the balloon driver is enabled but not functional because the KVM
1080 #          kernel module cannot support it, KvmMissingCap
1081 #          If no balloon device is present, DeviceNotActive
1083 # Since: 0.14.0
1085 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1088 # @PciMemoryRange:
1090 # A PCI device memory region
1092 # @base: the starting address (guest physical)
1094 # @limit: the ending address (guest physical)
1096 # Since: 0.14.0
1098 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1101 # @PciMemoryRegion
1103 # Information about a PCI device I/O region.
1105 # @bar: the index of the Base Address Register for this region
1107 # @type: 'io' if the region is a PIO region
1108 #        'memory' if the region is a MMIO region
1110 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1112 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1114 # Since: 0.14.0
1116 { 'struct': 'PciMemoryRegion',
1117   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1118            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1121 # @PciBusInfo:
1123 # Information about a bus of a PCI Bridge device
1125 # @number: primary bus interface number.  This should be the number of the
1126 #          bus the device resides on.
1128 # @secondary: secondary bus interface number.  This is the number of the
1129 #             main bus for the bridge
1131 # @subordinate: This is the highest number bus that resides below the
1132 #               bridge.
1134 # @io_range: The PIO range for all devices on this bridge
1136 # @memory_range: The MMIO range for all devices on this bridge
1138 # @prefetchable_range: The range of prefetchable MMIO for all devices on
1139 #                      this bridge
1141 # Since: 2.4
1143 { 'struct': 'PciBusInfo',
1144   'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1145            'io_range': 'PciMemoryRange',
1146            'memory_range': 'PciMemoryRange',
1147            'prefetchable_range': 'PciMemoryRange' } }
1150 # @PciBridgeInfo:
1152 # Information about a PCI Bridge device
1154 # @bus: information about the bus the device resides on
1156 # @devices: a list of @PciDeviceInfo for each device on this bridge
1158 # Since: 0.14.0
1160 { 'struct': 'PciBridgeInfo',
1161   'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
1164 # @PciDeviceClass:
1166 # Information about the Class of a PCI device
1168 # @desc: #optional a string description of the device's class
1170 # @class: the class code of the device
1172 # Since: 2.4
1174 { 'struct': 'PciDeviceClass',
1175   'data': {'*desc': 'str', 'class': 'int'} }
1178 # @PciDeviceId:
1180 # Information about the Id of a PCI device
1182 # @device: the PCI device id
1184 # @vendor: the PCI vendor id
1186 # Since: 2.4
1188 { 'struct': 'PciDeviceId',
1189   'data': {'device': 'int', 'vendor': 'int'} }
1192 # @PciDeviceInfo:
1194 # Information about a PCI device
1196 # @bus: the bus number of the device
1198 # @slot: the slot the device is located in
1200 # @function: the function of the slot used by the device
1202 # @class_info: the class of the device
1204 # @id: the PCI device id
1206 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1208 # @qdev_id: the device name of the PCI device
1210 # @pci_bridge: if the device is a PCI bridge, the bridge information
1212 # @regions: a list of the PCI I/O regions associated with the device
1214 # Notes: the contents of @class_info.desc are not stable and should only be
1215 #        treated as informational.
1217 # Since: 0.14.0
1219 { 'struct': 'PciDeviceInfo',
1220   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1221            'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
1222            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1223            'regions': ['PciMemoryRegion']} }
1226 # @PciInfo:
1228 # Information about a PCI bus
1230 # @bus: the bus index
1232 # @devices: a list of devices on this bus
1234 # Since: 0.14.0
1236 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1239 # @query-pci:
1241 # Return information about the PCI bus topology of the guest.
1243 # Returns: a list of @PciInfo for each PCI bus
1245 # Since: 0.14.0
1247 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1250 # @quit:
1252 # This command will cause the QEMU process to exit gracefully.  While every
1253 # attempt is made to send the QMP response before terminating, this is not
1254 # guaranteed.  When using this interface, a premature EOF would not be
1255 # unexpected.
1257 # Since: 0.14.0
1259 { 'command': 'quit' }
1262 # @stop:
1264 # Stop all guest VCPU execution.
1266 # Since:  0.14.0
1268 # Notes:  This function will succeed even if the guest is already in the stopped
1269 #         state.  In "inmigrate" state, it will ensure that the guest
1270 #         remains paused once migration finishes, as if the -S option was
1271 #         passed on the command line.
1273 { 'command': 'stop' }
1276 # @system_reset:
1278 # Performs a hard reset of a guest.
1280 # Since: 0.14.0
1282 { 'command': 'system_reset' }
1285 # @system_powerdown:
1287 # Requests that a guest perform a powerdown operation.
1289 # Since: 0.14.0
1291 # Notes: A guest may or may not respond to this command.  This command
1292 #        returning does not indicate that a guest has accepted the request or
1293 #        that it has shut down.  Many guests will respond to this command by
1294 #        prompting the user in some way.
1296 { 'command': 'system_powerdown' }
1299 # @cpu:
1301 # This command is a nop that is only provided for the purposes of compatibility.
1303 # Since: 0.14.0
1305 # Notes: Do not use this command.
1307 { 'command': 'cpu', 'data': {'index': 'int'} }
1310 # @cpu-add
1312 # Adds CPU with specified ID
1314 # @id: ID of CPU to be created, valid values [0..max_cpus)
1316 # Returns: Nothing on success
1318 # Since 1.5
1320 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1323 # @memsave:
1325 # Save a portion of guest memory to a file.
1327 # @val: the virtual address of the guest to start from
1329 # @size: the size of memory region to save
1331 # @filename: the file to save the memory to as binary data
1333 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1334 #                       virtual address (defaults to CPU 0)
1336 # Returns: Nothing on success
1338 # Since: 0.14.0
1340 # Notes: Errors were not reliably returned until 1.1
1342 { 'command': 'memsave',
1343   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1346 # @pmemsave:
1348 # Save a portion of guest physical memory to a file.
1350 # @val: the physical address of the guest to start from
1352 # @size: the size of memory region to save
1354 # @filename: the file to save the memory to as binary data
1356 # Returns: Nothing on success
1358 # Since: 0.14.0
1360 # Notes: Errors were not reliably returned until 1.1
1362 { 'command': 'pmemsave',
1363   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1366 # @cont:
1368 # Resume guest VCPU execution.
1370 # Since:  0.14.0
1372 # Returns:  If successful, nothing
1373 #           If QEMU was started with an encrypted block device and a key has
1374 #              not yet been set, DeviceEncrypted.
1376 # Notes:  This command will succeed if the guest is currently running.  It
1377 #         will also succeed if the guest is in the "inmigrate" state; in
1378 #         this case, the effect of the command is to make sure the guest
1379 #         starts once migration finishes, removing the effect of the -S
1380 #         command line option if it was passed.
1382 { 'command': 'cont' }
1385 # @system_wakeup:
1387 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1389 # Since:  1.1
1391 # Returns:  nothing.
1393 { 'command': 'system_wakeup' }
1396 # @inject-nmi:
1398 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
1400 # Returns:  If successful, nothing
1402 # Since:  0.14.0
1404 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
1406 { 'command': 'inject-nmi' }
1409 # @set_link:
1411 # Sets the link status of a virtual network adapter.
1413 # @name: the device name of the virtual network adapter
1415 # @up: true to set the link status to be up
1417 # Returns: Nothing on success
1418 #          If @name is not a valid network device, DeviceNotFound
1420 # Since: 0.14.0
1422 # Notes: Not all network adapters support setting link status.  This command
1423 #        will succeed even if the network adapter does not support link status
1424 #        notification.
1426 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1429 # @balloon:
1431 # Request the balloon driver to change its balloon size.
1433 # @value: the target size of the balloon in bytes
1435 # Returns: Nothing on success
1436 #          If the balloon driver is enabled but not functional because the KVM
1437 #            kernel module cannot support it, KvmMissingCap
1438 #          If no balloon device is present, DeviceNotActive
1440 # Notes: This command just issues a request to the guest.  When it returns,
1441 #        the balloon size may not have changed.  A guest can change the balloon
1442 #        size independent of this command.
1444 # Since: 0.14.0
1446 { 'command': 'balloon', 'data': {'value': 'int'} }
1449 # @Abort
1451 # This action can be used to test transaction failure.
1453 # Since: 1.6
1455 { 'struct': 'Abort',
1456   'data': { } }
1459 # @TransactionAction
1461 # A discriminated record of operations that can be performed with
1462 # @transaction.
1464 # Since 1.1
1466 # drive-backup since 1.6
1467 # abort since 1.6
1468 # blockdev-snapshot-internal-sync since 1.7
1469 # blockdev-backup since 2.3
1471 { 'union': 'TransactionAction',
1472   'data': {
1473        'blockdev-snapshot-sync': 'BlockdevSnapshot',
1474        'drive-backup': 'DriveBackup',
1475        'blockdev-backup': 'BlockdevBackup',
1476        'abort': 'Abort',
1477        'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal'
1478    } }
1481 # @transaction
1483 # Executes a number of transactionable QMP commands atomically. If any
1484 # operation fails, then the entire set of actions will be abandoned and the
1485 # appropriate error returned.
1487 #  List of:
1488 #  @TransactionAction: information needed for the respective operation
1490 # Returns: nothing on success
1491 #          Errors depend on the operations of the transaction
1493 # Note: The transaction aborts on the first failure.  Therefore, there will be
1494 # information on only one failed operation returned in an error condition, and
1495 # subsequent actions will not have been attempted.
1497 # Since 1.1
1499 { 'command': 'transaction',
1500   'data': { 'actions': [ 'TransactionAction' ] } }
1503 # @human-monitor-command:
1505 # Execute a command on the human monitor and return the output.
1507 # @command-line: the command to execute in the human monitor
1509 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1511 # Returns: the output of the command as a string
1513 # Since: 0.14.0
1515 # Notes: This command only exists as a stop-gap.  Its use is highly
1516 #        discouraged.  The semantics of this command are not guaranteed.
1518 #        Known limitations:
1520 #        o This command is stateless, this means that commands that depend
1521 #          on state information (such as getfd) might not work
1523 #       o Commands that prompt the user for data (eg. 'cont' when the block
1524 #         device is encrypted) don't currently work
1526 { 'command': 'human-monitor-command',
1527   'data': {'command-line': 'str', '*cpu-index': 'int'},
1528   'returns': 'str' }
1531 # @migrate_cancel
1533 # Cancel the current executing migration process.
1535 # Returns: nothing on success
1537 # Notes: This command succeeds even if there is no migration process running.
1539 # Since: 0.14.0
1541 { 'command': 'migrate_cancel' }
1544 # @migrate_set_downtime
1546 # Set maximum tolerated downtime for migration.
1548 # @value: maximum downtime in seconds
1550 # Returns: nothing on success
1552 # Since: 0.14.0
1554 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1557 # @migrate_set_speed
1559 # Set maximum speed for migration.
1561 # @value: maximum speed in bytes.
1563 # Returns: nothing on success
1565 # Notes: A value lesser than zero will be automatically round up to zero.
1567 # Since: 0.14.0
1569 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1572 # @migrate-set-cache-size
1574 # Set XBZRLE cache size
1576 # @value: cache size in bytes
1578 # The size will be rounded down to the nearest power of 2.
1579 # The cache size can be modified before and during ongoing migration
1581 # Returns: nothing on success
1583 # Since: 1.2
1585 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1588 # @query-migrate-cache-size
1590 # query XBZRLE cache size
1592 # Returns: XBZRLE cache size in bytes
1594 # Since: 1.2
1596 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1599 # @ObjectPropertyInfo:
1601 # @name: the name of the property
1603 # @type: the type of the property.  This will typically come in one of four
1604 #        forms:
1606 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1607 #           These types are mapped to the appropriate JSON type.
1609 #        2) A legacy type in the form 'legacy<subtype>' where subtype is the
1610 #           legacy qdev typename.  These types are always treated as strings.
1612 #        3) A child type in the form 'child<subtype>' where subtype is a qdev
1613 #           device type name.  Child properties create the composition tree.
1615 #        4) A link type in the form 'link<subtype>' where subtype is a qdev
1616 #           device type name.  Link properties form the device model graph.
1618 # Since: 1.2
1620 { 'struct': 'ObjectPropertyInfo',
1621   'data': { 'name': 'str', 'type': 'str' } }
1624 # @qom-list:
1626 # This command will list any properties of a object given a path in the object
1627 # model.
1629 # @path: the path within the object model.  See @qom-get for a description of
1630 #        this parameter.
1632 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1633 #          object.
1635 # Since: 1.2
1637 { 'command': 'qom-list',
1638   'data': { 'path': 'str' },
1639   'returns': [ 'ObjectPropertyInfo' ] }
1642 # @qom-get:
1644 # This command will get a property from a object model path and return the
1645 # value.
1647 # @path: The path within the object model.  There are two forms of supported
1648 #        paths--absolute and partial paths.
1650 #        Absolute paths are derived from the root object and can follow child<>
1651 #        or link<> properties.  Since they can follow link<> properties, they
1652 #        can be arbitrarily long.  Absolute paths look like absolute filenames
1653 #        and are prefixed  with a leading slash.
1655 #        Partial paths look like relative filenames.  They do not begin
1656 #        with a prefix.  The matching rules for partial paths are subtle but
1657 #        designed to make specifying objects easy.  At each level of the
1658 #        composition tree, the partial path is matched as an absolute path.
1659 #        The first match is not returned.  At least two matches are searched
1660 #        for.  A successful result is only returned if only one match is
1661 #        found.  If more than one match is found, a flag is return to
1662 #        indicate that the match was ambiguous.
1664 # @property: The property name to read
1666 # Returns: The property value.  The type depends on the property type.  legacy<>
1667 #          properties are returned as #str.  child<> and link<> properties are
1668 #          returns as #str pathnames.  All integer property types (u8, u16, etc)
1669 #          are returned as #int.
1671 # Since: 1.2
1673 { 'command': 'qom-get',
1674   'data': { 'path': 'str', 'property': 'str' },
1675   'returns': '**',
1676   'gen': false }
1679 # @qom-set:
1681 # This command will set a property from a object model path.
1683 # @path: see @qom-get for a description of this parameter
1685 # @property: the property name to set
1687 # @value: a value who's type is appropriate for the property type.  See @qom-get
1688 #         for a description of type mapping.
1690 # Since: 1.2
1692 { 'command': 'qom-set',
1693   'data': { 'path': 'str', 'property': 'str', 'value': '**' },
1694   'gen': false }
1697 # @set_password:
1699 # Sets the password of a remote display session.
1701 # @protocol: `vnc' to modify the VNC server password
1702 #            `spice' to modify the Spice server password
1704 # @password: the new password
1706 # @connected: #optional how to handle existing clients when changing the
1707 #                       password.  If nothing is specified, defaults to `keep'
1708 #                       `fail' to fail the command if clients are connected
1709 #                       `disconnect' to disconnect existing clients
1710 #                       `keep' to maintain existing clients
1712 # Returns: Nothing on success
1713 #          If Spice is not enabled, DeviceNotFound
1715 # Since: 0.14.0
1717 { 'command': 'set_password',
1718   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1721 # @expire_password:
1723 # Expire the password of a remote display server.
1725 # @protocol: the name of the remote display protocol `vnc' or `spice'
1727 # @time: when to expire the password.
1728 #        `now' to expire the password immediately
1729 #        `never' to cancel password expiration
1730 #        `+INT' where INT is the number of seconds from now (integer)
1731 #        `INT' where INT is the absolute time in seconds
1733 # Returns: Nothing on success
1734 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
1736 # Since: 0.14.0
1738 # Notes: Time is relative to the server and currently there is no way to
1739 #        coordinate server time with client time.  It is not recommended to
1740 #        use the absolute time version of the @time parameter unless you're
1741 #        sure you are on the same machine as the QEMU instance.
1743 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1746 # @change-vnc-password:
1748 # Change the VNC server password.
1750 # @password:  the new password to use with VNC authentication
1752 # Since: 1.1
1754 # Notes:  An empty password in this command will set the password to the empty
1755 #         string.  Existing clients are unaffected by executing this command.
1757 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1760 # @change:
1762 # This command is multiple commands multiplexed together.
1764 # @device: This is normally the name of a block device but it may also be 'vnc'.
1765 #          when it's 'vnc', then sub command depends on @target
1767 # @target: If @device is a block device, then this is the new filename.
1768 #          If @device is 'vnc', then if the value 'password' selects the vnc
1769 #          change password command.   Otherwise, this specifies a new server URI
1770 #          address to listen to for VNC connections.
1772 # @arg:    If @device is a block device, then this is an optional format to open
1773 #          the device with.
1774 #          If @device is 'vnc' and @target is 'password', this is the new VNC
1775 #          password to set.  If this argument is an empty string, then no future
1776 #          logins will be allowed.
1778 # Returns: Nothing on success.
1779 #          If @device is not a valid block device, DeviceNotFound
1780 #          If the new block device is encrypted, DeviceEncrypted.  Note that
1781 #          if this error is returned, the device has been opened successfully
1782 #          and an additional call to @block_passwd is required to set the
1783 #          device's password.  The behavior of reads and writes to the block
1784 #          device between when these calls are executed is undefined.
1786 # Notes:  It is strongly recommended that this interface is not used especially
1787 #         for changing block devices.
1789 # Since: 0.14.0
1791 { 'command': 'change',
1792   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1795 # @ObjectTypeInfo:
1797 # This structure describes a search result from @qom-list-types
1799 # @name: the type name found in the search
1801 # Since: 1.1
1803 # Notes: This command is experimental and may change syntax in future releases.
1805 { 'struct': 'ObjectTypeInfo',
1806   'data': { 'name': 'str' } }
1809 # @qom-list-types:
1811 # This command will return a list of types given search parameters
1813 # @implements: if specified, only return types that implement this type name
1815 # @abstract: if true, include abstract types in the results
1817 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1819 # Since: 1.1
1821 { 'command': 'qom-list-types',
1822   'data': { '*implements': 'str', '*abstract': 'bool' },
1823   'returns': [ 'ObjectTypeInfo' ] }
1826 # @DevicePropertyInfo:
1828 # Information about device properties.
1830 # @name: the name of the property
1831 # @type: the typename of the property
1832 # @description: #optional if specified, the description of the property.
1833 #               (since 2.2)
1835 # Since: 1.2
1837 { 'struct': 'DevicePropertyInfo',
1838   'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
1841 # @device-list-properties:
1843 # List properties associated with a device.
1845 # @typename: the type name of a device
1847 # Returns: a list of DevicePropertyInfo describing a devices properties
1849 # Since: 1.2
1851 { 'command': 'device-list-properties',
1852   'data': { 'typename': 'str'},
1853   'returns': [ 'DevicePropertyInfo' ] }
1856 # @migrate
1858 # Migrates the current running guest to another Virtual Machine.
1860 # @uri: the Uniform Resource Identifier of the destination VM
1862 # @blk: #optional do block migration (full disk copy)
1864 # @inc: #optional incremental disk copy migration
1866 # @detach: this argument exists only for compatibility reasons and
1867 #          is ignored by QEMU
1869 # Returns: nothing on success
1871 # Since: 0.14.0
1873 { 'command': 'migrate',
1874   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
1877 # @migrate-incoming
1879 # Start an incoming migration, the qemu must have been started
1880 # with -incoming defer
1882 # @uri: The Uniform Resource Identifier identifying the source or
1883 #       address to listen on
1885 # Returns: nothing on success
1887 # Since: 2.3
1888 # Note: It's a bad idea to use a string for the uri, but it needs to stay
1889 # compatible with -incoming and the format of the uri is already exposed
1890 # above libvirt
1892 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
1894 # @xen-save-devices-state:
1896 # Save the state of all devices to file. The RAM and the block devices
1897 # of the VM are not saved by this command.
1899 # @filename: the file to save the state of the devices to as binary
1900 # data. See xen-save-devices-state.txt for a description of the binary
1901 # format.
1903 # Returns: Nothing on success
1905 # Since: 1.1
1907 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
1910 # @xen-set-global-dirty-log
1912 # Enable or disable the global dirty log mode.
1914 # @enable: true to enable, false to disable.
1916 # Returns: nothing
1918 # Since: 1.3
1920 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1923 # @device_del:
1925 # Remove a device from a guest
1927 # @id: the name of the device
1929 # Returns: Nothing on success
1930 #          If @id is not a valid device, DeviceNotFound
1932 # Notes: When this command completes, the device may not be removed from the
1933 #        guest.  Hot removal is an operation that requires guest cooperation.
1934 #        This command merely requests that the guest begin the hot removal
1935 #        process.  Completion of the device removal process is signaled with a
1936 #        DEVICE_DELETED event. Guest reset will automatically complete removal
1937 #        for all devices.
1939 # Since: 0.14.0
1941 { 'command': 'device_del', 'data': {'id': 'str'} }
1944 # @DumpGuestMemoryFormat:
1946 # An enumeration of guest-memory-dump's format.
1948 # @elf: elf format
1950 # @kdump-zlib: kdump-compressed format with zlib-compressed
1952 # @kdump-lzo: kdump-compressed format with lzo-compressed
1954 # @kdump-snappy: kdump-compressed format with snappy-compressed
1956 # Since: 2.0
1958 { 'enum': 'DumpGuestMemoryFormat',
1959   'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
1962 # @dump-guest-memory
1964 # Dump guest's memory to vmcore. It is a synchronous operation that can take
1965 # very long depending on the amount of guest memory. This command is only
1966 # supported on i386 and x86_64.
1968 # @paging: if true, do paging to get guest's memory mapping. This allows
1969 #          using gdb to process the core file.
1971 #          IMPORTANT: this option can make QEMU allocate several gigabytes
1972 #                     of RAM. This can happen for a large guest, or a
1973 #                     malicious guest pretending to be large.
1975 #          Also, paging=true has the following limitations:
1977 #             1. The guest may be in a catastrophic state or can have corrupted
1978 #                memory, which cannot be trusted
1979 #             2. The guest can be in real-mode even if paging is enabled. For
1980 #                example, the guest uses ACPI to sleep, and ACPI sleep state
1981 #                goes in real-mode
1983 # @protocol: the filename or file descriptor of the vmcore. The supported
1984 #            protocols are:
1986 #            1. file: the protocol starts with "file:", and the following
1987 #               string is the file's path.
1988 #            2. fd: the protocol starts with "fd:", and the following string
1989 #               is the fd's name.
1991 # @begin: #optional if specified, the starting physical address.
1993 # @length: #optional if specified, the memory size, in bytes. If you don't
1994 #          want to dump all guest's memory, please specify the start @begin
1995 #          and @length
1997 # @format: #optional if specified, the format of guest memory dump. But non-elf
1998 #          format is conflict with paging and filter, ie. @paging, @begin and
1999 #          @length is not allowed to be specified with non-elf @format at the
2000 #          same time (since 2.0)
2002 # Returns: nothing on success
2004 # Since: 1.2
2006 { 'command': 'dump-guest-memory',
2007   'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2008             '*length': 'int', '*format': 'DumpGuestMemoryFormat' } }
2011 # @DumpGuestMemoryCapability:
2013 # A list of the available formats for dump-guest-memory
2015 # Since: 2.0
2017 { 'struct': 'DumpGuestMemoryCapability',
2018   'data': {
2019       'formats': ['DumpGuestMemoryFormat'] } }
2022 # @query-dump-guest-memory-capability:
2024 # Returns the available formats for dump-guest-memory
2026 # Returns:  A @DumpGuestMemoryCapability object listing available formats for
2027 #           dump-guest-memory
2029 # Since: 2.0
2031 { 'command': 'query-dump-guest-memory-capability',
2032   'returns': 'DumpGuestMemoryCapability' }
2035 # @netdev_add:
2037 # Add a network backend.
2039 # @type: the type of network backend.  Current valid values are 'user', 'tap',
2040 #        'vde', 'socket', 'dump' and 'bridge'
2042 # @id: the name of the new network backend
2044 # @props: #optional a list of properties to be passed to the backend in
2045 #         the format 'name=value', like 'ifname=tap0,script=no'
2047 # Notes: The semantics of @props is not well defined.  Future commands will be
2048 #        introduced that provide stronger typing for backend creation.
2050 # Since: 0.14.0
2052 # Returns: Nothing on success
2053 #          If @type is not a valid network backend, DeviceNotFound
2055 { 'command': 'netdev_add',
2056   'data': {'type': 'str', 'id': 'str', '*props': '**'},
2057   'gen': false }
2060 # @netdev_del:
2062 # Remove a network backend.
2064 # @id: the name of the network backend to remove
2066 # Returns: Nothing on success
2067 #          If @id is not a valid network backend, DeviceNotFound
2069 # Since: 0.14.0
2071 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2074 # @object-add:
2076 # Create a QOM object.
2078 # @qom-type: the class name for the object to be created
2080 # @id: the name of the new object
2082 # @props: #optional a dictionary of properties to be passed to the backend
2084 # Returns: Nothing on success
2085 #          Error if @qom-type is not a valid class name
2087 # Since: 2.0
2089 { 'command': 'object-add',
2090   'data': {'qom-type': 'str', 'id': 'str', '*props': '**'},
2091   'gen': false }
2094 # @object-del:
2096 # Remove a QOM object.
2098 # @id: the name of the QOM object to remove
2100 # Returns: Nothing on success
2101 #          Error if @id is not a valid id for a QOM object
2103 # Since: 2.0
2105 { 'command': 'object-del', 'data': {'id': 'str'} }
2108 # @NetdevNoneOptions
2110 # Use it alone to have zero network devices.
2112 # Since 1.2
2114 { 'struct': 'NetdevNoneOptions',
2115   'data': { } }
2118 # @NetLegacyNicOptions
2120 # Create a new Network Interface Card.
2122 # @netdev: #optional id of -netdev to connect to
2124 # @macaddr: #optional MAC address
2126 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2128 # @addr: #optional PCI device address
2130 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2132 # Since 1.2
2134 { 'struct': 'NetLegacyNicOptions',
2135   'data': {
2136     '*netdev':  'str',
2137     '*macaddr': 'str',
2138     '*model':   'str',
2139     '*addr':    'str',
2140     '*vectors': 'uint32' } }
2143 # @String
2145 # A fat type wrapping 'str', to be embedded in lists.
2147 # Since 1.2
2149 { 'struct': 'String',
2150   'data': {
2151     'str': 'str' } }
2154 # @NetdevUserOptions
2156 # Use the user mode network stack which requires no administrator privilege to
2157 # run.
2159 # @hostname: #optional client hostname reported by the builtin DHCP server
2161 # @restrict: #optional isolate the guest from the host
2163 # @ip: #optional legacy parameter, use net= instead
2165 # @net: #optional IP address and optional netmask
2167 # @host: #optional guest-visible address of the host
2169 # @tftp: #optional root directory of the built-in TFTP server
2171 # @bootfile: #optional BOOTP filename, for use with tftp=
2173 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2174 #             assign
2176 # @dns: #optional guest-visible address of the virtual nameserver
2178 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2179 #             to the guest
2181 # @smb: #optional root directory of the built-in SMB server
2183 # @smbserver: #optional IP address of the built-in SMB server
2185 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2186 #           endpoints
2188 # @guestfwd: #optional forward guest TCP connections
2190 # Since 1.2
2192 { 'struct': 'NetdevUserOptions',
2193   'data': {
2194     '*hostname':  'str',
2195     '*restrict':  'bool',
2196     '*ip':        'str',
2197     '*net':       'str',
2198     '*host':      'str',
2199     '*tftp':      'str',
2200     '*bootfile':  'str',
2201     '*dhcpstart': 'str',
2202     '*dns':       'str',
2203     '*dnssearch': ['String'],
2204     '*smb':       'str',
2205     '*smbserver': 'str',
2206     '*hostfwd':   ['String'],
2207     '*guestfwd':  ['String'] } }
2210 # @NetdevTapOptions
2212 # Connect the host TAP network interface name to the VLAN.
2214 # @ifname: #optional interface name
2216 # @fd: #optional file descriptor of an already opened tap
2218 # @fds: #optional multiple file descriptors of already opened multiqueue capable
2219 # tap
2221 # @script: #optional script to initialize the interface
2223 # @downscript: #optional script to shut down the interface
2225 # @helper: #optional command to execute to configure bridge
2227 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2229 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2231 # @vhost: #optional enable vhost-net network accelerator
2233 # @vhostfd: #optional file descriptor of an already opened vhost net device
2235 # @vhostfds: #optional file descriptors of multiple already opened vhost net
2236 # devices
2238 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2240 # @queues: #optional number of queues to be created for multiqueue capable tap
2242 # Since 1.2
2244 { 'struct': 'NetdevTapOptions',
2245   'data': {
2246     '*ifname':     'str',
2247     '*fd':         'str',
2248     '*fds':        'str',
2249     '*script':     'str',
2250     '*downscript': 'str',
2251     '*helper':     'str',
2252     '*sndbuf':     'size',
2253     '*vnet_hdr':   'bool',
2254     '*vhost':      'bool',
2255     '*vhostfd':    'str',
2256     '*vhostfds':   'str',
2257     '*vhostforce': 'bool',
2258     '*queues':     'uint32'} }
2261 # @NetdevSocketOptions
2263 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2264 # socket connection.
2266 # @fd: #optional file descriptor of an already opened socket
2268 # @listen: #optional port number, and optional hostname, to listen on
2270 # @connect: #optional port number, and optional hostname, to connect to
2272 # @mcast: #optional UDP multicast address and port number
2274 # @localaddr: #optional source address and port for multicast and udp packets
2276 # @udp: #optional UDP unicast address and port number
2278 # Since 1.2
2280 { 'struct': 'NetdevSocketOptions',
2281   'data': {
2282     '*fd':        'str',
2283     '*listen':    'str',
2284     '*connect':   'str',
2285     '*mcast':     'str',
2286     '*localaddr': 'str',
2287     '*udp':       'str' } }
2290 # @NetdevL2TPv3Options
2292 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
2294 # @src: source address
2296 # @dst: destination address
2298 # @srcport: #optional source port - mandatory for udp, optional for ip
2300 # @dstport: #optional destination port - mandatory for udp, optional for ip
2302 # @ipv6: #optional - force the use of ipv6
2304 # @udp: #optional - use the udp version of l2tpv3 encapsulation
2306 # @cookie64: #optional - use 64 bit coookies
2308 # @counter: #optional have sequence counter
2310 # @pincounter: #optional pin sequence counter to zero -
2311 #              workaround for buggy implementations or
2312 #              networks with packet reorder
2314 # @txcookie: #optional 32 or 64 bit transmit cookie
2316 # @rxcookie: #optional 32 or 64 bit receive cookie
2318 # @txsession: 32 bit transmit session
2320 # @rxsession: #optional 32 bit receive session - if not specified
2321 #             set to the same value as transmit
2323 # @offset: #optional additional offset - allows the insertion of
2324 #          additional application-specific data before the packet payload
2326 # Since 2.1
2328 { 'struct': 'NetdevL2TPv3Options',
2329   'data': {
2330     'src':          'str',
2331     'dst':          'str',
2332     '*srcport':     'str',
2333     '*dstport':     'str',
2334     '*ipv6':        'bool',
2335     '*udp':         'bool',
2336     '*cookie64':    'bool',
2337     '*counter':     'bool',
2338     '*pincounter':  'bool',
2339     '*txcookie':    'uint64',
2340     '*rxcookie':    'uint64',
2341     'txsession':    'uint32',
2342     '*rxsession':   'uint32',
2343     '*offset':      'uint32' } }
2346 # @NetdevVdeOptions
2348 # Connect the VLAN to a vde switch running on the host.
2350 # @sock: #optional socket path
2352 # @port: #optional port number
2354 # @group: #optional group owner of socket
2356 # @mode: #optional permissions for socket
2358 # Since 1.2
2360 { 'struct': 'NetdevVdeOptions',
2361   'data': {
2362     '*sock':  'str',
2363     '*port':  'uint16',
2364     '*group': 'str',
2365     '*mode':  'uint16' } }
2368 # @NetdevDumpOptions
2370 # Dump VLAN network traffic to a file.
2372 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2373 # suffixes.
2375 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2377 # Since 1.2
2379 { 'struct': 'NetdevDumpOptions',
2380   'data': {
2381     '*len':  'size',
2382     '*file': 'str' } }
2385 # @NetdevBridgeOptions
2387 # Connect a host TAP network interface to a host bridge device.
2389 # @br: #optional bridge name
2391 # @helper: #optional command to execute to configure bridge
2393 # Since 1.2
2395 { 'struct': 'NetdevBridgeOptions',
2396   'data': {
2397     '*br':     'str',
2398     '*helper': 'str' } }
2401 # @NetdevHubPortOptions
2403 # Connect two or more net clients through a software hub.
2405 # @hubid: hub identifier number
2407 # Since 1.2
2409 { 'struct': 'NetdevHubPortOptions',
2410   'data': {
2411     'hubid':     'int32' } }
2414 # @NetdevNetmapOptions
2416 # Connect a client to a netmap-enabled NIC or to a VALE switch port
2418 # @ifname: Either the name of an existing network interface supported by
2419 #          netmap, or the name of a VALE port (created on the fly).
2420 #          A VALE port name is in the form 'valeXXX:YYY', where XXX and
2421 #          YYY are non-negative integers. XXX identifies a switch and
2422 #          YYY identifies a port of the switch. VALE ports having the
2423 #          same XXX are therefore connected to the same switch.
2425 # @devname: #optional path of the netmap device (default: '/dev/netmap').
2427 # Since 2.0
2429 { 'struct': 'NetdevNetmapOptions',
2430   'data': {
2431     'ifname':     'str',
2432     '*devname':    'str' } }
2435 # @NetdevVhostUserOptions
2437 # Vhost-user network backend
2439 # @chardev: name of a unix socket chardev
2441 # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
2443 # Since 2.1
2445 { 'struct': 'NetdevVhostUserOptions',
2446   'data': {
2447     'chardev':        'str',
2448     '*vhostforce':    'bool' } }
2451 # @NetClientOptions
2453 # A discriminated record of network device traits.
2455 # Since 1.2
2457 # 'l2tpv3' - since 2.1
2460 { 'union': 'NetClientOptions',
2461   'data': {
2462     'none':     'NetdevNoneOptions',
2463     'nic':      'NetLegacyNicOptions',
2464     'user':     'NetdevUserOptions',
2465     'tap':      'NetdevTapOptions',
2466     'l2tpv3':   'NetdevL2TPv3Options',
2467     'socket':   'NetdevSocketOptions',
2468     'vde':      'NetdevVdeOptions',
2469     'dump':     'NetdevDumpOptions',
2470     'bridge':   'NetdevBridgeOptions',
2471     'hubport':  'NetdevHubPortOptions',
2472     'netmap':   'NetdevNetmapOptions',
2473     'vhost-user': 'NetdevVhostUserOptions' } }
2476 # @NetLegacy
2478 # Captures the configuration of a network device; legacy.
2480 # @vlan: #optional vlan number
2482 # @id: #optional identifier for monitor commands
2484 # @name: #optional identifier for monitor commands, ignored if @id is present
2486 # @opts: device type specific properties (legacy)
2488 # Since 1.2
2490 { 'struct': 'NetLegacy',
2491   'data': {
2492     '*vlan': 'int32',
2493     '*id':   'str',
2494     '*name': 'str',
2495     'opts':  'NetClientOptions' } }
2498 # @Netdev
2500 # Captures the configuration of a network device.
2502 # @id: identifier for monitor commands.
2504 # @opts: device type specific properties
2506 # Since 1.2
2508 { 'struct': 'Netdev',
2509   'data': {
2510     'id':   'str',
2511     'opts': 'NetClientOptions' } }
2514 # @InetSocketAddress
2516 # Captures a socket address or address range in the Internet namespace.
2518 # @host: host part of the address
2520 # @port: port part of the address, or lowest port if @to is present
2522 # @to: highest port to try
2524 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2525 #        #optional
2527 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2528 #        #optional
2530 # Since 1.3
2532 { 'struct': 'InetSocketAddress',
2533   'data': {
2534     'host': 'str',
2535     'port': 'str',
2536     '*to': 'uint16',
2537     '*ipv4': 'bool',
2538     '*ipv6': 'bool' } }
2541 # @UnixSocketAddress
2543 # Captures a socket address in the local ("Unix socket") namespace.
2545 # @path: filesystem path to use
2547 # Since 1.3
2549 { 'struct': 'UnixSocketAddress',
2550   'data': {
2551     'path': 'str' } }
2554 # @SocketAddress
2556 # Captures the address of a socket, which could also be a named file descriptor
2558 # Since 1.3
2560 { 'union': 'SocketAddress',
2561   'data': {
2562     'inet': 'InetSocketAddress',
2563     'unix': 'UnixSocketAddress',
2564     'fd': 'String' } }
2567 # @getfd:
2569 # Receive a file descriptor via SCM rights and assign it a name
2571 # @fdname: file descriptor name
2573 # Returns: Nothing on success
2575 # Since: 0.14.0
2577 # Notes: If @fdname already exists, the file descriptor assigned to
2578 #        it will be closed and replaced by the received file
2579 #        descriptor.
2580 #        The 'closefd' command can be used to explicitly close the
2581 #        file descriptor when it is no longer needed.
2583 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2586 # @closefd:
2588 # Close a file descriptor previously passed via SCM rights
2590 # @fdname: file descriptor name
2592 # Returns: Nothing on success
2594 # Since: 0.14.0
2596 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2599 # @MachineInfo:
2601 # Information describing a machine.
2603 # @name: the name of the machine
2605 # @alias: #optional an alias for the machine name
2607 # @default: #optional whether the machine is default
2609 # @cpu-max: maximum number of CPUs supported by the machine type
2610 #           (since 1.5.0)
2612 # Since: 1.2.0
2614 { 'struct': 'MachineInfo',
2615   'data': { 'name': 'str', '*alias': 'str',
2616             '*is-default': 'bool', 'cpu-max': 'int' } }
2619 # @query-machines:
2621 # Return a list of supported machines
2623 # Returns: a list of MachineInfo
2625 # Since: 1.2.0
2627 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2630 # @CpuDefinitionInfo:
2632 # Virtual CPU definition.
2634 # @name: the name of the CPU definition
2636 # Since: 1.2.0
2638 { 'struct': 'CpuDefinitionInfo',
2639   'data': { 'name': 'str' } }
2642 # @query-cpu-definitions:
2644 # Return a list of supported virtual CPU definitions
2646 # Returns: a list of CpuDefInfo
2648 # Since: 1.2.0
2650 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2652 # @AddfdInfo:
2654 # Information about a file descriptor that was added to an fd set.
2656 # @fdset-id: The ID of the fd set that @fd was added to.
2658 # @fd: The file descriptor that was received via SCM rights and
2659 #      added to the fd set.
2661 # Since: 1.2.0
2663 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2666 # @add-fd:
2668 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2670 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2672 # @opaque: #optional A free-form string that can be used to describe the fd.
2674 # Returns: @AddfdInfo on success
2675 #          If file descriptor was not received, FdNotSupplied
2676 #          If @fdset-id is a negative value, InvalidParameterValue
2678 # Notes: The list of fd sets is shared by all monitor connections.
2680 #        If @fdset-id is not specified, a new fd set will be created.
2682 # Since: 1.2.0
2684 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2685   'returns': 'AddfdInfo' }
2688 # @remove-fd:
2690 # Remove a file descriptor from an fd set.
2692 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2694 # @fd: #optional The file descriptor that is to be removed.
2696 # Returns: Nothing on success
2697 #          If @fdset-id or @fd is not found, FdNotFound
2699 # Since: 1.2.0
2701 # Notes: The list of fd sets is shared by all monitor connections.
2703 #        If @fd is not specified, all file descriptors in @fdset-id
2704 #        will be removed.
2706 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2709 # @FdsetFdInfo:
2711 # Information about a file descriptor that belongs to an fd set.
2713 # @fd: The file descriptor value.
2715 # @opaque: #optional A free-form string that can be used to describe the fd.
2717 # Since: 1.2.0
2719 { 'struct': 'FdsetFdInfo',
2720   'data': {'fd': 'int', '*opaque': 'str'} }
2723 # @FdsetInfo:
2725 # Information about an fd set.
2727 # @fdset-id: The ID of the fd set.
2729 # @fds: A list of file descriptors that belong to this fd set.
2731 # Since: 1.2.0
2733 { 'struct': 'FdsetInfo',
2734   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2737 # @query-fdsets:
2739 # Return information describing all fd sets.
2741 # Returns: A list of @FdsetInfo
2743 # Since: 1.2.0
2745 # Note: The list of fd sets is shared by all monitor connections.
2748 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2751 # @TargetInfo:
2753 # Information describing the QEMU target.
2755 # @arch: the target architecture (eg "x86_64", "i386", etc)
2757 # Since: 1.2.0
2759 { 'struct': 'TargetInfo',
2760   'data': { 'arch': 'str' } }
2763 # @query-target:
2765 # Return information about the target for this QEMU
2767 # Returns: TargetInfo
2769 # Since: 1.2.0
2771 { 'command': 'query-target', 'returns': 'TargetInfo' }
2774 # @QKeyCode:
2776 # An enumeration of key name.
2778 # This is used by the send-key command.
2780 # Since: 1.3.0
2782 # 'unmapped' and 'pause' since 2.0
2784 { 'enum': 'QKeyCode',
2785   'data': [ 'unmapped',
2786             'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
2787             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
2788             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
2789             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
2790             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
2791             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
2792             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
2793             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
2794             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
2795             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
2796             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
2797             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
2798             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
2799             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
2800              'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause' ] }
2803 # @KeyValue
2805 # Represents a keyboard key.
2807 # Since: 1.3.0
2809 { 'union': 'KeyValue',
2810   'data': {
2811     'number': 'int',
2812     'qcode': 'QKeyCode' } }
2815 # @send-key:
2817 # Send keys to guest.
2819 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
2820 #        simultaneously sent to the guest. A @KeyValue.number value is sent
2821 #        directly to the guest, while @KeyValue.qcode must be a valid
2822 #        @QKeyCode value
2824 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
2825 #             to 100
2827 # Returns: Nothing on success
2828 #          If key is unknown or redundant, InvalidParameter
2830 # Since: 1.3.0
2833 { 'command': 'send-key',
2834   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
2837 # @screendump:
2839 # Write a PPM of the VGA screen to a file.
2841 # @filename: the path of a new PPM file to store the image
2843 # Returns: Nothing on success
2845 # Since: 0.14.0
2847 { 'command': 'screendump', 'data': {'filename': 'str'} }
2850 # @ChardevFile:
2852 # Configuration info for file chardevs.
2854 # @in:  #optional The name of the input file
2855 # @out: The name of the output file
2857 # Since: 1.4
2859 { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
2860                                    'out' : 'str' } }
2863 # @ChardevHostdev:
2865 # Configuration info for device and pipe chardevs.
2867 # @device: The name of the special file for the device,
2868 #          i.e. /dev/ttyS0 on Unix or COM1: on Windows
2869 # @type: What kind of device this is.
2871 # Since: 1.4
2873 { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' } }
2876 # @ChardevSocket:
2878 # Configuration info for (stream) socket chardevs.
2880 # @addr: socket address to listen on (server=true)
2881 #        or connect to (server=false)
2882 # @server: #optional create server socket (default: true)
2883 # @wait: #optional wait for incoming connection on server
2884 #        sockets (default: false).
2885 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
2886 # @telnet: #optional enable telnet protocol on server
2887 #          sockets (default: false)
2888 # @reconnect: #optional For a client socket, if a socket is disconnected,
2889 #          then attempt a reconnect after the given number of seconds.
2890 #          Setting this to zero disables this function. (default: 0)
2891 #          (Since: 2.2)
2893 # Since: 1.4
2895 { 'struct': 'ChardevSocket', 'data': { 'addr'       : 'SocketAddress',
2896                                      '*server'    : 'bool',
2897                                      '*wait'      : 'bool',
2898                                      '*nodelay'   : 'bool',
2899                                      '*telnet'    : 'bool',
2900                                      '*reconnect' : 'int' } }
2903 # @ChardevUdp:
2905 # Configuration info for datagram socket chardevs.
2907 # @remote: remote address
2908 # @local: #optional local address
2910 # Since: 1.5
2912 { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
2913                                   '*local' : 'SocketAddress' } }
2916 # @ChardevMux:
2918 # Configuration info for mux chardevs.
2920 # @chardev: name of the base chardev.
2922 # Since: 1.5
2924 { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' } }
2927 # @ChardevStdio:
2929 # Configuration info for stdio chardevs.
2931 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
2932 #          be delivered to qemu.  Default: true in -nographic mode,
2933 #          false otherwise.
2935 # Since: 1.5
2937 { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
2940 # @ChardevSpiceChannel:
2942 # Configuration info for spice vm channel chardevs.
2944 # @type: kind of channel (for example vdagent).
2946 # Since: 1.5
2948 { 'struct': 'ChardevSpiceChannel', 'data': { 'type'  : 'str' } }
2951 # @ChardevSpicePort:
2953 # Configuration info for spice port chardevs.
2955 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
2957 # Since: 1.5
2959 { 'struct': 'ChardevSpicePort', 'data': { 'fqdn'  : 'str' } }
2962 # @ChardevVC:
2964 # Configuration info for virtual console chardevs.
2966 # @width:  console width,  in pixels
2967 # @height: console height, in pixels
2968 # @cols:   console width,  in chars
2969 # @rows:   console height, in chars
2971 # Since: 1.5
2973 { 'struct': 'ChardevVC', 'data': { '*width'  : 'int',
2974                                  '*height' : 'int',
2975                                  '*cols'   : 'int',
2976                                  '*rows'   : 'int' } }
2979 # @ChardevRingbuf:
2981 # Configuration info for ring buffer chardevs.
2983 # @size: #optional ring buffer size, must be power of two, default is 65536
2985 # Since: 1.5
2987 { 'struct': 'ChardevRingbuf', 'data': { '*size'  : 'int' } }
2990 # @ChardevBackend:
2992 # Configuration info for the new chardev backend.
2994 # Since: 1.4 (testdev since 2.2)
2996 { 'struct': 'ChardevDummy', 'data': { } }
2998 { 'union': 'ChardevBackend', 'data': { 'file'   : 'ChardevFile',
2999                                        'serial' : 'ChardevHostdev',
3000                                        'parallel': 'ChardevHostdev',
3001                                        'pipe'   : 'ChardevHostdev',
3002                                        'socket' : 'ChardevSocket',
3003                                        'udp'    : 'ChardevUdp',
3004                                        'pty'    : 'ChardevDummy',
3005                                        'null'   : 'ChardevDummy',
3006                                        'mux'    : 'ChardevMux',
3007                                        'msmouse': 'ChardevDummy',
3008                                        'braille': 'ChardevDummy',
3009                                        'testdev': 'ChardevDummy',
3010                                        'stdio'  : 'ChardevStdio',
3011                                        'console': 'ChardevDummy',
3012                                        'spicevmc' : 'ChardevSpiceChannel',
3013                                        'spiceport' : 'ChardevSpicePort',
3014                                        'vc'     : 'ChardevVC',
3015                                        'ringbuf': 'ChardevRingbuf',
3016                                        # next one is just for compatibility
3017                                        'memory' : 'ChardevRingbuf' } }
3020 # @ChardevReturn:
3022 # Return info about the chardev backend just created.
3024 # @pty: #optional name of the slave pseudoterminal device, present if
3025 #       and only if a chardev of type 'pty' was created
3027 # Since: 1.4
3029 { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3032 # @chardev-add:
3034 # Add a character device backend
3036 # @id: the chardev's ID, must be unique
3037 # @backend: backend type and parameters
3039 # Returns: ChardevReturn.
3041 # Since: 1.4
3043 { 'command': 'chardev-add', 'data': {'id'      : 'str',
3044                                      'backend' : 'ChardevBackend' },
3045   'returns': 'ChardevReturn' }
3048 # @chardev-remove:
3050 # Remove a character device backend
3052 # @id: the chardev's ID, must exist and not be in use
3054 # Returns: Nothing on success
3056 # Since: 1.4
3058 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3061 # @TpmModel:
3063 # An enumeration of TPM models
3065 # @tpm-tis: TPM TIS model
3067 # Since: 1.5
3069 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3072 # @query-tpm-models:
3074 # Return a list of supported TPM models
3076 # Returns: a list of TpmModel
3078 # Since: 1.5
3080 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3083 # @TpmType:
3085 # An enumeration of TPM types
3087 # @passthrough: TPM passthrough type
3089 # Since: 1.5
3091 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3094 # @query-tpm-types:
3096 # Return a list of supported TPM types
3098 # Returns: a list of TpmType
3100 # Since: 1.5
3102 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3105 # @TPMPassthroughOptions:
3107 # Information about the TPM passthrough type
3109 # @path: #optional string describing the path used for accessing the TPM device
3111 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3112 #               for cancellation of TPM commands while they are executing
3114 # Since: 1.5
3116 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3117                                              '*cancel-path' : 'str'} }
3120 # @TpmTypeOptions:
3122 # A union referencing different TPM backend types' configuration options
3124 # @passthrough: The configuration options for the TPM passthrough type
3126 # Since: 1.5
3128 { 'union': 'TpmTypeOptions',
3129    'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3132 # @TpmInfo:
3134 # Information about the TPM
3136 # @id: The Id of the TPM
3138 # @model: The TPM frontend model
3140 # @options: The TPM (backend) type configuration options
3142 # Since: 1.5
3144 { 'struct': 'TPMInfo',
3145   'data': {'id': 'str',
3146            'model': 'TpmModel',
3147            'options': 'TpmTypeOptions' } }
3150 # @query-tpm:
3152 # Return information about the TPM device
3154 # Returns: @TPMInfo on success
3156 # Since: 1.5
3158 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
3161 # @AcpiTableOptions
3163 # Specify an ACPI table on the command line to load.
3165 # At most one of @file and @data can be specified. The list of files specified
3166 # by any one of them is loaded and concatenated in order. If both are omitted,
3167 # @data is implied.
3169 # Other fields / optargs can be used to override fields of the generic ACPI
3170 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
3171 # Description Table Header. If a header field is not overridden, then the
3172 # corresponding value from the concatenated blob is used (in case of @file), or
3173 # it is filled in with a hard-coded value (in case of @data).
3175 # String fields are copied into the matching ACPI member from lowest address
3176 # upwards, and silently truncated / NUL-padded to length.
3178 # @sig: #optional table signature / identifier (4 bytes)
3180 # @rev: #optional table revision number (dependent on signature, 1 byte)
3182 # @oem_id: #optional OEM identifier (6 bytes)
3184 # @oem_table_id: #optional OEM table identifier (8 bytes)
3186 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
3188 # @asl_compiler_id: #optional identifier of the utility that created the table
3189 #                   (4 bytes)
3191 # @asl_compiler_rev: #optional revision number of the utility that created the
3192 #                    table (4 bytes)
3194 # @file: #optional colon (:) separated list of pathnames to load and
3195 #        concatenate as table data. The resultant binary blob is expected to
3196 #        have an ACPI table header. At least one file is required. This field
3197 #        excludes @data.
3199 # @data: #optional colon (:) separated list of pathnames to load and
3200 #        concatenate as table data. The resultant binary blob must not have an
3201 #        ACPI table header. At least one file is required. This field excludes
3202 #        @file.
3204 # Since 1.5
3206 { 'struct': 'AcpiTableOptions',
3207   'data': {
3208     '*sig':               'str',
3209     '*rev':               'uint8',
3210     '*oem_id':            'str',
3211     '*oem_table_id':      'str',
3212     '*oem_rev':           'uint32',
3213     '*asl_compiler_id':   'str',
3214     '*asl_compiler_rev':  'uint32',
3215     '*file':              'str',
3216     '*data':              'str' }}
3219 # @CommandLineParameterType:
3221 # Possible types for an option parameter.
3223 # @string: accepts a character string
3225 # @boolean: accepts "on" or "off"
3227 # @number: accepts a number
3229 # @size: accepts a number followed by an optional suffix (K)ilo,
3230 #        (M)ega, (G)iga, (T)era
3232 # Since 1.5
3234 { 'enum': 'CommandLineParameterType',
3235   'data': ['string', 'boolean', 'number', 'size'] }
3238 # @CommandLineParameterInfo:
3240 # Details about a single parameter of a command line option.
3242 # @name: parameter name
3244 # @type: parameter @CommandLineParameterType
3246 # @help: #optional human readable text string, not suitable for parsing.
3248 # @default: #optional default value string (since 2.1)
3250 # Since 1.5
3252 { 'struct': 'CommandLineParameterInfo',
3253   'data': { 'name': 'str',
3254             'type': 'CommandLineParameterType',
3255             '*help': 'str',
3256             '*default': 'str' } }
3259 # @CommandLineOptionInfo:
3261 # Details about a command line option, including its list of parameter details
3263 # @option: option name
3265 # @parameters: an array of @CommandLineParameterInfo
3267 # Since 1.5
3269 { 'struct': 'CommandLineOptionInfo',
3270   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
3273 # @query-command-line-options:
3275 # Query command line option schema.
3277 # @option: #optional option name
3279 # Returns: list of @CommandLineOptionInfo for all options (or for the given
3280 #          @option).  Returns an error if the given @option doesn't exist.
3282 # Since 1.5
3284 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
3285  'returns': ['CommandLineOptionInfo'] }
3288 # @X86CPURegister32
3290 # A X86 32-bit register
3292 # Since: 1.5
3294 { 'enum': 'X86CPURegister32',
3295   'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
3298 # @X86CPUFeatureWordInfo
3300 # Information about a X86 CPU feature word
3302 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
3304 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
3305 #                   feature word
3307 # @cpuid-register: Output register containing the feature bits
3309 # @features: value of output register, containing the feature bits
3311 # Since: 1.5
3313 { 'struct': 'X86CPUFeatureWordInfo',
3314   'data': { 'cpuid-input-eax': 'int',
3315             '*cpuid-input-ecx': 'int',
3316             'cpuid-register': 'X86CPURegister32',
3317             'features': 'int' } }
3320 # @RxState:
3322 # Packets receiving state
3324 # @normal: filter assigned packets according to the mac-table
3326 # @none: don't receive any assigned packet
3328 # @all: receive all assigned packets
3330 # Since: 1.6
3332 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
3335 # @RxFilterInfo:
3337 # Rx-filter information for a NIC.
3339 # @name: net client name
3341 # @promiscuous: whether promiscuous mode is enabled
3343 # @multicast: multicast receive state
3345 # @unicast: unicast receive state
3347 # @vlan: vlan receive state (Since 2.0)
3349 # @broadcast-allowed: whether to receive broadcast
3351 # @multicast-overflow: multicast table is overflowed or not
3353 # @unicast-overflow: unicast table is overflowed or not
3355 # @main-mac: the main macaddr string
3357 # @vlan-table: a list of active vlan id
3359 # @unicast-table: a list of unicast macaddr string
3361 # @multicast-table: a list of multicast macaddr string
3363 # Since 1.6
3366 { 'struct': 'RxFilterInfo',
3367   'data': {
3368     'name':               'str',
3369     'promiscuous':        'bool',
3370     'multicast':          'RxState',
3371     'unicast':            'RxState',
3372     'vlan':               'RxState',
3373     'broadcast-allowed':  'bool',
3374     'multicast-overflow': 'bool',
3375     'unicast-overflow':   'bool',
3376     'main-mac':           'str',
3377     'vlan-table':         ['int'],
3378     'unicast-table':      ['str'],
3379     'multicast-table':    ['str'] }}
3382 # @query-rx-filter:
3384 # Return rx-filter information for all NICs (or for the given NIC).
3386 # @name: #optional net client name
3388 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
3389 #          Returns an error if the given @name doesn't exist, or given
3390 #          NIC doesn't support rx-filter querying, or given net client
3391 #          isn't a NIC.
3393 # Since: 1.6
3395 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
3396   'returns': ['RxFilterInfo'] }
3399 # @InputButton
3401 # Button of a pointer input device (mouse, tablet).
3403 # Since: 2.0
3405 { 'enum'  : 'InputButton',
3406   'data'  : [ 'Left', 'Middle', 'Right', 'WheelUp', 'WheelDown' ] }
3409 # @InputButton
3411 # Position axis of a pointer input device (mouse, tablet).
3413 # Since: 2.0
3415 { 'enum'  : 'InputAxis',
3416   'data'  : [ 'X', 'Y' ] }
3419 # @InputKeyEvent
3421 # Keyboard input event.
3423 # @key:    Which key this event is for.
3424 # @down:   True for key-down and false for key-up events.
3426 # Since: 2.0
3428 { 'struct'  : 'InputKeyEvent',
3429   'data'  : { 'key'     : 'KeyValue',
3430               'down'    : 'bool' } }
3433 # @InputBtnEvent
3435 # Pointer button input event.
3437 # @button: Which button this event is for.
3438 # @down:   True for key-down and false for key-up events.
3440 # Since: 2.0
3442 { 'struct'  : 'InputBtnEvent',
3443   'data'  : { 'button'  : 'InputButton',
3444               'down'    : 'bool' } }
3447 # @InputMoveEvent
3449 # Pointer motion input event.
3451 # @axis:   Which axis is referenced by @value.
3452 # @value:  Pointer position.  For absolute coordinates the
3453 #          valid range is 0 -> 0x7ffff
3455 # Since: 2.0
3457 { 'struct'  : 'InputMoveEvent',
3458   'data'  : { 'axis'    : 'InputAxis',
3459               'value'   : 'int' } }
3462 # @InputEvent
3464 # Input event union.
3466 # @key: Input event of Keyboard
3467 # @btn: Input event of pointer buttons
3468 # @rel: Input event of relative pointer motion
3469 # @abs: Input event of absolute pointer motion
3471 # Since: 2.0
3473 { 'union' : 'InputEvent',
3474   'data'  : { 'key'     : 'InputKeyEvent',
3475               'btn'     : 'InputBtnEvent',
3476               'rel'     : 'InputMoveEvent',
3477               'abs'     : 'InputMoveEvent' } }
3480 # @x-input-send-event
3482 # Send input event(s) to guest.
3484 # @console: #optional console to send event(s) to.
3485 #           This parameter can be used to send the input event to
3486 #           specific input devices in case (a) multiple input devices
3487 #           of the same kind are added to the virtual machine and (b)
3488 #           you have configured input routing (see docs/multiseat.txt)
3489 #           for those input devices.  If input routing is not
3490 #           configured this parameter has no effect.
3491 #           If @console is missing, only devices that aren't associated
3492 #           with a console are admissible.
3493 #           If @console is specified, it must exist, and both devices
3494 #           associated with that console and devices not associated with a
3495 #           console are admissible, but the former take precedence.
3498 # @events: List of InputEvent union.
3500 # Returns: Nothing on success.
3502 # Since: 2.2
3504 # Note: this command is experimental, and not a stable API.
3507 { 'command': 'x-input-send-event',
3508   'data': { '*console':'int', 'events': [ 'InputEvent' ] } }
3511 # @NumaOptions
3513 # A discriminated record of NUMA options. (for OptsVisitor)
3515 # Since 2.1
3517 { 'union': 'NumaOptions',
3518   'data': {
3519     'node': 'NumaNodeOptions' }}
3522 # @NumaNodeOptions
3524 # Create a guest NUMA node. (for OptsVisitor)
3526 # @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
3528 # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
3529 #         if omitted)
3531 # @mem: #optional memory size of this node; mutually exclusive with @memdev.
3532 #       Equally divide total memory among nodes if both @mem and @memdev are
3533 #       omitted.
3535 # @memdev: #optional memory backend object.  If specified for one node,
3536 #          it must be specified for all nodes.
3538 # Since: 2.1
3540 { 'struct': 'NumaNodeOptions',
3541   'data': {
3542    '*nodeid': 'uint16',
3543    '*cpus':   ['uint16'],
3544    '*mem':    'size',
3545    '*memdev': 'str' }}
3548 # @HostMemPolicy
3550 # Host memory policy types
3552 # @default: restore default policy, remove any nondefault policy
3554 # @preferred: set the preferred host nodes for allocation
3556 # @bind: a strict policy that restricts memory allocation to the
3557 #        host nodes specified
3559 # @interleave: memory allocations are interleaved across the set
3560 #              of host nodes specified
3562 # Since 2.1
3564 { 'enum': 'HostMemPolicy',
3565   'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
3568 # @Memdev:
3570 # Information about memory backend
3572 # @size: memory backend size
3574 # @merge: enables or disables memory merge support
3576 # @dump: includes memory backend's memory in a core dump or not
3578 # @prealloc: enables or disables memory preallocation
3580 # @host-nodes: host nodes for its memory policy
3582 # @policy: memory policy of memory backend
3584 # Since: 2.1
3587 { 'struct': 'Memdev',
3588   'data': {
3589     'size':       'size',
3590     'merge':      'bool',
3591     'dump':       'bool',
3592     'prealloc':   'bool',
3593     'host-nodes': ['uint16'],
3594     'policy':     'HostMemPolicy' }}
3597 # @query-memdev:
3599 # Returns information for all memory backends.
3601 # Returns: a list of @Memdev.
3603 # Since: 2.1
3605 { 'command': 'query-memdev', 'returns': ['Memdev'] }
3608 # @PCDIMMDeviceInfo:
3610 # PCDIMMDevice state information
3612 # @id: #optional device's ID
3614 # @addr: physical address, where device is mapped
3616 # @size: size of memory that the device provides
3618 # @slot: slot number at which device is plugged in
3620 # @node: NUMA node number where device is plugged in
3622 # @memdev: memory backend linked with device
3624 # @hotplugged: true if device was hotplugged
3626 # @hotpluggable: true if device if could be added/removed while machine is running
3628 # Since: 2.1
3630 { 'struct': 'PCDIMMDeviceInfo',
3631   'data': { '*id': 'str',
3632             'addr': 'int',
3633             'size': 'int',
3634             'slot': 'int',
3635             'node': 'int',
3636             'memdev': 'str',
3637             'hotplugged': 'bool',
3638             'hotpluggable': 'bool'
3639           }
3643 # @MemoryDeviceInfo:
3645 # Union containing information about a memory device
3647 # Since: 2.1
3649 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
3652 # @query-memory-devices
3654 # Lists available memory devices and their state
3656 # Since: 2.1
3658 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
3660 ## @ACPISlotType
3662 # @DIMM: memory slot
3664 { 'enum': 'ACPISlotType', 'data': [ 'DIMM' ] }
3666 ## @ACPIOSTInfo
3668 # OSPM Status Indication for a device
3669 # For description of possible values of @source and @status fields
3670 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
3672 # @device: #optional device ID associated with slot
3674 # @slot: slot ID, unique per slot of a given @slot-type
3676 # @slot-type: type of the slot
3678 # @source: an integer containing the source event
3680 # @status: an integer containing the status code
3682 # Since: 2.1
3684 { 'struct': 'ACPIOSTInfo',
3685   'data'  : { '*device': 'str',
3686               'slot': 'str',
3687               'slot-type': 'ACPISlotType',
3688               'source': 'int',
3689               'status': 'int' } }
3692 # @query-acpi-ospm-status
3694 # Lists ACPI OSPM status of ACPI device objects,
3695 # which might be reported via _OST method
3697 # Since: 2.1
3699 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
3702 # @WatchdogExpirationAction
3704 # An enumeration of the actions taken when the watchdog device's timer is
3705 # expired
3707 # @reset: system resets
3709 # @shutdown: system shutdown, note that it is similar to @powerdown, which
3710 #            tries to set to system status and notify guest
3712 # @poweroff: system poweroff, the emulator program exits
3714 # @pause: system pauses, similar to @stop
3716 # @debug: system enters debug state
3718 # @none: nothing is done
3720 # Since: 2.1
3722 { 'enum': 'WatchdogExpirationAction',
3723   'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none' ] }
3726 # @IoOperationType
3728 # An enumeration of the I/O operation types
3730 # @read: read operation
3732 # @write: write operation
3734 # Since: 2.1
3736 { 'enum': 'IoOperationType',
3737   'data': [ 'read', 'write' ] }
3740 # @GuestPanicAction
3742 # An enumeration of the actions taken when guest OS panic is detected
3744 # @pause: system pauses
3746 # Since: 2.1
3748 { 'enum': 'GuestPanicAction',
3749   'data': [ 'pause' ] }
3752 # @rtc-reset-reinjection
3754 # This command will reset the RTC interrupt reinjection backlog.
3755 # Can be used if another mechanism to synchronize guest time
3756 # is in effect, for example QEMU guest agent's guest-set-time
3757 # command.
3759 # Since: 2.1
3761 { 'command': 'rtc-reset-reinjection' }