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 (since
182 { 'enum': 'RunState',
183 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
184 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
185 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
186 'guest-panicked', 'colo' ] }
191 # Information about VCPU run state
193 # @running: true if all VCPUs are runnable, false if not runnable
195 # @singlestep: true if VCPUs are in single-step mode
197 # @status: the virtual machine @RunState
201 # Notes: @singlestep is enabled through the GDB stub
203 { 'struct': 'StatusInfo',
204 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
209 # Query the run status of all VCPUs
211 # Returns: @StatusInfo reflecting all VCPUs
215 { 'command': 'query-status', 'returns': 'StatusInfo' }
220 # Guest UUID information.
222 # @UUID: the UUID of the guest
226 # Notes: If no UUID was specified for the guest, a null UUID is returned.
228 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
233 # Query the guest UUID information.
235 # Returns: The @UuidInfo for the guest
239 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
244 # Information about a character device.
246 # @label: the label of the character device
248 # @filename: the filename of the character device
250 # @frontend-open: shows whether the frontend device attached to this backend
251 # (eg. with the chardev=... option) is in open or closed state
254 # Notes: @filename is encoded using the QEMU command line character device
255 # encoding. See the QEMU man page for details.
259 { 'struct': 'ChardevInfo', 'data': {'label': 'str',
261 'frontend-open': 'bool'} }
266 # Returns information about current character devices.
268 # Returns: a list of @ChardevInfo
272 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
275 # @ChardevBackendInfo:
277 # Information about a character device backend
279 # @name: The backend name
283 { 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} }
286 # @query-chardev-backends:
288 # Returns information about character device backends.
290 # Returns: a list of @ChardevBackendInfo
294 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
299 # An enumeration of data format.
301 # @utf8: Data is a UTF-8 string (RFC 3629)
303 # @base64: Data is Base64 encoded binary (RFC 3548)
307 { 'enum': 'DataFormat',
308 'data': [ 'utf8', 'base64' ] }
313 # Write to a ring buffer character device.
315 # @device: the ring buffer character device name
317 # @data: data to write
319 # @format: #optional data encoding (default 'utf8').
320 # - base64: data must be base64 encoded text. Its binary
321 # decoding gets written.
322 # - utf8: data's UTF-8 encoding is written
323 # - data itself is always Unicode regardless of format, like
326 # Returns: Nothing on success
330 { 'command': 'ringbuf-write',
331 'data': {'device': 'str', 'data': 'str',
332 '*format': 'DataFormat'} }
337 # Read from a ring buffer character device.
339 # @device: the ring buffer character device name
341 # @size: how many bytes to read at most
343 # @format: #optional data encoding (default 'utf8').
344 # - base64: the data read is returned in base64 encoding.
345 # - utf8: the data read is interpreted as UTF-8.
346 # Bug: can screw up when the buffer contains invalid UTF-8
347 # sequences, NUL characters, after the ring buffer lost
348 # data, and when reading stops because the size limit is
350 # - The return value is always Unicode regardless of format,
351 # like any other string.
353 # Returns: data read from the device
357 { 'command': 'ringbuf-read',
358 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
364 # Information about a QMP event
366 # @name: The event name
370 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
375 # Return a list of supported QMP events by this server
377 # Returns: A list of @EventInfo for all supported events
381 { 'command': 'query-events', 'returns': ['EventInfo'] }
386 # Detailed migration status.
388 # @transferred: amount of bytes already transferred to the target VM
390 # @remaining: amount of bytes remaining to be transferred to the target VM
392 # @total: total amount of bytes involved in the migration process
394 # @duplicate: number of duplicate (zero) pages (since 1.2)
396 # @skipped: number of skipped zero pages (since 1.5)
398 # @normal : number of normal pages (since 1.2)
400 # @normal-bytes: number of normal bytes sent (since 1.2)
402 # @dirty-pages-rate: number of pages dirtied by second by the
405 # @mbps: throughput in megabits/sec. (since 1.6)
407 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
409 # @postcopy-requests: The number of page requests received from the destination
414 { 'struct': 'MigrationStats',
415 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
416 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
417 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
418 'mbps' : 'number', 'dirty-sync-count' : 'int',
419 'postcopy-requests' : 'int' } }
424 # Detailed XBZRLE migration cache statistics
426 # @cache-size: XBZRLE cache size
428 # @bytes: amount of bytes already transferred to the target VM
430 # @pages: amount of pages transferred to the target VM
432 # @cache-miss: number of cache miss
434 # @cache-miss-rate: rate of cache miss (since 2.1)
436 # @overflow: number of overflows
440 { 'struct': 'XBZRLECacheStats',
441 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
442 'cache-miss': 'int', 'cache-miss-rate': 'number',
443 'overflow': 'int' } }
447 # An enumeration of migration status.
449 # @none: no migration has ever happened.
451 # @setup: migration process has been initiated.
453 # @cancelling: in the process of cancelling migration.
455 # @cancelled: cancelling migration is finished.
457 # @active: in the process of doing migration.
459 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
461 # @completed: migration is finished.
463 # @failed: some error occurred during migration process.
465 # @colo: VM is in the process of fault tolerance. (since 2.8)
470 { 'enum': 'MigrationStatus',
471 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
472 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
477 # Information about current migration process.
479 # @status: #optional @MigrationStatus describing the current migration status.
480 # If this field is not returned, no migration process
483 # @ram: #optional @MigrationStats containing detailed migration
484 # status, only returned if status is 'active' or
485 # 'completed'(since 1.2)
487 # @disk: #optional @MigrationStats containing detailed disk migration
488 # status, only returned if status is 'active' and it is a block
491 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
492 # migration statistics, only returned if XBZRLE feature is on and
493 # status is 'active' or 'completed' (since 1.2)
495 # @total-time: #optional total amount of milliseconds since migration started.
496 # If migration has ended, it returns the total migration
499 # @downtime: #optional only present when migration finishes correctly
500 # total downtime in milliseconds for the guest.
503 # @expected-downtime: #optional only present while migration is active
504 # expected downtime in milliseconds for the guest in last walk
505 # of the dirty bitmap. (since 1.3)
507 # @setup-time: #optional amount of setup time in milliseconds _before_ the
508 # iterations begin but _after_ the QMP command is issued. This is designed
509 # to provide an accounting of any activities (such as RDMA pinning) which
510 # may be expensive, but do not actually occur during the iterative
511 # migration rounds themselves. (since 1.6)
513 # @cpu-throttle-percentage: #optional percentage of time guest cpus are being
514 # throttled during auto-converge. This is only present when auto-converge
515 # has started throttling guest cpus. (Since 2.7)
517 # @error-desc: #optional the human readable error description string, when
518 # @status is 'failed'. Clients should not attempt to parse the
519 # error strings. (Since 2.7)
523 { 'struct': 'MigrationInfo',
524 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
525 '*disk': 'MigrationStats',
526 '*xbzrle-cache': 'XBZRLECacheStats',
527 '*total-time': 'int',
528 '*expected-downtime': 'int',
530 '*setup-time': 'int',
531 '*cpu-throttle-percentage': 'int',
532 '*error-desc': 'str'} }
537 # Returns information about current migration process.
539 # Returns: @MigrationInfo
543 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
546 # @MigrationCapability
548 # Migration capabilities enumeration
550 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
551 # This feature allows us to minimize migration traffic for certain work
552 # loads, by sending compressed difference of the pages
554 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
555 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
556 # Disabled by default. (since 2.0)
558 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
559 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
560 # source and target VM to support this feature. To enable it is sufficient
561 # to enable the capability on the source VM. The feature is disabled by
562 # default. (since 1.6)
564 # @compress: Use multiple compression threads to accelerate live migration.
565 # This feature can help to reduce the migration traffic, by sending
566 # compressed pages. Please note that if compress and xbzrle are both
567 # on, compress only takes effect in the ram bulk stage, after that,
568 # it will be disabled and only xbzrle takes effect, this can help to
569 # minimize migration traffic. The feature is disabled by default.
572 # @events: generate events for each migration state change
575 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
576 # to speed up convergence of RAM migration. (since 1.6)
578 # @postcopy-ram: Start executing on the migration target before all of RAM has
579 # been migrated, pulling the remaining pages along as needed. NOTE: If
580 # the migration fails during postcopy the VM will fail. (since 2.6)
582 # @x-colo: If enabled, migration will never end, and the state of the VM on the
583 # primary side will be migrated continuously to the VM on secondary
584 # side, this process is called COarse-Grain LOck Stepping (COLO) for
585 # Non-stop Service. (since 2.8)
589 { 'enum': 'MigrationCapability',
590 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
591 'compress', 'events', 'postcopy-ram', 'x-colo'] }
594 # @MigrationCapabilityStatus
596 # Migration capability information
598 # @capability: capability enum
600 # @state: capability state bool
604 { 'struct': 'MigrationCapabilityStatus',
605 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
608 # @migrate-set-capabilities
610 # Enable/Disable the following migration capabilities (like xbzrle)
612 # @capabilities: json array of capability modifications to make
616 { 'command': 'migrate-set-capabilities',
617 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
620 # @query-migrate-capabilities
622 # Returns information about the current migration capabilities status
624 # Returns: @MigrationCapabilitiesStatus
628 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
630 # @MigrationParameter
632 # Migration parameters enumeration
634 # @compress-level: Set the compression level to be used in live migration,
635 # the compression level is an integer between 0 and 9, where 0 means
636 # no compression, 1 means the best compression speed, and 9 means best
637 # compression ratio which will consume more CPU.
639 # @compress-threads: Set compression thread count to be used in live migration,
640 # the compression thread count is an integer between 1 and 255.
642 # @decompress-threads: Set decompression thread count to be used in live
643 # migration, the decompression thread count is an integer between 1
644 # and 255. Usually, decompression is at least 4 times as fast as
645 # compression, so set the decompress-threads to the number about 1/4
646 # of compress-threads is adequate.
648 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
649 # when migration auto-converge is activated. The
650 # default value is 20. (Since 2.7)
652 # @cpu-throttle-increment: throttle percentage increase each time
653 # auto-converge detects that migration is not making
654 # progress. The default value is 10. (Since 2.7)
656 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
657 # establishing a TLS connection over the migration data channel.
658 # On the outgoing side of the migration, the credentials must
659 # be for a 'client' endpoint, while for the incoming side the
660 # credentials must be for a 'server' endpoint. Setting this
661 # will enable TLS for all migrations. The default is unset,
662 # resulting in unsecured migration at the QEMU level. (Since 2.7)
664 # @tls-hostname: hostname of the target host for the migration. This is
665 # required when using x509 based TLS credentials and the
666 # migration URI does not already include a hostname. For
667 # example if using fd: or exec: based migration, the
668 # hostname must be provided so that the server's x509
669 # certificate identity can be validated. (Since 2.7)
671 # @max-bandwidth: to set maximum speed for migration. maximum speed in
672 # bytes per second. (Since 2.8)
674 # @downtime-limit: set maximum tolerated downtime for migration. maximum
675 # downtime in milliseconds (Since 2.8)
677 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
678 # periodic mode. (Since 2.8)
682 { 'enum': 'MigrationParameter',
683 'data': ['compress-level', 'compress-threads', 'decompress-threads',
684 'cpu-throttle-initial', 'cpu-throttle-increment',
685 'tls-creds', 'tls-hostname', 'max-bandwidth',
686 'downtime-limit', 'x-checkpoint-delay' ] }
689 # @migrate-set-parameters
691 # Set various migration parameters. See MigrationParameters for details.
693 # @x-checkpoint-delay: the delay time between two checkpoints. (Since 2.8)
697 { 'command': 'migrate-set-parameters', 'boxed': true,
698 'data': 'MigrationParameters' }
701 # @MigrationParameters
703 # Optional members can be omitted on input ('migrate-set-parameters')
704 # but most members will always be present on output
705 # ('query-migrate-parameters'), with the exception of tls-creds and
708 # @compress-level: #optional compression level
710 # @compress-threads: #optional compression thread count
712 # @decompress-threads: #optional decompression thread count
714 # @cpu-throttle-initial: #optional Initial percentage of time guest cpus are
715 # throttledwhen migration auto-converge is activated.
716 # The default value is 20. (Since 2.7)
718 # @cpu-throttle-increment: #optional throttle percentage increase each time
719 # auto-converge detects that migration is not making
720 # progress. The default value is 10. (Since 2.7)
722 # @tls-creds: #optional ID of the 'tls-creds' object that provides credentials
723 # for establishing a TLS connection over the migration data
724 # channel. On the outgoing side of the migration, the credentials
725 # must be for a 'client' endpoint, while for the incoming side the
726 # credentials must be for a 'server' endpoint. Setting this
727 # will enable TLS for all migrations. The default is unset,
728 # resulting in unsecured migration at the QEMU level. (Since 2.7)
730 # @tls-hostname: #optional hostname of the target host for the migration. This
731 # is required when using x509 based TLS credentials and the
732 # migration URI does not already include a hostname. For
733 # example if using fd: or exec: based migration, the
734 # hostname must be provided so that the server's x509
735 # certificate identity can be validated. (Since 2.7)
737 # @max-bandwidth: to set maximum speed for migration. maximum speed in
738 # bytes per second. (Since 2.8)
740 # @downtime-limit: set maximum tolerated downtime for migration. maximum
741 # downtime in milliseconds (Since 2.8)
743 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
747 { 'struct': 'MigrationParameters',
748 'data': { '*compress-level': 'int',
749 '*compress-threads': 'int',
750 '*decompress-threads': 'int',
751 '*cpu-throttle-initial': 'int',
752 '*cpu-throttle-increment': 'int',
754 '*tls-hostname': 'str',
755 '*max-bandwidth': 'int',
756 '*downtime-limit': 'int',
757 '*x-checkpoint-delay': 'int'} }
760 # @query-migrate-parameters
762 # Returns information about the current migration parameters
764 # Returns: @MigrationParameters
768 { 'command': 'query-migrate-parameters',
769 'returns': 'MigrationParameters' }
772 # @client_migrate_info
774 # Set migration information for remote display. This makes the server
775 # ask the client to automatically reconnect using the new parameters
776 # once migration finished successfully. Only implemented for SPICE.
778 # @protocol: must be "spice"
779 # @hostname: migration target hostname
780 # @port: #optional spice tcp port for plaintext channels
781 # @tls-port: #optional spice tcp port for tls-secured channels
782 # @cert-subject: #optional server certificate subject
786 { 'command': 'client_migrate_info',
787 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
788 '*tls-port': 'int', '*cert-subject': 'str' } }
791 # @migrate-start-postcopy
793 # Followup to a migration command to switch the migration to postcopy mode.
794 # The postcopy-ram capability must be set before the original migration
798 { 'command': 'migrate-start-postcopy' }
803 # The message transmission between Primary side and Secondary side.
805 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
807 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
809 # @checkpoint-reply: SVM gets PVM's checkpoint request
811 # @vmstate-send: VM's state will be sent by PVM.
813 # @vmstate-size: The total size of VMstate.
815 # @vmstate-received: VM's state has been received by SVM.
817 # @vmstate-loaded: VM's state has been loaded by SVM.
821 { 'enum': 'COLOMessage',
822 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
823 'vmstate-send', 'vmstate-size', 'vmstate-received',
831 # @unknown: unknown mode
833 # @primary: master side
835 # @secondary: slave side
839 { 'enum': 'COLOMode',
840 'data': [ 'unknown', 'primary', 'secondary'] }
845 # An enumeration of COLO failover status
847 # @none: no failover has ever happened
849 # @require: got failover requirement but not handled
851 # @active: in the process of doing failover
853 # @completed: finish the process of failover
857 { 'enum': 'FailoverStatus',
858 'data': [ 'none', 'require', 'active', 'completed'] }
861 # @x-colo-lost-heartbeat
863 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
864 # If this command is sent to the PVM, the Primary side will exit COLO mode.
865 # If sent to the Secondary, the Secondary side will run failover work,
866 # then takes over server operation to become the service VM.
870 { 'command': 'x-colo-lost-heartbeat' }
875 # Information about a mouse device.
877 # @name: the name of the mouse device
879 # @index: the index of the mouse device
881 # @current: true if this device is currently receiving mouse events
883 # @absolute: true if this device supports absolute coordinates as input
887 { 'struct': 'MouseInfo',
888 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
889 'absolute': 'bool'} }
894 # Returns information about each active mouse device
896 # Returns: a list of @MouseInfo for each device
900 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
905 # An enumeration of cpu types that enable additional information during
910 { 'enum': 'CpuInfoArch',
911 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
916 # Information about a virtual CPU
918 # @CPU: the index of the virtual CPU
920 # @current: this only exists for backwards compatibility and should be ignored
922 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
923 # to a processor specific low power mode.
925 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
927 # @thread_id: ID of the underlying host thread
929 # @arch: architecture of the cpu, which determines which additional fields
930 # will be listed (since 2.6)
934 # Notes: @halted is a transient state that changes frequently. By the time the
935 # data is sent to the client, the guest may no longer be halted.
937 { 'union': 'CpuInfo',
938 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
939 'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' },
940 'discriminator': 'arch',
941 'data': { 'x86': 'CpuInfoX86',
942 'sparc': 'CpuInfoSPARC',
944 'mips': 'CpuInfoMIPS',
945 'tricore': 'CpuInfoTricore',
946 'other': 'CpuInfoOther' } }
951 # Additional information about a virtual i386 or x86_64 CPU
953 # @pc: the 64-bit instruction pointer
957 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
962 # Additional information about a virtual SPARC CPU
964 # @pc: the PC component of the instruction pointer
966 # @npc: the NPC component of the instruction pointer
970 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
975 # Additional information about a virtual PPC CPU
977 # @nip: the instruction pointer
981 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
986 # Additional information about a virtual MIPS CPU
988 # @PC: the instruction pointer
992 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
997 # Additional information about a virtual Tricore CPU
999 # @PC: the instruction pointer
1003 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
1008 # No additional information is available about the virtual CPU
1013 { 'struct': 'CpuInfoOther', 'data': { } }
1018 # Returns a list of information about each virtual CPU.
1020 # Returns: a list of @CpuInfo for each virtual CPU
1024 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
1029 # Information about an iothread
1031 # @id: the identifier of the iothread
1033 # @thread-id: ID of the underlying host thread
1037 { 'struct': 'IOThreadInfo',
1038 'data': {'id': 'str', 'thread-id': 'int'} }
1043 # Returns a list of information about each iothread.
1045 # Note this list excludes the QEMU main loop thread, which is not declared
1046 # using the -object iothread command-line option. It is always the main thread
1049 # Returns: a list of @IOThreadInfo for each iothread
1053 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
1056 # @NetworkAddressFamily
1058 # The network address family
1060 # @ipv4: IPV4 family
1062 # @ipv6: IPV6 family
1064 # @unix: unix socket
1066 # @vsock: vsock family (since 2.8)
1068 # @unknown: otherwise
1072 { 'enum': 'NetworkAddressFamily',
1073 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
1078 # The basic information for vnc network connection
1082 # @service: The service name of the vnc port. This may depend on the host
1083 # system's service database so symbolic names should not be relied
1086 # @family: address family
1088 # @websocket: true in case the socket is a websocket (since 2.3).
1092 { 'struct': 'VncBasicInfo',
1093 'data': { 'host': 'str',
1095 'family': 'NetworkAddressFamily',
1096 'websocket': 'bool' } }
1101 # The network connection information for server
1103 # @auth: #optional, authentication method
1107 { 'struct': 'VncServerInfo',
1108 'base': 'VncBasicInfo',
1109 'data': { '*auth': 'str' } }
1114 # Information about a connected VNC client.
1116 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
1117 # Name of the client.
1119 # @sasl_username: #optional If SASL authentication is in use, the SASL username
1120 # used for authentication.
1124 { 'struct': 'VncClientInfo',
1125 'base': 'VncBasicInfo',
1126 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1131 # Information about the VNC session.
1133 # @enabled: true if the VNC server is enabled, false otherwise
1135 # @host: #optional The hostname the VNC server is bound to. This depends on
1136 # the name resolution on the host and may be an IP address.
1138 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
1139 # 'ipv4' if the host is listening for IPv4 connections
1140 # 'unix' if the host is listening on a unix domain socket
1141 # 'unknown' otherwise
1143 # @service: #optional The service name of the server's port. This may depends
1144 # on the host system's service database so symbolic names should not
1147 # @auth: #optional the current authentication type used by the server
1148 # 'none' if no authentication is being used
1149 # 'vnc' if VNC authentication is being used
1150 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
1151 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1152 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1153 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1154 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1155 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1156 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1157 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1158 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1160 # @clients: a list of @VncClientInfo of all currently connected clients
1164 { 'struct': 'VncInfo',
1165 'data': {'enabled': 'bool', '*host': 'str',
1166 '*family': 'NetworkAddressFamily',
1167 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1172 # vnc primary authentication method.
1176 { 'enum': 'VncPrimaryAuth',
1177 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1178 'tls', 'vencrypt', 'sasl' ] }
1181 # @VncVencryptSubAuth:
1183 # vnc sub authentication method with vencrypt.
1187 { 'enum': 'VncVencryptSubAuth',
1189 'tls-none', 'x509-none',
1190 'tls-vnc', 'x509-vnc',
1191 'tls-plain', 'x509-plain',
1192 'tls-sasl', 'x509-sasl' ] }
1197 # Information about a vnc server
1199 # @id: vnc server name.
1201 # @server: A list of @VncBasincInfo describing all listening sockets.
1202 # The list can be empty (in case the vnc server is disabled).
1203 # It also may have multiple entries: normal + websocket,
1204 # possibly also ipv4 + ipv6 in the future.
1206 # @clients: A list of @VncClientInfo of all currently connected clients.
1207 # The list can be empty, for obvious reasons.
1209 # @auth: The current authentication type used by the server
1211 # @vencrypt: #optional The vencrypt sub authentication type used by the server,
1212 # only specified in case auth == vencrypt.
1214 # @display: #optional The display device the vnc server is linked to.
1218 { 'struct': 'VncInfo2',
1219 'data': { 'id' : 'str',
1220 'server' : ['VncBasicInfo'],
1221 'clients' : ['VncClientInfo'],
1222 'auth' : 'VncPrimaryAuth',
1223 '*vencrypt' : 'VncVencryptSubAuth',
1224 '*display' : 'str' } }
1229 # Returns information about the current VNC server
1235 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1238 # @query-vnc-servers:
1240 # Returns a list of vnc servers. The list can be empty.
1242 # Returns: a list of @VncInfo2
1246 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1251 # The basic information for SPICE network connection
1255 # @port: port number
1257 # @family: address family
1261 { 'struct': 'SpiceBasicInfo',
1262 'data': { 'host': 'str',
1264 'family': 'NetworkAddressFamily' } }
1269 # Information about a SPICE server
1271 # @auth: #optional, authentication method
1275 { 'struct': 'SpiceServerInfo',
1276 'base': 'SpiceBasicInfo',
1277 'data': { '*auth': 'str' } }
1282 # Information about a SPICE client channel.
1284 # @connection-id: SPICE connection id number. All channels with the same id
1285 # belong to the same SPICE session.
1287 # @channel-type: SPICE channel type number. "1" is the main control
1288 # channel, filter for this one if you want to track spice
1291 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1292 # multiple channels of the same type exist, such as multiple
1293 # display channels in a multihead setup
1295 # @tls: true if the channel is encrypted, false otherwise.
1299 { 'struct': 'SpiceChannel',
1300 'base': 'SpiceBasicInfo',
1301 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1305 # @SpiceQueryMouseMode
1307 # An enumeration of Spice mouse states.
1309 # @client: Mouse cursor position is determined by the client.
1311 # @server: Mouse cursor position is determined by the server.
1313 # @unknown: No information is available about mouse mode used by
1316 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1320 { 'enum': 'SpiceQueryMouseMode',
1321 'data': [ 'client', 'server', 'unknown' ] }
1326 # Information about the SPICE session.
1328 # @enabled: true if the SPICE server is enabled, false otherwise
1330 # @migrated: true if the last guest migration completed and spice
1331 # migration had completed as well. false otherwise.
1333 # @host: #optional The hostname the SPICE server is bound to. This depends on
1334 # the name resolution on the host and may be an IP address.
1336 # @port: #optional The SPICE server's port number.
1338 # @compiled-version: #optional SPICE server version.
1340 # @tls-port: #optional The SPICE server's TLS port number.
1342 # @auth: #optional the current authentication type used by the server
1343 # 'none' if no authentication is being used
1344 # 'spice' uses SASL or direct TLS authentication, depending on command
1347 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1348 # be determined by the client or the server, or unknown if spice
1349 # server doesn't provide this information.
1353 # @channels: a list of @SpiceChannel for each active spice channel
1357 { 'struct': 'SpiceInfo',
1358 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1359 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1360 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1365 # Returns information about the current SPICE server
1367 # Returns: @SpiceInfo
1371 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1376 # Information about the guest balloon device.
1378 # @actual: the number of bytes the balloon currently contains
1383 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1388 # Return information about the balloon device.
1390 # Returns: @BalloonInfo on success
1391 # If the balloon driver is enabled but not functional because the KVM
1392 # kernel module cannot support it, KvmMissingCap
1393 # If no balloon device is present, DeviceNotActive
1397 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1402 # A PCI device memory region
1404 # @base: the starting address (guest physical)
1406 # @limit: the ending address (guest physical)
1410 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1415 # Information about a PCI device I/O region.
1417 # @bar: the index of the Base Address Register for this region
1419 # @type: 'io' if the region is a PIO region
1420 # 'memory' if the region is a MMIO region
1422 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1424 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1428 { 'struct': 'PciMemoryRegion',
1429 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1430 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1435 # Information about a bus of a PCI Bridge device
1437 # @number: primary bus interface number. This should be the number of the
1438 # bus the device resides on.
1440 # @secondary: secondary bus interface number. This is the number of the
1441 # main bus for the bridge
1443 # @subordinate: This is the highest number bus that resides below the
1446 # @io_range: The PIO range for all devices on this bridge
1448 # @memory_range: The MMIO range for all devices on this bridge
1450 # @prefetchable_range: The range of prefetchable MMIO for all devices on
1455 { 'struct': 'PciBusInfo',
1456 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1457 'io_range': 'PciMemoryRange',
1458 'memory_range': 'PciMemoryRange',
1459 'prefetchable_range': 'PciMemoryRange' } }
1464 # Information about a PCI Bridge device
1466 # @bus: information about the bus the device resides on
1468 # @devices: a list of @PciDeviceInfo for each device on this bridge
1472 { 'struct': 'PciBridgeInfo',
1473 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
1478 # Information about the Class of a PCI device
1480 # @desc: #optional a string description of the device's class
1482 # @class: the class code of the device
1486 { 'struct': 'PciDeviceClass',
1487 'data': {'*desc': 'str', 'class': 'int'} }
1492 # Information about the Id of a PCI device
1494 # @device: the PCI device id
1496 # @vendor: the PCI vendor id
1500 { 'struct': 'PciDeviceId',
1501 'data': {'device': 'int', 'vendor': 'int'} }
1506 # Information about a PCI device
1508 # @bus: the bus number of the device
1510 # @slot: the slot the device is located in
1512 # @function: the function of the slot used by the device
1514 # @class_info: the class of the device
1516 # @id: the PCI device id
1518 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1520 # @qdev_id: the device name of the PCI device
1522 # @pci_bridge: if the device is a PCI bridge, the bridge information
1524 # @regions: a list of the PCI I/O regions associated with the device
1526 # Notes: the contents of @class_info.desc are not stable and should only be
1527 # treated as informational.
1531 { 'struct': 'PciDeviceInfo',
1532 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1533 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
1534 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1535 'regions': ['PciMemoryRegion']} }
1540 # Information about a PCI bus
1542 # @bus: the bus index
1544 # @devices: a list of devices on this bus
1548 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1553 # Return information about the PCI bus topology of the guest.
1555 # Returns: a list of @PciInfo for each PCI bus
1559 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1564 # This command will cause the QEMU process to exit gracefully. While every
1565 # attempt is made to send the QMP response before terminating, this is not
1566 # guaranteed. When using this interface, a premature EOF would not be
1571 { 'command': 'quit' }
1576 # Stop all guest VCPU execution.
1580 # Notes: This function will succeed even if the guest is already in the stopped
1581 # state. In "inmigrate" state, it will ensure that the guest
1582 # remains paused once migration finishes, as if the -S option was
1583 # passed on the command line.
1585 { 'command': 'stop' }
1590 # Performs a hard reset of a guest.
1594 { 'command': 'system_reset' }
1597 # @system_powerdown:
1599 # Requests that a guest perform a powerdown operation.
1603 # Notes: A guest may or may not respond to this command. This command
1604 # returning does not indicate that a guest has accepted the request or
1605 # that it has shut down. Many guests will respond to this command by
1606 # prompting the user in some way.
1608 { 'command': 'system_powerdown' }
1613 # This command is a nop that is only provided for the purposes of compatibility.
1617 # Notes: Do not use this command.
1619 { 'command': 'cpu', 'data': {'index': 'int'} }
1624 # Adds CPU with specified ID
1626 # @id: ID of CPU to be created, valid values [0..max_cpus)
1628 # Returns: Nothing on success
1632 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1637 # Save a portion of guest memory to a file.
1639 # @val: the virtual address of the guest to start from
1641 # @size: the size of memory region to save
1643 # @filename: the file to save the memory to as binary data
1645 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1646 # virtual address (defaults to CPU 0)
1648 # Returns: Nothing on success
1652 # Notes: Errors were not reliably returned until 1.1
1654 { 'command': 'memsave',
1655 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1660 # Save a portion of guest physical memory to a file.
1662 # @val: the physical address of the guest to start from
1664 # @size: the size of memory region to save
1666 # @filename: the file to save the memory to as binary data
1668 # Returns: Nothing on success
1672 # Notes: Errors were not reliably returned until 1.1
1674 { 'command': 'pmemsave',
1675 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1680 # Resume guest VCPU execution.
1684 # Returns: If successful, nothing
1685 # If QEMU was started with an encrypted block device and a key has
1686 # not yet been set, DeviceEncrypted.
1688 # Notes: This command will succeed if the guest is currently running. It
1689 # will also succeed if the guest is in the "inmigrate" state; in
1690 # this case, the effect of the command is to make sure the guest
1691 # starts once migration finishes, removing the effect of the -S
1692 # command line option if it was passed.
1694 { 'command': 'cont' }
1699 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1705 { 'command': 'system_wakeup' }
1710 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
1712 # Returns: If successful, nothing
1716 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
1718 { 'command': 'inject-nmi' }
1723 # Sets the link status of a virtual network adapter.
1725 # @name: the device name of the virtual network adapter
1727 # @up: true to set the link status to be up
1729 # Returns: Nothing on success
1730 # If @name is not a valid network device, DeviceNotFound
1734 # Notes: Not all network adapters support setting link status. This command
1735 # will succeed even if the network adapter does not support link status
1738 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1743 # Request the balloon driver to change its balloon size.
1745 # @value: the target size of the balloon in bytes
1747 # Returns: Nothing on success
1748 # If the balloon driver is enabled but not functional because the KVM
1749 # kernel module cannot support it, KvmMissingCap
1750 # If no balloon device is present, DeviceNotActive
1752 # Notes: This command just issues a request to the guest. When it returns,
1753 # the balloon size may not have changed. A guest can change the balloon
1754 # size independent of this command.
1758 { 'command': 'balloon', 'data': {'value': 'int'} }
1763 # This action can be used to test transaction failure.
1767 { 'struct': 'Abort',
1771 # @ActionCompletionMode
1773 # An enumeration of Transactional completion modes.
1775 # @individual: Do not attempt to cancel any other Actions if any Actions fail
1776 # after the Transaction request succeeds. All Actions that
1777 # can complete successfully will do so without waiting on others.
1778 # This is the default.
1780 # @grouped: If any Action fails after the Transaction succeeds, cancel all
1781 # Actions. Actions do not complete until all Actions are ready to
1782 # complete. May be rejected by Actions that do not support this
1787 { 'enum': 'ActionCompletionMode',
1788 'data': [ 'individual', 'grouped' ] }
1791 # @TransactionAction
1793 # A discriminated record of operations that can be performed with
1798 # drive-backup since 1.6
1800 # blockdev-snapshot-internal-sync since 1.7
1801 # blockdev-backup since 2.3
1802 # blockdev-snapshot since 2.5
1803 # block-dirty-bitmap-add since 2.5
1804 # block-dirty-bitmap-clear since 2.5
1806 { 'union': 'TransactionAction',
1808 'blockdev-snapshot': 'BlockdevSnapshot',
1809 'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
1810 'drive-backup': 'DriveBackup',
1811 'blockdev-backup': 'BlockdevBackup',
1813 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
1814 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
1815 'block-dirty-bitmap-clear': 'BlockDirtyBitmap'
1819 # @TransactionProperties
1821 # Optional arguments to modify the behavior of a Transaction.
1823 # @completion-mode: #optional Controls how jobs launched asynchronously by
1824 # Actions will complete or fail as a group.
1825 # See @ActionCompletionMode for details.
1829 { 'struct': 'TransactionProperties',
1831 '*completion-mode': 'ActionCompletionMode'
1838 # Executes a number of transactionable QMP commands atomically. If any
1839 # operation fails, then the entire set of actions will be abandoned and the
1840 # appropriate error returned.
1842 # @actions: List of @TransactionAction;
1843 # information needed for the respective operations.
1845 # @properties: #optional structure of additional options to control the
1846 # execution of the transaction. See @TransactionProperties
1847 # for additional detail.
1849 # Returns: nothing on success
1850 # Errors depend on the operations of the transaction
1852 # Note: The transaction aborts on the first failure. Therefore, there will be
1853 # information on only one failed operation returned in an error condition, and
1854 # subsequent actions will not have been attempted.
1858 { 'command': 'transaction',
1859 'data': { 'actions': [ 'TransactionAction' ],
1860 '*properties': 'TransactionProperties'
1865 # @human-monitor-command:
1867 # Execute a command on the human monitor and return the output.
1869 # @command-line: the command to execute in the human monitor
1871 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1873 # Returns: the output of the command as a string
1877 # Notes: This command only exists as a stop-gap. Its use is highly
1878 # discouraged. The semantics of this command are not guaranteed.
1880 # Known limitations:
1882 # o This command is stateless, this means that commands that depend
1883 # on state information (such as getfd) might not work
1885 # o Commands that prompt the user for data (eg. 'cont' when the block
1886 # device is encrypted) don't currently work
1888 { 'command': 'human-monitor-command',
1889 'data': {'command-line': 'str', '*cpu-index': 'int'},
1895 # Cancel the current executing migration process.
1897 # Returns: nothing on success
1899 # Notes: This command succeeds even if there is no migration process running.
1903 { 'command': 'migrate_cancel' }
1906 # @migrate_set_downtime
1908 # Set maximum tolerated downtime for migration.
1910 # @value: maximum downtime in seconds
1912 # Returns: nothing on success
1914 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1918 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1921 # @migrate_set_speed
1923 # Set maximum speed for migration.
1925 # @value: maximum speed in bytes.
1927 # Returns: nothing on success
1929 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1933 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1936 # @migrate-set-cache-size
1938 # Set XBZRLE cache size
1940 # @value: cache size in bytes
1942 # The size will be rounded down to the nearest power of 2.
1943 # The cache size can be modified before and during ongoing migration
1945 # Returns: nothing on success
1949 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1952 # @query-migrate-cache-size
1954 # query XBZRLE cache size
1956 # Returns: XBZRLE cache size in bytes
1960 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1963 # @ObjectPropertyInfo:
1965 # @name: the name of the property
1967 # @type: the type of the property. This will typically come in one of four
1970 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1971 # These types are mapped to the appropriate JSON type.
1973 # 2) A child type in the form 'child<subtype>' where subtype is a qdev
1974 # device type name. Child properties create the composition tree.
1976 # 3) A link type in the form 'link<subtype>' where subtype is a qdev
1977 # device type name. Link properties form the device model graph.
1981 { 'struct': 'ObjectPropertyInfo',
1982 'data': { 'name': 'str', 'type': 'str' } }
1987 # This command will list any properties of a object given a path in the object
1990 # @path: the path within the object model. See @qom-get for a description of
1993 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1998 { 'command': 'qom-list',
1999 'data': { 'path': 'str' },
2000 'returns': [ 'ObjectPropertyInfo' ] }
2005 # This command will get a property from a object model path and return the
2008 # @path: The path within the object model. There are two forms of supported
2009 # paths--absolute and partial paths.
2011 # Absolute paths are derived from the root object and can follow child<>
2012 # or link<> properties. Since they can follow link<> properties, they
2013 # can be arbitrarily long. Absolute paths look like absolute filenames
2014 # and are prefixed with a leading slash.
2016 # Partial paths look like relative filenames. They do not begin
2017 # with a prefix. The matching rules for partial paths are subtle but
2018 # designed to make specifying objects easy. At each level of the
2019 # composition tree, the partial path is matched as an absolute path.
2020 # The first match is not returned. At least two matches are searched
2021 # for. A successful result is only returned if only one match is
2022 # found. If more than one match is found, a flag is return to
2023 # indicate that the match was ambiguous.
2025 # @property: The property name to read
2027 # Returns: The property value. The type depends on the property
2028 # type. child<> and link<> properties are returned as #str
2029 # pathnames. All integer property types (u8, u16, etc) are
2034 { 'command': 'qom-get',
2035 'data': { 'path': 'str', 'property': 'str' },
2041 # This command will set a property from a object model path.
2043 # @path: see @qom-get for a description of this parameter
2045 # @property: the property name to set
2047 # @value: a value who's type is appropriate for the property type. See @qom-get
2048 # for a description of type mapping.
2052 { 'command': 'qom-set',
2053 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
2058 # Sets the password of a remote display session.
2060 # @protocol: `vnc' to modify the VNC server password
2061 # `spice' to modify the Spice server password
2063 # @password: the new password
2065 # @connected: #optional how to handle existing clients when changing the
2066 # password. If nothing is specified, defaults to `keep'
2067 # `fail' to fail the command if clients are connected
2068 # `disconnect' to disconnect existing clients
2069 # `keep' to maintain existing clients
2071 # Returns: Nothing on success
2072 # If Spice is not enabled, DeviceNotFound
2076 { 'command': 'set_password',
2077 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2082 # Expire the password of a remote display server.
2084 # @protocol: the name of the remote display protocol `vnc' or `spice'
2086 # @time: when to expire the password.
2087 # `now' to expire the password immediately
2088 # `never' to cancel password expiration
2089 # `+INT' where INT is the number of seconds from now (integer)
2090 # `INT' where INT is the absolute time in seconds
2092 # Returns: Nothing on success
2093 # If @protocol is `spice' and Spice is not active, DeviceNotFound
2097 # Notes: Time is relative to the server and currently there is no way to
2098 # coordinate server time with client time. It is not recommended to
2099 # use the absolute time version of the @time parameter unless you're
2100 # sure you are on the same machine as the QEMU instance.
2102 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2105 # @change-vnc-password:
2107 # Change the VNC server password.
2109 # @password: the new password to use with VNC authentication
2113 # Notes: An empty password in this command will set the password to the empty
2114 # string. Existing clients are unaffected by executing this command.
2116 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2121 # This command is multiple commands multiplexed together.
2123 # @device: This is normally the name of a block device but it may also be 'vnc'.
2124 # when it's 'vnc', then sub command depends on @target
2126 # @target: If @device is a block device, then this is the new filename.
2127 # If @device is 'vnc', then if the value 'password' selects the vnc
2128 # change password command. Otherwise, this specifies a new server URI
2129 # address to listen to for VNC connections.
2131 # @arg: If @device is a block device, then this is an optional format to open
2133 # If @device is 'vnc' and @target is 'password', this is the new VNC
2134 # password to set. If this argument is an empty string, then no future
2135 # logins will be allowed.
2137 # Returns: Nothing on success.
2138 # If @device is not a valid block device, DeviceNotFound
2139 # If the new block device is encrypted, DeviceEncrypted. Note that
2140 # if this error is returned, the device has been opened successfully
2141 # and an additional call to @block_passwd is required to set the
2142 # device's password. The behavior of reads and writes to the block
2143 # device between when these calls are executed is undefined.
2145 # Notes: This interface is deprecated, and it is strongly recommended that you
2146 # avoid using it. For changing block devices, use
2147 # blockdev-change-medium; for changing VNC parameters, use
2148 # change-vnc-password.
2152 { 'command': 'change',
2153 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2158 # This structure describes a search result from @qom-list-types
2160 # @name: the type name found in the search
2164 # Notes: This command is experimental and may change syntax in future releases.
2166 { 'struct': 'ObjectTypeInfo',
2167 'data': { 'name': 'str' } }
2172 # This command will return a list of types given search parameters
2174 # @implements: if specified, only return types that implement this type name
2176 # @abstract: if true, include abstract types in the results
2178 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2182 { 'command': 'qom-list-types',
2183 'data': { '*implements': 'str', '*abstract': 'bool' },
2184 'returns': [ 'ObjectTypeInfo' ] }
2187 # @DevicePropertyInfo:
2189 # Information about device properties.
2191 # @name: the name of the property
2192 # @type: the typename of the property
2193 # @description: #optional if specified, the description of the property.
2198 { 'struct': 'DevicePropertyInfo',
2199 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
2202 # @device-list-properties:
2204 # List properties associated with a device.
2206 # @typename: the type name of a device
2208 # Returns: a list of DevicePropertyInfo describing a devices properties
2212 { 'command': 'device-list-properties',
2213 'data': { 'typename': 'str'},
2214 'returns': [ 'DevicePropertyInfo' ] }
2219 # Migrates the current running guest to another Virtual Machine.
2221 # @uri: the Uniform Resource Identifier of the destination VM
2223 # @blk: #optional do block migration (full disk copy)
2225 # @inc: #optional incremental disk copy migration
2227 # @detach: this argument exists only for compatibility reasons and
2228 # is ignored by QEMU
2230 # Returns: nothing on success
2234 { 'command': 'migrate',
2235 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2240 # Start an incoming migration, the qemu must have been started
2241 # with -incoming defer
2243 # @uri: The Uniform Resource Identifier identifying the source or
2244 # address to listen on
2246 # Returns: nothing on success
2249 # Note: It's a bad idea to use a string for the uri, but it needs to stay
2250 # compatible with -incoming and the format of the uri is already exposed
2253 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
2255 # @xen-save-devices-state:
2257 # Save the state of all devices to file. The RAM and the block devices
2258 # of the VM are not saved by this command.
2260 # @filename: the file to save the state of the devices to as binary
2261 # data. See xen-save-devices-state.txt for a description of the binary
2264 # Returns: Nothing on success
2268 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2271 # @xen-set-global-dirty-log
2273 # Enable or disable the global dirty log mode.
2275 # @enable: true to enable, false to disable.
2281 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2286 # @driver: the name of the new device's driver
2288 # @bus: #optional the device's parent bus (device tree path)
2290 # @id: the device's ID, must be unique
2292 # Additional arguments depend on the type.
2297 # 1. For detailed information about this command, please refer to the
2298 # 'docs/qdev-device-use.txt' file.
2300 # 2. It's possible to list device properties by running QEMU with the
2301 # "-device DEVICE,help" command-line argument, where DEVICE is the
2306 # -> { "execute": "device_add",
2307 # "arguments": { "driver": "e1000", "id": "net1",
2309 # "mac": "52:54:00:12:34:56" } }
2310 # <- { "return": {} }
2312 # TODO This command effectively bypasses QAPI completely due to its
2313 # "additional arguments" business. It shouldn't have been added to
2314 # the schema in this form. It should be qapified properly, or
2315 # replaced by a properly qapified command.
2319 { 'command': 'device_add',
2320 'data': {'driver': 'str', 'id': 'str'},
2321 'gen': false } # so we can get the additional arguments
2326 # Remove a device from a guest
2328 # @id: the name or QOM path of the device
2330 # Returns: Nothing on success
2331 # If @id is not a valid device, DeviceNotFound
2333 # Notes: When this command completes, the device may not be removed from the
2334 # guest. Hot removal is an operation that requires guest cooperation.
2335 # This command merely requests that the guest begin the hot removal
2336 # process. Completion of the device removal process is signaled with a
2337 # DEVICE_DELETED event. Guest reset will automatically complete removal
2342 { 'command': 'device_del', 'data': {'id': 'str'} }
2345 # @DumpGuestMemoryFormat:
2347 # An enumeration of guest-memory-dump's format.
2351 # @kdump-zlib: kdump-compressed format with zlib-compressed
2353 # @kdump-lzo: kdump-compressed format with lzo-compressed
2355 # @kdump-snappy: kdump-compressed format with snappy-compressed
2359 { 'enum': 'DumpGuestMemoryFormat',
2360 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
2363 # @dump-guest-memory
2365 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2366 # very long depending on the amount of guest memory.
2368 # @paging: if true, do paging to get guest's memory mapping. This allows
2369 # using gdb to process the core file.
2371 # IMPORTANT: this option can make QEMU allocate several gigabytes
2372 # of RAM. This can happen for a large guest, or a
2373 # malicious guest pretending to be large.
2375 # Also, paging=true has the following limitations:
2377 # 1. The guest may be in a catastrophic state or can have corrupted
2378 # memory, which cannot be trusted
2379 # 2. The guest can be in real-mode even if paging is enabled. For
2380 # example, the guest uses ACPI to sleep, and ACPI sleep state
2382 # 3. Currently only supported on i386 and x86_64.
2384 # @protocol: the filename or file descriptor of the vmcore. The supported
2387 # 1. file: the protocol starts with "file:", and the following
2388 # string is the file's path.
2389 # 2. fd: the protocol starts with "fd:", and the following string
2392 # @detach: #optional if true, QMP will return immediately rather than
2393 # waiting for the dump to finish. The user can track progress
2394 # using "query-dump". (since 2.6).
2396 # @begin: #optional if specified, the starting physical address.
2398 # @length: #optional if specified, the memory size, in bytes. If you don't
2399 # want to dump all guest's memory, please specify the start @begin
2402 # @format: #optional if specified, the format of guest memory dump. But non-elf
2403 # format is conflict with paging and filter, ie. @paging, @begin and
2404 # @length is not allowed to be specified with non-elf @format at the
2405 # same time (since 2.0)
2407 # Returns: nothing on success
2411 { 'command': 'dump-guest-memory',
2412 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
2413 '*begin': 'int', '*length': 'int',
2414 '*format': 'DumpGuestMemoryFormat'} }
2419 # Describe the status of a long-running background guest memory dump.
2421 # @none: no dump-guest-memory has started yet.
2423 # @active: there is one dump running in background.
2425 # @completed: the last dump has finished successfully.
2427 # @failed: the last dump has failed.
2431 { 'enum': 'DumpStatus',
2432 'data': [ 'none', 'active', 'completed', 'failed' ] }
2437 # The result format for 'query-dump'.
2439 # @status: enum of @DumpStatus, which shows current dump status
2441 # @completed: bytes written in latest dump (uncompressed)
2443 # @total: total bytes to be written in latest dump (uncompressed)
2447 { 'struct': 'DumpQueryResult',
2448 'data': { 'status': 'DumpStatus',
2455 # Query latest dump status.
2457 # Returns: A @DumpStatus object showing the dump status.
2461 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
2464 # @DumpGuestMemoryCapability:
2466 # A list of the available formats for dump-guest-memory
2470 { 'struct': 'DumpGuestMemoryCapability',
2472 'formats': ['DumpGuestMemoryFormat'] } }
2475 # @query-dump-guest-memory-capability:
2477 # Returns the available formats for dump-guest-memory
2479 # Returns: A @DumpGuestMemoryCapability object listing available formats for
2484 { 'command': 'query-dump-guest-memory-capability',
2485 'returns': 'DumpGuestMemoryCapability' }
2490 # Dump guest's storage keys
2492 # @filename: the path to the file to dump to
2494 # This command is only supported on s390 architecture.
2498 { 'command': 'dump-skeys',
2499 'data': { 'filename': 'str' } }
2504 # Add a network backend.
2506 # @type: the type of network backend. Current valid values are 'user', 'tap',
2507 # 'vde', 'socket', 'dump' and 'bridge'
2509 # @id: the name of the new network backend
2511 # Additional arguments depend on the type.
2513 # TODO This command effectively bypasses QAPI completely due to its
2514 # "additional arguments" business. It shouldn't have been added to
2515 # the schema in this form. It should be qapified properly, or
2516 # replaced by a properly qapified command.
2520 # Returns: Nothing on success
2521 # If @type is not a valid network backend, DeviceNotFound
2523 { 'command': 'netdev_add',
2524 'data': {'type': 'str', 'id': 'str'},
2525 'gen': false } # so we can get the additional arguments
2530 # Remove a network backend.
2532 # @id: the name of the network backend to remove
2534 # Returns: Nothing on success
2535 # If @id is not a valid network backend, DeviceNotFound
2539 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2544 # Create a QOM object.
2546 # @qom-type: the class name for the object to be created
2548 # @id: the name of the new object
2550 # @props: #optional a dictionary of properties to be passed to the backend
2552 # Returns: Nothing on success
2553 # Error if @qom-type is not a valid class name
2557 { 'command': 'object-add',
2558 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
2563 # Remove a QOM object.
2565 # @id: the name of the QOM object to remove
2567 # Returns: Nothing on success
2568 # Error if @id is not a valid id for a QOM object
2572 { 'command': 'object-del', 'data': {'id': 'str'} }
2575 # @NetdevNoneOptions
2577 # Use it alone to have zero network devices.
2581 { 'struct': 'NetdevNoneOptions',
2585 # @NetLegacyNicOptions
2587 # Create a new Network Interface Card.
2589 # @netdev: #optional id of -netdev to connect to
2591 # @macaddr: #optional MAC address
2593 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2595 # @addr: #optional PCI device address
2597 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2601 { 'struct': 'NetLegacyNicOptions',
2607 '*vectors': 'uint32' } }
2612 # A fat type wrapping 'str', to be embedded in lists.
2616 { 'struct': 'String',
2621 # @NetdevUserOptions
2623 # Use the user mode network stack which requires no administrator privilege to
2626 # @hostname: #optional client hostname reported by the builtin DHCP server
2628 # @restrict: #optional isolate the guest from the host
2630 # @ipv4: #optional whether to support IPv4, default true for enabled
2633 # @ipv6: #optional whether to support IPv6, default true for enabled
2636 # @ip: #optional legacy parameter, use net= instead
2638 # @net: #optional IP network address that the guest will see, in the
2639 # form addr[/netmask] The netmask is optional, and can be
2640 # either in the form a.b.c.d or as a number of valid top-most
2641 # bits. Default is 10.0.2.0/24.
2643 # @host: #optional guest-visible address of the host
2645 # @tftp: #optional root directory of the built-in TFTP server
2647 # @bootfile: #optional BOOTP filename, for use with tftp=
2649 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2652 # @dns: #optional guest-visible address of the virtual nameserver
2654 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2657 # @ipv6-prefix: #optional IPv6 network prefix (default is fec0::) (since
2658 # 2.6). The network prefix is given in the usual
2659 # hexadecimal IPv6 address notation.
2661 # @ipv6-prefixlen: #optional IPv6 network prefix length (default is 64)
2664 # @ipv6-host: #optional guest-visible IPv6 address of the host (since 2.6)
2666 # @ipv6-dns: #optional guest-visible IPv6 address of the virtual
2667 # nameserver (since 2.6)
2669 # @smb: #optional root directory of the built-in SMB server
2671 # @smbserver: #optional IP address of the built-in SMB server
2673 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2676 # @guestfwd: #optional forward guest TCP connections
2680 { 'struct': 'NetdevUserOptions',
2683 '*restrict': 'bool',
2691 '*dhcpstart': 'str',
2693 '*dnssearch': ['String'],
2694 '*ipv6-prefix': 'str',
2695 '*ipv6-prefixlen': 'int',
2696 '*ipv6-host': 'str',
2699 '*smbserver': 'str',
2700 '*hostfwd': ['String'],
2701 '*guestfwd': ['String'] } }
2706 # Connect the host TAP network interface name to the VLAN.
2708 # @ifname: #optional interface name
2710 # @fd: #optional file descriptor of an already opened tap
2712 # @fds: #optional multiple file descriptors of already opened multiqueue capable
2715 # @script: #optional script to initialize the interface
2717 # @downscript: #optional script to shut down the interface
2719 # @br: #optional bridge name (since 2.8)
2721 # @helper: #optional command to execute to configure bridge
2723 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2725 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2727 # @vhost: #optional enable vhost-net network accelerator
2729 # @vhostfd: #optional file descriptor of an already opened vhost net device
2731 # @vhostfds: #optional file descriptors of multiple already opened vhost net
2734 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2736 # @queues: #optional number of queues to be created for multiqueue capable tap
2738 # @poll-us: #optional maximum number of microseconds that could
2739 # be spent on busy polling for tap (since 2.7)
2743 { 'struct': 'NetdevTapOptions',
2749 '*downscript': 'str',
2753 '*vnet_hdr': 'bool',
2757 '*vhostforce': 'bool',
2758 '*queues': 'uint32',
2759 '*poll-us': 'uint32'} }
2762 # @NetdevSocketOptions
2764 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2765 # socket connection.
2767 # @fd: #optional file descriptor of an already opened socket
2769 # @listen: #optional port number, and optional hostname, to listen on
2771 # @connect: #optional port number, and optional hostname, to connect to
2773 # @mcast: #optional UDP multicast address and port number
2775 # @localaddr: #optional source address and port for multicast and udp packets
2777 # @udp: #optional UDP unicast address and port number
2781 { 'struct': 'NetdevSocketOptions',
2787 '*localaddr': 'str',
2791 # @NetdevL2TPv3Options
2793 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
2795 # @src: source address
2797 # @dst: destination address
2799 # @srcport: #optional source port - mandatory for udp, optional for ip
2801 # @dstport: #optional destination port - mandatory for udp, optional for ip
2803 # @ipv6: #optional - force the use of ipv6
2805 # @udp: #optional - use the udp version of l2tpv3 encapsulation
2807 # @cookie64: #optional - use 64 bit coookies
2809 # @counter: #optional have sequence counter
2811 # @pincounter: #optional pin sequence counter to zero -
2812 # workaround for buggy implementations or
2813 # networks with packet reorder
2815 # @txcookie: #optional 32 or 64 bit transmit cookie
2817 # @rxcookie: #optional 32 or 64 bit receive cookie
2819 # @txsession: 32 bit transmit session
2821 # @rxsession: #optional 32 bit receive session - if not specified
2822 # set to the same value as transmit
2824 # @offset: #optional additional offset - allows the insertion of
2825 # additional application-specific data before the packet payload
2829 { 'struct': 'NetdevL2TPv3Options',
2837 '*cookie64': 'bool',
2839 '*pincounter': 'bool',
2840 '*txcookie': 'uint64',
2841 '*rxcookie': 'uint64',
2842 'txsession': 'uint32',
2843 '*rxsession': 'uint32',
2844 '*offset': 'uint32' } }
2849 # Connect the VLAN to a vde switch running on the host.
2851 # @sock: #optional socket path
2853 # @port: #optional port number
2855 # @group: #optional group owner of socket
2857 # @mode: #optional permissions for socket
2861 { 'struct': 'NetdevVdeOptions',
2866 '*mode': 'uint16' } }
2869 # @NetdevDumpOptions
2871 # Dump VLAN network traffic to a file.
2873 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2876 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2880 { 'struct': 'NetdevDumpOptions',
2886 # @NetdevBridgeOptions
2888 # Connect a host TAP network interface to a host bridge device.
2890 # @br: #optional bridge name
2892 # @helper: #optional command to execute to configure bridge
2896 { 'struct': 'NetdevBridgeOptions',
2899 '*helper': 'str' } }
2902 # @NetdevHubPortOptions
2904 # Connect two or more net clients through a software hub.
2906 # @hubid: hub identifier number
2910 { 'struct': 'NetdevHubPortOptions',
2912 'hubid': 'int32' } }
2915 # @NetdevNetmapOptions
2917 # Connect a client to a netmap-enabled NIC or to a VALE switch port
2919 # @ifname: Either the name of an existing network interface supported by
2920 # netmap, or the name of a VALE port (created on the fly).
2921 # A VALE port name is in the form 'valeXXX:YYY', where XXX and
2922 # YYY are non-negative integers. XXX identifies a switch and
2923 # YYY identifies a port of the switch. VALE ports having the
2924 # same XXX are therefore connected to the same switch.
2926 # @devname: #optional path of the netmap device (default: '/dev/netmap').
2930 { 'struct': 'NetdevNetmapOptions',
2933 '*devname': 'str' } }
2936 # @NetdevVhostUserOptions
2938 # Vhost-user network backend
2940 # @chardev: name of a unix socket chardev
2942 # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
2944 # @queues: #optional number of queues to be created for multiqueue vhost-user
2945 # (default: 1) (Since 2.5)
2949 { 'struct': 'NetdevVhostUserOptions',
2952 '*vhostforce': 'bool',
2953 '*queues': 'int' } }
2958 # Available netdev drivers.
2962 { 'enum': 'NetClientDriver',
2963 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
2964 'bridge', 'hubport', 'netmap', 'vhost-user' ] }
2969 # Captures the configuration of a network device.
2971 # @id: identifier for monitor commands.
2973 # @type: Specify the driver used for interpreting remaining arguments.
2977 # 'l2tpv3' - since 2.1
2979 { 'union': 'Netdev',
2980 'base': { 'id': 'str', 'type': 'NetClientDriver' },
2981 'discriminator': 'type',
2983 'none': 'NetdevNoneOptions',
2984 'nic': 'NetLegacyNicOptions',
2985 'user': 'NetdevUserOptions',
2986 'tap': 'NetdevTapOptions',
2987 'l2tpv3': 'NetdevL2TPv3Options',
2988 'socket': 'NetdevSocketOptions',
2989 'vde': 'NetdevVdeOptions',
2990 'dump': 'NetdevDumpOptions',
2991 'bridge': 'NetdevBridgeOptions',
2992 'hubport': 'NetdevHubPortOptions',
2993 'netmap': 'NetdevNetmapOptions',
2994 'vhost-user': 'NetdevVhostUserOptions' } }
2999 # Captures the configuration of a network device; legacy.
3001 # @vlan: #optional vlan number
3003 # @id: #optional identifier for monitor commands
3005 # @name: #optional identifier for monitor commands, ignored if @id is present
3007 # @opts: device type specific properties (legacy)
3011 { 'struct': 'NetLegacy',
3016 'opts': 'NetLegacyOptions' } }
3021 # Like Netdev, but for use only by the legacy command line options
3025 { 'union': 'NetLegacyOptions',
3027 'none': 'NetdevNoneOptions',
3028 'nic': 'NetLegacyNicOptions',
3029 'user': 'NetdevUserOptions',
3030 'tap': 'NetdevTapOptions',
3031 'l2tpv3': 'NetdevL2TPv3Options',
3032 'socket': 'NetdevSocketOptions',
3033 'vde': 'NetdevVdeOptions',
3034 'dump': 'NetdevDumpOptions',
3035 'bridge': 'NetdevBridgeOptions',
3036 'netmap': 'NetdevNetmapOptions',
3037 'vhost-user': 'NetdevVhostUserOptions' } }
3040 # @NetFilterDirection
3042 # Indicates whether a netfilter is attached to a netdev's transmit queue or
3043 # receive queue or both.
3045 # @all: the filter is attached both to the receive and the transmit
3046 # queue of the netdev (default).
3048 # @rx: the filter is attached to the receive queue of the netdev,
3049 # where it will receive packets sent to the netdev.
3051 # @tx: the filter is attached to the transmit queue of the netdev,
3052 # where it will receive packets sent by the netdev.
3056 { 'enum': 'NetFilterDirection',
3057 'data': [ 'all', 'rx', 'tx' ] }
3060 # @InetSocketAddress
3062 # Captures a socket address or address range in the Internet namespace.
3064 # @host: host part of the address
3066 # @port: port part of the address, or lowest port if @to is present
3068 # @to: highest port to try
3070 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
3073 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
3078 { 'struct': 'InetSocketAddress',
3087 # @UnixSocketAddress
3089 # Captures a socket address in the local ("Unix socket") namespace.
3091 # @path: filesystem path to use
3095 { 'struct': 'UnixSocketAddress',
3100 # @VsockSocketAddress
3102 # Captures a socket address in the vsock namespace.
3104 # @cid: unique host identifier
3107 # Note that string types are used to allow for possible future hostname or
3108 # service resolution support.
3112 { 'struct': 'VsockSocketAddress',
3120 # Captures the address of a socket, which could also be a named file descriptor
3124 { 'union': 'SocketAddress',
3126 'inet': 'InetSocketAddress',
3127 'unix': 'UnixSocketAddress',
3128 'vsock': 'VsockSocketAddress',
3134 # Receive a file descriptor via SCM rights and assign it a name
3136 # @fdname: file descriptor name
3138 # Returns: Nothing on success
3142 # Notes: If @fdname already exists, the file descriptor assigned to
3143 # it will be closed and replaced by the received file
3145 # The 'closefd' command can be used to explicitly close the
3146 # file descriptor when it is no longer needed.
3148 { 'command': 'getfd', 'data': {'fdname': 'str'} }
3153 # Close a file descriptor previously passed via SCM rights
3155 # @fdname: file descriptor name
3157 # Returns: Nothing on success
3161 { 'command': 'closefd', 'data': {'fdname': 'str'} }
3166 # Information describing a machine.
3168 # @name: the name of the machine
3170 # @alias: #optional an alias for the machine name
3172 # @default: #optional whether the machine is default
3174 # @cpu-max: maximum number of CPUs supported by the machine type
3177 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
3181 { 'struct': 'MachineInfo',
3182 'data': { 'name': 'str', '*alias': 'str',
3183 '*is-default': 'bool', 'cpu-max': 'int',
3184 'hotpluggable-cpus': 'bool'} }
3189 # Return a list of supported machines
3191 # Returns: a list of MachineInfo
3195 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
3198 # @CpuDefinitionInfo:
3200 # Virtual CPU definition.
3202 # @name: the name of the CPU definition
3204 # @migration-safe: #optional whether a CPU definition can be safely used for
3205 # migration in combination with a QEMU compatibility machine
3206 # when migrating between different QMU versions and between
3207 # hosts with different sets of (hardware or software)
3208 # capabilities. If not provided, information is not available
3209 # and callers should not assume the CPU definition to be
3210 # migration-safe. (since 2.8)
3212 # @static: whether a CPU definition is static and will not change depending on
3213 # QEMU version, machine type, machine options and accelerator options.
3214 # A static model is always migration-safe. (since 2.8)
3216 # @unavailable-features: #optional List of properties that prevent
3217 # the CPU model from running in the current
3220 # @unavailable-features is a list of QOM property names that
3221 # represent CPU model attributes that prevent the CPU from running.
3222 # If the QOM property is read-only, that means there's no known
3223 # way to make the CPU model run in the current host. Implementations
3224 # that choose not to provide specific information return the
3225 # property name "type".
3226 # If the property is read-write, it means that it MAY be possible
3227 # to run the CPU model in the current host if that property is
3228 # changed. Management software can use it as hints to suggest or
3229 # choose an alternative for the user, or just to generate meaningful
3230 # error messages explaining why the CPU model can't be used.
3231 # If @unavailable-features is an empty list, the CPU model is
3232 # runnable using the current host and machine-type.
3233 # If @unavailable-features is not present, runnability
3234 # information for the CPU is not available.
3238 { 'struct': 'CpuDefinitionInfo',
3239 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
3240 '*unavailable-features': [ 'str' ] } }
3243 # @query-cpu-definitions:
3245 # Return a list of supported virtual CPU definitions
3247 # Returns: a list of CpuDefInfo
3251 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3256 # Virtual CPU model.
3258 # A CPU model consists of the name of a CPU definition, to which
3259 # delta changes are applied (e.g. features added/removed). Most magic values
3260 # that an architecture might require should be hidden behind the name.
3261 # However, if required, architectures can expose relevant properties.
3263 # @name: the name of the CPU definition the model is based on
3264 # @props: #optional a dictionary of QOM properties to be applied
3268 { 'struct': 'CpuModelInfo',
3269 'data': { 'name': 'str',
3273 # @CpuModelExpansionType
3275 # An enumeration of CPU model expansion types.
3277 # @static: Expand to a static CPU model, a combination of a static base
3278 # model name and property delta changes. As the static base model will
3279 # never change, the expanded CPU model will be the same, independant of
3280 # independent of QEMU version, machine type, machine options, and
3281 # accelerator options. Therefore, the resulting model can be used by
3282 # tooling without having to specify a compatibility machine - e.g. when
3283 # displaying the "host" model. static CPU models are migration-safe.
3285 # @full: Expand all properties. The produced model is not guaranteed to be
3286 # migration-safe, but allows tooling to get an insight and work with
3291 { 'enum': 'CpuModelExpansionType',
3292 'data': [ 'static', 'full' ] }
3296 # @CpuModelExpansionInfo
3298 # The result of a cpu model expansion.
3300 # @model: the expanded CpuModelInfo.
3304 { 'struct': 'CpuModelExpansionInfo',
3305 'data': { 'model': 'CpuModelInfo' } }
3309 # @query-cpu-model-expansion:
3311 # Expands a given CPU model (or a combination of CPU model + additional options)
3312 # to different granularities, allowing tooling to get an understanding what a
3313 # specific CPU model looks like in QEMU under a certain configuration.
3315 # This interface can be used to query the "host" CPU model.
3317 # The data returned by this command may be affected by:
3319 # * QEMU version: CPU models may look different depending on the QEMU version.
3320 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3321 # * machine-type: CPU model may look different depending on the machine-type.
3322 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3323 # * machine options (including accelerator): in some architectures, CPU models
3324 # may look different depending on machine and accelerator options. (Except for
3325 # CPU models reported as "static" in query-cpu-definitions.)
3326 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3327 # global properties may affect expansion of CPU models. Using
3328 # query-cpu-model-expansion while using these is not advised.
3330 # Some architectures may not support all expansion types. s390x supports
3331 # "full" and "static".
3333 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
3334 # not supported, if the model cannot be expanded, if the model contains
3335 # an unknown CPU definition name, unknown properties or properties
3336 # with a wrong type. Also returns an error if an expansion type is
3341 { 'command': 'query-cpu-model-expansion',
3342 'data': { 'type': 'CpuModelExpansionType',
3343 'model': 'CpuModelInfo' },
3344 'returns': 'CpuModelExpansionInfo' }
3347 # @CpuModelCompareResult:
3349 # An enumeration of CPU model comparation results. The result is usually
3350 # calculated using e.g. CPU features or CPU generations.
3352 # @incompatible: If model A is incompatible to model B, model A is not
3353 # guaranteed to run where model B runs and the other way around.
3355 # @identical: If model A is identical to model B, model A is guaranteed to run
3356 # where model B runs and the other way around.
3358 # @superset: If model A is a superset of model B, model B is guaranteed to run
3359 # where model A runs. There are no guarantees about the other way.
3361 # @subset: If model A is a subset of model B, model A is guaranteed to run
3362 # where model B runs. There are no guarantees about the other way.
3366 { 'enum': 'CpuModelCompareResult',
3367 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
3370 # @CpuModelCompareInfo
3372 # The result of a CPU model comparison.
3374 # @result: The result of the compare operation.
3375 # @responsible-properties: List of properties that led to the comparison result
3376 # not being identical.
3378 # @responsible-properties is a list of QOM property names that led to
3379 # both CPUs not being detected as identical. For identical models, this
3381 # If a QOM property is read-only, that means there's no known way to make the
3382 # CPU models identical. If the special property name "type" is included, the
3383 # models are by definition not identical and cannot be made identical.
3387 { 'struct': 'CpuModelCompareInfo',
3388 'data': {'result': 'CpuModelCompareResult',
3389 'responsible-properties': ['str']
3394 # @query-cpu-model-comparison:
3396 # Compares two CPU models, returning how they compare in a specific
3397 # configuration. The results indicates how both models compare regarding
3398 # runnability. This result can be used by tooling to make decisions if a
3399 # certain CPU model will run in a certain configuration or if a compatible
3400 # CPU model has to be created by baselining.
3402 # Usually, a CPU model is compared against the maximum possible CPU model
3403 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
3404 # model is identical or a subset, it will run in that configuration.
3406 # The result returned by this command may be affected by:
3408 # * QEMU version: CPU models may look different depending on the QEMU version.
3409 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3410 # * machine-type: CPU model may look different depending on the machine-type.
3411 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3412 # * machine options (including accelerator): in some architectures, CPU models
3413 # may look different depending on machine and accelerator options. (Except for
3414 # CPU models reported as "static" in query-cpu-definitions.)
3415 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3416 # global properties may affect expansion of CPU models. Using
3417 # query-cpu-model-expansion while using these is not advised.
3419 # Some architectures may not support comparing CPU models. s390x supports
3420 # comparing CPU models.
3422 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
3423 # not supported, if a model cannot be used, if a model contains
3424 # an unknown cpu definition name, unknown properties or properties
3429 { 'command': 'query-cpu-model-comparison',
3430 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
3431 'returns': 'CpuModelCompareInfo' }
3434 # @CpuModelBaselineInfo
3436 # The result of a CPU model baseline.
3438 # @model: the baselined CpuModelInfo.
3442 { 'struct': 'CpuModelBaselineInfo',
3443 'data': { 'model': 'CpuModelInfo' } }
3446 # @query-cpu-model-baseline:
3448 # Baseline two CPU models, creating a compatible third model. The created
3449 # model will always be a static, migration-safe CPU model (see "static"
3450 # CPU model expansion for details).
3452 # This interface can be used by tooling to create a compatible CPU model out
3453 # two CPU models. The created CPU model will be identical to or a subset of
3454 # both CPU models when comparing them. Therefore, the created CPU model is
3455 # guaranteed to run where the given CPU models run.
3457 # The result returned by this command may be affected by:
3459 # * QEMU version: CPU models may look different depending on the QEMU version.
3460 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3461 # * machine-type: CPU model may look different depending on the machine-type.
3462 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3463 # * machine options (including accelerator): in some architectures, CPU models
3464 # may look different depending on machine and accelerator options. (Except for
3465 # CPU models reported as "static" in query-cpu-definitions.)
3466 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3467 # global properties may affect expansion of CPU models. Using
3468 # query-cpu-model-expansion while using these is not advised.
3470 # Some architectures may not support baselining CPU models. s390x supports
3471 # baselining CPU models.
3473 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
3474 # not supported, if a model cannot be used, if a model contains
3475 # an unknown cpu definition name, unknown properties or properties
3480 { 'command': 'query-cpu-model-baseline',
3481 'data': { 'modela': 'CpuModelInfo',
3482 'modelb': 'CpuModelInfo' },
3483 'returns': 'CpuModelBaselineInfo' }
3487 # Information about a file descriptor that was added to an fd set.
3489 # @fdset-id: The ID of the fd set that @fd was added to.
3491 # @fd: The file descriptor that was received via SCM rights and
3492 # added to the fd set.
3496 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3501 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3503 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3505 # @opaque: #optional A free-form string that can be used to describe the fd.
3507 # Returns: @AddfdInfo on success
3508 # If file descriptor was not received, FdNotSupplied
3509 # If @fdset-id is a negative value, InvalidParameterValue
3511 # Notes: The list of fd sets is shared by all monitor connections.
3513 # If @fdset-id is not specified, a new fd set will be created.
3517 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3518 'returns': 'AddfdInfo' }
3523 # Remove a file descriptor from an fd set.
3525 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3527 # @fd: #optional The file descriptor that is to be removed.
3529 # Returns: Nothing on success
3530 # If @fdset-id or @fd is not found, FdNotFound
3534 # Notes: The list of fd sets is shared by all monitor connections.
3536 # If @fd is not specified, all file descriptors in @fdset-id
3539 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3544 # Information about a file descriptor that belongs to an fd set.
3546 # @fd: The file descriptor value.
3548 # @opaque: #optional A free-form string that can be used to describe the fd.
3552 { 'struct': 'FdsetFdInfo',
3553 'data': {'fd': 'int', '*opaque': 'str'} }
3558 # Information about an fd set.
3560 # @fdset-id: The ID of the fd set.
3562 # @fds: A list of file descriptors that belong to this fd set.
3566 { 'struct': 'FdsetInfo',
3567 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3572 # Return information describing all fd sets.
3574 # Returns: A list of @FdsetInfo
3578 # Note: The list of fd sets is shared by all monitor connections.
3581 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3586 # Information describing the QEMU target.
3588 # @arch: the target architecture (eg "x86_64", "i386", etc)
3592 { 'struct': 'TargetInfo',
3593 'data': { 'arch': 'str' } }
3598 # Return information about the target for this QEMU
3600 # Returns: TargetInfo
3604 { 'command': 'query-target', 'returns': 'TargetInfo' }
3609 # An enumeration of key name.
3611 # This is used by the send-key command.
3615 # 'unmapped' and 'pause' since 2.0
3616 # 'ro' and 'kp_comma' since 2.4
3617 # 'kp_equals' and 'power' since 2.6
3619 { 'enum': 'QKeyCode',
3620 'data': [ 'unmapped',
3621 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3622 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3623 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3624 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3625 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3626 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3627 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3628 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3629 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3630 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3631 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3632 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3633 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3634 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3635 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro',
3636 'kp_comma', 'kp_equals', 'power' ] }
3641 # Represents a keyboard key.
3645 { 'union': 'KeyValue',
3648 'qcode': 'QKeyCode' } }
3653 # Send keys to guest.
3655 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3656 # simultaneously sent to the guest. A @KeyValue.number value is sent
3657 # directly to the guest, while @KeyValue.qcode must be a valid
3660 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3663 # Returns: Nothing on success
3664 # If key is unknown or redundant, InvalidParameter
3669 { 'command': 'send-key',
3670 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3675 # Write a PPM of the VGA screen to a file.
3677 # @filename: the path of a new PPM file to store the image
3679 # Returns: Nothing on success
3683 { 'command': 'screendump', 'data': {'filename': 'str'} }
3689 # Configuration shared across all chardev backends
3691 # @logfile: #optional The name of a logfile to save output
3692 # @logappend: #optional true to append instead of truncate
3693 # (default to false to truncate)
3697 { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
3698 '*logappend': 'bool' } }
3703 # Configuration info for file chardevs.
3705 # @in: #optional The name of the input file
3706 # @out: The name of the output file
3707 # @append: #optional Open the file in append mode (default false to
3708 # truncate) (Since 2.6)
3712 { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
3714 '*append': 'bool' },
3715 'base': 'ChardevCommon' }
3720 # Configuration info for device and pipe chardevs.
3722 # @device: The name of the special file for the device,
3723 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
3724 # @type: What kind of device this is.
3728 { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
3729 'base': 'ChardevCommon' }
3734 # Configuration info for (stream) socket chardevs.
3736 # @addr: socket address to listen on (server=true)
3737 # or connect to (server=false)
3738 # @tls-creds: #optional the ID of the TLS credentials object (since 2.6)
3739 # @server: #optional create server socket (default: true)
3740 # @wait: #optional wait for incoming connection on server
3741 # sockets (default: false).
3742 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3743 # @telnet: #optional enable telnet protocol on server
3744 # sockets (default: false)
3745 # @reconnect: #optional For a client socket, if a socket is disconnected,
3746 # then attempt a reconnect after the given number of seconds.
3747 # Setting this to zero disables this function. (default: 0)
3752 { 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3753 '*tls-creds' : 'str',
3756 '*nodelay' : 'bool',
3758 '*reconnect' : 'int' },
3759 'base': 'ChardevCommon' }
3764 # Configuration info for datagram socket chardevs.
3766 # @remote: remote address
3767 # @local: #optional local address
3771 { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3772 '*local' : 'SocketAddress' },
3773 'base': 'ChardevCommon' }
3778 # Configuration info for mux chardevs.
3780 # @chardev: name of the base chardev.
3784 { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
3785 'base': 'ChardevCommon' }
3790 # Configuration info for stdio chardevs.
3792 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3793 # be delivered to qemu. Default: true in -nographic mode,
3798 { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
3799 'base': 'ChardevCommon' }
3803 # @ChardevSpiceChannel:
3805 # Configuration info for spice vm channel chardevs.
3807 # @type: kind of channel (for example vdagent).
3811 { 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' },
3812 'base': 'ChardevCommon' }
3815 # @ChardevSpicePort:
3817 # Configuration info for spice port chardevs.
3819 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3823 { 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' },
3824 'base': 'ChardevCommon' }
3829 # Configuration info for virtual console chardevs.
3831 # @width: console width, in pixels
3832 # @height: console height, in pixels
3833 # @cols: console width, in chars
3834 # @rows: console height, in chars
3838 { 'struct': 'ChardevVC', 'data': { '*width' : 'int',
3842 'base': 'ChardevCommon' }
3847 # Configuration info for ring buffer chardevs.
3849 # @size: #optional ring buffer size, must be power of two, default is 65536
3853 { 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' },
3854 'base': 'ChardevCommon' }
3859 # Configuration info for the new chardev backend.
3861 # Since: 1.4 (testdev since 2.2)
3863 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
3864 'serial' : 'ChardevHostdev',
3865 'parallel': 'ChardevHostdev',
3866 'pipe' : 'ChardevHostdev',
3867 'socket' : 'ChardevSocket',
3868 'udp' : 'ChardevUdp',
3869 'pty' : 'ChardevCommon',
3870 'null' : 'ChardevCommon',
3871 'mux' : 'ChardevMux',
3872 'msmouse': 'ChardevCommon',
3873 'braille': 'ChardevCommon',
3874 'testdev': 'ChardevCommon',
3875 'stdio' : 'ChardevStdio',
3876 'console': 'ChardevCommon',
3877 'spicevmc' : 'ChardevSpiceChannel',
3878 'spiceport' : 'ChardevSpicePort',
3880 'ringbuf': 'ChardevRingbuf',
3881 # next one is just for compatibility
3882 'memory' : 'ChardevRingbuf' } }
3887 # Return info about the chardev backend just created.
3889 # @pty: #optional name of the slave pseudoterminal device, present if
3890 # and only if a chardev of type 'pty' was created
3894 { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3899 # Add a character device backend
3901 # @id: the chardev's ID, must be unique
3902 # @backend: backend type and parameters
3904 # Returns: ChardevReturn.
3908 { 'command': 'chardev-add', 'data': {'id' : 'str',
3909 'backend' : 'ChardevBackend' },
3910 'returns': 'ChardevReturn' }
3915 # Remove a character device backend
3917 # @id: the chardev's ID, must exist and not be in use
3919 # Returns: Nothing on success
3923 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3928 # An enumeration of TPM models
3930 # @tpm-tis: TPM TIS model
3934 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3937 # @query-tpm-models:
3939 # Return a list of supported TPM models
3941 # Returns: a list of TpmModel
3945 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3950 # An enumeration of TPM types
3952 # @passthrough: TPM passthrough type
3956 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3961 # Return a list of supported TPM types
3963 # Returns: a list of TpmType
3967 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3970 # @TPMPassthroughOptions:
3972 # Information about the TPM passthrough type
3974 # @path: #optional string describing the path used for accessing the TPM device
3976 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3977 # for cancellation of TPM commands while they are executing
3981 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3982 '*cancel-path' : 'str'} }
3987 # A union referencing different TPM backend types' configuration options
3989 # @passthrough: The configuration options for the TPM passthrough type
3993 { 'union': 'TpmTypeOptions',
3994 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3999 # Information about the TPM
4001 # @id: The Id of the TPM
4003 # @model: The TPM frontend model
4005 # @options: The TPM (backend) type configuration options
4009 { 'struct': 'TPMInfo',
4010 'data': {'id': 'str',
4011 'model': 'TpmModel',
4012 'options': 'TpmTypeOptions' } }
4017 # Return information about the TPM device
4019 # Returns: @TPMInfo on success
4023 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
4028 # Specify an ACPI table on the command line to load.
4030 # At most one of @file and @data can be specified. The list of files specified
4031 # by any one of them is loaded and concatenated in order. If both are omitted,
4034 # Other fields / optargs can be used to override fields of the generic ACPI
4035 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
4036 # Description Table Header. If a header field is not overridden, then the
4037 # corresponding value from the concatenated blob is used (in case of @file), or
4038 # it is filled in with a hard-coded value (in case of @data).
4040 # String fields are copied into the matching ACPI member from lowest address
4041 # upwards, and silently truncated / NUL-padded to length.
4043 # @sig: #optional table signature / identifier (4 bytes)
4045 # @rev: #optional table revision number (dependent on signature, 1 byte)
4047 # @oem_id: #optional OEM identifier (6 bytes)
4049 # @oem_table_id: #optional OEM table identifier (8 bytes)
4051 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
4053 # @asl_compiler_id: #optional identifier of the utility that created the table
4056 # @asl_compiler_rev: #optional revision number of the utility that created the
4059 # @file: #optional colon (:) separated list of pathnames to load and
4060 # concatenate as table data. The resultant binary blob is expected to
4061 # have an ACPI table header. At least one file is required. This field
4064 # @data: #optional colon (:) separated list of pathnames to load and
4065 # concatenate as table data. The resultant binary blob must not have an
4066 # ACPI table header. At least one file is required. This field excludes
4071 { 'struct': 'AcpiTableOptions',
4076 '*oem_table_id': 'str',
4077 '*oem_rev': 'uint32',
4078 '*asl_compiler_id': 'str',
4079 '*asl_compiler_rev': 'uint32',
4084 # @CommandLineParameterType:
4086 # Possible types for an option parameter.
4088 # @string: accepts a character string
4090 # @boolean: accepts "on" or "off"
4092 # @number: accepts a number
4094 # @size: accepts a number followed by an optional suffix (K)ilo,
4095 # (M)ega, (G)iga, (T)era
4099 { 'enum': 'CommandLineParameterType',
4100 'data': ['string', 'boolean', 'number', 'size'] }
4103 # @CommandLineParameterInfo:
4105 # Details about a single parameter of a command line option.
4107 # @name: parameter name
4109 # @type: parameter @CommandLineParameterType
4111 # @help: #optional human readable text string, not suitable for parsing.
4113 # @default: #optional default value string (since 2.1)
4117 { 'struct': 'CommandLineParameterInfo',
4118 'data': { 'name': 'str',
4119 'type': 'CommandLineParameterType',
4121 '*default': 'str' } }
4124 # @CommandLineOptionInfo:
4126 # Details about a command line option, including its list of parameter details
4128 # @option: option name
4130 # @parameters: an array of @CommandLineParameterInfo
4134 { 'struct': 'CommandLineOptionInfo',
4135 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
4138 # @query-command-line-options:
4140 # Query command line option schema.
4142 # @option: #optional option name
4144 # Returns: list of @CommandLineOptionInfo for all options (or for the given
4145 # @option). Returns an error if the given @option doesn't exist.
4149 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
4150 'returns': ['CommandLineOptionInfo'] }
4155 # A X86 32-bit register
4159 { 'enum': 'X86CPURegister32',
4160 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4163 # @X86CPUFeatureWordInfo
4165 # Information about a X86 CPU feature word
4167 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4169 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
4172 # @cpuid-register: Output register containing the feature bits
4174 # @features: value of output register, containing the feature bits
4178 { 'struct': 'X86CPUFeatureWordInfo',
4179 'data': { 'cpuid-input-eax': 'int',
4180 '*cpuid-input-ecx': 'int',
4181 'cpuid-register': 'X86CPURegister32',
4182 'features': 'int' } }
4187 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
4191 { 'struct': 'DummyForceArrays',
4192 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
4198 # Packets receiving state
4200 # @normal: filter assigned packets according to the mac-table
4202 # @none: don't receive any assigned packet
4204 # @all: receive all assigned packets
4208 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
4213 # Rx-filter information for a NIC.
4215 # @name: net client name
4217 # @promiscuous: whether promiscuous mode is enabled
4219 # @multicast: multicast receive state
4221 # @unicast: unicast receive state
4223 # @vlan: vlan receive state (Since 2.0)
4225 # @broadcast-allowed: whether to receive broadcast
4227 # @multicast-overflow: multicast table is overflowed or not
4229 # @unicast-overflow: unicast table is overflowed or not
4231 # @main-mac: the main macaddr string
4233 # @vlan-table: a list of active vlan id
4235 # @unicast-table: a list of unicast macaddr string
4237 # @multicast-table: a list of multicast macaddr string
4241 { 'struct': 'RxFilterInfo',
4244 'promiscuous': 'bool',
4245 'multicast': 'RxState',
4246 'unicast': 'RxState',
4248 'broadcast-allowed': 'bool',
4249 'multicast-overflow': 'bool',
4250 'unicast-overflow': 'bool',
4252 'vlan-table': ['int'],
4253 'unicast-table': ['str'],
4254 'multicast-table': ['str'] }}
4259 # Return rx-filter information for all NICs (or for the given NIC).
4261 # @name: #optional net client name
4263 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4264 # Returns an error if the given @name doesn't exist, or given
4265 # NIC doesn't support rx-filter querying, or given net client
4270 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4271 'returns': ['RxFilterInfo'] }
4276 # Button of a pointer input device (mouse, tablet).
4280 { 'enum' : 'InputButton',
4281 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down' ] }
4286 # Position axis of a pointer input device (mouse, tablet).
4290 { 'enum' : 'InputAxis',
4291 'data' : [ 'x', 'y' ] }
4296 # Keyboard input event.
4298 # @key: Which key this event is for.
4299 # @down: True for key-down and false for key-up events.
4303 { 'struct' : 'InputKeyEvent',
4304 'data' : { 'key' : 'KeyValue',
4310 # Pointer button input event.
4312 # @button: Which button this event is for.
4313 # @down: True for key-down and false for key-up events.
4317 { 'struct' : 'InputBtnEvent',
4318 'data' : { 'button' : 'InputButton',
4324 # Pointer motion input event.
4326 # @axis: Which axis is referenced by @value.
4327 # @value: Pointer position. For absolute coordinates the
4328 # valid range is 0 -> 0x7ffff
4332 { 'struct' : 'InputMoveEvent',
4333 'data' : { 'axis' : 'InputAxis',
4339 # Input event union.
4341 # @key: Input event of Keyboard
4342 # @btn: Input event of pointer buttons
4343 # @rel: Input event of relative pointer motion
4344 # @abs: Input event of absolute pointer motion
4348 { 'union' : 'InputEvent',
4349 'data' : { 'key' : 'InputKeyEvent',
4350 'btn' : 'InputBtnEvent',
4351 'rel' : 'InputMoveEvent',
4352 'abs' : 'InputMoveEvent' } }
4357 # Send input event(s) to guest.
4359 # @device: #optional display device to send event(s) to.
4360 # @head: #optional head to send event(s) to, in case the
4361 # display device supports multiple scanouts.
4362 # @events: List of InputEvent union.
4364 # Returns: Nothing on success.
4366 # The @display and @head parameters can be used to send the input
4367 # event to specific input devices in case (a) multiple input devices
4368 # of the same kind are added to the virtual machine and (b) you have
4369 # configured input routing (see docs/multiseat.txt) for those input
4370 # devices. The parameters work exactly like the device and head
4371 # properties of input devices. If @device is missing, only devices
4372 # that have no input routing config are admissible. If @device is
4373 # specified, both input devices with and without input routing config
4374 # are admissible, but devices with input routing config take
4379 { 'command': 'input-send-event',
4380 'data': { '*device': 'str',
4382 'events' : [ 'InputEvent' ] } }
4387 # A discriminated record of NUMA options. (for OptsVisitor)
4391 { 'union': 'NumaOptions',
4393 'node': 'NumaNodeOptions' }}
4398 # Create a guest NUMA node. (for OptsVisitor)
4400 # @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
4402 # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
4405 # @mem: #optional memory size of this node; mutually exclusive with @memdev.
4406 # Equally divide total memory among nodes if both @mem and @memdev are
4409 # @memdev: #optional memory backend object. If specified for one node,
4410 # it must be specified for all nodes.
4414 { 'struct': 'NumaNodeOptions',
4416 '*nodeid': 'uint16',
4417 '*cpus': ['uint16'],
4424 # Host memory policy types
4426 # @default: restore default policy, remove any nondefault policy
4428 # @preferred: set the preferred host nodes for allocation
4430 # @bind: a strict policy that restricts memory allocation to the
4431 # host nodes specified
4433 # @interleave: memory allocations are interleaved across the set
4434 # of host nodes specified
4438 { 'enum': 'HostMemPolicy',
4439 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
4444 # Information about memory backend
4446 # @size: memory backend size
4448 # @merge: enables or disables memory merge support
4450 # @dump: includes memory backend's memory in a core dump or not
4452 # @prealloc: enables or disables memory preallocation
4454 # @host-nodes: host nodes for its memory policy
4456 # @policy: memory policy of memory backend
4460 { 'struct': 'Memdev',
4466 'host-nodes': ['uint16'],
4467 'policy': 'HostMemPolicy' }}
4472 # Returns information for all memory backends.
4474 # Returns: a list of @Memdev.
4478 { 'command': 'query-memdev', 'returns': ['Memdev'] }
4481 # @PCDIMMDeviceInfo:
4483 # PCDIMMDevice state information
4485 # @id: #optional device's ID
4487 # @addr: physical address, where device is mapped
4489 # @size: size of memory that the device provides
4491 # @slot: slot number at which device is plugged in
4493 # @node: NUMA node number where device is plugged in
4495 # @memdev: memory backend linked with device
4497 # @hotplugged: true if device was hotplugged
4499 # @hotpluggable: true if device if could be added/removed while machine is running
4503 { 'struct': 'PCDIMMDeviceInfo',
4504 'data': { '*id': 'str',
4510 'hotplugged': 'bool',
4511 'hotpluggable': 'bool'
4516 # @MemoryDeviceInfo:
4518 # Union containing information about a memory device
4522 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
4525 # @query-memory-devices
4527 # Lists available memory devices and their state
4531 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
4535 # @DIMM: memory slot
4536 # @CPU: logical CPU slot (since 2.7)
4538 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
4542 # OSPM Status Indication for a device
4543 # For description of possible values of @source and @status fields
4544 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
4546 # @device: #optional device ID associated with slot
4548 # @slot: slot ID, unique per slot of a given @slot-type
4550 # @slot-type: type of the slot
4552 # @source: an integer containing the source event
4554 # @status: an integer containing the status code
4558 { 'struct': 'ACPIOSTInfo',
4559 'data' : { '*device': 'str',
4561 'slot-type': 'ACPISlotType',
4566 # @query-acpi-ospm-status
4568 # Lists ACPI OSPM status of ACPI device objects,
4569 # which might be reported via _OST method
4573 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
4576 # @WatchdogExpirationAction
4578 # An enumeration of the actions taken when the watchdog device's timer is
4581 # @reset: system resets
4583 # @shutdown: system shutdown, note that it is similar to @powerdown, which
4584 # tries to set to system status and notify guest
4586 # @poweroff: system poweroff, the emulator program exits
4588 # @pause: system pauses, similar to @stop
4590 # @debug: system enters debug state
4592 # @none: nothing is done
4594 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
4595 # VCPUS on x86) (since 2.4)
4599 { 'enum': 'WatchdogExpirationAction',
4600 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
4606 # An enumeration of the I/O operation types
4608 # @read: read operation
4610 # @write: write operation
4614 { 'enum': 'IoOperationType',
4615 'data': [ 'read', 'write' ] }
4620 # An enumeration of the actions taken when guest OS panic is detected
4622 # @pause: system pauses
4624 # Since: 2.1 (poweroff since 2.8)
4626 { 'enum': 'GuestPanicAction',
4627 'data': [ 'pause', 'poweroff' ] }
4630 # @rtc-reset-reinjection
4632 # This command will reset the RTC interrupt reinjection backlog.
4633 # Can be used if another mechanism to synchronize guest time
4634 # is in effect, for example QEMU guest agent's guest-set-time
4639 { 'command': 'rtc-reset-reinjection' }
4641 # Rocker ethernet network switch
4642 { 'include': 'qapi/rocker.json' }
4647 # Mode of the replay subsystem.
4649 # @none: normal execution mode. Replay or record are not enabled.
4651 # @record: record mode. All non-deterministic data is written into the
4654 # @play: replay mode. Non-deterministic data required for system execution
4655 # is read from the log.
4659 { 'enum': 'ReplayMode',
4660 'data': [ 'none', 'record', 'play' ] }
4663 # @xen-load-devices-state:
4665 # Load the state of all devices from file. The RAM and the block devices
4666 # of the VM are not loaded by this command.
4668 # @filename: the file to load the state of the devices from as binary
4669 # data. See xen-save-devices-state.txt for a description of the binary
4674 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
4679 # The struct describes capability for a specific GIC (Generic
4680 # Interrupt Controller) version. These bits are not only decided by
4681 # QEMU/KVM software version, but also decided by the hardware that
4682 # the program is running upon.
4684 # @version: version of GIC to be described. Currently, only 2 and 3
4687 # @emulated: whether current QEMU/hardware supports emulated GIC
4688 # device in user space.
4690 # @kernel: whether current QEMU/hardware supports hardware
4691 # accelerated GIC device in kernel.
4695 { 'struct': 'GICCapability',
4696 'data': { 'version': 'int',
4698 'kernel': 'bool' } }
4701 # @query-gic-capabilities:
4703 # This command is ARM-only. It will return a list of GICCapability
4704 # objects that describe its capability bits.
4706 # Returns: a list of GICCapability objects.
4710 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
4713 # CpuInstanceProperties
4715 # List of properties to be used for hotplugging a CPU instance,
4716 # it should be passed by management with device_add command when
4717 # a CPU is being hotplugged.
4719 # Note: currently there are 4 properties that could be present
4720 # but management should be prepared to pass through other
4721 # properties with device_add command to allow for future
4722 # interface extension. This also requires the filed names to be kept in
4723 # sync with the properties passed to -device/device_add.
4725 # @node-id: #optional NUMA node ID the CPU belongs to
4726 # @socket-id: #optional socket number within node/board the CPU belongs to
4727 # @core-id: #optional core number within socket the CPU belongs to
4728 # @thread-id: #optional thread number within core the CPU belongs to
4732 { 'struct': 'CpuInstanceProperties',
4733 'data': { '*node-id': 'int',
4734 '*socket-id': 'int',
4743 # @type: CPU object type for usage with device_add command
4744 # @props: list of properties to be used for hotplugging CPU
4745 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
4746 # @qom-path: #optional link to existing CPU object if CPU is present or
4747 # omitted if CPU is not present.
4751 { 'struct': 'HotpluggableCPU',
4752 'data': { 'type': 'str',
4753 'vcpus-count': 'int',
4754 'props': 'CpuInstanceProperties',
4760 # @query-hotpluggable-cpus
4762 # Returns: a list of HotpluggableCPU objects.
4766 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }