migrate: Fix bounds check for migration parameters in migration.c
[qemu/ar7.git] / qapi-schema.json
blob58bed718375dec9beb05106260b90cad802159b0
1 # -*- Mode: Python -*-
3 # QAPI Schema
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' }
17 # Tracing commands
18 { 'include': 'qapi/trace.json' }
20 # QAPI introspection
21 { 'include': 'qapi/introspect.json' }
24 # @qmp_capabilities:
26 # Enable QMP capabilities.
28 # Arguments: None.
30 # Example:
32 # -> { "execute": "qmp_capabilities" }
33 # <- { "return": {} }
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)
39 # Since: 0.13
42 { 'command': 'qmp_capabilities' }
45 # @LostTickPolicy:
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
58 #         of ticks
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.
63 # Since: 2.0
65 { 'enum': 'LostTickPolicy',
66   'data': ['discard', 'delay', 'merge', 'slew' ] }
68 # @add_client
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"
82 #       protocol
84 # Returns: nothing on success.
86 # Since: 0.14.0
88 { 'command': 'add_client',
89   'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
90             '*tls': 'bool' } }
93 # @NameInfo:
95 # Guest name information.
97 # @name: #optional The name of the guest
99 # Since 0.14.0
101 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
104 # @query-name:
106 # Return the name information of a guest.
108 # Returns: @NameInfo of the guest
110 # Since 0.14.0
112 { 'command': 'query-name', 'returns': 'NameInfo' }
115 # @KvmInfo:
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
123 # Since: 0.14.0
125 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
128 # @query-kvm:
130 # Returns information about KVM acceleration
132 # Returns: @KvmInfo
134 # Since: 0.14.0
136 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
139 # @RunState
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
151 # started.
153 # @internal-error: An internal error that prevents further guest execution
154 # has occurred
156 # @io-error: the last IOP has failed and the device is configured to pause
157 # on I/O errors
159 # @paused: guest has been paused via the 'stop' command
161 # @postmigrate: guest is paused following a successful 'migrate'
163 # @prelaunch: QEMU was started with -S and guest has not started
165 # @restore-vm: guest is paused to restore VM state
167 # @running: guest is actively running
169 # @save-vm: guest is paused to save the VM state
171 # @shutdown: guest is shut down (and -no-shutdown is in use)
173 # @suspended: guest is suspended (ACPI S3)
175 # @watchdog: the watchdog action is configured to pause and has been triggered
177 # @guest-panicked: guest has been panicked as a result of guest OS panic
179 { 'enum': 'RunState',
180   'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
181             'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
182             'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
183             'guest-panicked' ] }
186 # @StatusInfo:
188 # Information about VCPU run state
190 # @running: true if all VCPUs are runnable, false if not runnable
192 # @singlestep: true if VCPUs are in single-step mode
194 # @status: the virtual machine @RunState
196 # Since:  0.14.0
198 # Notes: @singlestep is enabled through the GDB stub
200 { 'struct': 'StatusInfo',
201   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
204 # @query-status:
206 # Query the run status of all VCPUs
208 # Returns: @StatusInfo reflecting all VCPUs
210 # Since:  0.14.0
212 { 'command': 'query-status', 'returns': 'StatusInfo' }
215 # @UuidInfo:
217 # Guest UUID information.
219 # @UUID: the UUID of the guest
221 # Since: 0.14.0
223 # Notes: If no UUID was specified for the guest, a null UUID is returned.
225 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
228 # @query-uuid:
230 # Query the guest UUID information.
232 # Returns: The @UuidInfo for the guest
234 # Since 0.14.0
236 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
239 # @ChardevInfo:
241 # Information about a character device.
243 # @label: the label of the character device
245 # @filename: the filename of the character device
247 # @frontend-open: shows whether the frontend device attached to this backend
248 #                 (eg. with the chardev=... option) is in open or closed state
249 #                 (since 2.1)
251 # Notes: @filename is encoded using the QEMU command line character device
252 #        encoding.  See the QEMU man page for details.
254 # Since: 0.14.0
256 { 'struct': 'ChardevInfo', 'data': {'label': 'str',
257                                   'filename': 'str',
258                                   'frontend-open': 'bool'} }
261 # @query-chardev:
263 # Returns information about current character devices.
265 # Returns: a list of @ChardevInfo
267 # Since: 0.14.0
269 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
272 # @ChardevBackendInfo:
274 # Information about a character device backend
276 # @name: The backend name
278 # Since: 2.0
280 { 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} }
283 # @query-chardev-backends:
285 # Returns information about character device backends.
287 # Returns: a list of @ChardevBackendInfo
289 # Since: 2.0
291 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
294 # @DataFormat:
296 # An enumeration of data format.
298 # @utf8: Data is a UTF-8 string (RFC 3629)
300 # @base64: Data is Base64 encoded binary (RFC 3548)
302 # Since: 1.4
304 { 'enum': 'DataFormat',
305   'data': [ 'utf8', 'base64' ] }
308 # @ringbuf-write:
310 # Write to a ring buffer character device.
312 # @device: the ring buffer character device name
314 # @data: data to write
316 # @format: #optional data encoding (default 'utf8').
317 #          - base64: data must be base64 encoded text.  Its binary
318 #            decoding gets written.
319 #          - utf8: data's UTF-8 encoding is written
320 #          - data itself is always Unicode regardless of format, like
321 #            any other string.
323 # Returns: Nothing on success
325 # Since: 1.4
327 { 'command': 'ringbuf-write',
328   'data': {'device': 'str', 'data': 'str',
329            '*format': 'DataFormat'} }
332 # @ringbuf-read:
334 # Read from a ring buffer character device.
336 # @device: the ring buffer character device name
338 # @size: how many bytes to read at most
340 # @format: #optional data encoding (default 'utf8').
341 #          - base64: the data read is returned in base64 encoding.
342 #          - utf8: the data read is interpreted as UTF-8.
343 #            Bug: can screw up when the buffer contains invalid UTF-8
344 #            sequences, NUL characters, after the ring buffer lost
345 #            data, and when reading stops because the size limit is
346 #            reached.
347 #          - The return value is always Unicode regardless of format,
348 #            like any other string.
350 # Returns: data read from the device
352 # Since: 1.4
354 { 'command': 'ringbuf-read',
355   'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
356   'returns': 'str' }
359 # @EventInfo:
361 # Information about a QMP event
363 # @name: The event name
365 # Since: 1.2.0
367 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
370 # @query-events:
372 # Return a list of supported QMP events by this server
374 # Returns: A list of @EventInfo for all supported events
376 # Since: 1.2.0
378 { 'command': 'query-events', 'returns': ['EventInfo'] }
381 # @MigrationStats
383 # Detailed migration status.
385 # @transferred: amount of bytes already transferred to the target VM
387 # @remaining: amount of bytes remaining to be transferred to the target VM
389 # @total: total amount of bytes involved in the migration process
391 # @duplicate: number of duplicate (zero) pages (since 1.2)
393 # @skipped: number of skipped zero pages (since 1.5)
395 # @normal : number of normal pages (since 1.2)
397 # @normal-bytes: number of normal bytes sent (since 1.2)
399 # @dirty-pages-rate: number of pages dirtied by second by the
400 #        guest (since 1.3)
402 # @mbps: throughput in megabits/sec. (since 1.6)
404 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
406 # @postcopy-requests: The number of page requests received from the destination
407 #        (since 2.7)
409 # Since: 0.14.0
411 { 'struct': 'MigrationStats',
412   'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
413            'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
414            'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
415            'mbps' : 'number', 'dirty-sync-count' : 'int',
416            'postcopy-requests' : 'int' } }
419 # @XBZRLECacheStats
421 # Detailed XBZRLE migration cache statistics
423 # @cache-size: XBZRLE cache size
425 # @bytes: amount of bytes already transferred to the target VM
427 # @pages: amount of pages transferred to the target VM
429 # @cache-miss: number of cache miss
431 # @cache-miss-rate: rate of cache miss (since 2.1)
433 # @overflow: number of overflows
435 # Since: 1.2
437 { 'struct': 'XBZRLECacheStats',
438   'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
439            'cache-miss': 'int', 'cache-miss-rate': 'number',
440            'overflow': 'int' } }
442 # @MigrationStatus:
444 # An enumeration of migration status.
446 # @none: no migration has ever happened.
448 # @setup: migration process has been initiated.
450 # @cancelling: in the process of cancelling migration.
452 # @cancelled: cancelling migration is finished.
454 # @active: in the process of doing migration.
456 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
458 # @completed: migration is finished.
460 # @failed: some error occurred during migration process.
462 # Since: 2.3
465 { 'enum': 'MigrationStatus',
466   'data': [ 'none', 'setup', 'cancelling', 'cancelled',
467             'active', 'postcopy-active', 'completed', 'failed' ] }
470 # @MigrationInfo
472 # Information about current migration process.
474 # @status: #optional @MigrationStatus describing the current migration status.
475 #          If this field is not returned, no migration process
476 #          has been initiated
478 # @ram: #optional @MigrationStats containing detailed migration
479 #       status, only returned if status is 'active' or
480 #       'completed'(since 1.2)
482 # @disk: #optional @MigrationStats containing detailed disk migration
483 #        status, only returned if status is 'active' and it is a block
484 #        migration
486 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
487 #                migration statistics, only returned if XBZRLE feature is on and
488 #                status is 'active' or 'completed' (since 1.2)
490 # @total-time: #optional total amount of milliseconds since migration started.
491 #        If migration has ended, it returns the total migration
492 #        time. (since 1.2)
494 # @downtime: #optional only present when migration finishes correctly
495 #        total downtime in milliseconds for the guest.
496 #        (since 1.3)
498 # @expected-downtime: #optional only present while migration is active
499 #        expected downtime in milliseconds for the guest in last walk
500 #        of the dirty bitmap. (since 1.3)
502 # @setup-time: #optional amount of setup time in milliseconds _before_ the
503 #        iterations begin but _after_ the QMP command is issued. This is designed
504 #        to provide an accounting of any activities (such as RDMA pinning) which
505 #        may be expensive, but do not actually occur during the iterative
506 #        migration rounds themselves. (since 1.6)
508 # @cpu-throttle-percentage: #optional percentage of time guest cpus are being
509 #        throttled during auto-converge. This is only present when auto-converge
510 #        has started throttling guest cpus. (Since 2.7)
512 # @error-desc: #optional the human readable error description string, when
513 #              @status is 'failed'. Clients should not attempt to parse the
514 #              error strings. (Since 2.7)
516 # Since: 0.14.0
518 { 'struct': 'MigrationInfo',
519   'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
520            '*disk': 'MigrationStats',
521            '*xbzrle-cache': 'XBZRLECacheStats',
522            '*total-time': 'int',
523            '*expected-downtime': 'int',
524            '*downtime': 'int',
525            '*setup-time': 'int',
526            '*cpu-throttle-percentage': 'int',
527            '*error-desc': 'str'} }
530 # @query-migrate
532 # Returns information about current migration process.
534 # Returns: @MigrationInfo
536 # Since: 0.14.0
538 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
541 # @MigrationCapability
543 # Migration capabilities enumeration
545 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
546 #          This feature allows us to minimize migration traffic for certain work
547 #          loads, by sending compressed difference of the pages
549 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
550 #          mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
551 #          Disabled by default. (since 2.0)
553 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
554 #          essentially saves 1MB of zeroes per block on the wire. Enabling requires
555 #          source and target VM to support this feature. To enable it is sufficient
556 #          to enable the capability on the source VM. The feature is disabled by
557 #          default. (since 1.6)
559 # @compress: Use multiple compression threads to accelerate live migration.
560 #          This feature can help to reduce the migration traffic, by sending
561 #          compressed pages. Please note that if compress and xbzrle are both
562 #          on, compress only takes effect in the ram bulk stage, after that,
563 #          it will be disabled and only xbzrle takes effect, this can help to
564 #          minimize migration traffic. The feature is disabled by default.
565 #          (since 2.4 )
567 # @events: generate events for each migration state change
568 #          (since 2.4 )
570 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
571 #          to speed up convergence of RAM migration. (since 1.6)
573 # @postcopy-ram: Start executing on the migration target before all of RAM has
574 #          been migrated, pulling the remaining pages along as needed. NOTE: If
575 #          the migration fails during postcopy the VM will fail.  (since 2.6)
577 # Since: 1.2
579 { 'enum': 'MigrationCapability',
580   'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
581            'compress', 'events', 'postcopy-ram'] }
584 # @MigrationCapabilityStatus
586 # Migration capability information
588 # @capability: capability enum
590 # @state: capability state bool
592 # Since: 1.2
594 { 'struct': 'MigrationCapabilityStatus',
595   'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
598 # @migrate-set-capabilities
600 # Enable/Disable the following migration capabilities (like xbzrle)
602 # @capabilities: json array of capability modifications to make
604 # Since: 1.2
606 { 'command': 'migrate-set-capabilities',
607   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
610 # @query-migrate-capabilities
612 # Returns information about the current migration capabilities status
614 # Returns: @MigrationCapabilitiesStatus
616 # Since: 1.2
618 { 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}
620 # @MigrationParameter
622 # Migration parameters enumeration
624 # @compress-level: Set the compression level to be used in live migration,
625 #          the compression level is an integer between 0 and 9, where 0 means
626 #          no compression, 1 means the best compression speed, and 9 means best
627 #          compression ratio which will consume more CPU.
629 # @compress-threads: Set compression thread count to be used in live migration,
630 #          the compression thread count is an integer between 1 and 255.
632 # @decompress-threads: Set decompression thread count to be used in live
633 #          migration, the decompression thread count is an integer between 1
634 #          and 255. Usually, decompression is at least 4 times as fast as
635 #          compression, so set the decompress-threads to the number about 1/4
636 #          of compress-threads is adequate.
638 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
639 #                        when migration auto-converge is activated. The
640 #                        default value is 20. (Since 2.7)
642 # @cpu-throttle-increment: throttle percentage increase each time
643 #                          auto-converge detects that migration is not making
644 #                          progress. The default value is 10. (Since 2.7)
646 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
647 #             establishing a TLS connection over the migration data channel.
648 #             On the outgoing side of the migration, the credentials must
649 #             be for a 'client' endpoint, while for the incoming side the
650 #             credentials must be for a 'server' endpoint. Setting this
651 #             will enable TLS for all migrations. The default is unset,
652 #             resulting in unsecured migration at the QEMU level. (Since 2.7)
654 # @tls-hostname: hostname of the target host for the migration. This is
655 #                required when using x509 based TLS credentials and the
656 #                migration URI does not already include a hostname. For
657 #                example if using fd: or exec: based migration, the
658 #                hostname must be provided so that the server's x509
659 #                certificate identity can be validated. (Since 2.7)
661 # Since: 2.4
663 { 'enum': 'MigrationParameter',
664   'data': ['compress-level', 'compress-threads', 'decompress-threads',
665            'cpu-throttle-initial', 'cpu-throttle-increment',
666            'tls-creds', 'tls-hostname'] }
669 # @migrate-set-parameters
671 # Set various migration parameters.  See MigrationParameters for details.
673 # Since: 2.4
675 { 'command': 'migrate-set-parameters', 'boxed': true,
676   'data': 'MigrationParameters' }
679 # @MigrationParameters
681 # Optional members can be omitted on input ('migrate-set-parameters')
682 # but most members will always be present on output
683 # ('query-migrate-parameters'), with the exception of tls-creds and
684 # tls-hostname.
686 # @compress-level: #optional compression level
688 # @compress-threads: #optional compression thread count
690 # @decompress-threads: #optional decompression thread count
692 # @cpu-throttle-initial: #optional Initial percentage of time guest cpus are
693 #                        throttledwhen migration auto-converge is activated.
694 #                        The default value is 20. (Since 2.7)
696 # @cpu-throttle-increment: #optional throttle percentage increase each time
697 #                          auto-converge detects that migration is not making
698 #                          progress. The default value is 10. (Since 2.7)
700 # @tls-creds: #optional ID of the 'tls-creds' object that provides credentials
701 #             for establishing a TLS connection over the migration data
702 #             channel. On the outgoing side of the migration, the credentials
703 #             must be for a 'client' endpoint, while for the incoming side the
704 #             credentials must be for a 'server' endpoint. Setting this
705 #             will enable TLS for all migrations. The default is unset,
706 #             resulting in unsecured migration at the QEMU level. (Since 2.7)
708 # @tls-hostname: #optional hostname of the target host for the migration. This
709 #                is required when using x509 based TLS credentials and the
710 #                migration URI does not already include a hostname. For
711 #                example if using fd: or exec: based migration, the
712 #                hostname must be provided so that the server's x509
713 #                certificate identity can be validated. (Since 2.7)
715 # Since: 2.4
717 { 'struct': 'MigrationParameters',
718   'data': { '*compress-level': 'int',
719             '*compress-threads': 'int',
720             '*decompress-threads': 'int',
721             '*cpu-throttle-initial': 'int',
722             '*cpu-throttle-increment': 'int',
723             '*tls-creds': 'str',
724             '*tls-hostname': 'str'} }
726 # @query-migrate-parameters
728 # Returns information about the current migration parameters
730 # Returns: @MigrationParameters
732 # Since: 2.4
734 { 'command': 'query-migrate-parameters',
735   'returns': 'MigrationParameters' }
738 # @client_migrate_info
740 # Set migration information for remote display.  This makes the server
741 # ask the client to automatically reconnect using the new parameters
742 # once migration finished successfully.  Only implemented for SPICE.
744 # @protocol:     must be "spice"
745 # @hostname:     migration target hostname
746 # @port:         #optional spice tcp port for plaintext channels
747 # @tls-port:     #optional spice tcp port for tls-secured channels
748 # @cert-subject: #optional server certificate subject
750 # Since: 0.14.0
752 { 'command': 'client_migrate_info',
753   'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
754             '*tls-port': 'int', '*cert-subject': 'str' } }
757 # @migrate-start-postcopy
759 # Followup to a migration command to switch the migration to postcopy mode.
760 # The postcopy-ram capability must be set before the original migration
761 # command.
763 # Since: 2.5
764 { 'command': 'migrate-start-postcopy' }
767 # @MouseInfo:
769 # Information about a mouse device.
771 # @name: the name of the mouse device
773 # @index: the index of the mouse device
775 # @current: true if this device is currently receiving mouse events
777 # @absolute: true if this device supports absolute coordinates as input
779 # Since: 0.14.0
781 { 'struct': 'MouseInfo',
782   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
783            'absolute': 'bool'} }
786 # @query-mice:
788 # Returns information about each active mouse device
790 # Returns: a list of @MouseInfo for each device
792 # Since: 0.14.0
794 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
797 # @CpuInfoArch:
799 # An enumeration of cpu types that enable additional information during
800 # @query-cpus.
802 # Since: 2.6
804 { 'enum': 'CpuInfoArch',
805   'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
808 # @CpuInfo:
810 # Information about a virtual CPU
812 # @CPU: the index of the virtual CPU
814 # @current: this only exists for backwards compatibility and should be ignored
816 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
817 #          to a processor specific low power mode.
819 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
821 # @thread_id: ID of the underlying host thread
823 # @arch: architecture of the cpu, which determines which additional fields
824 #        will be listed (since 2.6)
826 # Since: 0.14.0
828 # Notes: @halted is a transient state that changes frequently.  By the time the
829 #        data is sent to the client, the guest may no longer be halted.
831 { 'union': 'CpuInfo',
832   'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
833            'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' },
834   'discriminator': 'arch',
835   'data': { 'x86': 'CpuInfoX86',
836             'sparc': 'CpuInfoSPARC',
837             'ppc': 'CpuInfoPPC',
838             'mips': 'CpuInfoMIPS',
839             'tricore': 'CpuInfoTricore',
840             'other': 'CpuInfoOther' } }
843 # @CpuInfoX86:
845 # Additional information about a virtual i386 or x86_64 CPU
847 # @pc: the 64-bit instruction pointer
849 # Since 2.6
851 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
854 # @CpuInfoSPARC:
856 # Additional information about a virtual SPARC CPU
858 # @pc: the PC component of the instruction pointer
860 # @npc: the NPC component of the instruction pointer
862 # Since 2.6
864 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
867 # @CpuInfoPPC:
869 # Additional information about a virtual PPC CPU
871 # @nip: the instruction pointer
873 # Since 2.6
875 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
878 # @CpuInfoMIPS:
880 # Additional information about a virtual MIPS CPU
882 # @PC: the instruction pointer
884 # Since 2.6
886 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
889 # @CpuInfoTricore:
891 # Additional information about a virtual Tricore CPU
893 # @PC: the instruction pointer
895 # Since 2.6
897 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
900 # @CpuInfoOther:
902 # No additional information is available about the virtual CPU
904 # Since 2.6
907 { 'struct': 'CpuInfoOther', 'data': { } }
910 # @query-cpus:
912 # Returns a list of information about each virtual CPU.
914 # Returns: a list of @CpuInfo for each virtual CPU
916 # Since: 0.14.0
918 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
921 # @IOThreadInfo:
923 # Information about an iothread
925 # @id: the identifier of the iothread
927 # @thread-id: ID of the underlying host thread
929 # Since: 2.0
931 { 'struct': 'IOThreadInfo',
932   'data': {'id': 'str', 'thread-id': 'int'} }
935 # @query-iothreads:
937 # Returns a list of information about each iothread.
939 # Note this list excludes the QEMU main loop thread, which is not declared
940 # using the -object iothread command-line option.  It is always the main thread
941 # of the process.
943 # Returns: a list of @IOThreadInfo for each iothread
945 # Since: 2.0
947 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
950 # @NetworkAddressFamily
952 # The network address family
954 # @ipv4: IPV4 family
956 # @ipv6: IPV6 family
958 # @unix: unix socket
960 # @unknown: otherwise
962 # Since: 2.1
964 { 'enum': 'NetworkAddressFamily',
965   'data': [ 'ipv4', 'ipv6', 'unix', 'unknown' ] }
968 # @VncBasicInfo
970 # The basic information for vnc network connection
972 # @host: IP address
974 # @service: The service name of the vnc port. This may depend on the host
975 #           system's service database so symbolic names should not be relied
976 #           on.
978 # @family: address family
980 # @websocket: true in case the socket is a websocket (since 2.3).
982 # Since: 2.1
984 { 'struct': 'VncBasicInfo',
985   'data': { 'host': 'str',
986             'service': 'str',
987             'family': 'NetworkAddressFamily',
988             'websocket': 'bool' } }
991 # @VncServerInfo
993 # The network connection information for server
995 # @auth: #optional, authentication method
997 # Since: 2.1
999 { 'struct': 'VncServerInfo',
1000   'base': 'VncBasicInfo',
1001   'data': { '*auth': 'str' } }
1004 # @VncClientInfo:
1006 # Information about a connected VNC client.
1008 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
1009 #              Name of the client.
1011 # @sasl_username: #optional If SASL authentication is in use, the SASL username
1012 #                 used for authentication.
1014 # Since: 0.14.0
1016 { 'struct': 'VncClientInfo',
1017   'base': 'VncBasicInfo',
1018   'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1021 # @VncInfo:
1023 # Information about the VNC session.
1025 # @enabled: true if the VNC server is enabled, false otherwise
1027 # @host: #optional The hostname the VNC server is bound to.  This depends on
1028 #        the name resolution on the host and may be an IP address.
1030 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
1031 #                    'ipv4' if the host is listening for IPv4 connections
1032 #                    'unix' if the host is listening on a unix domain socket
1033 #                    'unknown' otherwise
1035 # @service: #optional The service name of the server's port.  This may depends
1036 #           on the host system's service database so symbolic names should not
1037 #           be relied on.
1039 # @auth: #optional the current authentication type used by the server
1040 #        'none' if no authentication is being used
1041 #        'vnc' if VNC authentication is being used
1042 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
1043 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1044 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1045 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1046 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1047 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1048 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1049 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1050 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1052 # @clients: a list of @VncClientInfo of all currently connected clients
1054 # Since: 0.14.0
1056 { 'struct': 'VncInfo',
1057   'data': {'enabled': 'bool', '*host': 'str',
1058            '*family': 'NetworkAddressFamily',
1059            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1062 # @VncPriAuth:
1064 # vnc primary authentication method.
1066 # Since: 2.3
1068 { 'enum': 'VncPrimaryAuth',
1069   'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1070             'tls', 'vencrypt', 'sasl' ] }
1073 # @VncVencryptSubAuth:
1075 # vnc sub authentication method with vencrypt.
1077 # Since: 2.3
1079 { 'enum': 'VncVencryptSubAuth',
1080   'data': [ 'plain',
1081             'tls-none',  'x509-none',
1082             'tls-vnc',   'x509-vnc',
1083             'tls-plain', 'x509-plain',
1084             'tls-sasl',  'x509-sasl' ] }
1087 # @VncInfo2:
1089 # Information about a vnc server
1091 # @id: vnc server name.
1093 # @server: A list of @VncBasincInfo describing all listening sockets.
1094 #          The list can be empty (in case the vnc server is disabled).
1095 #          It also may have multiple entries: normal + websocket,
1096 #          possibly also ipv4 + ipv6 in the future.
1098 # @clients: A list of @VncClientInfo of all currently connected clients.
1099 #           The list can be empty, for obvious reasons.
1101 # @auth: The current authentication type used by the server
1103 # @vencrypt: #optional The vencrypt sub authentication type used by the server,
1104 #            only specified in case auth == vencrypt.
1106 # @display: #optional The display device the vnc server is linked to.
1108 # Since: 2.3
1110 { 'struct': 'VncInfo2',
1111   'data': { 'id'        : 'str',
1112             'server'    : ['VncBasicInfo'],
1113             'clients'   : ['VncClientInfo'],
1114             'auth'      : 'VncPrimaryAuth',
1115             '*vencrypt' : 'VncVencryptSubAuth',
1116             '*display'  : 'str' } }
1119 # @query-vnc:
1121 # Returns information about the current VNC server
1123 # Returns: @VncInfo
1125 # Since: 0.14.0
1127 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1130 # @query-vnc-servers:
1132 # Returns a list of vnc servers.  The list can be empty.
1134 # Returns: a list of @VncInfo2
1136 # Since: 2.3
1138 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1141 # @SpiceBasicInfo
1143 # The basic information for SPICE network connection
1145 # @host: IP address
1147 # @port: port number
1149 # @family: address family
1151 # Since: 2.1
1153 { 'struct': 'SpiceBasicInfo',
1154   'data': { 'host': 'str',
1155             'port': 'str',
1156             'family': 'NetworkAddressFamily' } }
1159 # @SpiceServerInfo
1161 # Information about a SPICE server
1163 # @auth: #optional, authentication method
1165 # Since: 2.1
1167 { 'struct': 'SpiceServerInfo',
1168   'base': 'SpiceBasicInfo',
1169   'data': { '*auth': 'str' } }
1172 # @SpiceChannel
1174 # Information about a SPICE client channel.
1176 # @connection-id: SPICE connection id number.  All channels with the same id
1177 #                 belong to the same SPICE session.
1179 # @channel-type: SPICE channel type number.  "1" is the main control
1180 #                channel, filter for this one if you want to track spice
1181 #                sessions only
1183 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
1184 #              multiple channels of the same type exist, such as multiple
1185 #              display channels in a multihead setup
1187 # @tls: true if the channel is encrypted, false otherwise.
1189 # Since: 0.14.0
1191 { 'struct': 'SpiceChannel',
1192   'base': 'SpiceBasicInfo',
1193   'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1194            'tls': 'bool'} }
1197 # @SpiceQueryMouseMode
1199 # An enumeration of Spice mouse states.
1201 # @client: Mouse cursor position is determined by the client.
1203 # @server: Mouse cursor position is determined by the server.
1205 # @unknown: No information is available about mouse mode used by
1206 #           the spice server.
1208 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1210 # Since: 1.1
1212 { 'enum': 'SpiceQueryMouseMode',
1213   'data': [ 'client', 'server', 'unknown' ] }
1216 # @SpiceInfo
1218 # Information about the SPICE session.
1220 # @enabled: true if the SPICE server is enabled, false otherwise
1222 # @migrated: true if the last guest migration completed and spice
1223 #            migration had completed as well. false otherwise.
1225 # @host: #optional The hostname the SPICE server is bound to.  This depends on
1226 #        the name resolution on the host and may be an IP address.
1228 # @port: #optional The SPICE server's port number.
1230 # @compiled-version: #optional SPICE server version.
1232 # @tls-port: #optional The SPICE server's TLS port number.
1234 # @auth: #optional the current authentication type used by the server
1235 #        'none'  if no authentication is being used
1236 #        'spice' uses SASL or direct TLS authentication, depending on command
1237 #                line options
1239 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1240 #              be determined by the client or the server, or unknown if spice
1241 #              server doesn't provide this information.
1243 #              Since: 1.1
1245 # @channels: a list of @SpiceChannel for each active spice channel
1247 # Since: 0.14.0
1249 { 'struct': 'SpiceInfo',
1250   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1251            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1252            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1255 # @query-spice
1257 # Returns information about the current SPICE server
1259 # Returns: @SpiceInfo
1261 # Since: 0.14.0
1263 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1266 # @BalloonInfo:
1268 # Information about the guest balloon device.
1270 # @actual: the number of bytes the balloon currently contains
1272 # Since: 0.14.0
1275 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1278 # @query-balloon:
1280 # Return information about the balloon device.
1282 # Returns: @BalloonInfo on success
1283 #          If the balloon driver is enabled but not functional because the KVM
1284 #          kernel module cannot support it, KvmMissingCap
1285 #          If no balloon device is present, DeviceNotActive
1287 # Since: 0.14.0
1289 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1292 # @PciMemoryRange:
1294 # A PCI device memory region
1296 # @base: the starting address (guest physical)
1298 # @limit: the ending address (guest physical)
1300 # Since: 0.14.0
1302 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1305 # @PciMemoryRegion
1307 # Information about a PCI device I/O region.
1309 # @bar: the index of the Base Address Register for this region
1311 # @type: 'io' if the region is a PIO region
1312 #        'memory' if the region is a MMIO region
1314 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1316 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1318 # Since: 0.14.0
1320 { 'struct': 'PciMemoryRegion',
1321   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1322            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1325 # @PciBusInfo:
1327 # Information about a bus of a PCI Bridge device
1329 # @number: primary bus interface number.  This should be the number of the
1330 #          bus the device resides on.
1332 # @secondary: secondary bus interface number.  This is the number of the
1333 #             main bus for the bridge
1335 # @subordinate: This is the highest number bus that resides below the
1336 #               bridge.
1338 # @io_range: The PIO range for all devices on this bridge
1340 # @memory_range: The MMIO range for all devices on this bridge
1342 # @prefetchable_range: The range of prefetchable MMIO for all devices on
1343 #                      this bridge
1345 # Since: 2.4
1347 { 'struct': 'PciBusInfo',
1348   'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1349            'io_range': 'PciMemoryRange',
1350            'memory_range': 'PciMemoryRange',
1351            'prefetchable_range': 'PciMemoryRange' } }
1354 # @PciBridgeInfo:
1356 # Information about a PCI Bridge device
1358 # @bus: information about the bus the device resides on
1360 # @devices: a list of @PciDeviceInfo for each device on this bridge
1362 # Since: 0.14.0
1364 { 'struct': 'PciBridgeInfo',
1365   'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
1368 # @PciDeviceClass:
1370 # Information about the Class of a PCI device
1372 # @desc: #optional a string description of the device's class
1374 # @class: the class code of the device
1376 # Since: 2.4
1378 { 'struct': 'PciDeviceClass',
1379   'data': {'*desc': 'str', 'class': 'int'} }
1382 # @PciDeviceId:
1384 # Information about the Id of a PCI device
1386 # @device: the PCI device id
1388 # @vendor: the PCI vendor id
1390 # Since: 2.4
1392 { 'struct': 'PciDeviceId',
1393   'data': {'device': 'int', 'vendor': 'int'} }
1396 # @PciDeviceInfo:
1398 # Information about a PCI device
1400 # @bus: the bus number of the device
1402 # @slot: the slot the device is located in
1404 # @function: the function of the slot used by the device
1406 # @class_info: the class of the device
1408 # @id: the PCI device id
1410 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1412 # @qdev_id: the device name of the PCI device
1414 # @pci_bridge: if the device is a PCI bridge, the bridge information
1416 # @regions: a list of the PCI I/O regions associated with the device
1418 # Notes: the contents of @class_info.desc are not stable and should only be
1419 #        treated as informational.
1421 # Since: 0.14.0
1423 { 'struct': 'PciDeviceInfo',
1424   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1425            'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
1426            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1427            'regions': ['PciMemoryRegion']} }
1430 # @PciInfo:
1432 # Information about a PCI bus
1434 # @bus: the bus index
1436 # @devices: a list of devices on this bus
1438 # Since: 0.14.0
1440 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1443 # @query-pci:
1445 # Return information about the PCI bus topology of the guest.
1447 # Returns: a list of @PciInfo for each PCI bus
1449 # Since: 0.14.0
1451 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1454 # @quit:
1456 # This command will cause the QEMU process to exit gracefully.  While every
1457 # attempt is made to send the QMP response before terminating, this is not
1458 # guaranteed.  When using this interface, a premature EOF would not be
1459 # unexpected.
1461 # Since: 0.14.0
1463 { 'command': 'quit' }
1466 # @stop:
1468 # Stop all guest VCPU execution.
1470 # Since:  0.14.0
1472 # Notes:  This function will succeed even if the guest is already in the stopped
1473 #         state.  In "inmigrate" state, it will ensure that the guest
1474 #         remains paused once migration finishes, as if the -S option was
1475 #         passed on the command line.
1477 { 'command': 'stop' }
1480 # @system_reset:
1482 # Performs a hard reset of a guest.
1484 # Since: 0.14.0
1486 { 'command': 'system_reset' }
1489 # @system_powerdown:
1491 # Requests that a guest perform a powerdown operation.
1493 # Since: 0.14.0
1495 # Notes: A guest may or may not respond to this command.  This command
1496 #        returning does not indicate that a guest has accepted the request or
1497 #        that it has shut down.  Many guests will respond to this command by
1498 #        prompting the user in some way.
1500 { 'command': 'system_powerdown' }
1503 # @cpu:
1505 # This command is a nop that is only provided for the purposes of compatibility.
1507 # Since: 0.14.0
1509 # Notes: Do not use this command.
1511 { 'command': 'cpu', 'data': {'index': 'int'} }
1514 # @cpu-add
1516 # Adds CPU with specified ID
1518 # @id: ID of CPU to be created, valid values [0..max_cpus)
1520 # Returns: Nothing on success
1522 # Since 1.5
1524 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1527 # @memsave:
1529 # Save a portion of guest memory to a file.
1531 # @val: the virtual address of the guest to start from
1533 # @size: the size of memory region to save
1535 # @filename: the file to save the memory to as binary data
1537 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1538 #                       virtual address (defaults to CPU 0)
1540 # Returns: Nothing on success
1542 # Since: 0.14.0
1544 # Notes: Errors were not reliably returned until 1.1
1546 { 'command': 'memsave',
1547   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1550 # @pmemsave:
1552 # Save a portion of guest physical memory to a file.
1554 # @val: the physical address of the guest to start from
1556 # @size: the size of memory region to save
1558 # @filename: the file to save the memory to as binary data
1560 # Returns: Nothing on success
1562 # Since: 0.14.0
1564 # Notes: Errors were not reliably returned until 1.1
1566 { 'command': 'pmemsave',
1567   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1570 # @cont:
1572 # Resume guest VCPU execution.
1574 # Since:  0.14.0
1576 # Returns:  If successful, nothing
1577 #           If QEMU was started with an encrypted block device and a key has
1578 #              not yet been set, DeviceEncrypted.
1580 # Notes:  This command will succeed if the guest is currently running.  It
1581 #         will also succeed if the guest is in the "inmigrate" state; in
1582 #         this case, the effect of the command is to make sure the guest
1583 #         starts once migration finishes, removing the effect of the -S
1584 #         command line option if it was passed.
1586 { 'command': 'cont' }
1589 # @system_wakeup:
1591 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1593 # Since:  1.1
1595 # Returns:  nothing.
1597 { 'command': 'system_wakeup' }
1600 # @inject-nmi:
1602 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
1604 # Returns:  If successful, nothing
1606 # Since:  0.14.0
1608 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
1610 { 'command': 'inject-nmi' }
1613 # @set_link:
1615 # Sets the link status of a virtual network adapter.
1617 # @name: the device name of the virtual network adapter
1619 # @up: true to set the link status to be up
1621 # Returns: Nothing on success
1622 #          If @name is not a valid network device, DeviceNotFound
1624 # Since: 0.14.0
1626 # Notes: Not all network adapters support setting link status.  This command
1627 #        will succeed even if the network adapter does not support link status
1628 #        notification.
1630 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1633 # @balloon:
1635 # Request the balloon driver to change its balloon size.
1637 # @value: the target size of the balloon in bytes
1639 # Returns: Nothing on success
1640 #          If the balloon driver is enabled but not functional because the KVM
1641 #            kernel module cannot support it, KvmMissingCap
1642 #          If no balloon device is present, DeviceNotActive
1644 # Notes: This command just issues a request to the guest.  When it returns,
1645 #        the balloon size may not have changed.  A guest can change the balloon
1646 #        size independent of this command.
1648 # Since: 0.14.0
1650 { 'command': 'balloon', 'data': {'value': 'int'} }
1653 # @Abort
1655 # This action can be used to test transaction failure.
1657 # Since: 1.6
1659 { 'struct': 'Abort',
1660   'data': { } }
1663 # @ActionCompletionMode
1665 # An enumeration of Transactional completion modes.
1667 # @individual: Do not attempt to cancel any other Actions if any Actions fail
1668 #              after the Transaction request succeeds. All Actions that
1669 #              can complete successfully will do so without waiting on others.
1670 #              This is the default.
1672 # @grouped: If any Action fails after the Transaction succeeds, cancel all
1673 #           Actions. Actions do not complete until all Actions are ready to
1674 #           complete. May be rejected by Actions that do not support this
1675 #           completion mode.
1677 # Since: 2.5
1679 { 'enum': 'ActionCompletionMode',
1680   'data': [ 'individual', 'grouped' ] }
1683 # @TransactionAction
1685 # A discriminated record of operations that can be performed with
1686 # @transaction.
1688 # Since 1.1
1690 # drive-backup since 1.6
1691 # abort since 1.6
1692 # blockdev-snapshot-internal-sync since 1.7
1693 # blockdev-backup since 2.3
1694 # blockdev-snapshot since 2.5
1695 # block-dirty-bitmap-add since 2.5
1696 # block-dirty-bitmap-clear since 2.5
1698 { 'union': 'TransactionAction',
1699   'data': {
1700        'blockdev-snapshot': 'BlockdevSnapshot',
1701        'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
1702        'drive-backup': 'DriveBackup',
1703        'blockdev-backup': 'BlockdevBackup',
1704        'abort': 'Abort',
1705        'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
1706        'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
1707        'block-dirty-bitmap-clear': 'BlockDirtyBitmap'
1708    } }
1711 # @TransactionProperties
1713 # Optional arguments to modify the behavior of a Transaction.
1715 # @completion-mode: #optional Controls how jobs launched asynchronously by
1716 #                   Actions will complete or fail as a group.
1717 #                   See @ActionCompletionMode for details.
1719 # Since: 2.5
1721 { 'struct': 'TransactionProperties',
1722   'data': {
1723        '*completion-mode': 'ActionCompletionMode'
1724   }
1728 # @transaction
1730 # Executes a number of transactionable QMP commands atomically. If any
1731 # operation fails, then the entire set of actions will be abandoned and the
1732 # appropriate error returned.
1734 # @actions: List of @TransactionAction;
1735 #           information needed for the respective operations.
1737 # @properties: #optional structure of additional options to control the
1738 #              execution of the transaction. See @TransactionProperties
1739 #              for additional detail.
1741 # Returns: nothing on success
1742 #          Errors depend on the operations of the transaction
1744 # Note: The transaction aborts on the first failure.  Therefore, there will be
1745 # information on only one failed operation returned in an error condition, and
1746 # subsequent actions will not have been attempted.
1748 # Since 1.1
1750 { 'command': 'transaction',
1751   'data': { 'actions': [ 'TransactionAction' ],
1752             '*properties': 'TransactionProperties'
1753           }
1757 # @human-monitor-command:
1759 # Execute a command on the human monitor and return the output.
1761 # @command-line: the command to execute in the human monitor
1763 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1765 # Returns: the output of the command as a string
1767 # Since: 0.14.0
1769 # Notes: This command only exists as a stop-gap.  Its use is highly
1770 #        discouraged.  The semantics of this command are not guaranteed.
1772 #        Known limitations:
1774 #        o This command is stateless, this means that commands that depend
1775 #          on state information (such as getfd) might not work
1777 #       o Commands that prompt the user for data (eg. 'cont' when the block
1778 #         device is encrypted) don't currently work
1780 { 'command': 'human-monitor-command',
1781   'data': {'command-line': 'str', '*cpu-index': 'int'},
1782   'returns': 'str' }
1785 # @migrate_cancel
1787 # Cancel the current executing migration process.
1789 # Returns: nothing on success
1791 # Notes: This command succeeds even if there is no migration process running.
1793 # Since: 0.14.0
1795 { 'command': 'migrate_cancel' }
1798 # @migrate_set_downtime
1800 # Set maximum tolerated downtime for migration.
1802 # @value: maximum downtime in seconds
1804 # Returns: nothing on success
1806 # Since: 0.14.0
1808 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1811 # @migrate_set_speed
1813 # Set maximum speed for migration.
1815 # @value: maximum speed in bytes.
1817 # Returns: nothing on success
1819 # Notes: A value lesser than zero will be automatically round up to zero.
1821 # Since: 0.14.0
1823 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1826 # @migrate-set-cache-size
1828 # Set XBZRLE cache size
1830 # @value: cache size in bytes
1832 # The size will be rounded down to the nearest power of 2.
1833 # The cache size can be modified before and during ongoing migration
1835 # Returns: nothing on success
1837 # Since: 1.2
1839 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1842 # @query-migrate-cache-size
1844 # query XBZRLE cache size
1846 # Returns: XBZRLE cache size in bytes
1848 # Since: 1.2
1850 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1853 # @ObjectPropertyInfo:
1855 # @name: the name of the property
1857 # @type: the type of the property.  This will typically come in one of four
1858 #        forms:
1860 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1861 #           These types are mapped to the appropriate JSON type.
1863 #        2) A child type in the form 'child<subtype>' where subtype is a qdev
1864 #           device type name.  Child properties create the composition tree.
1866 #        3) A link type in the form 'link<subtype>' where subtype is a qdev
1867 #           device type name.  Link properties form the device model graph.
1869 # Since: 1.2
1871 { 'struct': 'ObjectPropertyInfo',
1872   'data': { 'name': 'str', 'type': 'str' } }
1875 # @qom-list:
1877 # This command will list any properties of a object given a path in the object
1878 # model.
1880 # @path: the path within the object model.  See @qom-get for a description of
1881 #        this parameter.
1883 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1884 #          object.
1886 # Since: 1.2
1888 { 'command': 'qom-list',
1889   'data': { 'path': 'str' },
1890   'returns': [ 'ObjectPropertyInfo' ] }
1893 # @qom-get:
1895 # This command will get a property from a object model path and return the
1896 # value.
1898 # @path: The path within the object model.  There are two forms of supported
1899 #        paths--absolute and partial paths.
1901 #        Absolute paths are derived from the root object and can follow child<>
1902 #        or link<> properties.  Since they can follow link<> properties, they
1903 #        can be arbitrarily long.  Absolute paths look like absolute filenames
1904 #        and are prefixed  with a leading slash.
1906 #        Partial paths look like relative filenames.  They do not begin
1907 #        with a prefix.  The matching rules for partial paths are subtle but
1908 #        designed to make specifying objects easy.  At each level of the
1909 #        composition tree, the partial path is matched as an absolute path.
1910 #        The first match is not returned.  At least two matches are searched
1911 #        for.  A successful result is only returned if only one match is
1912 #        found.  If more than one match is found, a flag is return to
1913 #        indicate that the match was ambiguous.
1915 # @property: The property name to read
1917 # Returns: The property value.  The type depends on the property
1918 #          type. child<> and link<> properties are returned as #str
1919 #          pathnames.  All integer property types (u8, u16, etc) are
1920 #          returned as #int.
1922 # Since: 1.2
1924 { 'command': 'qom-get',
1925   'data': { 'path': 'str', 'property': 'str' },
1926   'returns': 'any' }
1929 # @qom-set:
1931 # This command will set a property from a object model path.
1933 # @path: see @qom-get for a description of this parameter
1935 # @property: the property name to set
1937 # @value: a value who's type is appropriate for the property type.  See @qom-get
1938 #         for a description of type mapping.
1940 # Since: 1.2
1942 { 'command': 'qom-set',
1943   'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
1946 # @set_password:
1948 # Sets the password of a remote display session.
1950 # @protocol: `vnc' to modify the VNC server password
1951 #            `spice' to modify the Spice server password
1953 # @password: the new password
1955 # @connected: #optional how to handle existing clients when changing the
1956 #                       password.  If nothing is specified, defaults to `keep'
1957 #                       `fail' to fail the command if clients are connected
1958 #                       `disconnect' to disconnect existing clients
1959 #                       `keep' to maintain existing clients
1961 # Returns: Nothing on success
1962 #          If Spice is not enabled, DeviceNotFound
1964 # Since: 0.14.0
1966 { 'command': 'set_password',
1967   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1970 # @expire_password:
1972 # Expire the password of a remote display server.
1974 # @protocol: the name of the remote display protocol `vnc' or `spice'
1976 # @time: when to expire the password.
1977 #        `now' to expire the password immediately
1978 #        `never' to cancel password expiration
1979 #        `+INT' where INT is the number of seconds from now (integer)
1980 #        `INT' where INT is the absolute time in seconds
1982 # Returns: Nothing on success
1983 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
1985 # Since: 0.14.0
1987 # Notes: Time is relative to the server and currently there is no way to
1988 #        coordinate server time with client time.  It is not recommended to
1989 #        use the absolute time version of the @time parameter unless you're
1990 #        sure you are on the same machine as the QEMU instance.
1992 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1995 # @change-vnc-password:
1997 # Change the VNC server password.
1999 # @password:  the new password to use with VNC authentication
2001 # Since: 1.1
2003 # Notes:  An empty password in this command will set the password to the empty
2004 #         string.  Existing clients are unaffected by executing this command.
2006 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2009 # @change:
2011 # This command is multiple commands multiplexed together.
2013 # @device: This is normally the name of a block device but it may also be 'vnc'.
2014 #          when it's 'vnc', then sub command depends on @target
2016 # @target: If @device is a block device, then this is the new filename.
2017 #          If @device is 'vnc', then if the value 'password' selects the vnc
2018 #          change password command.   Otherwise, this specifies a new server URI
2019 #          address to listen to for VNC connections.
2021 # @arg:    If @device is a block device, then this is an optional format to open
2022 #          the device with.
2023 #          If @device is 'vnc' and @target is 'password', this is the new VNC
2024 #          password to set.  If this argument is an empty string, then no future
2025 #          logins will be allowed.
2027 # Returns: Nothing on success.
2028 #          If @device is not a valid block device, DeviceNotFound
2029 #          If the new block device is encrypted, DeviceEncrypted.  Note that
2030 #          if this error is returned, the device has been opened successfully
2031 #          and an additional call to @block_passwd is required to set the
2032 #          device's password.  The behavior of reads and writes to the block
2033 #          device between when these calls are executed is undefined.
2035 # Notes:  This interface is deprecated, and it is strongly recommended that you
2036 #         avoid using it.  For changing block devices, use
2037 #         blockdev-change-medium; for changing VNC parameters, use
2038 #         change-vnc-password.
2040 # Since: 0.14.0
2042 { 'command': 'change',
2043   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2046 # @ObjectTypeInfo:
2048 # This structure describes a search result from @qom-list-types
2050 # @name: the type name found in the search
2052 # Since: 1.1
2054 # Notes: This command is experimental and may change syntax in future releases.
2056 { 'struct': 'ObjectTypeInfo',
2057   'data': { 'name': 'str' } }
2060 # @qom-list-types:
2062 # This command will return a list of types given search parameters
2064 # @implements: if specified, only return types that implement this type name
2066 # @abstract: if true, include abstract types in the results
2068 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2070 # Since: 1.1
2072 { 'command': 'qom-list-types',
2073   'data': { '*implements': 'str', '*abstract': 'bool' },
2074   'returns': [ 'ObjectTypeInfo' ] }
2077 # @DevicePropertyInfo:
2079 # Information about device properties.
2081 # @name: the name of the property
2082 # @type: the typename of the property
2083 # @description: #optional if specified, the description of the property.
2084 #               (since 2.2)
2086 # Since: 1.2
2088 { 'struct': 'DevicePropertyInfo',
2089   'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
2092 # @device-list-properties:
2094 # List properties associated with a device.
2096 # @typename: the type name of a device
2098 # Returns: a list of DevicePropertyInfo describing a devices properties
2100 # Since: 1.2
2102 { 'command': 'device-list-properties',
2103   'data': { 'typename': 'str'},
2104   'returns': [ 'DevicePropertyInfo' ] }
2107 # @migrate
2109 # Migrates the current running guest to another Virtual Machine.
2111 # @uri: the Uniform Resource Identifier of the destination VM
2113 # @blk: #optional do block migration (full disk copy)
2115 # @inc: #optional incremental disk copy migration
2117 # @detach: this argument exists only for compatibility reasons and
2118 #          is ignored by QEMU
2120 # Returns: nothing on success
2122 # Since: 0.14.0
2124 { 'command': 'migrate',
2125   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2128 # @migrate-incoming
2130 # Start an incoming migration, the qemu must have been started
2131 # with -incoming defer
2133 # @uri: The Uniform Resource Identifier identifying the source or
2134 #       address to listen on
2136 # Returns: nothing on success
2138 # Since: 2.3
2139 # Note: It's a bad idea to use a string for the uri, but it needs to stay
2140 # compatible with -incoming and the format of the uri is already exposed
2141 # above libvirt
2143 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
2145 # @xen-save-devices-state:
2147 # Save the state of all devices to file. The RAM and the block devices
2148 # of the VM are not saved by this command.
2150 # @filename: the file to save the state of the devices to as binary
2151 # data. See xen-save-devices-state.txt for a description of the binary
2152 # format.
2154 # Returns: Nothing on success
2156 # Since: 1.1
2158 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2161 # @xen-set-global-dirty-log
2163 # Enable or disable the global dirty log mode.
2165 # @enable: true to enable, false to disable.
2167 # Returns: nothing
2169 # Since: 1.3
2171 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2174 # @device_add:
2176 # @driver: the name of the new device's driver
2178 # @bus: #optional the device's parent bus (device tree path)
2180 # @id: the device's ID, must be unique
2182 # Additional arguments depend on the type.
2184 # Add a device.
2186 # Notes:
2187 # 1. For detailed information about this command, please refer to the
2188 #    'docs/qdev-device-use.txt' file.
2190 # 2. It's possible to list device properties by running QEMU with the
2191 #    "-device DEVICE,help" command-line argument, where DEVICE is the
2192 #    device's name
2194 # Example:
2196 # -> { "execute": "device_add",
2197 #      "arguments": { "driver": "e1000", "id": "net1",
2198 #                     "bus": "pci.0",
2199 #                     "mac": "52:54:00:12:34:56" } }
2200 # <- { "return": {} }
2202 # TODO This command effectively bypasses QAPI completely due to its
2203 # "additional arguments" business.  It shouldn't have been added to
2204 # the schema in this form.  It should be qapified properly, or
2205 # replaced by a properly qapified command.
2207 # Since: 0.13
2209 { 'command': 'device_add',
2210   'data': {'driver': 'str', 'id': 'str'},
2211   'gen': false } # so we can get the additional arguments
2214 # @device_del:
2216 # Remove a device from a guest
2218 # @id: the name or QOM path of the device
2220 # Returns: Nothing on success
2221 #          If @id is not a valid device, DeviceNotFound
2223 # Notes: When this command completes, the device may not be removed from the
2224 #        guest.  Hot removal is an operation that requires guest cooperation.
2225 #        This command merely requests that the guest begin the hot removal
2226 #        process.  Completion of the device removal process is signaled with a
2227 #        DEVICE_DELETED event. Guest reset will automatically complete removal
2228 #        for all devices.
2230 # Since: 0.14.0
2232 { 'command': 'device_del', 'data': {'id': 'str'} }
2235 # @DumpGuestMemoryFormat:
2237 # An enumeration of guest-memory-dump's format.
2239 # @elf: elf format
2241 # @kdump-zlib: kdump-compressed format with zlib-compressed
2243 # @kdump-lzo: kdump-compressed format with lzo-compressed
2245 # @kdump-snappy: kdump-compressed format with snappy-compressed
2247 # Since: 2.0
2249 { 'enum': 'DumpGuestMemoryFormat',
2250   'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
2253 # @dump-guest-memory
2255 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2256 # very long depending on the amount of guest memory.
2258 # @paging: if true, do paging to get guest's memory mapping. This allows
2259 #          using gdb to process the core file.
2261 #          IMPORTANT: this option can make QEMU allocate several gigabytes
2262 #                     of RAM. This can happen for a large guest, or a
2263 #                     malicious guest pretending to be large.
2265 #          Also, paging=true has the following limitations:
2267 #             1. The guest may be in a catastrophic state or can have corrupted
2268 #                memory, which cannot be trusted
2269 #             2. The guest can be in real-mode even if paging is enabled. For
2270 #                example, the guest uses ACPI to sleep, and ACPI sleep state
2271 #                goes in real-mode
2272 #             3. Currently only supported on i386 and x86_64.
2274 # @protocol: the filename or file descriptor of the vmcore. The supported
2275 #            protocols are:
2277 #            1. file: the protocol starts with "file:", and the following
2278 #               string is the file's path.
2279 #            2. fd: the protocol starts with "fd:", and the following string
2280 #               is the fd's name.
2282 # @detach: #optional if true, QMP will return immediately rather than
2283 #          waiting for the dump to finish. The user can track progress
2284 #          using "query-dump". (since 2.6).
2286 # @begin: #optional if specified, the starting physical address.
2288 # @length: #optional if specified, the memory size, in bytes. If you don't
2289 #          want to dump all guest's memory, please specify the start @begin
2290 #          and @length
2292 # @format: #optional if specified, the format of guest memory dump. But non-elf
2293 #          format is conflict with paging and filter, ie. @paging, @begin and
2294 #          @length is not allowed to be specified with non-elf @format at the
2295 #          same time (since 2.0)
2297 # Returns: nothing on success
2299 # Since: 1.2
2301 { 'command': 'dump-guest-memory',
2302   'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
2303             '*begin': 'int', '*length': 'int',
2304             '*format': 'DumpGuestMemoryFormat'} }
2307 # @DumpStatus
2309 # Describe the status of a long-running background guest memory dump.
2311 # @none: no dump-guest-memory has started yet.
2313 # @active: there is one dump running in background.
2315 # @completed: the last dump has finished successfully.
2317 # @failed: the last dump has failed.
2319 # Since 2.6
2321 { 'enum': 'DumpStatus',
2322   'data': [ 'none', 'active', 'completed', 'failed' ] }
2325 # @DumpQueryResult
2327 # The result format for 'query-dump'.
2329 # @status: enum of @DumpStatus, which shows current dump status
2331 # @completed: bytes written in latest dump (uncompressed)
2333 # @total: total bytes to be written in latest dump (uncompressed)
2335 # Since 2.6
2337 { 'struct': 'DumpQueryResult',
2338   'data': { 'status': 'DumpStatus',
2339             'completed': 'int',
2340             'total': 'int' } }
2343 # @query-dump
2345 # Query latest dump status.
2347 # Returns: A @DumpStatus object showing the dump status.
2349 # Since: 2.6
2351 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
2354 # @DumpGuestMemoryCapability:
2356 # A list of the available formats for dump-guest-memory
2358 # Since: 2.0
2360 { 'struct': 'DumpGuestMemoryCapability',
2361   'data': {
2362       'formats': ['DumpGuestMemoryFormat'] } }
2365 # @query-dump-guest-memory-capability:
2367 # Returns the available formats for dump-guest-memory
2369 # Returns:  A @DumpGuestMemoryCapability object listing available formats for
2370 #           dump-guest-memory
2372 # Since: 2.0
2374 { 'command': 'query-dump-guest-memory-capability',
2375   'returns': 'DumpGuestMemoryCapability' }
2378 # @dump-skeys
2380 # Dump guest's storage keys
2382 # @filename: the path to the file to dump to
2384 # This command is only supported on s390 architecture.
2386 # Since: 2.5
2388 { 'command': 'dump-skeys',
2389   'data': { 'filename': 'str' } }
2392 # @netdev_add:
2394 # Add a network backend.
2396 # @type: the type of network backend.  Current valid values are 'user', 'tap',
2397 #        'vde', 'socket', 'dump' and 'bridge'
2399 # @id: the name of the new network backend
2401 # Additional arguments depend on the type.
2403 # TODO This command effectively bypasses QAPI completely due to its
2404 # "additional arguments" business.  It shouldn't have been added to
2405 # the schema in this form.  It should be qapified properly, or
2406 # replaced by a properly qapified command.
2408 # Since: 0.14.0
2410 # Returns: Nothing on success
2411 #          If @type is not a valid network backend, DeviceNotFound
2413 { 'command': 'netdev_add',
2414   'data': {'type': 'str', 'id': 'str'},
2415   'gen': false }                # so we can get the additional arguments
2418 # @netdev_del:
2420 # Remove a network backend.
2422 # @id: the name of the network backend to remove
2424 # Returns: Nothing on success
2425 #          If @id is not a valid network backend, DeviceNotFound
2427 # Since: 0.14.0
2429 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2432 # @object-add:
2434 # Create a QOM object.
2436 # @qom-type: the class name for the object to be created
2438 # @id: the name of the new object
2440 # @props: #optional a dictionary of properties to be passed to the backend
2442 # Returns: Nothing on success
2443 #          Error if @qom-type is not a valid class name
2445 # Since: 2.0
2447 { 'command': 'object-add',
2448   'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
2451 # @object-del:
2453 # Remove a QOM object.
2455 # @id: the name of the QOM object to remove
2457 # Returns: Nothing on success
2458 #          Error if @id is not a valid id for a QOM object
2460 # Since: 2.0
2462 { 'command': 'object-del', 'data': {'id': 'str'} }
2465 # @NetdevNoneOptions
2467 # Use it alone to have zero network devices.
2469 # Since 1.2
2471 { 'struct': 'NetdevNoneOptions',
2472   'data': { } }
2475 # @NetLegacyNicOptions
2477 # Create a new Network Interface Card.
2479 # @netdev: #optional id of -netdev to connect to
2481 # @macaddr: #optional MAC address
2483 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2485 # @addr: #optional PCI device address
2487 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2489 # Since 1.2
2491 { 'struct': 'NetLegacyNicOptions',
2492   'data': {
2493     '*netdev':  'str',
2494     '*macaddr': 'str',
2495     '*model':   'str',
2496     '*addr':    'str',
2497     '*vectors': 'uint32' } }
2500 # @String
2502 # A fat type wrapping 'str', to be embedded in lists.
2504 # Since 1.2
2506 { 'struct': 'String',
2507   'data': {
2508     'str': 'str' } }
2511 # @NetdevUserOptions
2513 # Use the user mode network stack which requires no administrator privilege to
2514 # run.
2516 # @hostname: #optional client hostname reported by the builtin DHCP server
2518 # @restrict: #optional isolate the guest from the host
2520 # @ipv4: #optional whether to support IPv4, default true for enabled
2521 #        (since 2.6)
2523 # @ipv6: #optional whether to support IPv6, default true for enabled
2524 #        (since 2.6)
2526 # @ip: #optional legacy parameter, use net= instead
2528 # @net: #optional IP network address that the guest will see, in the
2529 #       form addr[/netmask] The netmask is optional, and can be
2530 #       either in the form a.b.c.d or as a number of valid top-most
2531 #       bits. Default is 10.0.2.0/24.
2533 # @host: #optional guest-visible address of the host
2535 # @tftp: #optional root directory of the built-in TFTP server
2537 # @bootfile: #optional BOOTP filename, for use with tftp=
2539 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2540 #             assign
2542 # @dns: #optional guest-visible address of the virtual nameserver
2544 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2545 #             to the guest
2547 # @ipv6-prefix: #optional IPv6 network prefix (default is fec0::) (since
2548 #               2.6). The network prefix is given in the usual
2549 #               hexadecimal IPv6 address notation.
2551 # @ipv6-prefixlen: #optional IPv6 network prefix length (default is 64)
2552 #                  (since 2.6)
2554 # @ipv6-host: #optional guest-visible IPv6 address of the host (since 2.6)
2556 # @ipv6-dns: #optional guest-visible IPv6 address of the virtual
2557 #            nameserver (since 2.6)
2559 # @smb: #optional root directory of the built-in SMB server
2561 # @smbserver: #optional IP address of the built-in SMB server
2563 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2564 #           endpoints
2566 # @guestfwd: #optional forward guest TCP connections
2568 # Since 1.2
2570 { 'struct': 'NetdevUserOptions',
2571   'data': {
2572     '*hostname':  'str',
2573     '*restrict':  'bool',
2574     '*ipv4':      'bool',
2575     '*ipv6':      'bool',
2576     '*ip':        'str',
2577     '*net':       'str',
2578     '*host':      'str',
2579     '*tftp':      'str',
2580     '*bootfile':  'str',
2581     '*dhcpstart': 'str',
2582     '*dns':       'str',
2583     '*dnssearch': ['String'],
2584     '*ipv6-prefix':      'str',
2585     '*ipv6-prefixlen':   'int',
2586     '*ipv6-host':        'str',
2587     '*ipv6-dns':         'str',
2588     '*smb':       'str',
2589     '*smbserver': 'str',
2590     '*hostfwd':   ['String'],
2591     '*guestfwd':  ['String'] } }
2594 # @NetdevTapOptions
2596 # Connect the host TAP network interface name to the VLAN.
2598 # @ifname: #optional interface name
2600 # @fd: #optional file descriptor of an already opened tap
2602 # @fds: #optional multiple file descriptors of already opened multiqueue capable
2603 # tap
2605 # @script: #optional script to initialize the interface
2607 # @downscript: #optional script to shut down the interface
2609 # @br: #optional bridge name (since 2.8)
2611 # @helper: #optional command to execute to configure bridge
2613 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2615 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2617 # @vhost: #optional enable vhost-net network accelerator
2619 # @vhostfd: #optional file descriptor of an already opened vhost net device
2621 # @vhostfds: #optional file descriptors of multiple already opened vhost net
2622 # devices
2624 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2626 # @queues: #optional number of queues to be created for multiqueue capable tap
2628 # @poll-us: #optional maximum number of microseconds that could
2629 # be spent on busy polling for tap (since 2.7)
2631 # Since 1.2
2633 { 'struct': 'NetdevTapOptions',
2634   'data': {
2635     '*ifname':     'str',
2636     '*fd':         'str',
2637     '*fds':        'str',
2638     '*script':     'str',
2639     '*downscript': 'str',
2640     '*br':         'str',
2641     '*helper':     'str',
2642     '*sndbuf':     'size',
2643     '*vnet_hdr':   'bool',
2644     '*vhost':      'bool',
2645     '*vhostfd':    'str',
2646     '*vhostfds':   'str',
2647     '*vhostforce': 'bool',
2648     '*queues':     'uint32',
2649     '*poll-us':    'uint32'} }
2652 # @NetdevSocketOptions
2654 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2655 # socket connection.
2657 # @fd: #optional file descriptor of an already opened socket
2659 # @listen: #optional port number, and optional hostname, to listen on
2661 # @connect: #optional port number, and optional hostname, to connect to
2663 # @mcast: #optional UDP multicast address and port number
2665 # @localaddr: #optional source address and port for multicast and udp packets
2667 # @udp: #optional UDP unicast address and port number
2669 # Since 1.2
2671 { 'struct': 'NetdevSocketOptions',
2672   'data': {
2673     '*fd':        'str',
2674     '*listen':    'str',
2675     '*connect':   'str',
2676     '*mcast':     'str',
2677     '*localaddr': 'str',
2678     '*udp':       'str' } }
2681 # @NetdevL2TPv3Options
2683 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
2685 # @src: source address
2687 # @dst: destination address
2689 # @srcport: #optional source port - mandatory for udp, optional for ip
2691 # @dstport: #optional destination port - mandatory for udp, optional for ip
2693 # @ipv6: #optional - force the use of ipv6
2695 # @udp: #optional - use the udp version of l2tpv3 encapsulation
2697 # @cookie64: #optional - use 64 bit coookies
2699 # @counter: #optional have sequence counter
2701 # @pincounter: #optional pin sequence counter to zero -
2702 #              workaround for buggy implementations or
2703 #              networks with packet reorder
2705 # @txcookie: #optional 32 or 64 bit transmit cookie
2707 # @rxcookie: #optional 32 or 64 bit receive cookie
2709 # @txsession: 32 bit transmit session
2711 # @rxsession: #optional 32 bit receive session - if not specified
2712 #             set to the same value as transmit
2714 # @offset: #optional additional offset - allows the insertion of
2715 #          additional application-specific data before the packet payload
2717 # Since 2.1
2719 { 'struct': 'NetdevL2TPv3Options',
2720   'data': {
2721     'src':          'str',
2722     'dst':          'str',
2723     '*srcport':     'str',
2724     '*dstport':     'str',
2725     '*ipv6':        'bool',
2726     '*udp':         'bool',
2727     '*cookie64':    'bool',
2728     '*counter':     'bool',
2729     '*pincounter':  'bool',
2730     '*txcookie':    'uint64',
2731     '*rxcookie':    'uint64',
2732     'txsession':    'uint32',
2733     '*rxsession':   'uint32',
2734     '*offset':      'uint32' } }
2737 # @NetdevVdeOptions
2739 # Connect the VLAN to a vde switch running on the host.
2741 # @sock: #optional socket path
2743 # @port: #optional port number
2745 # @group: #optional group owner of socket
2747 # @mode: #optional permissions for socket
2749 # Since 1.2
2751 { 'struct': 'NetdevVdeOptions',
2752   'data': {
2753     '*sock':  'str',
2754     '*port':  'uint16',
2755     '*group': 'str',
2756     '*mode':  'uint16' } }
2759 # @NetdevDumpOptions
2761 # Dump VLAN network traffic to a file.
2763 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2764 # suffixes.
2766 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2768 # Since 1.2
2770 { 'struct': 'NetdevDumpOptions',
2771   'data': {
2772     '*len':  'size',
2773     '*file': 'str' } }
2776 # @NetdevBridgeOptions
2778 # Connect a host TAP network interface to a host bridge device.
2780 # @br: #optional bridge name
2782 # @helper: #optional command to execute to configure bridge
2784 # Since 1.2
2786 { 'struct': 'NetdevBridgeOptions',
2787   'data': {
2788     '*br':     'str',
2789     '*helper': 'str' } }
2792 # @NetdevHubPortOptions
2794 # Connect two or more net clients through a software hub.
2796 # @hubid: hub identifier number
2798 # Since 1.2
2800 { 'struct': 'NetdevHubPortOptions',
2801   'data': {
2802     'hubid':     'int32' } }
2805 # @NetdevNetmapOptions
2807 # Connect a client to a netmap-enabled NIC or to a VALE switch port
2809 # @ifname: Either the name of an existing network interface supported by
2810 #          netmap, or the name of a VALE port (created on the fly).
2811 #          A VALE port name is in the form 'valeXXX:YYY', where XXX and
2812 #          YYY are non-negative integers. XXX identifies a switch and
2813 #          YYY identifies a port of the switch. VALE ports having the
2814 #          same XXX are therefore connected to the same switch.
2816 # @devname: #optional path of the netmap device (default: '/dev/netmap').
2818 # Since 2.0
2820 { 'struct': 'NetdevNetmapOptions',
2821   'data': {
2822     'ifname':     'str',
2823     '*devname':    'str' } }
2826 # @NetdevVhostUserOptions
2828 # Vhost-user network backend
2830 # @chardev: name of a unix socket chardev
2832 # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
2834 # @queues: #optional number of queues to be created for multiqueue vhost-user
2835 #          (default: 1) (Since 2.5)
2837 # Since 2.1
2839 { 'struct': 'NetdevVhostUserOptions',
2840   'data': {
2841     'chardev':        'str',
2842     '*vhostforce':    'bool',
2843     '*queues':        'int' } }
2846 # @NetClientDriver
2848 # Available netdev drivers.
2850 # Since 2.7
2852 { 'enum': 'NetClientDriver',
2853   'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
2854             'bridge', 'hubport', 'netmap', 'vhost-user' ] }
2857 # @Netdev
2859 # Captures the configuration of a network device.
2861 # @id: identifier for monitor commands.
2863 # @type: Specify the driver used for interpreting remaining arguments.
2865 # Since 1.2
2867 # 'l2tpv3' - since 2.1
2869 { 'union': 'Netdev',
2870   'base': { 'id': 'str', 'type': 'NetClientDriver' },
2871   'discriminator': 'type',
2872   'data': {
2873     'none':     'NetdevNoneOptions',
2874     'nic':      'NetLegacyNicOptions',
2875     'user':     'NetdevUserOptions',
2876     'tap':      'NetdevTapOptions',
2877     'l2tpv3':   'NetdevL2TPv3Options',
2878     'socket':   'NetdevSocketOptions',
2879     'vde':      'NetdevVdeOptions',
2880     'dump':     'NetdevDumpOptions',
2881     'bridge':   'NetdevBridgeOptions',
2882     'hubport':  'NetdevHubPortOptions',
2883     'netmap':   'NetdevNetmapOptions',
2884     'vhost-user': 'NetdevVhostUserOptions' } }
2887 # @NetLegacy
2889 # Captures the configuration of a network device; legacy.
2891 # @vlan: #optional vlan number
2893 # @id: #optional identifier for monitor commands
2895 # @name: #optional identifier for monitor commands, ignored if @id is present
2897 # @opts: device type specific properties (legacy)
2899 # Since 1.2
2901 { 'struct': 'NetLegacy',
2902   'data': {
2903     '*vlan': 'int32',
2904     '*id':   'str',
2905     '*name': 'str',
2906     'opts':  'NetLegacyOptions' } }
2909 # @NetLegacyOptions
2911 # Like Netdev, but for use only by the legacy command line options
2913 # Since 1.2
2915 { 'union': 'NetLegacyOptions',
2916   'data': {
2917     'none':     'NetdevNoneOptions',
2918     'nic':      'NetLegacyNicOptions',
2919     'user':     'NetdevUserOptions',
2920     'tap':      'NetdevTapOptions',
2921     'l2tpv3':   'NetdevL2TPv3Options',
2922     'socket':   'NetdevSocketOptions',
2923     'vde':      'NetdevVdeOptions',
2924     'dump':     'NetdevDumpOptions',
2925     'bridge':   'NetdevBridgeOptions',
2926     'netmap':   'NetdevNetmapOptions',
2927     'vhost-user': 'NetdevVhostUserOptions' } }
2930 # @NetFilterDirection
2932 # Indicates whether a netfilter is attached to a netdev's transmit queue or
2933 # receive queue or both.
2935 # @all: the filter is attached both to the receive and the transmit
2936 #       queue of the netdev (default).
2938 # @rx: the filter is attached to the receive queue of the netdev,
2939 #      where it will receive packets sent to the netdev.
2941 # @tx: the filter is attached to the transmit queue of the netdev,
2942 #      where it will receive packets sent by the netdev.
2944 # Since 2.5
2946 { 'enum': 'NetFilterDirection',
2947   'data': [ 'all', 'rx', 'tx' ] }
2950 # @InetSocketAddress
2952 # Captures a socket address or address range in the Internet namespace.
2954 # @host: host part of the address
2956 # @port: port part of the address, or lowest port if @to is present
2958 # @to: highest port to try
2960 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2961 #        #optional
2963 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2964 #        #optional
2966 # Since 1.3
2968 { 'struct': 'InetSocketAddress',
2969   'data': {
2970     'host': 'str',
2971     'port': 'str',
2972     '*to': 'uint16',
2973     '*ipv4': 'bool',
2974     '*ipv6': 'bool' } }
2977 # @UnixSocketAddress
2979 # Captures a socket address in the local ("Unix socket") namespace.
2981 # @path: filesystem path to use
2983 # Since 1.3
2985 { 'struct': 'UnixSocketAddress',
2986   'data': {
2987     'path': 'str' } }
2990 # @SocketAddress
2992 # Captures the address of a socket, which could also be a named file descriptor
2994 # Since 1.3
2996 { 'union': 'SocketAddress',
2997   'data': {
2998     'inet': 'InetSocketAddress',
2999     'unix': 'UnixSocketAddress',
3000     'fd': 'String' } }
3003 # @getfd:
3005 # Receive a file descriptor via SCM rights and assign it a name
3007 # @fdname: file descriptor name
3009 # Returns: Nothing on success
3011 # Since: 0.14.0
3013 # Notes: If @fdname already exists, the file descriptor assigned to
3014 #        it will be closed and replaced by the received file
3015 #        descriptor.
3016 #        The 'closefd' command can be used to explicitly close the
3017 #        file descriptor when it is no longer needed.
3019 { 'command': 'getfd', 'data': {'fdname': 'str'} }
3022 # @closefd:
3024 # Close a file descriptor previously passed via SCM rights
3026 # @fdname: file descriptor name
3028 # Returns: Nothing on success
3030 # Since: 0.14.0
3032 { 'command': 'closefd', 'data': {'fdname': 'str'} }
3035 # @MachineInfo:
3037 # Information describing a machine.
3039 # @name: the name of the machine
3041 # @alias: #optional an alias for the machine name
3043 # @default: #optional whether the machine is default
3045 # @cpu-max: maximum number of CPUs supported by the machine type
3046 #           (since 1.5.0)
3048 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
3050 # Since: 1.2.0
3052 { 'struct': 'MachineInfo',
3053   'data': { 'name': 'str', '*alias': 'str',
3054             '*is-default': 'bool', 'cpu-max': 'int',
3055             'hotpluggable-cpus': 'bool'} }
3058 # @query-machines:
3060 # Return a list of supported machines
3062 # Returns: a list of MachineInfo
3064 # Since: 1.2.0
3066 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
3069 # @CpuDefinitionInfo:
3071 # Virtual CPU definition.
3073 # @name: the name of the CPU definition
3075 # @migration-safe: #optional whether a CPU definition can be safely used for
3076 #                  migration in combination with a QEMU compatibility machine
3077 #                  when migrating between different QMU versions and between
3078 #                  hosts with different sets of (hardware or software)
3079 #                  capabilities. If not provided, information is not available
3080 #                  and callers should not assume the CPU definition to be
3081 #                  migration-safe. (since 2.8)
3083 # @static: whether a CPU definition is static and will not change depending on
3084 #          QEMU version, machine type, machine options and accelerator options.
3085 #          A static model is always migration-safe. (since 2.8)
3087 # Since: 1.2.0
3089 { 'struct': 'CpuDefinitionInfo',
3090   'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool' } }
3093 # @query-cpu-definitions:
3095 # Return a list of supported virtual CPU definitions
3097 # Returns: a list of CpuDefInfo
3099 # Since: 1.2.0
3101 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3104 # @CpuModelInfo:
3106 # Virtual CPU model.
3108 # A CPU model consists of the name of a CPU definition, to which
3109 # delta changes are applied (e.g. features added/removed). Most magic values
3110 # that an architecture might require should be hidden behind the name.
3111 # However, if required, architectures can expose relevant properties.
3113 # @name: the name of the CPU definition the model is based on
3114 # @props: #optional a dictionary of QOM properties to be applied
3116 # Since: 2.8.0
3118 { 'struct': 'CpuModelInfo',
3119   'data': { 'name': 'str',
3120             '*props': 'any' } }
3123 # @CpuModelExpansionType
3125 # An enumeration of CPU model expansion types.
3127 # @static: Expand to a static CPU model, a combination of a static base
3128 #          model name and property delta changes. As the static base model will
3129 #          never change, the expanded CPU model will be the same, independant of
3130 #          independent of QEMU version, machine type, machine options, and
3131 #          accelerator options. Therefore, the resulting model can be used by
3132 #          tooling without having to specify a compatibility machine - e.g. when
3133 #          displaying the "host" model. static CPU models are migration-safe.
3135 # @full: Expand all properties. The produced model is not guaranteed to be
3136 #        migration-safe, but allows tooling to get an insight and work with
3137 #        model details.
3139 # Since: 2.8.0
3141 { 'enum': 'CpuModelExpansionType',
3142   'data': [ 'static', 'full' ] }
3146 # @CpuModelExpansionInfo
3148 # The result of a cpu model expansion.
3150 # @model: the expanded CpuModelInfo.
3152 # Since: 2.8.0
3154 { 'struct': 'CpuModelExpansionInfo',
3155   'data': { 'model': 'CpuModelInfo' } }
3159 # @query-cpu-model-expansion:
3161 # Expands a given CPU model (or a combination of CPU model + additional options)
3162 # to different granularities, allowing tooling to get an understanding what a
3163 # specific CPU model looks like in QEMU under a certain configuration.
3165 # This interface can be used to query the "host" CPU model.
3167 # The data returned by this command may be affected by:
3169 # * QEMU version: CPU models may look different depending on the QEMU version.
3170 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3171 # * machine-type: CPU model  may look different depending on the machine-type.
3172 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3173 # * machine options (including accelerator): in some architectures, CPU models
3174 #   may look different depending on machine and accelerator options. (Except for
3175 #   CPU models reported as "static" in query-cpu-definitions.)
3176 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3177 #   global properties may affect expansion of CPU models. Using
3178 #   query-cpu-model-expansion while using these is not advised.
3180 # Some architectures may not support all expansion types. s390x supports
3181 # "full" and "static".
3183 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
3184 #          not supported, if the model cannot be expanded, if the model contains
3185 #          an unknown CPU definition name, unknown properties or properties
3186 #          with a wrong type. Also returns an error if an expansion type is
3187 #          not supported.
3189 # Since: 2.8.0
3191 { 'command': 'query-cpu-model-expansion',
3192   'data': { 'type': 'CpuModelExpansionType',
3193             'model': 'CpuModelInfo' },
3194   'returns': 'CpuModelExpansionInfo' }
3197 # @CpuModelCompareResult:
3199 # An enumeration of CPU model comparation results. The result is usually
3200 # calculated using e.g. CPU features or CPU generations.
3202 # @incompatible: If model A is incompatible to model B, model A is not
3203 #                guaranteed to run where model B runs and the other way around.
3205 # @identical: If model A is identical to model B, model A is guaranteed to run
3206 #             where model B runs and the other way around.
3208 # @superset: If model A is a superset of model B, model B is guaranteed to run
3209 #            where model A runs. There are no guarantees about the other way.
3211 # @subset: If model A is a subset of model B, model A is guaranteed to run
3212 #          where model B runs. There are no guarantees about the other way.
3214 # Since: 2.8.0
3216 { 'enum': 'CpuModelCompareResult',
3217   'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
3220 # @CpuModelCompareInfo
3222 # The result of a CPU model comparison.
3224 # @result: The result of the compare operation.
3225 # @responsible-properties: List of properties that led to the comparison result
3226 #                          not being identical.
3228 # @responsible-properties is a list of QOM property names that led to
3229 # both CPUs not being detected as identical. For identical models, this
3230 # list is empty.
3231 # If a QOM property is read-only, that means there's no known way to make the
3232 # CPU models identical. If the special property name "type" is included, the
3233 # models are by definition not identical and cannot be made identical.
3235 # Since: 2.8.0
3237 { 'struct': 'CpuModelCompareInfo',
3238   'data': {'result': 'CpuModelCompareResult',
3239            'responsible-properties': ['str']
3240           }
3244 # @query-cpu-model-comparison:
3246 # Compares two CPU models, returning how they compare in a specific
3247 # configuration. The results indicates how both models compare regarding
3248 # runnability. This result can be used by tooling to make decisions if a
3249 # certain CPU model will run in a certain configuration or if a compatible
3250 # CPU model has to be created by baselining.
3252 # Usually, a CPU model is compared against the maximum possible CPU model
3253 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
3254 # model is identical or a subset, it will run in that configuration.
3256 # The result returned by this command may be affected by:
3258 # * QEMU version: CPU models may look different depending on the QEMU version.
3259 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3260 # * machine-type: CPU model may look different depending on the machine-type.
3261 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3262 # * machine options (including accelerator): in some architectures, CPU models
3263 #   may look different depending on machine and accelerator options. (Except for
3264 #   CPU models reported as "static" in query-cpu-definitions.)
3265 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3266 #   global properties may affect expansion of CPU models. Using
3267 #   query-cpu-model-expansion while using these is not advised.
3269 # Some architectures may not support comparing CPU models. s390x supports
3270 # comparing CPU models.
3272 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
3273 #          not supported, if a model cannot be used, if a model contains
3274 #          an unknown cpu definition name, unknown properties or properties
3275 #          with wrong types.
3277 # Since: 2.8.0
3279 { 'command': 'query-cpu-model-comparison',
3280   'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
3281   'returns': 'CpuModelCompareInfo' }
3284 # @CpuModelBaselineInfo
3286 # The result of a CPU model baseline.
3288 # @model: the baselined CpuModelInfo.
3290 # Since: 2.8.0
3292 { 'struct': 'CpuModelBaselineInfo',
3293   'data': { 'model': 'CpuModelInfo' } }
3296 # @query-cpu-model-baseline:
3298 # Baseline two CPU models, creating a compatible third model. The created
3299 # model will always be a static, migration-safe CPU model (see "static"
3300 # CPU model expansion for details).
3302 # This interface can be used by tooling to create a compatible CPU model out
3303 # two CPU models. The created CPU model will be identical to or a subset of
3304 # both CPU models when comparing them. Therefore, the created CPU model is
3305 # guaranteed to run where the given CPU models run.
3307 # The result returned by this command may be affected by:
3309 # * QEMU version: CPU models may look different depending on the QEMU version.
3310 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3311 # * machine-type: CPU model may look different depending on the machine-type.
3312 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
3313 # * machine options (including accelerator): in some architectures, CPU models
3314 #   may look different depending on machine and accelerator options. (Except for
3315 #   CPU models reported as "static" in query-cpu-definitions.)
3316 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3317 #   global properties may affect expansion of CPU models. Using
3318 #   query-cpu-model-expansion while using these is not advised.
3320 # Some architectures may not support baselining CPU models. s390x supports
3321 # baselining CPU models.
3323 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
3324 #          not supported, if a model cannot be used, if a model contains
3325 #          an unknown cpu definition name, unknown properties or properties
3326 #          with wrong types.
3328 # Since: 2.8.0
3330 { 'command': 'query-cpu-model-baseline',
3331   'data': { 'modela': 'CpuModelInfo',
3332             'modelb': 'CpuModelInfo' },
3333   'returns': 'CpuModelBaselineInfo' }
3335 # @AddfdInfo:
3337 # Information about a file descriptor that was added to an fd set.
3339 # @fdset-id: The ID of the fd set that @fd was added to.
3341 # @fd: The file descriptor that was received via SCM rights and
3342 #      added to the fd set.
3344 # Since: 1.2.0
3346 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3349 # @add-fd:
3351 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3353 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3355 # @opaque: #optional A free-form string that can be used to describe the fd.
3357 # Returns: @AddfdInfo on success
3358 #          If file descriptor was not received, FdNotSupplied
3359 #          If @fdset-id is a negative value, InvalidParameterValue
3361 # Notes: The list of fd sets is shared by all monitor connections.
3363 #        If @fdset-id is not specified, a new fd set will be created.
3365 # Since: 1.2.0
3367 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3368   'returns': 'AddfdInfo' }
3371 # @remove-fd:
3373 # Remove a file descriptor from an fd set.
3375 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3377 # @fd: #optional The file descriptor that is to be removed.
3379 # Returns: Nothing on success
3380 #          If @fdset-id or @fd is not found, FdNotFound
3382 # Since: 1.2.0
3384 # Notes: The list of fd sets is shared by all monitor connections.
3386 #        If @fd is not specified, all file descriptors in @fdset-id
3387 #        will be removed.
3389 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3392 # @FdsetFdInfo:
3394 # Information about a file descriptor that belongs to an fd set.
3396 # @fd: The file descriptor value.
3398 # @opaque: #optional A free-form string that can be used to describe the fd.
3400 # Since: 1.2.0
3402 { 'struct': 'FdsetFdInfo',
3403   'data': {'fd': 'int', '*opaque': 'str'} }
3406 # @FdsetInfo:
3408 # Information about an fd set.
3410 # @fdset-id: The ID of the fd set.
3412 # @fds: A list of file descriptors that belong to this fd set.
3414 # Since: 1.2.0
3416 { 'struct': 'FdsetInfo',
3417   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3420 # @query-fdsets:
3422 # Return information describing all fd sets.
3424 # Returns: A list of @FdsetInfo
3426 # Since: 1.2.0
3428 # Note: The list of fd sets is shared by all monitor connections.
3431 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3434 # @TargetInfo:
3436 # Information describing the QEMU target.
3438 # @arch: the target architecture (eg "x86_64", "i386", etc)
3440 # Since: 1.2.0
3442 { 'struct': 'TargetInfo',
3443   'data': { 'arch': 'str' } }
3446 # @query-target:
3448 # Return information about the target for this QEMU
3450 # Returns: TargetInfo
3452 # Since: 1.2.0
3454 { 'command': 'query-target', 'returns': 'TargetInfo' }
3457 # @QKeyCode:
3459 # An enumeration of key name.
3461 # This is used by the send-key command.
3463 # Since: 1.3.0
3465 # 'unmapped' and 'pause' since 2.0
3466 # 'ro' and 'kp_comma' since 2.4
3467 # 'kp_equals' and 'power' since 2.6
3469 { 'enum': 'QKeyCode',
3470   'data': [ 'unmapped',
3471             'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3472             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3473             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3474             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3475             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3476             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3477             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3478             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3479             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3480             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3481             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3482             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3483             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3484             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3485             'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro',
3486             'kp_comma', 'kp_equals', 'power' ] }
3489 # @KeyValue
3491 # Represents a keyboard key.
3493 # Since: 1.3.0
3495 { 'union': 'KeyValue',
3496   'data': {
3497     'number': 'int',
3498     'qcode': 'QKeyCode' } }
3501 # @send-key:
3503 # Send keys to guest.
3505 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3506 #        simultaneously sent to the guest. A @KeyValue.number value is sent
3507 #        directly to the guest, while @KeyValue.qcode must be a valid
3508 #        @QKeyCode value
3510 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3511 #             to 100
3513 # Returns: Nothing on success
3514 #          If key is unknown or redundant, InvalidParameter
3516 # Since: 1.3.0
3519 { 'command': 'send-key',
3520   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3523 # @screendump:
3525 # Write a PPM of the VGA screen to a file.
3527 # @filename: the path of a new PPM file to store the image
3529 # Returns: Nothing on success
3531 # Since: 0.14.0
3533 { 'command': 'screendump', 'data': {'filename': 'str'} }
3537 # @ChardevCommon:
3539 # Configuration shared across all chardev backends
3541 # @logfile: #optional The name of a logfile to save output
3542 # @logappend: #optional true to append instead of truncate
3543 #             (default to false to truncate)
3545 # Since: 2.6
3547 { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
3548                                        '*logappend': 'bool' } }
3551 # @ChardevFile:
3553 # Configuration info for file chardevs.
3555 # @in:  #optional The name of the input file
3556 # @out: The name of the output file
3557 # @append: #optional Open the file in append mode (default false to
3558 #          truncate) (Since 2.6)
3560 # Since: 1.4
3562 { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
3563                                    'out' : 'str',
3564                                    '*append': 'bool' },
3565   'base': 'ChardevCommon' }
3568 # @ChardevHostdev:
3570 # Configuration info for device and pipe chardevs.
3572 # @device: The name of the special file for the device,
3573 #          i.e. /dev/ttyS0 on Unix or COM1: on Windows
3574 # @type: What kind of device this is.
3576 # Since: 1.4
3578 { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
3579   'base': 'ChardevCommon' }
3582 # @ChardevSocket:
3584 # Configuration info for (stream) socket chardevs.
3586 # @addr: socket address to listen on (server=true)
3587 #        or connect to (server=false)
3588 # @tls-creds: #optional the ID of the TLS credentials object (since 2.6)
3589 # @server: #optional create server socket (default: true)
3590 # @wait: #optional wait for incoming connection on server
3591 #        sockets (default: false).
3592 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3593 # @telnet: #optional enable telnet protocol on server
3594 #          sockets (default: false)
3595 # @reconnect: #optional For a client socket, if a socket is disconnected,
3596 #          then attempt a reconnect after the given number of seconds.
3597 #          Setting this to zero disables this function. (default: 0)
3598 #          (Since: 2.2)
3600 # Since: 1.4
3602 { 'struct': 'ChardevSocket', 'data': { 'addr'       : 'SocketAddress',
3603                                      '*tls-creds'  : 'str',
3604                                      '*server'    : 'bool',
3605                                      '*wait'      : 'bool',
3606                                      '*nodelay'   : 'bool',
3607                                      '*telnet'    : 'bool',
3608                                      '*reconnect' : 'int' },
3609   'base': 'ChardevCommon' }
3612 # @ChardevUdp:
3614 # Configuration info for datagram socket chardevs.
3616 # @remote: remote address
3617 # @local: #optional local address
3619 # Since: 1.5
3621 { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3622                                   '*local' : 'SocketAddress' },
3623   'base': 'ChardevCommon' }
3626 # @ChardevMux:
3628 # Configuration info for mux chardevs.
3630 # @chardev: name of the base chardev.
3632 # Since: 1.5
3634 { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
3635   'base': 'ChardevCommon' }
3638 # @ChardevStdio:
3640 # Configuration info for stdio chardevs.
3642 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3643 #          be delivered to qemu.  Default: true in -nographic mode,
3644 #          false otherwise.
3646 # Since: 1.5
3648 { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
3649   'base': 'ChardevCommon' }
3653 # @ChardevSpiceChannel:
3655 # Configuration info for spice vm channel chardevs.
3657 # @type: kind of channel (for example vdagent).
3659 # Since: 1.5
3661 { 'struct': 'ChardevSpiceChannel', 'data': { 'type'  : 'str' },
3662   'base': 'ChardevCommon' }
3665 # @ChardevSpicePort:
3667 # Configuration info for spice port chardevs.
3669 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3671 # Since: 1.5
3673 { 'struct': 'ChardevSpicePort', 'data': { 'fqdn'  : 'str' },
3674   'base': 'ChardevCommon' }
3677 # @ChardevVC:
3679 # Configuration info for virtual console chardevs.
3681 # @width:  console width,  in pixels
3682 # @height: console height, in pixels
3683 # @cols:   console width,  in chars
3684 # @rows:   console height, in chars
3686 # Since: 1.5
3688 { 'struct': 'ChardevVC', 'data': { '*width'  : 'int',
3689                                  '*height' : 'int',
3690                                  '*cols'   : 'int',
3691                                  '*rows'   : 'int' },
3692   'base': 'ChardevCommon' }
3695 # @ChardevRingbuf:
3697 # Configuration info for ring buffer chardevs.
3699 # @size: #optional ring buffer size, must be power of two, default is 65536
3701 # Since: 1.5
3703 { 'struct': 'ChardevRingbuf', 'data': { '*size'  : 'int' },
3704   'base': 'ChardevCommon' }
3707 # @ChardevBackend:
3709 # Configuration info for the new chardev backend.
3711 # Since: 1.4 (testdev since 2.2)
3713 { 'union': 'ChardevBackend', 'data': { 'file'   : 'ChardevFile',
3714                                        'serial' : 'ChardevHostdev',
3715                                        'parallel': 'ChardevHostdev',
3716                                        'pipe'   : 'ChardevHostdev',
3717                                        'socket' : 'ChardevSocket',
3718                                        'udp'    : 'ChardevUdp',
3719                                        'pty'    : 'ChardevCommon',
3720                                        'null'   : 'ChardevCommon',
3721                                        'mux'    : 'ChardevMux',
3722                                        'msmouse': 'ChardevCommon',
3723                                        'braille': 'ChardevCommon',
3724                                        'testdev': 'ChardevCommon',
3725                                        'stdio'  : 'ChardevStdio',
3726                                        'console': 'ChardevCommon',
3727                                        'spicevmc' : 'ChardevSpiceChannel',
3728                                        'spiceport' : 'ChardevSpicePort',
3729                                        'vc'     : 'ChardevVC',
3730                                        'ringbuf': 'ChardevRingbuf',
3731                                        # next one is just for compatibility
3732                                        'memory' : 'ChardevRingbuf' } }
3735 # @ChardevReturn:
3737 # Return info about the chardev backend just created.
3739 # @pty: #optional name of the slave pseudoterminal device, present if
3740 #       and only if a chardev of type 'pty' was created
3742 # Since: 1.4
3744 { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3747 # @chardev-add:
3749 # Add a character device backend
3751 # @id: the chardev's ID, must be unique
3752 # @backend: backend type and parameters
3754 # Returns: ChardevReturn.
3756 # Since: 1.4
3758 { 'command': 'chardev-add', 'data': {'id'      : 'str',
3759                                      'backend' : 'ChardevBackend' },
3760   'returns': 'ChardevReturn' }
3763 # @chardev-remove:
3765 # Remove a character device backend
3767 # @id: the chardev's ID, must exist and not be in use
3769 # Returns: Nothing on success
3771 # Since: 1.4
3773 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3776 # @TpmModel:
3778 # An enumeration of TPM models
3780 # @tpm-tis: TPM TIS model
3782 # Since: 1.5
3784 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3787 # @query-tpm-models:
3789 # Return a list of supported TPM models
3791 # Returns: a list of TpmModel
3793 # Since: 1.5
3795 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3798 # @TpmType:
3800 # An enumeration of TPM types
3802 # @passthrough: TPM passthrough type
3804 # Since: 1.5
3806 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3809 # @query-tpm-types:
3811 # Return a list of supported TPM types
3813 # Returns: a list of TpmType
3815 # Since: 1.5
3817 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3820 # @TPMPassthroughOptions:
3822 # Information about the TPM passthrough type
3824 # @path: #optional string describing the path used for accessing the TPM device
3826 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3827 #               for cancellation of TPM commands while they are executing
3829 # Since: 1.5
3831 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3832                                              '*cancel-path' : 'str'} }
3835 # @TpmTypeOptions:
3837 # A union referencing different TPM backend types' configuration options
3839 # @passthrough: The configuration options for the TPM passthrough type
3841 # Since: 1.5
3843 { 'union': 'TpmTypeOptions',
3844    'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3847 # @TpmInfo:
3849 # Information about the TPM
3851 # @id: The Id of the TPM
3853 # @model: The TPM frontend model
3855 # @options: The TPM (backend) type configuration options
3857 # Since: 1.5
3859 { 'struct': 'TPMInfo',
3860   'data': {'id': 'str',
3861            'model': 'TpmModel',
3862            'options': 'TpmTypeOptions' } }
3865 # @query-tpm:
3867 # Return information about the TPM device
3869 # Returns: @TPMInfo on success
3871 # Since: 1.5
3873 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
3876 # @AcpiTableOptions
3878 # Specify an ACPI table on the command line to load.
3880 # At most one of @file and @data can be specified. The list of files specified
3881 # by any one of them is loaded and concatenated in order. If both are omitted,
3882 # @data is implied.
3884 # Other fields / optargs can be used to override fields of the generic ACPI
3885 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
3886 # Description Table Header. If a header field is not overridden, then the
3887 # corresponding value from the concatenated blob is used (in case of @file), or
3888 # it is filled in with a hard-coded value (in case of @data).
3890 # String fields are copied into the matching ACPI member from lowest address
3891 # upwards, and silently truncated / NUL-padded to length.
3893 # @sig: #optional table signature / identifier (4 bytes)
3895 # @rev: #optional table revision number (dependent on signature, 1 byte)
3897 # @oem_id: #optional OEM identifier (6 bytes)
3899 # @oem_table_id: #optional OEM table identifier (8 bytes)
3901 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
3903 # @asl_compiler_id: #optional identifier of the utility that created the table
3904 #                   (4 bytes)
3906 # @asl_compiler_rev: #optional revision number of the utility that created the
3907 #                    table (4 bytes)
3909 # @file: #optional colon (:) separated list of pathnames to load and
3910 #        concatenate as table data. The resultant binary blob is expected to
3911 #        have an ACPI table header. At least one file is required. This field
3912 #        excludes @data.
3914 # @data: #optional colon (:) separated list of pathnames to load and
3915 #        concatenate as table data. The resultant binary blob must not have an
3916 #        ACPI table header. At least one file is required. This field excludes
3917 #        @file.
3919 # Since 1.5
3921 { 'struct': 'AcpiTableOptions',
3922   'data': {
3923     '*sig':               'str',
3924     '*rev':               'uint8',
3925     '*oem_id':            'str',
3926     '*oem_table_id':      'str',
3927     '*oem_rev':           'uint32',
3928     '*asl_compiler_id':   'str',
3929     '*asl_compiler_rev':  'uint32',
3930     '*file':              'str',
3931     '*data':              'str' }}
3934 # @CommandLineParameterType:
3936 # Possible types for an option parameter.
3938 # @string: accepts a character string
3940 # @boolean: accepts "on" or "off"
3942 # @number: accepts a number
3944 # @size: accepts a number followed by an optional suffix (K)ilo,
3945 #        (M)ega, (G)iga, (T)era
3947 # Since 1.5
3949 { 'enum': 'CommandLineParameterType',
3950   'data': ['string', 'boolean', 'number', 'size'] }
3953 # @CommandLineParameterInfo:
3955 # Details about a single parameter of a command line option.
3957 # @name: parameter name
3959 # @type: parameter @CommandLineParameterType
3961 # @help: #optional human readable text string, not suitable for parsing.
3963 # @default: #optional default value string (since 2.1)
3965 # Since 1.5
3967 { 'struct': 'CommandLineParameterInfo',
3968   'data': { 'name': 'str',
3969             'type': 'CommandLineParameterType',
3970             '*help': 'str',
3971             '*default': 'str' } }
3974 # @CommandLineOptionInfo:
3976 # Details about a command line option, including its list of parameter details
3978 # @option: option name
3980 # @parameters: an array of @CommandLineParameterInfo
3982 # Since 1.5
3984 { 'struct': 'CommandLineOptionInfo',
3985   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
3988 # @query-command-line-options:
3990 # Query command line option schema.
3992 # @option: #optional option name
3994 # Returns: list of @CommandLineOptionInfo for all options (or for the given
3995 #          @option).  Returns an error if the given @option doesn't exist.
3997 # Since 1.5
3999 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
4000  'returns': ['CommandLineOptionInfo'] }
4003 # @X86CPURegister32
4005 # A X86 32-bit register
4007 # Since: 1.5
4009 { 'enum': 'X86CPURegister32',
4010   'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4013 # @X86CPUFeatureWordInfo
4015 # Information about a X86 CPU feature word
4017 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4019 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
4020 #                   feature word
4022 # @cpuid-register: Output register containing the feature bits
4024 # @features: value of output register, containing the feature bits
4026 # Since: 1.5
4028 { 'struct': 'X86CPUFeatureWordInfo',
4029   'data': { 'cpuid-input-eax': 'int',
4030             '*cpuid-input-ecx': 'int',
4031             'cpuid-register': 'X86CPURegister32',
4032             'features': 'int' } }
4035 # @DummyForceArrays
4037 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
4039 # Since 2.5
4041 { 'struct': 'DummyForceArrays',
4042   'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
4046 # @RxState:
4048 # Packets receiving state
4050 # @normal: filter assigned packets according to the mac-table
4052 # @none: don't receive any assigned packet
4054 # @all: receive all assigned packets
4056 # Since: 1.6
4058 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
4061 # @RxFilterInfo:
4063 # Rx-filter information for a NIC.
4065 # @name: net client name
4067 # @promiscuous: whether promiscuous mode is enabled
4069 # @multicast: multicast receive state
4071 # @unicast: unicast receive state
4073 # @vlan: vlan receive state (Since 2.0)
4075 # @broadcast-allowed: whether to receive broadcast
4077 # @multicast-overflow: multicast table is overflowed or not
4079 # @unicast-overflow: unicast table is overflowed or not
4081 # @main-mac: the main macaddr string
4083 # @vlan-table: a list of active vlan id
4085 # @unicast-table: a list of unicast macaddr string
4087 # @multicast-table: a list of multicast macaddr string
4089 # Since 1.6
4091 { 'struct': 'RxFilterInfo',
4092   'data': {
4093     'name':               'str',
4094     'promiscuous':        'bool',
4095     'multicast':          'RxState',
4096     'unicast':            'RxState',
4097     'vlan':               'RxState',
4098     'broadcast-allowed':  'bool',
4099     'multicast-overflow': 'bool',
4100     'unicast-overflow':   'bool',
4101     'main-mac':           'str',
4102     'vlan-table':         ['int'],
4103     'unicast-table':      ['str'],
4104     'multicast-table':    ['str'] }}
4107 # @query-rx-filter:
4109 # Return rx-filter information for all NICs (or for the given NIC).
4111 # @name: #optional net client name
4113 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4114 #          Returns an error if the given @name doesn't exist, or given
4115 #          NIC doesn't support rx-filter querying, or given net client
4116 #          isn't a NIC.
4118 # Since: 1.6
4120 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4121   'returns': ['RxFilterInfo'] }
4124 # @InputButton
4126 # Button of a pointer input device (mouse, tablet).
4128 # Since: 2.0
4130 { 'enum'  : 'InputButton',
4131   'data'  : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down' ] }
4134 # @InputAxis
4136 # Position axis of a pointer input device (mouse, tablet).
4138 # Since: 2.0
4140 { 'enum'  : 'InputAxis',
4141   'data'  : [ 'x', 'y' ] }
4144 # @InputKeyEvent
4146 # Keyboard input event.
4148 # @key:    Which key this event is for.
4149 # @down:   True for key-down and false for key-up events.
4151 # Since: 2.0
4153 { 'struct'  : 'InputKeyEvent',
4154   'data'  : { 'key'     : 'KeyValue',
4155               'down'    : 'bool' } }
4158 # @InputBtnEvent
4160 # Pointer button input event.
4162 # @button: Which button this event is for.
4163 # @down:   True for key-down and false for key-up events.
4165 # Since: 2.0
4167 { 'struct'  : 'InputBtnEvent',
4168   'data'  : { 'button'  : 'InputButton',
4169               'down'    : 'bool' } }
4172 # @InputMoveEvent
4174 # Pointer motion input event.
4176 # @axis:   Which axis is referenced by @value.
4177 # @value:  Pointer position.  For absolute coordinates the
4178 #          valid range is 0 -> 0x7ffff
4180 # Since: 2.0
4182 { 'struct'  : 'InputMoveEvent',
4183   'data'  : { 'axis'    : 'InputAxis',
4184               'value'   : 'int' } }
4187 # @InputEvent
4189 # Input event union.
4191 # @key: Input event of Keyboard
4192 # @btn: Input event of pointer buttons
4193 # @rel: Input event of relative pointer motion
4194 # @abs: Input event of absolute pointer motion
4196 # Since: 2.0
4198 { 'union' : 'InputEvent',
4199   'data'  : { 'key'     : 'InputKeyEvent',
4200               'btn'     : 'InputBtnEvent',
4201               'rel'     : 'InputMoveEvent',
4202               'abs'     : 'InputMoveEvent' } }
4205 # @input-send-event
4207 # Send input event(s) to guest.
4209 # @device: #optional display device to send event(s) to.
4210 # @head: #optional head to send event(s) to, in case the
4211 #        display device supports multiple scanouts.
4212 # @events: List of InputEvent union.
4214 # Returns: Nothing on success.
4216 # The @display and @head parameters can be used to send the input
4217 # event to specific input devices in case (a) multiple input devices
4218 # of the same kind are added to the virtual machine and (b) you have
4219 # configured input routing (see docs/multiseat.txt) for those input
4220 # devices.  The parameters work exactly like the device and head
4221 # properties of input devices.  If @device is missing, only devices
4222 # that have no input routing config are admissible.  If @device is
4223 # specified, both input devices with and without input routing config
4224 # are admissible, but devices with input routing config take
4225 # precedence.
4227 # Since: 2.6
4229 { 'command': 'input-send-event',
4230   'data': { '*device': 'str',
4231             '*head'  : 'int',
4232             'events' : [ 'InputEvent' ] } }
4235 # @NumaOptions
4237 # A discriminated record of NUMA options. (for OptsVisitor)
4239 # Since 2.1
4241 { 'union': 'NumaOptions',
4242   'data': {
4243     'node': 'NumaNodeOptions' }}
4246 # @NumaNodeOptions
4248 # Create a guest NUMA node. (for OptsVisitor)
4250 # @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
4252 # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
4253 #         if omitted)
4255 # @mem: #optional memory size of this node; mutually exclusive with @memdev.
4256 #       Equally divide total memory among nodes if both @mem and @memdev are
4257 #       omitted.
4259 # @memdev: #optional memory backend object.  If specified for one node,
4260 #          it must be specified for all nodes.
4262 # Since: 2.1
4264 { 'struct': 'NumaNodeOptions',
4265   'data': {
4266    '*nodeid': 'uint16',
4267    '*cpus':   ['uint16'],
4268    '*mem':    'size',
4269    '*memdev': 'str' }}
4272 # @HostMemPolicy
4274 # Host memory policy types
4276 # @default: restore default policy, remove any nondefault policy
4278 # @preferred: set the preferred host nodes for allocation
4280 # @bind: a strict policy that restricts memory allocation to the
4281 #        host nodes specified
4283 # @interleave: memory allocations are interleaved across the set
4284 #              of host nodes specified
4286 # Since 2.1
4288 { 'enum': 'HostMemPolicy',
4289   'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
4292 # @Memdev:
4294 # Information about memory backend
4296 # @size: memory backend size
4298 # @merge: enables or disables memory merge support
4300 # @dump: includes memory backend's memory in a core dump or not
4302 # @prealloc: enables or disables memory preallocation
4304 # @host-nodes: host nodes for its memory policy
4306 # @policy: memory policy of memory backend
4308 # Since: 2.1
4310 { 'struct': 'Memdev',
4311   'data': {
4312     'size':       'size',
4313     'merge':      'bool',
4314     'dump':       'bool',
4315     'prealloc':   'bool',
4316     'host-nodes': ['uint16'],
4317     'policy':     'HostMemPolicy' }}
4320 # @query-memdev:
4322 # Returns information for all memory backends.
4324 # Returns: a list of @Memdev.
4326 # Since: 2.1
4328 { 'command': 'query-memdev', 'returns': ['Memdev'] }
4331 # @PCDIMMDeviceInfo:
4333 # PCDIMMDevice state information
4335 # @id: #optional device's ID
4337 # @addr: physical address, where device is mapped
4339 # @size: size of memory that the device provides
4341 # @slot: slot number at which device is plugged in
4343 # @node: NUMA node number where device is plugged in
4345 # @memdev: memory backend linked with device
4347 # @hotplugged: true if device was hotplugged
4349 # @hotpluggable: true if device if could be added/removed while machine is running
4351 # Since: 2.1
4353 { 'struct': 'PCDIMMDeviceInfo',
4354   'data': { '*id': 'str',
4355             'addr': 'int',
4356             'size': 'int',
4357             'slot': 'int',
4358             'node': 'int',
4359             'memdev': 'str',
4360             'hotplugged': 'bool',
4361             'hotpluggable': 'bool'
4362           }
4366 # @MemoryDeviceInfo:
4368 # Union containing information about a memory device
4370 # Since: 2.1
4372 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
4375 # @query-memory-devices
4377 # Lists available memory devices and their state
4379 # Since: 2.1
4381 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
4383 ## @ACPISlotType
4385 # @DIMM: memory slot
4386 # @CPU: logical CPU slot (since 2.7)
4388 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
4390 ## @ACPIOSTInfo
4392 # OSPM Status Indication for a device
4393 # For description of possible values of @source and @status fields
4394 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
4396 # @device: #optional device ID associated with slot
4398 # @slot: slot ID, unique per slot of a given @slot-type
4400 # @slot-type: type of the slot
4402 # @source: an integer containing the source event
4404 # @status: an integer containing the status code
4406 # Since: 2.1
4408 { 'struct': 'ACPIOSTInfo',
4409   'data'  : { '*device': 'str',
4410               'slot': 'str',
4411               'slot-type': 'ACPISlotType',
4412               'source': 'int',
4413               'status': 'int' } }
4416 # @query-acpi-ospm-status
4418 # Lists ACPI OSPM status of ACPI device objects,
4419 # which might be reported via _OST method
4421 # Since: 2.1
4423 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
4426 # @WatchdogExpirationAction
4428 # An enumeration of the actions taken when the watchdog device's timer is
4429 # expired
4431 # @reset: system resets
4433 # @shutdown: system shutdown, note that it is similar to @powerdown, which
4434 #            tries to set to system status and notify guest
4436 # @poweroff: system poweroff, the emulator program exits
4438 # @pause: system pauses, similar to @stop
4440 # @debug: system enters debug state
4442 # @none: nothing is done
4444 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
4445 #              VCPUS on x86) (since 2.4)
4447 # Since: 2.1
4449 { 'enum': 'WatchdogExpirationAction',
4450   'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
4451             'inject-nmi' ] }
4454 # @IoOperationType
4456 # An enumeration of the I/O operation types
4458 # @read: read operation
4460 # @write: write operation
4462 # Since: 2.1
4464 { 'enum': 'IoOperationType',
4465   'data': [ 'read', 'write' ] }
4468 # @GuestPanicAction
4470 # An enumeration of the actions taken when guest OS panic is detected
4472 # @pause: system pauses
4474 # Since: 2.1
4476 { 'enum': 'GuestPanicAction',
4477   'data': [ 'pause' ] }
4480 # @rtc-reset-reinjection
4482 # This command will reset the RTC interrupt reinjection backlog.
4483 # Can be used if another mechanism to synchronize guest time
4484 # is in effect, for example QEMU guest agent's guest-set-time
4485 # command.
4487 # Since: 2.1
4489 { 'command': 'rtc-reset-reinjection' }
4491 # Rocker ethernet network switch
4492 { 'include': 'qapi/rocker.json' }
4495 # ReplayMode:
4497 # Mode of the replay subsystem.
4499 # @none: normal execution mode. Replay or record are not enabled.
4501 # @record: record mode. All non-deterministic data is written into the
4502 #          replay log.
4504 # @play: replay mode. Non-deterministic data required for system execution
4505 #        is read from the log.
4507 # Since: 2.5
4509 { 'enum': 'ReplayMode',
4510   'data': [ 'none', 'record', 'play' ] }
4513 # @xen-load-devices-state:
4515 # Load the state of all devices from file. The RAM and the block devices
4516 # of the VM are not loaded by this command.
4518 # @filename: the file to load the state of the devices from as binary
4519 # data. See xen-save-devices-state.txt for a description of the binary
4520 # format.
4522 # Since: 2.7
4524 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
4527 # @GICCapability:
4529 # The struct describes capability for a specific GIC (Generic
4530 # Interrupt Controller) version. These bits are not only decided by
4531 # QEMU/KVM software version, but also decided by the hardware that
4532 # the program is running upon.
4534 # @version:  version of GIC to be described. Currently, only 2 and 3
4535 #            are supported.
4537 # @emulated: whether current QEMU/hardware supports emulated GIC
4538 #            device in user space.
4540 # @kernel:   whether current QEMU/hardware supports hardware
4541 #            accelerated GIC device in kernel.
4543 # Since: 2.6
4545 { 'struct': 'GICCapability',
4546   'data': { 'version': 'int',
4547             'emulated': 'bool',
4548             'kernel': 'bool' } }
4551 # @query-gic-capabilities:
4553 # This command is ARM-only. It will return a list of GICCapability
4554 # objects that describe its capability bits.
4556 # Returns: a list of GICCapability objects.
4558 # Since: 2.6
4560 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
4563 # CpuInstanceProperties
4565 # List of properties to be used for hotplugging a CPU instance,
4566 # it should be passed by management with device_add command when
4567 # a CPU is being hotplugged.
4569 # Note: currently there are 4 properties that could be present
4570 # but management should be prepared to pass through other
4571 # properties with device_add command to allow for future
4572 # interface extension. This also requires the filed names to be kept in
4573 # sync with the properties passed to -device/device_add.
4575 # @node-id: #optional NUMA node ID the CPU belongs to
4576 # @socket-id: #optional socket number within node/board the CPU belongs to
4577 # @core-id: #optional core number within socket the CPU belongs to
4578 # @thread-id: #optional thread number within core the CPU belongs to
4580 # Since: 2.7
4582 { 'struct': 'CpuInstanceProperties',
4583   'data': { '*node-id': 'int',
4584             '*socket-id': 'int',
4585             '*core-id': 'int',
4586             '*thread-id': 'int'
4587   }
4591 # @HotpluggableCPU
4593 # @type: CPU object type for usage with device_add command
4594 # @props: list of properties to be used for hotplugging CPU
4595 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
4596 # @qom-path: #optional link to existing CPU object if CPU is present or
4597 #            omitted if CPU is not present.
4599 # Since: 2.7
4601 { 'struct': 'HotpluggableCPU',
4602   'data': { 'type': 'str',
4603             'vcpus-count': 'int',
4604             'props': 'CpuInstanceProperties',
4605             '*qom-path': 'str'
4606           }
4610 # @query-hotpluggable-cpus
4612 # Returns: a list of HotpluggableCPU objects.
4614 # Since: 2.7
4616 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }