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' }
26 # Enable QMP capabilities.
32 # -> { "execute": "qmp_capabilities" }
35 # Notes: This command is valid exactly when first connecting: it must be
36 # issued before any other command will be accepted, and will fail once the
37 # monitor is accepting other commands. (see qemu docs/qmp-spec.txt)
42 { 'command': 'qmp_capabilities' }
47 # Policy for handling lost ticks in timer devices.
49 # @discard: throw away the missed tick(s) and continue with future injection
50 # normally. Guest time may be delayed, unless the OS has explicit
51 # handling of lost ticks
53 # @delay: continue to deliver ticks at the normal rate. Guest time will be
54 # delayed due to the late tick
56 # @merge: merge the missed tick(s) into one tick and inject. Guest time
57 # may be delayed, depending on how the OS reacts to the merging
60 # @slew: deliver ticks at a higher rate to catch up with the missed tick. The
61 # guest time should not be delayed once catchup is complete.
65 { 'enum': 'LostTickPolicy',
66 'data': ['discard', 'delay', 'merge', 'slew' ] }
70 # Allow client connections for VNC, Spice and socket based
71 # character devices to be passed in to QEMU via SCM_RIGHTS.
73 # @protocol: protocol name. Valid names are "vnc", "spice" or the
74 # name of a character device (eg. from -chardev id=XXXX)
76 # @fdname: file descriptor name previously passed via 'getfd' command
78 # @skipauth: #optional whether to skip authentication. Only applies
79 # to "vnc" and "spice" protocols
81 # @tls: #optional whether to perform TLS. Only applies to the "spice"
84 # Returns: nothing on success.
88 { 'command': 'add_client',
89 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
95 # Guest name information.
97 # @name: #optional The name of the guest
101 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
106 # Return the name information of a guest.
108 # Returns: @NameInfo of the guest
112 { 'command': 'query-name', 'returns': 'NameInfo' }
117 # Information about support for KVM acceleration
119 # @enabled: true if KVM acceleration is active
121 # @present: true if KVM acceleration is built into this executable
125 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
130 # Returns information about KVM acceleration
136 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
141 # An enumeration of VM run states.
143 # @debug: QEMU is running on a debugger
145 # @finish-migrate: guest is paused to finish the migration process
147 # @inmigrate: guest is paused waiting for an incoming migration. Note
148 # that this state does not tell whether the machine will start at the
149 # end of the migration. This depends on the command-line -S option and
150 # any invocation of 'stop' or 'cont' that has happened since QEMU was
153 # @internal-error: An internal error that prevents further guest execution
156 # @io-error: the last IOP has failed and the device is configured to pause
159 # @paused: guest has been paused via the 'stop' command
161 # @postmigrate: guest is paused following a successful 'migrate'
163 # @prelaunch: QEMU was started with -S and guest has not started
165 # @restore-vm: guest is paused to restore VM state
167 # @running: guest is actively running
169 # @save-vm: guest is paused to save the VM state
171 # @shutdown: guest is shut down (and -no-shutdown is in use)
173 # @suspended: guest is suspended (ACPI S3)
175 # @watchdog: the watchdog action is configured to pause and has been triggered
177 # @guest-panicked: guest has been panicked as a result of guest OS panic
179 { 'enum': 'RunState',
180 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
181 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
182 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
188 # Information about VCPU run state
190 # @running: true if all VCPUs are runnable, false if not runnable
192 # @singlestep: true if VCPUs are in single-step mode
194 # @status: the virtual machine @RunState
198 # Notes: @singlestep is enabled through the GDB stub
200 { 'struct': 'StatusInfo',
201 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
206 # Query the run status of all VCPUs
208 # Returns: @StatusInfo reflecting all VCPUs
212 { 'command': 'query-status', 'returns': 'StatusInfo' }
217 # Guest UUID information.
219 # @UUID: the UUID of the guest
223 # Notes: If no UUID was specified for the guest, a null UUID is returned.
225 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
230 # Query the guest UUID information.
232 # Returns: The @UuidInfo for the guest
236 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
241 # Information about a character device.
243 # @label: the label of the character device
245 # @filename: the filename of the character device
247 # @frontend-open: shows whether the frontend device attached to this backend
248 # (eg. with the chardev=... option) is in open or closed state
251 # Notes: @filename is encoded using the QEMU command line character device
252 # encoding. See the QEMU man page for details.
256 { 'struct': 'ChardevInfo', 'data': {'label': 'str',
258 'frontend-open': 'bool'} }
263 # Returns information about current character devices.
265 # Returns: a list of @ChardevInfo
269 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
272 # @ChardevBackendInfo:
274 # Information about a character device backend
276 # @name: The backend name
280 { 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} }
283 # @query-chardev-backends:
285 # Returns information about character device backends.
287 # Returns: a list of @ChardevBackendInfo
291 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
296 # An enumeration of data format.
298 # @utf8: Data is a UTF-8 string (RFC 3629)
300 # @base64: Data is Base64 encoded binary (RFC 3548)
304 { 'enum': 'DataFormat',
305 'data': [ 'utf8', 'base64' ] }
310 # Write to a ring buffer character device.
312 # @device: the ring buffer character device name
314 # @data: data to write
316 # @format: #optional data encoding (default 'utf8').
317 # - base64: data must be base64 encoded text. Its binary
318 # decoding gets written.
319 # - utf8: data's UTF-8 encoding is written
320 # - data itself is always Unicode regardless of format, like
323 # Returns: Nothing on success
327 { 'command': 'ringbuf-write',
328 'data': {'device': 'str', 'data': 'str',
329 '*format': 'DataFormat'} }
334 # Read from a ring buffer character device.
336 # @device: the ring buffer character device name
338 # @size: how many bytes to read at most
340 # @format: #optional data encoding (default 'utf8').
341 # - base64: the data read is returned in base64 encoding.
342 # - utf8: the data read is interpreted as UTF-8.
343 # Bug: can screw up when the buffer contains invalid UTF-8
344 # sequences, NUL characters, after the ring buffer lost
345 # data, and when reading stops because the size limit is
347 # - The return value is always Unicode regardless of format,
348 # like any other string.
350 # Returns: data read from the device
354 { 'command': 'ringbuf-read',
355 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
361 # Information about a QMP event
363 # @name: The event name
367 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
372 # Return a list of supported QMP events by this server
374 # Returns: A list of @EventInfo for all supported events
378 { 'command': 'query-events', 'returns': ['EventInfo'] }
383 # Detailed migration status.
385 # @transferred: amount of bytes already transferred to the target VM
387 # @remaining: amount of bytes remaining to be transferred to the target VM
389 # @total: total amount of bytes involved in the migration process
391 # @duplicate: number of duplicate (zero) pages (since 1.2)
393 # @skipped: number of skipped zero pages (since 1.5)
395 # @normal : number of normal pages (since 1.2)
397 # @normal-bytes: number of normal bytes sent (since 1.2)
399 # @dirty-pages-rate: number of pages dirtied by second by the
402 # @mbps: throughput in megabits/sec. (since 1.6)
404 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
406 # @postcopy-requests: The number of page requests received from the destination
411 { 'struct': 'MigrationStats',
412 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
413 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
414 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
415 'mbps' : 'number', 'dirty-sync-count' : 'int',
416 'postcopy-requests' : 'int' } }
421 # Detailed XBZRLE migration cache statistics
423 # @cache-size: XBZRLE cache size
425 # @bytes: amount of bytes already transferred to the target VM
427 # @pages: amount of pages transferred to the target VM
429 # @cache-miss: number of cache miss
431 # @cache-miss-rate: rate of cache miss (since 2.1)
433 # @overflow: number of overflows
437 { 'struct': 'XBZRLECacheStats',
438 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
439 'cache-miss': 'int', 'cache-miss-rate': 'number',
440 'overflow': 'int' } }
444 # An enumeration of migration status.
446 # @none: no migration has ever happened.
448 # @setup: migration process has been initiated.
450 # @cancelling: in the process of cancelling migration.
452 # @cancelled: cancelling migration is finished.
454 # @active: in the process of doing migration.
456 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
458 # @completed: migration is finished.
460 # @failed: some error occurred during migration process.
465 { 'enum': 'MigrationStatus',
466 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
467 'active', 'postcopy-active', 'completed', 'failed' ] }
472 # Information about current migration process.
474 # @status: #optional @MigrationStatus describing the current migration status.
475 # If this field is not returned, no migration process
478 # @ram: #optional @MigrationStats containing detailed migration
479 # status, only returned if status is 'active' or
480 # 'completed'(since 1.2)
482 # @disk: #optional @MigrationStats containing detailed disk migration
483 # status, only returned if status is 'active' and it is a block
486 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
487 # migration statistics, only returned if XBZRLE feature is on and
488 # status is 'active' or 'completed' (since 1.2)
490 # @total-time: #optional total amount of milliseconds since migration started.
491 # If migration has ended, it returns the total migration
494 # @downtime: #optional only present when migration finishes correctly
495 # total downtime in milliseconds for the guest.
498 # @expected-downtime: #optional only present while migration is active
499 # expected downtime in milliseconds for the guest in last walk
500 # of the dirty bitmap. (since 1.3)
502 # @setup-time: #optional amount of setup time in milliseconds _before_ the
503 # iterations begin but _after_ the QMP command is issued. This is designed
504 # to provide an accounting of any activities (such as RDMA pinning) which
505 # may be expensive, but do not actually occur during the iterative
506 # migration rounds themselves. (since 1.6)
508 # @cpu-throttle-percentage: #optional percentage of time guest cpus are being
509 # throttled during auto-converge. This is only present when auto-converge
510 # has started throttling guest cpus. (Since 2.7)
512 # @error-desc: #optional the human readable error description string, when
513 # @status is 'failed'. Clients should not attempt to parse the
514 # error strings. (Since 2.7)
518 { 'struct': 'MigrationInfo',
519 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
520 '*disk': 'MigrationStats',
521 '*xbzrle-cache': 'XBZRLECacheStats',
522 '*total-time': 'int',
523 '*expected-downtime': 'int',
525 '*setup-time': 'int',
526 '*cpu-throttle-percentage': 'int',
527 '*error-desc': 'str'} }
532 # Returns information about current migration process.
534 # Returns: @MigrationInfo
538 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
541 # @MigrationCapability
543 # Migration capabilities enumeration
545 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
546 # This feature allows us to minimize migration traffic for certain work
547 # loads, by sending compressed difference of the pages
549 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
550 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
551 # Disabled by default. (since 2.0)
553 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
554 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
555 # source and target VM to support this feature. To enable it is sufficient
556 # to enable the capability on the source VM. The feature is disabled by
557 # default. (since 1.6)
559 # @compress: Use multiple compression threads to accelerate live migration.
560 # This feature can help to reduce the migration traffic, by sending
561 # compressed pages. Please note that if compress and xbzrle are both
562 # on, compress only takes effect in the ram bulk stage, after that,
563 # it will be disabled and only xbzrle takes effect, this can help to
564 # minimize migration traffic. The feature is disabled by default.
567 # @events: generate events for each migration state change
570 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
571 # to speed up convergence of RAM migration. (since 1.6)
573 # @postcopy-ram: Start executing on the migration target before all of RAM has
574 # been migrated, pulling the remaining pages along as needed. NOTE: If
575 # the migration fails during postcopy the VM will fail. (since 2.6)
579 { 'enum': 'MigrationCapability',
580 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
581 'compress', 'events', 'postcopy-ram'] }
584 # @MigrationCapabilityStatus
586 # Migration capability information
588 # @capability: capability enum
590 # @state: capability state bool
594 { 'struct': 'MigrationCapabilityStatus',
595 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
598 # @migrate-set-capabilities
600 # Enable/Disable the following migration capabilities (like xbzrle)
602 # @capabilities: json array of capability modifications to make
606 { 'command': 'migrate-set-capabilities',
607 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
610 # @query-migrate-capabilities
612 # Returns information about the current migration capabilities status
614 # Returns: @MigrationCapabilitiesStatus
618 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
620 # @MigrationParameter
622 # Migration parameters enumeration
624 # @compress-level: Set the compression level to be used in live migration,
625 # the compression level is an integer between 0 and 9, where 0 means
626 # no compression, 1 means the best compression speed, and 9 means best
627 # compression ratio which will consume more CPU.
629 # @compress-threads: Set compression thread count to be used in live migration,
630 # the compression thread count is an integer between 1 and 255.
632 # @decompress-threads: Set decompression thread count to be used in live
633 # migration, the decompression thread count is an integer between 1
634 # and 255. Usually, decompression is at least 4 times as fast as
635 # compression, so set the decompress-threads to the number about 1/4
636 # of compress-threads is adequate.
638 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
639 # when migration auto-converge is activated. The
640 # default value is 20. (Since 2.7)
642 # @cpu-throttle-increment: throttle percentage increase each time
643 # auto-converge detects that migration is not making
644 # progress. The default value is 10. (Since 2.7)
646 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
647 # establishing a TLS connection over the migration data channel.
648 # On the outgoing side of the migration, the credentials must
649 # be for a 'client' endpoint, while for the incoming side the
650 # credentials must be for a 'server' endpoint. Setting this
651 # will enable TLS for all migrations. The default is unset,
652 # resulting in unsecured migration at the QEMU level. (Since 2.7)
654 # @tls-hostname: hostname of the target host for the migration. This is
655 # required when using x509 based TLS credentials and the
656 # migration URI does not already include a hostname. For
657 # example if using fd: or exec: based migration, the
658 # hostname must be provided so that the server's x509
659 # certificate identity can be validated. (Since 2.7)
661 # @max-bandwidth: to set maximum speed for migration. maximum speed in
662 # bytes per second. (Since 2.8)
664 # @downtime-limit: set maximum tolerated downtime for migration. maximum
665 # downtime in milliseconds (Since 2.8)
669 { 'enum': 'MigrationParameter',
670 'data': ['compress-level', 'compress-threads', 'decompress-threads',
671 'cpu-throttle-initial', 'cpu-throttle-increment',
672 'tls-creds', 'tls-hostname', 'max-bandwidth',
676 # @migrate-set-parameters
678 # Set various migration parameters. See MigrationParameters for details.
682 { 'command': 'migrate-set-parameters', 'boxed': true,
683 'data': 'MigrationParameters' }
686 # @MigrationParameters
688 # Optional members can be omitted on input ('migrate-set-parameters')
689 # but most members will always be present on output
690 # ('query-migrate-parameters'), with the exception of tls-creds and
693 # @compress-level: #optional compression level
695 # @compress-threads: #optional compression thread count
697 # @decompress-threads: #optional decompression thread count
699 # @cpu-throttle-initial: #optional Initial percentage of time guest cpus are
700 # throttledwhen migration auto-converge is activated.
701 # The default value is 20. (Since 2.7)
703 # @cpu-throttle-increment: #optional throttle percentage increase each time
704 # auto-converge detects that migration is not making
705 # progress. The default value is 10. (Since 2.7)
707 # @tls-creds: #optional ID of the 'tls-creds' object that provides credentials
708 # for establishing a TLS connection over the migration data
709 # channel. On the outgoing side of the migration, the credentials
710 # must be for a 'client' endpoint, while for the incoming side the
711 # credentials must be for a 'server' endpoint. Setting this
712 # will enable TLS for all migrations. The default is unset,
713 # resulting in unsecured migration at the QEMU level. (Since 2.7)
715 # @tls-hostname: #optional hostname of the target host for the migration. This
716 # is required when using x509 based TLS credentials and the
717 # migration URI does not already include a hostname. For
718 # example if using fd: or exec: based migration, the
719 # hostname must be provided so that the server's x509
720 # certificate identity can be validated. (Since 2.7)
722 # @max-bandwidth: to set maximum speed for migration. maximum speed in
723 # bytes per second. (Since 2.8)
725 # @downtime-limit: set maximum tolerated downtime for migration. maximum
726 # downtime in milliseconds (Since 2.8)
730 { 'struct': 'MigrationParameters',
731 'data': { '*compress-level': 'int',
732 '*compress-threads': 'int',
733 '*decompress-threads': 'int',
734 '*cpu-throttle-initial': 'int',
735 '*cpu-throttle-increment': 'int',
737 '*tls-hostname': 'str',
738 '*max-bandwidth': 'int',
739 '*downtime-limit': 'int'} }
742 # @query-migrate-parameters
744 # Returns information about the current migration parameters
746 # Returns: @MigrationParameters
750 { 'command': 'query-migrate-parameters',
751 'returns': 'MigrationParameters' }
754 # @client_migrate_info
756 # Set migration information for remote display. This makes the server
757 # ask the client to automatically reconnect using the new parameters
758 # once migration finished successfully. Only implemented for SPICE.
760 # @protocol: must be "spice"
761 # @hostname: migration target hostname
762 # @port: #optional spice tcp port for plaintext channels
763 # @tls-port: #optional spice tcp port for tls-secured channels
764 # @cert-subject: #optional server certificate subject
768 { 'command': 'client_migrate_info',
769 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
770 '*tls-port': 'int', '*cert-subject': 'str' } }
773 # @migrate-start-postcopy
775 # Followup to a migration command to switch the migration to postcopy mode.
776 # The postcopy-ram capability must be set before the original migration
780 { 'command': 'migrate-start-postcopy' }
785 # Information about a mouse device.
787 # @name: the name of the mouse device
789 # @index: the index of the mouse device
791 # @current: true if this device is currently receiving mouse events
793 # @absolute: true if this device supports absolute coordinates as input
797 { 'struct': 'MouseInfo',
798 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
799 'absolute': 'bool'} }
804 # Returns information about each active mouse device
806 # Returns: a list of @MouseInfo for each device
810 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
815 # An enumeration of cpu types that enable additional information during
820 { 'enum': 'CpuInfoArch',
821 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
826 # Information about a virtual CPU
828 # @CPU: the index of the virtual CPU
830 # @current: this only exists for backwards compatibility and should be ignored
832 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
833 # to a processor specific low power mode.
835 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
837 # @thread_id: ID of the underlying host thread
839 # @arch: architecture of the cpu, which determines which additional fields
840 # will be listed (since 2.6)
844 # Notes: @halted is a transient state that changes frequently. By the time the
845 # data is sent to the client, the guest may no longer be halted.
847 { 'union': 'CpuInfo',
848 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
849 'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' },
850 'discriminator': 'arch',
851 'data': { 'x86': 'CpuInfoX86',
852 'sparc': 'CpuInfoSPARC',
854 'mips': 'CpuInfoMIPS',
855 'tricore': 'CpuInfoTricore',
856 'other': 'CpuInfoOther' } }
861 # Additional information about a virtual i386 or x86_64 CPU
863 # @pc: the 64-bit instruction pointer
867 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
872 # Additional information about a virtual SPARC CPU
874 # @pc: the PC component of the instruction pointer
876 # @npc: the NPC component of the instruction pointer
880 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
885 # Additional information about a virtual PPC CPU
887 # @nip: the instruction pointer
891 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
896 # Additional information about a virtual MIPS CPU
898 # @PC: the instruction pointer
902 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
907 # Additional information about a virtual Tricore CPU
909 # @PC: the instruction pointer
913 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
918 # No additional information is available about the virtual CPU
923 { 'struct': 'CpuInfoOther', 'data': { } }
928 # Returns a list of information about each virtual CPU.
930 # Returns: a list of @CpuInfo for each virtual CPU
934 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
939 # Information about an iothread
941 # @id: the identifier of the iothread
943 # @thread-id: ID of the underlying host thread
947 { 'struct': 'IOThreadInfo',
948 'data': {'id': 'str', 'thread-id': 'int'} }
953 # Returns a list of information about each iothread.
955 # Note this list excludes the QEMU main loop thread, which is not declared
956 # using the -object iothread command-line option. It is always the main thread
959 # Returns: a list of @IOThreadInfo for each iothread
963 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
966 # @NetworkAddressFamily
968 # The network address family
976 # @unknown: otherwise
980 { 'enum': 'NetworkAddressFamily',
981 'data': [ 'ipv4', 'ipv6', 'unix', 'unknown' ] }
986 # The basic information for vnc network connection
990 # @service: The service name of the vnc port. This may depend on the host
991 # system's service database so symbolic names should not be relied
994 # @family: address family
996 # @websocket: true in case the socket is a websocket (since 2.3).
1000 { 'struct': 'VncBasicInfo',
1001 'data': { 'host': 'str',
1003 'family': 'NetworkAddressFamily',
1004 'websocket': 'bool' } }
1009 # The network connection information for server
1011 # @auth: #optional, authentication method
1015 { 'struct': 'VncServerInfo',
1016 'base': 'VncBasicInfo',
1017 'data': { '*auth': 'str' } }
1022 # Information about a connected VNC client.
1024 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
1025 # Name of the client.
1027 # @sasl_username: #optional If SASL authentication is in use, the SASL username
1028 # used for authentication.
1032 { 'struct': 'VncClientInfo',
1033 'base': 'VncBasicInfo',
1034 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1039 # Information about the VNC session.
1041 # @enabled: true if the VNC server is enabled, false otherwise
1043 # @host: #optional The hostname the VNC server is bound to. This depends on
1044 # the name resolution on the host and may be an IP address.
1046 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
1047 # 'ipv4' if the host is listening for IPv4 connections
1048 # 'unix' if the host is listening on a unix domain socket
1049 # 'unknown' otherwise
1051 # @service: #optional The service name of the server's port. This may depends
1052 # on the host system's service database so symbolic names should not
1055 # @auth: #optional the current authentication type used by the server
1056 # 'none' if no authentication is being used
1057 # 'vnc' if VNC authentication is being used
1058 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
1059 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1060 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1061 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1062 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1063 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1064 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1065 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1066 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1068 # @clients: a list of @VncClientInfo of all currently connected clients
1072 { 'struct': 'VncInfo',
1073 'data': {'enabled': 'bool', '*host': 'str',
1074 '*family': 'NetworkAddressFamily',
1075 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1080 # vnc primary authentication method.
1084 { 'enum': 'VncPrimaryAuth',
1085 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1086 'tls', 'vencrypt', 'sasl' ] }
1089 # @VncVencryptSubAuth:
1091 # vnc sub authentication method with vencrypt.
1095 { 'enum': 'VncVencryptSubAuth',
1097 'tls-none', 'x509-none',
1098 'tls-vnc', 'x509-vnc',
1099 'tls-plain', 'x509-plain',
1100 'tls-sasl', 'x509-sasl' ] }
1105 # Information about a vnc server
1107 # @id: vnc server name.
1109 # @server: A list of @VncBasincInfo describing all listening sockets.
1110 # The list can be empty (in case the vnc server is disabled).
1111 # It also may have multiple entries: normal + websocket,
1112 # possibly also ipv4 + ipv6 in the future.
1114 # @clients: A list of @VncClientInfo of all currently connected clients.
1115 # The list can be empty, for obvious reasons.
1117 # @auth: The current authentication type used by the server
1119 # @vencrypt: #optional The vencrypt sub authentication type used by the server,
1120 # only specified in case auth == vencrypt.
1122 # @display: #optional The display device the vnc server is linked to.
1126 { 'struct': 'VncInfo2',
1127 'data': { 'id' : 'str',
1128 'server' : ['VncBasicInfo'],
1129 'clients' : ['VncClientInfo'],
1130 'auth' : 'VncPrimaryAuth',
1131 '*vencrypt' : 'VncVencryptSubAuth',
1132 '*display' : 'str' } }
1137 # Returns information about the current VNC server
1143 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1146 # @query-vnc-servers:
1148 # Returns a list of vnc servers. The list can be empty.
1150 # Returns: a list of @VncInfo2
1154 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1159 # The basic information for SPICE network connection
1163 # @port: port number
1165 # @family: address family
1169 { 'struct': 'SpiceBasicInfo',
1170 'data': { 'host': 'str',
1172 'family': 'NetworkAddressFamily' } }
1177 # Information about a SPICE server
1179 # @auth: #optional, authentication method
1183 { 'struct': 'SpiceServerInfo',
1184 'base': 'SpiceBasicInfo',
1185 'data': { '*auth': 'str' } }
1190 # Information about a SPICE client channel.
1192 # @connection-id: SPICE connection id number. All channels with the same id
1193 # belong to the same SPICE session.
1195 # @channel-type: SPICE channel type number. "1" is the main control
1196 # channel, filter for this one if you want to track spice
1199 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1200 # multiple channels of the same type exist, such as multiple
1201 # display channels in a multihead setup
1203 # @tls: true if the channel is encrypted, false otherwise.
1207 { 'struct': 'SpiceChannel',
1208 'base': 'SpiceBasicInfo',
1209 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1213 # @SpiceQueryMouseMode
1215 # An enumeration of Spice mouse states.
1217 # @client: Mouse cursor position is determined by the client.
1219 # @server: Mouse cursor position is determined by the server.
1221 # @unknown: No information is available about mouse mode used by
1224 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1228 { 'enum': 'SpiceQueryMouseMode',
1229 'data': [ 'client', 'server', 'unknown' ] }
1234 # Information about the SPICE session.
1236 # @enabled: true if the SPICE server is enabled, false otherwise
1238 # @migrated: true if the last guest migration completed and spice
1239 # migration had completed as well. false otherwise.
1241 # @host: #optional The hostname the SPICE server is bound to. This depends on
1242 # the name resolution on the host and may be an IP address.
1244 # @port: #optional The SPICE server's port number.
1246 # @compiled-version: #optional SPICE server version.
1248 # @tls-port: #optional The SPICE server's TLS port number.
1250 # @auth: #optional the current authentication type used by the server
1251 # 'none' if no authentication is being used
1252 # 'spice' uses SASL or direct TLS authentication, depending on command
1255 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1256 # be determined by the client or the server, or unknown if spice
1257 # server doesn't provide this information.
1261 # @channels: a list of @SpiceChannel for each active spice channel
1265 { 'struct': 'SpiceInfo',
1266 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1267 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1268 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1273 # Returns information about the current SPICE server
1275 # Returns: @SpiceInfo
1279 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1284 # Information about the guest balloon device.
1286 # @actual: the number of bytes the balloon currently contains
1291 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1296 # Return information about the balloon device.
1298 # Returns: @BalloonInfo on success
1299 # If the balloon driver is enabled but not functional because the KVM
1300 # kernel module cannot support it, KvmMissingCap
1301 # If no balloon device is present, DeviceNotActive
1305 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1310 # A PCI device memory region
1312 # @base: the starting address (guest physical)
1314 # @limit: the ending address (guest physical)
1318 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1323 # Information about a PCI device I/O region.
1325 # @bar: the index of the Base Address Register for this region
1327 # @type: 'io' if the region is a PIO region
1328 # 'memory' if the region is a MMIO region
1330 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1332 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1336 { 'struct': 'PciMemoryRegion',
1337 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1338 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1343 # Information about a bus of a PCI Bridge device
1345 # @number: primary bus interface number. This should be the number of the
1346 # bus the device resides on.
1348 # @secondary: secondary bus interface number. This is the number of the
1349 # main bus for the bridge
1351 # @subordinate: This is the highest number bus that resides below the
1354 # @io_range: The PIO range for all devices on this bridge
1356 # @memory_range: The MMIO range for all devices on this bridge
1358 # @prefetchable_range: The range of prefetchable MMIO for all devices on
1363 { 'struct': 'PciBusInfo',
1364 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1365 'io_range': 'PciMemoryRange',
1366 'memory_range': 'PciMemoryRange',
1367 'prefetchable_range': 'PciMemoryRange' } }
1372 # Information about a PCI Bridge device
1374 # @bus: information about the bus the device resides on
1376 # @devices: a list of @PciDeviceInfo for each device on this bridge
1380 { 'struct': 'PciBridgeInfo',
1381 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
1386 # Information about the Class of a PCI device
1388 # @desc: #optional a string description of the device's class
1390 # @class: the class code of the device
1394 { 'struct': 'PciDeviceClass',
1395 'data': {'*desc': 'str', 'class': 'int'} }
1400 # Information about the Id of a PCI device
1402 # @device: the PCI device id
1404 # @vendor: the PCI vendor id
1408 { 'struct': 'PciDeviceId',
1409 'data': {'device': 'int', 'vendor': 'int'} }
1414 # Information about a PCI device
1416 # @bus: the bus number of the device
1418 # @slot: the slot the device is located in
1420 # @function: the function of the slot used by the device
1422 # @class_info: the class of the device
1424 # @id: the PCI device id
1426 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1428 # @qdev_id: the device name of the PCI device
1430 # @pci_bridge: if the device is a PCI bridge, the bridge information
1432 # @regions: a list of the PCI I/O regions associated with the device
1434 # Notes: the contents of @class_info.desc are not stable and should only be
1435 # treated as informational.
1439 { 'struct': 'PciDeviceInfo',
1440 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1441 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
1442 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1443 'regions': ['PciMemoryRegion']} }
1448 # Information about a PCI bus
1450 # @bus: the bus index
1452 # @devices: a list of devices on this bus
1456 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1461 # Return information about the PCI bus topology of the guest.
1463 # Returns: a list of @PciInfo for each PCI bus
1467 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1472 # This command will cause the QEMU process to exit gracefully. While every
1473 # attempt is made to send the QMP response before terminating, this is not
1474 # guaranteed. When using this interface, a premature EOF would not be
1479 { 'command': 'quit' }
1484 # Stop all guest VCPU execution.
1488 # Notes: This function will succeed even if the guest is already in the stopped
1489 # state. In "inmigrate" state, it will ensure that the guest
1490 # remains paused once migration finishes, as if the -S option was
1491 # passed on the command line.
1493 { 'command': 'stop' }
1498 # Performs a hard reset of a guest.
1502 { 'command': 'system_reset' }
1505 # @system_powerdown:
1507 # Requests that a guest perform a powerdown operation.
1511 # Notes: A guest may or may not respond to this command. This command
1512 # returning does not indicate that a guest has accepted the request or
1513 # that it has shut down. Many guests will respond to this command by
1514 # prompting the user in some way.
1516 { 'command': 'system_powerdown' }
1521 # This command is a nop that is only provided for the purposes of compatibility.
1525 # Notes: Do not use this command.
1527 { 'command': 'cpu', 'data': {'index': 'int'} }
1532 # Adds CPU with specified ID
1534 # @id: ID of CPU to be created, valid values [0..max_cpus)
1536 # Returns: Nothing on success
1540 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1545 # Save a portion of guest memory to a file.
1547 # @val: the virtual address of the guest to start from
1549 # @size: the size of memory region to save
1551 # @filename: the file to save the memory to as binary data
1553 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1554 # virtual address (defaults to CPU 0)
1556 # Returns: Nothing on success
1560 # Notes: Errors were not reliably returned until 1.1
1562 { 'command': 'memsave',
1563 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1568 # Save a portion of guest physical memory to a file.
1570 # @val: the physical address of the guest to start from
1572 # @size: the size of memory region to save
1574 # @filename: the file to save the memory to as binary data
1576 # Returns: Nothing on success
1580 # Notes: Errors were not reliably returned until 1.1
1582 { 'command': 'pmemsave',
1583 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1588 # Resume guest VCPU execution.
1592 # Returns: If successful, nothing
1593 # If QEMU was started with an encrypted block device and a key has
1594 # not yet been set, DeviceEncrypted.
1596 # Notes: This command will succeed if the guest is currently running. It
1597 # will also succeed if the guest is in the "inmigrate" state; in
1598 # this case, the effect of the command is to make sure the guest
1599 # starts once migration finishes, removing the effect of the -S
1600 # command line option if it was passed.
1602 { 'command': 'cont' }
1607 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1613 { 'command': 'system_wakeup' }
1618 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
1620 # Returns: If successful, nothing
1624 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
1626 { 'command': 'inject-nmi' }
1631 # Sets the link status of a virtual network adapter.
1633 # @name: the device name of the virtual network adapter
1635 # @up: true to set the link status to be up
1637 # Returns: Nothing on success
1638 # If @name is not a valid network device, DeviceNotFound
1642 # Notes: Not all network adapters support setting link status. This command
1643 # will succeed even if the network adapter does not support link status
1646 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1651 # Request the balloon driver to change its balloon size.
1653 # @value: the target size of the balloon in bytes
1655 # Returns: Nothing on success
1656 # If the balloon driver is enabled but not functional because the KVM
1657 # kernel module cannot support it, KvmMissingCap
1658 # If no balloon device is present, DeviceNotActive
1660 # Notes: This command just issues a request to the guest. When it returns,
1661 # the balloon size may not have changed. A guest can change the balloon
1662 # size independent of this command.
1666 { 'command': 'balloon', 'data': {'value': 'int'} }
1671 # This action can be used to test transaction failure.
1675 { 'struct': 'Abort',
1679 # @ActionCompletionMode
1681 # An enumeration of Transactional completion modes.
1683 # @individual: Do not attempt to cancel any other Actions if any Actions fail
1684 # after the Transaction request succeeds. All Actions that
1685 # can complete successfully will do so without waiting on others.
1686 # This is the default.
1688 # @grouped: If any Action fails after the Transaction succeeds, cancel all
1689 # Actions. Actions do not complete until all Actions are ready to
1690 # complete. May be rejected by Actions that do not support this
1695 { 'enum': 'ActionCompletionMode',
1696 'data': [ 'individual', 'grouped' ] }
1699 # @TransactionAction
1701 # A discriminated record of operations that can be performed with
1706 # drive-backup since 1.6
1708 # blockdev-snapshot-internal-sync since 1.7
1709 # blockdev-backup since 2.3
1710 # blockdev-snapshot since 2.5
1711 # block-dirty-bitmap-add since 2.5
1712 # block-dirty-bitmap-clear since 2.5
1714 { 'union': 'TransactionAction',
1716 'blockdev-snapshot': 'BlockdevSnapshot',
1717 'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
1718 'drive-backup': 'DriveBackup',
1719 'blockdev-backup': 'BlockdevBackup',
1721 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
1722 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
1723 'block-dirty-bitmap-clear': 'BlockDirtyBitmap'
1727 # @TransactionProperties
1729 # Optional arguments to modify the behavior of a Transaction.
1731 # @completion-mode: #optional Controls how jobs launched asynchronously by
1732 # Actions will complete or fail as a group.
1733 # See @ActionCompletionMode for details.
1737 { 'struct': 'TransactionProperties',
1739 '*completion-mode': 'ActionCompletionMode'
1746 # Executes a number of transactionable QMP commands atomically. If any
1747 # operation fails, then the entire set of actions will be abandoned and the
1748 # appropriate error returned.
1750 # @actions: List of @TransactionAction;
1751 # information needed for the respective operations.
1753 # @properties: #optional structure of additional options to control the
1754 # execution of the transaction. See @TransactionProperties
1755 # for additional detail.
1757 # Returns: nothing on success
1758 # Errors depend on the operations of the transaction
1760 # Note: The transaction aborts on the first failure. Therefore, there will be
1761 # information on only one failed operation returned in an error condition, and
1762 # subsequent actions will not have been attempted.
1766 { 'command': 'transaction',
1767 'data': { 'actions': [ 'TransactionAction' ],
1768 '*properties': 'TransactionProperties'
1773 # @human-monitor-command:
1775 # Execute a command on the human monitor and return the output.
1777 # @command-line: the command to execute in the human monitor
1779 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1781 # Returns: the output of the command as a string
1785 # Notes: This command only exists as a stop-gap. Its use is highly
1786 # discouraged. The semantics of this command are not guaranteed.
1788 # Known limitations:
1790 # o This command is stateless, this means that commands that depend
1791 # on state information (such as getfd) might not work
1793 # o Commands that prompt the user for data (eg. 'cont' when the block
1794 # device is encrypted) don't currently work
1796 { 'command': 'human-monitor-command',
1797 'data': {'command-line': 'str', '*cpu-index': 'int'},
1803 # Cancel the current executing migration process.
1805 # Returns: nothing on success
1807 # Notes: This command succeeds even if there is no migration process running.
1811 { 'command': 'migrate_cancel' }
1814 # @migrate_set_downtime
1816 # Set maximum tolerated downtime for migration.
1818 # @value: maximum downtime in seconds
1820 # Returns: nothing on success
1822 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1826 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1829 # @migrate_set_speed
1831 # Set maximum speed for migration.
1833 # @value: maximum speed in bytes.
1835 # Returns: nothing on success
1837 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1841 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1844 # @migrate-set-cache-size
1846 # Set XBZRLE cache size
1848 # @value: cache size in bytes
1850 # The size will be rounded down to the nearest power of 2.
1851 # The cache size can be modified before and during ongoing migration
1853 # Returns: nothing on success
1857 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1860 # @query-migrate-cache-size
1862 # query XBZRLE cache size
1864 # Returns: XBZRLE cache size in bytes
1868 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1871 # @ObjectPropertyInfo:
1873 # @name: the name of the property
1875 # @type: the type of the property. This will typically come in one of four
1878 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1879 # These types are mapped to the appropriate JSON type.
1881 # 2) A child type in the form 'child<subtype>' where subtype is a qdev
1882 # device type name. Child properties create the composition tree.
1884 # 3) A link type in the form 'link<subtype>' where subtype is a qdev
1885 # device type name. Link properties form the device model graph.
1889 { 'struct': 'ObjectPropertyInfo',
1890 'data': { 'name': 'str', 'type': 'str' } }
1895 # This command will list any properties of a object given a path in the object
1898 # @path: the path within the object model. See @qom-get for a description of
1901 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1906 { 'command': 'qom-list',
1907 'data': { 'path': 'str' },
1908 'returns': [ 'ObjectPropertyInfo' ] }
1913 # This command will get a property from a object model path and return the
1916 # @path: The path within the object model. There are two forms of supported
1917 # paths--absolute and partial paths.
1919 # Absolute paths are derived from the root object and can follow child<>
1920 # or link<> properties. Since they can follow link<> properties, they
1921 # can be arbitrarily long. Absolute paths look like absolute filenames
1922 # and are prefixed with a leading slash.
1924 # Partial paths look like relative filenames. They do not begin
1925 # with a prefix. The matching rules for partial paths are subtle but
1926 # designed to make specifying objects easy. At each level of the
1927 # composition tree, the partial path is matched as an absolute path.
1928 # The first match is not returned. At least two matches are searched
1929 # for. A successful result is only returned if only one match is
1930 # found. If more than one match is found, a flag is return to
1931 # indicate that the match was ambiguous.
1933 # @property: The property name to read
1935 # Returns: The property value. The type depends on the property
1936 # type. child<> and link<> properties are returned as #str
1937 # pathnames. All integer property types (u8, u16, etc) are
1942 { 'command': 'qom-get',
1943 'data': { 'path': 'str', 'property': 'str' },
1949 # This command will set a property from a object model path.
1951 # @path: see @qom-get for a description of this parameter
1953 # @property: the property name to set
1955 # @value: a value who's type is appropriate for the property type. See @qom-get
1956 # for a description of type mapping.
1960 { 'command': 'qom-set',
1961 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
1966 # Sets the password of a remote display session.
1968 # @protocol: `vnc' to modify the VNC server password
1969 # `spice' to modify the Spice server password
1971 # @password: the new password
1973 # @connected: #optional how to handle existing clients when changing the
1974 # password. If nothing is specified, defaults to `keep'
1975 # `fail' to fail the command if clients are connected
1976 # `disconnect' to disconnect existing clients
1977 # `keep' to maintain existing clients
1979 # Returns: Nothing on success
1980 # If Spice is not enabled, DeviceNotFound
1984 { 'command': 'set_password',
1985 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1990 # Expire the password of a remote display server.
1992 # @protocol: the name of the remote display protocol `vnc' or `spice'
1994 # @time: when to expire the password.
1995 # `now' to expire the password immediately
1996 # `never' to cancel password expiration
1997 # `+INT' where INT is the number of seconds from now (integer)
1998 # `INT' where INT is the absolute time in seconds
2000 # Returns: Nothing on success
2001 # If @protocol is `spice' and Spice is not active, DeviceNotFound
2005 # Notes: Time is relative to the server and currently there is no way to
2006 # coordinate server time with client time. It is not recommended to
2007 # use the absolute time version of the @time parameter unless you're
2008 # sure you are on the same machine as the QEMU instance.
2010 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2013 # @change-vnc-password:
2015 # Change the VNC server password.
2017 # @password: the new password to use with VNC authentication
2021 # Notes: An empty password in this command will set the password to the empty
2022 # string. Existing clients are unaffected by executing this command.
2024 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2029 # This command is multiple commands multiplexed together.
2031 # @device: This is normally the name of a block device but it may also be 'vnc'.
2032 # when it's 'vnc', then sub command depends on @target
2034 # @target: If @device is a block device, then this is the new filename.
2035 # If @device is 'vnc', then if the value 'password' selects the vnc
2036 # change password command. Otherwise, this specifies a new server URI
2037 # address to listen to for VNC connections.
2039 # @arg: If @device is a block device, then this is an optional format to open
2041 # If @device is 'vnc' and @target is 'password', this is the new VNC
2042 # password to set. If this argument is an empty string, then no future
2043 # logins will be allowed.
2045 # Returns: Nothing on success.
2046 # If @device is not a valid block device, DeviceNotFound
2047 # If the new block device is encrypted, DeviceEncrypted. Note that
2048 # if this error is returned, the device has been opened successfully
2049 # and an additional call to @block_passwd is required to set the
2050 # device's password. The behavior of reads and writes to the block
2051 # device between when these calls are executed is undefined.
2053 # Notes: This interface is deprecated, and it is strongly recommended that you
2054 # avoid using it. For changing block devices, use
2055 # blockdev-change-medium; for changing VNC parameters, use
2056 # change-vnc-password.
2060 { 'command': 'change',
2061 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2066 # This structure describes a search result from @qom-list-types
2068 # @name: the type name found in the search
2072 # Notes: This command is experimental and may change syntax in future releases.
2074 { 'struct': 'ObjectTypeInfo',
2075 'data': { 'name': 'str' } }
2080 # This command will return a list of types given search parameters
2082 # @implements: if specified, only return types that implement this type name
2084 # @abstract: if true, include abstract types in the results
2086 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2090 { 'command': 'qom-list-types',
2091 'data': { '*implements': 'str', '*abstract': 'bool' },
2092 'returns': [ 'ObjectTypeInfo' ] }
2095 # @DevicePropertyInfo:
2097 # Information about device properties.
2099 # @name: the name of the property
2100 # @type: the typename of the property
2101 # @description: #optional if specified, the description of the property.
2106 { 'struct': 'DevicePropertyInfo',
2107 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
2110 # @device-list-properties:
2112 # List properties associated with a device.
2114 # @typename: the type name of a device
2116 # Returns: a list of DevicePropertyInfo describing a devices properties
2120 { 'command': 'device-list-properties',
2121 'data': { 'typename': 'str'},
2122 'returns': [ 'DevicePropertyInfo' ] }
2127 # Migrates the current running guest to another Virtual Machine.
2129 # @uri: the Uniform Resource Identifier of the destination VM
2131 # @blk: #optional do block migration (full disk copy)
2133 # @inc: #optional incremental disk copy migration
2135 # @detach: this argument exists only for compatibility reasons and
2136 # is ignored by QEMU
2138 # Returns: nothing on success
2142 { 'command': 'migrate',
2143 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2148 # Start an incoming migration, the qemu must have been started
2149 # with -incoming defer
2151 # @uri: The Uniform Resource Identifier identifying the source or
2152 # address to listen on
2154 # Returns: nothing on success
2157 # Note: It's a bad idea to use a string for the uri, but it needs to stay
2158 # compatible with -incoming and the format of the uri is already exposed
2161 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
2163 # @xen-save-devices-state:
2165 # Save the state of all devices to file. The RAM and the block devices
2166 # of the VM are not saved by this command.
2168 # @filename: the file to save the state of the devices to as binary
2169 # data. See xen-save-devices-state.txt for a description of the binary
2172 # Returns: Nothing on success
2176 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2179 # @xen-set-global-dirty-log
2181 # Enable or disable the global dirty log mode.
2183 # @enable: true to enable, false to disable.
2189 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2194 # @driver: the name of the new device's driver
2196 # @bus: #optional the device's parent bus (device tree path)
2198 # @id: the device's ID, must be unique
2200 # Additional arguments depend on the type.
2205 # 1. For detailed information about this command, please refer to the
2206 # 'docs/qdev-device-use.txt' file.
2208 # 2. It's possible to list device properties by running QEMU with the
2209 # "-device DEVICE,help" command-line argument, where DEVICE is the
2214 # -> { "execute": "device_add",
2215 # "arguments": { "driver": "e1000", "id": "net1",
2217 # "mac": "52:54:00:12:34:56" } }
2218 # <- { "return": {} }
2220 # TODO This command effectively bypasses QAPI completely due to its
2221 # "additional arguments" business. It shouldn't have been added to
2222 # the schema in this form. It should be qapified properly, or
2223 # replaced by a properly qapified command.
2227 { 'command': 'device_add',
2228 'data': {'driver': 'str', 'id': 'str'},
2229 'gen': false } # so we can get the additional arguments
2234 # Remove a device from a guest
2236 # @id: the name or QOM path of the device
2238 # Returns: Nothing on success
2239 # If @id is not a valid device, DeviceNotFound
2241 # Notes: When this command completes, the device may not be removed from the
2242 # guest. Hot removal is an operation that requires guest cooperation.
2243 # This command merely requests that the guest begin the hot removal
2244 # process. Completion of the device removal process is signaled with a
2245 # DEVICE_DELETED event. Guest reset will automatically complete removal
2250 { 'command': 'device_del', 'data': {'id': 'str'} }
2253 # @DumpGuestMemoryFormat:
2255 # An enumeration of guest-memory-dump's format.
2259 # @kdump-zlib: kdump-compressed format with zlib-compressed
2261 # @kdump-lzo: kdump-compressed format with lzo-compressed
2263 # @kdump-snappy: kdump-compressed format with snappy-compressed
2267 { 'enum': 'DumpGuestMemoryFormat',
2268 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
2271 # @dump-guest-memory
2273 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2274 # very long depending on the amount of guest memory.
2276 # @paging: if true, do paging to get guest's memory mapping. This allows
2277 # using gdb to process the core file.
2279 # IMPORTANT: this option can make QEMU allocate several gigabytes
2280 # of RAM. This can happen for a large guest, or a
2281 # malicious guest pretending to be large.
2283 # Also, paging=true has the following limitations:
2285 # 1. The guest may be in a catastrophic state or can have corrupted
2286 # memory, which cannot be trusted
2287 # 2. The guest can be in real-mode even if paging is enabled. For
2288 # example, the guest uses ACPI to sleep, and ACPI sleep state
2290 # 3. Currently only supported on i386 and x86_64.
2292 # @protocol: the filename or file descriptor of the vmcore. The supported
2295 # 1. file: the protocol starts with "file:", and the following
2296 # string is the file's path.
2297 # 2. fd: the protocol starts with "fd:", and the following string
2300 # @detach: #optional if true, QMP will return immediately rather than
2301 # waiting for the dump to finish. The user can track progress
2302 # using "query-dump". (since 2.6).
2304 # @begin: #optional if specified, the starting physical address.
2306 # @length: #optional if specified, the memory size, in bytes. If you don't
2307 # want to dump all guest's memory, please specify the start @begin
2310 # @format: #optional if specified, the format of guest memory dump. But non-elf
2311 # format is conflict with paging and filter, ie. @paging, @begin and
2312 # @length is not allowed to be specified with non-elf @format at the
2313 # same time (since 2.0)
2315 # Returns: nothing on success
2319 { 'command': 'dump-guest-memory',
2320 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
2321 '*begin': 'int', '*length': 'int',
2322 '*format': 'DumpGuestMemoryFormat'} }
2327 # Describe the status of a long-running background guest memory dump.
2329 # @none: no dump-guest-memory has started yet.
2331 # @active: there is one dump running in background.
2333 # @completed: the last dump has finished successfully.
2335 # @failed: the last dump has failed.
2339 { 'enum': 'DumpStatus',
2340 'data': [ 'none', 'active', 'completed', 'failed' ] }
2345 # The result format for 'query-dump'.
2347 # @status: enum of @DumpStatus, which shows current dump status
2349 # @completed: bytes written in latest dump (uncompressed)
2351 # @total: total bytes to be written in latest dump (uncompressed)
2355 { 'struct': 'DumpQueryResult',
2356 'data': { 'status': 'DumpStatus',
2363 # Query latest dump status.
2365 # Returns: A @DumpStatus object showing the dump status.
2369 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
2372 # @DumpGuestMemoryCapability:
2374 # A list of the available formats for dump-guest-memory
2378 { 'struct': 'DumpGuestMemoryCapability',
2380 'formats': ['DumpGuestMemoryFormat'] } }
2383 # @query-dump-guest-memory-capability:
2385 # Returns the available formats for dump-guest-memory
2387 # Returns: A @DumpGuestMemoryCapability object listing available formats for
2392 { 'command': 'query-dump-guest-memory-capability',
2393 'returns': 'DumpGuestMemoryCapability' }
2398 # Dump guest's storage keys
2400 # @filename: the path to the file to dump to
2402 # This command is only supported on s390 architecture.
2406 { 'command': 'dump-skeys',
2407 'data': { 'filename': 'str' } }
2412 # Add a network backend.
2414 # @type: the type of network backend. Current valid values are 'user', 'tap',
2415 # 'vde', 'socket', 'dump' and 'bridge'
2417 # @id: the name of the new network backend
2419 # Additional arguments depend on the type.
2421 # TODO This command effectively bypasses QAPI completely due to its
2422 # "additional arguments" business. It shouldn't have been added to
2423 # the schema in this form. It should be qapified properly, or
2424 # replaced by a properly qapified command.
2428 # Returns: Nothing on success
2429 # If @type is not a valid network backend, DeviceNotFound
2431 { 'command': 'netdev_add',
2432 'data': {'type': 'str', 'id': 'str'},
2433 'gen': false } # so we can get the additional arguments
2438 # Remove a network backend.
2440 # @id: the name of the network backend to remove
2442 # Returns: Nothing on success
2443 # If @id is not a valid network backend, DeviceNotFound
2447 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2452 # Create a QOM object.
2454 # @qom-type: the class name for the object to be created
2456 # @id: the name of the new object
2458 # @props: #optional a dictionary of properties to be passed to the backend
2460 # Returns: Nothing on success
2461 # Error if @qom-type is not a valid class name
2465 { 'command': 'object-add',
2466 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
2471 # Remove a QOM object.
2473 # @id: the name of the QOM object to remove
2475 # Returns: Nothing on success
2476 # Error if @id is not a valid id for a QOM object
2480 { 'command': 'object-del', 'data': {'id': 'str'} }
2483 # @NetdevNoneOptions
2485 # Use it alone to have zero network devices.
2489 { 'struct': 'NetdevNoneOptions',
2493 # @NetLegacyNicOptions
2495 # Create a new Network Interface Card.
2497 # @netdev: #optional id of -netdev to connect to
2499 # @macaddr: #optional MAC address
2501 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2503 # @addr: #optional PCI device address
2505 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2509 { 'struct': 'NetLegacyNicOptions',
2515 '*vectors': 'uint32' } }
2520 # A fat type wrapping 'str', to be embedded in lists.
2524 { 'struct': 'String',
2529 # @NetdevUserOptions
2531 # Use the user mode network stack which requires no administrator privilege to
2534 # @hostname: #optional client hostname reported by the builtin DHCP server
2536 # @restrict: #optional isolate the guest from the host
2538 # @ipv4: #optional whether to support IPv4, default true for enabled
2541 # @ipv6: #optional whether to support IPv6, default true for enabled
2544 # @ip: #optional legacy parameter, use net= instead
2546 # @net: #optional IP network address that the guest will see, in the
2547 # form addr[/netmask] The netmask is optional, and can be
2548 # either in the form a.b.c.d or as a number of valid top-most
2549 # bits. Default is 10.0.2.0/24.
2551 # @host: #optional guest-visible address of the host
2553 # @tftp: #optional root directory of the built-in TFTP server
2555 # @bootfile: #optional BOOTP filename, for use with tftp=
2557 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2560 # @dns: #optional guest-visible address of the virtual nameserver
2562 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2565 # @ipv6-prefix: #optional IPv6 network prefix (default is fec0::) (since
2566 # 2.6). The network prefix is given in the usual
2567 # hexadecimal IPv6 address notation.
2569 # @ipv6-prefixlen: #optional IPv6 network prefix length (default is 64)
2572 # @ipv6-host: #optional guest-visible IPv6 address of the host (since 2.6)
2574 # @ipv6-dns: #optional guest-visible IPv6 address of the virtual
2575 # nameserver (since 2.6)
2577 # @smb: #optional root directory of the built-in SMB server
2579 # @smbserver: #optional IP address of the built-in SMB server
2581 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2584 # @guestfwd: #optional forward guest TCP connections
2588 { 'struct': 'NetdevUserOptions',
2591 '*restrict': 'bool',
2599 '*dhcpstart': 'str',
2601 '*dnssearch': ['String'],
2602 '*ipv6-prefix': 'str',
2603 '*ipv6-prefixlen': 'int',
2604 '*ipv6-host': 'str',
2607 '*smbserver': 'str',
2608 '*hostfwd': ['String'],
2609 '*guestfwd': ['String'] } }
2614 # Connect the host TAP network interface name to the VLAN.
2616 # @ifname: #optional interface name
2618 # @fd: #optional file descriptor of an already opened tap
2620 # @fds: #optional multiple file descriptors of already opened multiqueue capable
2623 # @script: #optional script to initialize the interface
2625 # @downscript: #optional script to shut down the interface
2627 # @br: #optional bridge name (since 2.8)
2629 # @helper: #optional command to execute to configure bridge
2631 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2633 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2635 # @vhost: #optional enable vhost-net network accelerator
2637 # @vhostfd: #optional file descriptor of an already opened vhost net device
2639 # @vhostfds: #optional file descriptors of multiple already opened vhost net
2642 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2644 # @queues: #optional number of queues to be created for multiqueue capable tap
2646 # @poll-us: #optional maximum number of microseconds that could
2647 # be spent on busy polling for tap (since 2.7)
2651 { 'struct': 'NetdevTapOptions',
2657 '*downscript': 'str',
2661 '*vnet_hdr': 'bool',
2665 '*vhostforce': 'bool',
2666 '*queues': 'uint32',
2667 '*poll-us': 'uint32'} }
2670 # @NetdevSocketOptions
2672 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2673 # socket connection.
2675 # @fd: #optional file descriptor of an already opened socket
2677 # @listen: #optional port number, and optional hostname, to listen on
2679 # @connect: #optional port number, and optional hostname, to connect to
2681 # @mcast: #optional UDP multicast address and port number
2683 # @localaddr: #optional source address and port for multicast and udp packets
2685 # @udp: #optional UDP unicast address and port number
2689 { 'struct': 'NetdevSocketOptions',
2695 '*localaddr': 'str',
2699 # @NetdevL2TPv3Options
2701 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
2703 # @src: source address
2705 # @dst: destination address
2707 # @srcport: #optional source port - mandatory for udp, optional for ip
2709 # @dstport: #optional destination port - mandatory for udp, optional for ip
2711 # @ipv6: #optional - force the use of ipv6
2713 # @udp: #optional - use the udp version of l2tpv3 encapsulation
2715 # @cookie64: #optional - use 64 bit coookies
2717 # @counter: #optional have sequence counter
2719 # @pincounter: #optional pin sequence counter to zero -
2720 # workaround for buggy implementations or
2721 # networks with packet reorder
2723 # @txcookie: #optional 32 or 64 bit transmit cookie
2725 # @rxcookie: #optional 32 or 64 bit receive cookie
2727 # @txsession: 32 bit transmit session
2729 # @rxsession: #optional 32 bit receive session - if not specified
2730 # set to the same value as transmit
2732 # @offset: #optional additional offset - allows the insertion of
2733 # additional application-specific data before the packet payload
2737 { 'struct': 'NetdevL2TPv3Options',
2745 '*cookie64': 'bool',
2747 '*pincounter': 'bool',
2748 '*txcookie': 'uint64',
2749 '*rxcookie': 'uint64',
2750 'txsession': 'uint32',
2751 '*rxsession': 'uint32',
2752 '*offset': 'uint32' } }
2757 # Connect the VLAN to a vde switch running on the host.
2759 # @sock: #optional socket path
2761 # @port: #optional port number
2763 # @group: #optional group owner of socket
2765 # @mode: #optional permissions for socket
2769 { 'struct': 'NetdevVdeOptions',
2774 '*mode': 'uint16' } }
2777 # @NetdevDumpOptions
2779 # Dump VLAN network traffic to a file.
2781 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2784 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2788 { 'struct': 'NetdevDumpOptions',
2794 # @NetdevBridgeOptions
2796 # Connect a host TAP network interface to a host bridge device.
2798 # @br: #optional bridge name
2800 # @helper: #optional command to execute to configure bridge
2804 { 'struct': 'NetdevBridgeOptions',
2807 '*helper': 'str' } }
2810 # @NetdevHubPortOptions
2812 # Connect two or more net clients through a software hub.
2814 # @hubid: hub identifier number
2818 { 'struct': 'NetdevHubPortOptions',
2820 'hubid': 'int32' } }
2823 # @NetdevNetmapOptions
2825 # Connect a client to a netmap-enabled NIC or to a VALE switch port
2827 # @ifname: Either the name of an existing network interface supported by
2828 # netmap, or the name of a VALE port (created on the fly).
2829 # A VALE port name is in the form 'valeXXX:YYY', where XXX and
2830 # YYY are non-negative integers. XXX identifies a switch and
2831 # YYY identifies a port of the switch. VALE ports having the
2832 # same XXX are therefore connected to the same switch.
2834 # @devname: #optional path of the netmap device (default: '/dev/netmap').
2838 { 'struct': 'NetdevNetmapOptions',
2841 '*devname': 'str' } }
2844 # @NetdevVhostUserOptions
2846 # Vhost-user network backend
2848 # @chardev: name of a unix socket chardev
2850 # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
2852 # @queues: #optional number of queues to be created for multiqueue vhost-user
2853 # (default: 1) (Since 2.5)
2857 { 'struct': 'NetdevVhostUserOptions',
2860 '*vhostforce': 'bool',
2861 '*queues': 'int' } }
2866 # Available netdev drivers.
2870 { 'enum': 'NetClientDriver',
2871 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
2872 'bridge', 'hubport', 'netmap', 'vhost-user' ] }
2877 # Captures the configuration of a network device.
2879 # @id: identifier for monitor commands.
2881 # @type: Specify the driver used for interpreting remaining arguments.
2885 # 'l2tpv3' - since 2.1
2887 { 'union': 'Netdev',
2888 'base': { 'id': 'str', 'type': 'NetClientDriver' },
2889 'discriminator': 'type',
2891 'none': 'NetdevNoneOptions',
2892 'nic': 'NetLegacyNicOptions',
2893 'user': 'NetdevUserOptions',
2894 'tap': 'NetdevTapOptions',
2895 'l2tpv3': 'NetdevL2TPv3Options',
2896 'socket': 'NetdevSocketOptions',
2897 'vde': 'NetdevVdeOptions',
2898 'dump': 'NetdevDumpOptions',
2899 'bridge': 'NetdevBridgeOptions',
2900 'hubport': 'NetdevHubPortOptions',
2901 'netmap': 'NetdevNetmapOptions',
2902 'vhost-user': 'NetdevVhostUserOptions' } }
2907 # Captures the configuration of a network device; legacy.
2909 # @vlan: #optional vlan number
2911 # @id: #optional identifier for monitor commands
2913 # @name: #optional identifier for monitor commands, ignored if @id is present
2915 # @opts: device type specific properties (legacy)
2919 { 'struct': 'NetLegacy',
2924 'opts': 'NetLegacyOptions' } }
2929 # Like Netdev, but for use only by the legacy command line options
2933 { 'union': 'NetLegacyOptions',
2935 'none': 'NetdevNoneOptions',
2936 'nic': 'NetLegacyNicOptions',
2937 'user': 'NetdevUserOptions',
2938 'tap': 'NetdevTapOptions',
2939 'l2tpv3': 'NetdevL2TPv3Options',
2940 'socket': 'NetdevSocketOptions',
2941 'vde': 'NetdevVdeOptions',
2942 'dump': 'NetdevDumpOptions',
2943 'bridge': 'NetdevBridgeOptions',
2944 'netmap': 'NetdevNetmapOptions',
2945 'vhost-user': 'NetdevVhostUserOptions' } }
2948 # @NetFilterDirection
2950 # Indicates whether a netfilter is attached to a netdev's transmit queue or
2951 # receive queue or both.
2953 # @all: the filter is attached both to the receive and the transmit
2954 # queue of the netdev (default).
2956 # @rx: the filter is attached to the receive queue of the netdev,
2957 # where it will receive packets sent to the netdev.
2959 # @tx: the filter is attached to the transmit queue of the netdev,
2960 # where it will receive packets sent by the netdev.
2964 { 'enum': 'NetFilterDirection',
2965 'data': [ 'all', 'rx', 'tx' ] }
2968 # @InetSocketAddress
2970 # Captures a socket address or address range in the Internet namespace.
2972 # @host: host part of the address
2974 # @port: port part of the address, or lowest port if @to is present
2976 # @to: highest port to try
2978 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2981 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2986 { 'struct': 'InetSocketAddress',
2995 # @UnixSocketAddress
2997 # Captures a socket address in the local ("Unix socket") namespace.
2999 # @path: filesystem path to use
3003 { 'struct': 'UnixSocketAddress',
3010 # Captures the address of a socket, which could also be a named file descriptor
3014 { 'union': 'SocketAddress',
3016 'inet': 'InetSocketAddress',
3017 'unix': 'UnixSocketAddress',
3023 # Receive a file descriptor via SCM rights and assign it a name
3025 # @fdname: file descriptor name
3027 # Returns: Nothing on success
3031 # Notes: If @fdname already exists, the file descriptor assigned to
3032 # it will be closed and replaced by the received file
3034 # The 'closefd' command can be used to explicitly close the
3035 # file descriptor when it is no longer needed.
3037 { 'command': 'getfd', 'data': {'fdname': 'str'} }
3042 # Close a file descriptor previously passed via SCM rights
3044 # @fdname: file descriptor name
3046 # Returns: Nothing on success
3050 { 'command': 'closefd', 'data': {'fdname': 'str'} }
3055 # Information describing a machine.
3057 # @name: the name of the machine
3059 # @alias: #optional an alias for the machine name
3061 # @default: #optional whether the machine is default
3063 # @cpu-max: maximum number of CPUs supported by the machine type
3066 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
3070 { 'struct': 'MachineInfo',
3071 'data': { 'name': 'str', '*alias': 'str',
3072 '*is-default': 'bool', 'cpu-max': 'int',
3073 'hotpluggable-cpus': 'bool'} }
3078 # Return a list of supported machines
3080 # Returns: a list of MachineInfo
3084 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
3087 # @CpuDefinitionInfo:
3089 # Virtual CPU definition.
3091 # @name: the name of the CPU definition
3093 # @migration-safe: #optional whether a CPU definition can be safely used for
3094 # migration in combination with a QEMU compatibility machine
3095 # when migrating between different QMU versions and between
3096 # hosts with different sets of (hardware or software)
3097 # capabilities. If not provided, information is not available
3098 # and callers should not assume the CPU definition to be
3099 # migration-safe. (since 2.8)
3101 # @static: whether a CPU definition is static and will not change depending on
3102 # QEMU version, machine type, machine options and accelerator options.
3103 # A static model is always migration-safe. (since 2.8)
3105 # @unavailable-features: #optional List of properties that prevent
3106 # the CPU model from running in the current
3109 # @unavailable-features is a list of QOM property names that
3110 # represent CPU model attributes that prevent the CPU from running.
3111 # If the QOM property is read-only, that means there's no known
3112 # way to make the CPU model run in the current host. Implementations
3113 # that choose not to provide specific information return the
3114 # property name "type".
3115 # If the property is read-write, it means that it MAY be possible
3116 # to run the CPU model in the current host if that property is
3117 # changed. Management software can use it as hints to suggest or
3118 # choose an alternative for the user, or just to generate meaningful
3119 # error messages explaining why the CPU model can't be used.
3120 # If @unavailable-features is an empty list, the CPU model is
3121 # runnable using the current host and machine-type.
3122 # If @unavailable-features is not present, runnability
3123 # information for the CPU is not available.
3127 { 'struct': 'CpuDefinitionInfo',
3128 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
3129 '*unavailable-features': [ 'str' ] } }
3132 # @query-cpu-definitions:
3134 # Return a list of supported virtual CPU definitions
3136 # Returns: a list of CpuDefInfo
3140 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3145 # Virtual CPU model.
3147 # A CPU model consists of the name of a CPU definition, to which
3148 # delta changes are applied (e.g. features added/removed). Most magic values
3149 # that an architecture might require should be hidden behind the name.
3150 # However, if required, architectures can expose relevant properties.
3152 # @name: the name of the CPU definition the model is based on
3153 # @props: #optional a dictionary of QOM properties to be applied
3157 { 'struct': 'CpuModelInfo',
3158 'data': { 'name': 'str',
3162 # @CpuModelExpansionType
3164 # An enumeration of CPU model expansion types.
3166 # @static: Expand to a static CPU model, a combination of a static base
3167 # model name and property delta changes. As the static base model will
3168 # never change, the expanded CPU model will be the same, independant of
3169 # independent of QEMU version, machine type, machine options, and
3170 # accelerator options. Therefore, the resulting model can be used by
3171 # tooling without having to specify a compatibility machine - e.g. when
3172 # displaying the "host" model. static CPU models are migration-safe.
3174 # @full: Expand all properties. The produced model is not guaranteed to be
3175 # migration-safe, but allows tooling to get an insight and work with
3180 { 'enum': 'CpuModelExpansionType',
3181 'data': [ 'static', 'full' ] }
3185 # @CpuModelExpansionInfo
3187 # The result of a cpu model expansion.
3189 # @model: the expanded CpuModelInfo.
3193 { 'struct': 'CpuModelExpansionInfo',
3194 'data': { 'model': 'CpuModelInfo' } }
3198 # @query-cpu-model-expansion:
3200 # Expands a given CPU model (or a combination of CPU model + additional options)
3201 # to different granularities, allowing tooling to get an understanding what a
3202 # specific CPU model looks like in QEMU under a certain configuration.
3204 # This interface can be used to query the "host" CPU model.
3206 # The data returned by this command may be affected by:
3208 # * QEMU version: CPU models may look different depending on the QEMU version.
3209 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3210 # * machine-type: CPU model may look different depending on the machine-type.
3211 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3212 # * machine options (including accelerator): in some architectures, CPU models
3213 # may look different depending on machine and accelerator options. (Except for
3214 # CPU models reported as "static" in query-cpu-definitions.)
3215 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3216 # global properties may affect expansion of CPU models. Using
3217 # query-cpu-model-expansion while using these is not advised.
3219 # Some architectures may not support all expansion types. s390x supports
3220 # "full" and "static".
3222 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
3223 # not supported, if the model cannot be expanded, if the model contains
3224 # an unknown CPU definition name, unknown properties or properties
3225 # with a wrong type. Also returns an error if an expansion type is
3230 { 'command': 'query-cpu-model-expansion',
3231 'data': { 'type': 'CpuModelExpansionType',
3232 'model': 'CpuModelInfo' },
3233 'returns': 'CpuModelExpansionInfo' }
3236 # @CpuModelCompareResult:
3238 # An enumeration of CPU model comparation results. The result is usually
3239 # calculated using e.g. CPU features or CPU generations.
3241 # @incompatible: If model A is incompatible to model B, model A is not
3242 # guaranteed to run where model B runs and the other way around.
3244 # @identical: If model A is identical to model B, model A is guaranteed to run
3245 # where model B runs and the other way around.
3247 # @superset: If model A is a superset of model B, model B is guaranteed to run
3248 # where model A runs. There are no guarantees about the other way.
3250 # @subset: If model A is a subset of model B, model A is guaranteed to run
3251 # where model B runs. There are no guarantees about the other way.
3255 { 'enum': 'CpuModelCompareResult',
3256 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
3259 # @CpuModelCompareInfo
3261 # The result of a CPU model comparison.
3263 # @result: The result of the compare operation.
3264 # @responsible-properties: List of properties that led to the comparison result
3265 # not being identical.
3267 # @responsible-properties is a list of QOM property names that led to
3268 # both CPUs not being detected as identical. For identical models, this
3270 # If a QOM property is read-only, that means there's no known way to make the
3271 # CPU models identical. If the special property name "type" is included, the
3272 # models are by definition not identical and cannot be made identical.
3276 { 'struct': 'CpuModelCompareInfo',
3277 'data': {'result': 'CpuModelCompareResult',
3278 'responsible-properties': ['str']
3283 # @query-cpu-model-comparison:
3285 # Compares two CPU models, returning how they compare in a specific
3286 # configuration. The results indicates how both models compare regarding
3287 # runnability. This result can be used by tooling to make decisions if a
3288 # certain CPU model will run in a certain configuration or if a compatible
3289 # CPU model has to be created by baselining.
3291 # Usually, a CPU model is compared against the maximum possible CPU model
3292 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
3293 # model is identical or a subset, it will run in that configuration.
3295 # The result returned by this command may be affected by:
3297 # * QEMU version: CPU models may look different depending on the QEMU version.
3298 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3299 # * machine-type: CPU model may look different depending on the machine-type.
3300 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3301 # * machine options (including accelerator): in some architectures, CPU models
3302 # may look different depending on machine and accelerator options. (Except for
3303 # CPU models reported as "static" in query-cpu-definitions.)
3304 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3305 # global properties may affect expansion of CPU models. Using
3306 # query-cpu-model-expansion while using these is not advised.
3308 # Some architectures may not support comparing CPU models. s390x supports
3309 # comparing CPU models.
3311 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
3312 # not supported, if a model cannot be used, if a model contains
3313 # an unknown cpu definition name, unknown properties or properties
3318 { 'command': 'query-cpu-model-comparison',
3319 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
3320 'returns': 'CpuModelCompareInfo' }
3323 # @CpuModelBaselineInfo
3325 # The result of a CPU model baseline.
3327 # @model: the baselined CpuModelInfo.
3331 { 'struct': 'CpuModelBaselineInfo',
3332 'data': { 'model': 'CpuModelInfo' } }
3335 # @query-cpu-model-baseline:
3337 # Baseline two CPU models, creating a compatible third model. The created
3338 # model will always be a static, migration-safe CPU model (see "static"
3339 # CPU model expansion for details).
3341 # This interface can be used by tooling to create a compatible CPU model out
3342 # two CPU models. The created CPU model will be identical to or a subset of
3343 # both CPU models when comparing them. Therefore, the created CPU model is
3344 # guaranteed to run where the given CPU models run.
3346 # The result returned by this command may be affected by:
3348 # * QEMU version: CPU models may look different depending on the QEMU version.
3349 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3350 # * machine-type: CPU model may look different depending on the machine-type.
3351 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3352 # * machine options (including accelerator): in some architectures, CPU models
3353 # may look different depending on machine and accelerator options. (Except for
3354 # CPU models reported as "static" in query-cpu-definitions.)
3355 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3356 # global properties may affect expansion of CPU models. Using
3357 # query-cpu-model-expansion while using these is not advised.
3359 # Some architectures may not support baselining CPU models. s390x supports
3360 # baselining CPU models.
3362 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
3363 # not supported, if a model cannot be used, if a model contains
3364 # an unknown cpu definition name, unknown properties or properties
3369 { 'command': 'query-cpu-model-baseline',
3370 'data': { 'modela': 'CpuModelInfo',
3371 'modelb': 'CpuModelInfo' },
3372 'returns': 'CpuModelBaselineInfo' }
3376 # Information about a file descriptor that was added to an fd set.
3378 # @fdset-id: The ID of the fd set that @fd was added to.
3380 # @fd: The file descriptor that was received via SCM rights and
3381 # added to the fd set.
3385 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3390 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3392 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3394 # @opaque: #optional A free-form string that can be used to describe the fd.
3396 # Returns: @AddfdInfo on success
3397 # If file descriptor was not received, FdNotSupplied
3398 # If @fdset-id is a negative value, InvalidParameterValue
3400 # Notes: The list of fd sets is shared by all monitor connections.
3402 # If @fdset-id is not specified, a new fd set will be created.
3406 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3407 'returns': 'AddfdInfo' }
3412 # Remove a file descriptor from an fd set.
3414 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3416 # @fd: #optional The file descriptor that is to be removed.
3418 # Returns: Nothing on success
3419 # If @fdset-id or @fd is not found, FdNotFound
3423 # Notes: The list of fd sets is shared by all monitor connections.
3425 # If @fd is not specified, all file descriptors in @fdset-id
3428 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3433 # Information about a file descriptor that belongs to an fd set.
3435 # @fd: The file descriptor value.
3437 # @opaque: #optional A free-form string that can be used to describe the fd.
3441 { 'struct': 'FdsetFdInfo',
3442 'data': {'fd': 'int', '*opaque': 'str'} }
3447 # Information about an fd set.
3449 # @fdset-id: The ID of the fd set.
3451 # @fds: A list of file descriptors that belong to this fd set.
3455 { 'struct': 'FdsetInfo',
3456 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3461 # Return information describing all fd sets.
3463 # Returns: A list of @FdsetInfo
3467 # Note: The list of fd sets is shared by all monitor connections.
3470 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3475 # Information describing the QEMU target.
3477 # @arch: the target architecture (eg "x86_64", "i386", etc)
3481 { 'struct': 'TargetInfo',
3482 'data': { 'arch': 'str' } }
3487 # Return information about the target for this QEMU
3489 # Returns: TargetInfo
3493 { 'command': 'query-target', 'returns': 'TargetInfo' }
3498 # An enumeration of key name.
3500 # This is used by the send-key command.
3504 # 'unmapped' and 'pause' since 2.0
3505 # 'ro' and 'kp_comma' since 2.4
3506 # 'kp_equals' and 'power' since 2.6
3508 { 'enum': 'QKeyCode',
3509 'data': [ 'unmapped',
3510 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3511 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3512 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3513 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3514 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3515 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3516 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3517 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3518 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3519 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3520 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3521 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3522 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3523 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3524 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro',
3525 'kp_comma', 'kp_equals', 'power' ] }
3530 # Represents a keyboard key.
3534 { 'union': 'KeyValue',
3537 'qcode': 'QKeyCode' } }
3542 # Send keys to guest.
3544 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3545 # simultaneously sent to the guest. A @KeyValue.number value is sent
3546 # directly to the guest, while @KeyValue.qcode must be a valid
3549 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3552 # Returns: Nothing on success
3553 # If key is unknown or redundant, InvalidParameter
3558 { 'command': 'send-key',
3559 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3564 # Write a PPM of the VGA screen to a file.
3566 # @filename: the path of a new PPM file to store the image
3568 # Returns: Nothing on success
3572 { 'command': 'screendump', 'data': {'filename': 'str'} }
3578 # Configuration shared across all chardev backends
3580 # @logfile: #optional The name of a logfile to save output
3581 # @logappend: #optional true to append instead of truncate
3582 # (default to false to truncate)
3586 { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
3587 '*logappend': 'bool' } }
3592 # Configuration info for file chardevs.
3594 # @in: #optional The name of the input file
3595 # @out: The name of the output file
3596 # @append: #optional Open the file in append mode (default false to
3597 # truncate) (Since 2.6)
3601 { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
3603 '*append': 'bool' },
3604 'base': 'ChardevCommon' }
3609 # Configuration info for device and pipe chardevs.
3611 # @device: The name of the special file for the device,
3612 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
3613 # @type: What kind of device this is.
3617 { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
3618 'base': 'ChardevCommon' }
3623 # Configuration info for (stream) socket chardevs.
3625 # @addr: socket address to listen on (server=true)
3626 # or connect to (server=false)
3627 # @tls-creds: #optional the ID of the TLS credentials object (since 2.6)
3628 # @server: #optional create server socket (default: true)
3629 # @wait: #optional wait for incoming connection on server
3630 # sockets (default: false).
3631 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3632 # @telnet: #optional enable telnet protocol on server
3633 # sockets (default: false)
3634 # @reconnect: #optional For a client socket, if a socket is disconnected,
3635 # then attempt a reconnect after the given number of seconds.
3636 # Setting this to zero disables this function. (default: 0)
3641 { 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3642 '*tls-creds' : 'str',
3645 '*nodelay' : 'bool',
3647 '*reconnect' : 'int' },
3648 'base': 'ChardevCommon' }
3653 # Configuration info for datagram socket chardevs.
3655 # @remote: remote address
3656 # @local: #optional local address
3660 { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3661 '*local' : 'SocketAddress' },
3662 'base': 'ChardevCommon' }
3667 # Configuration info for mux chardevs.
3669 # @chardev: name of the base chardev.
3673 { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
3674 'base': 'ChardevCommon' }
3679 # Configuration info for stdio chardevs.
3681 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3682 # be delivered to qemu. Default: true in -nographic mode,
3687 { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
3688 'base': 'ChardevCommon' }
3692 # @ChardevSpiceChannel:
3694 # Configuration info for spice vm channel chardevs.
3696 # @type: kind of channel (for example vdagent).
3700 { 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' },
3701 'base': 'ChardevCommon' }
3704 # @ChardevSpicePort:
3706 # Configuration info for spice port chardevs.
3708 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3712 { 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' },
3713 'base': 'ChardevCommon' }
3718 # Configuration info for virtual console chardevs.
3720 # @width: console width, in pixels
3721 # @height: console height, in pixels
3722 # @cols: console width, in chars
3723 # @rows: console height, in chars
3727 { 'struct': 'ChardevVC', 'data': { '*width' : 'int',
3731 'base': 'ChardevCommon' }
3736 # Configuration info for ring buffer chardevs.
3738 # @size: #optional ring buffer size, must be power of two, default is 65536
3742 { 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' },
3743 'base': 'ChardevCommon' }
3748 # Configuration info for the new chardev backend.
3750 # Since: 1.4 (testdev since 2.2)
3752 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
3753 'serial' : 'ChardevHostdev',
3754 'parallel': 'ChardevHostdev',
3755 'pipe' : 'ChardevHostdev',
3756 'socket' : 'ChardevSocket',
3757 'udp' : 'ChardevUdp',
3758 'pty' : 'ChardevCommon',
3759 'null' : 'ChardevCommon',
3760 'mux' : 'ChardevMux',
3761 'msmouse': 'ChardevCommon',
3762 'braille': 'ChardevCommon',
3763 'testdev': 'ChardevCommon',
3764 'stdio' : 'ChardevStdio',
3765 'console': 'ChardevCommon',
3766 'spicevmc' : 'ChardevSpiceChannel',
3767 'spiceport' : 'ChardevSpicePort',
3769 'ringbuf': 'ChardevRingbuf',
3770 # next one is just for compatibility
3771 'memory' : 'ChardevRingbuf' } }
3776 # Return info about the chardev backend just created.
3778 # @pty: #optional name of the slave pseudoterminal device, present if
3779 # and only if a chardev of type 'pty' was created
3783 { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3788 # Add a character device backend
3790 # @id: the chardev's ID, must be unique
3791 # @backend: backend type and parameters
3793 # Returns: ChardevReturn.
3797 { 'command': 'chardev-add', 'data': {'id' : 'str',
3798 'backend' : 'ChardevBackend' },
3799 'returns': 'ChardevReturn' }
3804 # Remove a character device backend
3806 # @id: the chardev's ID, must exist and not be in use
3808 # Returns: Nothing on success
3812 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3817 # An enumeration of TPM models
3819 # @tpm-tis: TPM TIS model
3823 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3826 # @query-tpm-models:
3828 # Return a list of supported TPM models
3830 # Returns: a list of TpmModel
3834 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3839 # An enumeration of TPM types
3841 # @passthrough: TPM passthrough type
3845 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3850 # Return a list of supported TPM types
3852 # Returns: a list of TpmType
3856 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3859 # @TPMPassthroughOptions:
3861 # Information about the TPM passthrough type
3863 # @path: #optional string describing the path used for accessing the TPM device
3865 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3866 # for cancellation of TPM commands while they are executing
3870 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3871 '*cancel-path' : 'str'} }
3876 # A union referencing different TPM backend types' configuration options
3878 # @passthrough: The configuration options for the TPM passthrough type
3882 { 'union': 'TpmTypeOptions',
3883 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3888 # Information about the TPM
3890 # @id: The Id of the TPM
3892 # @model: The TPM frontend model
3894 # @options: The TPM (backend) type configuration options
3898 { 'struct': 'TPMInfo',
3899 'data': {'id': 'str',
3900 'model': 'TpmModel',
3901 'options': 'TpmTypeOptions' } }
3906 # Return information about the TPM device
3908 # Returns: @TPMInfo on success
3912 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
3917 # Specify an ACPI table on the command line to load.
3919 # At most one of @file and @data can be specified. The list of files specified
3920 # by any one of them is loaded and concatenated in order. If both are omitted,
3923 # Other fields / optargs can be used to override fields of the generic ACPI
3924 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
3925 # Description Table Header. If a header field is not overridden, then the
3926 # corresponding value from the concatenated blob is used (in case of @file), or
3927 # it is filled in with a hard-coded value (in case of @data).
3929 # String fields are copied into the matching ACPI member from lowest address
3930 # upwards, and silently truncated / NUL-padded to length.
3932 # @sig: #optional table signature / identifier (4 bytes)
3934 # @rev: #optional table revision number (dependent on signature, 1 byte)
3936 # @oem_id: #optional OEM identifier (6 bytes)
3938 # @oem_table_id: #optional OEM table identifier (8 bytes)
3940 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
3942 # @asl_compiler_id: #optional identifier of the utility that created the table
3945 # @asl_compiler_rev: #optional revision number of the utility that created the
3948 # @file: #optional colon (:) separated list of pathnames to load and
3949 # concatenate as table data. The resultant binary blob is expected to
3950 # have an ACPI table header. At least one file is required. This field
3953 # @data: #optional colon (:) separated list of pathnames to load and
3954 # concatenate as table data. The resultant binary blob must not have an
3955 # ACPI table header. At least one file is required. This field excludes
3960 { 'struct': 'AcpiTableOptions',
3965 '*oem_table_id': 'str',
3966 '*oem_rev': 'uint32',
3967 '*asl_compiler_id': 'str',
3968 '*asl_compiler_rev': 'uint32',
3973 # @CommandLineParameterType:
3975 # Possible types for an option parameter.
3977 # @string: accepts a character string
3979 # @boolean: accepts "on" or "off"
3981 # @number: accepts a number
3983 # @size: accepts a number followed by an optional suffix (K)ilo,
3984 # (M)ega, (G)iga, (T)era
3988 { 'enum': 'CommandLineParameterType',
3989 'data': ['string', 'boolean', 'number', 'size'] }
3992 # @CommandLineParameterInfo:
3994 # Details about a single parameter of a command line option.
3996 # @name: parameter name
3998 # @type: parameter @CommandLineParameterType
4000 # @help: #optional human readable text string, not suitable for parsing.
4002 # @default: #optional default value string (since 2.1)
4006 { 'struct': 'CommandLineParameterInfo',
4007 'data': { 'name': 'str',
4008 'type': 'CommandLineParameterType',
4010 '*default': 'str' } }
4013 # @CommandLineOptionInfo:
4015 # Details about a command line option, including its list of parameter details
4017 # @option: option name
4019 # @parameters: an array of @CommandLineParameterInfo
4023 { 'struct': 'CommandLineOptionInfo',
4024 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
4027 # @query-command-line-options:
4029 # Query command line option schema.
4031 # @option: #optional option name
4033 # Returns: list of @CommandLineOptionInfo for all options (or for the given
4034 # @option). Returns an error if the given @option doesn't exist.
4038 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
4039 'returns': ['CommandLineOptionInfo'] }
4044 # A X86 32-bit register
4048 { 'enum': 'X86CPURegister32',
4049 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4052 # @X86CPUFeatureWordInfo
4054 # Information about a X86 CPU feature word
4056 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4058 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
4061 # @cpuid-register: Output register containing the feature bits
4063 # @features: value of output register, containing the feature bits
4067 { 'struct': 'X86CPUFeatureWordInfo',
4068 'data': { 'cpuid-input-eax': 'int',
4069 '*cpuid-input-ecx': 'int',
4070 'cpuid-register': 'X86CPURegister32',
4071 'features': 'int' } }
4076 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
4080 { 'struct': 'DummyForceArrays',
4081 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
4087 # Packets receiving state
4089 # @normal: filter assigned packets according to the mac-table
4091 # @none: don't receive any assigned packet
4093 # @all: receive all assigned packets
4097 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
4102 # Rx-filter information for a NIC.
4104 # @name: net client name
4106 # @promiscuous: whether promiscuous mode is enabled
4108 # @multicast: multicast receive state
4110 # @unicast: unicast receive state
4112 # @vlan: vlan receive state (Since 2.0)
4114 # @broadcast-allowed: whether to receive broadcast
4116 # @multicast-overflow: multicast table is overflowed or not
4118 # @unicast-overflow: unicast table is overflowed or not
4120 # @main-mac: the main macaddr string
4122 # @vlan-table: a list of active vlan id
4124 # @unicast-table: a list of unicast macaddr string
4126 # @multicast-table: a list of multicast macaddr string
4130 { 'struct': 'RxFilterInfo',
4133 'promiscuous': 'bool',
4134 'multicast': 'RxState',
4135 'unicast': 'RxState',
4137 'broadcast-allowed': 'bool',
4138 'multicast-overflow': 'bool',
4139 'unicast-overflow': 'bool',
4141 'vlan-table': ['int'],
4142 'unicast-table': ['str'],
4143 'multicast-table': ['str'] }}
4148 # Return rx-filter information for all NICs (or for the given NIC).
4150 # @name: #optional net client name
4152 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4153 # Returns an error if the given @name doesn't exist, or given
4154 # NIC doesn't support rx-filter querying, or given net client
4159 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4160 'returns': ['RxFilterInfo'] }
4165 # Button of a pointer input device (mouse, tablet).
4169 { 'enum' : 'InputButton',
4170 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down' ] }
4175 # Position axis of a pointer input device (mouse, tablet).
4179 { 'enum' : 'InputAxis',
4180 'data' : [ 'x', 'y' ] }
4185 # Keyboard input event.
4187 # @key: Which key this event is for.
4188 # @down: True for key-down and false for key-up events.
4192 { 'struct' : 'InputKeyEvent',
4193 'data' : { 'key' : 'KeyValue',
4199 # Pointer button input event.
4201 # @button: Which button this event is for.
4202 # @down: True for key-down and false for key-up events.
4206 { 'struct' : 'InputBtnEvent',
4207 'data' : { 'button' : 'InputButton',
4213 # Pointer motion input event.
4215 # @axis: Which axis is referenced by @value.
4216 # @value: Pointer position. For absolute coordinates the
4217 # valid range is 0 -> 0x7ffff
4221 { 'struct' : 'InputMoveEvent',
4222 'data' : { 'axis' : 'InputAxis',
4228 # Input event union.
4230 # @key: Input event of Keyboard
4231 # @btn: Input event of pointer buttons
4232 # @rel: Input event of relative pointer motion
4233 # @abs: Input event of absolute pointer motion
4237 { 'union' : 'InputEvent',
4238 'data' : { 'key' : 'InputKeyEvent',
4239 'btn' : 'InputBtnEvent',
4240 'rel' : 'InputMoveEvent',
4241 'abs' : 'InputMoveEvent' } }
4246 # Send input event(s) to guest.
4248 # @device: #optional display device to send event(s) to.
4249 # @head: #optional head to send event(s) to, in case the
4250 # display device supports multiple scanouts.
4251 # @events: List of InputEvent union.
4253 # Returns: Nothing on success.
4255 # The @display and @head parameters can be used to send the input
4256 # event to specific input devices in case (a) multiple input devices
4257 # of the same kind are added to the virtual machine and (b) you have
4258 # configured input routing (see docs/multiseat.txt) for those input
4259 # devices. The parameters work exactly like the device and head
4260 # properties of input devices. If @device is missing, only devices
4261 # that have no input routing config are admissible. If @device is
4262 # specified, both input devices with and without input routing config
4263 # are admissible, but devices with input routing config take
4268 { 'command': 'input-send-event',
4269 'data': { '*device': 'str',
4271 'events' : [ 'InputEvent' ] } }
4276 # A discriminated record of NUMA options. (for OptsVisitor)
4280 { 'union': 'NumaOptions',
4282 'node': 'NumaNodeOptions' }}
4287 # Create a guest NUMA node. (for OptsVisitor)
4289 # @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
4291 # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
4294 # @mem: #optional memory size of this node; mutually exclusive with @memdev.
4295 # Equally divide total memory among nodes if both @mem and @memdev are
4298 # @memdev: #optional memory backend object. If specified for one node,
4299 # it must be specified for all nodes.
4303 { 'struct': 'NumaNodeOptions',
4305 '*nodeid': 'uint16',
4306 '*cpus': ['uint16'],
4313 # Host memory policy types
4315 # @default: restore default policy, remove any nondefault policy
4317 # @preferred: set the preferred host nodes for allocation
4319 # @bind: a strict policy that restricts memory allocation to the
4320 # host nodes specified
4322 # @interleave: memory allocations are interleaved across the set
4323 # of host nodes specified
4327 { 'enum': 'HostMemPolicy',
4328 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
4333 # Information about memory backend
4335 # @size: memory backend size
4337 # @merge: enables or disables memory merge support
4339 # @dump: includes memory backend's memory in a core dump or not
4341 # @prealloc: enables or disables memory preallocation
4343 # @host-nodes: host nodes for its memory policy
4345 # @policy: memory policy of memory backend
4349 { 'struct': 'Memdev',
4355 'host-nodes': ['uint16'],
4356 'policy': 'HostMemPolicy' }}
4361 # Returns information for all memory backends.
4363 # Returns: a list of @Memdev.
4367 { 'command': 'query-memdev', 'returns': ['Memdev'] }
4370 # @PCDIMMDeviceInfo:
4372 # PCDIMMDevice state information
4374 # @id: #optional device's ID
4376 # @addr: physical address, where device is mapped
4378 # @size: size of memory that the device provides
4380 # @slot: slot number at which device is plugged in
4382 # @node: NUMA node number where device is plugged in
4384 # @memdev: memory backend linked with device
4386 # @hotplugged: true if device was hotplugged
4388 # @hotpluggable: true if device if could be added/removed while machine is running
4392 { 'struct': 'PCDIMMDeviceInfo',
4393 'data': { '*id': 'str',
4399 'hotplugged': 'bool',
4400 'hotpluggable': 'bool'
4405 # @MemoryDeviceInfo:
4407 # Union containing information about a memory device
4411 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
4414 # @query-memory-devices
4416 # Lists available memory devices and their state
4420 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
4424 # @DIMM: memory slot
4425 # @CPU: logical CPU slot (since 2.7)
4427 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
4431 # OSPM Status Indication for a device
4432 # For description of possible values of @source and @status fields
4433 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
4435 # @device: #optional device ID associated with slot
4437 # @slot: slot ID, unique per slot of a given @slot-type
4439 # @slot-type: type of the slot
4441 # @source: an integer containing the source event
4443 # @status: an integer containing the status code
4447 { 'struct': 'ACPIOSTInfo',
4448 'data' : { '*device': 'str',
4450 'slot-type': 'ACPISlotType',
4455 # @query-acpi-ospm-status
4457 # Lists ACPI OSPM status of ACPI device objects,
4458 # which might be reported via _OST method
4462 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
4465 # @WatchdogExpirationAction
4467 # An enumeration of the actions taken when the watchdog device's timer is
4470 # @reset: system resets
4472 # @shutdown: system shutdown, note that it is similar to @powerdown, which
4473 # tries to set to system status and notify guest
4475 # @poweroff: system poweroff, the emulator program exits
4477 # @pause: system pauses, similar to @stop
4479 # @debug: system enters debug state
4481 # @none: nothing is done
4483 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
4484 # VCPUS on x86) (since 2.4)
4488 { 'enum': 'WatchdogExpirationAction',
4489 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
4495 # An enumeration of the I/O operation types
4497 # @read: read operation
4499 # @write: write operation
4503 { 'enum': 'IoOperationType',
4504 'data': [ 'read', 'write' ] }
4509 # An enumeration of the actions taken when guest OS panic is detected
4511 # @pause: system pauses
4515 { 'enum': 'GuestPanicAction',
4516 'data': [ 'pause' ] }
4519 # @rtc-reset-reinjection
4521 # This command will reset the RTC interrupt reinjection backlog.
4522 # Can be used if another mechanism to synchronize guest time
4523 # is in effect, for example QEMU guest agent's guest-set-time
4528 { 'command': 'rtc-reset-reinjection' }
4530 # Rocker ethernet network switch
4531 { 'include': 'qapi/rocker.json' }
4536 # Mode of the replay subsystem.
4538 # @none: normal execution mode. Replay or record are not enabled.
4540 # @record: record mode. All non-deterministic data is written into the
4543 # @play: replay mode. Non-deterministic data required for system execution
4544 # is read from the log.
4548 { 'enum': 'ReplayMode',
4549 'data': [ 'none', 'record', 'play' ] }
4552 # @xen-load-devices-state:
4554 # Load the state of all devices from file. The RAM and the block devices
4555 # of the VM are not loaded by this command.
4557 # @filename: the file to load the state of the devices from as binary
4558 # data. See xen-save-devices-state.txt for a description of the binary
4563 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
4568 # The struct describes capability for a specific GIC (Generic
4569 # Interrupt Controller) version. These bits are not only decided by
4570 # QEMU/KVM software version, but also decided by the hardware that
4571 # the program is running upon.
4573 # @version: version of GIC to be described. Currently, only 2 and 3
4576 # @emulated: whether current QEMU/hardware supports emulated GIC
4577 # device in user space.
4579 # @kernel: whether current QEMU/hardware supports hardware
4580 # accelerated GIC device in kernel.
4584 { 'struct': 'GICCapability',
4585 'data': { 'version': 'int',
4587 'kernel': 'bool' } }
4590 # @query-gic-capabilities:
4592 # This command is ARM-only. It will return a list of GICCapability
4593 # objects that describe its capability bits.
4595 # Returns: a list of GICCapability objects.
4599 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
4602 # CpuInstanceProperties
4604 # List of properties to be used for hotplugging a CPU instance,
4605 # it should be passed by management with device_add command when
4606 # a CPU is being hotplugged.
4608 # Note: currently there are 4 properties that could be present
4609 # but management should be prepared to pass through other
4610 # properties with device_add command to allow for future
4611 # interface extension. This also requires the filed names to be kept in
4612 # sync with the properties passed to -device/device_add.
4614 # @node-id: #optional NUMA node ID the CPU belongs to
4615 # @socket-id: #optional socket number within node/board the CPU belongs to
4616 # @core-id: #optional core number within socket the CPU belongs to
4617 # @thread-id: #optional thread number within core the CPU belongs to
4621 { 'struct': 'CpuInstanceProperties',
4622 'data': { '*node-id': 'int',
4623 '*socket-id': 'int',
4632 # @type: CPU object type for usage with device_add command
4633 # @props: list of properties to be used for hotplugging CPU
4634 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
4635 # @qom-path: #optional link to existing CPU object if CPU is present or
4636 # omitted if CPU is not present.
4640 { 'struct': 'HotpluggableCPU',
4641 'data': { 'type': 'str',
4642 'vcpus-count': 'int',
4643 'props': 'CpuInstanceProperties',
4649 # @query-hotpluggable-cpus
4651 # Returns: a list of HotpluggableCPU objects.
4655 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }