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 # @colo: guest is paused to save/restore VM state under colo checkpoint,
180 # VM can not get into this state unless colo capability is enabled
181 # for migration. (since 2.8)
183 { 'enum': 'RunState',
184 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
185 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
186 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
187 'guest-panicked', 'colo' ] }
192 # Information about VCPU run state
194 # @running: true if all VCPUs are runnable, false if not runnable
196 # @singlestep: true if VCPUs are in single-step mode
198 # @status: the virtual machine @RunState
202 # Notes: @singlestep is enabled through the GDB stub
204 { 'struct': 'StatusInfo',
205 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
210 # Query the run status of all VCPUs
212 # Returns: @StatusInfo reflecting all VCPUs
216 { 'command': 'query-status', 'returns': 'StatusInfo' }
221 # Guest UUID information.
223 # @UUID: the UUID of the guest
227 # Notes: If no UUID was specified for the guest, a null UUID is returned.
229 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
234 # Query the guest UUID information.
236 # Returns: The @UuidInfo for the guest
240 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
245 # Information about a character device.
247 # @label: the label of the character device
249 # @filename: the filename of the character device
251 # @frontend-open: shows whether the frontend device attached to this backend
252 # (eg. with the chardev=... option) is in open or closed state
255 # Notes: @filename is encoded using the QEMU command line character device
256 # encoding. See the QEMU man page for details.
260 { 'struct': 'ChardevInfo', 'data': {'label': 'str',
262 'frontend-open': 'bool'} }
267 # Returns information about current character devices.
269 # Returns: a list of @ChardevInfo
273 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
276 # @ChardevBackendInfo:
278 # Information about a character device backend
280 # @name: The backend name
284 { 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} }
287 # @query-chardev-backends:
289 # Returns information about character device backends.
291 # Returns: a list of @ChardevBackendInfo
295 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
300 # An enumeration of data format.
302 # @utf8: Data is a UTF-8 string (RFC 3629)
304 # @base64: Data is Base64 encoded binary (RFC 3548)
308 { 'enum': 'DataFormat',
309 'data': [ 'utf8', 'base64' ] }
314 # Write to a ring buffer character device.
316 # @device: the ring buffer character device name
318 # @data: data to write
320 # @format: #optional data encoding (default 'utf8').
321 # - base64: data must be base64 encoded text. Its binary
322 # decoding gets written.
323 # - utf8: data's UTF-8 encoding is written
324 # - data itself is always Unicode regardless of format, like
327 # Returns: Nothing on success
331 { 'command': 'ringbuf-write',
332 'data': {'device': 'str', 'data': 'str',
333 '*format': 'DataFormat'} }
338 # Read from a ring buffer character device.
340 # @device: the ring buffer character device name
342 # @size: how many bytes to read at most
344 # @format: #optional data encoding (default 'utf8').
345 # - base64: the data read is returned in base64 encoding.
346 # - utf8: the data read is interpreted as UTF-8.
347 # Bug: can screw up when the buffer contains invalid UTF-8
348 # sequences, NUL characters, after the ring buffer lost
349 # data, and when reading stops because the size limit is
351 # - The return value is always Unicode regardless of format,
352 # like any other string.
354 # Returns: data read from the device
358 { 'command': 'ringbuf-read',
359 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
365 # Information about a QMP event
367 # @name: The event name
371 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
376 # Return a list of supported QMP events by this server
378 # Returns: A list of @EventInfo for all supported events
382 { 'command': 'query-events', 'returns': ['EventInfo'] }
387 # Detailed migration status.
389 # @transferred: amount of bytes already transferred to the target VM
391 # @remaining: amount of bytes remaining to be transferred to the target VM
393 # @total: total amount of bytes involved in the migration process
395 # @duplicate: number of duplicate (zero) pages (since 1.2)
397 # @skipped: number of skipped zero pages (since 1.5)
399 # @normal : number of normal pages (since 1.2)
401 # @normal-bytes: number of normal bytes sent (since 1.2)
403 # @dirty-pages-rate: number of pages dirtied by second by the
406 # @mbps: throughput in megabits/sec. (since 1.6)
408 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
410 # @postcopy-requests: The number of page requests received from the destination
415 { 'struct': 'MigrationStats',
416 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
417 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
418 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
419 'mbps' : 'number', 'dirty-sync-count' : 'int',
420 'postcopy-requests' : 'int' } }
425 # Detailed XBZRLE migration cache statistics
427 # @cache-size: XBZRLE cache size
429 # @bytes: amount of bytes already transferred to the target VM
431 # @pages: amount of pages transferred to the target VM
433 # @cache-miss: number of cache miss
435 # @cache-miss-rate: rate of cache miss (since 2.1)
437 # @overflow: number of overflows
441 { 'struct': 'XBZRLECacheStats',
442 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
443 'cache-miss': 'int', 'cache-miss-rate': 'number',
444 'overflow': 'int' } }
448 # An enumeration of migration status.
450 # @none: no migration has ever happened.
452 # @setup: migration process has been initiated.
454 # @cancelling: in the process of cancelling migration.
456 # @cancelled: cancelling migration is finished.
458 # @active: in the process of doing migration.
460 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
462 # @completed: migration is finished.
464 # @failed: some error occurred during migration process.
466 # @colo: VM is in the process of fault tolerance, VM can not get into this
467 # state unless colo capability is enabled for migration. (since 2.8)
472 { 'enum': 'MigrationStatus',
473 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
474 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
479 # Information about current migration process.
481 # @status: #optional @MigrationStatus describing the current migration status.
482 # If this field is not returned, no migration process
485 # @ram: #optional @MigrationStats containing detailed migration
486 # status, only returned if status is 'active' or
487 # 'completed'(since 1.2)
489 # @disk: #optional @MigrationStats containing detailed disk migration
490 # status, only returned if status is 'active' and it is a block
493 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
494 # migration statistics, only returned if XBZRLE feature is on and
495 # status is 'active' or 'completed' (since 1.2)
497 # @total-time: #optional total amount of milliseconds since migration started.
498 # If migration has ended, it returns the total migration
501 # @downtime: #optional only present when migration finishes correctly
502 # total downtime in milliseconds for the guest.
505 # @expected-downtime: #optional only present while migration is active
506 # expected downtime in milliseconds for the guest in last walk
507 # of the dirty bitmap. (since 1.3)
509 # @setup-time: #optional amount of setup time in milliseconds _before_ the
510 # iterations begin but _after_ the QMP command is issued. This is designed
511 # to provide an accounting of any activities (such as RDMA pinning) which
512 # may be expensive, but do not actually occur during the iterative
513 # migration rounds themselves. (since 1.6)
515 # @cpu-throttle-percentage: #optional percentage of time guest cpus are being
516 # throttled during auto-converge. This is only present when auto-converge
517 # has started throttling guest cpus. (Since 2.7)
519 # @error-desc: #optional the human readable error description string, when
520 # @status is 'failed'. Clients should not attempt to parse the
521 # error strings. (Since 2.7)
525 { 'struct': 'MigrationInfo',
526 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
527 '*disk': 'MigrationStats',
528 '*xbzrle-cache': 'XBZRLECacheStats',
529 '*total-time': 'int',
530 '*expected-downtime': 'int',
532 '*setup-time': 'int',
533 '*cpu-throttle-percentage': 'int',
534 '*error-desc': 'str'} }
539 # Returns information about current migration process.
541 # Returns: @MigrationInfo
545 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
548 # @MigrationCapability
550 # Migration capabilities enumeration
552 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
553 # This feature allows us to minimize migration traffic for certain work
554 # loads, by sending compressed difference of the pages
556 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
557 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
558 # Disabled by default. (since 2.0)
560 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
561 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
562 # source and target VM to support this feature. To enable it is sufficient
563 # to enable the capability on the source VM. The feature is disabled by
564 # default. (since 1.6)
566 # @compress: Use multiple compression threads to accelerate live migration.
567 # This feature can help to reduce the migration traffic, by sending
568 # compressed pages. Please note that if compress and xbzrle are both
569 # on, compress only takes effect in the ram bulk stage, after that,
570 # it will be disabled and only xbzrle takes effect, this can help to
571 # minimize migration traffic. The feature is disabled by default.
574 # @events: generate events for each migration state change
577 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
578 # to speed up convergence of RAM migration. (since 1.6)
580 # @postcopy-ram: Start executing on the migration target before all of RAM has
581 # been migrated, pulling the remaining pages along as needed. NOTE: If
582 # the migration fails during postcopy the VM will fail. (since 2.6)
584 # @x-colo: If enabled, migration will never end, and the state of the VM on the
585 # primary side will be migrated continuously to the VM on secondary
586 # side, this process is called COarse-Grain LOck Stepping (COLO) for
587 # Non-stop Service. (since 2.8)
591 { 'enum': 'MigrationCapability',
592 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
593 'compress', 'events', 'postcopy-ram', 'x-colo'] }
596 # @MigrationCapabilityStatus
598 # Migration capability information
600 # @capability: capability enum
602 # @state: capability state bool
606 { 'struct': 'MigrationCapabilityStatus',
607 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
610 # @migrate-set-capabilities
612 # Enable/Disable the following migration capabilities (like xbzrle)
614 # @capabilities: json array of capability modifications to make
618 { 'command': 'migrate-set-capabilities',
619 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
622 # @query-migrate-capabilities
624 # Returns information about the current migration capabilities status
626 # Returns: @MigrationCapabilitiesStatus
630 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
632 # @MigrationParameter
634 # Migration parameters enumeration
636 # @compress-level: Set the compression level to be used in live migration,
637 # the compression level is an integer between 0 and 9, where 0 means
638 # no compression, 1 means the best compression speed, and 9 means best
639 # compression ratio which will consume more CPU.
641 # @compress-threads: Set compression thread count to be used in live migration,
642 # the compression thread count is an integer between 1 and 255.
644 # @decompress-threads: Set decompression thread count to be used in live
645 # migration, the decompression thread count is an integer between 1
646 # and 255. Usually, decompression is at least 4 times as fast as
647 # compression, so set the decompress-threads to the number about 1/4
648 # of compress-threads is adequate.
650 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
651 # when migration auto-converge is activated. The
652 # default value is 20. (Since 2.7)
654 # @cpu-throttle-increment: throttle percentage increase each time
655 # auto-converge detects that migration is not making
656 # progress. The default value is 10. (Since 2.7)
658 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
659 # establishing a TLS connection over the migration data channel.
660 # On the outgoing side of the migration, the credentials must
661 # be for a 'client' endpoint, while for the incoming side the
662 # credentials must be for a 'server' endpoint. Setting this
663 # will enable TLS for all migrations. The default is unset,
664 # resulting in unsecured migration at the QEMU level. (Since 2.7)
666 # @tls-hostname: hostname of the target host for the migration. This is
667 # required when using x509 based TLS credentials and the
668 # migration URI does not already include a hostname. For
669 # example if using fd: or exec: based migration, the
670 # hostname must be provided so that the server's x509
671 # certificate identity can be validated. (Since 2.7)
673 # @max-bandwidth: to set maximum speed for migration. maximum speed in
674 # bytes per second. (Since 2.8)
676 # @downtime-limit: set maximum tolerated downtime for migration. maximum
677 # downtime in milliseconds (Since 2.8)
679 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
680 # periodic mode. (Since 2.8)
684 { 'enum': 'MigrationParameter',
685 'data': ['compress-level', 'compress-threads', 'decompress-threads',
686 'cpu-throttle-initial', 'cpu-throttle-increment',
687 'tls-creds', 'tls-hostname', 'max-bandwidth',
688 'downtime-limit', 'x-checkpoint-delay' ] }
691 # @migrate-set-parameters
693 # Set various migration parameters. See MigrationParameters for details.
695 # @x-checkpoint-delay: the delay time between two checkpoints. (Since 2.8)
699 { 'command': 'migrate-set-parameters', 'boxed': true,
700 'data': 'MigrationParameters' }
703 # @MigrationParameters
705 # Optional members can be omitted on input ('migrate-set-parameters')
706 # but most members will always be present on output
707 # ('query-migrate-parameters'), with the exception of tls-creds and
710 # @compress-level: #optional compression level
712 # @compress-threads: #optional compression thread count
714 # @decompress-threads: #optional decompression thread count
716 # @cpu-throttle-initial: #optional Initial percentage of time guest cpus are
717 # throttledwhen migration auto-converge is activated.
718 # The default value is 20. (Since 2.7)
720 # @cpu-throttle-increment: #optional throttle percentage increase each time
721 # auto-converge detects that migration is not making
722 # progress. The default value is 10. (Since 2.7)
724 # @tls-creds: #optional ID of the 'tls-creds' object that provides credentials
725 # for establishing a TLS connection over the migration data
726 # channel. On the outgoing side of the migration, the credentials
727 # must be for a 'client' endpoint, while for the incoming side the
728 # credentials must be for a 'server' endpoint. Setting this
729 # will enable TLS for all migrations. The default is unset,
730 # resulting in unsecured migration at the QEMU level. (Since 2.7)
732 # @tls-hostname: #optional hostname of the target host for the migration. This
733 # is required when using x509 based TLS credentials and the
734 # migration URI does not already include a hostname. For
735 # example if using fd: or exec: based migration, the
736 # hostname must be provided so that the server's x509
737 # certificate identity can be validated. (Since 2.7)
739 # @max-bandwidth: to set maximum speed for migration. maximum speed in
740 # bytes per second. (Since 2.8)
742 # @downtime-limit: set maximum tolerated downtime for migration. maximum
743 # downtime in milliseconds (Since 2.8)
745 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
749 { 'struct': 'MigrationParameters',
750 'data': { '*compress-level': 'int',
751 '*compress-threads': 'int',
752 '*decompress-threads': 'int',
753 '*cpu-throttle-initial': 'int',
754 '*cpu-throttle-increment': 'int',
756 '*tls-hostname': 'str',
757 '*max-bandwidth': 'int',
758 '*downtime-limit': 'int',
759 '*x-checkpoint-delay': 'int'} }
762 # @query-migrate-parameters
764 # Returns information about the current migration parameters
766 # Returns: @MigrationParameters
770 { 'command': 'query-migrate-parameters',
771 'returns': 'MigrationParameters' }
774 # @client_migrate_info
776 # Set migration information for remote display. This makes the server
777 # ask the client to automatically reconnect using the new parameters
778 # once migration finished successfully. Only implemented for SPICE.
780 # @protocol: must be "spice"
781 # @hostname: migration target hostname
782 # @port: #optional spice tcp port for plaintext channels
783 # @tls-port: #optional spice tcp port for tls-secured channels
784 # @cert-subject: #optional server certificate subject
788 { 'command': 'client_migrate_info',
789 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
790 '*tls-port': 'int', '*cert-subject': 'str' } }
793 # @migrate-start-postcopy
795 # Followup to a migration command to switch the migration to postcopy mode.
796 # The postcopy-ram capability must be set before the original migration
800 { 'command': 'migrate-start-postcopy' }
805 # The message transmission between Primary side and Secondary side.
807 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
809 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
811 # @checkpoint-reply: SVM gets PVM's checkpoint request
813 # @vmstate-send: VM's state will be sent by PVM.
815 # @vmstate-size: The total size of VMstate.
817 # @vmstate-received: VM's state has been received by SVM.
819 # @vmstate-loaded: VM's state has been loaded by SVM.
823 { 'enum': 'COLOMessage',
824 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
825 'vmstate-send', 'vmstate-size', 'vmstate-received',
833 # @unknown: unknown mode
835 # @primary: master side
837 # @secondary: slave side
841 { 'enum': 'COLOMode',
842 'data': [ 'unknown', 'primary', 'secondary'] }
847 # An enumeration of COLO failover status
849 # @none: no failover has ever happened
851 # @require: got failover requirement but not handled
853 # @active: in the process of doing failover
855 # @completed: finish the process of failover
859 { 'enum': 'FailoverStatus',
860 'data': [ 'none', 'require', 'active', 'completed'] }
863 # @x-colo-lost-heartbeat
865 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
866 # If this command is sent to the PVM, the Primary side will exit COLO mode.
867 # If sent to the Secondary, the Secondary side will run failover work,
868 # then takes over server operation to become the service VM.
872 { 'command': 'x-colo-lost-heartbeat' }
877 # Information about a mouse device.
879 # @name: the name of the mouse device
881 # @index: the index of the mouse device
883 # @current: true if this device is currently receiving mouse events
885 # @absolute: true if this device supports absolute coordinates as input
889 { 'struct': 'MouseInfo',
890 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
891 'absolute': 'bool'} }
896 # Returns information about each active mouse device
898 # Returns: a list of @MouseInfo for each device
902 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
907 # An enumeration of cpu types that enable additional information during
912 { 'enum': 'CpuInfoArch',
913 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
918 # Information about a virtual CPU
920 # @CPU: the index of the virtual CPU
922 # @current: this only exists for backwards compatibility and should be ignored
924 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
925 # to a processor specific low power mode.
927 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
929 # @thread_id: ID of the underlying host thread
931 # @arch: architecture of the cpu, which determines which additional fields
932 # will be listed (since 2.6)
936 # Notes: @halted is a transient state that changes frequently. By the time the
937 # data is sent to the client, the guest may no longer be halted.
939 { 'union': 'CpuInfo',
940 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
941 'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' },
942 'discriminator': 'arch',
943 'data': { 'x86': 'CpuInfoX86',
944 'sparc': 'CpuInfoSPARC',
946 'mips': 'CpuInfoMIPS',
947 'tricore': 'CpuInfoTricore',
948 'other': 'CpuInfoOther' } }
953 # Additional information about a virtual i386 or x86_64 CPU
955 # @pc: the 64-bit instruction pointer
959 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
964 # Additional information about a virtual SPARC CPU
966 # @pc: the PC component of the instruction pointer
968 # @npc: the NPC component of the instruction pointer
972 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
977 # Additional information about a virtual PPC CPU
979 # @nip: the instruction pointer
983 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
988 # Additional information about a virtual MIPS CPU
990 # @PC: the instruction pointer
994 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
999 # Additional information about a virtual Tricore CPU
1001 # @PC: the instruction pointer
1005 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
1010 # No additional information is available about the virtual CPU
1015 { 'struct': 'CpuInfoOther', 'data': { } }
1020 # Returns a list of information about each virtual CPU.
1022 # Returns: a list of @CpuInfo for each virtual CPU
1026 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
1031 # Information about an iothread
1033 # @id: the identifier of the iothread
1035 # @thread-id: ID of the underlying host thread
1039 { 'struct': 'IOThreadInfo',
1040 'data': {'id': 'str', 'thread-id': 'int'} }
1045 # Returns a list of information about each iothread.
1047 # Note this list excludes the QEMU main loop thread, which is not declared
1048 # using the -object iothread command-line option. It is always the main thread
1051 # Returns: a list of @IOThreadInfo for each iothread
1055 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
1058 # @NetworkAddressFamily
1060 # The network address family
1062 # @ipv4: IPV4 family
1064 # @ipv6: IPV6 family
1066 # @unix: unix socket
1068 # @vsock: vsock family (since 2.8)
1070 # @unknown: otherwise
1074 { 'enum': 'NetworkAddressFamily',
1075 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
1080 # The basic information for vnc network connection
1084 # @service: The service name of the vnc port. This may depend on the host
1085 # system's service database so symbolic names should not be relied
1088 # @family: address family
1090 # @websocket: true in case the socket is a websocket (since 2.3).
1094 { 'struct': 'VncBasicInfo',
1095 'data': { 'host': 'str',
1097 'family': 'NetworkAddressFamily',
1098 'websocket': 'bool' } }
1103 # The network connection information for server
1105 # @auth: #optional, authentication method
1109 { 'struct': 'VncServerInfo',
1110 'base': 'VncBasicInfo',
1111 'data': { '*auth': 'str' } }
1116 # Information about a connected VNC client.
1118 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
1119 # Name of the client.
1121 # @sasl_username: #optional If SASL authentication is in use, the SASL username
1122 # used for authentication.
1126 { 'struct': 'VncClientInfo',
1127 'base': 'VncBasicInfo',
1128 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1133 # Information about the VNC session.
1135 # @enabled: true if the VNC server is enabled, false otherwise
1137 # @host: #optional The hostname the VNC server is bound to. This depends on
1138 # the name resolution on the host and may be an IP address.
1140 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
1141 # 'ipv4' if the host is listening for IPv4 connections
1142 # 'unix' if the host is listening on a unix domain socket
1143 # 'unknown' otherwise
1145 # @service: #optional The service name of the server's port. This may depends
1146 # on the host system's service database so symbolic names should not
1149 # @auth: #optional the current authentication type used by the server
1150 # 'none' if no authentication is being used
1151 # 'vnc' if VNC authentication is being used
1152 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
1153 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1154 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1155 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1156 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1157 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1158 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1159 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1160 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1162 # @clients: a list of @VncClientInfo of all currently connected clients
1166 { 'struct': 'VncInfo',
1167 'data': {'enabled': 'bool', '*host': 'str',
1168 '*family': 'NetworkAddressFamily',
1169 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1174 # vnc primary authentication method.
1178 { 'enum': 'VncPrimaryAuth',
1179 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1180 'tls', 'vencrypt', 'sasl' ] }
1183 # @VncVencryptSubAuth:
1185 # vnc sub authentication method with vencrypt.
1189 { 'enum': 'VncVencryptSubAuth',
1191 'tls-none', 'x509-none',
1192 'tls-vnc', 'x509-vnc',
1193 'tls-plain', 'x509-plain',
1194 'tls-sasl', 'x509-sasl' ] }
1199 # Information about a vnc server
1201 # @id: vnc server name.
1203 # @server: A list of @VncBasincInfo describing all listening sockets.
1204 # The list can be empty (in case the vnc server is disabled).
1205 # It also may have multiple entries: normal + websocket,
1206 # possibly also ipv4 + ipv6 in the future.
1208 # @clients: A list of @VncClientInfo of all currently connected clients.
1209 # The list can be empty, for obvious reasons.
1211 # @auth: The current authentication type used by the server
1213 # @vencrypt: #optional The vencrypt sub authentication type used by the server,
1214 # only specified in case auth == vencrypt.
1216 # @display: #optional The display device the vnc server is linked to.
1220 { 'struct': 'VncInfo2',
1221 'data': { 'id' : 'str',
1222 'server' : ['VncBasicInfo'],
1223 'clients' : ['VncClientInfo'],
1224 'auth' : 'VncPrimaryAuth',
1225 '*vencrypt' : 'VncVencryptSubAuth',
1226 '*display' : 'str' } }
1231 # Returns information about the current VNC server
1237 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1240 # @query-vnc-servers:
1242 # Returns a list of vnc servers. The list can be empty.
1244 # Returns: a list of @VncInfo2
1248 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1253 # The basic information for SPICE network connection
1257 # @port: port number
1259 # @family: address family
1263 { 'struct': 'SpiceBasicInfo',
1264 'data': { 'host': 'str',
1266 'family': 'NetworkAddressFamily' } }
1271 # Information about a SPICE server
1273 # @auth: #optional, authentication method
1277 { 'struct': 'SpiceServerInfo',
1278 'base': 'SpiceBasicInfo',
1279 'data': { '*auth': 'str' } }
1284 # Information about a SPICE client channel.
1286 # @connection-id: SPICE connection id number. All channels with the same id
1287 # belong to the same SPICE session.
1289 # @channel-type: SPICE channel type number. "1" is the main control
1290 # channel, filter for this one if you want to track spice
1293 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1294 # multiple channels of the same type exist, such as multiple
1295 # display channels in a multihead setup
1297 # @tls: true if the channel is encrypted, false otherwise.
1301 { 'struct': 'SpiceChannel',
1302 'base': 'SpiceBasicInfo',
1303 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1307 # @SpiceQueryMouseMode
1309 # An enumeration of Spice mouse states.
1311 # @client: Mouse cursor position is determined by the client.
1313 # @server: Mouse cursor position is determined by the server.
1315 # @unknown: No information is available about mouse mode used by
1318 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1322 { 'enum': 'SpiceQueryMouseMode',
1323 'data': [ 'client', 'server', 'unknown' ] }
1328 # Information about the SPICE session.
1330 # @enabled: true if the SPICE server is enabled, false otherwise
1332 # @migrated: true if the last guest migration completed and spice
1333 # migration had completed as well. false otherwise.
1335 # @host: #optional The hostname the SPICE server is bound to. This depends on
1336 # the name resolution on the host and may be an IP address.
1338 # @port: #optional The SPICE server's port number.
1340 # @compiled-version: #optional SPICE server version.
1342 # @tls-port: #optional The SPICE server's TLS port number.
1344 # @auth: #optional the current authentication type used by the server
1345 # 'none' if no authentication is being used
1346 # 'spice' uses SASL or direct TLS authentication, depending on command
1349 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1350 # be determined by the client or the server, or unknown if spice
1351 # server doesn't provide this information.
1355 # @channels: a list of @SpiceChannel for each active spice channel
1359 { 'struct': 'SpiceInfo',
1360 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1361 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1362 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1367 # Returns information about the current SPICE server
1369 # Returns: @SpiceInfo
1373 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1378 # Information about the guest balloon device.
1380 # @actual: the number of bytes the balloon currently contains
1385 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1390 # Return information about the balloon device.
1392 # Returns: @BalloonInfo on success
1393 # If the balloon driver is enabled but not functional because the KVM
1394 # kernel module cannot support it, KvmMissingCap
1395 # If no balloon device is present, DeviceNotActive
1399 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1404 # A PCI device memory region
1406 # @base: the starting address (guest physical)
1408 # @limit: the ending address (guest physical)
1412 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1417 # Information about a PCI device I/O region.
1419 # @bar: the index of the Base Address Register for this region
1421 # @type: 'io' if the region is a PIO region
1422 # 'memory' if the region is a MMIO region
1424 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1426 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1430 { 'struct': 'PciMemoryRegion',
1431 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1432 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1437 # Information about a bus of a PCI Bridge device
1439 # @number: primary bus interface number. This should be the number of the
1440 # bus the device resides on.
1442 # @secondary: secondary bus interface number. This is the number of the
1443 # main bus for the bridge
1445 # @subordinate: This is the highest number bus that resides below the
1448 # @io_range: The PIO range for all devices on this bridge
1450 # @memory_range: The MMIO range for all devices on this bridge
1452 # @prefetchable_range: The range of prefetchable MMIO for all devices on
1457 { 'struct': 'PciBusInfo',
1458 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1459 'io_range': 'PciMemoryRange',
1460 'memory_range': 'PciMemoryRange',
1461 'prefetchable_range': 'PciMemoryRange' } }
1466 # Information about a PCI Bridge device
1468 # @bus: information about the bus the device resides on
1470 # @devices: a list of @PciDeviceInfo for each device on this bridge
1474 { 'struct': 'PciBridgeInfo',
1475 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
1480 # Information about the Class of a PCI device
1482 # @desc: #optional a string description of the device's class
1484 # @class: the class code of the device
1488 { 'struct': 'PciDeviceClass',
1489 'data': {'*desc': 'str', 'class': 'int'} }
1494 # Information about the Id of a PCI device
1496 # @device: the PCI device id
1498 # @vendor: the PCI vendor id
1502 { 'struct': 'PciDeviceId',
1503 'data': {'device': 'int', 'vendor': 'int'} }
1508 # Information about a PCI device
1510 # @bus: the bus number of the device
1512 # @slot: the slot the device is located in
1514 # @function: the function of the slot used by the device
1516 # @class_info: the class of the device
1518 # @id: the PCI device id
1520 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1522 # @qdev_id: the device name of the PCI device
1524 # @pci_bridge: if the device is a PCI bridge, the bridge information
1526 # @regions: a list of the PCI I/O regions associated with the device
1528 # Notes: the contents of @class_info.desc are not stable and should only be
1529 # treated as informational.
1533 { 'struct': 'PciDeviceInfo',
1534 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1535 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
1536 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1537 'regions': ['PciMemoryRegion']} }
1542 # Information about a PCI bus
1544 # @bus: the bus index
1546 # @devices: a list of devices on this bus
1550 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1555 # Return information about the PCI bus topology of the guest.
1557 # Returns: a list of @PciInfo for each PCI bus
1561 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1566 # This command will cause the QEMU process to exit gracefully. While every
1567 # attempt is made to send the QMP response before terminating, this is not
1568 # guaranteed. When using this interface, a premature EOF would not be
1573 { 'command': 'quit' }
1578 # Stop all guest VCPU execution.
1582 # Notes: This function will succeed even if the guest is already in the stopped
1583 # state. In "inmigrate" state, it will ensure that the guest
1584 # remains paused once migration finishes, as if the -S option was
1585 # passed on the command line.
1587 { 'command': 'stop' }
1592 # Performs a hard reset of a guest.
1596 { 'command': 'system_reset' }
1599 # @system_powerdown:
1601 # Requests that a guest perform a powerdown operation.
1605 # Notes: A guest may or may not respond to this command. This command
1606 # returning does not indicate that a guest has accepted the request or
1607 # that it has shut down. Many guests will respond to this command by
1608 # prompting the user in some way.
1610 { 'command': 'system_powerdown' }
1615 # This command is a nop that is only provided for the purposes of compatibility.
1619 # Notes: Do not use this command.
1621 { 'command': 'cpu', 'data': {'index': 'int'} }
1626 # Adds CPU with specified ID
1628 # @id: ID of CPU to be created, valid values [0..max_cpus)
1630 # Returns: Nothing on success
1634 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1639 # Save a portion of guest memory to a file.
1641 # @val: the virtual address of the guest to start from
1643 # @size: the size of memory region to save
1645 # @filename: the file to save the memory to as binary data
1647 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1648 # virtual address (defaults to CPU 0)
1650 # Returns: Nothing on success
1654 # Notes: Errors were not reliably returned until 1.1
1656 { 'command': 'memsave',
1657 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1662 # Save a portion of guest physical memory to a file.
1664 # @val: the physical address of the guest to start from
1666 # @size: the size of memory region to save
1668 # @filename: the file to save the memory to as binary data
1670 # Returns: Nothing on success
1674 # Notes: Errors were not reliably returned until 1.1
1676 { 'command': 'pmemsave',
1677 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1682 # Resume guest VCPU execution.
1686 # Returns: If successful, nothing
1687 # If QEMU was started with an encrypted block device and a key has
1688 # not yet been set, DeviceEncrypted.
1690 # Notes: This command will succeed if the guest is currently running. It
1691 # will also succeed if the guest is in the "inmigrate" state; in
1692 # this case, the effect of the command is to make sure the guest
1693 # starts once migration finishes, removing the effect of the -S
1694 # command line option if it was passed.
1696 { 'command': 'cont' }
1701 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1707 { 'command': 'system_wakeup' }
1712 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
1714 # Returns: If successful, nothing
1718 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
1720 { 'command': 'inject-nmi' }
1725 # Sets the link status of a virtual network adapter.
1727 # @name: the device name of the virtual network adapter
1729 # @up: true to set the link status to be up
1731 # Returns: Nothing on success
1732 # If @name is not a valid network device, DeviceNotFound
1736 # Notes: Not all network adapters support setting link status. This command
1737 # will succeed even if the network adapter does not support link status
1740 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1745 # Request the balloon driver to change its balloon size.
1747 # @value: the target size of the balloon in bytes
1749 # Returns: Nothing on success
1750 # If the balloon driver is enabled but not functional because the KVM
1751 # kernel module cannot support it, KvmMissingCap
1752 # If no balloon device is present, DeviceNotActive
1754 # Notes: This command just issues a request to the guest. When it returns,
1755 # the balloon size may not have changed. A guest can change the balloon
1756 # size independent of this command.
1760 { 'command': 'balloon', 'data': {'value': 'int'} }
1765 # This action can be used to test transaction failure.
1769 { 'struct': 'Abort',
1773 # @ActionCompletionMode
1775 # An enumeration of Transactional completion modes.
1777 # @individual: Do not attempt to cancel any other Actions if any Actions fail
1778 # after the Transaction request succeeds. All Actions that
1779 # can complete successfully will do so without waiting on others.
1780 # This is the default.
1782 # @grouped: If any Action fails after the Transaction succeeds, cancel all
1783 # Actions. Actions do not complete until all Actions are ready to
1784 # complete. May be rejected by Actions that do not support this
1789 { 'enum': 'ActionCompletionMode',
1790 'data': [ 'individual', 'grouped' ] }
1793 # @TransactionAction
1795 # A discriminated record of operations that can be performed with
1800 # drive-backup since 1.6
1802 # blockdev-snapshot-internal-sync since 1.7
1803 # blockdev-backup since 2.3
1804 # blockdev-snapshot since 2.5
1805 # block-dirty-bitmap-add since 2.5
1806 # block-dirty-bitmap-clear since 2.5
1808 { 'union': 'TransactionAction',
1810 'blockdev-snapshot': 'BlockdevSnapshot',
1811 'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
1812 'drive-backup': 'DriveBackup',
1813 'blockdev-backup': 'BlockdevBackup',
1815 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
1816 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
1817 'block-dirty-bitmap-clear': 'BlockDirtyBitmap'
1821 # @TransactionProperties
1823 # Optional arguments to modify the behavior of a Transaction.
1825 # @completion-mode: #optional Controls how jobs launched asynchronously by
1826 # Actions will complete or fail as a group.
1827 # See @ActionCompletionMode for details.
1831 { 'struct': 'TransactionProperties',
1833 '*completion-mode': 'ActionCompletionMode'
1840 # Executes a number of transactionable QMP commands atomically. If any
1841 # operation fails, then the entire set of actions will be abandoned and the
1842 # appropriate error returned.
1844 # @actions: List of @TransactionAction;
1845 # information needed for the respective operations.
1847 # @properties: #optional structure of additional options to control the
1848 # execution of the transaction. See @TransactionProperties
1849 # for additional detail.
1851 # Returns: nothing on success
1852 # Errors depend on the operations of the transaction
1854 # Note: The transaction aborts on the first failure. Therefore, there will be
1855 # information on only one failed operation returned in an error condition, and
1856 # subsequent actions will not have been attempted.
1860 { 'command': 'transaction',
1861 'data': { 'actions': [ 'TransactionAction' ],
1862 '*properties': 'TransactionProperties'
1867 # @human-monitor-command:
1869 # Execute a command on the human monitor and return the output.
1871 # @command-line: the command to execute in the human monitor
1873 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1875 # Returns: the output of the command as a string
1879 # Notes: This command only exists as a stop-gap. Its use is highly
1880 # discouraged. The semantics of this command are not guaranteed.
1882 # Known limitations:
1884 # o This command is stateless, this means that commands that depend
1885 # on state information (such as getfd) might not work
1887 # o Commands that prompt the user for data (eg. 'cont' when the block
1888 # device is encrypted) don't currently work
1890 { 'command': 'human-monitor-command',
1891 'data': {'command-line': 'str', '*cpu-index': 'int'},
1897 # Cancel the current executing migration process.
1899 # Returns: nothing on success
1901 # Notes: This command succeeds even if there is no migration process running.
1905 { 'command': 'migrate_cancel' }
1908 # @migrate_set_downtime
1910 # Set maximum tolerated downtime for migration.
1912 # @value: maximum downtime in seconds
1914 # Returns: nothing on success
1916 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1920 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1923 # @migrate_set_speed
1925 # Set maximum speed for migration.
1927 # @value: maximum speed in bytes.
1929 # Returns: nothing on success
1931 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1935 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1938 # @migrate-set-cache-size
1940 # Set XBZRLE cache size
1942 # @value: cache size in bytes
1944 # The size will be rounded down to the nearest power of 2.
1945 # The cache size can be modified before and during ongoing migration
1947 # Returns: nothing on success
1951 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1954 # @query-migrate-cache-size
1956 # query XBZRLE cache size
1958 # Returns: XBZRLE cache size in bytes
1962 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1965 # @ObjectPropertyInfo:
1967 # @name: the name of the property
1969 # @type: the type of the property. This will typically come in one of four
1972 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1973 # These types are mapped to the appropriate JSON type.
1975 # 2) A child type in the form 'child<subtype>' where subtype is a qdev
1976 # device type name. Child properties create the composition tree.
1978 # 3) A link type in the form 'link<subtype>' where subtype is a qdev
1979 # device type name. Link properties form the device model graph.
1983 { 'struct': 'ObjectPropertyInfo',
1984 'data': { 'name': 'str', 'type': 'str' } }
1989 # This command will list any properties of a object given a path in the object
1992 # @path: the path within the object model. See @qom-get for a description of
1995 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
2000 { 'command': 'qom-list',
2001 'data': { 'path': 'str' },
2002 'returns': [ 'ObjectPropertyInfo' ] }
2007 # This command will get a property from a object model path and return the
2010 # @path: The path within the object model. There are two forms of supported
2011 # paths--absolute and partial paths.
2013 # Absolute paths are derived from the root object and can follow child<>
2014 # or link<> properties. Since they can follow link<> properties, they
2015 # can be arbitrarily long. Absolute paths look like absolute filenames
2016 # and are prefixed with a leading slash.
2018 # Partial paths look like relative filenames. They do not begin
2019 # with a prefix. The matching rules for partial paths are subtle but
2020 # designed to make specifying objects easy. At each level of the
2021 # composition tree, the partial path is matched as an absolute path.
2022 # The first match is not returned. At least two matches are searched
2023 # for. A successful result is only returned if only one match is
2024 # found. If more than one match is found, a flag is return to
2025 # indicate that the match was ambiguous.
2027 # @property: The property name to read
2029 # Returns: The property value. The type depends on the property
2030 # type. child<> and link<> properties are returned as #str
2031 # pathnames. All integer property types (u8, u16, etc) are
2036 { 'command': 'qom-get',
2037 'data': { 'path': 'str', 'property': 'str' },
2043 # This command will set a property from a object model path.
2045 # @path: see @qom-get for a description of this parameter
2047 # @property: the property name to set
2049 # @value: a value who's type is appropriate for the property type. See @qom-get
2050 # for a description of type mapping.
2054 { 'command': 'qom-set',
2055 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
2060 # Sets the password of a remote display session.
2062 # @protocol: `vnc' to modify the VNC server password
2063 # `spice' to modify the Spice server password
2065 # @password: the new password
2067 # @connected: #optional how to handle existing clients when changing the
2068 # password. If nothing is specified, defaults to `keep'
2069 # `fail' to fail the command if clients are connected
2070 # `disconnect' to disconnect existing clients
2071 # `keep' to maintain existing clients
2073 # Returns: Nothing on success
2074 # If Spice is not enabled, DeviceNotFound
2078 { 'command': 'set_password',
2079 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2084 # Expire the password of a remote display server.
2086 # @protocol: the name of the remote display protocol `vnc' or `spice'
2088 # @time: when to expire the password.
2089 # `now' to expire the password immediately
2090 # `never' to cancel password expiration
2091 # `+INT' where INT is the number of seconds from now (integer)
2092 # `INT' where INT is the absolute time in seconds
2094 # Returns: Nothing on success
2095 # If @protocol is `spice' and Spice is not active, DeviceNotFound
2099 # Notes: Time is relative to the server and currently there is no way to
2100 # coordinate server time with client time. It is not recommended to
2101 # use the absolute time version of the @time parameter unless you're
2102 # sure you are on the same machine as the QEMU instance.
2104 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2107 # @change-vnc-password:
2109 # Change the VNC server password.
2111 # @password: the new password to use with VNC authentication
2115 # Notes: An empty password in this command will set the password to the empty
2116 # string. Existing clients are unaffected by executing this command.
2118 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2123 # This command is multiple commands multiplexed together.
2125 # @device: This is normally the name of a block device but it may also be 'vnc'.
2126 # when it's 'vnc', then sub command depends on @target
2128 # @target: If @device is a block device, then this is the new filename.
2129 # If @device is 'vnc', then if the value 'password' selects the vnc
2130 # change password command. Otherwise, this specifies a new server URI
2131 # address to listen to for VNC connections.
2133 # @arg: If @device is a block device, then this is an optional format to open
2135 # If @device is 'vnc' and @target is 'password', this is the new VNC
2136 # password to set. If this argument is an empty string, then no future
2137 # logins will be allowed.
2139 # Returns: Nothing on success.
2140 # If @device is not a valid block device, DeviceNotFound
2141 # If the new block device is encrypted, DeviceEncrypted. Note that
2142 # if this error is returned, the device has been opened successfully
2143 # and an additional call to @block_passwd is required to set the
2144 # device's password. The behavior of reads and writes to the block
2145 # device between when these calls are executed is undefined.
2147 # Notes: This interface is deprecated, and it is strongly recommended that you
2148 # avoid using it. For changing block devices, use
2149 # blockdev-change-medium; for changing VNC parameters, use
2150 # change-vnc-password.
2154 { 'command': 'change',
2155 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2160 # This structure describes a search result from @qom-list-types
2162 # @name: the type name found in the search
2166 # Notes: This command is experimental and may change syntax in future releases.
2168 { 'struct': 'ObjectTypeInfo',
2169 'data': { 'name': 'str' } }
2174 # This command will return a list of types given search parameters
2176 # @implements: if specified, only return types that implement this type name
2178 # @abstract: if true, include abstract types in the results
2180 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2184 { 'command': 'qom-list-types',
2185 'data': { '*implements': 'str', '*abstract': 'bool' },
2186 'returns': [ 'ObjectTypeInfo' ] }
2189 # @DevicePropertyInfo:
2191 # Information about device properties.
2193 # @name: the name of the property
2194 # @type: the typename of the property
2195 # @description: #optional if specified, the description of the property.
2200 { 'struct': 'DevicePropertyInfo',
2201 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
2204 # @device-list-properties:
2206 # List properties associated with a device.
2208 # @typename: the type name of a device
2210 # Returns: a list of DevicePropertyInfo describing a devices properties
2214 { 'command': 'device-list-properties',
2215 'data': { 'typename': 'str'},
2216 'returns': [ 'DevicePropertyInfo' ] }
2221 # Migrates the current running guest to another Virtual Machine.
2223 # @uri: the Uniform Resource Identifier of the destination VM
2225 # @blk: #optional do block migration (full disk copy)
2227 # @inc: #optional incremental disk copy migration
2229 # @detach: this argument exists only for compatibility reasons and
2230 # is ignored by QEMU
2232 # Returns: nothing on success
2236 { 'command': 'migrate',
2237 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2242 # Start an incoming migration, the qemu must have been started
2243 # with -incoming defer
2245 # @uri: The Uniform Resource Identifier identifying the source or
2246 # address to listen on
2248 # Returns: nothing on success
2251 # Note: It's a bad idea to use a string for the uri, but it needs to stay
2252 # compatible with -incoming and the format of the uri is already exposed
2255 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
2257 # @xen-save-devices-state:
2259 # Save the state of all devices to file. The RAM and the block devices
2260 # of the VM are not saved by this command.
2262 # @filename: the file to save the state of the devices to as binary
2263 # data. See xen-save-devices-state.txt for a description of the binary
2266 # Returns: Nothing on success
2270 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2273 # @xen-set-global-dirty-log
2275 # Enable or disable the global dirty log mode.
2277 # @enable: true to enable, false to disable.
2283 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2288 # @driver: the name of the new device's driver
2290 # @bus: #optional the device's parent bus (device tree path)
2292 # @id: the device's ID, must be unique
2294 # Additional arguments depend on the type.
2299 # 1. For detailed information about this command, please refer to the
2300 # 'docs/qdev-device-use.txt' file.
2302 # 2. It's possible to list device properties by running QEMU with the
2303 # "-device DEVICE,help" command-line argument, where DEVICE is the
2308 # -> { "execute": "device_add",
2309 # "arguments": { "driver": "e1000", "id": "net1",
2311 # "mac": "52:54:00:12:34:56" } }
2312 # <- { "return": {} }
2314 # TODO This command effectively bypasses QAPI completely due to its
2315 # "additional arguments" business. It shouldn't have been added to
2316 # the schema in this form. It should be qapified properly, or
2317 # replaced by a properly qapified command.
2321 { 'command': 'device_add',
2322 'data': {'driver': 'str', 'id': 'str'},
2323 'gen': false } # so we can get the additional arguments
2328 # Remove a device from a guest
2330 # @id: the name or QOM path of the device
2332 # Returns: Nothing on success
2333 # If @id is not a valid device, DeviceNotFound
2335 # Notes: When this command completes, the device may not be removed from the
2336 # guest. Hot removal is an operation that requires guest cooperation.
2337 # This command merely requests that the guest begin the hot removal
2338 # process. Completion of the device removal process is signaled with a
2339 # DEVICE_DELETED event. Guest reset will automatically complete removal
2344 { 'command': 'device_del', 'data': {'id': 'str'} }
2347 # @DumpGuestMemoryFormat:
2349 # An enumeration of guest-memory-dump's format.
2353 # @kdump-zlib: kdump-compressed format with zlib-compressed
2355 # @kdump-lzo: kdump-compressed format with lzo-compressed
2357 # @kdump-snappy: kdump-compressed format with snappy-compressed
2361 { 'enum': 'DumpGuestMemoryFormat',
2362 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
2365 # @dump-guest-memory
2367 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2368 # very long depending on the amount of guest memory.
2370 # @paging: if true, do paging to get guest's memory mapping. This allows
2371 # using gdb to process the core file.
2373 # IMPORTANT: this option can make QEMU allocate several gigabytes
2374 # of RAM. This can happen for a large guest, or a
2375 # malicious guest pretending to be large.
2377 # Also, paging=true has the following limitations:
2379 # 1. The guest may be in a catastrophic state or can have corrupted
2380 # memory, which cannot be trusted
2381 # 2. The guest can be in real-mode even if paging is enabled. For
2382 # example, the guest uses ACPI to sleep, and ACPI sleep state
2384 # 3. Currently only supported on i386 and x86_64.
2386 # @protocol: the filename or file descriptor of the vmcore. The supported
2389 # 1. file: the protocol starts with "file:", and the following
2390 # string is the file's path.
2391 # 2. fd: the protocol starts with "fd:", and the following string
2394 # @detach: #optional if true, QMP will return immediately rather than
2395 # waiting for the dump to finish. The user can track progress
2396 # using "query-dump". (since 2.6).
2398 # @begin: #optional if specified, the starting physical address.
2400 # @length: #optional if specified, the memory size, in bytes. If you don't
2401 # want to dump all guest's memory, please specify the start @begin
2404 # @format: #optional if specified, the format of guest memory dump. But non-elf
2405 # format is conflict with paging and filter, ie. @paging, @begin and
2406 # @length is not allowed to be specified with non-elf @format at the
2407 # same time (since 2.0)
2409 # Returns: nothing on success
2413 { 'command': 'dump-guest-memory',
2414 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
2415 '*begin': 'int', '*length': 'int',
2416 '*format': 'DumpGuestMemoryFormat'} }
2421 # Describe the status of a long-running background guest memory dump.
2423 # @none: no dump-guest-memory has started yet.
2425 # @active: there is one dump running in background.
2427 # @completed: the last dump has finished successfully.
2429 # @failed: the last dump has failed.
2433 { 'enum': 'DumpStatus',
2434 'data': [ 'none', 'active', 'completed', 'failed' ] }
2439 # The result format for 'query-dump'.
2441 # @status: enum of @DumpStatus, which shows current dump status
2443 # @completed: bytes written in latest dump (uncompressed)
2445 # @total: total bytes to be written in latest dump (uncompressed)
2449 { 'struct': 'DumpQueryResult',
2450 'data': { 'status': 'DumpStatus',
2457 # Query latest dump status.
2459 # Returns: A @DumpStatus object showing the dump status.
2463 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
2466 # @DumpGuestMemoryCapability:
2468 # A list of the available formats for dump-guest-memory
2472 { 'struct': 'DumpGuestMemoryCapability',
2474 'formats': ['DumpGuestMemoryFormat'] } }
2477 # @query-dump-guest-memory-capability:
2479 # Returns the available formats for dump-guest-memory
2481 # Returns: A @DumpGuestMemoryCapability object listing available formats for
2486 { 'command': 'query-dump-guest-memory-capability',
2487 'returns': 'DumpGuestMemoryCapability' }
2492 # Dump guest's storage keys
2494 # @filename: the path to the file to dump to
2496 # This command is only supported on s390 architecture.
2500 { 'command': 'dump-skeys',
2501 'data': { 'filename': 'str' } }
2506 # Add a network backend.
2508 # @type: the type of network backend. Current valid values are 'user', 'tap',
2509 # 'vde', 'socket', 'dump' and 'bridge'
2511 # @id: the name of the new network backend
2513 # Additional arguments depend on the type.
2515 # TODO This command effectively bypasses QAPI completely due to its
2516 # "additional arguments" business. It shouldn't have been added to
2517 # the schema in this form. It should be qapified properly, or
2518 # replaced by a properly qapified command.
2522 # Returns: Nothing on success
2523 # If @type is not a valid network backend, DeviceNotFound
2525 { 'command': 'netdev_add',
2526 'data': {'type': 'str', 'id': 'str'},
2527 'gen': false } # so we can get the additional arguments
2532 # Remove a network backend.
2534 # @id: the name of the network backend to remove
2536 # Returns: Nothing on success
2537 # If @id is not a valid network backend, DeviceNotFound
2541 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2546 # Create a QOM object.
2548 # @qom-type: the class name for the object to be created
2550 # @id: the name of the new object
2552 # @props: #optional a dictionary of properties to be passed to the backend
2554 # Returns: Nothing on success
2555 # Error if @qom-type is not a valid class name
2559 { 'command': 'object-add',
2560 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
2565 # Remove a QOM object.
2567 # @id: the name of the QOM object to remove
2569 # Returns: Nothing on success
2570 # Error if @id is not a valid id for a QOM object
2574 { 'command': 'object-del', 'data': {'id': 'str'} }
2577 # @NetdevNoneOptions
2579 # Use it alone to have zero network devices.
2583 { 'struct': 'NetdevNoneOptions',
2587 # @NetLegacyNicOptions
2589 # Create a new Network Interface Card.
2591 # @netdev: #optional id of -netdev to connect to
2593 # @macaddr: #optional MAC address
2595 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2597 # @addr: #optional PCI device address
2599 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2603 { 'struct': 'NetLegacyNicOptions',
2609 '*vectors': 'uint32' } }
2614 # A fat type wrapping 'str', to be embedded in lists.
2618 { 'struct': 'String',
2623 # @NetdevUserOptions
2625 # Use the user mode network stack which requires no administrator privilege to
2628 # @hostname: #optional client hostname reported by the builtin DHCP server
2630 # @restrict: #optional isolate the guest from the host
2632 # @ipv4: #optional whether to support IPv4, default true for enabled
2635 # @ipv6: #optional whether to support IPv6, default true for enabled
2638 # @ip: #optional legacy parameter, use net= instead
2640 # @net: #optional IP network address that the guest will see, in the
2641 # form addr[/netmask] The netmask is optional, and can be
2642 # either in the form a.b.c.d or as a number of valid top-most
2643 # bits. Default is 10.0.2.0/24.
2645 # @host: #optional guest-visible address of the host
2647 # @tftp: #optional root directory of the built-in TFTP server
2649 # @bootfile: #optional BOOTP filename, for use with tftp=
2651 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2654 # @dns: #optional guest-visible address of the virtual nameserver
2656 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2659 # @ipv6-prefix: #optional IPv6 network prefix (default is fec0::) (since
2660 # 2.6). The network prefix is given in the usual
2661 # hexadecimal IPv6 address notation.
2663 # @ipv6-prefixlen: #optional IPv6 network prefix length (default is 64)
2666 # @ipv6-host: #optional guest-visible IPv6 address of the host (since 2.6)
2668 # @ipv6-dns: #optional guest-visible IPv6 address of the virtual
2669 # nameserver (since 2.6)
2671 # @smb: #optional root directory of the built-in SMB server
2673 # @smbserver: #optional IP address of the built-in SMB server
2675 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2678 # @guestfwd: #optional forward guest TCP connections
2682 { 'struct': 'NetdevUserOptions',
2685 '*restrict': 'bool',
2693 '*dhcpstart': 'str',
2695 '*dnssearch': ['String'],
2696 '*ipv6-prefix': 'str',
2697 '*ipv6-prefixlen': 'int',
2698 '*ipv6-host': 'str',
2701 '*smbserver': 'str',
2702 '*hostfwd': ['String'],
2703 '*guestfwd': ['String'] } }
2708 # Connect the host TAP network interface name to the VLAN.
2710 # @ifname: #optional interface name
2712 # @fd: #optional file descriptor of an already opened tap
2714 # @fds: #optional multiple file descriptors of already opened multiqueue capable
2717 # @script: #optional script to initialize the interface
2719 # @downscript: #optional script to shut down the interface
2721 # @br: #optional bridge name (since 2.8)
2723 # @helper: #optional command to execute to configure bridge
2725 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2727 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2729 # @vhost: #optional enable vhost-net network accelerator
2731 # @vhostfd: #optional file descriptor of an already opened vhost net device
2733 # @vhostfds: #optional file descriptors of multiple already opened vhost net
2736 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2738 # @queues: #optional number of queues to be created for multiqueue capable tap
2740 # @poll-us: #optional maximum number of microseconds that could
2741 # be spent on busy polling for tap (since 2.7)
2745 { 'struct': 'NetdevTapOptions',
2751 '*downscript': 'str',
2755 '*vnet_hdr': 'bool',
2759 '*vhostforce': 'bool',
2760 '*queues': 'uint32',
2761 '*poll-us': 'uint32'} }
2764 # @NetdevSocketOptions
2766 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2767 # socket connection.
2769 # @fd: #optional file descriptor of an already opened socket
2771 # @listen: #optional port number, and optional hostname, to listen on
2773 # @connect: #optional port number, and optional hostname, to connect to
2775 # @mcast: #optional UDP multicast address and port number
2777 # @localaddr: #optional source address and port for multicast and udp packets
2779 # @udp: #optional UDP unicast address and port number
2783 { 'struct': 'NetdevSocketOptions',
2789 '*localaddr': 'str',
2793 # @NetdevL2TPv3Options
2795 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
2797 # @src: source address
2799 # @dst: destination address
2801 # @srcport: #optional source port - mandatory for udp, optional for ip
2803 # @dstport: #optional destination port - mandatory for udp, optional for ip
2805 # @ipv6: #optional - force the use of ipv6
2807 # @udp: #optional - use the udp version of l2tpv3 encapsulation
2809 # @cookie64: #optional - use 64 bit coookies
2811 # @counter: #optional have sequence counter
2813 # @pincounter: #optional pin sequence counter to zero -
2814 # workaround for buggy implementations or
2815 # networks with packet reorder
2817 # @txcookie: #optional 32 or 64 bit transmit cookie
2819 # @rxcookie: #optional 32 or 64 bit receive cookie
2821 # @txsession: 32 bit transmit session
2823 # @rxsession: #optional 32 bit receive session - if not specified
2824 # set to the same value as transmit
2826 # @offset: #optional additional offset - allows the insertion of
2827 # additional application-specific data before the packet payload
2831 { 'struct': 'NetdevL2TPv3Options',
2839 '*cookie64': 'bool',
2841 '*pincounter': 'bool',
2842 '*txcookie': 'uint64',
2843 '*rxcookie': 'uint64',
2844 'txsession': 'uint32',
2845 '*rxsession': 'uint32',
2846 '*offset': 'uint32' } }
2851 # Connect the VLAN to a vde switch running on the host.
2853 # @sock: #optional socket path
2855 # @port: #optional port number
2857 # @group: #optional group owner of socket
2859 # @mode: #optional permissions for socket
2863 { 'struct': 'NetdevVdeOptions',
2868 '*mode': 'uint16' } }
2871 # @NetdevDumpOptions
2873 # Dump VLAN network traffic to a file.
2875 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2878 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2882 { 'struct': 'NetdevDumpOptions',
2888 # @NetdevBridgeOptions
2890 # Connect a host TAP network interface to a host bridge device.
2892 # @br: #optional bridge name
2894 # @helper: #optional command to execute to configure bridge
2898 { 'struct': 'NetdevBridgeOptions',
2901 '*helper': 'str' } }
2904 # @NetdevHubPortOptions
2906 # Connect two or more net clients through a software hub.
2908 # @hubid: hub identifier number
2912 { 'struct': 'NetdevHubPortOptions',
2914 'hubid': 'int32' } }
2917 # @NetdevNetmapOptions
2919 # Connect a client to a netmap-enabled NIC or to a VALE switch port
2921 # @ifname: Either the name of an existing network interface supported by
2922 # netmap, or the name of a VALE port (created on the fly).
2923 # A VALE port name is in the form 'valeXXX:YYY', where XXX and
2924 # YYY are non-negative integers. XXX identifies a switch and
2925 # YYY identifies a port of the switch. VALE ports having the
2926 # same XXX are therefore connected to the same switch.
2928 # @devname: #optional path of the netmap device (default: '/dev/netmap').
2932 { 'struct': 'NetdevNetmapOptions',
2935 '*devname': 'str' } }
2938 # @NetdevVhostUserOptions
2940 # Vhost-user network backend
2942 # @chardev: name of a unix socket chardev
2944 # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
2946 # @queues: #optional number of queues to be created for multiqueue vhost-user
2947 # (default: 1) (Since 2.5)
2951 { 'struct': 'NetdevVhostUserOptions',
2954 '*vhostforce': 'bool',
2955 '*queues': 'int' } }
2960 # Available netdev drivers.
2964 { 'enum': 'NetClientDriver',
2965 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
2966 'bridge', 'hubport', 'netmap', 'vhost-user' ] }
2971 # Captures the configuration of a network device.
2973 # @id: identifier for monitor commands.
2975 # @type: Specify the driver used for interpreting remaining arguments.
2979 # 'l2tpv3' - since 2.1
2981 { 'union': 'Netdev',
2982 'base': { 'id': 'str', 'type': 'NetClientDriver' },
2983 'discriminator': 'type',
2985 'none': 'NetdevNoneOptions',
2986 'nic': 'NetLegacyNicOptions',
2987 'user': 'NetdevUserOptions',
2988 'tap': 'NetdevTapOptions',
2989 'l2tpv3': 'NetdevL2TPv3Options',
2990 'socket': 'NetdevSocketOptions',
2991 'vde': 'NetdevVdeOptions',
2992 'dump': 'NetdevDumpOptions',
2993 'bridge': 'NetdevBridgeOptions',
2994 'hubport': 'NetdevHubPortOptions',
2995 'netmap': 'NetdevNetmapOptions',
2996 'vhost-user': 'NetdevVhostUserOptions' } }
3001 # Captures the configuration of a network device; legacy.
3003 # @vlan: #optional vlan number
3005 # @id: #optional identifier for monitor commands
3007 # @name: #optional identifier for monitor commands, ignored if @id is present
3009 # @opts: device type specific properties (legacy)
3013 { 'struct': 'NetLegacy',
3018 'opts': 'NetLegacyOptions' } }
3023 # Like Netdev, but for use only by the legacy command line options
3027 { 'union': 'NetLegacyOptions',
3029 'none': 'NetdevNoneOptions',
3030 'nic': 'NetLegacyNicOptions',
3031 'user': 'NetdevUserOptions',
3032 'tap': 'NetdevTapOptions',
3033 'l2tpv3': 'NetdevL2TPv3Options',
3034 'socket': 'NetdevSocketOptions',
3035 'vde': 'NetdevVdeOptions',
3036 'dump': 'NetdevDumpOptions',
3037 'bridge': 'NetdevBridgeOptions',
3038 'netmap': 'NetdevNetmapOptions',
3039 'vhost-user': 'NetdevVhostUserOptions' } }
3042 # @NetFilterDirection
3044 # Indicates whether a netfilter is attached to a netdev's transmit queue or
3045 # receive queue or both.
3047 # @all: the filter is attached both to the receive and the transmit
3048 # queue of the netdev (default).
3050 # @rx: the filter is attached to the receive queue of the netdev,
3051 # where it will receive packets sent to the netdev.
3053 # @tx: the filter is attached to the transmit queue of the netdev,
3054 # where it will receive packets sent by the netdev.
3058 { 'enum': 'NetFilterDirection',
3059 'data': [ 'all', 'rx', 'tx' ] }
3062 # @InetSocketAddress
3064 # Captures a socket address or address range in the Internet namespace.
3066 # @host: host part of the address
3068 # @port: port part of the address, or lowest port if @to is present
3070 # @to: highest port to try
3072 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
3075 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
3080 { 'struct': 'InetSocketAddress',
3089 # @UnixSocketAddress
3091 # Captures a socket address in the local ("Unix socket") namespace.
3093 # @path: filesystem path to use
3097 { 'struct': 'UnixSocketAddress',
3102 # @VsockSocketAddress
3104 # Captures a socket address in the vsock namespace.
3106 # @cid: unique host identifier
3109 # Note that string types are used to allow for possible future hostname or
3110 # service resolution support.
3114 { 'struct': 'VsockSocketAddress',
3122 # Captures the address of a socket, which could also be a named file descriptor
3126 { 'union': 'SocketAddress',
3128 'inet': 'InetSocketAddress',
3129 'unix': 'UnixSocketAddress',
3130 'vsock': 'VsockSocketAddress',
3136 # Receive a file descriptor via SCM rights and assign it a name
3138 # @fdname: file descriptor name
3140 # Returns: Nothing on success
3144 # Notes: If @fdname already exists, the file descriptor assigned to
3145 # it will be closed and replaced by the received file
3147 # The 'closefd' command can be used to explicitly close the
3148 # file descriptor when it is no longer needed.
3150 { 'command': 'getfd', 'data': {'fdname': 'str'} }
3155 # Close a file descriptor previously passed via SCM rights
3157 # @fdname: file descriptor name
3159 # Returns: Nothing on success
3163 { 'command': 'closefd', 'data': {'fdname': 'str'} }
3168 # Information describing a machine.
3170 # @name: the name of the machine
3172 # @alias: #optional an alias for the machine name
3174 # @default: #optional whether the machine is default
3176 # @cpu-max: maximum number of CPUs supported by the machine type
3179 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
3183 { 'struct': 'MachineInfo',
3184 'data': { 'name': 'str', '*alias': 'str',
3185 '*is-default': 'bool', 'cpu-max': 'int',
3186 'hotpluggable-cpus': 'bool'} }
3191 # Return a list of supported machines
3193 # Returns: a list of MachineInfo
3197 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
3200 # @CpuDefinitionInfo:
3202 # Virtual CPU definition.
3204 # @name: the name of the CPU definition
3206 # @migration-safe: #optional whether a CPU definition can be safely used for
3207 # migration in combination with a QEMU compatibility machine
3208 # when migrating between different QMU versions and between
3209 # hosts with different sets of (hardware or software)
3210 # capabilities. If not provided, information is not available
3211 # and callers should not assume the CPU definition to be
3212 # migration-safe. (since 2.8)
3214 # @static: whether a CPU definition is static and will not change depending on
3215 # QEMU version, machine type, machine options and accelerator options.
3216 # A static model is always migration-safe. (since 2.8)
3218 # @unavailable-features: #optional List of properties that prevent
3219 # the CPU model from running in the current
3222 # @unavailable-features is a list of QOM property names that
3223 # represent CPU model attributes that prevent the CPU from running.
3224 # If the QOM property is read-only, that means there's no known
3225 # way to make the CPU model run in the current host. Implementations
3226 # that choose not to provide specific information return the
3227 # property name "type".
3228 # If the property is read-write, it means that it MAY be possible
3229 # to run the CPU model in the current host if that property is
3230 # changed. Management software can use it as hints to suggest or
3231 # choose an alternative for the user, or just to generate meaningful
3232 # error messages explaining why the CPU model can't be used.
3233 # If @unavailable-features is an empty list, the CPU model is
3234 # runnable using the current host and machine-type.
3235 # If @unavailable-features is not present, runnability
3236 # information for the CPU is not available.
3240 { 'struct': 'CpuDefinitionInfo',
3241 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
3242 '*unavailable-features': [ 'str' ] } }
3245 # @query-cpu-definitions:
3247 # Return a list of supported virtual CPU definitions
3249 # Returns: a list of CpuDefInfo
3253 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3258 # Virtual CPU model.
3260 # A CPU model consists of the name of a CPU definition, to which
3261 # delta changes are applied (e.g. features added/removed). Most magic values
3262 # that an architecture might require should be hidden behind the name.
3263 # However, if required, architectures can expose relevant properties.
3265 # @name: the name of the CPU definition the model is based on
3266 # @props: #optional a dictionary of QOM properties to be applied
3270 { 'struct': 'CpuModelInfo',
3271 'data': { 'name': 'str',
3275 # @CpuModelExpansionType
3277 # An enumeration of CPU model expansion types.
3279 # @static: Expand to a static CPU model, a combination of a static base
3280 # model name and property delta changes. As the static base model will
3281 # never change, the expanded CPU model will be the same, independant of
3282 # independent of QEMU version, machine type, machine options, and
3283 # accelerator options. Therefore, the resulting model can be used by
3284 # tooling without having to specify a compatibility machine - e.g. when
3285 # displaying the "host" model. static CPU models are migration-safe.
3287 # @full: Expand all properties. The produced model is not guaranteed to be
3288 # migration-safe, but allows tooling to get an insight and work with
3293 { 'enum': 'CpuModelExpansionType',
3294 'data': [ 'static', 'full' ] }
3298 # @CpuModelExpansionInfo
3300 # The result of a cpu model expansion.
3302 # @model: the expanded CpuModelInfo.
3306 { 'struct': 'CpuModelExpansionInfo',
3307 'data': { 'model': 'CpuModelInfo' } }
3311 # @query-cpu-model-expansion:
3313 # Expands a given CPU model (or a combination of CPU model + additional options)
3314 # to different granularities, allowing tooling to get an understanding what a
3315 # specific CPU model looks like in QEMU under a certain configuration.
3317 # This interface can be used to query the "host" CPU model.
3319 # The data returned by this command may be affected by:
3321 # * QEMU version: CPU models may look different depending on the QEMU version.
3322 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3323 # * machine-type: CPU model may look different depending on the machine-type.
3324 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3325 # * machine options (including accelerator): in some architectures, CPU models
3326 # may look different depending on machine and accelerator options. (Except for
3327 # CPU models reported as "static" in query-cpu-definitions.)
3328 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3329 # global properties may affect expansion of CPU models. Using
3330 # query-cpu-model-expansion while using these is not advised.
3332 # Some architectures may not support all expansion types. s390x supports
3333 # "full" and "static".
3335 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
3336 # not supported, if the model cannot be expanded, if the model contains
3337 # an unknown CPU definition name, unknown properties or properties
3338 # with a wrong type. Also returns an error if an expansion type is
3343 { 'command': 'query-cpu-model-expansion',
3344 'data': { 'type': 'CpuModelExpansionType',
3345 'model': 'CpuModelInfo' },
3346 'returns': 'CpuModelExpansionInfo' }
3349 # @CpuModelCompareResult:
3351 # An enumeration of CPU model comparation results. The result is usually
3352 # calculated using e.g. CPU features or CPU generations.
3354 # @incompatible: If model A is incompatible to model B, model A is not
3355 # guaranteed to run where model B runs and the other way around.
3357 # @identical: If model A is identical to model B, model A is guaranteed to run
3358 # where model B runs and the other way around.
3360 # @superset: If model A is a superset of model B, model B is guaranteed to run
3361 # where model A runs. There are no guarantees about the other way.
3363 # @subset: If model A is a subset of model B, model A is guaranteed to run
3364 # where model B runs. There are no guarantees about the other way.
3368 { 'enum': 'CpuModelCompareResult',
3369 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
3372 # @CpuModelCompareInfo
3374 # The result of a CPU model comparison.
3376 # @result: The result of the compare operation.
3377 # @responsible-properties: List of properties that led to the comparison result
3378 # not being identical.
3380 # @responsible-properties is a list of QOM property names that led to
3381 # both CPUs not being detected as identical. For identical models, this
3383 # If a QOM property is read-only, that means there's no known way to make the
3384 # CPU models identical. If the special property name "type" is included, the
3385 # models are by definition not identical and cannot be made identical.
3389 { 'struct': 'CpuModelCompareInfo',
3390 'data': {'result': 'CpuModelCompareResult',
3391 'responsible-properties': ['str']
3396 # @query-cpu-model-comparison:
3398 # Compares two CPU models, returning how they compare in a specific
3399 # configuration. The results indicates how both models compare regarding
3400 # runnability. This result can be used by tooling to make decisions if a
3401 # certain CPU model will run in a certain configuration or if a compatible
3402 # CPU model has to be created by baselining.
3404 # Usually, a CPU model is compared against the maximum possible CPU model
3405 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
3406 # model is identical or a subset, it will run in that configuration.
3408 # The result returned by this command may be affected by:
3410 # * QEMU version: CPU models may look different depending on the QEMU version.
3411 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3412 # * machine-type: CPU model may look different depending on the machine-type.
3413 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3414 # * machine options (including accelerator): in some architectures, CPU models
3415 # may look different depending on machine and accelerator options. (Except for
3416 # CPU models reported as "static" in query-cpu-definitions.)
3417 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3418 # global properties may affect expansion of CPU models. Using
3419 # query-cpu-model-expansion while using these is not advised.
3421 # Some architectures may not support comparing CPU models. s390x supports
3422 # comparing CPU models.
3424 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
3425 # not supported, if a model cannot be used, if a model contains
3426 # an unknown cpu definition name, unknown properties or properties
3431 { 'command': 'query-cpu-model-comparison',
3432 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
3433 'returns': 'CpuModelCompareInfo' }
3436 # @CpuModelBaselineInfo
3438 # The result of a CPU model baseline.
3440 # @model: the baselined CpuModelInfo.
3444 { 'struct': 'CpuModelBaselineInfo',
3445 'data': { 'model': 'CpuModelInfo' } }
3448 # @query-cpu-model-baseline:
3450 # Baseline two CPU models, creating a compatible third model. The created
3451 # model will always be a static, migration-safe CPU model (see "static"
3452 # CPU model expansion for details).
3454 # This interface can be used by tooling to create a compatible CPU model out
3455 # two CPU models. The created CPU model will be identical to or a subset of
3456 # both CPU models when comparing them. Therefore, the created CPU model is
3457 # guaranteed to run where the given CPU models run.
3459 # The result returned by this command may be affected by:
3461 # * QEMU version: CPU models may look different depending on the QEMU version.
3462 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3463 # * machine-type: CPU model may look different depending on the machine-type.
3464 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3465 # * machine options (including accelerator): in some architectures, CPU models
3466 # may look different depending on machine and accelerator options. (Except for
3467 # CPU models reported as "static" in query-cpu-definitions.)
3468 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3469 # global properties may affect expansion of CPU models. Using
3470 # query-cpu-model-expansion while using these is not advised.
3472 # Some architectures may not support baselining CPU models. s390x supports
3473 # baselining CPU models.
3475 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
3476 # not supported, if a model cannot be used, if a model contains
3477 # an unknown cpu definition name, unknown properties or properties
3482 { 'command': 'query-cpu-model-baseline',
3483 'data': { 'modela': 'CpuModelInfo',
3484 'modelb': 'CpuModelInfo' },
3485 'returns': 'CpuModelBaselineInfo' }
3489 # Information about a file descriptor that was added to an fd set.
3491 # @fdset-id: The ID of the fd set that @fd was added to.
3493 # @fd: The file descriptor that was received via SCM rights and
3494 # added to the fd set.
3498 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3503 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3505 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3507 # @opaque: #optional A free-form string that can be used to describe the fd.
3509 # Returns: @AddfdInfo on success
3510 # If file descriptor was not received, FdNotSupplied
3511 # If @fdset-id is a negative value, InvalidParameterValue
3513 # Notes: The list of fd sets is shared by all monitor connections.
3515 # If @fdset-id is not specified, a new fd set will be created.
3519 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3520 'returns': 'AddfdInfo' }
3525 # Remove a file descriptor from an fd set.
3527 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3529 # @fd: #optional The file descriptor that is to be removed.
3531 # Returns: Nothing on success
3532 # If @fdset-id or @fd is not found, FdNotFound
3536 # Notes: The list of fd sets is shared by all monitor connections.
3538 # If @fd is not specified, all file descriptors in @fdset-id
3541 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3546 # Information about a file descriptor that belongs to an fd set.
3548 # @fd: The file descriptor value.
3550 # @opaque: #optional A free-form string that can be used to describe the fd.
3554 { 'struct': 'FdsetFdInfo',
3555 'data': {'fd': 'int', '*opaque': 'str'} }
3560 # Information about an fd set.
3562 # @fdset-id: The ID of the fd set.
3564 # @fds: A list of file descriptors that belong to this fd set.
3568 { 'struct': 'FdsetInfo',
3569 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3574 # Return information describing all fd sets.
3576 # Returns: A list of @FdsetInfo
3580 # Note: The list of fd sets is shared by all monitor connections.
3583 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3588 # Information describing the QEMU target.
3590 # @arch: the target architecture (eg "x86_64", "i386", etc)
3594 { 'struct': 'TargetInfo',
3595 'data': { 'arch': 'str' } }
3600 # Return information about the target for this QEMU
3602 # Returns: TargetInfo
3606 { 'command': 'query-target', 'returns': 'TargetInfo' }
3611 # An enumeration of key name.
3613 # This is used by the send-key command.
3617 # 'unmapped' and 'pause' since 2.0
3618 # 'ro' and 'kp_comma' since 2.4
3619 # 'kp_equals' and 'power' since 2.6
3621 { 'enum': 'QKeyCode',
3622 'data': [ 'unmapped',
3623 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3624 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3625 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3626 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3627 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3628 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3629 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3630 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3631 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3632 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3633 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3634 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3635 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3636 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3637 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro',
3638 'kp_comma', 'kp_equals', 'power' ] }
3643 # Represents a keyboard key.
3647 { 'union': 'KeyValue',
3650 'qcode': 'QKeyCode' } }
3655 # Send keys to guest.
3657 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3658 # simultaneously sent to the guest. A @KeyValue.number value is sent
3659 # directly to the guest, while @KeyValue.qcode must be a valid
3662 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3665 # Returns: Nothing on success
3666 # If key is unknown or redundant, InvalidParameter
3671 { 'command': 'send-key',
3672 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3677 # Write a PPM of the VGA screen to a file.
3679 # @filename: the path of a new PPM file to store the image
3681 # Returns: Nothing on success
3685 { 'command': 'screendump', 'data': {'filename': 'str'} }
3691 # Configuration shared across all chardev backends
3693 # @logfile: #optional The name of a logfile to save output
3694 # @logappend: #optional true to append instead of truncate
3695 # (default to false to truncate)
3699 { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
3700 '*logappend': 'bool' } }
3705 # Configuration info for file chardevs.
3707 # @in: #optional The name of the input file
3708 # @out: The name of the output file
3709 # @append: #optional Open the file in append mode (default false to
3710 # truncate) (Since 2.6)
3714 { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
3716 '*append': 'bool' },
3717 'base': 'ChardevCommon' }
3722 # Configuration info for device and pipe chardevs.
3724 # @device: The name of the special file for the device,
3725 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
3726 # @type: What kind of device this is.
3730 { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
3731 'base': 'ChardevCommon' }
3736 # Configuration info for (stream) socket chardevs.
3738 # @addr: socket address to listen on (server=true)
3739 # or connect to (server=false)
3740 # @tls-creds: #optional the ID of the TLS credentials object (since 2.6)
3741 # @server: #optional create server socket (default: true)
3742 # @wait: #optional wait for incoming connection on server
3743 # sockets (default: false).
3744 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3745 # @telnet: #optional enable telnet protocol on server
3746 # sockets (default: false)
3747 # @reconnect: #optional For a client socket, if a socket is disconnected,
3748 # then attempt a reconnect after the given number of seconds.
3749 # Setting this to zero disables this function. (default: 0)
3754 { 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3755 '*tls-creds' : 'str',
3758 '*nodelay' : 'bool',
3760 '*reconnect' : 'int' },
3761 'base': 'ChardevCommon' }
3766 # Configuration info for datagram socket chardevs.
3768 # @remote: remote address
3769 # @local: #optional local address
3773 { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3774 '*local' : 'SocketAddress' },
3775 'base': 'ChardevCommon' }
3780 # Configuration info for mux chardevs.
3782 # @chardev: name of the base chardev.
3786 { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
3787 'base': 'ChardevCommon' }
3792 # Configuration info for stdio chardevs.
3794 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3795 # be delivered to qemu. Default: true in -nographic mode,
3800 { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
3801 'base': 'ChardevCommon' }
3805 # @ChardevSpiceChannel:
3807 # Configuration info for spice vm channel chardevs.
3809 # @type: kind of channel (for example vdagent).
3813 { 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' },
3814 'base': 'ChardevCommon' }
3817 # @ChardevSpicePort:
3819 # Configuration info for spice port chardevs.
3821 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3825 { 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' },
3826 'base': 'ChardevCommon' }
3831 # Configuration info for virtual console chardevs.
3833 # @width: console width, in pixels
3834 # @height: console height, in pixels
3835 # @cols: console width, in chars
3836 # @rows: console height, in chars
3840 { 'struct': 'ChardevVC', 'data': { '*width' : 'int',
3844 'base': 'ChardevCommon' }
3849 # Configuration info for ring buffer chardevs.
3851 # @size: #optional ring buffer size, must be power of two, default is 65536
3855 { 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' },
3856 'base': 'ChardevCommon' }
3861 # Configuration info for the new chardev backend.
3863 # Since: 1.4 (testdev since 2.2)
3865 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
3866 'serial' : 'ChardevHostdev',
3867 'parallel': 'ChardevHostdev',
3868 'pipe' : 'ChardevHostdev',
3869 'socket' : 'ChardevSocket',
3870 'udp' : 'ChardevUdp',
3871 'pty' : 'ChardevCommon',
3872 'null' : 'ChardevCommon',
3873 'mux' : 'ChardevMux',
3874 'msmouse': 'ChardevCommon',
3875 'braille': 'ChardevCommon',
3876 'testdev': 'ChardevCommon',
3877 'stdio' : 'ChardevStdio',
3878 'console': 'ChardevCommon',
3879 'spicevmc' : 'ChardevSpiceChannel',
3880 'spiceport' : 'ChardevSpicePort',
3882 'ringbuf': 'ChardevRingbuf',
3883 # next one is just for compatibility
3884 'memory' : 'ChardevRingbuf' } }
3889 # Return info about the chardev backend just created.
3891 # @pty: #optional name of the slave pseudoterminal device, present if
3892 # and only if a chardev of type 'pty' was created
3896 { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3901 # Add a character device backend
3903 # @id: the chardev's ID, must be unique
3904 # @backend: backend type and parameters
3906 # Returns: ChardevReturn.
3910 { 'command': 'chardev-add', 'data': {'id' : 'str',
3911 'backend' : 'ChardevBackend' },
3912 'returns': 'ChardevReturn' }
3917 # Remove a character device backend
3919 # @id: the chardev's ID, must exist and not be in use
3921 # Returns: Nothing on success
3925 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3930 # An enumeration of TPM models
3932 # @tpm-tis: TPM TIS model
3936 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3939 # @query-tpm-models:
3941 # Return a list of supported TPM models
3943 # Returns: a list of TpmModel
3947 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3952 # An enumeration of TPM types
3954 # @passthrough: TPM passthrough type
3958 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3963 # Return a list of supported TPM types
3965 # Returns: a list of TpmType
3969 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3972 # @TPMPassthroughOptions:
3974 # Information about the TPM passthrough type
3976 # @path: #optional string describing the path used for accessing the TPM device
3978 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3979 # for cancellation of TPM commands while they are executing
3983 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3984 '*cancel-path' : 'str'} }
3989 # A union referencing different TPM backend types' configuration options
3991 # @passthrough: The configuration options for the TPM passthrough type
3995 { 'union': 'TpmTypeOptions',
3996 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
4001 # Information about the TPM
4003 # @id: The Id of the TPM
4005 # @model: The TPM frontend model
4007 # @options: The TPM (backend) type configuration options
4011 { 'struct': 'TPMInfo',
4012 'data': {'id': 'str',
4013 'model': 'TpmModel',
4014 'options': 'TpmTypeOptions' } }
4019 # Return information about the TPM device
4021 # Returns: @TPMInfo on success
4025 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
4030 # Specify an ACPI table on the command line to load.
4032 # At most one of @file and @data can be specified. The list of files specified
4033 # by any one of them is loaded and concatenated in order. If both are omitted,
4036 # Other fields / optargs can be used to override fields of the generic ACPI
4037 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
4038 # Description Table Header. If a header field is not overridden, then the
4039 # corresponding value from the concatenated blob is used (in case of @file), or
4040 # it is filled in with a hard-coded value (in case of @data).
4042 # String fields are copied into the matching ACPI member from lowest address
4043 # upwards, and silently truncated / NUL-padded to length.
4045 # @sig: #optional table signature / identifier (4 bytes)
4047 # @rev: #optional table revision number (dependent on signature, 1 byte)
4049 # @oem_id: #optional OEM identifier (6 bytes)
4051 # @oem_table_id: #optional OEM table identifier (8 bytes)
4053 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
4055 # @asl_compiler_id: #optional identifier of the utility that created the table
4058 # @asl_compiler_rev: #optional revision number of the utility that created the
4061 # @file: #optional colon (:) separated list of pathnames to load and
4062 # concatenate as table data. The resultant binary blob is expected to
4063 # have an ACPI table header. At least one file is required. This field
4066 # @data: #optional colon (:) separated list of pathnames to load and
4067 # concatenate as table data. The resultant binary blob must not have an
4068 # ACPI table header. At least one file is required. This field excludes
4073 { 'struct': 'AcpiTableOptions',
4078 '*oem_table_id': 'str',
4079 '*oem_rev': 'uint32',
4080 '*asl_compiler_id': 'str',
4081 '*asl_compiler_rev': 'uint32',
4086 # @CommandLineParameterType:
4088 # Possible types for an option parameter.
4090 # @string: accepts a character string
4092 # @boolean: accepts "on" or "off"
4094 # @number: accepts a number
4096 # @size: accepts a number followed by an optional suffix (K)ilo,
4097 # (M)ega, (G)iga, (T)era
4101 { 'enum': 'CommandLineParameterType',
4102 'data': ['string', 'boolean', 'number', 'size'] }
4105 # @CommandLineParameterInfo:
4107 # Details about a single parameter of a command line option.
4109 # @name: parameter name
4111 # @type: parameter @CommandLineParameterType
4113 # @help: #optional human readable text string, not suitable for parsing.
4115 # @default: #optional default value string (since 2.1)
4119 { 'struct': 'CommandLineParameterInfo',
4120 'data': { 'name': 'str',
4121 'type': 'CommandLineParameterType',
4123 '*default': 'str' } }
4126 # @CommandLineOptionInfo:
4128 # Details about a command line option, including its list of parameter details
4130 # @option: option name
4132 # @parameters: an array of @CommandLineParameterInfo
4136 { 'struct': 'CommandLineOptionInfo',
4137 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
4140 # @query-command-line-options:
4142 # Query command line option schema.
4144 # @option: #optional option name
4146 # Returns: list of @CommandLineOptionInfo for all options (or for the given
4147 # @option). Returns an error if the given @option doesn't exist.
4151 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
4152 'returns': ['CommandLineOptionInfo'] }
4157 # A X86 32-bit register
4161 { 'enum': 'X86CPURegister32',
4162 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4165 # @X86CPUFeatureWordInfo
4167 # Information about a X86 CPU feature word
4169 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4171 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
4174 # @cpuid-register: Output register containing the feature bits
4176 # @features: value of output register, containing the feature bits
4180 { 'struct': 'X86CPUFeatureWordInfo',
4181 'data': { 'cpuid-input-eax': 'int',
4182 '*cpuid-input-ecx': 'int',
4183 'cpuid-register': 'X86CPURegister32',
4184 'features': 'int' } }
4189 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
4193 { 'struct': 'DummyForceArrays',
4194 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
4200 # Packets receiving state
4202 # @normal: filter assigned packets according to the mac-table
4204 # @none: don't receive any assigned packet
4206 # @all: receive all assigned packets
4210 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
4215 # Rx-filter information for a NIC.
4217 # @name: net client name
4219 # @promiscuous: whether promiscuous mode is enabled
4221 # @multicast: multicast receive state
4223 # @unicast: unicast receive state
4225 # @vlan: vlan receive state (Since 2.0)
4227 # @broadcast-allowed: whether to receive broadcast
4229 # @multicast-overflow: multicast table is overflowed or not
4231 # @unicast-overflow: unicast table is overflowed or not
4233 # @main-mac: the main macaddr string
4235 # @vlan-table: a list of active vlan id
4237 # @unicast-table: a list of unicast macaddr string
4239 # @multicast-table: a list of multicast macaddr string
4243 { 'struct': 'RxFilterInfo',
4246 'promiscuous': 'bool',
4247 'multicast': 'RxState',
4248 'unicast': 'RxState',
4250 'broadcast-allowed': 'bool',
4251 'multicast-overflow': 'bool',
4252 'unicast-overflow': 'bool',
4254 'vlan-table': ['int'],
4255 'unicast-table': ['str'],
4256 'multicast-table': ['str'] }}
4261 # Return rx-filter information for all NICs (or for the given NIC).
4263 # @name: #optional net client name
4265 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4266 # Returns an error if the given @name doesn't exist, or given
4267 # NIC doesn't support rx-filter querying, or given net client
4272 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4273 'returns': ['RxFilterInfo'] }
4278 # Button of a pointer input device (mouse, tablet).
4282 { 'enum' : 'InputButton',
4283 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down' ] }
4288 # Position axis of a pointer input device (mouse, tablet).
4292 { 'enum' : 'InputAxis',
4293 'data' : [ 'x', 'y' ] }
4298 # Keyboard input event.
4300 # @key: Which key this event is for.
4301 # @down: True for key-down and false for key-up events.
4305 { 'struct' : 'InputKeyEvent',
4306 'data' : { 'key' : 'KeyValue',
4312 # Pointer button input event.
4314 # @button: Which button this event is for.
4315 # @down: True for key-down and false for key-up events.
4319 { 'struct' : 'InputBtnEvent',
4320 'data' : { 'button' : 'InputButton',
4326 # Pointer motion input event.
4328 # @axis: Which axis is referenced by @value.
4329 # @value: Pointer position. For absolute coordinates the
4330 # valid range is 0 -> 0x7ffff
4334 { 'struct' : 'InputMoveEvent',
4335 'data' : { 'axis' : 'InputAxis',
4341 # Input event union.
4343 # @key: Input event of Keyboard
4344 # @btn: Input event of pointer buttons
4345 # @rel: Input event of relative pointer motion
4346 # @abs: Input event of absolute pointer motion
4350 { 'union' : 'InputEvent',
4351 'data' : { 'key' : 'InputKeyEvent',
4352 'btn' : 'InputBtnEvent',
4353 'rel' : 'InputMoveEvent',
4354 'abs' : 'InputMoveEvent' } }
4359 # Send input event(s) to guest.
4361 # @device: #optional display device to send event(s) to.
4362 # @head: #optional head to send event(s) to, in case the
4363 # display device supports multiple scanouts.
4364 # @events: List of InputEvent union.
4366 # Returns: Nothing on success.
4368 # The @display and @head parameters can be used to send the input
4369 # event to specific input devices in case (a) multiple input devices
4370 # of the same kind are added to the virtual machine and (b) you have
4371 # configured input routing (see docs/multiseat.txt) for those input
4372 # devices. The parameters work exactly like the device and head
4373 # properties of input devices. If @device is missing, only devices
4374 # that have no input routing config are admissible. If @device is
4375 # specified, both input devices with and without input routing config
4376 # are admissible, but devices with input routing config take
4381 { 'command': 'input-send-event',
4382 'data': { '*device': 'str',
4384 'events' : [ 'InputEvent' ] } }
4389 # A discriminated record of NUMA options. (for OptsVisitor)
4393 { 'union': 'NumaOptions',
4395 'node': 'NumaNodeOptions' }}
4400 # Create a guest NUMA node. (for OptsVisitor)
4402 # @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
4404 # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
4407 # @mem: #optional memory size of this node; mutually exclusive with @memdev.
4408 # Equally divide total memory among nodes if both @mem and @memdev are
4411 # @memdev: #optional memory backend object. If specified for one node,
4412 # it must be specified for all nodes.
4416 { 'struct': 'NumaNodeOptions',
4418 '*nodeid': 'uint16',
4419 '*cpus': ['uint16'],
4426 # Host memory policy types
4428 # @default: restore default policy, remove any nondefault policy
4430 # @preferred: set the preferred host nodes for allocation
4432 # @bind: a strict policy that restricts memory allocation to the
4433 # host nodes specified
4435 # @interleave: memory allocations are interleaved across the set
4436 # of host nodes specified
4440 { 'enum': 'HostMemPolicy',
4441 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
4446 # Information about memory backend
4448 # @size: memory backend size
4450 # @merge: enables or disables memory merge support
4452 # @dump: includes memory backend's memory in a core dump or not
4454 # @prealloc: enables or disables memory preallocation
4456 # @host-nodes: host nodes for its memory policy
4458 # @policy: memory policy of memory backend
4462 { 'struct': 'Memdev',
4468 'host-nodes': ['uint16'],
4469 'policy': 'HostMemPolicy' }}
4474 # Returns information for all memory backends.
4476 # Returns: a list of @Memdev.
4480 { 'command': 'query-memdev', 'returns': ['Memdev'] }
4483 # @PCDIMMDeviceInfo:
4485 # PCDIMMDevice state information
4487 # @id: #optional device's ID
4489 # @addr: physical address, where device is mapped
4491 # @size: size of memory that the device provides
4493 # @slot: slot number at which device is plugged in
4495 # @node: NUMA node number where device is plugged in
4497 # @memdev: memory backend linked with device
4499 # @hotplugged: true if device was hotplugged
4501 # @hotpluggable: true if device if could be added/removed while machine is running
4505 { 'struct': 'PCDIMMDeviceInfo',
4506 'data': { '*id': 'str',
4512 'hotplugged': 'bool',
4513 'hotpluggable': 'bool'
4518 # @MemoryDeviceInfo:
4520 # Union containing information about a memory device
4524 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
4527 # @query-memory-devices
4529 # Lists available memory devices and their state
4533 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
4537 # @DIMM: memory slot
4538 # @CPU: logical CPU slot (since 2.7)
4540 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
4544 # OSPM Status Indication for a device
4545 # For description of possible values of @source and @status fields
4546 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
4548 # @device: #optional device ID associated with slot
4550 # @slot: slot ID, unique per slot of a given @slot-type
4552 # @slot-type: type of the slot
4554 # @source: an integer containing the source event
4556 # @status: an integer containing the status code
4560 { 'struct': 'ACPIOSTInfo',
4561 'data' : { '*device': 'str',
4563 'slot-type': 'ACPISlotType',
4568 # @query-acpi-ospm-status
4570 # Lists ACPI OSPM status of ACPI device objects,
4571 # which might be reported via _OST method
4575 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
4578 # @WatchdogExpirationAction
4580 # An enumeration of the actions taken when the watchdog device's timer is
4583 # @reset: system resets
4585 # @shutdown: system shutdown, note that it is similar to @powerdown, which
4586 # tries to set to system status and notify guest
4588 # @poweroff: system poweroff, the emulator program exits
4590 # @pause: system pauses, similar to @stop
4592 # @debug: system enters debug state
4594 # @none: nothing is done
4596 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
4597 # VCPUS on x86) (since 2.4)
4601 { 'enum': 'WatchdogExpirationAction',
4602 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
4608 # An enumeration of the I/O operation types
4610 # @read: read operation
4612 # @write: write operation
4616 { 'enum': 'IoOperationType',
4617 'data': [ 'read', 'write' ] }
4622 # An enumeration of the actions taken when guest OS panic is detected
4624 # @pause: system pauses
4626 # Since: 2.1 (poweroff since 2.8)
4628 { 'enum': 'GuestPanicAction',
4629 'data': [ 'pause', 'poweroff' ] }
4632 # @rtc-reset-reinjection
4634 # This command will reset the RTC interrupt reinjection backlog.
4635 # Can be used if another mechanism to synchronize guest time
4636 # is in effect, for example QEMU guest agent's guest-set-time
4641 { 'command': 'rtc-reset-reinjection' }
4643 # Rocker ethernet network switch
4644 { 'include': 'qapi/rocker.json' }
4649 # Mode of the replay subsystem.
4651 # @none: normal execution mode. Replay or record are not enabled.
4653 # @record: record mode. All non-deterministic data is written into the
4656 # @play: replay mode. Non-deterministic data required for system execution
4657 # is read from the log.
4661 { 'enum': 'ReplayMode',
4662 'data': [ 'none', 'record', 'play' ] }
4665 # @xen-load-devices-state:
4667 # Load the state of all devices from file. The RAM and the block devices
4668 # of the VM are not loaded by this command.
4670 # @filename: the file to load the state of the devices from as binary
4671 # data. See xen-save-devices-state.txt for a description of the binary
4676 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
4681 # The struct describes capability for a specific GIC (Generic
4682 # Interrupt Controller) version. These bits are not only decided by
4683 # QEMU/KVM software version, but also decided by the hardware that
4684 # the program is running upon.
4686 # @version: version of GIC to be described. Currently, only 2 and 3
4689 # @emulated: whether current QEMU/hardware supports emulated GIC
4690 # device in user space.
4692 # @kernel: whether current QEMU/hardware supports hardware
4693 # accelerated GIC device in kernel.
4697 { 'struct': 'GICCapability',
4698 'data': { 'version': 'int',
4700 'kernel': 'bool' } }
4703 # @query-gic-capabilities:
4705 # This command is ARM-only. It will return a list of GICCapability
4706 # objects that describe its capability bits.
4708 # Returns: a list of GICCapability objects.
4712 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
4715 # CpuInstanceProperties
4717 # List of properties to be used for hotplugging a CPU instance,
4718 # it should be passed by management with device_add command when
4719 # a CPU is being hotplugged.
4721 # Note: currently there are 4 properties that could be present
4722 # but management should be prepared to pass through other
4723 # properties with device_add command to allow for future
4724 # interface extension. This also requires the filed names to be kept in
4725 # sync with the properties passed to -device/device_add.
4727 # @node-id: #optional NUMA node ID the CPU belongs to
4728 # @socket-id: #optional socket number within node/board the CPU belongs to
4729 # @core-id: #optional core number within socket the CPU belongs to
4730 # @thread-id: #optional thread number within core the CPU belongs to
4734 { 'struct': 'CpuInstanceProperties',
4735 'data': { '*node-id': 'int',
4736 '*socket-id': 'int',
4745 # @type: CPU object type for usage with device_add command
4746 # @props: list of properties to be used for hotplugging CPU
4747 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
4748 # @qom-path: #optional link to existing CPU object if CPU is present or
4749 # omitted if CPU is not present.
4753 { 'struct': 'HotpluggableCPU',
4754 'data': { 'type': 'str',
4755 'vcpus-count': 'int',
4756 'props': 'CpuInstanceProperties',
4762 # @query-hotpluggable-cpus
4764 # Returns: a list of HotpluggableCPU objects.
4768 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }