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
414 { 'command': 'ringbuf-write',
415 'data': {'device': 'str', 'data': 'str',
416 '*format': 'DataFormat'} }
421 # Read from a ring buffer character device.
423 # @device: the ring buffer character device name
425 # @size: how many bytes to read at most
427 # @format: #optional data encoding (default 'utf8').
428 # - base64: the data read is returned in base64 encoding.
429 # - utf8: the data read is interpreted as UTF-8.
430 # Bug: can screw up when the buffer contains invalid UTF-8
431 # sequences, NUL characters, after the ring buffer lost
432 # data, and when reading stops because the size limit is
434 # - The return value is always Unicode regardless of format,
435 # like any other string.
437 # Returns: data read from the device
441 { 'command': 'ringbuf-read',
442 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
448 # Information about a QMP event
450 # @name: The event name
454 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
459 # Return a list of supported QMP events by this server
461 # Returns: A list of @EventInfo for all supported events
465 { 'command': 'query-events', 'returns': ['EventInfo'] }
470 # Detailed migration status.
472 # @transferred: amount of bytes already transferred to the target VM
474 # @remaining: amount of bytes remaining to be transferred to the target VM
476 # @total: total amount of bytes involved in the migration process
478 # @duplicate: number of duplicate (zero) pages (since 1.2)
480 # @skipped: number of skipped zero pages (since 1.5)
482 # @normal: number of normal pages (since 1.2)
484 # @normal-bytes: number of normal bytes sent (since 1.2)
486 # @dirty-pages-rate: number of pages dirtied by second by the
489 # @mbps: throughput in megabits/sec. (since 1.6)
491 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
493 # @postcopy-requests: The number of page requests received from the destination
498 { 'struct': 'MigrationStats',
499 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
500 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
501 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
502 'mbps' : 'number', 'dirty-sync-count' : 'int',
503 'postcopy-requests' : 'int' } }
508 # Detailed XBZRLE migration cache statistics
510 # @cache-size: XBZRLE cache size
512 # @bytes: amount of bytes already transferred to the target VM
514 # @pages: amount of pages transferred to the target VM
516 # @cache-miss: number of cache miss
518 # @cache-miss-rate: rate of cache miss (since 2.1)
520 # @overflow: number of overflows
524 { 'struct': 'XBZRLECacheStats',
525 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
526 'cache-miss': 'int', 'cache-miss-rate': 'number',
527 'overflow': 'int' } }
532 # An enumeration of migration status.
534 # @none: no migration has ever happened.
536 # @setup: migration process has been initiated.
538 # @cancelling: in the process of cancelling migration.
540 # @cancelled: cancelling migration is finished.
542 # @active: in the process of doing migration.
544 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
546 # @completed: migration is finished.
548 # @failed: some error occurred during migration process.
550 # @colo: VM is in the process of fault tolerance, VM can not get into this
551 # state unless colo capability is enabled for migration. (since 2.8)
556 { 'enum': 'MigrationStatus',
557 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
558 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
563 # Information about current migration process.
565 # @status: #optional @MigrationStatus describing the current migration status.
566 # If this field is not returned, no migration process
569 # @ram: #optional @MigrationStats containing detailed migration
570 # status, only returned if status is 'active' or
571 # 'completed'(since 1.2)
573 # @disk: #optional @MigrationStats containing detailed disk migration
574 # status, only returned if status is 'active' and it is a block
577 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
578 # migration statistics, only returned if XBZRLE feature is on and
579 # status is 'active' or 'completed' (since 1.2)
581 # @total-time: #optional total amount of milliseconds since migration started.
582 # If migration has ended, it returns the total migration
585 # @downtime: #optional only present when migration finishes correctly
586 # total downtime in milliseconds for the guest.
589 # @expected-downtime: #optional only present while migration is active
590 # expected downtime in milliseconds for the guest in last walk
591 # of the dirty bitmap. (since 1.3)
593 # @setup-time: #optional amount of setup time in milliseconds _before_ the
594 # iterations begin but _after_ the QMP command is issued. This is designed
595 # to provide an accounting of any activities (such as RDMA pinning) which
596 # may be expensive, but do not actually occur during the iterative
597 # migration rounds themselves. (since 1.6)
599 # @cpu-throttle-percentage: #optional percentage of time guest cpus are being
600 # throttled during auto-converge. This is only present when auto-converge
601 # has started throttling guest cpus. (Since 2.7)
603 # @error-desc: #optional the human readable error description string, when
604 # @status is 'failed'. Clients should not attempt to parse the
605 # error strings. (Since 2.7)
609 { 'struct': 'MigrationInfo',
610 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
611 '*disk': 'MigrationStats',
612 '*xbzrle-cache': 'XBZRLECacheStats',
613 '*total-time': 'int',
614 '*expected-downtime': 'int',
616 '*setup-time': 'int',
617 '*cpu-throttle-percentage': 'int',
618 '*error-desc': 'str'} }
623 # Returns information about current migration process.
625 # Returns: @MigrationInfo
629 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
632 # @MigrationCapability:
634 # Migration capabilities enumeration
636 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
637 # This feature allows us to minimize migration traffic for certain work
638 # loads, by sending compressed difference of the pages
640 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
641 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
642 # Disabled by default. (since 2.0)
644 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
645 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
646 # source and target VM to support this feature. To enable it is sufficient
647 # to enable the capability on the source VM. The feature is disabled by
648 # default. (since 1.6)
650 # @compress: Use multiple compression threads to accelerate live migration.
651 # This feature can help to reduce the migration traffic, by sending
652 # compressed pages. Please note that if compress and xbzrle are both
653 # on, compress only takes effect in the ram bulk stage, after that,
654 # it will be disabled and only xbzrle takes effect, this can help to
655 # minimize migration traffic. The feature is disabled by default.
658 # @events: generate events for each migration state change
661 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
662 # to speed up convergence of RAM migration. (since 1.6)
664 # @postcopy-ram: Start executing on the migration target before all of RAM has
665 # been migrated, pulling the remaining pages along as needed. NOTE: If
666 # the migration fails during postcopy the VM will fail. (since 2.6)
668 # @x-colo: If enabled, migration will never end, and the state of the VM on the
669 # primary side will be migrated continuously to the VM on secondary
670 # side, this process is called COarse-Grain LOck Stepping (COLO) for
671 # Non-stop Service. (since 2.8)
675 { 'enum': 'MigrationCapability',
676 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
677 'compress', 'events', 'postcopy-ram', 'x-colo'] }
680 # @MigrationCapabilityStatus:
682 # Migration capability information
684 # @capability: capability enum
686 # @state: capability state bool
690 { 'struct': 'MigrationCapabilityStatus',
691 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
694 # @migrate-set-capabilities:
696 # Enable/Disable the following migration capabilities (like xbzrle)
698 # @capabilities: json array of capability modifications to make
702 { 'command': 'migrate-set-capabilities',
703 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
706 # @query-migrate-capabilities:
708 # Returns information about the current migration capabilities status
710 # Returns: @MigrationCapabilitiesStatus
714 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
717 # @MigrationParameter:
719 # Migration parameters enumeration
721 # @compress-level: Set the compression level to be used in live migration,
722 # the compression level is an integer between 0 and 9, where 0 means
723 # no compression, 1 means the best compression speed, and 9 means best
724 # compression ratio which will consume more CPU.
726 # @compress-threads: Set compression thread count to be used in live migration,
727 # the compression thread count is an integer between 1 and 255.
729 # @decompress-threads: Set decompression thread count to be used in live
730 # migration, the decompression thread count is an integer between 1
731 # and 255. Usually, decompression is at least 4 times as fast as
732 # compression, so set the decompress-threads to the number about 1/4
733 # of compress-threads is adequate.
735 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
736 # when migration auto-converge is activated. The
737 # default value is 20. (Since 2.7)
739 # @cpu-throttle-increment: throttle percentage increase each time
740 # auto-converge detects that migration is not making
741 # progress. The default value is 10. (Since 2.7)
743 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
744 # establishing a TLS connection over the migration data channel.
745 # On the outgoing side of the migration, the credentials must
746 # be for a 'client' endpoint, while for the incoming side the
747 # credentials must be for a 'server' endpoint. Setting this
748 # will enable TLS for all migrations. The default is unset,
749 # resulting in unsecured migration at the QEMU level. (Since 2.7)
751 # @tls-hostname: hostname of the target host for the migration. This is
752 # required when using x509 based TLS credentials and the
753 # migration URI does not already include a hostname. For
754 # example if using fd: or exec: based migration, the
755 # hostname must be provided so that the server's x509
756 # certificate identity can be validated. (Since 2.7)
758 # @max-bandwidth: to set maximum speed for migration. maximum speed in
759 # bytes per second. (Since 2.8)
761 # @downtime-limit: set maximum tolerated downtime for migration. maximum
762 # downtime in milliseconds (Since 2.8)
764 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
765 # periodic mode. (Since 2.8)
769 { 'enum': 'MigrationParameter',
770 'data': ['compress-level', 'compress-threads', 'decompress-threads',
771 'cpu-throttle-initial', 'cpu-throttle-increment',
772 'tls-creds', 'tls-hostname', 'max-bandwidth',
773 'downtime-limit', 'x-checkpoint-delay' ] }
776 # @migrate-set-parameters:
778 # Set various migration parameters. See MigrationParameters for details.
782 { 'command': 'migrate-set-parameters', 'boxed': true,
783 'data': 'MigrationParameters' }
786 # @MigrationParameters:
788 # Optional members can be omitted on input ('migrate-set-parameters')
789 # but most members will always be present on output
790 # ('query-migrate-parameters'), with the exception of tls-creds and
793 # @compress-level: #optional compression level
795 # @compress-threads: #optional compression thread count
797 # @decompress-threads: #optional decompression thread count
799 # @cpu-throttle-initial: #optional Initial percentage of time guest cpus are
800 # throttledwhen migration auto-converge is activated.
801 # The default value is 20. (Since 2.7)
803 # @cpu-throttle-increment: #optional throttle percentage increase each time
804 # auto-converge detects that migration is not making
805 # progress. The default value is 10. (Since 2.7)
807 # @tls-creds: #optional ID of the 'tls-creds' object that provides credentials
808 # for establishing a TLS connection over the migration data
809 # channel. On the outgoing side of the migration, the credentials
810 # must be for a 'client' endpoint, while for the incoming side the
811 # credentials must be for a 'server' endpoint. Setting this
812 # will enable TLS for all migrations. The default is unset,
813 # resulting in unsecured migration at the QEMU level. (Since 2.7)
815 # @tls-hostname: #optional hostname of the target host for the migration. This
816 # is required when using x509 based TLS credentials and the
817 # migration URI does not already include a hostname. For
818 # example if using fd: or exec: based migration, the
819 # hostname must be provided so that the server's x509
820 # certificate identity can be validated. (Since 2.7)
822 # @max-bandwidth: to set maximum speed for migration. maximum speed in
823 # bytes per second. (Since 2.8)
825 # @downtime-limit: set maximum tolerated downtime for migration. maximum
826 # downtime in milliseconds (Since 2.8)
828 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
832 { 'struct': 'MigrationParameters',
833 'data': { '*compress-level': 'int',
834 '*compress-threads': 'int',
835 '*decompress-threads': 'int',
836 '*cpu-throttle-initial': 'int',
837 '*cpu-throttle-increment': 'int',
839 '*tls-hostname': 'str',
840 '*max-bandwidth': 'int',
841 '*downtime-limit': 'int',
842 '*x-checkpoint-delay': 'int'} }
845 # @query-migrate-parameters:
847 # Returns information about the current migration parameters
849 # Returns: @MigrationParameters
853 { 'command': 'query-migrate-parameters',
854 'returns': 'MigrationParameters' }
857 # @client_migrate_info:
859 # Set migration information for remote display. This makes the server
860 # ask the client to automatically reconnect using the new parameters
861 # once migration finished successfully. Only implemented for SPICE.
863 # @protocol: must be "spice"
864 # @hostname: migration target hostname
865 # @port: #optional spice tcp port for plaintext channels
866 # @tls-port: #optional spice tcp port for tls-secured channels
867 # @cert-subject: #optional server certificate subject
871 { 'command': 'client_migrate_info',
872 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
873 '*tls-port': 'int', '*cert-subject': 'str' } }
876 # @migrate-start-postcopy:
878 # Followup to a migration command to switch the migration to postcopy mode.
879 # The postcopy-ram capability must be set before the original migration
884 { 'command': 'migrate-start-postcopy' }
889 # The message transmission between Primary side and Secondary side.
891 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
893 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
895 # @checkpoint-reply: SVM gets PVM's checkpoint request
897 # @vmstate-send: VM's state will be sent by PVM.
899 # @vmstate-size: The total size of VMstate.
901 # @vmstate-received: VM's state has been received by SVM.
903 # @vmstate-loaded: VM's state has been loaded by SVM.
907 { 'enum': 'COLOMessage',
908 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
909 'vmstate-send', 'vmstate-size', 'vmstate-received',
917 # @unknown: unknown mode
919 # @primary: master side
921 # @secondary: slave side
925 { 'enum': 'COLOMode',
926 'data': [ 'unknown', 'primary', 'secondary'] }
931 # An enumeration of COLO failover status
933 # @none: no failover has ever happened
935 # @require: got failover requirement but not handled
937 # @active: in the process of doing failover
939 # @completed: finish the process of failover
943 { 'enum': 'FailoverStatus',
944 'data': [ 'none', 'require', 'active', 'completed'] }
947 # @x-colo-lost-heartbeat:
949 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
950 # If this command is sent to the PVM, the Primary side will exit COLO mode.
951 # If sent to the Secondary, the Secondary side will run failover work,
952 # then takes over server operation to become the service VM.
956 { 'command': 'x-colo-lost-heartbeat' }
961 # Information about a mouse device.
963 # @name: the name of the mouse device
965 # @index: the index of the mouse device
967 # @current: true if this device is currently receiving mouse events
969 # @absolute: true if this device supports absolute coordinates as input
973 { 'struct': 'MouseInfo',
974 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
975 'absolute': 'bool'} }
980 # Returns information about each active mouse device
982 # Returns: a list of @MouseInfo for each device
986 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
991 # An enumeration of cpu types that enable additional information during
996 { 'enum': 'CpuInfoArch',
997 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
1002 # Information about a virtual CPU
1004 # @CPU: the index of the virtual CPU
1006 # @current: this only exists for backwards compatibility and should be ignored
1008 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
1009 # to a processor specific low power mode.
1011 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
1013 # @thread_id: ID of the underlying host thread
1015 # @arch: architecture of the cpu, which determines which additional fields
1016 # will be listed (since 2.6)
1020 # Notes: @halted is a transient state that changes frequently. By the time the
1021 # data is sent to the client, the guest may no longer be halted.
1023 { 'union': 'CpuInfo',
1024 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
1025 'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' },
1026 'discriminator': 'arch',
1027 'data': { 'x86': 'CpuInfoX86',
1028 'sparc': 'CpuInfoSPARC',
1029 'ppc': 'CpuInfoPPC',
1030 'mips': 'CpuInfoMIPS',
1031 'tricore': 'CpuInfoTricore',
1032 'other': 'CpuInfoOther' } }
1037 # Additional information about a virtual i386 or x86_64 CPU
1039 # @pc: the 64-bit instruction pointer
1043 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
1048 # Additional information about a virtual SPARC CPU
1050 # @pc: the PC component of the instruction pointer
1052 # @npc: the NPC component of the instruction pointer
1056 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
1061 # Additional information about a virtual PPC CPU
1063 # @nip: the instruction pointer
1067 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
1072 # Additional information about a virtual MIPS CPU
1074 # @PC: the instruction pointer
1078 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
1083 # Additional information about a virtual Tricore CPU
1085 # @PC: the instruction pointer
1089 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
1094 # No additional information is available about the virtual CPU
1099 { 'struct': 'CpuInfoOther', 'data': { } }
1104 # Returns a list of information about each virtual CPU.
1106 # Returns: a list of @CpuInfo for each virtual CPU
1110 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
1115 # Information about an iothread
1117 # @id: the identifier of the iothread
1119 # @thread-id: ID of the underlying host thread
1123 { 'struct': 'IOThreadInfo',
1124 'data': {'id': 'str', 'thread-id': 'int'} }
1129 # Returns a list of information about each iothread.
1131 # Note: this list excludes the QEMU main loop thread, which is not declared
1132 # using the -object iothread command-line option. It is always the main thread
1135 # Returns: a list of @IOThreadInfo for each iothread
1139 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
1142 # @NetworkAddressFamily:
1144 # The network address family
1146 # @ipv4: IPV4 family
1148 # @ipv6: IPV6 family
1150 # @unix: unix socket
1152 # @vsock: vsock family (since 2.8)
1154 # @unknown: otherwise
1158 { 'enum': 'NetworkAddressFamily',
1159 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
1164 # The basic information for vnc network connection
1168 # @service: The service name of the vnc port. This may depend on the host
1169 # system's service database so symbolic names should not be relied
1172 # @family: address family
1174 # @websocket: true in case the socket is a websocket (since 2.3).
1178 { 'struct': 'VncBasicInfo',
1179 'data': { 'host': 'str',
1181 'family': 'NetworkAddressFamily',
1182 'websocket': 'bool' } }
1187 # The network connection information for server
1189 # @auth: #optional, authentication method
1193 { 'struct': 'VncServerInfo',
1194 'base': 'VncBasicInfo',
1195 'data': { '*auth': 'str' } }
1200 # Information about a connected VNC client.
1202 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
1203 # Name of the client.
1205 # @sasl_username: #optional If SASL authentication is in use, the SASL username
1206 # used for authentication.
1210 { 'struct': 'VncClientInfo',
1211 'base': 'VncBasicInfo',
1212 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1217 # Information about the VNC session.
1219 # @enabled: true if the VNC server is enabled, false otherwise
1221 # @host: #optional The hostname the VNC server is bound to. This depends on
1222 # the name resolution on the host and may be an IP address.
1224 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
1225 # 'ipv4' if the host is listening for IPv4 connections
1226 # 'unix' if the host is listening on a unix domain socket
1227 # 'unknown' otherwise
1229 # @service: #optional The service name of the server's port. This may depends
1230 # on the host system's service database so symbolic names should not
1233 # @auth: #optional the current authentication type used by the server
1234 # 'none' if no authentication is being used
1235 # 'vnc' if VNC authentication is being used
1236 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
1237 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1238 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1239 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1240 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1241 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1242 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1243 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1244 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1246 # @clients: a list of @VncClientInfo of all currently connected clients
1250 { 'struct': 'VncInfo',
1251 'data': {'enabled': 'bool', '*host': 'str',
1252 '*family': 'NetworkAddressFamily',
1253 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1258 # vnc primary authentication method.
1262 { 'enum': 'VncPrimaryAuth',
1263 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1264 'tls', 'vencrypt', 'sasl' ] }
1267 # @VncVencryptSubAuth:
1269 # vnc sub authentication method with vencrypt.
1273 { 'enum': 'VncVencryptSubAuth',
1275 'tls-none', 'x509-none',
1276 'tls-vnc', 'x509-vnc',
1277 'tls-plain', 'x509-plain',
1278 'tls-sasl', 'x509-sasl' ] }
1283 # Information about a vnc server
1285 # @id: vnc server name.
1287 # @server: A list of @VncBasincInfo describing all listening sockets.
1288 # The list can be empty (in case the vnc server is disabled).
1289 # It also may have multiple entries: normal + websocket,
1290 # possibly also ipv4 + ipv6 in the future.
1292 # @clients: A list of @VncClientInfo of all currently connected clients.
1293 # The list can be empty, for obvious reasons.
1295 # @auth: The current authentication type used by the server
1297 # @vencrypt: #optional The vencrypt sub authentication type used by the server,
1298 # only specified in case auth == vencrypt.
1300 # @display: #optional The display device the vnc server is linked to.
1304 { 'struct': 'VncInfo2',
1305 'data': { 'id' : 'str',
1306 'server' : ['VncBasicInfo'],
1307 'clients' : ['VncClientInfo'],
1308 'auth' : 'VncPrimaryAuth',
1309 '*vencrypt' : 'VncVencryptSubAuth',
1310 '*display' : 'str' } }
1315 # Returns information about the current VNC server
1321 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1324 # @query-vnc-servers:
1326 # Returns a list of vnc servers. The list can be empty.
1328 # Returns: a list of @VncInfo2
1332 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1337 # The basic information for SPICE network connection
1341 # @port: port number
1343 # @family: address family
1347 { 'struct': 'SpiceBasicInfo',
1348 'data': { 'host': 'str',
1350 'family': 'NetworkAddressFamily' } }
1355 # Information about a SPICE server
1357 # @auth: #optional, authentication method
1361 { 'struct': 'SpiceServerInfo',
1362 'base': 'SpiceBasicInfo',
1363 'data': { '*auth': 'str' } }
1368 # Information about a SPICE client channel.
1370 # @connection-id: SPICE connection id number. All channels with the same id
1371 # belong to the same SPICE session.
1373 # @channel-type: SPICE channel type number. "1" is the main control
1374 # channel, filter for this one if you want to track spice
1377 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1378 # multiple channels of the same type exist, such as multiple
1379 # display channels in a multihead setup
1381 # @tls: true if the channel is encrypted, false otherwise.
1385 { 'struct': 'SpiceChannel',
1386 'base': 'SpiceBasicInfo',
1387 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1391 # @SpiceQueryMouseMode:
1393 # An enumeration of Spice mouse states.
1395 # @client: Mouse cursor position is determined by the client.
1397 # @server: Mouse cursor position is determined by the server.
1399 # @unknown: No information is available about mouse mode used by
1402 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1406 { 'enum': 'SpiceQueryMouseMode',
1407 'data': [ 'client', 'server', 'unknown' ] }
1412 # Information about the SPICE session.
1414 # @enabled: true if the SPICE server is enabled, false otherwise
1416 # @migrated: true if the last guest migration completed and spice
1417 # migration had completed as well. false otherwise.
1419 # @host: #optional The hostname the SPICE server is bound to. This depends on
1420 # the name resolution on the host and may be an IP address.
1422 # @port: #optional The SPICE server's port number.
1424 # @compiled-version: #optional SPICE server version.
1426 # @tls-port: #optional The SPICE server's TLS port number.
1428 # @auth: #optional the current authentication type used by the server
1429 # 'none' if no authentication is being used
1430 # 'spice' uses SASL or direct TLS authentication, depending on command
1433 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1434 # be determined by the client or the server, or unknown if spice
1435 # server doesn't provide this information.
1439 # @channels: a list of @SpiceChannel for each active spice channel
1443 { 'struct': 'SpiceInfo',
1444 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1445 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1446 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1451 # Returns information about the current SPICE server
1453 # Returns: @SpiceInfo
1457 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1462 # Information about the guest balloon device.
1464 # @actual: the number of bytes the balloon currently contains
1469 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1474 # Return information about the balloon device.
1476 # Returns: @BalloonInfo on success
1477 # If the balloon driver is enabled but not functional because the KVM
1478 # kernel module cannot support it, KvmMissingCap
1479 # If no balloon device is present, DeviceNotActive
1483 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1488 # A PCI device memory region
1490 # @base: the starting address (guest physical)
1492 # @limit: the ending address (guest physical)
1496 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1501 # Information about a PCI device I/O region.
1503 # @bar: the index of the Base Address Register for this region
1505 # @type: 'io' if the region is a PIO region
1506 # 'memory' if the region is a MMIO region
1508 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1510 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1514 { 'struct': 'PciMemoryRegion',
1515 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1516 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1521 # Information about a bus of a PCI Bridge device
1523 # @number: primary bus interface number. This should be the number of the
1524 # bus the device resides on.
1526 # @secondary: secondary bus interface number. This is the number of the
1527 # main bus for the bridge
1529 # @subordinate: This is the highest number bus that resides below the
1532 # @io_range: The PIO range for all devices on this bridge
1534 # @memory_range: The MMIO range for all devices on this bridge
1536 # @prefetchable_range: The range of prefetchable MMIO for all devices on
1541 { 'struct': 'PciBusInfo',
1542 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1543 'io_range': 'PciMemoryRange',
1544 'memory_range': 'PciMemoryRange',
1545 'prefetchable_range': 'PciMemoryRange' } }
1550 # Information about a PCI Bridge device
1552 # @bus: information about the bus the device resides on
1554 # @devices: a list of @PciDeviceInfo for each device on this bridge
1558 { 'struct': 'PciBridgeInfo',
1559 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
1564 # Information about the Class of a PCI device
1566 # @desc: #optional a string description of the device's class
1568 # @class: the class code of the device
1572 { 'struct': 'PciDeviceClass',
1573 'data': {'*desc': 'str', 'class': 'int'} }
1578 # Information about the Id of a PCI device
1580 # @device: the PCI device id
1582 # @vendor: the PCI vendor id
1586 { 'struct': 'PciDeviceId',
1587 'data': {'device': 'int', 'vendor': 'int'} }
1592 # Information about a PCI device
1594 # @bus: the bus number of the device
1596 # @slot: the slot the device is located in
1598 # @function: the function of the slot used by the device
1600 # @class_info: the class of the device
1602 # @id: the PCI device id
1604 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1606 # @qdev_id: the device name of the PCI device
1608 # @pci_bridge: if the device is a PCI bridge, the bridge information
1610 # @regions: a list of the PCI I/O regions associated with the device
1612 # Notes: the contents of @class_info.desc are not stable and should only be
1613 # treated as informational.
1617 { 'struct': 'PciDeviceInfo',
1618 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1619 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
1620 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1621 'regions': ['PciMemoryRegion']} }
1626 # Information about a PCI bus
1628 # @bus: the bus index
1630 # @devices: a list of devices on this bus
1634 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1639 # Return information about the PCI bus topology of the guest.
1641 # Returns: a list of @PciInfo for each PCI bus
1645 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1650 # This command will cause the QEMU process to exit gracefully. While every
1651 # attempt is made to send the QMP response before terminating, this is not
1652 # guaranteed. When using this interface, a premature EOF would not be
1657 { 'command': 'quit' }
1662 # Stop all guest VCPU execution.
1666 # Notes: This function will succeed even if the guest is already in the stopped
1667 # state. In "inmigrate" state, it will ensure that the guest
1668 # remains paused once migration finishes, as if the -S option was
1669 # passed on the command line.
1671 { 'command': 'stop' }
1676 # Performs a hard reset of a guest.
1680 { 'command': 'system_reset' }
1683 # @system_powerdown:
1685 # Requests that a guest perform a powerdown operation.
1689 # Notes: A guest may or may not respond to this command. This command
1690 # returning does not indicate that a guest has accepted the request or
1691 # that it has shut down. Many guests will respond to this command by
1692 # prompting the user in some way.
1694 { 'command': 'system_powerdown' }
1699 # This command is a nop that is only provided for the purposes of compatibility.
1703 # Notes: Do not use this command.
1705 { 'command': 'cpu', 'data': {'index': 'int'} }
1710 # Adds CPU with specified ID
1712 # @id: ID of CPU to be created, valid values [0..max_cpus)
1714 # Returns: Nothing on success
1718 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1723 # Save a portion of guest memory to a file.
1725 # @val: the virtual address of the guest to start from
1727 # @size: the size of memory region to save
1729 # @filename: the file to save the memory to as binary data
1731 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1732 # virtual address (defaults to CPU 0)
1734 # Returns: Nothing on success
1738 # Notes: Errors were not reliably returned until 1.1
1740 { 'command': 'memsave',
1741 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1746 # Save a portion of guest physical memory to a file.
1748 # @val: the physical address of the guest to start from
1750 # @size: the size of memory region to save
1752 # @filename: the file to save the memory to as binary data
1754 # Returns: Nothing on success
1758 # Notes: Errors were not reliably returned until 1.1
1760 { 'command': 'pmemsave',
1761 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1766 # Resume guest VCPU execution.
1770 # Returns: If successful, nothing
1771 # If QEMU was started with an encrypted block device and a key has
1772 # not yet been set, DeviceEncrypted.
1774 # Notes: This command will succeed if the guest is currently running. It
1775 # will also succeed if the guest is in the "inmigrate" state; in
1776 # this case, the effect of the command is to make sure the guest
1777 # starts once migration finishes, removing the effect of the -S
1778 # command line option if it was passed.
1780 { 'command': 'cont' }
1785 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1791 { 'command': 'system_wakeup' }
1796 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
1798 # Returns: If successful, nothing
1802 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
1804 { 'command': 'inject-nmi' }
1809 # Sets the link status of a virtual network adapter.
1811 # @name: the device name of the virtual network adapter
1813 # @up: true to set the link status to be up
1815 # Returns: Nothing on success
1816 # If @name is not a valid network device, DeviceNotFound
1820 # Notes: Not all network adapters support setting link status. This command
1821 # will succeed even if the network adapter does not support link status
1824 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1829 # Request the balloon driver to change its balloon size.
1831 # @value: the target size of the balloon in bytes
1833 # Returns: Nothing on success
1834 # If the balloon driver is enabled but not functional because the KVM
1835 # kernel module cannot support it, KvmMissingCap
1836 # If no balloon device is present, DeviceNotActive
1838 # Notes: This command just issues a request to the guest. When it returns,
1839 # the balloon size may not have changed. A guest can change the balloon
1840 # size independent of this command.
1844 { 'command': 'balloon', 'data': {'value': 'int'} }
1849 # This action can be used to test transaction failure.
1853 { 'struct': 'Abort',
1857 # @ActionCompletionMode:
1859 # An enumeration of Transactional completion modes.
1861 # @individual: Do not attempt to cancel any other Actions if any Actions fail
1862 # after the Transaction request succeeds. All Actions that
1863 # can complete successfully will do so without waiting on others.
1864 # This is the default.
1866 # @grouped: If any Action fails after the Transaction succeeds, cancel all
1867 # Actions. Actions do not complete until all Actions are ready to
1868 # complete. May be rejected by Actions that do not support this
1873 { 'enum': 'ActionCompletionMode',
1874 'data': [ 'individual', 'grouped' ] }
1877 # @TransactionAction:
1879 # A discriminated record of operations that can be performed with
1880 # @transaction. Action @type can be:
1882 # - @abort: since 1.6
1883 # - @block-dirty-bitmap-add: since 2.5
1884 # - @block-dirty-bitmap-clear: since 2.5
1885 # - @blockdev-backup: since 2.3
1886 # - @blockdev-snapshot: since 2.5
1887 # - @blockdev-snapshot-internal-sync: since 1.7
1888 # - @blockdev-snapshot-sync: since 1.1
1889 # - @drive-backup: since 1.6
1893 { 'union': 'TransactionAction',
1896 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
1897 'block-dirty-bitmap-clear': 'BlockDirtyBitmap',
1898 'blockdev-backup': 'BlockdevBackup',
1899 'blockdev-snapshot': 'BlockdevSnapshot',
1900 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
1901 'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
1902 'drive-backup': 'DriveBackup'
1906 # @TransactionProperties:
1908 # Optional arguments to modify the behavior of a Transaction.
1910 # @completion-mode: #optional Controls how jobs launched asynchronously by
1911 # Actions will complete or fail as a group.
1912 # See @ActionCompletionMode for details.
1916 { 'struct': 'TransactionProperties',
1918 '*completion-mode': 'ActionCompletionMode'
1925 # Executes a number of transactionable QMP commands atomically. If any
1926 # operation fails, then the entire set of actions will be abandoned and the
1927 # appropriate error returned.
1929 # @actions: List of @TransactionAction;
1930 # information needed for the respective operations.
1932 # @properties: #optional structure of additional options to control the
1933 # execution of the transaction. See @TransactionProperties
1934 # for additional detail.
1936 # Returns: nothing on success
1937 # Errors depend on the operations of the transaction
1939 # Note: The transaction aborts on the first failure. Therefore, there will be
1940 # information on only one failed operation returned in an error condition, and
1941 # subsequent actions will not have been attempted.
1945 { 'command': 'transaction',
1946 'data': { 'actions': [ 'TransactionAction' ],
1947 '*properties': 'TransactionProperties'
1952 # @human-monitor-command:
1954 # Execute a command on the human monitor and return the output.
1956 # @command-line: the command to execute in the human monitor
1958 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1960 # Returns: the output of the command as a string
1964 # Notes: This command only exists as a stop-gap. Its use is highly
1965 # discouraged. The semantics of this command are not guaranteed.
1967 # Known limitations:
1969 # * This command is stateless, this means that commands that depend
1970 # on state information (such as getfd) might not work
1972 # * Commands that prompt the user for data (eg. 'cont' when the block
1973 # device is encrypted) don't currently work
1975 { 'command': 'human-monitor-command',
1976 'data': {'command-line': 'str', '*cpu-index': 'int'},
1982 # Cancel the current executing migration process.
1984 # Returns: nothing on success
1986 # Notes: This command succeeds even if there is no migration process running.
1990 { 'command': 'migrate_cancel' }
1993 # @migrate_set_downtime:
1995 # Set maximum tolerated downtime for migration.
1997 # @value: maximum downtime in seconds
1999 # Returns: nothing on success
2001 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2005 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
2008 # @migrate_set_speed:
2010 # Set maximum speed for migration.
2012 # @value: maximum speed in bytes.
2014 # Returns: nothing on success
2016 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2020 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
2023 # @migrate-set-cache-size:
2025 # Set XBZRLE cache size
2027 # @value: cache size in bytes
2029 # The size will be rounded down to the nearest power of 2.
2030 # The cache size can be modified before and during ongoing migration
2032 # Returns: nothing on success
2036 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
2039 # @query-migrate-cache-size:
2041 # query XBZRLE cache size
2043 # Returns: XBZRLE cache size in bytes
2047 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
2050 # @ObjectPropertyInfo:
2052 # @name: the name of the property
2054 # @type: the type of the property. This will typically come in one of four
2057 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
2058 # These types are mapped to the appropriate JSON type.
2060 # 2) A child type in the form 'child<subtype>' where subtype is a qdev
2061 # device type name. Child properties create the composition tree.
2063 # 3) A link type in the form 'link<subtype>' where subtype is a qdev
2064 # device type name. Link properties form the device model graph.
2068 { 'struct': 'ObjectPropertyInfo',
2069 'data': { 'name': 'str', 'type': 'str' } }
2074 # This command will list any properties of a object given a path in the object
2077 # @path: the path within the object model. See @qom-get for a description of
2080 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
2085 { 'command': 'qom-list',
2086 'data': { 'path': 'str' },
2087 'returns': [ 'ObjectPropertyInfo' ] }
2092 # This command will get a property from a object model path and return the
2095 # @path: The path within the object model. There are two forms of supported
2096 # paths--absolute and partial paths.
2098 # Absolute paths are derived from the root object and can follow child<>
2099 # or link<> properties. Since they can follow link<> properties, they
2100 # can be arbitrarily long. Absolute paths look like absolute filenames
2101 # and are prefixed with a leading slash.
2103 # Partial paths look like relative filenames. They do not begin
2104 # with a prefix. The matching rules for partial paths are subtle but
2105 # designed to make specifying objects easy. At each level of the
2106 # composition tree, the partial path is matched as an absolute path.
2107 # The first match is not returned. At least two matches are searched
2108 # for. A successful result is only returned if only one match is
2109 # found. If more than one match is found, a flag is return to
2110 # indicate that the match was ambiguous.
2112 # @property: The property name to read
2114 # Returns: The property value. The type depends on the property
2115 # type. child<> and link<> properties are returned as #str
2116 # pathnames. All integer property types (u8, u16, etc) are
2121 { 'command': 'qom-get',
2122 'data': { 'path': 'str', 'property': 'str' },
2128 # This command will set a property from a object model path.
2130 # @path: see @qom-get for a description of this parameter
2132 # @property: the property name to set
2134 # @value: a value who's type is appropriate for the property type. See @qom-get
2135 # for a description of type mapping.
2139 { 'command': 'qom-set',
2140 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
2145 # Sets the password of a remote display session.
2147 # @protocol: `vnc' to modify the VNC server password
2148 # `spice' to modify the Spice server password
2150 # @password: the new password
2152 # @connected: #optional how to handle existing clients when changing the
2153 # password. If nothing is specified, defaults to `keep'
2154 # `fail' to fail the command if clients are connected
2155 # `disconnect' to disconnect existing clients
2156 # `keep' to maintain existing clients
2158 # Returns: Nothing on success
2159 # If Spice is not enabled, DeviceNotFound
2163 { 'command': 'set_password',
2164 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2169 # Expire the password of a remote display server.
2171 # @protocol: the name of the remote display protocol `vnc' or `spice'
2173 # @time: when to expire the password.
2174 # `now' to expire the password immediately
2175 # `never' to cancel password expiration
2176 # `+INT' where INT is the number of seconds from now (integer)
2177 # `INT' where INT is the absolute time in seconds
2179 # Returns: Nothing on success
2180 # If @protocol is `spice' and Spice is not active, DeviceNotFound
2184 # Notes: Time is relative to the server and currently there is no way to
2185 # coordinate server time with client time. It is not recommended to
2186 # use the absolute time version of the @time parameter unless you're
2187 # sure you are on the same machine as the QEMU instance.
2189 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2192 # @change-vnc-password:
2194 # Change the VNC server password.
2196 # @password: the new password to use with VNC authentication
2200 # Notes: An empty password in this command will set the password to the empty
2201 # string. Existing clients are unaffected by executing this command.
2203 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2208 # This command is multiple commands multiplexed together.
2210 # @device: This is normally the name of a block device but it may also be 'vnc'.
2211 # when it's 'vnc', then sub command depends on @target
2213 # @target: If @device is a block device, then this is the new filename.
2214 # If @device is 'vnc', then if the value 'password' selects the vnc
2215 # change password command. Otherwise, this specifies a new server URI
2216 # address to listen to for VNC connections.
2218 # @arg: If @device is a block device, then this is an optional format to open
2220 # If @device is 'vnc' and @target is 'password', this is the new VNC
2221 # password to set. If this argument is an empty string, then no future
2222 # logins will be allowed.
2224 # Returns: Nothing on success.
2225 # If @device is not a valid block device, DeviceNotFound
2226 # If the new block device is encrypted, DeviceEncrypted. Note that
2227 # if this error is returned, the device has been opened successfully
2228 # and an additional call to @block_passwd is required to set the
2229 # device's password. The behavior of reads and writes to the block
2230 # device between when these calls are executed is undefined.
2232 # Notes: This interface is deprecated, and it is strongly recommended that you
2233 # avoid using it. For changing block devices, use
2234 # blockdev-change-medium; for changing VNC parameters, use
2235 # change-vnc-password.
2239 { 'command': 'change',
2240 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2245 # This structure describes a search result from @qom-list-types
2247 # @name: the type name found in the search
2251 # Notes: This command is experimental and may change syntax in future releases.
2253 { 'struct': 'ObjectTypeInfo',
2254 'data': { 'name': 'str' } }
2259 # This command will return a list of types given search parameters
2261 # @implements: if specified, only return types that implement this type name
2263 # @abstract: if true, include abstract types in the results
2265 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2269 { 'command': 'qom-list-types',
2270 'data': { '*implements': 'str', '*abstract': 'bool' },
2271 'returns': [ 'ObjectTypeInfo' ] }
2274 # @DevicePropertyInfo:
2276 # Information about device properties.
2278 # @name: the name of the property
2279 # @type: the typename of the property
2280 # @description: #optional if specified, the description of the property.
2285 { 'struct': 'DevicePropertyInfo',
2286 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
2289 # @device-list-properties:
2291 # List properties associated with a device.
2293 # @typename: the type name of a device
2295 # Returns: a list of DevicePropertyInfo describing a devices properties
2299 { 'command': 'device-list-properties',
2300 'data': { 'typename': 'str'},
2301 'returns': [ 'DevicePropertyInfo' ] }
2306 # Migrates the current running guest to another Virtual Machine.
2308 # @uri: the Uniform Resource Identifier of the destination VM
2310 # @blk: #optional do block migration (full disk copy)
2312 # @inc: #optional incremental disk copy migration
2314 # @detach: this argument exists only for compatibility reasons and
2315 # is ignored by QEMU
2317 # Returns: nothing on success
2321 { 'command': 'migrate',
2322 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2325 # @migrate-incoming:
2327 # Start an incoming migration, the qemu must have been started
2328 # with -incoming defer
2330 # @uri: The Uniform Resource Identifier identifying the source or
2331 # address to listen on
2333 # Returns: nothing on success
2336 # Note: It's a bad idea to use a string for the uri, but it needs to stay
2337 # compatible with -incoming and the format of the uri is already exposed
2340 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
2343 # @xen-save-devices-state:
2345 # Save the state of all devices to file. The RAM and the block devices
2346 # of the VM are not saved by this command.
2348 # @filename: the file to save the state of the devices to as binary
2349 # data. See xen-save-devices-state.txt for a description of the binary
2352 # Returns: Nothing on success
2356 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2359 # @xen-set-global-dirty-log:
2361 # Enable or disable the global dirty log mode.
2363 # @enable: true to enable, false to disable.
2369 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2374 # @driver: the name of the new device's driver
2376 # @bus: #optional the device's parent bus (device tree path)
2378 # @id: #optional the device's ID, must be unique
2380 # Additional arguments depend on the type.
2385 # 1. For detailed information about this command, please refer to the
2386 # 'docs/qdev-device-use.txt' file.
2388 # 2. It's possible to list device properties by running QEMU with the
2389 # "-device DEVICE,help" command-line argument, where DEVICE is the
2394 # -> { "execute": "device_add",
2395 # "arguments": { "driver": "e1000", "id": "net1",
2397 # "mac": "52:54:00:12:34:56" } }
2398 # <- { "return": {} }
2400 # TODO: This command effectively bypasses QAPI completely due to its
2401 # "additional arguments" business. It shouldn't have been added to
2402 # the schema in this form. It should be qapified properly, or
2403 # replaced by a properly qapified command.
2407 { 'command': 'device_add',
2408 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'},
2409 'gen': false } # so we can get the additional arguments
2414 # Remove a device from a guest
2416 # @id: the name or QOM path of the device
2418 # Returns: Nothing on success
2419 # If @id is not a valid device, DeviceNotFound
2421 # Notes: When this command completes, the device may not be removed from the
2422 # guest. Hot removal is an operation that requires guest cooperation.
2423 # This command merely requests that the guest begin the hot removal
2424 # process. Completion of the device removal process is signaled with a
2425 # DEVICE_DELETED event. Guest reset will automatically complete removal
2430 { 'command': 'device_del', 'data': {'id': 'str'} }
2433 # @DumpGuestMemoryFormat:
2435 # An enumeration of guest-memory-dump's format.
2439 # @kdump-zlib: kdump-compressed format with zlib-compressed
2441 # @kdump-lzo: kdump-compressed format with lzo-compressed
2443 # @kdump-snappy: kdump-compressed format with snappy-compressed
2447 { 'enum': 'DumpGuestMemoryFormat',
2448 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
2451 # @dump-guest-memory:
2453 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2454 # very long depending on the amount of guest memory.
2456 # @paging: if true, do paging to get guest's memory mapping. This allows
2457 # using gdb to process the core file.
2459 # IMPORTANT: this option can make QEMU allocate several gigabytes
2460 # of RAM. This can happen for a large guest, or a
2461 # malicious guest pretending to be large.
2463 # Also, paging=true has the following limitations:
2465 # 1. The guest may be in a catastrophic state or can have corrupted
2466 # memory, which cannot be trusted
2467 # 2. The guest can be in real-mode even if paging is enabled. For
2468 # example, the guest uses ACPI to sleep, and ACPI sleep state
2470 # 3. Currently only supported on i386 and x86_64.
2472 # @protocol: the filename or file descriptor of the vmcore. The supported
2475 # 1. file: the protocol starts with "file:", and the following
2476 # string is the file's path.
2477 # 2. fd: the protocol starts with "fd:", and the following string
2480 # @detach: #optional if true, QMP will return immediately rather than
2481 # waiting for the dump to finish. The user can track progress
2482 # using "query-dump". (since 2.6).
2484 # @begin: #optional if specified, the starting physical address.
2486 # @length: #optional if specified, the memory size, in bytes. If you don't
2487 # want to dump all guest's memory, please specify the start @begin
2490 # @format: #optional if specified, the format of guest memory dump. But non-elf
2491 # format is conflict with paging and filter, ie. @paging, @begin and
2492 # @length is not allowed to be specified with non-elf @format at the
2493 # same time (since 2.0)
2495 # Returns: nothing on success
2499 { 'command': 'dump-guest-memory',
2500 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
2501 '*begin': 'int', '*length': 'int',
2502 '*format': 'DumpGuestMemoryFormat'} }
2507 # Describe the status of a long-running background guest memory dump.
2509 # @none: no dump-guest-memory has started yet.
2511 # @active: there is one dump running in background.
2513 # @completed: the last dump has finished successfully.
2515 # @failed: the last dump has failed.
2519 { 'enum': 'DumpStatus',
2520 'data': [ 'none', 'active', 'completed', 'failed' ] }
2525 # The result format for 'query-dump'.
2527 # @status: enum of @DumpStatus, which shows current dump status
2529 # @completed: bytes written in latest dump (uncompressed)
2531 # @total: total bytes to be written in latest dump (uncompressed)
2535 { 'struct': 'DumpQueryResult',
2536 'data': { 'status': 'DumpStatus',
2543 # Query latest dump status.
2545 # Returns: A @DumpStatus object showing the dump status.
2549 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
2552 # @DumpGuestMemoryCapability:
2554 # A list of the available formats for dump-guest-memory
2558 { 'struct': 'DumpGuestMemoryCapability',
2560 'formats': ['DumpGuestMemoryFormat'] } }
2563 # @query-dump-guest-memory-capability:
2565 # Returns the available formats for dump-guest-memory
2567 # Returns: A @DumpGuestMemoryCapability object listing available formats for
2572 { 'command': 'query-dump-guest-memory-capability',
2573 'returns': 'DumpGuestMemoryCapability' }
2578 # Dump guest's storage keys
2580 # @filename: the path to the file to dump to
2582 # This command is only supported on s390 architecture.
2586 { 'command': 'dump-skeys',
2587 'data': { 'filename': 'str' } }
2592 # Add a network backend.
2594 # @type: the type of network backend. Current valid values are 'user', 'tap',
2595 # 'vde', 'socket', 'dump' and 'bridge'
2597 # @id: the name of the new network backend
2599 # Additional arguments depend on the type.
2601 # TODO: This command effectively bypasses QAPI completely due to its
2602 # "additional arguments" business. It shouldn't have been added to
2603 # the schema in this form. It should be qapified properly, or
2604 # replaced by a properly qapified command.
2608 # Returns: Nothing on success
2609 # If @type is not a valid network backend, DeviceNotFound
2611 { 'command': 'netdev_add',
2612 'data': {'type': 'str', 'id': 'str'},
2613 'gen': false } # so we can get the additional arguments
2618 # Remove a network backend.
2620 # @id: the name of the network backend to remove
2622 # Returns: Nothing on success
2623 # If @id is not a valid network backend, DeviceNotFound
2627 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2632 # Create a QOM object.
2634 # @qom-type: the class name for the object to be created
2636 # @id: the name of the new object
2638 # @props: #optional a dictionary of properties to be passed to the backend
2640 # Returns: Nothing on success
2641 # Error if @qom-type is not a valid class name
2645 { 'command': 'object-add',
2646 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
2651 # Remove a QOM object.
2653 # @id: the name of the QOM object to remove
2655 # Returns: Nothing on success
2656 # Error if @id is not a valid id for a QOM object
2660 { 'command': 'object-del', 'data': {'id': 'str'} }
2663 # @NetdevNoneOptions:
2665 # Use it alone to have zero network devices.
2669 { 'struct': 'NetdevNoneOptions',
2673 # @NetLegacyNicOptions:
2675 # Create a new Network Interface Card.
2677 # @netdev: #optional id of -netdev to connect to
2679 # @macaddr: #optional MAC address
2681 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2683 # @addr: #optional PCI device address
2685 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2689 { 'struct': 'NetLegacyNicOptions',
2695 '*vectors': 'uint32' } }
2700 # A fat type wrapping 'str', to be embedded in lists.
2704 { 'struct': 'String',
2709 # @NetdevUserOptions:
2711 # Use the user mode network stack which requires no administrator privilege to
2714 # @hostname: #optional client hostname reported by the builtin DHCP server
2716 # @restrict: #optional isolate the guest from the host
2718 # @ipv4: #optional whether to support IPv4, default true for enabled
2721 # @ipv6: #optional whether to support IPv6, default true for enabled
2724 # @ip: #optional legacy parameter, use net= instead
2726 # @net: #optional IP network address that the guest will see, in the
2727 # form addr[/netmask] The netmask is optional, and can be
2728 # either in the form a.b.c.d or as a number of valid top-most
2729 # bits. Default is 10.0.2.0/24.
2731 # @host: #optional guest-visible address of the host
2733 # @tftp: #optional root directory of the built-in TFTP server
2735 # @bootfile: #optional BOOTP filename, for use with tftp=
2737 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2740 # @dns: #optional guest-visible address of the virtual nameserver
2742 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2745 # @ipv6-prefix: #optional IPv6 network prefix (default is fec0::) (since
2746 # 2.6). The network prefix is given in the usual
2747 # hexadecimal IPv6 address notation.
2749 # @ipv6-prefixlen: #optional IPv6 network prefix length (default is 64)
2752 # @ipv6-host: #optional guest-visible IPv6 address of the host (since 2.6)
2754 # @ipv6-dns: #optional guest-visible IPv6 address of the virtual
2755 # nameserver (since 2.6)
2757 # @smb: #optional root directory of the built-in SMB server
2759 # @smbserver: #optional IP address of the built-in SMB server
2761 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2764 # @guestfwd: #optional forward guest TCP connections
2768 { 'struct': 'NetdevUserOptions',
2771 '*restrict': 'bool',
2779 '*dhcpstart': 'str',
2781 '*dnssearch': ['String'],
2782 '*ipv6-prefix': 'str',
2783 '*ipv6-prefixlen': 'int',
2784 '*ipv6-host': 'str',
2787 '*smbserver': 'str',
2788 '*hostfwd': ['String'],
2789 '*guestfwd': ['String'] } }
2792 # @NetdevTapOptions:
2794 # Connect the host TAP network interface name to the VLAN.
2796 # @ifname: #optional interface name
2798 # @fd: #optional file descriptor of an already opened tap
2800 # @fds: #optional multiple file descriptors of already opened multiqueue capable
2803 # @script: #optional script to initialize the interface
2805 # @downscript: #optional script to shut down the interface
2807 # @br: #optional bridge name (since 2.8)
2809 # @helper: #optional command to execute to configure bridge
2811 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2813 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2815 # @vhost: #optional enable vhost-net network accelerator
2817 # @vhostfd: #optional file descriptor of an already opened vhost net device
2819 # @vhostfds: #optional file descriptors of multiple already opened vhost net
2822 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2824 # @queues: #optional number of queues to be created for multiqueue capable tap
2826 # @poll-us: #optional maximum number of microseconds that could
2827 # be spent on busy polling for tap (since 2.7)
2831 { 'struct': 'NetdevTapOptions',
2837 '*downscript': 'str',
2841 '*vnet_hdr': 'bool',
2845 '*vhostforce': 'bool',
2846 '*queues': 'uint32',
2847 '*poll-us': 'uint32'} }
2850 # @NetdevSocketOptions:
2852 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2853 # socket connection.
2855 # @fd: #optional file descriptor of an already opened socket
2857 # @listen: #optional port number, and optional hostname, to listen on
2859 # @connect: #optional port number, and optional hostname, to connect to
2861 # @mcast: #optional UDP multicast address and port number
2863 # @localaddr: #optional source address and port for multicast and udp packets
2865 # @udp: #optional UDP unicast address and port number
2869 { 'struct': 'NetdevSocketOptions',
2875 '*localaddr': 'str',
2879 # @NetdevL2TPv3Options:
2881 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
2883 # @src: source address
2885 # @dst: destination address
2887 # @srcport: #optional source port - mandatory for udp, optional for ip
2889 # @dstport: #optional destination port - mandatory for udp, optional for ip
2891 # @ipv6: #optional - force the use of ipv6
2893 # @udp: #optional - use the udp version of l2tpv3 encapsulation
2895 # @cookie64: #optional - use 64 bit coookies
2897 # @counter: #optional have sequence counter
2899 # @pincounter: #optional pin sequence counter to zero -
2900 # workaround for buggy implementations or
2901 # networks with packet reorder
2903 # @txcookie: #optional 32 or 64 bit transmit cookie
2905 # @rxcookie: #optional 32 or 64 bit receive cookie
2907 # @txsession: 32 bit transmit session
2909 # @rxsession: #optional 32 bit receive session - if not specified
2910 # set to the same value as transmit
2912 # @offset: #optional additional offset - allows the insertion of
2913 # additional application-specific data before the packet payload
2917 { 'struct': 'NetdevL2TPv3Options',
2925 '*cookie64': 'bool',
2927 '*pincounter': 'bool',
2928 '*txcookie': 'uint64',
2929 '*rxcookie': 'uint64',
2930 'txsession': 'uint32',
2931 '*rxsession': 'uint32',
2932 '*offset': 'uint32' } }
2935 # @NetdevVdeOptions:
2937 # Connect the VLAN to a vde switch running on the host.
2939 # @sock: #optional socket path
2941 # @port: #optional port number
2943 # @group: #optional group owner of socket
2945 # @mode: #optional permissions for socket
2949 { 'struct': 'NetdevVdeOptions',
2954 '*mode': 'uint16' } }
2957 # @NetdevDumpOptions:
2959 # Dump VLAN network traffic to a file.
2961 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2964 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2968 { 'struct': 'NetdevDumpOptions',
2974 # @NetdevBridgeOptions:
2976 # Connect a host TAP network interface to a host bridge device.
2978 # @br: #optional bridge name
2980 # @helper: #optional command to execute to configure bridge
2984 { 'struct': 'NetdevBridgeOptions',
2987 '*helper': 'str' } }
2990 # @NetdevHubPortOptions:
2992 # Connect two or more net clients through a software hub.
2994 # @hubid: hub identifier number
2998 { 'struct': 'NetdevHubPortOptions',
3000 'hubid': 'int32' } }
3003 # @NetdevNetmapOptions:
3005 # Connect a client to a netmap-enabled NIC or to a VALE switch port
3007 # @ifname: Either the name of an existing network interface supported by
3008 # netmap, or the name of a VALE port (created on the fly).
3009 # A VALE port name is in the form 'valeXXX:YYY', where XXX and
3010 # YYY are non-negative integers. XXX identifies a switch and
3011 # YYY identifies a port of the switch. VALE ports having the
3012 # same XXX are therefore connected to the same switch.
3014 # @devname: #optional path of the netmap device (default: '/dev/netmap').
3018 { 'struct': 'NetdevNetmapOptions',
3021 '*devname': 'str' } }
3024 # @NetdevVhostUserOptions:
3026 # Vhost-user network backend
3028 # @chardev: name of a unix socket chardev
3030 # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
3032 # @queues: #optional number of queues to be created for multiqueue vhost-user
3033 # (default: 1) (Since 2.5)
3037 { 'struct': 'NetdevVhostUserOptions',
3040 '*vhostforce': 'bool',
3041 '*queues': 'int' } }
3046 # Available netdev drivers.
3050 { 'enum': 'NetClientDriver',
3051 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
3052 'bridge', 'hubport', 'netmap', 'vhost-user' ] }
3057 # Captures the configuration of a network device.
3059 # @id: identifier for monitor commands.
3061 # @type: Specify the driver used for interpreting remaining arguments.
3065 # 'l2tpv3' - since 2.1
3067 { 'union': 'Netdev',
3068 'base': { 'id': 'str', 'type': 'NetClientDriver' },
3069 'discriminator': 'type',
3071 'none': 'NetdevNoneOptions',
3072 'nic': 'NetLegacyNicOptions',
3073 'user': 'NetdevUserOptions',
3074 'tap': 'NetdevTapOptions',
3075 'l2tpv3': 'NetdevL2TPv3Options',
3076 'socket': 'NetdevSocketOptions',
3077 'vde': 'NetdevVdeOptions',
3078 'dump': 'NetdevDumpOptions',
3079 'bridge': 'NetdevBridgeOptions',
3080 'hubport': 'NetdevHubPortOptions',
3081 'netmap': 'NetdevNetmapOptions',
3082 'vhost-user': 'NetdevVhostUserOptions' } }
3087 # Captures the configuration of a network device; legacy.
3089 # @vlan: #optional vlan number
3091 # @id: #optional identifier for monitor commands
3093 # @name: #optional identifier for monitor commands, ignored if @id is present
3095 # @opts: device type specific properties (legacy)
3099 { 'struct': 'NetLegacy',
3104 'opts': 'NetLegacyOptions' } }
3107 # @NetLegacyOptions:
3109 # Like Netdev, but for use only by the legacy command line options
3113 { 'union': 'NetLegacyOptions',
3115 'none': 'NetdevNoneOptions',
3116 'nic': 'NetLegacyNicOptions',
3117 'user': 'NetdevUserOptions',
3118 'tap': 'NetdevTapOptions',
3119 'l2tpv3': 'NetdevL2TPv3Options',
3120 'socket': 'NetdevSocketOptions',
3121 'vde': 'NetdevVdeOptions',
3122 'dump': 'NetdevDumpOptions',
3123 'bridge': 'NetdevBridgeOptions',
3124 'netmap': 'NetdevNetmapOptions',
3125 'vhost-user': 'NetdevVhostUserOptions' } }
3128 # @NetFilterDirection:
3130 # Indicates whether a netfilter is attached to a netdev's transmit queue or
3131 # receive queue or both.
3133 # @all: the filter is attached both to the receive and the transmit
3134 # queue of the netdev (default).
3136 # @rx: the filter is attached to the receive queue of the netdev,
3137 # where it will receive packets sent to the netdev.
3139 # @tx: the filter is attached to the transmit queue of the netdev,
3140 # where it will receive packets sent by the netdev.
3144 { 'enum': 'NetFilterDirection',
3145 'data': [ 'all', 'rx', 'tx' ] }
3148 # @InetSocketAddress:
3150 # Captures a socket address or address range in the Internet namespace.
3152 # @host: host part of the address
3154 # @port: port part of the address, or lowest port if @to is present
3156 # @to: highest port to try
3158 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
3161 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
3166 { 'struct': 'InetSocketAddress',
3175 # @UnixSocketAddress:
3177 # Captures a socket address in the local ("Unix socket") namespace.
3179 # @path: filesystem path to use
3183 { 'struct': 'UnixSocketAddress',
3188 # @VsockSocketAddress:
3190 # Captures a socket address in the vsock namespace.
3192 # @cid: unique host identifier
3195 # Note: string types are used to allow for possible future hostname or
3196 # service resolution support.
3200 { 'struct': 'VsockSocketAddress',
3208 # Captures the address of a socket, which could also be a named file descriptor
3212 { 'union': 'SocketAddress',
3214 'inet': 'InetSocketAddress',
3215 'unix': 'UnixSocketAddress',
3216 'vsock': 'VsockSocketAddress',
3222 # Receive a file descriptor via SCM rights and assign it a name
3224 # @fdname: file descriptor name
3226 # Returns: Nothing on success
3230 # Notes: If @fdname already exists, the file descriptor assigned to
3231 # it will be closed and replaced by the received file
3233 # The 'closefd' command can be used to explicitly close the
3234 # file descriptor when it is no longer needed.
3236 { 'command': 'getfd', 'data': {'fdname': 'str'} }
3241 # Close a file descriptor previously passed via SCM rights
3243 # @fdname: file descriptor name
3245 # Returns: Nothing on success
3249 { 'command': 'closefd', 'data': {'fdname': 'str'} }
3254 # Information describing a machine.
3256 # @name: the name of the machine
3258 # @alias: #optional an alias for the machine name
3260 # @is-default: #optional whether the machine is default
3262 # @cpu-max: maximum number of CPUs supported by the machine type
3265 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
3269 { 'struct': 'MachineInfo',
3270 'data': { 'name': 'str', '*alias': 'str',
3271 '*is-default': 'bool', 'cpu-max': 'int',
3272 'hotpluggable-cpus': 'bool'} }
3277 # Return a list of supported machines
3279 # Returns: a list of MachineInfo
3283 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
3286 # @CpuDefinitionInfo:
3288 # Virtual CPU definition.
3290 # @name: the name of the CPU definition
3292 # @migration-safe: #optional whether a CPU definition can be safely used for
3293 # migration in combination with a QEMU compatibility machine
3294 # when migrating between different QMU versions and between
3295 # hosts with different sets of (hardware or software)
3296 # capabilities. If not provided, information is not available
3297 # and callers should not assume the CPU definition to be
3298 # migration-safe. (since 2.8)
3300 # @static: whether a CPU definition is static and will not change depending on
3301 # QEMU version, machine type, machine options and accelerator options.
3302 # A static model is always migration-safe. (since 2.8)
3304 # @unavailable-features: #optional List of properties that prevent
3305 # the CPU model from running in the current
3307 # @typename: Type name that can be used as argument to @device-list-properties,
3308 # to introspect properties configurable using -cpu or -global.
3311 # @unavailable-features is a list of QOM property names that
3312 # represent CPU model attributes that prevent the CPU from running.
3313 # If the QOM property is read-only, that means there's no known
3314 # way to make the CPU model run in the current host. Implementations
3315 # that choose not to provide specific information return the
3316 # property name "type".
3317 # If the property is read-write, it means that it MAY be possible
3318 # to run the CPU model in the current host if that property is
3319 # changed. Management software can use it as hints to suggest or
3320 # choose an alternative for the user, or just to generate meaningful
3321 # error messages explaining why the CPU model can't be used.
3322 # If @unavailable-features is an empty list, the CPU model is
3323 # runnable using the current host and machine-type.
3324 # If @unavailable-features is not present, runnability
3325 # information for the CPU is not available.
3329 { 'struct': 'CpuDefinitionInfo',
3330 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
3331 '*unavailable-features': [ 'str' ], 'typename': 'str' } }
3334 # @query-cpu-definitions:
3336 # Return a list of supported virtual CPU definitions
3338 # Returns: a list of CpuDefInfo
3342 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3347 # Virtual CPU model.
3349 # A CPU model consists of the name of a CPU definition, to which
3350 # delta changes are applied (e.g. features added/removed). Most magic values
3351 # that an architecture might require should be hidden behind the name.
3352 # However, if required, architectures can expose relevant properties.
3354 # @name: the name of the CPU definition the model is based on
3355 # @props: #optional a dictionary of QOM properties to be applied
3359 { 'struct': 'CpuModelInfo',
3360 'data': { 'name': 'str',
3364 # @CpuModelExpansionType:
3366 # An enumeration of CPU model expansion types.
3368 # @static: Expand to a static CPU model, a combination of a static base
3369 # model name and property delta changes. As the static base model will
3370 # never change, the expanded CPU model will be the same, independant of
3371 # independent of QEMU version, machine type, machine options, and
3372 # accelerator options. Therefore, the resulting model can be used by
3373 # tooling without having to specify a compatibility machine - e.g. when
3374 # displaying the "host" model. static CPU models are migration-safe.
3376 # @full: Expand all properties. The produced model is not guaranteed to be
3377 # migration-safe, but allows tooling to get an insight and work with
3382 { 'enum': 'CpuModelExpansionType',
3383 'data': [ 'static', 'full' ] }
3387 # @CpuModelExpansionInfo:
3389 # The result of a cpu model expansion.
3391 # @model: the expanded CpuModelInfo.
3395 { 'struct': 'CpuModelExpansionInfo',
3396 'data': { 'model': 'CpuModelInfo' } }
3400 # @query-cpu-model-expansion:
3402 # Expands a given CPU model (or a combination of CPU model + additional options)
3403 # to different granularities, allowing tooling to get an understanding what a
3404 # specific CPU model looks like in QEMU under a certain configuration.
3406 # This interface can be used to query the "host" CPU model.
3408 # The data returned by this command may be affected by:
3410 # * QEMU version: CPU models may look different depending on the QEMU version.
3411 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3412 # * machine-type: CPU model may look different depending on the machine-type.
3413 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3414 # * machine options (including accelerator): in some architectures, CPU models
3415 # may look different depending on machine and accelerator options. (Except for
3416 # CPU models reported as "static" in query-cpu-definitions.)
3417 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3418 # global properties may affect expansion of CPU models. Using
3419 # query-cpu-model-expansion while using these is not advised.
3421 # Some architectures may not support all expansion types. s390x supports
3422 # "full" and "static".
3424 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
3425 # not supported, if the model cannot be expanded, if the model contains
3426 # an unknown CPU definition name, unknown properties or properties
3427 # with a wrong type. Also returns an error if an expansion type is
3432 { 'command': 'query-cpu-model-expansion',
3433 'data': { 'type': 'CpuModelExpansionType',
3434 'model': 'CpuModelInfo' },
3435 'returns': 'CpuModelExpansionInfo' }
3438 # @CpuModelCompareResult:
3440 # An enumeration of CPU model comparation results. The result is usually
3441 # calculated using e.g. CPU features or CPU generations.
3443 # @incompatible: If model A is incompatible to model B, model A is not
3444 # guaranteed to run where model B runs and the other way around.
3446 # @identical: If model A is identical to model B, model A is guaranteed to run
3447 # where model B runs and the other way around.
3449 # @superset: If model A is a superset of model B, model B is guaranteed to run
3450 # where model A runs. There are no guarantees about the other way.
3452 # @subset: If model A is a subset of model B, model A is guaranteed to run
3453 # where model B runs. There are no guarantees about the other way.
3457 { 'enum': 'CpuModelCompareResult',
3458 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
3461 # @CpuModelCompareInfo:
3463 # The result of a CPU model comparison.
3465 # @result: The result of the compare operation.
3466 # @responsible-properties: List of properties that led to the comparison result
3467 # not being identical.
3469 # @responsible-properties is a list of QOM property names that led to
3470 # both CPUs not being detected as identical. For identical models, this
3472 # If a QOM property is read-only, that means there's no known way to make the
3473 # CPU models identical. If the special property name "type" is included, the
3474 # models are by definition not identical and cannot be made identical.
3478 { 'struct': 'CpuModelCompareInfo',
3479 'data': {'result': 'CpuModelCompareResult',
3480 'responsible-properties': ['str']
3485 # @query-cpu-model-comparison:
3487 # Compares two CPU models, returning how they compare in a specific
3488 # configuration. The results indicates how both models compare regarding
3489 # runnability. This result can be used by tooling to make decisions if a
3490 # certain CPU model will run in a certain configuration or if a compatible
3491 # CPU model has to be created by baselining.
3493 # Usually, a CPU model is compared against the maximum possible CPU model
3494 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
3495 # model is identical or a subset, it will run in that configuration.
3497 # The result returned by this command may be affected by:
3499 # * QEMU version: CPU models may look different depending on the QEMU version.
3500 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3501 # * machine-type: CPU model may look different depending on the machine-type.
3502 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3503 # * machine options (including accelerator): in some architectures, CPU models
3504 # may look different depending on machine and accelerator options. (Except for
3505 # CPU models reported as "static" in query-cpu-definitions.)
3506 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3507 # global properties may affect expansion of CPU models. Using
3508 # query-cpu-model-expansion while using these is not advised.
3510 # Some architectures may not support comparing CPU models. s390x supports
3511 # comparing CPU models.
3513 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
3514 # not supported, if a model cannot be used, if a model contains
3515 # an unknown cpu definition name, unknown properties or properties
3520 { 'command': 'query-cpu-model-comparison',
3521 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
3522 'returns': 'CpuModelCompareInfo' }
3525 # @CpuModelBaselineInfo:
3527 # The result of a CPU model baseline.
3529 # @model: the baselined CpuModelInfo.
3533 { 'struct': 'CpuModelBaselineInfo',
3534 'data': { 'model': 'CpuModelInfo' } }
3537 # @query-cpu-model-baseline:
3539 # Baseline two CPU models, creating a compatible third model. The created
3540 # model will always be a static, migration-safe CPU model (see "static"
3541 # CPU model expansion for details).
3543 # This interface can be used by tooling to create a compatible CPU model out
3544 # two CPU models. The created CPU model will be identical to or a subset of
3545 # both CPU models when comparing them. Therefore, the created CPU model is
3546 # guaranteed to run where the given CPU models run.
3548 # The result returned by this command may be affected by:
3550 # * QEMU version: CPU models may look different depending on the QEMU version.
3551 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3552 # * machine-type: CPU model may look different depending on the machine-type.
3553 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3554 # * machine options (including accelerator): in some architectures, CPU models
3555 # may look different depending on machine and accelerator options. (Except for
3556 # CPU models reported as "static" in query-cpu-definitions.)
3557 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3558 # global properties may affect expansion of CPU models. Using
3559 # query-cpu-model-expansion while using these is not advised.
3561 # Some architectures may not support baselining CPU models. s390x supports
3562 # baselining CPU models.
3564 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
3565 # not supported, if a model cannot be used, if a model contains
3566 # an unknown cpu definition name, unknown properties or properties
3571 { 'command': 'query-cpu-model-baseline',
3572 'data': { 'modela': 'CpuModelInfo',
3573 'modelb': 'CpuModelInfo' },
3574 'returns': 'CpuModelBaselineInfo' }
3579 # Information about a file descriptor that was added to an fd set.
3581 # @fdset-id: The ID of the fd set that @fd was added to.
3583 # @fd: The file descriptor that was received via SCM rights and
3584 # added to the fd set.
3588 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3593 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3595 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3597 # @opaque: #optional A free-form string that can be used to describe the fd.
3599 # Returns: @AddfdInfo on success
3600 # If file descriptor was not received, FdNotSupplied
3601 # If @fdset-id is a negative value, InvalidParameterValue
3603 # Notes: The list of fd sets is shared by all monitor connections.
3605 # If @fdset-id is not specified, a new fd set will be created.
3609 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3610 'returns': 'AddfdInfo' }
3615 # Remove a file descriptor from an fd set.
3617 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3619 # @fd: #optional The file descriptor that is to be removed.
3621 # Returns: Nothing on success
3622 # If @fdset-id or @fd is not found, FdNotFound
3626 # Notes: The list of fd sets is shared by all monitor connections.
3628 # If @fd is not specified, all file descriptors in @fdset-id
3631 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3636 # Information about a file descriptor that belongs to an fd set.
3638 # @fd: The file descriptor value.
3640 # @opaque: #optional A free-form string that can be used to describe the fd.
3644 { 'struct': 'FdsetFdInfo',
3645 'data': {'fd': 'int', '*opaque': 'str'} }
3650 # Information about an fd set.
3652 # @fdset-id: The ID of the fd set.
3654 # @fds: A list of file descriptors that belong to this fd set.
3658 { 'struct': 'FdsetInfo',
3659 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3664 # Return information describing all fd sets.
3666 # Returns: A list of @FdsetInfo
3670 # Note: The list of fd sets is shared by all monitor connections.
3673 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3678 # Information describing the QEMU target.
3680 # @arch: the target architecture (eg "x86_64", "i386", etc)
3684 { 'struct': 'TargetInfo',
3685 'data': { 'arch': 'str' } }
3690 # Return information about the target for this QEMU
3692 # Returns: TargetInfo
3696 { 'command': 'query-target', 'returns': 'TargetInfo' }
3701 # An enumeration of key name.
3703 # This is used by the @send-key command.
3705 # @unmapped: since 2.0
3708 # @kp_comma: since 2.4
3709 # @kp_equals: since 2.6
3711 # @hiragana: since 2.9
3712 # @henkan: since 2.9
3718 { 'enum': 'QKeyCode',
3719 'data': [ 'unmapped',
3720 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3721 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3722 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3723 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3724 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3725 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3726 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3727 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3728 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3729 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3730 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3731 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3732 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3733 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3734 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
3735 'ro', 'hiragana', 'henkan', 'yen',
3736 'kp_comma', 'kp_equals', 'power' ] }
3741 # Represents a keyboard key.
3745 { 'union': 'KeyValue',
3748 'qcode': 'QKeyCode' } }
3753 # Send keys to guest.
3755 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3756 # simultaneously sent to the guest. A @KeyValue.number value is sent
3757 # directly to the guest, while @KeyValue.qcode must be a valid
3760 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3763 # Returns: Nothing on success
3764 # If key is unknown or redundant, InvalidParameter
3769 { 'command': 'send-key',
3770 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3775 # Write a PPM of the VGA screen to a file.
3777 # @filename: the path of a new PPM file to store the image
3779 # Returns: Nothing on success
3783 { 'command': 'screendump', 'data': {'filename': 'str'} }
3789 # Configuration shared across all chardev backends
3791 # @logfile: #optional The name of a logfile to save output
3792 # @logappend: #optional true to append instead of truncate
3793 # (default to false to truncate)
3797 { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
3798 '*logappend': 'bool' } }
3803 # Configuration info for file chardevs.
3805 # @in: #optional The name of the input file
3806 # @out: The name of the output file
3807 # @append: #optional Open the file in append mode (default false to
3808 # truncate) (Since 2.6)
3812 { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
3814 '*append': 'bool' },
3815 'base': 'ChardevCommon' }
3820 # Configuration info for device and pipe chardevs.
3822 # @device: The name of the special file for the device,
3823 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
3827 { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
3828 'base': 'ChardevCommon' }
3833 # Configuration info for (stream) socket chardevs.
3835 # @addr: socket address to listen on (server=true)
3836 # or connect to (server=false)
3837 # @tls-creds: #optional the ID of the TLS credentials object (since 2.6)
3838 # @server: #optional create server socket (default: true)
3839 # @wait: #optional wait for incoming connection on server
3840 # sockets (default: false).
3841 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3842 # @telnet: #optional enable telnet protocol on server
3843 # sockets (default: false)
3844 # @reconnect: #optional For a client socket, if a socket is disconnected,
3845 # then attempt a reconnect after the given number of seconds.
3846 # Setting this to zero disables this function. (default: 0)
3851 { 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3852 '*tls-creds' : 'str',
3855 '*nodelay' : 'bool',
3857 '*reconnect' : 'int' },
3858 'base': 'ChardevCommon' }
3863 # Configuration info for datagram socket chardevs.
3865 # @remote: remote address
3866 # @local: #optional local address
3870 { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3871 '*local' : 'SocketAddress' },
3872 'base': 'ChardevCommon' }
3877 # Configuration info for mux chardevs.
3879 # @chardev: name of the base chardev.
3883 { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
3884 'base': 'ChardevCommon' }
3889 # Configuration info for stdio chardevs.
3891 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3892 # be delivered to qemu. Default: true in -nographic mode,
3897 { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
3898 'base': 'ChardevCommon' }
3902 # @ChardevSpiceChannel:
3904 # Configuration info for spice vm channel chardevs.
3906 # @type: kind of channel (for example vdagent).
3910 { 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' },
3911 'base': 'ChardevCommon' }
3914 # @ChardevSpicePort:
3916 # Configuration info for spice port chardevs.
3918 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3922 { 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' },
3923 'base': 'ChardevCommon' }
3928 # Configuration info for virtual console chardevs.
3930 # @width: console width, in pixels
3931 # @height: console height, in pixels
3932 # @cols: console width, in chars
3933 # @rows: console height, in chars
3937 { 'struct': 'ChardevVC', 'data': { '*width' : 'int',
3941 'base': 'ChardevCommon' }
3946 # Configuration info for ring buffer chardevs.
3948 # @size: #optional ring buffer size, must be power of two, default is 65536
3952 { 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' },
3953 'base': 'ChardevCommon' }
3958 # Configuration info for the new chardev backend.
3960 # Since: 1.4 (testdev since 2.2)
3962 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
3963 'serial' : 'ChardevHostdev',
3964 'parallel': 'ChardevHostdev',
3965 'pipe' : 'ChardevHostdev',
3966 'socket' : 'ChardevSocket',
3967 'udp' : 'ChardevUdp',
3968 'pty' : 'ChardevCommon',
3969 'null' : 'ChardevCommon',
3970 'mux' : 'ChardevMux',
3971 'msmouse': 'ChardevCommon',
3972 'braille': 'ChardevCommon',
3973 'testdev': 'ChardevCommon',
3974 'stdio' : 'ChardevStdio',
3975 'console': 'ChardevCommon',
3976 'spicevmc' : 'ChardevSpiceChannel',
3977 'spiceport' : 'ChardevSpicePort',
3979 'ringbuf': 'ChardevRingbuf',
3980 # next one is just for compatibility
3981 'memory' : 'ChardevRingbuf' } }
3986 # Return info about the chardev backend just created.
3988 # @pty: #optional name of the slave pseudoterminal device, present if
3989 # and only if a chardev of type 'pty' was created
3993 { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3998 # Add a character device backend
4000 # @id: the chardev's ID, must be unique
4001 # @backend: backend type and parameters
4003 # Returns: ChardevReturn.
4007 { 'command': 'chardev-add', 'data': {'id' : 'str',
4008 'backend' : 'ChardevBackend' },
4009 'returns': 'ChardevReturn' }
4014 # Remove a character device backend
4016 # @id: the chardev's ID, must exist and not be in use
4018 # Returns: Nothing on success
4022 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
4027 # An enumeration of TPM models
4029 # @tpm-tis: TPM TIS model
4033 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
4036 # @query-tpm-models:
4038 # Return a list of supported TPM models
4040 # Returns: a list of TpmModel
4044 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
4049 # An enumeration of TPM types
4051 # @passthrough: TPM passthrough type
4055 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
4060 # Return a list of supported TPM types
4062 # Returns: a list of TpmType
4066 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
4069 # @TPMPassthroughOptions:
4071 # Information about the TPM passthrough type
4073 # @path: #optional string describing the path used for accessing the TPM device
4075 # @cancel-path: #optional string showing the TPM's sysfs cancel file
4076 # for cancellation of TPM commands while they are executing
4080 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
4081 '*cancel-path' : 'str'} }
4086 # A union referencing different TPM backend types' configuration options
4088 # @type: 'passthrough' The configuration options for the TPM passthrough type
4092 { 'union': 'TpmTypeOptions',
4093 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
4098 # Information about the TPM
4100 # @id: The Id of the TPM
4102 # @model: The TPM frontend model
4104 # @options: The TPM (backend) type configuration options
4108 { 'struct': 'TPMInfo',
4109 'data': {'id': 'str',
4110 'model': 'TpmModel',
4111 'options': 'TpmTypeOptions' } }
4116 # Return information about the TPM device
4118 # Returns: @TPMInfo on success
4122 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
4125 # @AcpiTableOptions:
4127 # Specify an ACPI table on the command line to load.
4129 # At most one of @file and @data can be specified. The list of files specified
4130 # by any one of them is loaded and concatenated in order. If both are omitted,
4133 # Other fields / optargs can be used to override fields of the generic ACPI
4134 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
4135 # Description Table Header. If a header field is not overridden, then the
4136 # corresponding value from the concatenated blob is used (in case of @file), or
4137 # it is filled in with a hard-coded value (in case of @data).
4139 # String fields are copied into the matching ACPI member from lowest address
4140 # upwards, and silently truncated / NUL-padded to length.
4142 # @sig: #optional table signature / identifier (4 bytes)
4144 # @rev: #optional table revision number (dependent on signature, 1 byte)
4146 # @oem_id: #optional OEM identifier (6 bytes)
4148 # @oem_table_id: #optional OEM table identifier (8 bytes)
4150 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
4152 # @asl_compiler_id: #optional identifier of the utility that created the table
4155 # @asl_compiler_rev: #optional revision number of the utility that created the
4158 # @file: #optional colon (:) separated list of pathnames to load and
4159 # concatenate as table data. The resultant binary blob is expected to
4160 # have an ACPI table header. At least one file is required. This field
4163 # @data: #optional colon (:) separated list of pathnames to load and
4164 # concatenate as table data. The resultant binary blob must not have an
4165 # ACPI table header. At least one file is required. This field excludes
4170 { 'struct': 'AcpiTableOptions',
4175 '*oem_table_id': 'str',
4176 '*oem_rev': 'uint32',
4177 '*asl_compiler_id': 'str',
4178 '*asl_compiler_rev': 'uint32',
4183 # @CommandLineParameterType:
4185 # Possible types for an option parameter.
4187 # @string: accepts a character string
4189 # @boolean: accepts "on" or "off"
4191 # @number: accepts a number
4193 # @size: accepts a number followed by an optional suffix (K)ilo,
4194 # (M)ega, (G)iga, (T)era
4198 { 'enum': 'CommandLineParameterType',
4199 'data': ['string', 'boolean', 'number', 'size'] }
4202 # @CommandLineParameterInfo:
4204 # Details about a single parameter of a command line option.
4206 # @name: parameter name
4208 # @type: parameter @CommandLineParameterType
4210 # @help: #optional human readable text string, not suitable for parsing.
4212 # @default: #optional default value string (since 2.1)
4216 { 'struct': 'CommandLineParameterInfo',
4217 'data': { 'name': 'str',
4218 'type': 'CommandLineParameterType',
4220 '*default': 'str' } }
4223 # @CommandLineOptionInfo:
4225 # Details about a command line option, including its list of parameter details
4227 # @option: option name
4229 # @parameters: an array of @CommandLineParameterInfo
4233 { 'struct': 'CommandLineOptionInfo',
4234 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
4237 # @query-command-line-options:
4239 # Query command line option schema.
4241 # @option: #optional option name
4243 # Returns: list of @CommandLineOptionInfo for all options (or for the given
4244 # @option). Returns an error if the given @option doesn't exist.
4248 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
4249 'returns': ['CommandLineOptionInfo'] }
4252 # @X86CPURegister32:
4254 # A X86 32-bit register
4258 { 'enum': 'X86CPURegister32',
4259 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4262 # @X86CPUFeatureWordInfo:
4264 # Information about a X86 CPU feature word
4266 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4268 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
4271 # @cpuid-register: Output register containing the feature bits
4273 # @features: value of output register, containing the feature bits
4277 { 'struct': 'X86CPUFeatureWordInfo',
4278 'data': { 'cpuid-input-eax': 'int',
4279 '*cpuid-input-ecx': 'int',
4280 'cpuid-register': 'X86CPURegister32',
4281 'features': 'int' } }
4284 # @DummyForceArrays:
4286 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
4290 { 'struct': 'DummyForceArrays',
4291 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
4297 # Packets receiving state
4299 # @normal: filter assigned packets according to the mac-table
4301 # @none: don't receive any assigned packet
4303 # @all: receive all assigned packets
4307 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
4312 # Rx-filter information for a NIC.
4314 # @name: net client name
4316 # @promiscuous: whether promiscuous mode is enabled
4318 # @multicast: multicast receive state
4320 # @unicast: unicast receive state
4322 # @vlan: vlan receive state (Since 2.0)
4324 # @broadcast-allowed: whether to receive broadcast
4326 # @multicast-overflow: multicast table is overflowed or not
4328 # @unicast-overflow: unicast table is overflowed or not
4330 # @main-mac: the main macaddr string
4332 # @vlan-table: a list of active vlan id
4334 # @unicast-table: a list of unicast macaddr string
4336 # @multicast-table: a list of multicast macaddr string
4340 { 'struct': 'RxFilterInfo',
4343 'promiscuous': 'bool',
4344 'multicast': 'RxState',
4345 'unicast': 'RxState',
4347 'broadcast-allowed': 'bool',
4348 'multicast-overflow': 'bool',
4349 'unicast-overflow': 'bool',
4351 'vlan-table': ['int'],
4352 'unicast-table': ['str'],
4353 'multicast-table': ['str'] }}
4358 # Return rx-filter information for all NICs (or for the given NIC).
4360 # @name: #optional net client name
4362 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4363 # Returns an error if the given @name doesn't exist, or given
4364 # NIC doesn't support rx-filter querying, or given net client
4369 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4370 'returns': ['RxFilterInfo'] }
4375 # Button of a pointer input device (mouse, tablet).
4379 { 'enum' : 'InputButton',
4380 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down' ] }
4385 # Position axis of a pointer input device (mouse, tablet).
4389 { 'enum' : 'InputAxis',
4390 'data' : [ 'x', 'y' ] }
4395 # Keyboard input event.
4397 # @key: Which key this event is for.
4398 # @down: True for key-down and false for key-up events.
4402 { 'struct' : 'InputKeyEvent',
4403 'data' : { 'key' : 'KeyValue',
4409 # Pointer button input event.
4411 # @button: Which button this event is for.
4412 # @down: True for key-down and false for key-up events.
4416 { 'struct' : 'InputBtnEvent',
4417 'data' : { 'button' : 'InputButton',
4423 # Pointer motion input event.
4425 # @axis: Which axis is referenced by @value.
4426 # @value: Pointer position. For absolute coordinates the
4427 # valid range is 0 -> 0x7ffff
4431 { 'struct' : 'InputMoveEvent',
4432 'data' : { 'axis' : 'InputAxis',
4438 # Input event union.
4440 # @type: the input type, one of:
4441 # - 'key': Input event of Keyboard
4442 # - 'btn': Input event of pointer buttons
4443 # - 'rel': Input event of relative pointer motion
4444 # - 'abs': Input event of absolute pointer motion
4448 { 'union' : 'InputEvent',
4449 'data' : { 'key' : 'InputKeyEvent',
4450 'btn' : 'InputBtnEvent',
4451 'rel' : 'InputMoveEvent',
4452 'abs' : 'InputMoveEvent' } }
4455 # @input-send-event:
4457 # Send input event(s) to guest.
4459 # @device: #optional display device to send event(s) to.
4460 # @head: #optional head to send event(s) to, in case the
4461 # display device supports multiple scanouts.
4462 # @events: List of InputEvent union.
4464 # Returns: Nothing on success.
4466 # The @display and @head parameters can be used to send the input
4467 # event to specific input devices in case (a) multiple input devices
4468 # of the same kind are added to the virtual machine and (b) you have
4469 # configured input routing (see docs/multiseat.txt) for those input
4470 # devices. The parameters work exactly like the device and head
4471 # properties of input devices. If @device is missing, only devices
4472 # that have no input routing config are admissible. If @device is
4473 # specified, both input devices with and without input routing config
4474 # are admissible, but devices with input routing config take
4479 { 'command': 'input-send-event',
4480 'data': { '*device': 'str',
4482 'events' : [ 'InputEvent' ] } }
4487 # A discriminated record of NUMA options. (for OptsVisitor)
4491 { 'union': 'NumaOptions',
4493 'node': 'NumaNodeOptions' }}
4498 # Create a guest NUMA node. (for OptsVisitor)
4500 # @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
4502 # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
4505 # @mem: #optional memory size of this node; mutually exclusive with @memdev.
4506 # Equally divide total memory among nodes if both @mem and @memdev are
4509 # @memdev: #optional memory backend object. If specified for one node,
4510 # it must be specified for all nodes.
4514 { 'struct': 'NumaNodeOptions',
4516 '*nodeid': 'uint16',
4517 '*cpus': ['uint16'],
4524 # Host memory policy types
4526 # @default: restore default policy, remove any nondefault policy
4528 # @preferred: set the preferred host nodes for allocation
4530 # @bind: a strict policy that restricts memory allocation to the
4531 # host nodes specified
4533 # @interleave: memory allocations are interleaved across the set
4534 # of host nodes specified
4538 { 'enum': 'HostMemPolicy',
4539 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
4544 # Information about memory backend
4546 # @id: #optional backend's ID if backend has 'id' property (since 2.9)
4548 # @size: memory backend size
4550 # @merge: enables or disables memory merge support
4552 # @dump: includes memory backend's memory in a core dump or not
4554 # @prealloc: enables or disables memory preallocation
4556 # @host-nodes: host nodes for its memory policy
4558 # @policy: memory policy of memory backend
4562 { 'struct': 'Memdev',
4569 'host-nodes': ['uint16'],
4570 'policy': 'HostMemPolicy' }}
4575 # Returns information for all memory backends.
4577 # Returns: a list of @Memdev.
4581 { 'command': 'query-memdev', 'returns': ['Memdev'] }
4584 # @PCDIMMDeviceInfo:
4586 # PCDIMMDevice state information
4588 # @id: #optional device's ID
4590 # @addr: physical address, where device is mapped
4592 # @size: size of memory that the device provides
4594 # @slot: slot number at which device is plugged in
4596 # @node: NUMA node number where device is plugged in
4598 # @memdev: memory backend linked with device
4600 # @hotplugged: true if device was hotplugged
4602 # @hotpluggable: true if device if could be added/removed while machine is running
4606 { 'struct': 'PCDIMMDeviceInfo',
4607 'data': { '*id': 'str',
4613 'hotplugged': 'bool',
4614 'hotpluggable': 'bool'
4619 # @MemoryDeviceInfo:
4621 # Union containing information about a memory device
4625 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
4628 # @query-memory-devices:
4630 # Lists available memory devices and their state
4634 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
4639 # @DIMM: memory slot
4640 # @CPU: logical CPU slot (since 2.7)
4642 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
4647 # OSPM Status Indication for a device
4648 # For description of possible values of @source and @status fields
4649 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
4651 # @device: #optional device ID associated with slot
4653 # @slot: slot ID, unique per slot of a given @slot-type
4655 # @slot-type: type of the slot
4657 # @source: an integer containing the source event
4659 # @status: an integer containing the status code
4663 { 'struct': 'ACPIOSTInfo',
4664 'data' : { '*device': 'str',
4666 'slot-type': 'ACPISlotType',
4671 # @query-acpi-ospm-status:
4673 # Lists ACPI OSPM status of ACPI device objects,
4674 # which might be reported via _OST method
4678 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
4681 # @WatchdogExpirationAction:
4683 # An enumeration of the actions taken when the watchdog device's timer is
4686 # @reset: system resets
4688 # @shutdown: system shutdown, note that it is similar to @powerdown, which
4689 # tries to set to system status and notify guest
4691 # @poweroff: system poweroff, the emulator program exits
4693 # @pause: system pauses, similar to @stop
4695 # @debug: system enters debug state
4697 # @none: nothing is done
4699 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
4700 # VCPUS on x86) (since 2.4)
4704 { 'enum': 'WatchdogExpirationAction',
4705 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
4711 # An enumeration of the I/O operation types
4713 # @read: read operation
4715 # @write: write operation
4719 { 'enum': 'IoOperationType',
4720 'data': [ 'read', 'write' ] }
4723 # @GuestPanicAction:
4725 # An enumeration of the actions taken when guest OS panic is detected
4727 # @pause: system pauses
4729 # Since: 2.1 (poweroff since 2.8)
4731 { 'enum': 'GuestPanicAction',
4732 'data': [ 'pause', 'poweroff' ] }
4735 # @rtc-reset-reinjection:
4737 # This command will reset the RTC interrupt reinjection backlog.
4738 # Can be used if another mechanism to synchronize guest time
4739 # is in effect, for example QEMU guest agent's guest-set-time
4744 { 'command': 'rtc-reset-reinjection' }
4746 # Rocker ethernet network switch
4747 { 'include': 'qapi/rocker.json' }
4752 # Mode of the replay subsystem.
4754 # @none: normal execution mode. Replay or record are not enabled.
4756 # @record: record mode. All non-deterministic data is written into the
4759 # @play: replay mode. Non-deterministic data required for system execution
4760 # is read from the log.
4764 { 'enum': 'ReplayMode',
4765 'data': [ 'none', 'record', 'play' ] }
4768 # @xen-load-devices-state:
4770 # Load the state of all devices from file. The RAM and the block devices
4771 # of the VM are not loaded by this command.
4773 # @filename: the file to load the state of the devices from as binary
4774 # data. See xen-save-devices-state.txt for a description of the binary
4779 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
4784 # The struct describes capability for a specific GIC (Generic
4785 # Interrupt Controller) version. These bits are not only decided by
4786 # QEMU/KVM software version, but also decided by the hardware that
4787 # the program is running upon.
4789 # @version: version of GIC to be described. Currently, only 2 and 3
4792 # @emulated: whether current QEMU/hardware supports emulated GIC
4793 # device in user space.
4795 # @kernel: whether current QEMU/hardware supports hardware
4796 # accelerated GIC device in kernel.
4800 { 'struct': 'GICCapability',
4801 'data': { 'version': 'int',
4803 'kernel': 'bool' } }
4806 # @query-gic-capabilities:
4808 # This command is ARM-only. It will return a list of GICCapability
4809 # objects that describe its capability bits.
4811 # Returns: a list of GICCapability objects.
4815 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
4818 # @CpuInstanceProperties:
4820 # List of properties to be used for hotplugging a CPU instance,
4821 # it should be passed by management with device_add command when
4822 # a CPU is being hotplugged.
4824 # @node-id: #optional NUMA node ID the CPU belongs to
4825 # @socket-id: #optional socket number within node/board the CPU belongs to
4826 # @core-id: #optional core number within socket the CPU belongs to
4827 # @thread-id: #optional thread number within core the CPU belongs to
4829 # Note: currently there are 4 properties that could be present
4830 # but management should be prepared to pass through other
4831 # properties with device_add command to allow for future
4832 # interface extension. This also requires the filed names to be kept in
4833 # sync with the properties passed to -device/device_add.
4837 { 'struct': 'CpuInstanceProperties',
4838 'data': { '*node-id': 'int',
4839 '*socket-id': 'int',
4848 # @type: CPU object type for usage with device_add command
4849 # @props: list of properties to be used for hotplugging CPU
4850 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
4851 # @qom-path: #optional link to existing CPU object if CPU is present or
4852 # omitted if CPU is not present.
4856 { 'struct': 'HotpluggableCPU',
4857 'data': { 'type': 'str',
4858 'vcpus-count': 'int',
4859 'props': 'CpuInstanceProperties',
4865 # @query-hotpluggable-cpus:
4867 # Returns: a list of HotpluggableCPU objects.
4871 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }