5 # QAPI common definitions
6 { 'include': 'qapi/common.json' }
8 # QAPI crypto definitions
9 { 'include': 'qapi/crypto.json' }
11 # QAPI block definitions
12 { 'include': 'qapi/block.json' }
14 # QAPI event definitions
15 { 'include': 'qapi/event.json' }
18 { 'include': 'qapi/trace.json' }
21 { 'include': 'qapi/introspect.json' }
30 # Enable QMP capabilities.
36 # -> { "execute": "qmp_capabilities" }
39 # Notes: This command is valid exactly when first connecting: it must be
40 # issued before any other command will be accepted, and will fail once the
41 # monitor is accepting other commands. (see qemu docs/qmp-spec.txt)
46 { 'command': 'qmp_capabilities' }
51 # Policy for handling lost ticks in timer devices.
53 # @discard: throw away the missed tick(s) and continue with future injection
54 # normally. Guest time may be delayed, unless the OS has explicit
55 # handling of lost ticks
57 # @delay: continue to deliver ticks at the normal rate. Guest time will be
58 # delayed due to the late tick
60 # @merge: merge the missed tick(s) into one tick and inject. Guest time
61 # may be delayed, depending on how the OS reacts to the merging
64 # @slew: deliver ticks at a higher rate to catch up with the missed tick. The
65 # guest time should not be delayed once catchup is complete.
69 { 'enum': 'LostTickPolicy',
70 'data': ['discard', 'delay', 'merge', 'slew' ] }
75 # Allow client connections for VNC, Spice and socket based
76 # character devices to be passed in to QEMU via SCM_RIGHTS.
78 # @protocol: protocol name. Valid names are "vnc", "spice" or the
79 # name of a character device (eg. from -chardev id=XXXX)
81 # @fdname: file descriptor name previously passed via 'getfd' command
83 # @skipauth: #optional whether to skip authentication. Only applies
84 # to "vnc" and "spice" protocols
86 # @tls: #optional whether to perform TLS. Only applies to the "spice"
89 # Returns: nothing on success.
95 # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
96 # "fdname": "myclient" } }
100 { 'command': 'add_client',
101 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
107 # Guest name information.
109 # @name: #optional The name of the guest
113 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
118 # Return the name information of a guest.
120 # Returns: @NameInfo of the guest
126 # -> { "execute": "query-name" }
127 # <- { "return": { "name": "qemu-name" } }
130 { 'command': 'query-name', 'returns': 'NameInfo' }
135 # Information about support for KVM acceleration
137 # @enabled: true if KVM acceleration is active
139 # @present: true if KVM acceleration is built into this executable
143 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
148 # Returns information about KVM acceleration
156 # -> { "execute": "query-kvm" }
157 # <- { "return": { "enabled": true, "present": true } }
160 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
165 # An enumeration of VM run states.
167 # @debug: QEMU is running on a debugger
169 # @finish-migrate: guest is paused to finish the migration process
171 # @inmigrate: guest is paused waiting for an incoming migration. Note
172 # that this state does not tell whether the machine will start at the
173 # end of the migration. This depends on the command-line -S option and
174 # any invocation of 'stop' or 'cont' that has happened since QEMU was
177 # @internal-error: An internal error that prevents further guest execution
180 # @io-error: the last IOP has failed and the device is configured to pause
183 # @paused: guest has been paused via the 'stop' command
185 # @postmigrate: guest is paused following a successful 'migrate'
187 # @prelaunch: QEMU was started with -S and guest has not started
189 # @restore-vm: guest is paused to restore VM state
191 # @running: guest is actively running
193 # @save-vm: guest is paused to save the VM state
195 # @shutdown: guest is shut down (and -no-shutdown is in use)
197 # @suspended: guest is suspended (ACPI S3)
199 # @watchdog: the watchdog action is configured to pause and has been triggered
201 # @guest-panicked: guest has been panicked as a result of guest OS panic
203 # @colo: guest is paused to save/restore VM state under colo checkpoint,
204 # VM can not get into this state unless colo capability is enabled
205 # for migration. (since 2.8)
207 { 'enum': 'RunState',
208 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
209 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
210 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
211 'guest-panicked', 'colo' ] }
216 # Information about VCPU run state
218 # @running: true if all VCPUs are runnable, false if not runnable
220 # @singlestep: true if VCPUs are in single-step mode
222 # @status: the virtual machine @RunState
226 # Notes: @singlestep is enabled through the GDB stub
228 { 'struct': 'StatusInfo',
229 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
234 # Query the run status of all VCPUs
236 # Returns: @StatusInfo reflecting all VCPUs
242 # -> { "execute": "query-status" }
243 # <- { "return": { "running": true,
244 # "singlestep": false,
245 # "status": "running" } }
248 { 'command': 'query-status', 'returns': 'StatusInfo' }
253 # Guest UUID information (Universally Unique Identifier).
255 # @UUID: the UUID of the guest
259 # Notes: If no UUID was specified for the guest, a null UUID is returned.
261 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
266 # Query the guest UUID information.
268 # Returns: The @UuidInfo for the guest
274 # -> { "execute": "query-uuid" }
275 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
278 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
283 # Information about a character device.
285 # @label: the label of the character device
287 # @filename: the filename of the character device
289 # @frontend-open: shows whether the frontend device attached to this backend
290 # (eg. with the chardev=... option) is in open or closed state
293 # Notes: @filename is encoded using the QEMU command line character device
294 # encoding. See the QEMU man page for details.
298 { 'struct': 'ChardevInfo', 'data': {'label': 'str',
300 'frontend-open': 'bool'} }
305 # Returns information about current character devices.
307 # Returns: a list of @ChardevInfo
313 # -> { "execute": "query-chardev" }
317 # "label": "charchannel0",
318 # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
319 # "frontend-open": false
322 # "label": "charmonitor",
323 # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
324 # "frontend-open": true
327 # "label": "charserial0",
328 # "filename": "pty:/dev/pts/2",
329 # "frontend-open": true
335 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
338 # @ChardevBackendInfo:
340 # Information about a character device backend
342 # @name: The backend name
346 { 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} }
349 # @query-chardev-backends:
351 # Returns information about character device backends.
353 # Returns: a list of @ChardevBackendInfo
359 # -> { "execute": "query-chardev-backends" }
378 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
383 # An enumeration of data format.
385 # @utf8: Data is a UTF-8 string (RFC 3629)
387 # @base64: Data is Base64 encoded binary (RFC 3548)
391 { 'enum': 'DataFormat',
392 'data': [ 'utf8', 'base64' ] }
397 # Write to a ring buffer character device.
399 # @device: the ring buffer character device name
401 # @data: data to write
403 # @format: #optional data encoding (default 'utf8').
404 # - base64: data must be base64 encoded text. Its binary
405 # decoding gets written.
406 # - utf8: data's UTF-8 encoding is written
407 # - data itself is always Unicode regardless of format, like
410 # Returns: Nothing on success
416 # -> { "execute": "ringbuf-write",
417 # "arguments": { "device": "foo",
418 # "data": "abcdefgh",
419 # "format": "utf8" } }
420 # <- { "return": {} }
423 { 'command': 'ringbuf-write',
424 'data': {'device': 'str', 'data': 'str',
425 '*format': 'DataFormat'} }
430 # Read from a ring buffer character device.
432 # @device: the ring buffer character device name
434 # @size: how many bytes to read at most
436 # @format: #optional data encoding (default 'utf8').
437 # - base64: the data read is returned in base64 encoding.
438 # - utf8: the data read is interpreted as UTF-8.
439 # Bug: can screw up when the buffer contains invalid UTF-8
440 # sequences, NUL characters, after the ring buffer lost
441 # data, and when reading stops because the size limit is
443 # - The return value is always Unicode regardless of format,
444 # like any other string.
446 # Returns: data read from the device
452 # -> { "execute": "ringbuf-read",
453 # "arguments": { "device": "foo",
455 # "format": "utf8" } }
456 # <- { "return": "abcdefgh" }
459 { 'command': 'ringbuf-read',
460 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
466 # Information about a QMP event
468 # @name: The event name
472 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
477 # Return a list of supported QMP events by this server
479 # Returns: A list of @EventInfo for all supported events
485 # -> { "execute": "query-events" }
497 # Note: This example has been shortened as the real response is too long.
500 { 'command': 'query-events', 'returns': ['EventInfo'] }
505 # Detailed migration status.
507 # @transferred: amount of bytes already transferred to the target VM
509 # @remaining: amount of bytes remaining to be transferred to the target VM
511 # @total: total amount of bytes involved in the migration process
513 # @duplicate: number of duplicate (zero) pages (since 1.2)
515 # @skipped: number of skipped zero pages (since 1.5)
517 # @normal: number of normal pages (since 1.2)
519 # @normal-bytes: number of normal bytes sent (since 1.2)
521 # @dirty-pages-rate: number of pages dirtied by second by the
524 # @mbps: throughput in megabits/sec. (since 1.6)
526 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
528 # @postcopy-requests: The number of page requests received from the destination
533 { 'struct': 'MigrationStats',
534 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
535 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
536 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
537 'mbps' : 'number', 'dirty-sync-count' : 'int',
538 'postcopy-requests' : 'int' } }
543 # Detailed XBZRLE migration cache statistics
545 # @cache-size: XBZRLE cache size
547 # @bytes: amount of bytes already transferred to the target VM
549 # @pages: amount of pages transferred to the target VM
551 # @cache-miss: number of cache miss
553 # @cache-miss-rate: rate of cache miss (since 2.1)
555 # @overflow: number of overflows
559 { 'struct': 'XBZRLECacheStats',
560 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
561 'cache-miss': 'int', 'cache-miss-rate': 'number',
562 'overflow': 'int' } }
567 # An enumeration of migration status.
569 # @none: no migration has ever happened.
571 # @setup: migration process has been initiated.
573 # @cancelling: in the process of cancelling migration.
575 # @cancelled: cancelling migration is finished.
577 # @active: in the process of doing migration.
579 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
581 # @completed: migration is finished.
583 # @failed: some error occurred during migration process.
585 # @colo: VM is in the process of fault tolerance, VM can not get into this
586 # state unless colo capability is enabled for migration. (since 2.8)
591 { 'enum': 'MigrationStatus',
592 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
593 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
598 # Information about current migration process.
600 # @status: #optional @MigrationStatus describing the current migration status.
601 # If this field is not returned, no migration process
604 # @ram: #optional @MigrationStats containing detailed migration
605 # status, only returned if status is 'active' or
606 # 'completed'(since 1.2)
608 # @disk: #optional @MigrationStats containing detailed disk migration
609 # status, only returned if status is 'active' and it is a block
612 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
613 # migration statistics, only returned if XBZRLE feature is on and
614 # status is 'active' or 'completed' (since 1.2)
616 # @total-time: #optional total amount of milliseconds since migration started.
617 # If migration has ended, it returns the total migration
620 # @downtime: #optional only present when migration finishes correctly
621 # total downtime in milliseconds for the guest.
624 # @expected-downtime: #optional only present while migration is active
625 # expected downtime in milliseconds for the guest in last walk
626 # of the dirty bitmap. (since 1.3)
628 # @setup-time: #optional amount of setup time in milliseconds _before_ the
629 # iterations begin but _after_ the QMP command is issued. This is designed
630 # to provide an accounting of any activities (such as RDMA pinning) which
631 # may be expensive, but do not actually occur during the iterative
632 # migration rounds themselves. (since 1.6)
634 # @cpu-throttle-percentage: #optional percentage of time guest cpus are being
635 # throttled during auto-converge. This is only present when auto-converge
636 # has started throttling guest cpus. (Since 2.7)
638 # @error-desc: #optional the human readable error description string, when
639 # @status is 'failed'. Clients should not attempt to parse the
640 # error strings. (Since 2.7)
644 { 'struct': 'MigrationInfo',
645 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
646 '*disk': 'MigrationStats',
647 '*xbzrle-cache': 'XBZRLECacheStats',
648 '*total-time': 'int',
649 '*expected-downtime': 'int',
651 '*setup-time': 'int',
652 '*cpu-throttle-percentage': 'int',
653 '*error-desc': 'str'} }
658 # Returns information about current migration process.
660 # Returns: @MigrationInfo
664 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
667 # @MigrationCapability:
669 # Migration capabilities enumeration
671 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
672 # This feature allows us to minimize migration traffic for certain work
673 # loads, by sending compressed difference of the pages
675 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
676 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
677 # Disabled by default. (since 2.0)
679 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
680 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
681 # source and target VM to support this feature. To enable it is sufficient
682 # to enable the capability on the source VM. The feature is disabled by
683 # default. (since 1.6)
685 # @compress: Use multiple compression threads to accelerate live migration.
686 # This feature can help to reduce the migration traffic, by sending
687 # compressed pages. Please note that if compress and xbzrle are both
688 # on, compress only takes effect in the ram bulk stage, after that,
689 # it will be disabled and only xbzrle takes effect, this can help to
690 # minimize migration traffic. The feature is disabled by default.
693 # @events: generate events for each migration state change
696 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
697 # to speed up convergence of RAM migration. (since 1.6)
699 # @postcopy-ram: Start executing on the migration target before all of RAM has
700 # been migrated, pulling the remaining pages along as needed. NOTE: If
701 # the migration fails during postcopy the VM will fail. (since 2.6)
703 # @x-colo: If enabled, migration will never end, and the state of the VM on the
704 # primary side will be migrated continuously to the VM on secondary
705 # side, this process is called COarse-Grain LOck Stepping (COLO) for
706 # Non-stop Service. (since 2.8)
710 { 'enum': 'MigrationCapability',
711 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
712 'compress', 'events', 'postcopy-ram', 'x-colo'] }
715 # @MigrationCapabilityStatus:
717 # Migration capability information
719 # @capability: capability enum
721 # @state: capability state bool
725 { 'struct': 'MigrationCapabilityStatus',
726 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
729 # @migrate-set-capabilities:
731 # Enable/Disable the following migration capabilities (like xbzrle)
733 # @capabilities: json array of capability modifications to make
737 { 'command': 'migrate-set-capabilities',
738 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
741 # @query-migrate-capabilities:
743 # Returns information about the current migration capabilities status
745 # Returns: @MigrationCapabilitiesStatus
749 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
752 # @MigrationParameter:
754 # Migration parameters enumeration
756 # @compress-level: Set the compression level to be used in live migration,
757 # the compression level is an integer between 0 and 9, where 0 means
758 # no compression, 1 means the best compression speed, and 9 means best
759 # compression ratio which will consume more CPU.
761 # @compress-threads: Set compression thread count to be used in live migration,
762 # the compression thread count is an integer between 1 and 255.
764 # @decompress-threads: Set decompression thread count to be used in live
765 # migration, the decompression thread count is an integer between 1
766 # and 255. Usually, decompression is at least 4 times as fast as
767 # compression, so set the decompress-threads to the number about 1/4
768 # of compress-threads is adequate.
770 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
771 # when migration auto-converge is activated. The
772 # default value is 20. (Since 2.7)
774 # @cpu-throttle-increment: throttle percentage increase each time
775 # auto-converge detects that migration is not making
776 # progress. The default value is 10. (Since 2.7)
778 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
779 # establishing a TLS connection over the migration data channel.
780 # On the outgoing side of the migration, the credentials must
781 # be for a 'client' endpoint, while for the incoming side the
782 # credentials must be for a 'server' endpoint. Setting this
783 # will enable TLS for all migrations. The default is unset,
784 # resulting in unsecured migration at the QEMU level. (Since 2.7)
786 # @tls-hostname: hostname of the target host for the migration. This is
787 # required when using x509 based TLS credentials and the
788 # migration URI does not already include a hostname. For
789 # example if using fd: or exec: based migration, the
790 # hostname must be provided so that the server's x509
791 # certificate identity can be validated. (Since 2.7)
793 # @max-bandwidth: to set maximum speed for migration. maximum speed in
794 # bytes per second. (Since 2.8)
796 # @downtime-limit: set maximum tolerated downtime for migration. maximum
797 # downtime in milliseconds (Since 2.8)
799 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
800 # periodic mode. (Since 2.8)
804 { 'enum': 'MigrationParameter',
805 'data': ['compress-level', 'compress-threads', 'decompress-threads',
806 'cpu-throttle-initial', 'cpu-throttle-increment',
807 'tls-creds', 'tls-hostname', 'max-bandwidth',
808 'downtime-limit', 'x-checkpoint-delay' ] }
811 # @migrate-set-parameters:
813 # Set various migration parameters. See MigrationParameters for details.
817 { 'command': 'migrate-set-parameters', 'boxed': true,
818 'data': 'MigrationParameters' }
821 # @MigrationParameters:
823 # Optional members can be omitted on input ('migrate-set-parameters')
824 # but most members will always be present on output
825 # ('query-migrate-parameters'), with the exception of tls-creds and
828 # @compress-level: #optional compression level
830 # @compress-threads: #optional compression thread count
832 # @decompress-threads: #optional decompression thread count
834 # @cpu-throttle-initial: #optional Initial percentage of time guest cpus are
835 # throttledwhen migration auto-converge is activated.
836 # The default value is 20. (Since 2.7)
838 # @cpu-throttle-increment: #optional throttle percentage increase each time
839 # auto-converge detects that migration is not making
840 # progress. The default value is 10. (Since 2.7)
842 # @tls-creds: #optional ID of the 'tls-creds' object that provides credentials
843 # for establishing a TLS connection over the migration data
844 # channel. On the outgoing side of the migration, the credentials
845 # must be for a 'client' endpoint, while for the incoming side the
846 # credentials must be for a 'server' endpoint. Setting this
847 # will enable TLS for all migrations. The default is unset,
848 # resulting in unsecured migration at the QEMU level. (Since 2.7)
850 # @tls-hostname: #optional hostname of the target host for the migration. This
851 # is required when using x509 based TLS credentials and the
852 # migration URI does not already include a hostname. For
853 # example if using fd: or exec: based migration, the
854 # hostname must be provided so that the server's x509
855 # certificate identity can be validated. (Since 2.7)
857 # @max-bandwidth: to set maximum speed for migration. maximum speed in
858 # bytes per second. (Since 2.8)
860 # @downtime-limit: set maximum tolerated downtime for migration. maximum
861 # downtime in milliseconds (Since 2.8)
863 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
867 { 'struct': 'MigrationParameters',
868 'data': { '*compress-level': 'int',
869 '*compress-threads': 'int',
870 '*decompress-threads': 'int',
871 '*cpu-throttle-initial': 'int',
872 '*cpu-throttle-increment': 'int',
874 '*tls-hostname': 'str',
875 '*max-bandwidth': 'int',
876 '*downtime-limit': 'int',
877 '*x-checkpoint-delay': 'int'} }
880 # @query-migrate-parameters:
882 # Returns information about the current migration parameters
884 # Returns: @MigrationParameters
888 { 'command': 'query-migrate-parameters',
889 'returns': 'MigrationParameters' }
892 # @client_migrate_info:
894 # Set migration information for remote display. This makes the server
895 # ask the client to automatically reconnect using the new parameters
896 # once migration finished successfully. Only implemented for SPICE.
898 # @protocol: must be "spice"
899 # @hostname: migration target hostname
900 # @port: #optional spice tcp port for plaintext channels
901 # @tls-port: #optional spice tcp port for tls-secured channels
902 # @cert-subject: #optional server certificate subject
906 { 'command': 'client_migrate_info',
907 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
908 '*tls-port': 'int', '*cert-subject': 'str' } }
911 # @migrate-start-postcopy:
913 # Followup to a migration command to switch the migration to postcopy mode.
914 # The postcopy-ram capability must be set before the original migration
919 { 'command': 'migrate-start-postcopy' }
924 # The message transmission between Primary side and Secondary side.
926 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
928 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
930 # @checkpoint-reply: SVM gets PVM's checkpoint request
932 # @vmstate-send: VM's state will be sent by PVM.
934 # @vmstate-size: The total size of VMstate.
936 # @vmstate-received: VM's state has been received by SVM.
938 # @vmstate-loaded: VM's state has been loaded by SVM.
942 { 'enum': 'COLOMessage',
943 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
944 'vmstate-send', 'vmstate-size', 'vmstate-received',
952 # @unknown: unknown mode
954 # @primary: master side
956 # @secondary: slave side
960 { 'enum': 'COLOMode',
961 'data': [ 'unknown', 'primary', 'secondary'] }
966 # An enumeration of COLO failover status
968 # @none: no failover has ever happened
970 # @require: got failover requirement but not handled
972 # @active: in the process of doing failover
974 # @completed: finish the process of failover
978 { 'enum': 'FailoverStatus',
979 'data': [ 'none', 'require', 'active', 'completed'] }
982 # @x-colo-lost-heartbeat:
984 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
985 # If this command is sent to the PVM, the Primary side will exit COLO mode.
986 # If sent to the Secondary, the Secondary side will run failover work,
987 # then takes over server operation to become the service VM.
991 { 'command': 'x-colo-lost-heartbeat' }
996 # Information about a mouse device.
998 # @name: the name of the mouse device
1000 # @index: the index of the mouse device
1002 # @current: true if this device is currently receiving mouse events
1004 # @absolute: true if this device supports absolute coordinates as input
1008 { 'struct': 'MouseInfo',
1009 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
1010 'absolute': 'bool'} }
1015 # Returns information about each active mouse device
1017 # Returns: a list of @MouseInfo for each device
1021 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
1026 # An enumeration of cpu types that enable additional information during
1031 { 'enum': 'CpuInfoArch',
1032 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
1037 # Information about a virtual CPU
1039 # @CPU: the index of the virtual CPU
1041 # @current: this only exists for backwards compatibility and should be ignored
1043 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
1044 # to a processor specific low power mode.
1046 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
1048 # @thread_id: ID of the underlying host thread
1050 # @arch: architecture of the cpu, which determines which additional fields
1051 # will be listed (since 2.6)
1055 # Notes: @halted is a transient state that changes frequently. By the time the
1056 # data is sent to the client, the guest may no longer be halted.
1058 { 'union': 'CpuInfo',
1059 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
1060 'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' },
1061 'discriminator': 'arch',
1062 'data': { 'x86': 'CpuInfoX86',
1063 'sparc': 'CpuInfoSPARC',
1064 'ppc': 'CpuInfoPPC',
1065 'mips': 'CpuInfoMIPS',
1066 'tricore': 'CpuInfoTricore',
1067 'other': 'CpuInfoOther' } }
1072 # Additional information about a virtual i386 or x86_64 CPU
1074 # @pc: the 64-bit instruction pointer
1078 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
1083 # Additional information about a virtual SPARC CPU
1085 # @pc: the PC component of the instruction pointer
1087 # @npc: the NPC component of the instruction pointer
1091 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
1096 # Additional information about a virtual PPC CPU
1098 # @nip: the instruction pointer
1102 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
1107 # Additional information about a virtual MIPS CPU
1109 # @PC: the instruction pointer
1113 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
1118 # Additional information about a virtual Tricore CPU
1120 # @PC: the instruction pointer
1124 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
1129 # No additional information is available about the virtual CPU
1134 { 'struct': 'CpuInfoOther', 'data': { } }
1139 # Returns a list of information about each virtual CPU.
1141 # Returns: a list of @CpuInfo for each virtual CPU
1145 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
1150 # Information about an iothread
1152 # @id: the identifier of the iothread
1154 # @thread-id: ID of the underlying host thread
1158 { 'struct': 'IOThreadInfo',
1159 'data': {'id': 'str', 'thread-id': 'int'} }
1164 # Returns a list of information about each iothread.
1166 # Note: this list excludes the QEMU main loop thread, which is not declared
1167 # using the -object iothread command-line option. It is always the main thread
1170 # Returns: a list of @IOThreadInfo for each iothread
1174 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
1177 # @NetworkAddressFamily:
1179 # The network address family
1181 # @ipv4: IPV4 family
1183 # @ipv6: IPV6 family
1185 # @unix: unix socket
1187 # @vsock: vsock family (since 2.8)
1189 # @unknown: otherwise
1193 { 'enum': 'NetworkAddressFamily',
1194 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
1199 # The basic information for vnc network connection
1203 # @service: The service name of the vnc port. This may depend on the host
1204 # system's service database so symbolic names should not be relied
1207 # @family: address family
1209 # @websocket: true in case the socket is a websocket (since 2.3).
1213 { 'struct': 'VncBasicInfo',
1214 'data': { 'host': 'str',
1216 'family': 'NetworkAddressFamily',
1217 'websocket': 'bool' } }
1222 # The network connection information for server
1224 # @auth: #optional, authentication method
1228 { 'struct': 'VncServerInfo',
1229 'base': 'VncBasicInfo',
1230 'data': { '*auth': 'str' } }
1235 # Information about a connected VNC client.
1237 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
1238 # Name of the client.
1240 # @sasl_username: #optional If SASL authentication is in use, the SASL username
1241 # used for authentication.
1245 { 'struct': 'VncClientInfo',
1246 'base': 'VncBasicInfo',
1247 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1252 # Information about the VNC session.
1254 # @enabled: true if the VNC server is enabled, false otherwise
1256 # @host: #optional The hostname the VNC server is bound to. This depends on
1257 # the name resolution on the host and may be an IP address.
1259 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
1260 # 'ipv4' if the host is listening for IPv4 connections
1261 # 'unix' if the host is listening on a unix domain socket
1262 # 'unknown' otherwise
1264 # @service: #optional The service name of the server's port. This may depends
1265 # on the host system's service database so symbolic names should not
1268 # @auth: #optional the current authentication type used by the server
1269 # 'none' if no authentication is being used
1270 # 'vnc' if VNC authentication is being used
1271 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
1272 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1273 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1274 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1275 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1276 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1277 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1278 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1279 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1281 # @clients: a list of @VncClientInfo of all currently connected clients
1285 { 'struct': 'VncInfo',
1286 'data': {'enabled': 'bool', '*host': 'str',
1287 '*family': 'NetworkAddressFamily',
1288 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1293 # vnc primary authentication method.
1297 { 'enum': 'VncPrimaryAuth',
1298 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1299 'tls', 'vencrypt', 'sasl' ] }
1302 # @VncVencryptSubAuth:
1304 # vnc sub authentication method with vencrypt.
1308 { 'enum': 'VncVencryptSubAuth',
1310 'tls-none', 'x509-none',
1311 'tls-vnc', 'x509-vnc',
1312 'tls-plain', 'x509-plain',
1313 'tls-sasl', 'x509-sasl' ] }
1318 # Information about a vnc server
1320 # @id: vnc server name.
1322 # @server: A list of @VncBasincInfo describing all listening sockets.
1323 # The list can be empty (in case the vnc server is disabled).
1324 # It also may have multiple entries: normal + websocket,
1325 # possibly also ipv4 + ipv6 in the future.
1327 # @clients: A list of @VncClientInfo of all currently connected clients.
1328 # The list can be empty, for obvious reasons.
1330 # @auth: The current authentication type used by the server
1332 # @vencrypt: #optional The vencrypt sub authentication type used by the server,
1333 # only specified in case auth == vencrypt.
1335 # @display: #optional The display device the vnc server is linked to.
1339 { 'struct': 'VncInfo2',
1340 'data': { 'id' : 'str',
1341 'server' : ['VncBasicInfo'],
1342 'clients' : ['VncClientInfo'],
1343 'auth' : 'VncPrimaryAuth',
1344 '*vencrypt' : 'VncVencryptSubAuth',
1345 '*display' : 'str' } }
1350 # Returns information about the current VNC server
1356 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1359 # @query-vnc-servers:
1361 # Returns a list of vnc servers. The list can be empty.
1363 # Returns: a list of @VncInfo2
1367 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1372 # The basic information for SPICE network connection
1376 # @port: port number
1378 # @family: address family
1382 { 'struct': 'SpiceBasicInfo',
1383 'data': { 'host': 'str',
1385 'family': 'NetworkAddressFamily' } }
1390 # Information about a SPICE server
1392 # @auth: #optional, authentication method
1396 { 'struct': 'SpiceServerInfo',
1397 'base': 'SpiceBasicInfo',
1398 'data': { '*auth': 'str' } }
1403 # Information about a SPICE client channel.
1405 # @connection-id: SPICE connection id number. All channels with the same id
1406 # belong to the same SPICE session.
1408 # @channel-type: SPICE channel type number. "1" is the main control
1409 # channel, filter for this one if you want to track spice
1412 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1413 # multiple channels of the same type exist, such as multiple
1414 # display channels in a multihead setup
1416 # @tls: true if the channel is encrypted, false otherwise.
1420 { 'struct': 'SpiceChannel',
1421 'base': 'SpiceBasicInfo',
1422 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1426 # @SpiceQueryMouseMode:
1428 # An enumeration of Spice mouse states.
1430 # @client: Mouse cursor position is determined by the client.
1432 # @server: Mouse cursor position is determined by the server.
1434 # @unknown: No information is available about mouse mode used by
1437 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1441 { 'enum': 'SpiceQueryMouseMode',
1442 'data': [ 'client', 'server', 'unknown' ] }
1447 # Information about the SPICE session.
1449 # @enabled: true if the SPICE server is enabled, false otherwise
1451 # @migrated: true if the last guest migration completed and spice
1452 # migration had completed as well. false otherwise.
1454 # @host: #optional The hostname the SPICE server is bound to. This depends on
1455 # the name resolution on the host and may be an IP address.
1457 # @port: #optional The SPICE server's port number.
1459 # @compiled-version: #optional SPICE server version.
1461 # @tls-port: #optional The SPICE server's TLS port number.
1463 # @auth: #optional the current authentication type used by the server
1464 # 'none' if no authentication is being used
1465 # 'spice' uses SASL or direct TLS authentication, depending on command
1468 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1469 # be determined by the client or the server, or unknown if spice
1470 # server doesn't provide this information.
1474 # @channels: a list of @SpiceChannel for each active spice channel
1478 { 'struct': 'SpiceInfo',
1479 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1480 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1481 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1486 # Returns information about the current SPICE server
1488 # Returns: @SpiceInfo
1492 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1497 # Information about the guest balloon device.
1499 # @actual: the number of bytes the balloon currently contains
1504 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1509 # Return information about the balloon device.
1511 # Returns: @BalloonInfo on success
1512 # If the balloon driver is enabled but not functional because the KVM
1513 # kernel module cannot support it, KvmMissingCap
1514 # If no balloon device is present, DeviceNotActive
1518 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1523 # A PCI device memory region
1525 # @base: the starting address (guest physical)
1527 # @limit: the ending address (guest physical)
1531 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1536 # Information about a PCI device I/O region.
1538 # @bar: the index of the Base Address Register for this region
1540 # @type: 'io' if the region is a PIO region
1541 # 'memory' if the region is a MMIO region
1543 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1545 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1549 { 'struct': 'PciMemoryRegion',
1550 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1551 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1556 # Information about a bus of a PCI Bridge device
1558 # @number: primary bus interface number. This should be the number of the
1559 # bus the device resides on.
1561 # @secondary: secondary bus interface number. This is the number of the
1562 # main bus for the bridge
1564 # @subordinate: This is the highest number bus that resides below the
1567 # @io_range: The PIO range for all devices on this bridge
1569 # @memory_range: The MMIO range for all devices on this bridge
1571 # @prefetchable_range: The range of prefetchable MMIO for all devices on
1576 { 'struct': 'PciBusInfo',
1577 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1578 'io_range': 'PciMemoryRange',
1579 'memory_range': 'PciMemoryRange',
1580 'prefetchable_range': 'PciMemoryRange' } }
1585 # Information about a PCI Bridge device
1587 # @bus: information about the bus the device resides on
1589 # @devices: a list of @PciDeviceInfo for each device on this bridge
1593 { 'struct': 'PciBridgeInfo',
1594 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
1599 # Information about the Class of a PCI device
1601 # @desc: #optional a string description of the device's class
1603 # @class: the class code of the device
1607 { 'struct': 'PciDeviceClass',
1608 'data': {'*desc': 'str', 'class': 'int'} }
1613 # Information about the Id of a PCI device
1615 # @device: the PCI device id
1617 # @vendor: the PCI vendor id
1621 { 'struct': 'PciDeviceId',
1622 'data': {'device': 'int', 'vendor': 'int'} }
1627 # Information about a PCI device
1629 # @bus: the bus number of the device
1631 # @slot: the slot the device is located in
1633 # @function: the function of the slot used by the device
1635 # @class_info: the class of the device
1637 # @id: the PCI device id
1639 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1641 # @qdev_id: the device name of the PCI device
1643 # @pci_bridge: if the device is a PCI bridge, the bridge information
1645 # @regions: a list of the PCI I/O regions associated with the device
1647 # Notes: the contents of @class_info.desc are not stable and should only be
1648 # treated as informational.
1652 { 'struct': 'PciDeviceInfo',
1653 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1654 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
1655 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1656 'regions': ['PciMemoryRegion']} }
1661 # Information about a PCI bus
1663 # @bus: the bus index
1665 # @devices: a list of devices on this bus
1669 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1674 # Return information about the PCI bus topology of the guest.
1676 # Returns: a list of @PciInfo for each PCI bus
1680 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1685 # This command will cause the QEMU process to exit gracefully. While every
1686 # attempt is made to send the QMP response before terminating, this is not
1687 # guaranteed. When using this interface, a premature EOF would not be
1692 { 'command': 'quit' }
1697 # Stop all guest VCPU execution.
1701 # Notes: This function will succeed even if the guest is already in the stopped
1702 # state. In "inmigrate" state, it will ensure that the guest
1703 # remains paused once migration finishes, as if the -S option was
1704 # passed on the command line.
1706 { 'command': 'stop' }
1711 # Performs a hard reset of a guest.
1715 { 'command': 'system_reset' }
1718 # @system_powerdown:
1720 # Requests that a guest perform a powerdown operation.
1724 # Notes: A guest may or may not respond to this command. This command
1725 # returning does not indicate that a guest has accepted the request or
1726 # that it has shut down. Many guests will respond to this command by
1727 # prompting the user in some way.
1729 { 'command': 'system_powerdown' }
1734 # This command is a nop that is only provided for the purposes of compatibility.
1738 # Notes: Do not use this command.
1740 { 'command': 'cpu', 'data': {'index': 'int'} }
1745 # Adds CPU with specified ID
1747 # @id: ID of CPU to be created, valid values [0..max_cpus)
1749 # Returns: Nothing on success
1753 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1758 # Save a portion of guest memory to a file.
1760 # @val: the virtual address of the guest to start from
1762 # @size: the size of memory region to save
1764 # @filename: the file to save the memory to as binary data
1766 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1767 # virtual address (defaults to CPU 0)
1769 # Returns: Nothing on success
1773 # Notes: Errors were not reliably returned until 1.1
1775 { 'command': 'memsave',
1776 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1781 # Save a portion of guest physical memory to a file.
1783 # @val: the physical address of the guest to start from
1785 # @size: the size of memory region to save
1787 # @filename: the file to save the memory to as binary data
1789 # Returns: Nothing on success
1793 # Notes: Errors were not reliably returned until 1.1
1795 { 'command': 'pmemsave',
1796 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1801 # Resume guest VCPU execution.
1805 # Returns: If successful, nothing
1806 # If QEMU was started with an encrypted block device and a key has
1807 # not yet been set, DeviceEncrypted.
1809 # Notes: This command will succeed if the guest is currently running. It
1810 # will also succeed if the guest is in the "inmigrate" state; in
1811 # this case, the effect of the command is to make sure the guest
1812 # starts once migration finishes, removing the effect of the -S
1813 # command line option if it was passed.
1815 { 'command': 'cont' }
1820 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1826 { 'command': 'system_wakeup' }
1831 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
1833 # Returns: If successful, nothing
1837 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
1839 { 'command': 'inject-nmi' }
1844 # Sets the link status of a virtual network adapter.
1846 # @name: the device name of the virtual network adapter
1848 # @up: true to set the link status to be up
1850 # Returns: Nothing on success
1851 # If @name is not a valid network device, DeviceNotFound
1855 # Notes: Not all network adapters support setting link status. This command
1856 # will succeed even if the network adapter does not support link status
1859 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1864 # Request the balloon driver to change its balloon size.
1866 # @value: the target size of the balloon in bytes
1868 # Returns: Nothing on success
1869 # If the balloon driver is enabled but not functional because the KVM
1870 # kernel module cannot support it, KvmMissingCap
1871 # If no balloon device is present, DeviceNotActive
1873 # Notes: This command just issues a request to the guest. When it returns,
1874 # the balloon size may not have changed. A guest can change the balloon
1875 # size independent of this command.
1879 { 'command': 'balloon', 'data': {'value': 'int'} }
1884 # This action can be used to test transaction failure.
1888 { 'struct': 'Abort',
1892 # @ActionCompletionMode:
1894 # An enumeration of Transactional completion modes.
1896 # @individual: Do not attempt to cancel any other Actions if any Actions fail
1897 # after the Transaction request succeeds. All Actions that
1898 # can complete successfully will do so without waiting on others.
1899 # This is the default.
1901 # @grouped: If any Action fails after the Transaction succeeds, cancel all
1902 # Actions. Actions do not complete until all Actions are ready to
1903 # complete. May be rejected by Actions that do not support this
1908 { 'enum': 'ActionCompletionMode',
1909 'data': [ 'individual', 'grouped' ] }
1912 # @TransactionAction:
1914 # A discriminated record of operations that can be performed with
1915 # @transaction. Action @type can be:
1917 # - @abort: since 1.6
1918 # - @block-dirty-bitmap-add: since 2.5
1919 # - @block-dirty-bitmap-clear: since 2.5
1920 # - @blockdev-backup: since 2.3
1921 # - @blockdev-snapshot: since 2.5
1922 # - @blockdev-snapshot-internal-sync: since 1.7
1923 # - @blockdev-snapshot-sync: since 1.1
1924 # - @drive-backup: since 1.6
1928 { 'union': 'TransactionAction',
1931 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
1932 'block-dirty-bitmap-clear': 'BlockDirtyBitmap',
1933 'blockdev-backup': 'BlockdevBackup',
1934 'blockdev-snapshot': 'BlockdevSnapshot',
1935 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
1936 'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
1937 'drive-backup': 'DriveBackup'
1941 # @TransactionProperties:
1943 # Optional arguments to modify the behavior of a Transaction.
1945 # @completion-mode: #optional Controls how jobs launched asynchronously by
1946 # Actions will complete or fail as a group.
1947 # See @ActionCompletionMode for details.
1951 { 'struct': 'TransactionProperties',
1953 '*completion-mode': 'ActionCompletionMode'
1960 # Executes a number of transactionable QMP commands atomically. If any
1961 # operation fails, then the entire set of actions will be abandoned and the
1962 # appropriate error returned.
1964 # @actions: List of @TransactionAction;
1965 # information needed for the respective operations.
1967 # @properties: #optional structure of additional options to control the
1968 # execution of the transaction. See @TransactionProperties
1969 # for additional detail.
1971 # Returns: nothing on success
1972 # Errors depend on the operations of the transaction
1974 # Note: The transaction aborts on the first failure. Therefore, there will be
1975 # information on only one failed operation returned in an error condition, and
1976 # subsequent actions will not have been attempted.
1980 { 'command': 'transaction',
1981 'data': { 'actions': [ 'TransactionAction' ],
1982 '*properties': 'TransactionProperties'
1987 # @human-monitor-command:
1989 # Execute a command on the human monitor and return the output.
1991 # @command-line: the command to execute in the human monitor
1993 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1995 # Returns: the output of the command as a string
1999 # Notes: This command only exists as a stop-gap. Its use is highly
2000 # discouraged. The semantics of this command are not guaranteed.
2002 # Known limitations:
2004 # * This command is stateless, this means that commands that depend
2005 # on state information (such as getfd) might not work
2007 # * Commands that prompt the user for data (eg. 'cont' when the block
2008 # device is encrypted) don't currently work
2010 { 'command': 'human-monitor-command',
2011 'data': {'command-line': 'str', '*cpu-index': 'int'},
2017 # Cancel the current executing migration process.
2019 # Returns: nothing on success
2021 # Notes: This command succeeds even if there is no migration process running.
2025 { 'command': 'migrate_cancel' }
2028 # @migrate_set_downtime:
2030 # Set maximum tolerated downtime for migration.
2032 # @value: maximum downtime in seconds
2034 # Returns: nothing on success
2036 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2040 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
2043 # @migrate_set_speed:
2045 # Set maximum speed for migration.
2047 # @value: maximum speed in bytes.
2049 # Returns: nothing on success
2051 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2055 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
2058 # @migrate-set-cache-size:
2060 # Set XBZRLE cache size
2062 # @value: cache size in bytes
2064 # The size will be rounded down to the nearest power of 2.
2065 # The cache size can be modified before and during ongoing migration
2067 # Returns: nothing on success
2071 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
2074 # @query-migrate-cache-size:
2076 # query XBZRLE cache size
2078 # Returns: XBZRLE cache size in bytes
2082 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
2085 # @ObjectPropertyInfo:
2087 # @name: the name of the property
2089 # @type: the type of the property. This will typically come in one of four
2092 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
2093 # These types are mapped to the appropriate JSON type.
2095 # 2) A child type in the form 'child<subtype>' where subtype is a qdev
2096 # device type name. Child properties create the composition tree.
2098 # 3) A link type in the form 'link<subtype>' where subtype is a qdev
2099 # device type name. Link properties form the device model graph.
2103 { 'struct': 'ObjectPropertyInfo',
2104 'data': { 'name': 'str', 'type': 'str' } }
2109 # This command will list any properties of a object given a path in the object
2112 # @path: the path within the object model. See @qom-get for a description of
2115 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
2120 { 'command': 'qom-list',
2121 'data': { 'path': 'str' },
2122 'returns': [ 'ObjectPropertyInfo' ] }
2127 # This command will get a property from a object model path and return the
2130 # @path: The path within the object model. There are two forms of supported
2131 # paths--absolute and partial paths.
2133 # Absolute paths are derived from the root object and can follow child<>
2134 # or link<> properties. Since they can follow link<> properties, they
2135 # can be arbitrarily long. Absolute paths look like absolute filenames
2136 # and are prefixed with a leading slash.
2138 # Partial paths look like relative filenames. They do not begin
2139 # with a prefix. The matching rules for partial paths are subtle but
2140 # designed to make specifying objects easy. At each level of the
2141 # composition tree, the partial path is matched as an absolute path.
2142 # The first match is not returned. At least two matches are searched
2143 # for. A successful result is only returned if only one match is
2144 # found. If more than one match is found, a flag is return to
2145 # indicate that the match was ambiguous.
2147 # @property: The property name to read
2149 # Returns: The property value. The type depends on the property
2150 # type. child<> and link<> properties are returned as #str
2151 # pathnames. All integer property types (u8, u16, etc) are
2156 { 'command': 'qom-get',
2157 'data': { 'path': 'str', 'property': 'str' },
2163 # This command will set a property from a object model path.
2165 # @path: see @qom-get for a description of this parameter
2167 # @property: the property name to set
2169 # @value: a value who's type is appropriate for the property type. See @qom-get
2170 # for a description of type mapping.
2174 { 'command': 'qom-set',
2175 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
2180 # Sets the password of a remote display session.
2182 # @protocol: `vnc' to modify the VNC server password
2183 # `spice' to modify the Spice server password
2185 # @password: the new password
2187 # @connected: #optional how to handle existing clients when changing the
2188 # password. If nothing is specified, defaults to `keep'
2189 # `fail' to fail the command if clients are connected
2190 # `disconnect' to disconnect existing clients
2191 # `keep' to maintain existing clients
2193 # Returns: Nothing on success
2194 # If Spice is not enabled, DeviceNotFound
2198 { 'command': 'set_password',
2199 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2204 # Expire the password of a remote display server.
2206 # @protocol: the name of the remote display protocol `vnc' or `spice'
2208 # @time: when to expire the password.
2209 # `now' to expire the password immediately
2210 # `never' to cancel password expiration
2211 # `+INT' where INT is the number of seconds from now (integer)
2212 # `INT' where INT is the absolute time in seconds
2214 # Returns: Nothing on success
2215 # If @protocol is `spice' and Spice is not active, DeviceNotFound
2219 # Notes: Time is relative to the server and currently there is no way to
2220 # coordinate server time with client time. It is not recommended to
2221 # use the absolute time version of the @time parameter unless you're
2222 # sure you are on the same machine as the QEMU instance.
2224 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2227 # @change-vnc-password:
2229 # Change the VNC server password.
2231 # @password: the new password to use with VNC authentication
2235 # Notes: An empty password in this command will set the password to the empty
2236 # string. Existing clients are unaffected by executing this command.
2238 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2243 # This command is multiple commands multiplexed together.
2245 # @device: This is normally the name of a block device but it may also be 'vnc'.
2246 # when it's 'vnc', then sub command depends on @target
2248 # @target: If @device is a block device, then this is the new filename.
2249 # If @device is 'vnc', then if the value 'password' selects the vnc
2250 # change password command. Otherwise, this specifies a new server URI
2251 # address to listen to for VNC connections.
2253 # @arg: If @device is a block device, then this is an optional format to open
2255 # If @device is 'vnc' and @target is 'password', this is the new VNC
2256 # password to set. If this argument is an empty string, then no future
2257 # logins will be allowed.
2259 # Returns: Nothing on success.
2260 # If @device is not a valid block device, DeviceNotFound
2261 # If the new block device is encrypted, DeviceEncrypted. Note that
2262 # if this error is returned, the device has been opened successfully
2263 # and an additional call to @block_passwd is required to set the
2264 # device's password. The behavior of reads and writes to the block
2265 # device between when these calls are executed is undefined.
2267 # Notes: This interface is deprecated, and it is strongly recommended that you
2268 # avoid using it. For changing block devices, use
2269 # blockdev-change-medium; for changing VNC parameters, use
2270 # change-vnc-password.
2274 { 'command': 'change',
2275 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2280 # This structure describes a search result from @qom-list-types
2282 # @name: the type name found in the search
2286 # Notes: This command is experimental and may change syntax in future releases.
2288 { 'struct': 'ObjectTypeInfo',
2289 'data': { 'name': 'str' } }
2294 # This command will return a list of types given search parameters
2296 # @implements: if specified, only return types that implement this type name
2298 # @abstract: if true, include abstract types in the results
2300 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2304 { 'command': 'qom-list-types',
2305 'data': { '*implements': 'str', '*abstract': 'bool' },
2306 'returns': [ 'ObjectTypeInfo' ] }
2309 # @DevicePropertyInfo:
2311 # Information about device properties.
2313 # @name: the name of the property
2314 # @type: the typename of the property
2315 # @description: #optional if specified, the description of the property.
2320 { 'struct': 'DevicePropertyInfo',
2321 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
2324 # @device-list-properties:
2326 # List properties associated with a device.
2328 # @typename: the type name of a device
2330 # Returns: a list of DevicePropertyInfo describing a devices properties
2334 { 'command': 'device-list-properties',
2335 'data': { 'typename': 'str'},
2336 'returns': [ 'DevicePropertyInfo' ] }
2341 # Migrates the current running guest to another Virtual Machine.
2343 # @uri: the Uniform Resource Identifier of the destination VM
2345 # @blk: #optional do block migration (full disk copy)
2347 # @inc: #optional incremental disk copy migration
2349 # @detach: this argument exists only for compatibility reasons and
2350 # is ignored by QEMU
2352 # Returns: nothing on success
2356 { 'command': 'migrate',
2357 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2360 # @migrate-incoming:
2362 # Start an incoming migration, the qemu must have been started
2363 # with -incoming defer
2365 # @uri: The Uniform Resource Identifier identifying the source or
2366 # address to listen on
2368 # Returns: nothing on success
2371 # Note: It's a bad idea to use a string for the uri, but it needs to stay
2372 # compatible with -incoming and the format of the uri is already exposed
2375 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
2378 # @xen-save-devices-state:
2380 # Save the state of all devices to file. The RAM and the block devices
2381 # of the VM are not saved by this command.
2383 # @filename: the file to save the state of the devices to as binary
2384 # data. See xen-save-devices-state.txt for a description of the binary
2387 # Returns: Nothing on success
2391 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2394 # @xen-set-global-dirty-log:
2396 # Enable or disable the global dirty log mode.
2398 # @enable: true to enable, false to disable.
2404 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2409 # @driver: the name of the new device's driver
2411 # @bus: #optional the device's parent bus (device tree path)
2413 # @id: #optional the device's ID, must be unique
2415 # Additional arguments depend on the type.
2420 # 1. For detailed information about this command, please refer to the
2421 # 'docs/qdev-device-use.txt' file.
2423 # 2. It's possible to list device properties by running QEMU with the
2424 # "-device DEVICE,help" command-line argument, where DEVICE is the
2429 # -> { "execute": "device_add",
2430 # "arguments": { "driver": "e1000", "id": "net1",
2432 # "mac": "52:54:00:12:34:56" } }
2433 # <- { "return": {} }
2435 # TODO: This command effectively bypasses QAPI completely due to its
2436 # "additional arguments" business. It shouldn't have been added to
2437 # the schema in this form. It should be qapified properly, or
2438 # replaced by a properly qapified command.
2442 { 'command': 'device_add',
2443 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'},
2444 'gen': false } # so we can get the additional arguments
2449 # Remove a device from a guest
2451 # @id: the name or QOM path of the device
2453 # Returns: Nothing on success
2454 # If @id is not a valid device, DeviceNotFound
2456 # Notes: When this command completes, the device may not be removed from the
2457 # guest. Hot removal is an operation that requires guest cooperation.
2458 # This command merely requests that the guest begin the hot removal
2459 # process. Completion of the device removal process is signaled with a
2460 # DEVICE_DELETED event. Guest reset will automatically complete removal
2465 { 'command': 'device_del', 'data': {'id': 'str'} }
2468 # @DumpGuestMemoryFormat:
2470 # An enumeration of guest-memory-dump's format.
2474 # @kdump-zlib: kdump-compressed format with zlib-compressed
2476 # @kdump-lzo: kdump-compressed format with lzo-compressed
2478 # @kdump-snappy: kdump-compressed format with snappy-compressed
2482 { 'enum': 'DumpGuestMemoryFormat',
2483 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
2486 # @dump-guest-memory:
2488 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2489 # very long depending on the amount of guest memory.
2491 # @paging: if true, do paging to get guest's memory mapping. This allows
2492 # using gdb to process the core file.
2494 # IMPORTANT: this option can make QEMU allocate several gigabytes
2495 # of RAM. This can happen for a large guest, or a
2496 # malicious guest pretending to be large.
2498 # Also, paging=true has the following limitations:
2500 # 1. The guest may be in a catastrophic state or can have corrupted
2501 # memory, which cannot be trusted
2502 # 2. The guest can be in real-mode even if paging is enabled. For
2503 # example, the guest uses ACPI to sleep, and ACPI sleep state
2505 # 3. Currently only supported on i386 and x86_64.
2507 # @protocol: the filename or file descriptor of the vmcore. The supported
2510 # 1. file: the protocol starts with "file:", and the following
2511 # string is the file's path.
2512 # 2. fd: the protocol starts with "fd:", and the following string
2515 # @detach: #optional if true, QMP will return immediately rather than
2516 # waiting for the dump to finish. The user can track progress
2517 # using "query-dump". (since 2.6).
2519 # @begin: #optional if specified, the starting physical address.
2521 # @length: #optional if specified, the memory size, in bytes. If you don't
2522 # want to dump all guest's memory, please specify the start @begin
2525 # @format: #optional if specified, the format of guest memory dump. But non-elf
2526 # format is conflict with paging and filter, ie. @paging, @begin and
2527 # @length is not allowed to be specified with non-elf @format at the
2528 # same time (since 2.0)
2530 # Returns: nothing on success
2534 { 'command': 'dump-guest-memory',
2535 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
2536 '*begin': 'int', '*length': 'int',
2537 '*format': 'DumpGuestMemoryFormat'} }
2542 # Describe the status of a long-running background guest memory dump.
2544 # @none: no dump-guest-memory has started yet.
2546 # @active: there is one dump running in background.
2548 # @completed: the last dump has finished successfully.
2550 # @failed: the last dump has failed.
2554 { 'enum': 'DumpStatus',
2555 'data': [ 'none', 'active', 'completed', 'failed' ] }
2560 # The result format for 'query-dump'.
2562 # @status: enum of @DumpStatus, which shows current dump status
2564 # @completed: bytes written in latest dump (uncompressed)
2566 # @total: total bytes to be written in latest dump (uncompressed)
2570 { 'struct': 'DumpQueryResult',
2571 'data': { 'status': 'DumpStatus',
2578 # Query latest dump status.
2580 # Returns: A @DumpStatus object showing the dump status.
2584 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
2587 # @DumpGuestMemoryCapability:
2589 # A list of the available formats for dump-guest-memory
2593 { 'struct': 'DumpGuestMemoryCapability',
2595 'formats': ['DumpGuestMemoryFormat'] } }
2598 # @query-dump-guest-memory-capability:
2600 # Returns the available formats for dump-guest-memory
2602 # Returns: A @DumpGuestMemoryCapability object listing available formats for
2607 { 'command': 'query-dump-guest-memory-capability',
2608 'returns': 'DumpGuestMemoryCapability' }
2613 # Dump guest's storage keys
2615 # @filename: the path to the file to dump to
2617 # This command is only supported on s390 architecture.
2621 { 'command': 'dump-skeys',
2622 'data': { 'filename': 'str' } }
2627 # Add a network backend.
2629 # @type: the type of network backend. Current valid values are 'user', 'tap',
2630 # 'vde', 'socket', 'dump' and 'bridge'
2632 # @id: the name of the new network backend
2634 # Additional arguments depend on the type.
2636 # TODO: This command effectively bypasses QAPI completely due to its
2637 # "additional arguments" business. It shouldn't have been added to
2638 # the schema in this form. It should be qapified properly, or
2639 # replaced by a properly qapified command.
2643 # Returns: Nothing on success
2644 # If @type is not a valid network backend, DeviceNotFound
2646 { 'command': 'netdev_add',
2647 'data': {'type': 'str', 'id': 'str'},
2648 'gen': false } # so we can get the additional arguments
2653 # Remove a network backend.
2655 # @id: the name of the network backend to remove
2657 # Returns: Nothing on success
2658 # If @id is not a valid network backend, DeviceNotFound
2662 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2667 # Create a QOM object.
2669 # @qom-type: the class name for the object to be created
2671 # @id: the name of the new object
2673 # @props: #optional a dictionary of properties to be passed to the backend
2675 # Returns: Nothing on success
2676 # Error if @qom-type is not a valid class name
2680 { 'command': 'object-add',
2681 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
2686 # Remove a QOM object.
2688 # @id: the name of the QOM object to remove
2690 # Returns: Nothing on success
2691 # Error if @id is not a valid id for a QOM object
2695 { 'command': 'object-del', 'data': {'id': 'str'} }
2698 # @NetdevNoneOptions:
2700 # Use it alone to have zero network devices.
2704 { 'struct': 'NetdevNoneOptions',
2708 # @NetLegacyNicOptions:
2710 # Create a new Network Interface Card.
2712 # @netdev: #optional id of -netdev to connect to
2714 # @macaddr: #optional MAC address
2716 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2718 # @addr: #optional PCI device address
2720 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2724 { 'struct': 'NetLegacyNicOptions',
2730 '*vectors': 'uint32' } }
2735 # A fat type wrapping 'str', to be embedded in lists.
2739 { 'struct': 'String',
2744 # @NetdevUserOptions:
2746 # Use the user mode network stack which requires no administrator privilege to
2749 # @hostname: #optional client hostname reported by the builtin DHCP server
2751 # @restrict: #optional isolate the guest from the host
2753 # @ipv4: #optional whether to support IPv4, default true for enabled
2756 # @ipv6: #optional whether to support IPv6, default true for enabled
2759 # @ip: #optional legacy parameter, use net= instead
2761 # @net: #optional IP network address that the guest will see, in the
2762 # form addr[/netmask] The netmask is optional, and can be
2763 # either in the form a.b.c.d or as a number of valid top-most
2764 # bits. Default is 10.0.2.0/24.
2766 # @host: #optional guest-visible address of the host
2768 # @tftp: #optional root directory of the built-in TFTP server
2770 # @bootfile: #optional BOOTP filename, for use with tftp=
2772 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2775 # @dns: #optional guest-visible address of the virtual nameserver
2777 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2780 # @ipv6-prefix: #optional IPv6 network prefix (default is fec0::) (since
2781 # 2.6). The network prefix is given in the usual
2782 # hexadecimal IPv6 address notation.
2784 # @ipv6-prefixlen: #optional IPv6 network prefix length (default is 64)
2787 # @ipv6-host: #optional guest-visible IPv6 address of the host (since 2.6)
2789 # @ipv6-dns: #optional guest-visible IPv6 address of the virtual
2790 # nameserver (since 2.6)
2792 # @smb: #optional root directory of the built-in SMB server
2794 # @smbserver: #optional IP address of the built-in SMB server
2796 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2799 # @guestfwd: #optional forward guest TCP connections
2803 { 'struct': 'NetdevUserOptions',
2806 '*restrict': 'bool',
2814 '*dhcpstart': 'str',
2816 '*dnssearch': ['String'],
2817 '*ipv6-prefix': 'str',
2818 '*ipv6-prefixlen': 'int',
2819 '*ipv6-host': 'str',
2822 '*smbserver': 'str',
2823 '*hostfwd': ['String'],
2824 '*guestfwd': ['String'] } }
2827 # @NetdevTapOptions:
2829 # Connect the host TAP network interface name to the VLAN.
2831 # @ifname: #optional interface name
2833 # @fd: #optional file descriptor of an already opened tap
2835 # @fds: #optional multiple file descriptors of already opened multiqueue capable
2838 # @script: #optional script to initialize the interface
2840 # @downscript: #optional script to shut down the interface
2842 # @br: #optional bridge name (since 2.8)
2844 # @helper: #optional command to execute to configure bridge
2846 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2848 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2850 # @vhost: #optional enable vhost-net network accelerator
2852 # @vhostfd: #optional file descriptor of an already opened vhost net device
2854 # @vhostfds: #optional file descriptors of multiple already opened vhost net
2857 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2859 # @queues: #optional number of queues to be created for multiqueue capable tap
2861 # @poll-us: #optional maximum number of microseconds that could
2862 # be spent on busy polling for tap (since 2.7)
2866 { 'struct': 'NetdevTapOptions',
2872 '*downscript': 'str',
2876 '*vnet_hdr': 'bool',
2880 '*vhostforce': 'bool',
2881 '*queues': 'uint32',
2882 '*poll-us': 'uint32'} }
2885 # @NetdevSocketOptions:
2887 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2888 # socket connection.
2890 # @fd: #optional file descriptor of an already opened socket
2892 # @listen: #optional port number, and optional hostname, to listen on
2894 # @connect: #optional port number, and optional hostname, to connect to
2896 # @mcast: #optional UDP multicast address and port number
2898 # @localaddr: #optional source address and port for multicast and udp packets
2900 # @udp: #optional UDP unicast address and port number
2904 { 'struct': 'NetdevSocketOptions',
2910 '*localaddr': 'str',
2914 # @NetdevL2TPv3Options:
2916 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
2918 # @src: source address
2920 # @dst: destination address
2922 # @srcport: #optional source port - mandatory for udp, optional for ip
2924 # @dstport: #optional destination port - mandatory for udp, optional for ip
2926 # @ipv6: #optional - force the use of ipv6
2928 # @udp: #optional - use the udp version of l2tpv3 encapsulation
2930 # @cookie64: #optional - use 64 bit coookies
2932 # @counter: #optional have sequence counter
2934 # @pincounter: #optional pin sequence counter to zero -
2935 # workaround for buggy implementations or
2936 # networks with packet reorder
2938 # @txcookie: #optional 32 or 64 bit transmit cookie
2940 # @rxcookie: #optional 32 or 64 bit receive cookie
2942 # @txsession: 32 bit transmit session
2944 # @rxsession: #optional 32 bit receive session - if not specified
2945 # set to the same value as transmit
2947 # @offset: #optional additional offset - allows the insertion of
2948 # additional application-specific data before the packet payload
2952 { 'struct': 'NetdevL2TPv3Options',
2960 '*cookie64': 'bool',
2962 '*pincounter': 'bool',
2963 '*txcookie': 'uint64',
2964 '*rxcookie': 'uint64',
2965 'txsession': 'uint32',
2966 '*rxsession': 'uint32',
2967 '*offset': 'uint32' } }
2970 # @NetdevVdeOptions:
2972 # Connect the VLAN to a vde switch running on the host.
2974 # @sock: #optional socket path
2976 # @port: #optional port number
2978 # @group: #optional group owner of socket
2980 # @mode: #optional permissions for socket
2984 { 'struct': 'NetdevVdeOptions',
2989 '*mode': 'uint16' } }
2992 # @NetdevDumpOptions:
2994 # Dump VLAN network traffic to a file.
2996 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2999 # @file: #optional dump file path (default is qemu-vlan0.pcap)
3003 { 'struct': 'NetdevDumpOptions',
3009 # @NetdevBridgeOptions:
3011 # Connect a host TAP network interface to a host bridge device.
3013 # @br: #optional bridge name
3015 # @helper: #optional command to execute to configure bridge
3019 { 'struct': 'NetdevBridgeOptions',
3022 '*helper': 'str' } }
3025 # @NetdevHubPortOptions:
3027 # Connect two or more net clients through a software hub.
3029 # @hubid: hub identifier number
3033 { 'struct': 'NetdevHubPortOptions',
3035 'hubid': 'int32' } }
3038 # @NetdevNetmapOptions:
3040 # Connect a client to a netmap-enabled NIC or to a VALE switch port
3042 # @ifname: Either the name of an existing network interface supported by
3043 # netmap, or the name of a VALE port (created on the fly).
3044 # A VALE port name is in the form 'valeXXX:YYY', where XXX and
3045 # YYY are non-negative integers. XXX identifies a switch and
3046 # YYY identifies a port of the switch. VALE ports having the
3047 # same XXX are therefore connected to the same switch.
3049 # @devname: #optional path of the netmap device (default: '/dev/netmap').
3053 { 'struct': 'NetdevNetmapOptions',
3056 '*devname': 'str' } }
3059 # @NetdevVhostUserOptions:
3061 # Vhost-user network backend
3063 # @chardev: name of a unix socket chardev
3065 # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
3067 # @queues: #optional number of queues to be created for multiqueue vhost-user
3068 # (default: 1) (Since 2.5)
3072 { 'struct': 'NetdevVhostUserOptions',
3075 '*vhostforce': 'bool',
3076 '*queues': 'int' } }
3081 # Available netdev drivers.
3085 { 'enum': 'NetClientDriver',
3086 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
3087 'bridge', 'hubport', 'netmap', 'vhost-user' ] }
3092 # Captures the configuration of a network device.
3094 # @id: identifier for monitor commands.
3096 # @type: Specify the driver used for interpreting remaining arguments.
3100 # 'l2tpv3' - since 2.1
3102 { 'union': 'Netdev',
3103 'base': { 'id': 'str', 'type': 'NetClientDriver' },
3104 'discriminator': 'type',
3106 'none': 'NetdevNoneOptions',
3107 'nic': 'NetLegacyNicOptions',
3108 'user': 'NetdevUserOptions',
3109 'tap': 'NetdevTapOptions',
3110 'l2tpv3': 'NetdevL2TPv3Options',
3111 'socket': 'NetdevSocketOptions',
3112 'vde': 'NetdevVdeOptions',
3113 'dump': 'NetdevDumpOptions',
3114 'bridge': 'NetdevBridgeOptions',
3115 'hubport': 'NetdevHubPortOptions',
3116 'netmap': 'NetdevNetmapOptions',
3117 'vhost-user': 'NetdevVhostUserOptions' } }
3122 # Captures the configuration of a network device; legacy.
3124 # @vlan: #optional vlan number
3126 # @id: #optional identifier for monitor commands
3128 # @name: #optional identifier for monitor commands, ignored if @id is present
3130 # @opts: device type specific properties (legacy)
3134 { 'struct': 'NetLegacy',
3139 'opts': 'NetLegacyOptions' } }
3142 # @NetLegacyOptions:
3144 # Like Netdev, but for use only by the legacy command line options
3148 { 'union': 'NetLegacyOptions',
3150 'none': 'NetdevNoneOptions',
3151 'nic': 'NetLegacyNicOptions',
3152 'user': 'NetdevUserOptions',
3153 'tap': 'NetdevTapOptions',
3154 'l2tpv3': 'NetdevL2TPv3Options',
3155 'socket': 'NetdevSocketOptions',
3156 'vde': 'NetdevVdeOptions',
3157 'dump': 'NetdevDumpOptions',
3158 'bridge': 'NetdevBridgeOptions',
3159 'netmap': 'NetdevNetmapOptions',
3160 'vhost-user': 'NetdevVhostUserOptions' } }
3163 # @NetFilterDirection:
3165 # Indicates whether a netfilter is attached to a netdev's transmit queue or
3166 # receive queue or both.
3168 # @all: the filter is attached both to the receive and the transmit
3169 # queue of the netdev (default).
3171 # @rx: the filter is attached to the receive queue of the netdev,
3172 # where it will receive packets sent to the netdev.
3174 # @tx: the filter is attached to the transmit queue of the netdev,
3175 # where it will receive packets sent by the netdev.
3179 { 'enum': 'NetFilterDirection',
3180 'data': [ 'all', 'rx', 'tx' ] }
3183 # @InetSocketAddress:
3185 # Captures a socket address or address range in the Internet namespace.
3187 # @host: host part of the address
3189 # @port: port part of the address, or lowest port if @to is present
3191 # @to: highest port to try
3193 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
3196 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
3201 { 'struct': 'InetSocketAddress',
3210 # @UnixSocketAddress:
3212 # Captures a socket address in the local ("Unix socket") namespace.
3214 # @path: filesystem path to use
3218 { 'struct': 'UnixSocketAddress',
3223 # @VsockSocketAddress:
3225 # Captures a socket address in the vsock namespace.
3227 # @cid: unique host identifier
3230 # Note: string types are used to allow for possible future hostname or
3231 # service resolution support.
3235 { 'struct': 'VsockSocketAddress',
3243 # Captures the address of a socket, which could also be a named file descriptor
3247 { 'union': 'SocketAddress',
3249 'inet': 'InetSocketAddress',
3250 'unix': 'UnixSocketAddress',
3251 'vsock': 'VsockSocketAddress',
3257 # Receive a file descriptor via SCM rights and assign it a name
3259 # @fdname: file descriptor name
3261 # Returns: Nothing on success
3265 # Notes: If @fdname already exists, the file descriptor assigned to
3266 # it will be closed and replaced by the received file
3268 # The 'closefd' command can be used to explicitly close the
3269 # file descriptor when it is no longer needed.
3271 { 'command': 'getfd', 'data': {'fdname': 'str'} }
3276 # Close a file descriptor previously passed via SCM rights
3278 # @fdname: file descriptor name
3280 # Returns: Nothing on success
3284 { 'command': 'closefd', 'data': {'fdname': 'str'} }
3289 # Information describing a machine.
3291 # @name: the name of the machine
3293 # @alias: #optional an alias for the machine name
3295 # @is-default: #optional whether the machine is default
3297 # @cpu-max: maximum number of CPUs supported by the machine type
3300 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
3304 { 'struct': 'MachineInfo',
3305 'data': { 'name': 'str', '*alias': 'str',
3306 '*is-default': 'bool', 'cpu-max': 'int',
3307 'hotpluggable-cpus': 'bool'} }
3312 # Return a list of supported machines
3314 # Returns: a list of MachineInfo
3318 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
3321 # @CpuDefinitionInfo:
3323 # Virtual CPU definition.
3325 # @name: the name of the CPU definition
3327 # @migration-safe: #optional whether a CPU definition can be safely used for
3328 # migration in combination with a QEMU compatibility machine
3329 # when migrating between different QMU versions and between
3330 # hosts with different sets of (hardware or software)
3331 # capabilities. If not provided, information is not available
3332 # and callers should not assume the CPU definition to be
3333 # migration-safe. (since 2.8)
3335 # @static: whether a CPU definition is static and will not change depending on
3336 # QEMU version, machine type, machine options and accelerator options.
3337 # A static model is always migration-safe. (since 2.8)
3339 # @unavailable-features: #optional List of properties that prevent
3340 # the CPU model from running in the current
3342 # @typename: Type name that can be used as argument to @device-list-properties,
3343 # to introspect properties configurable using -cpu or -global.
3346 # @unavailable-features is a list of QOM property names that
3347 # represent CPU model attributes that prevent the CPU from running.
3348 # If the QOM property is read-only, that means there's no known
3349 # way to make the CPU model run in the current host. Implementations
3350 # that choose not to provide specific information return the
3351 # property name "type".
3352 # If the property is read-write, it means that it MAY be possible
3353 # to run the CPU model in the current host if that property is
3354 # changed. Management software can use it as hints to suggest or
3355 # choose an alternative for the user, or just to generate meaningful
3356 # error messages explaining why the CPU model can't be used.
3357 # If @unavailable-features is an empty list, the CPU model is
3358 # runnable using the current host and machine-type.
3359 # If @unavailable-features is not present, runnability
3360 # information for the CPU is not available.
3364 { 'struct': 'CpuDefinitionInfo',
3365 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
3366 '*unavailable-features': [ 'str' ], 'typename': 'str' } }
3369 # @query-cpu-definitions:
3371 # Return a list of supported virtual CPU definitions
3373 # Returns: a list of CpuDefInfo
3377 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3382 # Virtual CPU model.
3384 # A CPU model consists of the name of a CPU definition, to which
3385 # delta changes are applied (e.g. features added/removed). Most magic values
3386 # that an architecture might require should be hidden behind the name.
3387 # However, if required, architectures can expose relevant properties.
3389 # @name: the name of the CPU definition the model is based on
3390 # @props: #optional a dictionary of QOM properties to be applied
3394 { 'struct': 'CpuModelInfo',
3395 'data': { 'name': 'str',
3399 # @CpuModelExpansionType:
3401 # An enumeration of CPU model expansion types.
3403 # @static: Expand to a static CPU model, a combination of a static base
3404 # model name and property delta changes. As the static base model will
3405 # never change, the expanded CPU model will be the same, independant of
3406 # independent of QEMU version, machine type, machine options, and
3407 # accelerator options. Therefore, the resulting model can be used by
3408 # tooling without having to specify a compatibility machine - e.g. when
3409 # displaying the "host" model. static CPU models are migration-safe.
3411 # @full: Expand all properties. The produced model is not guaranteed to be
3412 # migration-safe, but allows tooling to get an insight and work with
3417 { 'enum': 'CpuModelExpansionType',
3418 'data': [ 'static', 'full' ] }
3422 # @CpuModelExpansionInfo:
3424 # The result of a cpu model expansion.
3426 # @model: the expanded CpuModelInfo.
3430 { 'struct': 'CpuModelExpansionInfo',
3431 'data': { 'model': 'CpuModelInfo' } }
3435 # @query-cpu-model-expansion:
3437 # Expands a given CPU model (or a combination of CPU model + additional options)
3438 # to different granularities, allowing tooling to get an understanding what a
3439 # specific CPU model looks like in QEMU under a certain configuration.
3441 # This interface can be used to query the "host" CPU model.
3443 # The data returned by this command may be affected by:
3445 # * QEMU version: CPU models may look different depending on the QEMU version.
3446 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3447 # * machine-type: CPU model may look different depending on the machine-type.
3448 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3449 # * machine options (including accelerator): in some architectures, CPU models
3450 # may look different depending on machine and accelerator options. (Except for
3451 # CPU models reported as "static" in query-cpu-definitions.)
3452 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3453 # global properties may affect expansion of CPU models. Using
3454 # query-cpu-model-expansion while using these is not advised.
3456 # Some architectures may not support all expansion types. s390x supports
3457 # "full" and "static".
3459 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
3460 # not supported, if the model cannot be expanded, if the model contains
3461 # an unknown CPU definition name, unknown properties or properties
3462 # with a wrong type. Also returns an error if an expansion type is
3467 { 'command': 'query-cpu-model-expansion',
3468 'data': { 'type': 'CpuModelExpansionType',
3469 'model': 'CpuModelInfo' },
3470 'returns': 'CpuModelExpansionInfo' }
3473 # @CpuModelCompareResult:
3475 # An enumeration of CPU model comparation results. The result is usually
3476 # calculated using e.g. CPU features or CPU generations.
3478 # @incompatible: If model A is incompatible to model B, model A is not
3479 # guaranteed to run where model B runs and the other way around.
3481 # @identical: If model A is identical to model B, model A is guaranteed to run
3482 # where model B runs and the other way around.
3484 # @superset: If model A is a superset of model B, model B is guaranteed to run
3485 # where model A runs. There are no guarantees about the other way.
3487 # @subset: If model A is a subset of model B, model A is guaranteed to run
3488 # where model B runs. There are no guarantees about the other way.
3492 { 'enum': 'CpuModelCompareResult',
3493 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
3496 # @CpuModelCompareInfo:
3498 # The result of a CPU model comparison.
3500 # @result: The result of the compare operation.
3501 # @responsible-properties: List of properties that led to the comparison result
3502 # not being identical.
3504 # @responsible-properties is a list of QOM property names that led to
3505 # both CPUs not being detected as identical. For identical models, this
3507 # If a QOM property is read-only, that means there's no known way to make the
3508 # CPU models identical. If the special property name "type" is included, the
3509 # models are by definition not identical and cannot be made identical.
3513 { 'struct': 'CpuModelCompareInfo',
3514 'data': {'result': 'CpuModelCompareResult',
3515 'responsible-properties': ['str']
3520 # @query-cpu-model-comparison:
3522 # Compares two CPU models, returning how they compare in a specific
3523 # configuration. The results indicates how both models compare regarding
3524 # runnability. This result can be used by tooling to make decisions if a
3525 # certain CPU model will run in a certain configuration or if a compatible
3526 # CPU model has to be created by baselining.
3528 # Usually, a CPU model is compared against the maximum possible CPU model
3529 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
3530 # model is identical or a subset, it will run in that configuration.
3532 # The result returned by this command may be affected by:
3534 # * QEMU version: CPU models may look different depending on the QEMU version.
3535 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3536 # * machine-type: CPU model may look different depending on the machine-type.
3537 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3538 # * machine options (including accelerator): in some architectures, CPU models
3539 # may look different depending on machine and accelerator options. (Except for
3540 # CPU models reported as "static" in query-cpu-definitions.)
3541 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3542 # global properties may affect expansion of CPU models. Using
3543 # query-cpu-model-expansion while using these is not advised.
3545 # Some architectures may not support comparing CPU models. s390x supports
3546 # comparing CPU models.
3548 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
3549 # not supported, if a model cannot be used, if a model contains
3550 # an unknown cpu definition name, unknown properties or properties
3555 { 'command': 'query-cpu-model-comparison',
3556 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
3557 'returns': 'CpuModelCompareInfo' }
3560 # @CpuModelBaselineInfo:
3562 # The result of a CPU model baseline.
3564 # @model: the baselined CpuModelInfo.
3568 { 'struct': 'CpuModelBaselineInfo',
3569 'data': { 'model': 'CpuModelInfo' } }
3572 # @query-cpu-model-baseline:
3574 # Baseline two CPU models, creating a compatible third model. The created
3575 # model will always be a static, migration-safe CPU model (see "static"
3576 # CPU model expansion for details).
3578 # This interface can be used by tooling to create a compatible CPU model out
3579 # two CPU models. The created CPU model will be identical to or a subset of
3580 # both CPU models when comparing them. Therefore, the created CPU model is
3581 # guaranteed to run where the given CPU models run.
3583 # The result returned by this command may be affected by:
3585 # * QEMU version: CPU models may look different depending on the QEMU version.
3586 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3587 # * machine-type: CPU model may look different depending on the machine-type.
3588 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3589 # * machine options (including accelerator): in some architectures, CPU models
3590 # may look different depending on machine and accelerator options. (Except for
3591 # CPU models reported as "static" in query-cpu-definitions.)
3592 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3593 # global properties may affect expansion of CPU models. Using
3594 # query-cpu-model-expansion while using these is not advised.
3596 # Some architectures may not support baselining CPU models. s390x supports
3597 # baselining CPU models.
3599 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
3600 # not supported, if a model cannot be used, if a model contains
3601 # an unknown cpu definition name, unknown properties or properties
3606 { 'command': 'query-cpu-model-baseline',
3607 'data': { 'modela': 'CpuModelInfo',
3608 'modelb': 'CpuModelInfo' },
3609 'returns': 'CpuModelBaselineInfo' }
3614 # Information about a file descriptor that was added to an fd set.
3616 # @fdset-id: The ID of the fd set that @fd was added to.
3618 # @fd: The file descriptor that was received via SCM rights and
3619 # added to the fd set.
3623 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3628 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3630 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3632 # @opaque: #optional A free-form string that can be used to describe the fd.
3634 # Returns: @AddfdInfo on success
3635 # If file descriptor was not received, FdNotSupplied
3636 # If @fdset-id is a negative value, InvalidParameterValue
3638 # Notes: The list of fd sets is shared by all monitor connections.
3640 # If @fdset-id is not specified, a new fd set will be created.
3644 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3645 'returns': 'AddfdInfo' }
3650 # Remove a file descriptor from an fd set.
3652 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3654 # @fd: #optional The file descriptor that is to be removed.
3656 # Returns: Nothing on success
3657 # If @fdset-id or @fd is not found, FdNotFound
3661 # Notes: The list of fd sets is shared by all monitor connections.
3663 # If @fd is not specified, all file descriptors in @fdset-id
3666 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3671 # Information about a file descriptor that belongs to an fd set.
3673 # @fd: The file descriptor value.
3675 # @opaque: #optional A free-form string that can be used to describe the fd.
3679 { 'struct': 'FdsetFdInfo',
3680 'data': {'fd': 'int', '*opaque': 'str'} }
3685 # Information about an fd set.
3687 # @fdset-id: The ID of the fd set.
3689 # @fds: A list of file descriptors that belong to this fd set.
3693 { 'struct': 'FdsetInfo',
3694 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3699 # Return information describing all fd sets.
3701 # Returns: A list of @FdsetInfo
3705 # Note: The list of fd sets is shared by all monitor connections.
3708 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3713 # Information describing the QEMU target.
3715 # @arch: the target architecture (eg "x86_64", "i386", etc)
3719 { 'struct': 'TargetInfo',
3720 'data': { 'arch': 'str' } }
3725 # Return information about the target for this QEMU
3727 # Returns: TargetInfo
3731 { 'command': 'query-target', 'returns': 'TargetInfo' }
3736 # An enumeration of key name.
3738 # This is used by the @send-key command.
3740 # @unmapped: since 2.0
3743 # @kp_comma: since 2.4
3744 # @kp_equals: since 2.6
3746 # @hiragana: since 2.9
3747 # @henkan: since 2.9
3753 { 'enum': 'QKeyCode',
3754 'data': [ 'unmapped',
3755 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3756 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3757 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3758 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3759 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3760 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3761 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3762 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3763 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3764 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3765 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3766 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3767 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3768 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3769 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
3770 'ro', 'hiragana', 'henkan', 'yen',
3771 'kp_comma', 'kp_equals', 'power' ] }
3776 # Represents a keyboard key.
3780 { 'union': 'KeyValue',
3783 'qcode': 'QKeyCode' } }
3788 # Send keys to guest.
3790 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3791 # simultaneously sent to the guest. A @KeyValue.number value is sent
3792 # directly to the guest, while @KeyValue.qcode must be a valid
3795 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3798 # Returns: Nothing on success
3799 # If key is unknown or redundant, InvalidParameter
3804 { 'command': 'send-key',
3805 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3810 # Write a PPM of the VGA screen to a file.
3812 # @filename: the path of a new PPM file to store the image
3814 # Returns: Nothing on success
3818 { 'command': 'screendump', 'data': {'filename': 'str'} }
3824 # Configuration shared across all chardev backends
3826 # @logfile: #optional The name of a logfile to save output
3827 # @logappend: #optional true to append instead of truncate
3828 # (default to false to truncate)
3832 { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
3833 '*logappend': 'bool' } }
3838 # Configuration info for file chardevs.
3840 # @in: #optional The name of the input file
3841 # @out: The name of the output file
3842 # @append: #optional Open the file in append mode (default false to
3843 # truncate) (Since 2.6)
3847 { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
3849 '*append': 'bool' },
3850 'base': 'ChardevCommon' }
3855 # Configuration info for device and pipe chardevs.
3857 # @device: The name of the special file for the device,
3858 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
3862 { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
3863 'base': 'ChardevCommon' }
3868 # Configuration info for (stream) socket chardevs.
3870 # @addr: socket address to listen on (server=true)
3871 # or connect to (server=false)
3872 # @tls-creds: #optional the ID of the TLS credentials object (since 2.6)
3873 # @server: #optional create server socket (default: true)
3874 # @wait: #optional wait for incoming connection on server
3875 # sockets (default: false).
3876 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3877 # @telnet: #optional enable telnet protocol on server
3878 # sockets (default: false)
3879 # @reconnect: #optional For a client socket, if a socket is disconnected,
3880 # then attempt a reconnect after the given number of seconds.
3881 # Setting this to zero disables this function. (default: 0)
3886 { 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3887 '*tls-creds' : 'str',
3890 '*nodelay' : 'bool',
3892 '*reconnect' : 'int' },
3893 'base': 'ChardevCommon' }
3898 # Configuration info for datagram socket chardevs.
3900 # @remote: remote address
3901 # @local: #optional local address
3905 { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3906 '*local' : 'SocketAddress' },
3907 'base': 'ChardevCommon' }
3912 # Configuration info for mux chardevs.
3914 # @chardev: name of the base chardev.
3918 { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
3919 'base': 'ChardevCommon' }
3924 # Configuration info for stdio chardevs.
3926 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3927 # be delivered to qemu. Default: true in -nographic mode,
3932 { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
3933 'base': 'ChardevCommon' }
3937 # @ChardevSpiceChannel:
3939 # Configuration info for spice vm channel chardevs.
3941 # @type: kind of channel (for example vdagent).
3945 { 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' },
3946 'base': 'ChardevCommon' }
3949 # @ChardevSpicePort:
3951 # Configuration info for spice port chardevs.
3953 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3957 { 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' },
3958 'base': 'ChardevCommon' }
3963 # Configuration info for virtual console chardevs.
3965 # @width: console width, in pixels
3966 # @height: console height, in pixels
3967 # @cols: console width, in chars
3968 # @rows: console height, in chars
3972 { 'struct': 'ChardevVC', 'data': { '*width' : 'int',
3976 'base': 'ChardevCommon' }
3981 # Configuration info for ring buffer chardevs.
3983 # @size: #optional ring buffer size, must be power of two, default is 65536
3987 { 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' },
3988 'base': 'ChardevCommon' }
3993 # Configuration info for the new chardev backend.
3995 # Since: 1.4 (testdev since 2.2)
3997 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
3998 'serial' : 'ChardevHostdev',
3999 'parallel': 'ChardevHostdev',
4000 'pipe' : 'ChardevHostdev',
4001 'socket' : 'ChardevSocket',
4002 'udp' : 'ChardevUdp',
4003 'pty' : 'ChardevCommon',
4004 'null' : 'ChardevCommon',
4005 'mux' : 'ChardevMux',
4006 'msmouse': 'ChardevCommon',
4007 'braille': 'ChardevCommon',
4008 'testdev': 'ChardevCommon',
4009 'stdio' : 'ChardevStdio',
4010 'console': 'ChardevCommon',
4011 'spicevmc' : 'ChardevSpiceChannel',
4012 'spiceport' : 'ChardevSpicePort',
4014 'ringbuf': 'ChardevRingbuf',
4015 # next one is just for compatibility
4016 'memory' : 'ChardevRingbuf' } }
4021 # Return info about the chardev backend just created.
4023 # @pty: #optional name of the slave pseudoterminal device, present if
4024 # and only if a chardev of type 'pty' was created
4028 { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
4033 # Add a character device backend
4035 # @id: the chardev's ID, must be unique
4036 # @backend: backend type and parameters
4038 # Returns: ChardevReturn.
4042 { 'command': 'chardev-add', 'data': {'id' : 'str',
4043 'backend' : 'ChardevBackend' },
4044 'returns': 'ChardevReturn' }
4049 # Remove a character device backend
4051 # @id: the chardev's ID, must exist and not be in use
4053 # Returns: Nothing on success
4057 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
4062 # An enumeration of TPM models
4064 # @tpm-tis: TPM TIS model
4068 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
4071 # @query-tpm-models:
4073 # Return a list of supported TPM models
4075 # Returns: a list of TpmModel
4079 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
4084 # An enumeration of TPM types
4086 # @passthrough: TPM passthrough type
4090 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
4095 # Return a list of supported TPM types
4097 # Returns: a list of TpmType
4101 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
4104 # @TPMPassthroughOptions:
4106 # Information about the TPM passthrough type
4108 # @path: #optional string describing the path used for accessing the TPM device
4110 # @cancel-path: #optional string showing the TPM's sysfs cancel file
4111 # for cancellation of TPM commands while they are executing
4115 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
4116 '*cancel-path' : 'str'} }
4121 # A union referencing different TPM backend types' configuration options
4123 # @type: 'passthrough' The configuration options for the TPM passthrough type
4127 { 'union': 'TpmTypeOptions',
4128 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
4133 # Information about the TPM
4135 # @id: The Id of the TPM
4137 # @model: The TPM frontend model
4139 # @options: The TPM (backend) type configuration options
4143 { 'struct': 'TPMInfo',
4144 'data': {'id': 'str',
4145 'model': 'TpmModel',
4146 'options': 'TpmTypeOptions' } }
4151 # Return information about the TPM device
4153 # Returns: @TPMInfo on success
4157 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
4160 # @AcpiTableOptions:
4162 # Specify an ACPI table on the command line to load.
4164 # At most one of @file and @data can be specified. The list of files specified
4165 # by any one of them is loaded and concatenated in order. If both are omitted,
4168 # Other fields / optargs can be used to override fields of the generic ACPI
4169 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
4170 # Description Table Header. If a header field is not overridden, then the
4171 # corresponding value from the concatenated blob is used (in case of @file), or
4172 # it is filled in with a hard-coded value (in case of @data).
4174 # String fields are copied into the matching ACPI member from lowest address
4175 # upwards, and silently truncated / NUL-padded to length.
4177 # @sig: #optional table signature / identifier (4 bytes)
4179 # @rev: #optional table revision number (dependent on signature, 1 byte)
4181 # @oem_id: #optional OEM identifier (6 bytes)
4183 # @oem_table_id: #optional OEM table identifier (8 bytes)
4185 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
4187 # @asl_compiler_id: #optional identifier of the utility that created the table
4190 # @asl_compiler_rev: #optional revision number of the utility that created the
4193 # @file: #optional colon (:) separated list of pathnames to load and
4194 # concatenate as table data. The resultant binary blob is expected to
4195 # have an ACPI table header. At least one file is required. This field
4198 # @data: #optional colon (:) separated list of pathnames to load and
4199 # concatenate as table data. The resultant binary blob must not have an
4200 # ACPI table header. At least one file is required. This field excludes
4205 { 'struct': 'AcpiTableOptions',
4210 '*oem_table_id': 'str',
4211 '*oem_rev': 'uint32',
4212 '*asl_compiler_id': 'str',
4213 '*asl_compiler_rev': 'uint32',
4218 # @CommandLineParameterType:
4220 # Possible types for an option parameter.
4222 # @string: accepts a character string
4224 # @boolean: accepts "on" or "off"
4226 # @number: accepts a number
4228 # @size: accepts a number followed by an optional suffix (K)ilo,
4229 # (M)ega, (G)iga, (T)era
4233 { 'enum': 'CommandLineParameterType',
4234 'data': ['string', 'boolean', 'number', 'size'] }
4237 # @CommandLineParameterInfo:
4239 # Details about a single parameter of a command line option.
4241 # @name: parameter name
4243 # @type: parameter @CommandLineParameterType
4245 # @help: #optional human readable text string, not suitable for parsing.
4247 # @default: #optional default value string (since 2.1)
4251 { 'struct': 'CommandLineParameterInfo',
4252 'data': { 'name': 'str',
4253 'type': 'CommandLineParameterType',
4255 '*default': 'str' } }
4258 # @CommandLineOptionInfo:
4260 # Details about a command line option, including its list of parameter details
4262 # @option: option name
4264 # @parameters: an array of @CommandLineParameterInfo
4268 { 'struct': 'CommandLineOptionInfo',
4269 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
4272 # @query-command-line-options:
4274 # Query command line option schema.
4276 # @option: #optional option name
4278 # Returns: list of @CommandLineOptionInfo for all options (or for the given
4279 # @option). Returns an error if the given @option doesn't exist.
4283 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
4284 'returns': ['CommandLineOptionInfo'] }
4287 # @X86CPURegister32:
4289 # A X86 32-bit register
4293 { 'enum': 'X86CPURegister32',
4294 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4297 # @X86CPUFeatureWordInfo:
4299 # Information about a X86 CPU feature word
4301 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4303 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
4306 # @cpuid-register: Output register containing the feature bits
4308 # @features: value of output register, containing the feature bits
4312 { 'struct': 'X86CPUFeatureWordInfo',
4313 'data': { 'cpuid-input-eax': 'int',
4314 '*cpuid-input-ecx': 'int',
4315 'cpuid-register': 'X86CPURegister32',
4316 'features': 'int' } }
4319 # @DummyForceArrays:
4321 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
4325 { 'struct': 'DummyForceArrays',
4326 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
4332 # Packets receiving state
4334 # @normal: filter assigned packets according to the mac-table
4336 # @none: don't receive any assigned packet
4338 # @all: receive all assigned packets
4342 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
4347 # Rx-filter information for a NIC.
4349 # @name: net client name
4351 # @promiscuous: whether promiscuous mode is enabled
4353 # @multicast: multicast receive state
4355 # @unicast: unicast receive state
4357 # @vlan: vlan receive state (Since 2.0)
4359 # @broadcast-allowed: whether to receive broadcast
4361 # @multicast-overflow: multicast table is overflowed or not
4363 # @unicast-overflow: unicast table is overflowed or not
4365 # @main-mac: the main macaddr string
4367 # @vlan-table: a list of active vlan id
4369 # @unicast-table: a list of unicast macaddr string
4371 # @multicast-table: a list of multicast macaddr string
4375 { 'struct': 'RxFilterInfo',
4378 'promiscuous': 'bool',
4379 'multicast': 'RxState',
4380 'unicast': 'RxState',
4382 'broadcast-allowed': 'bool',
4383 'multicast-overflow': 'bool',
4384 'unicast-overflow': 'bool',
4386 'vlan-table': ['int'],
4387 'unicast-table': ['str'],
4388 'multicast-table': ['str'] }}
4393 # Return rx-filter information for all NICs (or for the given NIC).
4395 # @name: #optional net client name
4397 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4398 # Returns an error if the given @name doesn't exist, or given
4399 # NIC doesn't support rx-filter querying, or given net client
4404 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4405 'returns': ['RxFilterInfo'] }
4410 # Button of a pointer input device (mouse, tablet).
4414 { 'enum' : 'InputButton',
4415 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down' ] }
4420 # Position axis of a pointer input device (mouse, tablet).
4424 { 'enum' : 'InputAxis',
4425 'data' : [ 'x', 'y' ] }
4430 # Keyboard input event.
4432 # @key: Which key this event is for.
4433 # @down: True for key-down and false for key-up events.
4437 { 'struct' : 'InputKeyEvent',
4438 'data' : { 'key' : 'KeyValue',
4444 # Pointer button input event.
4446 # @button: Which button this event is for.
4447 # @down: True for key-down and false for key-up events.
4451 { 'struct' : 'InputBtnEvent',
4452 'data' : { 'button' : 'InputButton',
4458 # Pointer motion input event.
4460 # @axis: Which axis is referenced by @value.
4461 # @value: Pointer position. For absolute coordinates the
4462 # valid range is 0 -> 0x7ffff
4466 { 'struct' : 'InputMoveEvent',
4467 'data' : { 'axis' : 'InputAxis',
4473 # Input event union.
4475 # @type: the input type, one of:
4476 # - 'key': Input event of Keyboard
4477 # - 'btn': Input event of pointer buttons
4478 # - 'rel': Input event of relative pointer motion
4479 # - 'abs': Input event of absolute pointer motion
4483 { 'union' : 'InputEvent',
4484 'data' : { 'key' : 'InputKeyEvent',
4485 'btn' : 'InputBtnEvent',
4486 'rel' : 'InputMoveEvent',
4487 'abs' : 'InputMoveEvent' } }
4490 # @input-send-event:
4492 # Send input event(s) to guest.
4494 # @device: #optional display device to send event(s) to.
4495 # @head: #optional head to send event(s) to, in case the
4496 # display device supports multiple scanouts.
4497 # @events: List of InputEvent union.
4499 # Returns: Nothing on success.
4501 # The @display and @head parameters can be used to send the input
4502 # event to specific input devices in case (a) multiple input devices
4503 # of the same kind are added to the virtual machine and (b) you have
4504 # configured input routing (see docs/multiseat.txt) for those input
4505 # devices. The parameters work exactly like the device and head
4506 # properties of input devices. If @device is missing, only devices
4507 # that have no input routing config are admissible. If @device is
4508 # specified, both input devices with and without input routing config
4509 # are admissible, but devices with input routing config take
4514 { 'command': 'input-send-event',
4515 'data': { '*device': 'str',
4517 'events' : [ 'InputEvent' ] } }
4522 # A discriminated record of NUMA options. (for OptsVisitor)
4526 { 'union': 'NumaOptions',
4528 'node': 'NumaNodeOptions' }}
4533 # Create a guest NUMA node. (for OptsVisitor)
4535 # @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
4537 # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
4540 # @mem: #optional memory size of this node; mutually exclusive with @memdev.
4541 # Equally divide total memory among nodes if both @mem and @memdev are
4544 # @memdev: #optional memory backend object. If specified for one node,
4545 # it must be specified for all nodes.
4549 { 'struct': 'NumaNodeOptions',
4551 '*nodeid': 'uint16',
4552 '*cpus': ['uint16'],
4559 # Host memory policy types
4561 # @default: restore default policy, remove any nondefault policy
4563 # @preferred: set the preferred host nodes for allocation
4565 # @bind: a strict policy that restricts memory allocation to the
4566 # host nodes specified
4568 # @interleave: memory allocations are interleaved across the set
4569 # of host nodes specified
4573 { 'enum': 'HostMemPolicy',
4574 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
4579 # Information about memory backend
4581 # @id: #optional backend's ID if backend has 'id' property (since 2.9)
4583 # @size: memory backend size
4585 # @merge: enables or disables memory merge support
4587 # @dump: includes memory backend's memory in a core dump or not
4589 # @prealloc: enables or disables memory preallocation
4591 # @host-nodes: host nodes for its memory policy
4593 # @policy: memory policy of memory backend
4597 { 'struct': 'Memdev',
4604 'host-nodes': ['uint16'],
4605 'policy': 'HostMemPolicy' }}
4610 # Returns information for all memory backends.
4612 # Returns: a list of @Memdev.
4616 { 'command': 'query-memdev', 'returns': ['Memdev'] }
4619 # @PCDIMMDeviceInfo:
4621 # PCDIMMDevice state information
4623 # @id: #optional device's ID
4625 # @addr: physical address, where device is mapped
4627 # @size: size of memory that the device provides
4629 # @slot: slot number at which device is plugged in
4631 # @node: NUMA node number where device is plugged in
4633 # @memdev: memory backend linked with device
4635 # @hotplugged: true if device was hotplugged
4637 # @hotpluggable: true if device if could be added/removed while machine is running
4641 { 'struct': 'PCDIMMDeviceInfo',
4642 'data': { '*id': 'str',
4648 'hotplugged': 'bool',
4649 'hotpluggable': 'bool'
4654 # @MemoryDeviceInfo:
4656 # Union containing information about a memory device
4660 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
4663 # @query-memory-devices:
4665 # Lists available memory devices and their state
4669 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
4674 # @DIMM: memory slot
4675 # @CPU: logical CPU slot (since 2.7)
4677 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
4682 # OSPM Status Indication for a device
4683 # For description of possible values of @source and @status fields
4684 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
4686 # @device: #optional device ID associated with slot
4688 # @slot: slot ID, unique per slot of a given @slot-type
4690 # @slot-type: type of the slot
4692 # @source: an integer containing the source event
4694 # @status: an integer containing the status code
4698 { 'struct': 'ACPIOSTInfo',
4699 'data' : { '*device': 'str',
4701 'slot-type': 'ACPISlotType',
4706 # @query-acpi-ospm-status:
4708 # Lists ACPI OSPM status of ACPI device objects,
4709 # which might be reported via _OST method
4713 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
4716 # @WatchdogExpirationAction:
4718 # An enumeration of the actions taken when the watchdog device's timer is
4721 # @reset: system resets
4723 # @shutdown: system shutdown, note that it is similar to @powerdown, which
4724 # tries to set to system status and notify guest
4726 # @poweroff: system poweroff, the emulator program exits
4728 # @pause: system pauses, similar to @stop
4730 # @debug: system enters debug state
4732 # @none: nothing is done
4734 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
4735 # VCPUS on x86) (since 2.4)
4739 { 'enum': 'WatchdogExpirationAction',
4740 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
4746 # An enumeration of the I/O operation types
4748 # @read: read operation
4750 # @write: write operation
4754 { 'enum': 'IoOperationType',
4755 'data': [ 'read', 'write' ] }
4758 # @GuestPanicAction:
4760 # An enumeration of the actions taken when guest OS panic is detected
4762 # @pause: system pauses
4764 # Since: 2.1 (poweroff since 2.8)
4766 { 'enum': 'GuestPanicAction',
4767 'data': [ 'pause', 'poweroff' ] }
4770 # @rtc-reset-reinjection:
4772 # This command will reset the RTC interrupt reinjection backlog.
4773 # Can be used if another mechanism to synchronize guest time
4774 # is in effect, for example QEMU guest agent's guest-set-time
4779 { 'command': 'rtc-reset-reinjection' }
4781 # Rocker ethernet network switch
4782 { 'include': 'qapi/rocker.json' }
4787 # Mode of the replay subsystem.
4789 # @none: normal execution mode. Replay or record are not enabled.
4791 # @record: record mode. All non-deterministic data is written into the
4794 # @play: replay mode. Non-deterministic data required for system execution
4795 # is read from the log.
4799 { 'enum': 'ReplayMode',
4800 'data': [ 'none', 'record', 'play' ] }
4803 # @xen-load-devices-state:
4805 # Load the state of all devices from file. The RAM and the block devices
4806 # of the VM are not loaded by this command.
4808 # @filename: the file to load the state of the devices from as binary
4809 # data. See xen-save-devices-state.txt for a description of the binary
4814 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
4819 # The struct describes capability for a specific GIC (Generic
4820 # Interrupt Controller) version. These bits are not only decided by
4821 # QEMU/KVM software version, but also decided by the hardware that
4822 # the program is running upon.
4824 # @version: version of GIC to be described. Currently, only 2 and 3
4827 # @emulated: whether current QEMU/hardware supports emulated GIC
4828 # device in user space.
4830 # @kernel: whether current QEMU/hardware supports hardware
4831 # accelerated GIC device in kernel.
4835 { 'struct': 'GICCapability',
4836 'data': { 'version': 'int',
4838 'kernel': 'bool' } }
4841 # @query-gic-capabilities:
4843 # This command is ARM-only. It will return a list of GICCapability
4844 # objects that describe its capability bits.
4846 # Returns: a list of GICCapability objects.
4850 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
4853 # @CpuInstanceProperties:
4855 # List of properties to be used for hotplugging a CPU instance,
4856 # it should be passed by management with device_add command when
4857 # a CPU is being hotplugged.
4859 # @node-id: #optional NUMA node ID the CPU belongs to
4860 # @socket-id: #optional socket number within node/board the CPU belongs to
4861 # @core-id: #optional core number within socket the CPU belongs to
4862 # @thread-id: #optional thread number within core the CPU belongs to
4864 # Note: currently there are 4 properties that could be present
4865 # but management should be prepared to pass through other
4866 # properties with device_add command to allow for future
4867 # interface extension. This also requires the filed names to be kept in
4868 # sync with the properties passed to -device/device_add.
4872 { 'struct': 'CpuInstanceProperties',
4873 'data': { '*node-id': 'int',
4874 '*socket-id': 'int',
4883 # @type: CPU object type for usage with device_add command
4884 # @props: list of properties to be used for hotplugging CPU
4885 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
4886 # @qom-path: #optional link to existing CPU object if CPU is present or
4887 # omitted if CPU is not present.
4891 { 'struct': 'HotpluggableCPU',
4892 'data': { 'type': 'str',
4893 'vcpus-count': 'int',
4894 'props': 'CpuInstanceProperties',
4900 # @query-hotpluggable-cpus:
4902 # Returns: a list of HotpluggableCPU objects.
4906 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }