RAMBlocks: qemu_ram_is_shared
[qemu/ar7.git] / qapi-schema.json
blobeb9bf67bd9750bdfac28f3f23eeda7dd28a2c83b
1 # -*- Mode: Python -*-
2 ##
3 # = Introduction
5 # This document describes all commands currently supported by QMP.
7 # Most of the time their usage is exactly the same as in the user Monitor, this
8 # means that any other document which also describe commands (the manpage,
9 # QEMU's manual, etc) can and should be consulted.
11 # QMP has two types of commands: regular and query commands. Regular commands
12 # usually change the Virtual Machine's state someway, while query commands just
13 # return information. The sections below are divided accordingly.
15 # It's important to observe that all communication examples are formatted in
16 # a reader-friendly way, so that they're easier to understand. However, in real
17 # protocol usage, they're emitted as a single line.
19 # Also, the following notation is used to denote data flow:
21 # Example:
23 # | -> data issued by the Client
24 # | <- Server data response
26 # Please, refer to the QMP specification (docs/qmp-spec.txt) for
27 # detailed information on the Server command and response formats.
29 # = Stability Considerations
31 # The current QMP command set (described in this file) may be useful for a
32 # number of use cases, however it's limited and several commands have bad
33 # defined semantics, specially with regard to command completion.
35 # These problems are going to be solved incrementally in the next QEMU releases
36 # and we're going to establish a deprecation policy for badly defined commands.
38 # If you're planning to adopt QMP, please observe the following:
40 #     1. The deprecation policy will take effect and be documented soon, please
41 #        check the documentation of each used command as soon as a new release of
42 #        QEMU is available
44 #     2. DO NOT rely on anything which is not explicit documented
46 #     3. Errors, in special, are not documented. Applications should NOT check
47 #        for specific errors classes or data (it's strongly recommended to only
48 #        check for the "error" key)
52 # QAPI common definitions
53 { 'include': 'qapi/common.json' }
55 # QAPI crypto definitions
56 { 'include': 'qapi/crypto.json' }
58 # QAPI block definitions
59 { 'include': 'qapi/block.json' }
61 # QAPI event definitions
62 { 'include': 'qapi/event.json' }
64 # Tracing commands
65 { 'include': 'qapi/trace.json' }
67 # QAPI introspection
68 { 'include': 'qapi/introspect.json' }
71 # = QMP commands
75 # @qmp_capabilities:
77 # Enable QMP capabilities.
79 # Arguments: None.
81 # Example:
83 # -> { "execute": "qmp_capabilities" }
84 # <- { "return": {} }
86 # Notes: This command is valid exactly when first connecting: it must be
87 # issued before any other command will be accepted, and will fail once the
88 # monitor is accepting other commands. (see qemu docs/qmp-spec.txt)
90 # Since: 0.13
93 { 'command': 'qmp_capabilities' }
96 # @LostTickPolicy:
98 # Policy for handling lost ticks in timer devices.
100 # @discard: throw away the missed tick(s) and continue with future injection
101 #           normally.  Guest time may be delayed, unless the OS has explicit
102 #           handling of lost ticks
104 # @delay: continue to deliver ticks at the normal rate.  Guest time will be
105 #         delayed due to the late tick
107 # @merge: merge the missed tick(s) into one tick and inject.  Guest time
108 #         may be delayed, depending on how the OS reacts to the merging
109 #         of ticks
111 # @slew: deliver ticks at a higher rate to catch up with the missed tick. The
112 #        guest time should not be delayed once catchup is complete.
114 # Since: 2.0
116 { 'enum': 'LostTickPolicy',
117   'data': ['discard', 'delay', 'merge', 'slew' ] }
120 # @add_client:
122 # Allow client connections for VNC, Spice and socket based
123 # character devices to be passed in to QEMU via SCM_RIGHTS.
125 # @protocol: protocol name. Valid names are "vnc", "spice" or the
126 #            name of a character device (eg. from -chardev id=XXXX)
128 # @fdname: file descriptor name previously passed via 'getfd' command
130 # @skipauth: #optional whether to skip authentication. Only applies
131 #            to "vnc" and "spice" protocols
133 # @tls: #optional whether to perform TLS. Only applies to the "spice"
134 #       protocol
136 # Returns: nothing on success.
138 # Since: 0.14.0
140 # Example:
142 # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
143 #                                              "fdname": "myclient" } }
144 # <- { "return": {} }
147 { 'command': 'add_client',
148   'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
149             '*tls': 'bool' } }
152 # @NameInfo:
154 # Guest name information.
156 # @name: #optional The name of the guest
158 # Since: 0.14.0
160 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
163 # @query-name:
165 # Return the name information of a guest.
167 # Returns: @NameInfo of the guest
169 # Since: 0.14.0
171 # Example:
173 # -> { "execute": "query-name" }
174 # <- { "return": { "name": "qemu-name" } }
177 { 'command': 'query-name', 'returns': 'NameInfo' }
180 # @KvmInfo:
182 # Information about support for KVM acceleration
184 # @enabled: true if KVM acceleration is active
186 # @present: true if KVM acceleration is built into this executable
188 # Since: 0.14.0
190 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
193 # @query-kvm:
195 # Returns information about KVM acceleration
197 # Returns: @KvmInfo
199 # Since: 0.14.0
201 # Example:
203 # -> { "execute": "query-kvm" }
204 # <- { "return": { "enabled": true, "present": true } }
207 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
210 # @RunState:
212 # An enumeration of VM run states.
214 # @debug: QEMU is running on a debugger
216 # @finish-migrate: guest is paused to finish the migration process
218 # @inmigrate: guest is paused waiting for an incoming migration.  Note
219 # that this state does not tell whether the machine will start at the
220 # end of the migration.  This depends on the command-line -S option and
221 # any invocation of 'stop' or 'cont' that has happened since QEMU was
222 # started.
224 # @internal-error: An internal error that prevents further guest execution
225 # has occurred
227 # @io-error: the last IOP has failed and the device is configured to pause
228 # on I/O errors
230 # @paused: guest has been paused via the 'stop' command
232 # @postmigrate: guest is paused following a successful 'migrate'
234 # @prelaunch: QEMU was started with -S and guest has not started
236 # @restore-vm: guest is paused to restore VM state
238 # @running: guest is actively running
240 # @save-vm: guest is paused to save the VM state
242 # @shutdown: guest is shut down (and -no-shutdown is in use)
244 # @suspended: guest is suspended (ACPI S3)
246 # @watchdog: the watchdog action is configured to pause and has been triggered
248 # @guest-panicked: guest has been panicked as a result of guest OS panic
250 # @colo: guest is paused to save/restore VM state under colo checkpoint,
251 #        VM can not get into this state unless colo capability is enabled
252 #        for migration. (since 2.8)
254 { 'enum': 'RunState',
255   'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
256             'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
257             'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
258             'guest-panicked', 'colo' ] }
261 # @StatusInfo:
263 # Information about VCPU run state
265 # @running: true if all VCPUs are runnable, false if not runnable
267 # @singlestep: true if VCPUs are in single-step mode
269 # @status: the virtual machine @RunState
271 # Since:  0.14.0
273 # Notes: @singlestep is enabled through the GDB stub
275 { 'struct': 'StatusInfo',
276   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
279 # @query-status:
281 # Query the run status of all VCPUs
283 # Returns: @StatusInfo reflecting all VCPUs
285 # Since:  0.14.0
287 # Example:
289 # -> { "execute": "query-status" }
290 # <- { "return": { "running": true,
291 #                  "singlestep": false,
292 #                  "status": "running" } }
295 { 'command': 'query-status', 'returns': 'StatusInfo' }
298 # @UuidInfo:
300 # Guest UUID information (Universally Unique Identifier).
302 # @UUID: the UUID of the guest
304 # Since: 0.14.0
306 # Notes: If no UUID was specified for the guest, a null UUID is returned.
308 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
311 # @query-uuid:
313 # Query the guest UUID information.
315 # Returns: The @UuidInfo for the guest
317 # Since: 0.14.0
319 # Example:
321 # -> { "execute": "query-uuid" }
322 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
325 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
328 # @ChardevInfo:
330 # Information about a character device.
332 # @label: the label of the character device
334 # @filename: the filename of the character device
336 # @frontend-open: shows whether the frontend device attached to this backend
337 #                 (eg. with the chardev=... option) is in open or closed state
338 #                 (since 2.1)
340 # Notes: @filename is encoded using the QEMU command line character device
341 #        encoding.  See the QEMU man page for details.
343 # Since: 0.14.0
345 { 'struct': 'ChardevInfo', 'data': {'label': 'str',
346                                   'filename': 'str',
347                                   'frontend-open': 'bool'} }
350 # @query-chardev:
352 # Returns information about current character devices.
354 # Returns: a list of @ChardevInfo
356 # Since: 0.14.0
358 # Example:
360 # -> { "execute": "query-chardev" }
361 # <- {
362 #       "return": [
363 #          {
364 #             "label": "charchannel0",
365 #             "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
366 #             "frontend-open": false
367 #          },
368 #          {
369 #             "label": "charmonitor",
370 #             "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
371 #             "frontend-open": true
372 #          },
373 #          {
374 #             "label": "charserial0",
375 #             "filename": "pty:/dev/pts/2",
376 #             "frontend-open": true
377 #          }
378 #       ]
379 #    }
382 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
385 # @ChardevBackendInfo:
387 # Information about a character device backend
389 # @name: The backend name
391 # Since: 2.0
393 { 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} }
396 # @query-chardev-backends:
398 # Returns information about character device backends.
400 # Returns: a list of @ChardevBackendInfo
402 # Since: 2.0
404 # Example:
406 # -> { "execute": "query-chardev-backends" }
407 # <- {
408 #       "return":[
409 #          {
410 #             "name":"udp"
411 #          },
412 #          {
413 #             "name":"tcp"
414 #          },
415 #          {
416 #             "name":"unix"
417 #          },
418 #          {
419 #             "name":"spiceport"
420 #          }
421 #       ]
422 #    }
425 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
428 # @DataFormat:
430 # An enumeration of data format.
432 # @utf8: Data is a UTF-8 string (RFC 3629)
434 # @base64: Data is Base64 encoded binary (RFC 3548)
436 # Since: 1.4
438 { 'enum': 'DataFormat',
439   'data': [ 'utf8', 'base64' ] }
442 # @ringbuf-write:
444 # Write to a ring buffer character device.
446 # @device: the ring buffer character device name
448 # @data: data to write
450 # @format: #optional data encoding (default 'utf8').
451 #          - base64: data must be base64 encoded text.  Its binary
452 #            decoding gets written.
453 #          - utf8: data's UTF-8 encoding is written
454 #          - data itself is always Unicode regardless of format, like
455 #            any other string.
457 # Returns: Nothing on success
459 # Since: 1.4
461 # Example:
463 # -> { "execute": "ringbuf-write",
464 #      "arguments": { "device": "foo",
465 #                     "data": "abcdefgh",
466 #                     "format": "utf8" } }
467 # <- { "return": {} }
470 { 'command': 'ringbuf-write',
471   'data': {'device': 'str', 'data': 'str',
472            '*format': 'DataFormat'} }
475 # @ringbuf-read:
477 # Read from a ring buffer character device.
479 # @device: the ring buffer character device name
481 # @size: how many bytes to read at most
483 # @format: #optional data encoding (default 'utf8').
484 #          - base64: the data read is returned in base64 encoding.
485 #          - utf8: the data read is interpreted as UTF-8.
486 #            Bug: can screw up when the buffer contains invalid UTF-8
487 #            sequences, NUL characters, after the ring buffer lost
488 #            data, and when reading stops because the size limit is
489 #            reached.
490 #          - The return value is always Unicode regardless of format,
491 #            like any other string.
493 # Returns: data read from the device
495 # Since: 1.4
497 # Example:
499 # -> { "execute": "ringbuf-read",
500 #      "arguments": { "device": "foo",
501 #                     "size": 1000,
502 #                     "format": "utf8" } }
503 # <- { "return": "abcdefgh" }
506 { 'command': 'ringbuf-read',
507   'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
508   'returns': 'str' }
511 # @EventInfo:
513 # Information about a QMP event
515 # @name: The event name
517 # Since: 1.2.0
519 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
522 # @query-events:
524 # Return a list of supported QMP events by this server
526 # Returns: A list of @EventInfo for all supported events
528 # Since: 1.2.0
530 # Example:
532 # -> { "execute": "query-events" }
533 # <- {
534 #      "return": [
535 #          {
536 #             "name":"SHUTDOWN"
537 #          },
538 #          {
539 #             "name":"RESET"
540 #          }
541 #       ]
542 #    }
544 # Note: This example has been shortened as the real response is too long.
547 { 'command': 'query-events', 'returns': ['EventInfo'] }
550 # @MigrationStats:
552 # Detailed migration status.
554 # @transferred: amount of bytes already transferred to the target VM
556 # @remaining: amount of bytes remaining to be transferred to the target VM
558 # @total: total amount of bytes involved in the migration process
560 # @duplicate: number of duplicate (zero) pages (since 1.2)
562 # @skipped: number of skipped zero pages (since 1.5)
564 # @normal: number of normal pages (since 1.2)
566 # @normal-bytes: number of normal bytes sent (since 1.2)
568 # @dirty-pages-rate: number of pages dirtied by second by the
569 #        guest (since 1.3)
571 # @mbps: throughput in megabits/sec. (since 1.6)
573 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
575 # @postcopy-requests: The number of page requests received from the destination
576 #        (since 2.7)
578 # Since: 0.14.0
580 { 'struct': 'MigrationStats',
581   'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
582            'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
583            'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
584            'mbps' : 'number', 'dirty-sync-count' : 'int',
585            'postcopy-requests' : 'int' } }
588 # @XBZRLECacheStats:
590 # Detailed XBZRLE migration cache statistics
592 # @cache-size: XBZRLE cache size
594 # @bytes: amount of bytes already transferred to the target VM
596 # @pages: amount of pages transferred to the target VM
598 # @cache-miss: number of cache miss
600 # @cache-miss-rate: rate of cache miss (since 2.1)
602 # @overflow: number of overflows
604 # Since: 1.2
606 { 'struct': 'XBZRLECacheStats',
607   'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
608            'cache-miss': 'int', 'cache-miss-rate': 'number',
609            'overflow': 'int' } }
612 # @MigrationStatus:
614 # An enumeration of migration status.
616 # @none: no migration has ever happened.
618 # @setup: migration process has been initiated.
620 # @cancelling: in the process of cancelling migration.
622 # @cancelled: cancelling migration is finished.
624 # @active: in the process of doing migration.
626 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
628 # @completed: migration is finished.
630 # @failed: some error occurred during migration process.
632 # @colo: VM is in the process of fault tolerance, VM can not get into this
633 #        state unless colo capability is enabled for migration. (since 2.8)
635 # Since: 2.3
638 { 'enum': 'MigrationStatus',
639   'data': [ 'none', 'setup', 'cancelling', 'cancelled',
640             'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
643 # @MigrationInfo:
645 # Information about current migration process.
647 # @status: #optional @MigrationStatus describing the current migration status.
648 #          If this field is not returned, no migration process
649 #          has been initiated
651 # @ram: #optional @MigrationStats containing detailed migration
652 #       status, only returned if status is 'active' or
653 #       'completed'(since 1.2)
655 # @disk: #optional @MigrationStats containing detailed disk migration
656 #        status, only returned if status is 'active' and it is a block
657 #        migration
659 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
660 #                migration statistics, only returned if XBZRLE feature is on and
661 #                status is 'active' or 'completed' (since 1.2)
663 # @total-time: #optional total amount of milliseconds since migration started.
664 #        If migration has ended, it returns the total migration
665 #        time. (since 1.2)
667 # @downtime: #optional only present when migration finishes correctly
668 #        total downtime in milliseconds for the guest.
669 #        (since 1.3)
671 # @expected-downtime: #optional only present while migration is active
672 #        expected downtime in milliseconds for the guest in last walk
673 #        of the dirty bitmap. (since 1.3)
675 # @setup-time: #optional amount of setup time in milliseconds _before_ the
676 #        iterations begin but _after_ the QMP command is issued. This is designed
677 #        to provide an accounting of any activities (such as RDMA pinning) which
678 #        may be expensive, but do not actually occur during the iterative
679 #        migration rounds themselves. (since 1.6)
681 # @cpu-throttle-percentage: #optional percentage of time guest cpus are being
682 #        throttled during auto-converge. This is only present when auto-converge
683 #        has started throttling guest cpus. (Since 2.7)
685 # @error-desc: #optional the human readable error description string, when
686 #              @status is 'failed'. Clients should not attempt to parse the
687 #              error strings. (Since 2.7)
689 # Since: 0.14.0
691 { 'struct': 'MigrationInfo',
692   'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
693            '*disk': 'MigrationStats',
694            '*xbzrle-cache': 'XBZRLECacheStats',
695            '*total-time': 'int',
696            '*expected-downtime': 'int',
697            '*downtime': 'int',
698            '*setup-time': 'int',
699            '*cpu-throttle-percentage': 'int',
700            '*error-desc': 'str'} }
703 # @query-migrate:
705 # Returns information about current migration process. If migration
706 # is active there will be another json-object with RAM migration
707 # status and if block migration is active another one with block
708 # migration status.
710 # Returns: @MigrationInfo
712 # Since: 0.14.0
714 # Example:
716 # 1. Before the first migration
718 # -> { "execute": "query-migrate" }
719 # <- { "return": {} }
721 # 2. Migration is done and has succeeded
723 # -> { "execute": "query-migrate" }
724 # <- { "return": {
725 #         "status": "completed",
726 #         "ram":{
727 #           "transferred":123,
728 #           "remaining":123,
729 #           "total":246,
730 #           "total-time":12345,
731 #           "setup-time":12345,
732 #           "downtime":12345,
733 #           "duplicate":123,
734 #           "normal":123,
735 #           "normal-bytes":123456,
736 #           "dirty-sync-count":15
737 #         }
738 #      }
739 #    }
741 # 3. Migration is done and has failed
743 # -> { "execute": "query-migrate" }
744 # <- { "return": { "status": "failed" } }
746 # 4. Migration is being performed and is not a block migration:
748 # -> { "execute": "query-migrate" }
749 # <- {
750 #       "return":{
751 #          "status":"active",
752 #          "ram":{
753 #             "transferred":123,
754 #             "remaining":123,
755 #             "total":246,
756 #             "total-time":12345,
757 #             "setup-time":12345,
758 #             "expected-downtime":12345,
759 #             "duplicate":123,
760 #             "normal":123,
761 #             "normal-bytes":123456,
762 #             "dirty-sync-count":15
763 #          }
764 #       }
765 #    }
767 # 5. Migration is being performed and is a block migration:
769 # -> { "execute": "query-migrate" }
770 # <- {
771 #       "return":{
772 #          "status":"active",
773 #          "ram":{
774 #             "total":1057024,
775 #             "remaining":1053304,
776 #             "transferred":3720,
777 #             "total-time":12345,
778 #             "setup-time":12345,
779 #             "expected-downtime":12345,
780 #             "duplicate":123,
781 #             "normal":123,
782 #             "normal-bytes":123456,
783 #             "dirty-sync-count":15
784 #          },
785 #          "disk":{
786 #             "total":20971520,
787 #             "remaining":20880384,
788 #             "transferred":91136
789 #          }
790 #       }
791 #    }
793 # 6. Migration is being performed and XBZRLE is active:
795 # -> { "execute": "query-migrate" }
796 # <- {
797 #       "return":{
798 #          "status":"active",
799 #          "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
800 #          "ram":{
801 #             "total":1057024,
802 #             "remaining":1053304,
803 #             "transferred":3720,
804 #             "total-time":12345,
805 #             "setup-time":12345,
806 #             "expected-downtime":12345,
807 #             "duplicate":10,
808 #             "normal":3333,
809 #             "normal-bytes":3412992,
810 #             "dirty-sync-count":15
811 #          },
812 #          "xbzrle-cache":{
813 #             "cache-size":67108864,
814 #             "bytes":20971520,
815 #             "pages":2444343,
816 #             "cache-miss":2244,
817 #             "cache-miss-rate":0.123,
818 #             "overflow":34434
819 #          }
820 #       }
821 #    }
824 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
827 # @MigrationCapability:
829 # Migration capabilities enumeration
831 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
832 #          This feature allows us to minimize migration traffic for certain work
833 #          loads, by sending compressed difference of the pages
835 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
836 #          mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
837 #          Disabled by default. (since 2.0)
839 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
840 #          essentially saves 1MB of zeroes per block on the wire. Enabling requires
841 #          source and target VM to support this feature. To enable it is sufficient
842 #          to enable the capability on the source VM. The feature is disabled by
843 #          default. (since 1.6)
845 # @compress: Use multiple compression threads to accelerate live migration.
846 #          This feature can help to reduce the migration traffic, by sending
847 #          compressed pages. Please note that if compress and xbzrle are both
848 #          on, compress only takes effect in the ram bulk stage, after that,
849 #          it will be disabled and only xbzrle takes effect, this can help to
850 #          minimize migration traffic. The feature is disabled by default.
851 #          (since 2.4 )
853 # @events: generate events for each migration state change
854 #          (since 2.4 )
856 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
857 #          to speed up convergence of RAM migration. (since 1.6)
859 # @postcopy-ram: Start executing on the migration target before all of RAM has
860 #          been migrated, pulling the remaining pages along as needed. NOTE: If
861 #          the migration fails during postcopy the VM will fail.  (since 2.6)
863 # @x-colo: If enabled, migration will never end, and the state of the VM on the
864 #        primary side will be migrated continuously to the VM on secondary
865 #        side, this process is called COarse-Grain LOck Stepping (COLO) for
866 #        Non-stop Service. (since 2.8)
868 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
869 #        during postcopy-ram migration. (since 2.9)
871 # Since: 1.2
873 { 'enum': 'MigrationCapability',
874   'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
875            'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram'] }
878 # @MigrationCapabilityStatus:
880 # Migration capability information
882 # @capability: capability enum
884 # @state: capability state bool
886 # Since: 1.2
888 { 'struct': 'MigrationCapabilityStatus',
889   'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
892 # @migrate-set-capabilities:
894 # Enable/Disable the following migration capabilities (like xbzrle)
896 # @capabilities: json array of capability modifications to make
898 # Since: 1.2
900 # Example:
902 # -> { "execute": "migrate-set-capabilities" , "arguments":
903 #      { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
906 { 'command': 'migrate-set-capabilities',
907   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
910 # @query-migrate-capabilities:
912 # Returns information about the current migration capabilities status
914 # Returns: @MigrationCapabilitiesStatus
916 # Since: 1.2
918 # Example:
920 # -> { "execute": "query-migrate-capabilities" }
921 # <- { "return": [
922 #       {"state": false, "capability": "xbzrle"},
923 #       {"state": false, "capability": "rdma-pin-all"},
924 #       {"state": false, "capability": "auto-converge"},
925 #       {"state": false, "capability": "zero-blocks"},
926 #       {"state": false, "capability": "compress"},
927 #       {"state": true, "capability": "events"},
928 #       {"state": false, "capability": "postcopy-ram"},
929 #       {"state": false, "capability": "x-colo"}
930 #    ]}
933 { 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}
936 # @MigrationParameter:
938 # Migration parameters enumeration
940 # @compress-level: Set the compression level to be used in live migration,
941 #          the compression level is an integer between 0 and 9, where 0 means
942 #          no compression, 1 means the best compression speed, and 9 means best
943 #          compression ratio which will consume more CPU.
945 # @compress-threads: Set compression thread count to be used in live migration,
946 #          the compression thread count is an integer between 1 and 255.
948 # @decompress-threads: Set decompression thread count to be used in live
949 #          migration, the decompression thread count is an integer between 1
950 #          and 255. Usually, decompression is at least 4 times as fast as
951 #          compression, so set the decompress-threads to the number about 1/4
952 #          of compress-threads is adequate.
954 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
955 #                        when migration auto-converge is activated. The
956 #                        default value is 20. (Since 2.7)
958 # @cpu-throttle-increment: throttle percentage increase each time
959 #                          auto-converge detects that migration is not making
960 #                          progress. The default value is 10. (Since 2.7)
962 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
963 #             establishing a TLS connection over the migration data channel.
964 #             On the outgoing side of the migration, the credentials must
965 #             be for a 'client' endpoint, while for the incoming side the
966 #             credentials must be for a 'server' endpoint. Setting this
967 #             will enable TLS for all migrations. The default is unset,
968 #             resulting in unsecured migration at the QEMU level. (Since 2.7)
970 # @tls-hostname: hostname of the target host for the migration. This is
971 #                required when using x509 based TLS credentials and the
972 #                migration URI does not already include a hostname. For
973 #                example if using fd: or exec: based migration, the
974 #                hostname must be provided so that the server's x509
975 #                certificate identity can be validated. (Since 2.7)
977 # @max-bandwidth: to set maximum speed for migration. maximum speed in
978 #                 bytes per second. (Since 2.8)
980 # @downtime-limit: set maximum tolerated downtime for migration. maximum
981 #                  downtime in milliseconds (Since 2.8)
983 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
984 #          periodic mode. (Since 2.8)
986 # Since: 2.4
988 { 'enum': 'MigrationParameter',
989   'data': ['compress-level', 'compress-threads', 'decompress-threads',
990            'cpu-throttle-initial', 'cpu-throttle-increment',
991            'tls-creds', 'tls-hostname', 'max-bandwidth',
992            'downtime-limit', 'x-checkpoint-delay' ] }
995 # @migrate-set-parameters:
997 # Set various migration parameters.  See MigrationParameters for details.
999 # Since: 2.4
1001 # Example:
1003 # -> { "execute": "migrate-set-parameters" ,
1004 #      "arguments": { "compress-level": 1 } }
1007 { 'command': 'migrate-set-parameters', 'boxed': true,
1008   'data': 'MigrationParameters' }
1011 # @MigrationParameters:
1013 # Optional members can be omitted on input ('migrate-set-parameters')
1014 # but most members will always be present on output
1015 # ('query-migrate-parameters'), with the exception of tls-creds and
1016 # tls-hostname.
1018 # @compress-level: #optional compression level
1020 # @compress-threads: #optional compression thread count
1022 # @decompress-threads: #optional decompression thread count
1024 # @cpu-throttle-initial: #optional Initial percentage of time guest cpus are
1025 #                        throttledwhen migration auto-converge is activated.
1026 #                        The default value is 20. (Since 2.7)
1028 # @cpu-throttle-increment: #optional throttle percentage increase each time
1029 #                          auto-converge detects that migration is not making
1030 #                          progress. The default value is 10. (Since 2.7)
1032 # @tls-creds: #optional ID of the 'tls-creds' object that provides credentials
1033 #             for establishing a TLS connection over the migration data
1034 #             channel. On the outgoing side of the migration, the credentials
1035 #             must be for a 'client' endpoint, while for the incoming side the
1036 #             credentials must be for a 'server' endpoint. Setting this
1037 #             will enable TLS for all migrations. The default is unset,
1038 #             resulting in unsecured migration at the QEMU level. (Since 2.7)
1039 #             An empty string means that QEMU will use plain text mode for
1040 #             migration, rather than TLS (Since 2.9)
1042 # @tls-hostname: #optional hostname of the target host for the migration. This
1043 #                is required when using x509 based TLS credentials and the
1044 #                migration URI does not already include a hostname. For
1045 #                example if using fd: or exec: based migration, the
1046 #                hostname must be provided so that the server's x509
1047 #                certificate identity can be validated. (Since 2.7)
1048 #                An empty string means that QEMU will use the hostname
1049 #                associated with the migration URI, if any. (Since 2.9)
1051 # @max-bandwidth: to set maximum speed for migration. maximum speed in
1052 #                 bytes per second. (Since 2.8)
1054 # @downtime-limit: set maximum tolerated downtime for migration. maximum
1055 #                  downtime in milliseconds (Since 2.8)
1057 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
1059 # Since: 2.4
1061 { 'struct': 'MigrationParameters',
1062   'data': { '*compress-level': 'int',
1063             '*compress-threads': 'int',
1064             '*decompress-threads': 'int',
1065             '*cpu-throttle-initial': 'int',
1066             '*cpu-throttle-increment': 'int',
1067             '*tls-creds': 'str',
1068             '*tls-hostname': 'str',
1069             '*max-bandwidth': 'int',
1070             '*downtime-limit': 'int',
1071             '*x-checkpoint-delay': 'int'} }
1074 # @query-migrate-parameters:
1076 # Returns information about the current migration parameters
1078 # Returns: @MigrationParameters
1080 # Since: 2.4
1082 # Example:
1084 # -> { "execute": "query-migrate-parameters" }
1085 # <- { "return": {
1086 #          "decompress-threads": 2,
1087 #          "cpu-throttle-increment": 10,
1088 #          "compress-threads": 8,
1089 #          "compress-level": 1,
1090 #          "cpu-throttle-initial": 20,
1091 #          "max-bandwidth": 33554432,
1092 #          "downtime-limit": 300
1093 #       }
1094 #    }
1097 { 'command': 'query-migrate-parameters',
1098   'returns': 'MigrationParameters' }
1101 # @client_migrate_info:
1103 # Set migration information for remote display.  This makes the server
1104 # ask the client to automatically reconnect using the new parameters
1105 # once migration finished successfully.  Only implemented for SPICE.
1107 # @protocol:     must be "spice"
1108 # @hostname:     migration target hostname
1109 # @port:         #optional spice tcp port for plaintext channels
1110 # @tls-port:     #optional spice tcp port for tls-secured channels
1111 # @cert-subject: #optional server certificate subject
1113 # Since: 0.14.0
1115 # Example:
1117 # -> { "execute": "client_migrate_info",
1118 #      "arguments": { "protocol": "spice",
1119 #                     "hostname": "virt42.lab.kraxel.org",
1120 #                     "port": 1234 } }
1121 # <- { "return": {} }
1124 { 'command': 'client_migrate_info',
1125   'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
1126             '*tls-port': 'int', '*cert-subject': 'str' } }
1129 # @migrate-start-postcopy:
1131 # Followup to a migration command to switch the migration to postcopy mode.
1132 # The postcopy-ram capability must be set before the original migration
1133 # command.
1135 # Since: 2.5
1137 # Example:
1139 # -> { "execute": "migrate-start-postcopy" }
1140 # <- { "return": {} }
1143 { 'command': 'migrate-start-postcopy' }
1146 # @COLOMessage:
1148 # The message transmission between Primary side and Secondary side.
1150 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
1152 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
1154 # @checkpoint-reply: SVM gets PVM's checkpoint request
1156 # @vmstate-send: VM's state will be sent by PVM.
1158 # @vmstate-size: The total size of VMstate.
1160 # @vmstate-received: VM's state has been received by SVM.
1162 # @vmstate-loaded: VM's state has been loaded by SVM.
1164 # Since: 2.8
1166 { 'enum': 'COLOMessage',
1167   'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
1168             'vmstate-send', 'vmstate-size', 'vmstate-received',
1169             'vmstate-loaded' ] }
1172 # @COLOMode:
1174 # The colo mode
1176 # @unknown: unknown mode
1178 # @primary: master side
1180 # @secondary: slave side
1182 # Since: 2.8
1184 { 'enum': 'COLOMode',
1185   'data': [ 'unknown', 'primary', 'secondary'] }
1188 # @FailoverStatus:
1190 # An enumeration of COLO failover status
1192 # @none: no failover has ever happened
1194 # @require: got failover requirement but not handled
1196 # @active: in the process of doing failover
1198 # @completed: finish the process of failover
1200 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
1202 # Since: 2.8
1204 { 'enum': 'FailoverStatus',
1205   'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
1208 # @x-colo-lost-heartbeat:
1210 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
1211 # If this command is sent to the PVM, the Primary side will exit COLO mode.
1212 # If sent to the Secondary, the Secondary side will run failover work,
1213 # then takes over server operation to become the service VM.
1215 # Since: 2.8
1217 # Example:
1219 # -> { "execute": "x-colo-lost-heartbeat" }
1220 # <- { "return": {} }
1223 { 'command': 'x-colo-lost-heartbeat' }
1226 # @MouseInfo:
1228 # Information about a mouse device.
1230 # @name: the name of the mouse device
1232 # @index: the index of the mouse device
1234 # @current: true if this device is currently receiving mouse events
1236 # @absolute: true if this device supports absolute coordinates as input
1238 # Since: 0.14.0
1240 { 'struct': 'MouseInfo',
1241   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
1242            'absolute': 'bool'} }
1245 # @query-mice:
1247 # Returns information about each active mouse device
1249 # Returns: a list of @MouseInfo for each device
1251 # Since: 0.14.0
1253 # Example:
1255 # -> { "execute": "query-mice" }
1256 # <- { "return": [
1257 #          {
1258 #             "name":"QEMU Microsoft Mouse",
1259 #             "index":0,
1260 #             "current":false,
1261 #             "absolute":false
1262 #          },
1263 #          {
1264 #             "name":"QEMU PS/2 Mouse",
1265 #             "index":1,
1266 #             "current":true,
1267 #             "absolute":true
1268 #          }
1269 #       ]
1270 #    }
1273 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
1276 # @CpuInfoArch:
1278 # An enumeration of cpu types that enable additional information during
1279 # @query-cpus.
1281 # Since: 2.6
1283 { 'enum': 'CpuInfoArch',
1284   'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
1287 # @CpuInfo:
1289 # Information about a virtual CPU
1291 # @CPU: the index of the virtual CPU
1293 # @current: this only exists for backwards compatibility and should be ignored
1295 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
1296 #          to a processor specific low power mode.
1298 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
1300 # @thread_id: ID of the underlying host thread
1302 # @arch: architecture of the cpu, which determines which additional fields
1303 #        will be listed (since 2.6)
1305 # Since: 0.14.0
1307 # Notes: @halted is a transient state that changes frequently.  By the time the
1308 #        data is sent to the client, the guest may no longer be halted.
1310 { 'union': 'CpuInfo',
1311   'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
1312            'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' },
1313   'discriminator': 'arch',
1314   'data': { 'x86': 'CpuInfoX86',
1315             'sparc': 'CpuInfoSPARC',
1316             'ppc': 'CpuInfoPPC',
1317             'mips': 'CpuInfoMIPS',
1318             'tricore': 'CpuInfoTricore',
1319             'other': 'CpuInfoOther' } }
1322 # @CpuInfoX86:
1324 # Additional information about a virtual i386 or x86_64 CPU
1326 # @pc: the 64-bit instruction pointer
1328 # Since: 2.6
1330 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
1333 # @CpuInfoSPARC:
1335 # Additional information about a virtual SPARC CPU
1337 # @pc: the PC component of the instruction pointer
1339 # @npc: the NPC component of the instruction pointer
1341 # Since: 2.6
1343 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
1346 # @CpuInfoPPC:
1348 # Additional information about a virtual PPC CPU
1350 # @nip: the instruction pointer
1352 # Since: 2.6
1354 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
1357 # @CpuInfoMIPS:
1359 # Additional information about a virtual MIPS CPU
1361 # @PC: the instruction pointer
1363 # Since: 2.6
1365 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
1368 # @CpuInfoTricore:
1370 # Additional information about a virtual Tricore CPU
1372 # @PC: the instruction pointer
1374 # Since: 2.6
1376 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
1379 # @CpuInfoOther:
1381 # No additional information is available about the virtual CPU
1383 # Since: 2.6
1386 { 'struct': 'CpuInfoOther', 'data': { } }
1389 # @query-cpus:
1391 # Returns a list of information about each virtual CPU.
1393 # Returns: a list of @CpuInfo for each virtual CPU
1395 # Since: 0.14.0
1397 # Example:
1399 # -> { "execute": "query-cpus" }
1400 # <- { "return": [
1401 #          {
1402 #             "CPU":0,
1403 #             "current":true,
1404 #             "halted":false,
1405 #             "qom_path":"/machine/unattached/device[0]",
1406 #             "arch":"x86",
1407 #             "pc":3227107138,
1408 #             "thread_id":3134
1409 #          },
1410 #          {
1411 #             "CPU":1,
1412 #             "current":false,
1413 #             "halted":true,
1414 #             "qom_path":"/machine/unattached/device[2]",
1415 #             "arch":"x86",
1416 #             "pc":7108165,
1417 #             "thread_id":3135
1418 #          }
1419 #       ]
1420 #    }
1423 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
1426 # @IOThreadInfo:
1428 # Information about an iothread
1430 # @id: the identifier of the iothread
1432 # @thread-id: ID of the underlying host thread
1434 # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
1435 #               (since 2.9)
1437 # @poll-grow: how many ns will be added to polling time, 0 means that it's not
1438 #             configured (since 2.9)
1440 # @poll-shrink: how many ns will be removed from polling time, 0 means that
1441 #               it's not configured (since 2.9)
1443 # Since: 2.0
1445 { 'struct': 'IOThreadInfo',
1446   'data': {'id': 'str',
1447            'thread-id': 'int',
1448            'poll-max-ns': 'int',
1449            'poll-grow': 'int',
1450            'poll-shrink': 'int' } }
1453 # @query-iothreads:
1455 # Returns a list of information about each iothread.
1457 # Note: this list excludes the QEMU main loop thread, which is not declared
1458 # using the -object iothread command-line option.  It is always the main thread
1459 # of the process.
1461 # Returns: a list of @IOThreadInfo for each iothread
1463 # Since: 2.0
1465 # Example:
1467 # -> { "execute": "query-iothreads" }
1468 # <- { "return": [
1469 #          {
1470 #             "id":"iothread0",
1471 #             "thread-id":3134
1472 #          },
1473 #          {
1474 #             "id":"iothread1",
1475 #             "thread-id":3135
1476 #          }
1477 #       ]
1478 #    }
1481 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
1484 # @NetworkAddressFamily:
1486 # The network address family
1488 # @ipv4: IPV4 family
1490 # @ipv6: IPV6 family
1492 # @unix: unix socket
1494 # @vsock: vsock family (since 2.8)
1496 # @unknown: otherwise
1498 # Since: 2.1
1500 { 'enum': 'NetworkAddressFamily',
1501   'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
1504 # @VncBasicInfo:
1506 # The basic information for vnc network connection
1508 # @host: IP address
1510 # @service: The service name of the vnc port. This may depend on the host
1511 #           system's service database so symbolic names should not be relied
1512 #           on.
1514 # @family: address family
1516 # @websocket: true in case the socket is a websocket (since 2.3).
1518 # Since: 2.1
1520 { 'struct': 'VncBasicInfo',
1521   'data': { 'host': 'str',
1522             'service': 'str',
1523             'family': 'NetworkAddressFamily',
1524             'websocket': 'bool' } }
1527 # @VncServerInfo:
1529 # The network connection information for server
1531 # @auth: #optional authentication method used for
1532 #        the plain (non-websocket) VNC server
1534 # Since: 2.1
1536 { 'struct': 'VncServerInfo',
1537   'base': 'VncBasicInfo',
1538   'data': { '*auth': 'str' } }
1541 # @VncClientInfo:
1543 # Information about a connected VNC client.
1545 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
1546 #              Name of the client.
1548 # @sasl_username: #optional If SASL authentication is in use, the SASL username
1549 #                 used for authentication.
1551 # Since: 0.14.0
1553 { 'struct': 'VncClientInfo',
1554   'base': 'VncBasicInfo',
1555   'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1558 # @VncInfo:
1560 # Information about the VNC session.
1562 # @enabled: true if the VNC server is enabled, false otherwise
1564 # @host: #optional The hostname the VNC server is bound to.  This depends on
1565 #        the name resolution on the host and may be an IP address.
1567 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
1568 #                    'ipv4' if the host is listening for IPv4 connections
1569 #                    'unix' if the host is listening on a unix domain socket
1570 #                    'unknown' otherwise
1572 # @service: #optional The service name of the server's port.  This may depends
1573 #           on the host system's service database so symbolic names should not
1574 #           be relied on.
1576 # @auth: #optional the current authentication type used by the server
1577 #        'none' if no authentication is being used
1578 #        'vnc' if VNC authentication is being used
1579 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
1580 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1581 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1582 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1583 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1584 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1585 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1586 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1587 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1589 # @clients: a list of @VncClientInfo of all currently connected clients
1591 # Since: 0.14.0
1593 { 'struct': 'VncInfo',
1594   'data': {'enabled': 'bool', '*host': 'str',
1595            '*family': 'NetworkAddressFamily',
1596            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1599 # @VncPrimaryAuth:
1601 # vnc primary authentication method.
1603 # Since: 2.3
1605 { 'enum': 'VncPrimaryAuth',
1606   'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1607             'tls', 'vencrypt', 'sasl' ] }
1610 # @VncVencryptSubAuth:
1612 # vnc sub authentication method with vencrypt.
1614 # Since: 2.3
1616 { 'enum': 'VncVencryptSubAuth',
1617   'data': [ 'plain',
1618             'tls-none',  'x509-none',
1619             'tls-vnc',   'x509-vnc',
1620             'tls-plain', 'x509-plain',
1621             'tls-sasl',  'x509-sasl' ] }
1625 # @VncServerInfo2:
1627 # The network connection information for server
1629 # @auth: The current authentication type used by the servers
1631 # @vencrypt: #optional The vencrypt sub authentication type used by the
1632 #            servers, only specified in case auth == vencrypt.
1634 # Since: 2.9
1636 { 'struct': 'VncServerInfo2',
1637   'base': 'VncBasicInfo',
1638   'data': { 'auth'      : 'VncPrimaryAuth',
1639             '*vencrypt' : 'VncVencryptSubAuth' } }
1643 # @VncInfo2:
1645 # Information about a vnc server
1647 # @id: vnc server name.
1649 # @server: A list of @VncBasincInfo describing all listening sockets.
1650 #          The list can be empty (in case the vnc server is disabled).
1651 #          It also may have multiple entries: normal + websocket,
1652 #          possibly also ipv4 + ipv6 in the future.
1654 # @clients: A list of @VncClientInfo of all currently connected clients.
1655 #           The list can be empty, for obvious reasons.
1657 # @auth: The current authentication type used by the non-websockets servers
1659 # @vencrypt: #optional The vencrypt authentication type used by the servers,
1660 #            only specified in case auth == vencrypt.
1662 # @display: #optional The display device the vnc server is linked to.
1664 # Since: 2.3
1666 { 'struct': 'VncInfo2',
1667   'data': { 'id'        : 'str',
1668             'server'    : ['VncServerInfo2'],
1669             'clients'   : ['VncClientInfo'],
1670             'auth'      : 'VncPrimaryAuth',
1671             '*vencrypt' : 'VncVencryptSubAuth',
1672             '*display'  : 'str' } }
1675 # @query-vnc:
1677 # Returns information about the current VNC server
1679 # Returns: @VncInfo
1681 # Since: 0.14.0
1683 # Example:
1685 # -> { "execute": "query-vnc" }
1686 # <- { "return": {
1687 #          "enabled":true,
1688 #          "host":"0.0.0.0",
1689 #          "service":"50402",
1690 #          "auth":"vnc",
1691 #          "family":"ipv4",
1692 #          "clients":[
1693 #             {
1694 #                "host":"127.0.0.1",
1695 #                "service":"50401",
1696 #                "family":"ipv4"
1697 #             }
1698 #          ]
1699 #       }
1700 #    }
1703 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1706 # @query-vnc-servers:
1708 # Returns a list of vnc servers.  The list can be empty.
1710 # Returns: a list of @VncInfo2
1712 # Since: 2.3
1714 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1717 # @SpiceBasicInfo:
1719 # The basic information for SPICE network connection
1721 # @host: IP address
1723 # @port: port number
1725 # @family: address family
1727 # Since: 2.1
1729 { 'struct': 'SpiceBasicInfo',
1730   'data': { 'host': 'str',
1731             'port': 'str',
1732             'family': 'NetworkAddressFamily' } }
1735 # @SpiceServerInfo:
1737 # Information about a SPICE server
1739 # @auth: #optional authentication method
1741 # Since: 2.1
1743 { 'struct': 'SpiceServerInfo',
1744   'base': 'SpiceBasicInfo',
1745   'data': { '*auth': 'str' } }
1748 # @SpiceChannel:
1750 # Information about a SPICE client channel.
1752 # @connection-id: SPICE connection id number.  All channels with the same id
1753 #                 belong to the same SPICE session.
1755 # @channel-type: SPICE channel type number.  "1" is the main control
1756 #                channel, filter for this one if you want to track spice
1757 #                sessions only
1759 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
1760 #              multiple channels of the same type exist, such as multiple
1761 #              display channels in a multihead setup
1763 # @tls: true if the channel is encrypted, false otherwise.
1765 # Since: 0.14.0
1767 { 'struct': 'SpiceChannel',
1768   'base': 'SpiceBasicInfo',
1769   'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1770            'tls': 'bool'} }
1773 # @SpiceQueryMouseMode:
1775 # An enumeration of Spice mouse states.
1777 # @client: Mouse cursor position is determined by the client.
1779 # @server: Mouse cursor position is determined by the server.
1781 # @unknown: No information is available about mouse mode used by
1782 #           the spice server.
1784 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1786 # Since: 1.1
1788 { 'enum': 'SpiceQueryMouseMode',
1789   'data': [ 'client', 'server', 'unknown' ] }
1792 # @SpiceInfo:
1794 # Information about the SPICE session.
1796 # @enabled: true if the SPICE server is enabled, false otherwise
1798 # @migrated: true if the last guest migration completed and spice
1799 #            migration had completed as well. false otherwise. (since 1.4)
1801 # @host: #optional The hostname the SPICE server is bound to.  This depends on
1802 #        the name resolution on the host and may be an IP address.
1804 # @port: #optional The SPICE server's port number.
1806 # @compiled-version: #optional SPICE server version.
1808 # @tls-port: #optional The SPICE server's TLS port number.
1810 # @auth: #optional the current authentication type used by the server
1811 #        'none'  if no authentication is being used
1812 #        'spice' uses SASL or direct TLS authentication, depending on command
1813 #                line options
1815 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1816 #              be determined by the client or the server, or unknown if spice
1817 #              server doesn't provide this information. (since: 1.1)
1819 # @channels: a list of @SpiceChannel for each active spice channel
1821 # Since: 0.14.0
1823 { 'struct': 'SpiceInfo',
1824   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1825            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1826            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1829 # @query-spice:
1831 # Returns information about the current SPICE server
1833 # Returns: @SpiceInfo
1835 # Since: 0.14.0
1837 # Example:
1839 # -> { "execute": "query-spice" }
1840 # <- { "return": {
1841 #          "enabled": true,
1842 #          "auth": "spice",
1843 #          "port": 5920,
1844 #          "tls-port": 5921,
1845 #          "host": "0.0.0.0",
1846 #          "channels": [
1847 #             {
1848 #                "port": "54924",
1849 #                "family": "ipv4",
1850 #                "channel-type": 1,
1851 #                "connection-id": 1804289383,
1852 #                "host": "127.0.0.1",
1853 #                "channel-id": 0,
1854 #                "tls": true
1855 #             },
1856 #             {
1857 #                "port": "36710",
1858 #                "family": "ipv4",
1859 #                "channel-type": 4,
1860 #                "connection-id": 1804289383,
1861 #                "host": "127.0.0.1",
1862 #                "channel-id": 0,
1863 #                "tls": false
1864 #             },
1865 #             [ ... more channels follow ... ]
1866 #          ]
1867 #       }
1868 #    }
1871 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1874 # @BalloonInfo:
1876 # Information about the guest balloon device.
1878 # @actual: the number of bytes the balloon currently contains
1880 # Since: 0.14.0
1883 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1886 # @query-balloon:
1888 # Return information about the balloon device.
1890 # Returns: @BalloonInfo on success
1892 #          If the balloon driver is enabled but not functional because the KVM
1893 #          kernel module cannot support it, KvmMissingCap
1895 #          If no balloon device is present, DeviceNotActive
1897 # Since: 0.14.0
1899 # Example:
1901 # -> { "execute": "query-balloon" }
1902 # <- { "return": {
1903 #          "actual": 1073741824,
1904 #       }
1905 #    }
1908 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1911 # @PciMemoryRange:
1913 # A PCI device memory region
1915 # @base: the starting address (guest physical)
1917 # @limit: the ending address (guest physical)
1919 # Since: 0.14.0
1921 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1924 # @PciMemoryRegion:
1926 # Information about a PCI device I/O region.
1928 # @bar: the index of the Base Address Register for this region
1930 # @type: 'io' if the region is a PIO region
1931 #        'memory' if the region is a MMIO region
1933 # @size: memory size
1935 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1937 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1939 # Since: 0.14.0
1941 { 'struct': 'PciMemoryRegion',
1942   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1943            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1946 # @PciBusInfo:
1948 # Information about a bus of a PCI Bridge device
1950 # @number: primary bus interface number.  This should be the number of the
1951 #          bus the device resides on.
1953 # @secondary: secondary bus interface number.  This is the number of the
1954 #             main bus for the bridge
1956 # @subordinate: This is the highest number bus that resides below the
1957 #               bridge.
1959 # @io_range: The PIO range for all devices on this bridge
1961 # @memory_range: The MMIO range for all devices on this bridge
1963 # @prefetchable_range: The range of prefetchable MMIO for all devices on
1964 #                      this bridge
1966 # Since: 2.4
1968 { 'struct': 'PciBusInfo',
1969   'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1970            'io_range': 'PciMemoryRange',
1971            'memory_range': 'PciMemoryRange',
1972            'prefetchable_range': 'PciMemoryRange' } }
1975 # @PciBridgeInfo:
1977 # Information about a PCI Bridge device
1979 # @bus: information about the bus the device resides on
1981 # @devices: a list of @PciDeviceInfo for each device on this bridge
1983 # Since: 0.14.0
1985 { 'struct': 'PciBridgeInfo',
1986   'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
1989 # @PciDeviceClass:
1991 # Information about the Class of a PCI device
1993 # @desc: #optional a string description of the device's class
1995 # @class: the class code of the device
1997 # Since: 2.4
1999 { 'struct': 'PciDeviceClass',
2000   'data': {'*desc': 'str', 'class': 'int'} }
2003 # @PciDeviceId:
2005 # Information about the Id of a PCI device
2007 # @device: the PCI device id
2009 # @vendor: the PCI vendor id
2011 # Since: 2.4
2013 { 'struct': 'PciDeviceId',
2014   'data': {'device': 'int', 'vendor': 'int'} }
2017 # @PciDeviceInfo:
2019 # Information about a PCI device
2021 # @bus: the bus number of the device
2023 # @slot: the slot the device is located in
2025 # @function: the function of the slot used by the device
2027 # @class_info: the class of the device
2029 # @id: the PCI device id
2031 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
2033 # @qdev_id: the device name of the PCI device
2035 # @pci_bridge: if the device is a PCI bridge, the bridge information
2037 # @regions: a list of the PCI I/O regions associated with the device
2039 # Notes: the contents of @class_info.desc are not stable and should only be
2040 #        treated as informational.
2042 # Since: 0.14.0
2044 { 'struct': 'PciDeviceInfo',
2045   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
2046            'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
2047            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
2048            'regions': ['PciMemoryRegion']} }
2051 # @PciInfo:
2053 # Information about a PCI bus
2055 # @bus: the bus index
2057 # @devices: a list of devices on this bus
2059 # Since: 0.14.0
2061 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
2064 # @query-pci:
2066 # Return information about the PCI bus topology of the guest.
2068 # Returns: a list of @PciInfo for each PCI bus. Each bus is
2069 # represented by a json-object, which has a key with a json-array of
2070 # all PCI devices attached to it. Each device is represented by a
2071 # json-object.
2073 # Since: 0.14.0
2075 # Example:
2077 # -> { "execute": "query-pci" }
2078 # <- { "return": [
2079 #          {
2080 #             "bus": 0,
2081 #             "devices": [
2082 #                {
2083 #                   "bus": 0,
2084 #                   "qdev_id": "",
2085 #                   "slot": 0,
2086 #                   "class_info": {
2087 #                      "class": 1536,
2088 #                      "desc": "Host bridge"
2089 #                   },
2090 #                   "id": {
2091 #                      "device": 32902,
2092 #                      "vendor": 4663
2093 #                   },
2094 #                   "function": 0,
2095 #                   "regions": [
2096 #                   ]
2097 #                },
2098 #                {
2099 #                   "bus": 0,
2100 #                   "qdev_id": "",
2101 #                   "slot": 1,
2102 #                   "class_info": {
2103 #                      "class": 1537,
2104 #                      "desc": "ISA bridge"
2105 #                   },
2106 #                   "id": {
2107 #                      "device": 32902,
2108 #                      "vendor": 28672
2109 #                   },
2110 #                   "function": 0,
2111 #                   "regions": [
2112 #                   ]
2113 #                },
2114 #                {
2115 #                   "bus": 0,
2116 #                   "qdev_id": "",
2117 #                   "slot": 1,
2118 #                   "class_info": {
2119 #                      "class": 257,
2120 #                      "desc": "IDE controller"
2121 #                   },
2122 #                   "id": {
2123 #                      "device": 32902,
2124 #                      "vendor": 28688
2125 #                   },
2126 #                   "function": 1,
2127 #                   "regions": [
2128 #                      {
2129 #                         "bar": 4,
2130 #                         "size": 16,
2131 #                         "address": 49152,
2132 #                         "type": "io"
2133 #                      }
2134 #                   ]
2135 #                },
2136 #                {
2137 #                   "bus": 0,
2138 #                   "qdev_id": "",
2139 #                   "slot": 2,
2140 #                   "class_info": {
2141 #                      "class": 768,
2142 #                      "desc": "VGA controller"
2143 #                   },
2144 #                   "id": {
2145 #                      "device": 4115,
2146 #                      "vendor": 184
2147 #                   },
2148 #                   "function": 0,
2149 #                   "regions": [
2150 #                      {
2151 #                         "prefetch": true,
2152 #                         "mem_type_64": false,
2153 #                         "bar": 0,
2154 #                         "size": 33554432,
2155 #                         "address": 4026531840,
2156 #                         "type": "memory"
2157 #                      },
2158 #                      {
2159 #                         "prefetch": false,
2160 #                         "mem_type_64": false,
2161 #                         "bar": 1,
2162 #                         "size": 4096,
2163 #                         "address": 4060086272,
2164 #                         "type": "memory"
2165 #                      },
2166 #                      {
2167 #                         "prefetch": false,
2168 #                         "mem_type_64": false,
2169 #                         "bar": 6,
2170 #                         "size": 65536,
2171 #                         "address": -1,
2172 #                         "type": "memory"
2173 #                      }
2174 #                   ]
2175 #                },
2176 #                {
2177 #                   "bus": 0,
2178 #                   "qdev_id": "",
2179 #                   "irq": 11,
2180 #                   "slot": 4,
2181 #                   "class_info": {
2182 #                      "class": 1280,
2183 #                      "desc": "RAM controller"
2184 #                   },
2185 #                   "id": {
2186 #                      "device": 6900,
2187 #                      "vendor": 4098
2188 #                   },
2189 #                   "function": 0,
2190 #                   "regions": [
2191 #                      {
2192 #                         "bar": 0,
2193 #                         "size": 32,
2194 #                         "address": 49280,
2195 #                         "type": "io"
2196 #                      }
2197 #                   ]
2198 #                }
2199 #             ]
2200 #          }
2201 #       ]
2202 #    }
2204 # Note: This example has been shortened as the real response is too long.
2207 { 'command': 'query-pci', 'returns': ['PciInfo'] }
2210 # @quit:
2212 # This command will cause the QEMU process to exit gracefully.  While every
2213 # attempt is made to send the QMP response before terminating, this is not
2214 # guaranteed.  When using this interface, a premature EOF would not be
2215 # unexpected.
2217 # Since: 0.14.0
2219 # Example:
2221 # -> { "execute": "quit" }
2222 # <- { "return": {} }
2224 { 'command': 'quit' }
2227 # @stop:
2229 # Stop all guest VCPU execution.
2231 # Since:  0.14.0
2233 # Notes:  This function will succeed even if the guest is already in the stopped
2234 #         state.  In "inmigrate" state, it will ensure that the guest
2235 #         remains paused once migration finishes, as if the -S option was
2236 #         passed on the command line.
2238 # Example:
2240 # -> { "execute": "stop" }
2241 # <- { "return": {} }
2244 { 'command': 'stop' }
2247 # @system_reset:
2249 # Performs a hard reset of a guest.
2251 # Since: 0.14.0
2253 # Example:
2255 # -> { "execute": "system_reset" }
2256 # <- { "return": {} }
2259 { 'command': 'system_reset' }
2262 # @system_powerdown:
2264 # Requests that a guest perform a powerdown operation.
2266 # Since: 0.14.0
2268 # Notes: A guest may or may not respond to this command.  This command
2269 #        returning does not indicate that a guest has accepted the request or
2270 #        that it has shut down.  Many guests will respond to this command by
2271 #        prompting the user in some way.
2272 # Example:
2274 # -> { "execute": "system_powerdown" }
2275 # <- { "return": {} }
2278 { 'command': 'system_powerdown' }
2281 # @cpu:
2283 # This command is a nop that is only provided for the purposes of compatibility.
2285 # Since: 0.14.0
2287 # Notes: Do not use this command.
2289 { 'command': 'cpu', 'data': {'index': 'int'} }
2292 # @cpu-add:
2294 # Adds CPU with specified ID
2296 # @id: ID of CPU to be created, valid values [0..max_cpus)
2298 # Returns: Nothing on success
2300 # Since: 1.5
2302 # Example:
2304 # -> { "execute": "cpu-add", "arguments": { "id": 2 } }
2305 # <- { "return": {} }
2308 { 'command': 'cpu-add', 'data': {'id': 'int'} }
2311 # @memsave:
2313 # Save a portion of guest memory to a file.
2315 # @val: the virtual address of the guest to start from
2317 # @size: the size of memory region to save
2319 # @filename: the file to save the memory to as binary data
2321 # @cpu-index: #optional the index of the virtual CPU to use for translating the
2322 #                       virtual address (defaults to CPU 0)
2324 # Returns: Nothing on success
2326 # Since: 0.14.0
2328 # Notes: Errors were not reliably returned until 1.1
2330 # Example:
2332 # -> { "execute": "memsave",
2333 #      "arguments": { "val": 10,
2334 #                     "size": 100,
2335 #                     "filename": "/tmp/virtual-mem-dump" } }
2336 # <- { "return": {} }
2339 { 'command': 'memsave',
2340   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
2343 # @pmemsave:
2345 # Save a portion of guest physical memory to a file.
2347 # @val: the physical address of the guest to start from
2349 # @size: the size of memory region to save
2351 # @filename: the file to save the memory to as binary data
2353 # Returns: Nothing on success
2355 # Since: 0.14.0
2357 # Notes: Errors were not reliably returned until 1.1
2359 # Example:
2361 # -> { "execute": "pmemsave",
2362 #      "arguments": { "val": 10,
2363 #                     "size": 100,
2364 #                     "filename": "/tmp/physical-mem-dump" } }
2365 # <- { "return": {} }
2368 { 'command': 'pmemsave',
2369   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
2372 # @cont:
2374 # Resume guest VCPU execution.
2376 # Since:  0.14.0
2378 # Returns:  If successful, nothing
2379 #           If QEMU was started with an encrypted block device and a key has
2380 #              not yet been set, DeviceEncrypted.
2382 # Notes:  This command will succeed if the guest is currently running.  It
2383 #         will also succeed if the guest is in the "inmigrate" state; in
2384 #         this case, the effect of the command is to make sure the guest
2385 #         starts once migration finishes, removing the effect of the -S
2386 #         command line option if it was passed.
2388 # Example:
2390 # -> { "execute": "cont" }
2391 # <- { "return": {} }
2394 { 'command': 'cont' }
2397 # @system_wakeup:
2399 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
2401 # Since:  1.1
2403 # Returns:  nothing.
2405 # Example:
2407 # -> { "execute": "system_wakeup" }
2408 # <- { "return": {} }
2411 { 'command': 'system_wakeup' }
2414 # @inject-nmi:
2416 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
2417 # The command fails when the guest doesn't support injecting.
2419 # Returns:  If successful, nothing
2421 # Since:  0.14.0
2423 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
2425 # Example:
2427 # -> { "execute": "inject-nmi" }
2428 # <- { "return": {} }
2431 { 'command': 'inject-nmi' }
2434 # @set_link:
2436 # Sets the link status of a virtual network adapter.
2438 # @name: the device name of the virtual network adapter
2440 # @up: true to set the link status to be up
2442 # Returns: Nothing on success
2443 #          If @name is not a valid network device, DeviceNotFound
2445 # Since: 0.14.0
2447 # Notes: Not all network adapters support setting link status.  This command
2448 #        will succeed even if the network adapter does not support link status
2449 #        notification.
2451 # Example:
2453 # -> { "execute": "set_link",
2454 #      "arguments": { "name": "e1000.0", "up": false } }
2455 # <- { "return": {} }
2458 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
2461 # @balloon:
2463 # Request the balloon driver to change its balloon size.
2465 # @value: the target size of the balloon in bytes
2467 # Returns: Nothing on success
2468 #          If the balloon driver is enabled but not functional because the KVM
2469 #            kernel module cannot support it, KvmMissingCap
2470 #          If no balloon device is present, DeviceNotActive
2472 # Notes: This command just issues a request to the guest.  When it returns,
2473 #        the balloon size may not have changed.  A guest can change the balloon
2474 #        size independent of this command.
2476 # Since: 0.14.0
2478 # Example:
2480 # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
2481 # <- { "return": {} }
2484 { 'command': 'balloon', 'data': {'value': 'int'} }
2487 # @Abort:
2489 # This action can be used to test transaction failure.
2491 # Since: 1.6
2493 { 'struct': 'Abort',
2494   'data': { } }
2497 # @ActionCompletionMode:
2499 # An enumeration of Transactional completion modes.
2501 # @individual: Do not attempt to cancel any other Actions if any Actions fail
2502 #              after the Transaction request succeeds. All Actions that
2503 #              can complete successfully will do so without waiting on others.
2504 #              This is the default.
2506 # @grouped: If any Action fails after the Transaction succeeds, cancel all
2507 #           Actions. Actions do not complete until all Actions are ready to
2508 #           complete. May be rejected by Actions that do not support this
2509 #           completion mode.
2511 # Since: 2.5
2513 { 'enum': 'ActionCompletionMode',
2514   'data': [ 'individual', 'grouped' ] }
2517 # @TransactionAction:
2519 # A discriminated record of operations that can be performed with
2520 # @transaction. Action @type can be:
2522 # - @abort: since 1.6
2523 # - @block-dirty-bitmap-add: since 2.5
2524 # - @block-dirty-bitmap-clear: since 2.5
2525 # - @blockdev-backup: since 2.3
2526 # - @blockdev-snapshot: since 2.5
2527 # - @blockdev-snapshot-internal-sync: since 1.7
2528 # - @blockdev-snapshot-sync: since 1.1
2529 # - @drive-backup: since 1.6
2531 # Since: 1.1
2533 { 'union': 'TransactionAction',
2534   'data': {
2535        'abort': 'Abort',
2536        'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
2537        'block-dirty-bitmap-clear': 'BlockDirtyBitmap',
2538        'blockdev-backup': 'BlockdevBackup',
2539        'blockdev-snapshot': 'BlockdevSnapshot',
2540        'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
2541        'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
2542        'drive-backup': 'DriveBackup'
2543    } }
2546 # @TransactionProperties:
2548 # Optional arguments to modify the behavior of a Transaction.
2550 # @completion-mode: #optional Controls how jobs launched asynchronously by
2551 #                   Actions will complete or fail as a group.
2552 #                   See @ActionCompletionMode for details.
2554 # Since: 2.5
2556 { 'struct': 'TransactionProperties',
2557   'data': {
2558        '*completion-mode': 'ActionCompletionMode'
2559   }
2563 # @transaction:
2565 # Executes a number of transactionable QMP commands atomically. If any
2566 # operation fails, then the entire set of actions will be abandoned and the
2567 # appropriate error returned.
2569 # For external snapshots, the dictionary contains the device, the file to use for
2570 # the new snapshot, and the format.  The default format, if not specified, is
2571 # qcow2.
2573 # Each new snapshot defaults to being created by QEMU (wiping any
2574 # contents if the file already exists), but it is also possible to reuse
2575 # an externally-created file.  In the latter case, you should ensure that
2576 # the new image file has the same contents as the current one; QEMU cannot
2577 # perform any meaningful check.  Typically this is achieved by using the
2578 # current image file as the backing file for the new image.
2580 # On failure, the original disks pre-snapshot attempt will be used.
2582 # For internal snapshots, the dictionary contains the device and the snapshot's
2583 # name.  If an internal snapshot matching name already exists, the request will
2584 # be rejected.  Only some image formats support it, for example, qcow2, rbd,
2585 # and sheepdog.
2587 # On failure, qemu will try delete the newly created internal snapshot in the
2588 # transaction.  When an I/O error occurs during deletion, the user needs to fix
2589 # it later with qemu-img or other command.
2591 # @actions: List of @TransactionAction;
2592 #           information needed for the respective operations.
2594 # @properties: #optional structure of additional options to control the
2595 #              execution of the transaction. See @TransactionProperties
2596 #              for additional detail.
2598 # Returns: nothing on success
2600 #          Errors depend on the operations of the transaction
2602 # Note: The transaction aborts on the first failure.  Therefore, there will be
2603 # information on only one failed operation returned in an error condition, and
2604 # subsequent actions will not have been attempted.
2606 # Since: 1.1
2608 # Example:
2610 # -> { "execute": "transaction",
2611 #      "arguments": { "actions": [
2612 #          { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
2613 #                                      "snapshot-file": "/some/place/my-image",
2614 #                                      "format": "qcow2" } },
2615 #          { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
2616 #                                      "snapshot-file": "/some/place/my-image2",
2617 #                                      "snapshot-node-name": "node3432",
2618 #                                      "mode": "existing",
2619 #                                      "format": "qcow2" } },
2620 #          { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
2621 #                                      "snapshot-file": "/some/place/my-image2",
2622 #                                      "mode": "existing",
2623 #                                      "format": "qcow2" } },
2624 #          { "type": "blockdev-snapshot-internal-sync", "data" : {
2625 #                                      "device": "ide-hd2",
2626 #                                      "name": "snapshot0" } } ] } }
2627 # <- { "return": {} }
2630 { 'command': 'transaction',
2631   'data': { 'actions': [ 'TransactionAction' ],
2632             '*properties': 'TransactionProperties'
2633           }
2637 # @human-monitor-command:
2639 # Execute a command on the human monitor and return the output.
2641 # @command-line: the command to execute in the human monitor
2643 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
2645 # Returns: the output of the command as a string
2647 # Since: 0.14.0
2649 # Notes: This command only exists as a stop-gap.  Its use is highly
2650 #        discouraged.  The semantics of this command are not
2651 #        guaranteed: this means that command names, arguments and
2652 #        responses can change or be removed at ANY time.  Applications
2653 #        that rely on long term stability guarantees should NOT
2654 #        use this command.
2656 #        Known limitations:
2658 #        * This command is stateless, this means that commands that depend
2659 #          on state information (such as getfd) might not work
2661 #        * Commands that prompt the user for data (eg. 'cont' when the block
2662 #          device is encrypted) don't currently work
2664 # Example:
2666 # -> { "execute": "human-monitor-command",
2667 #      "arguments": { "command-line": "info kvm" } }
2668 # <- { "return": "kvm support: enabled\r\n" }
2671 { 'command': 'human-monitor-command',
2672   'data': {'command-line': 'str', '*cpu-index': 'int'},
2673   'returns': 'str' }
2676 # @migrate_cancel:
2678 # Cancel the current executing migration process.
2680 # Returns: nothing on success
2682 # Notes: This command succeeds even if there is no migration process running.
2684 # Since: 0.14.0
2686 # Example:
2688 # -> { "execute": "migrate_cancel" }
2689 # <- { "return": {} }
2692 { 'command': 'migrate_cancel' }
2695 # @migrate_set_downtime:
2697 # Set maximum tolerated downtime for migration.
2699 # @value: maximum downtime in seconds
2701 # Returns: nothing on success
2703 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2705 # Since: 0.14.0
2707 # Example:
2709 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
2710 # <- { "return": {} }
2713 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
2716 # @migrate_set_speed:
2718 # Set maximum speed for migration.
2720 # @value: maximum speed in bytes per second.
2722 # Returns: nothing on success
2724 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2726 # Since: 0.14.0
2728 # Example:
2730 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
2731 # <- { "return": {} }
2734 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
2737 # @migrate-set-cache-size:
2739 # Set cache size to be used by XBZRLE migration
2741 # @value: cache size in bytes
2743 # The size will be rounded down to the nearest power of 2.
2744 # The cache size can be modified before and during ongoing migration
2746 # Returns: nothing on success
2748 # Since: 1.2
2750 # Example:
2752 # -> { "execute": "migrate-set-cache-size",
2753 #      "arguments": { "value": 536870912 } }
2754 # <- { "return": {} }
2757 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
2760 # @query-migrate-cache-size:
2762 # Query migration XBZRLE cache size
2764 # Returns: XBZRLE cache size in bytes
2766 # Since: 1.2
2768 # Example:
2770 # -> { "execute": "query-migrate-cache-size" }
2771 # <- { "return": 67108864 }
2774 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
2777 # @ObjectPropertyInfo:
2779 # @name: the name of the property
2781 # @type: the type of the property.  This will typically come in one of four
2782 #        forms:
2784 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
2785 #           These types are mapped to the appropriate JSON type.
2787 #        2) A child type in the form 'child<subtype>' where subtype is a qdev
2788 #           device type name.  Child properties create the composition tree.
2790 #        3) A link type in the form 'link<subtype>' where subtype is a qdev
2791 #           device type name.  Link properties form the device model graph.
2793 # Since: 1.2
2795 { 'struct': 'ObjectPropertyInfo',
2796   'data': { 'name': 'str', 'type': 'str' } }
2799 # @qom-list:
2801 # This command will list any properties of a object given a path in the object
2802 # model.
2804 # @path: the path within the object model.  See @qom-get for a description of
2805 #        this parameter.
2807 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
2808 #          object.
2810 # Since: 1.2
2812 { 'command': 'qom-list',
2813   'data': { 'path': 'str' },
2814   'returns': [ 'ObjectPropertyInfo' ] }
2817 # @qom-get:
2819 # This command will get a property from a object model path and return the
2820 # value.
2822 # @path: The path within the object model.  There are two forms of supported
2823 #        paths--absolute and partial paths.
2825 #        Absolute paths are derived from the root object and can follow child<>
2826 #        or link<> properties.  Since they can follow link<> properties, they
2827 #        can be arbitrarily long.  Absolute paths look like absolute filenames
2828 #        and are prefixed  with a leading slash.
2830 #        Partial paths look like relative filenames.  They do not begin
2831 #        with a prefix.  The matching rules for partial paths are subtle but
2832 #        designed to make specifying objects easy.  At each level of the
2833 #        composition tree, the partial path is matched as an absolute path.
2834 #        The first match is not returned.  At least two matches are searched
2835 #        for.  A successful result is only returned if only one match is
2836 #        found.  If more than one match is found, a flag is return to
2837 #        indicate that the match was ambiguous.
2839 # @property: The property name to read
2841 # Returns: The property value.  The type depends on the property
2842 #          type. child<> and link<> properties are returned as #str
2843 #          pathnames.  All integer property types (u8, u16, etc) are
2844 #          returned as #int.
2846 # Since: 1.2
2848 { 'command': 'qom-get',
2849   'data': { 'path': 'str', 'property': 'str' },
2850   'returns': 'any' }
2853 # @qom-set:
2855 # This command will set a property from a object model path.
2857 # @path: see @qom-get for a description of this parameter
2859 # @property: the property name to set
2861 # @value: a value who's type is appropriate for the property type.  See @qom-get
2862 #         for a description of type mapping.
2864 # Since: 1.2
2866 { 'command': 'qom-set',
2867   'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
2870 # @set_password:
2872 # Sets the password of a remote display session.
2874 # @protocol: `vnc' to modify the VNC server password
2875 #            `spice' to modify the Spice server password
2877 # @password: the new password
2879 # @connected: #optional how to handle existing clients when changing the
2880 #                       password.  If nothing is specified, defaults to `keep'
2881 #                       `fail' to fail the command if clients are connected
2882 #                       `disconnect' to disconnect existing clients
2883 #                       `keep' to maintain existing clients
2885 # Returns: Nothing on success
2886 #          If Spice is not enabled, DeviceNotFound
2888 # Since: 0.14.0
2890 # Example:
2892 # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
2893 #                                                "password": "secret" } }
2894 # <- { "return": {} }
2897 { 'command': 'set_password',
2898   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2901 # @expire_password:
2903 # Expire the password of a remote display server.
2905 # @protocol: the name of the remote display protocol `vnc' or `spice'
2907 # @time: when to expire the password.
2908 #        `now' to expire the password immediately
2909 #        `never' to cancel password expiration
2910 #        `+INT' where INT is the number of seconds from now (integer)
2911 #        `INT' where INT is the absolute time in seconds
2913 # Returns: Nothing on success
2914 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
2916 # Since: 0.14.0
2918 # Notes: Time is relative to the server and currently there is no way to
2919 #        coordinate server time with client time.  It is not recommended to
2920 #        use the absolute time version of the @time parameter unless you're
2921 #        sure you are on the same machine as the QEMU instance.
2923 # Example:
2925 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
2926 #                                                   "time": "+60" } }
2927 # <- { "return": {} }
2930 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2933 # @change-vnc-password:
2935 # Change the VNC server password.
2937 # @password:  the new password to use with VNC authentication
2939 # Since: 1.1
2941 # Notes:  An empty password in this command will set the password to the empty
2942 #         string.  Existing clients are unaffected by executing this command.
2944 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2947 # @change:
2949 # This command is multiple commands multiplexed together.
2951 # @device: This is normally the name of a block device but it may also be 'vnc'.
2952 #          when it's 'vnc', then sub command depends on @target
2954 # @target: If @device is a block device, then this is the new filename.
2955 #          If @device is 'vnc', then if the value 'password' selects the vnc
2956 #          change password command.   Otherwise, this specifies a new server URI
2957 #          address to listen to for VNC connections.
2959 # @arg:    If @device is a block device, then this is an optional format to open
2960 #          the device with.
2961 #          If @device is 'vnc' and @target is 'password', this is the new VNC
2962 #          password to set.  If this argument is an empty string, then no future
2963 #          logins will be allowed.
2965 # Returns: Nothing on success.
2966 #          If @device is not a valid block device, DeviceNotFound
2967 #          If the new block device is encrypted, DeviceEncrypted.  Note that
2968 #          if this error is returned, the device has been opened successfully
2969 #          and an additional call to @block_passwd is required to set the
2970 #          device's password.  The behavior of reads and writes to the block
2971 #          device between when these calls are executed is undefined.
2973 # Notes:  This interface is deprecated, and it is strongly recommended that you
2974 #         avoid using it.  For changing block devices, use
2975 #         blockdev-change-medium; for changing VNC parameters, use
2976 #         change-vnc-password.
2978 # Since: 0.14.0
2980 # Example:
2982 # 1. Change a removable medium
2984 # -> { "execute": "change",
2985 #      "arguments": { "device": "ide1-cd0",
2986 #                     "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
2987 # <- { "return": {} }
2989 # 2. Change VNC password
2991 # -> { "execute": "change",
2992 #      "arguments": { "device": "vnc", "target": "password",
2993 #                     "arg": "foobar1" } }
2994 # <- { "return": {} }
2997 { 'command': 'change',
2998   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
3001 # @ObjectTypeInfo:
3003 # This structure describes a search result from @qom-list-types
3005 # @name: the type name found in the search
3007 # Since: 1.1
3009 # Notes: This command is experimental and may change syntax in future releases.
3011 { 'struct': 'ObjectTypeInfo',
3012   'data': { 'name': 'str' } }
3015 # @qom-list-types:
3017 # This command will return a list of types given search parameters
3019 # @implements: if specified, only return types that implement this type name
3021 # @abstract: if true, include abstract types in the results
3023 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
3025 # Since: 1.1
3027 { 'command': 'qom-list-types',
3028   'data': { '*implements': 'str', '*abstract': 'bool' },
3029   'returns': [ 'ObjectTypeInfo' ] }
3032 # @DevicePropertyInfo:
3034 # Information about device properties.
3036 # @name: the name of the property
3037 # @type: the typename of the property
3038 # @description: #optional if specified, the description of the property.
3039 #               (since 2.2)
3041 # Since: 1.2
3043 { 'struct': 'DevicePropertyInfo',
3044   'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
3047 # @device-list-properties:
3049 # List properties associated with a device.
3051 # @typename: the type name of a device
3053 # Returns: a list of DevicePropertyInfo describing a devices properties
3055 # Since: 1.2
3057 { 'command': 'device-list-properties',
3058   'data': { 'typename': 'str'},
3059   'returns': [ 'DevicePropertyInfo' ] }
3062 # @migrate:
3064 # Migrates the current running guest to another Virtual Machine.
3066 # @uri: the Uniform Resource Identifier of the destination VM
3068 # @blk: #optional do block migration (full disk copy)
3070 # @inc: #optional incremental disk copy migration
3072 # @detach: this argument exists only for compatibility reasons and
3073 #          is ignored by QEMU
3075 # Returns: nothing on success
3077 # Since: 0.14.0
3079 # Notes:
3081 # 1. The 'query-migrate' command should be used to check migration's progress
3082 #    and final result (this information is provided by the 'status' member)
3084 # 2. All boolean arguments default to false
3086 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
3087 #    be used
3089 # Example:
3091 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
3092 # <- { "return": {} }
3095 { 'command': 'migrate',
3096   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
3099 # @migrate-incoming:
3101 # Start an incoming migration, the qemu must have been started
3102 # with -incoming defer
3104 # @uri: The Uniform Resource Identifier identifying the source or
3105 #       address to listen on
3107 # Returns: nothing on success
3109 # Since: 2.3
3111 # Notes:
3113 # 1. It's a bad idea to use a string for the uri, but it needs to stay
3114 #    compatible with -incoming and the format of the uri is already exposed
3115 #    above libvirt.
3117 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
3118 #    be used.
3120 # 3. The uri format is the same as for -incoming
3122 # Example:
3124 # -> { "execute": "migrate-incoming",
3125 #      "arguments": { "uri": "tcp::4446" } }
3126 # <- { "return": {} }
3129 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
3132 # @xen-save-devices-state:
3134 # Save the state of all devices to file. The RAM and the block devices
3135 # of the VM are not saved by this command.
3137 # @filename: the file to save the state of the devices to as binary
3138 # data. See xen-save-devices-state.txt for a description of the binary
3139 # format.
3141 # Returns: Nothing on success
3143 # Since: 1.1
3145 # Example:
3147 # -> { "execute": "xen-save-devices-state",
3148 #      "arguments": { "filename": "/tmp/save" } }
3149 # <- { "return": {} }
3152 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
3155 # @xen-set-global-dirty-log:
3157 # Enable or disable the global dirty log mode.
3159 # @enable: true to enable, false to disable.
3161 # Returns: nothing
3163 # Since: 1.3
3165 # Example:
3167 # -> { "execute": "xen-set-global-dirty-log",
3168 #      "arguments": { "enable": true } }
3169 # <- { "return": {} }
3172 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
3175 # @device_add:
3177 # @driver: the name of the new device's driver
3179 # @bus: #optional the device's parent bus (device tree path)
3181 # @id: #optional the device's ID, must be unique
3183 # Additional arguments depend on the type.
3185 # Add a device.
3187 # Notes:
3188 # 1. For detailed information about this command, please refer to the
3189 #    'docs/qdev-device-use.txt' file.
3191 # 2. It's possible to list device properties by running QEMU with the
3192 #    "-device DEVICE,help" command-line argument, where DEVICE is the
3193 #    device's name
3195 # Example:
3197 # -> { "execute": "device_add",
3198 #      "arguments": { "driver": "e1000", "id": "net1",
3199 #                     "bus": "pci.0",
3200 #                     "mac": "52:54:00:12:34:56" } }
3201 # <- { "return": {} }
3203 # TODO: This command effectively bypasses QAPI completely due to its
3204 # "additional arguments" business.  It shouldn't have been added to
3205 # the schema in this form.  It should be qapified properly, or
3206 # replaced by a properly qapified command.
3208 # Since: 0.13
3210 { 'command': 'device_add',
3211   'data': {'driver': 'str', '*bus': 'str', '*id': 'str'},
3212   'gen': false } # so we can get the additional arguments
3215 # @device_del:
3217 # Remove a device from a guest
3219 # @id: the device's ID or QOM path
3221 # Returns: Nothing on success
3222 #          If @id is not a valid device, DeviceNotFound
3224 # Notes: When this command completes, the device may not be removed from the
3225 #        guest.  Hot removal is an operation that requires guest cooperation.
3226 #        This command merely requests that the guest begin the hot removal
3227 #        process.  Completion of the device removal process is signaled with a
3228 #        DEVICE_DELETED event. Guest reset will automatically complete removal
3229 #        for all devices.
3231 # Since: 0.14.0
3233 # Example:
3235 # -> { "execute": "device_del",
3236 #      "arguments": { "id": "net1" } }
3237 # <- { "return": {} }
3239 # -> { "execute": "device_del",
3240 #      "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
3241 # <- { "return": {} }
3244 { 'command': 'device_del', 'data': {'id': 'str'} }
3247 # @DumpGuestMemoryFormat:
3249 # An enumeration of guest-memory-dump's format.
3251 # @elf: elf format
3253 # @kdump-zlib: kdump-compressed format with zlib-compressed
3255 # @kdump-lzo: kdump-compressed format with lzo-compressed
3257 # @kdump-snappy: kdump-compressed format with snappy-compressed
3259 # Since: 2.0
3261 { 'enum': 'DumpGuestMemoryFormat',
3262   'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
3265 # @dump-guest-memory:
3267 # Dump guest's memory to vmcore. It is a synchronous operation that can take
3268 # very long depending on the amount of guest memory.
3270 # @paging: if true, do paging to get guest's memory mapping. This allows
3271 #          using gdb to process the core file.
3273 #          IMPORTANT: this option can make QEMU allocate several gigabytes
3274 #                     of RAM. This can happen for a large guest, or a
3275 #                     malicious guest pretending to be large.
3277 #          Also, paging=true has the following limitations:
3279 #             1. The guest may be in a catastrophic state or can have corrupted
3280 #                memory, which cannot be trusted
3281 #             2. The guest can be in real-mode even if paging is enabled. For
3282 #                example, the guest uses ACPI to sleep, and ACPI sleep state
3283 #                goes in real-mode
3284 #             3. Currently only supported on i386 and x86_64.
3286 # @protocol: the filename or file descriptor of the vmcore. The supported
3287 #            protocols are:
3289 #            1. file: the protocol starts with "file:", and the following
3290 #               string is the file's path.
3291 #            2. fd: the protocol starts with "fd:", and the following string
3292 #               is the fd's name.
3294 # @detach: #optional if true, QMP will return immediately rather than
3295 #          waiting for the dump to finish. The user can track progress
3296 #          using "query-dump". (since 2.6).
3298 # @begin: #optional if specified, the starting physical address.
3300 # @length: #optional if specified, the memory size, in bytes. If you don't
3301 #          want to dump all guest's memory, please specify the start @begin
3302 #          and @length
3304 # @format: #optional if specified, the format of guest memory dump. But non-elf
3305 #          format is conflict with paging and filter, ie. @paging, @begin and
3306 #          @length is not allowed to be specified with non-elf @format at the
3307 #          same time (since 2.0)
3309 # Note: All boolean arguments default to false
3311 # Returns: nothing on success
3313 # Since: 1.2
3315 # Example:
3317 # -> { "execute": "dump-guest-memory",
3318 #      "arguments": { "protocol": "fd:dump" } }
3319 # <- { "return": {} }
3322 { 'command': 'dump-guest-memory',
3323   'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
3324             '*begin': 'int', '*length': 'int',
3325             '*format': 'DumpGuestMemoryFormat'} }
3328 # @DumpStatus:
3330 # Describe the status of a long-running background guest memory dump.
3332 # @none: no dump-guest-memory has started yet.
3334 # @active: there is one dump running in background.
3336 # @completed: the last dump has finished successfully.
3338 # @failed: the last dump has failed.
3340 # Since: 2.6
3342 { 'enum': 'DumpStatus',
3343   'data': [ 'none', 'active', 'completed', 'failed' ] }
3346 # @DumpQueryResult:
3348 # The result format for 'query-dump'.
3350 # @status: enum of @DumpStatus, which shows current dump status
3352 # @completed: bytes written in latest dump (uncompressed)
3354 # @total: total bytes to be written in latest dump (uncompressed)
3356 # Since: 2.6
3358 { 'struct': 'DumpQueryResult',
3359   'data': { 'status': 'DumpStatus',
3360             'completed': 'int',
3361             'total': 'int' } }
3364 # @query-dump:
3366 # Query latest dump status.
3368 # Returns: A @DumpStatus object showing the dump status.
3370 # Since: 2.6
3372 # Example:
3374 # -> { "execute": "query-dump" }
3375 # <- { "return": { "status": "active", "completed": 1024000,
3376 #                  "total": 2048000 } }
3379 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
3382 # @DumpGuestMemoryCapability:
3384 # A list of the available formats for dump-guest-memory
3386 # Since: 2.0
3388 { 'struct': 'DumpGuestMemoryCapability',
3389   'data': {
3390       'formats': ['DumpGuestMemoryFormat'] } }
3393 # @query-dump-guest-memory-capability:
3395 # Returns the available formats for dump-guest-memory
3397 # Returns:  A @DumpGuestMemoryCapability object listing available formats for
3398 #           dump-guest-memory
3400 # Since: 2.0
3402 # Example:
3404 # -> { "execute": "query-dump-guest-memory-capability" }
3405 # <- { "return": { "formats":
3406 #                  ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
3409 { 'command': 'query-dump-guest-memory-capability',
3410   'returns': 'DumpGuestMemoryCapability' }
3413 # @dump-skeys:
3415 # Dump guest's storage keys
3417 # @filename: the path to the file to dump to
3419 # This command is only supported on s390 architecture.
3421 # Since: 2.5
3423 # Example:
3425 # -> { "execute": "dump-skeys",
3426 #      "arguments": { "filename": "/tmp/skeys" } }
3427 # <- { "return": {} }
3430 { 'command': 'dump-skeys',
3431   'data': { 'filename': 'str' } }
3434 # @netdev_add:
3436 # Add a network backend.
3438 # @type: the type of network backend.  Current valid values are 'user', 'tap',
3439 #        'vde', 'socket', 'dump' and 'bridge'
3441 # @id: the name of the new network backend
3443 # Additional arguments depend on the type.
3445 # TODO: This command effectively bypasses QAPI completely due to its
3446 # "additional arguments" business.  It shouldn't have been added to
3447 # the schema in this form.  It should be qapified properly, or
3448 # replaced by a properly qapified command.
3450 # Since: 0.14.0
3452 # Returns: Nothing on success
3453 #          If @type is not a valid network backend, DeviceNotFound
3455 # Example:
3457 # -> { "execute": "netdev_add",
3458 #      "arguments": { "type": "user", "id": "netdev1",
3459 #                     "dnssearch": "example.org" } }
3460 # <- { "return": {} }
3463 { 'command': 'netdev_add',
3464   'data': {'type': 'str', 'id': 'str'},
3465   'gen': false }                # so we can get the additional arguments
3468 # @netdev_del:
3470 # Remove a network backend.
3472 # @id: the name of the network backend to remove
3474 # Returns: Nothing on success
3475 #          If @id is not a valid network backend, DeviceNotFound
3477 # Since: 0.14.0
3479 # Example:
3481 # -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
3482 # <- { "return": {} }
3485 { 'command': 'netdev_del', 'data': {'id': 'str'} }
3488 # @object-add:
3490 # Create a QOM object.
3492 # @qom-type: the class name for the object to be created
3494 # @id: the name of the new object
3496 # @props: #optional a dictionary of properties to be passed to the backend
3498 # Returns: Nothing on success
3499 #          Error if @qom-type is not a valid class name
3501 # Since: 2.0
3503 # Example:
3505 # -> { "execute": "object-add",
3506 #      "arguments": { "qom-type": "rng-random", "id": "rng1",
3507 #                     "props": { "filename": "/dev/hwrng" } } }
3508 # <- { "return": {} }
3511 { 'command': 'object-add',
3512   'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
3515 # @object-del:
3517 # Remove a QOM object.
3519 # @id: the name of the QOM object to remove
3521 # Returns: Nothing on success
3522 #          Error if @id is not a valid id for a QOM object
3524 # Since: 2.0
3526 # Example:
3528 # -> { "execute": "object-del", "arguments": { "id": "rng1" } }
3529 # <- { "return": {} }
3532 { 'command': 'object-del', 'data': {'id': 'str'} }
3535 # @NetdevNoneOptions:
3537 # Use it alone to have zero network devices.
3539 # Since: 1.2
3541 { 'struct': 'NetdevNoneOptions',
3542   'data': { } }
3545 # @NetLegacyNicOptions:
3547 # Create a new Network Interface Card.
3549 # @netdev: #optional id of -netdev to connect to
3551 # @macaddr: #optional MAC address
3553 # @model: #optional device model (e1000, rtl8139, virtio etc.)
3555 # @addr: #optional PCI device address
3557 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
3559 # Since: 1.2
3561 { 'struct': 'NetLegacyNicOptions',
3562   'data': {
3563     '*netdev':  'str',
3564     '*macaddr': 'str',
3565     '*model':   'str',
3566     '*addr':    'str',
3567     '*vectors': 'uint32' } }
3570 # @String:
3572 # A fat type wrapping 'str', to be embedded in lists.
3574 # Since: 1.2
3576 { 'struct': 'String',
3577   'data': {
3578     'str': 'str' } }
3581 # @NetdevUserOptions:
3583 # Use the user mode network stack which requires no administrator privilege to
3584 # run.
3586 # @hostname: #optional client hostname reported by the builtin DHCP server
3588 # @restrict: #optional isolate the guest from the host
3590 # @ipv4: #optional whether to support IPv4, default true for enabled
3591 #        (since 2.6)
3593 # @ipv6: #optional whether to support IPv6, default true for enabled
3594 #        (since 2.6)
3596 # @ip: #optional legacy parameter, use net= instead
3598 # @net: #optional IP network address that the guest will see, in the
3599 #       form addr[/netmask] The netmask is optional, and can be
3600 #       either in the form a.b.c.d or as a number of valid top-most
3601 #       bits. Default is 10.0.2.0/24.
3603 # @host: #optional guest-visible address of the host
3605 # @tftp: #optional root directory of the built-in TFTP server
3607 # @bootfile: #optional BOOTP filename, for use with tftp=
3609 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
3610 #             assign
3612 # @dns: #optional guest-visible address of the virtual nameserver
3614 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
3615 #             to the guest
3617 # @ipv6-prefix: #optional IPv6 network prefix (default is fec0::) (since
3618 #               2.6). The network prefix is given in the usual
3619 #               hexadecimal IPv6 address notation.
3621 # @ipv6-prefixlen: #optional IPv6 network prefix length (default is 64)
3622 #                  (since 2.6)
3624 # @ipv6-host: #optional guest-visible IPv6 address of the host (since 2.6)
3626 # @ipv6-dns: #optional guest-visible IPv6 address of the virtual
3627 #            nameserver (since 2.6)
3629 # @smb: #optional root directory of the built-in SMB server
3631 # @smbserver: #optional IP address of the built-in SMB server
3633 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
3634 #           endpoints
3636 # @guestfwd: #optional forward guest TCP connections
3638 # Since: 1.2
3640 { 'struct': 'NetdevUserOptions',
3641   'data': {
3642     '*hostname':  'str',
3643     '*restrict':  'bool',
3644     '*ipv4':      'bool',
3645     '*ipv6':      'bool',
3646     '*ip':        'str',
3647     '*net':       'str',
3648     '*host':      'str',
3649     '*tftp':      'str',
3650     '*bootfile':  'str',
3651     '*dhcpstart': 'str',
3652     '*dns':       'str',
3653     '*dnssearch': ['String'],
3654     '*ipv6-prefix':      'str',
3655     '*ipv6-prefixlen':   'int',
3656     '*ipv6-host':        'str',
3657     '*ipv6-dns':         'str',
3658     '*smb':       'str',
3659     '*smbserver': 'str',
3660     '*hostfwd':   ['String'],
3661     '*guestfwd':  ['String'] } }
3664 # @NetdevTapOptions:
3666 # Connect the host TAP network interface name to the VLAN.
3668 # @ifname: #optional interface name
3670 # @fd: #optional file descriptor of an already opened tap
3672 # @fds: #optional multiple file descriptors of already opened multiqueue capable
3673 # tap
3675 # @script: #optional script to initialize the interface
3677 # @downscript: #optional script to shut down the interface
3679 # @br: #optional bridge name (since 2.8)
3681 # @helper: #optional command to execute to configure bridge
3683 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
3685 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
3687 # @vhost: #optional enable vhost-net network accelerator
3689 # @vhostfd: #optional file descriptor of an already opened vhost net device
3691 # @vhostfds: #optional file descriptors of multiple already opened vhost net
3692 # devices
3694 # @vhostforce: #optional vhost on for non-MSIX virtio guests
3696 # @queues: #optional number of queues to be created for multiqueue capable tap
3698 # @poll-us: #optional maximum number of microseconds that could
3699 # be spent on busy polling for tap (since 2.7)
3701 # Since: 1.2
3703 { 'struct': 'NetdevTapOptions',
3704   'data': {
3705     '*ifname':     'str',
3706     '*fd':         'str',
3707     '*fds':        'str',
3708     '*script':     'str',
3709     '*downscript': 'str',
3710     '*br':         'str',
3711     '*helper':     'str',
3712     '*sndbuf':     'size',
3713     '*vnet_hdr':   'bool',
3714     '*vhost':      'bool',
3715     '*vhostfd':    'str',
3716     '*vhostfds':   'str',
3717     '*vhostforce': 'bool',
3718     '*queues':     'uint32',
3719     '*poll-us':    'uint32'} }
3722 # @NetdevSocketOptions:
3724 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
3725 # socket connection.
3727 # @fd: #optional file descriptor of an already opened socket
3729 # @listen: #optional port number, and optional hostname, to listen on
3731 # @connect: #optional port number, and optional hostname, to connect to
3733 # @mcast: #optional UDP multicast address and port number
3735 # @localaddr: #optional source address and port for multicast and udp packets
3737 # @udp: #optional UDP unicast address and port number
3739 # Since: 1.2
3741 { 'struct': 'NetdevSocketOptions',
3742   'data': {
3743     '*fd':        'str',
3744     '*listen':    'str',
3745     '*connect':   'str',
3746     '*mcast':     'str',
3747     '*localaddr': 'str',
3748     '*udp':       'str' } }
3751 # @NetdevL2TPv3Options:
3753 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
3755 # @src: source address
3757 # @dst: destination address
3759 # @srcport: #optional source port - mandatory for udp, optional for ip
3761 # @dstport: #optional destination port - mandatory for udp, optional for ip
3763 # @ipv6: #optional - force the use of ipv6
3765 # @udp: #optional - use the udp version of l2tpv3 encapsulation
3767 # @cookie64: #optional - use 64 bit coookies
3769 # @counter: #optional have sequence counter
3771 # @pincounter: #optional pin sequence counter to zero -
3772 #              workaround for buggy implementations or
3773 #              networks with packet reorder
3775 # @txcookie: #optional 32 or 64 bit transmit cookie
3777 # @rxcookie: #optional 32 or 64 bit receive cookie
3779 # @txsession: 32 bit transmit session
3781 # @rxsession: #optional 32 bit receive session - if not specified
3782 #             set to the same value as transmit
3784 # @offset: #optional additional offset - allows the insertion of
3785 #          additional application-specific data before the packet payload
3787 # Since: 2.1
3789 { 'struct': 'NetdevL2TPv3Options',
3790   'data': {
3791     'src':          'str',
3792     'dst':          'str',
3793     '*srcport':     'str',
3794     '*dstport':     'str',
3795     '*ipv6':        'bool',
3796     '*udp':         'bool',
3797     '*cookie64':    'bool',
3798     '*counter':     'bool',
3799     '*pincounter':  'bool',
3800     '*txcookie':    'uint64',
3801     '*rxcookie':    'uint64',
3802     'txsession':    'uint32',
3803     '*rxsession':   'uint32',
3804     '*offset':      'uint32' } }
3807 # @NetdevVdeOptions:
3809 # Connect the VLAN to a vde switch running on the host.
3811 # @sock: #optional socket path
3813 # @port: #optional port number
3815 # @group: #optional group owner of socket
3817 # @mode: #optional permissions for socket
3819 # Since: 1.2
3821 { 'struct': 'NetdevVdeOptions',
3822   'data': {
3823     '*sock':  'str',
3824     '*port':  'uint16',
3825     '*group': 'str',
3826     '*mode':  'uint16' } }
3829 # @NetdevDumpOptions:
3831 # Dump VLAN network traffic to a file.
3833 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
3834 # suffixes.
3836 # @file: #optional dump file path (default is qemu-vlan0.pcap)
3838 # Since: 1.2
3840 { 'struct': 'NetdevDumpOptions',
3841   'data': {
3842     '*len':  'size',
3843     '*file': 'str' } }
3846 # @NetdevBridgeOptions:
3848 # Connect a host TAP network interface to a host bridge device.
3850 # @br: #optional bridge name
3852 # @helper: #optional command to execute to configure bridge
3854 # Since: 1.2
3856 { 'struct': 'NetdevBridgeOptions',
3857   'data': {
3858     '*br':     'str',
3859     '*helper': 'str' } }
3862 # @NetdevHubPortOptions:
3864 # Connect two or more net clients through a software hub.
3866 # @hubid: hub identifier number
3868 # Since: 1.2
3870 { 'struct': 'NetdevHubPortOptions',
3871   'data': {
3872     'hubid':     'int32' } }
3875 # @NetdevNetmapOptions:
3877 # Connect a client to a netmap-enabled NIC or to a VALE switch port
3879 # @ifname: Either the name of an existing network interface supported by
3880 #          netmap, or the name of a VALE port (created on the fly).
3881 #          A VALE port name is in the form 'valeXXX:YYY', where XXX and
3882 #          YYY are non-negative integers. XXX identifies a switch and
3883 #          YYY identifies a port of the switch. VALE ports having the
3884 #          same XXX are therefore connected to the same switch.
3886 # @devname: #optional path of the netmap device (default: '/dev/netmap').
3888 # Since: 2.0
3890 { 'struct': 'NetdevNetmapOptions',
3891   'data': {
3892     'ifname':     'str',
3893     '*devname':    'str' } }
3896 # @NetdevVhostUserOptions:
3898 # Vhost-user network backend
3900 # @chardev: name of a unix socket chardev
3902 # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
3904 # @queues: #optional number of queues to be created for multiqueue vhost-user
3905 #          (default: 1) (Since 2.5)
3907 # Since: 2.1
3909 { 'struct': 'NetdevVhostUserOptions',
3910   'data': {
3911     'chardev':        'str',
3912     '*vhostforce':    'bool',
3913     '*queues':        'int' } }
3916 # @NetClientDriver:
3918 # Available netdev drivers.
3920 # Since: 2.7
3922 { 'enum': 'NetClientDriver',
3923   'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
3924             'bridge', 'hubport', 'netmap', 'vhost-user' ] }
3927 # @Netdev:
3929 # Captures the configuration of a network device.
3931 # @id: identifier for monitor commands.
3933 # @type: Specify the driver used for interpreting remaining arguments.
3935 # Since: 1.2
3937 # 'l2tpv3' - since 2.1
3939 { 'union': 'Netdev',
3940   'base': { 'id': 'str', 'type': 'NetClientDriver' },
3941   'discriminator': 'type',
3942   'data': {
3943     'none':     'NetdevNoneOptions',
3944     'nic':      'NetLegacyNicOptions',
3945     'user':     'NetdevUserOptions',
3946     'tap':      'NetdevTapOptions',
3947     'l2tpv3':   'NetdevL2TPv3Options',
3948     'socket':   'NetdevSocketOptions',
3949     'vde':      'NetdevVdeOptions',
3950     'dump':     'NetdevDumpOptions',
3951     'bridge':   'NetdevBridgeOptions',
3952     'hubport':  'NetdevHubPortOptions',
3953     'netmap':   'NetdevNetmapOptions',
3954     'vhost-user': 'NetdevVhostUserOptions' } }
3957 # @NetLegacy:
3959 # Captures the configuration of a network device; legacy.
3961 # @vlan: #optional vlan number
3963 # @id: #optional identifier for monitor commands
3965 # @name: #optional identifier for monitor commands, ignored if @id is present
3967 # @opts: device type specific properties (legacy)
3969 # Since: 1.2
3971 { 'struct': 'NetLegacy',
3972   'data': {
3973     '*vlan': 'int32',
3974     '*id':   'str',
3975     '*name': 'str',
3976     'opts':  'NetLegacyOptions' } }
3979 # @NetLegacyOptionsType:
3981 # Since: 1.2
3983 { 'enum': 'NetLegacyOptionsType',
3984   'data': ['none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',
3985            'dump', 'bridge', 'netmap', 'vhost-user'] }
3988 # @NetLegacyOptions:
3990 # Like Netdev, but for use only by the legacy command line options
3992 # Since: 1.2
3994 { 'union': 'NetLegacyOptions',
3995   'base': { 'type': 'NetLegacyOptionsType' },
3996   'discriminator': 'type',
3997   'data': {
3998     'none':     'NetdevNoneOptions',
3999     'nic':      'NetLegacyNicOptions',
4000     'user':     'NetdevUserOptions',
4001     'tap':      'NetdevTapOptions',
4002     'l2tpv3':   'NetdevL2TPv3Options',
4003     'socket':   'NetdevSocketOptions',
4004     'vde':      'NetdevVdeOptions',
4005     'dump':     'NetdevDumpOptions',
4006     'bridge':   'NetdevBridgeOptions',
4007     'netmap':   'NetdevNetmapOptions',
4008     'vhost-user': 'NetdevVhostUserOptions' } }
4011 # @NetFilterDirection:
4013 # Indicates whether a netfilter is attached to a netdev's transmit queue or
4014 # receive queue or both.
4016 # @all: the filter is attached both to the receive and the transmit
4017 #       queue of the netdev (default).
4019 # @rx: the filter is attached to the receive queue of the netdev,
4020 #      where it will receive packets sent to the netdev.
4022 # @tx: the filter is attached to the transmit queue of the netdev,
4023 #      where it will receive packets sent by the netdev.
4025 # Since: 2.5
4027 { 'enum': 'NetFilterDirection',
4028   'data': [ 'all', 'rx', 'tx' ] }
4031 # @InetSocketAddress:
4033 # Captures a socket address or address range in the Internet namespace.
4035 # @host: host part of the address
4037 # @port: port part of the address, or lowest port if @to is present
4039 # @numeric: #optional true if the host/port are guaranteed to be numeric,
4040 #           false if name resolution should be attempted. Defaults to false.
4041 #           (Since 2.9)
4043 # @to: highest port to try
4045 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
4046 #        #optional
4048 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
4049 #        #optional
4051 # Since: 1.3
4053 { 'struct': 'InetSocketAddress',
4054   'data': {
4055     'host': 'str',
4056     'port': 'str',
4057     '*numeric':  'bool',
4058     '*to': 'uint16',
4059     '*ipv4': 'bool',
4060     '*ipv6': 'bool' } }
4063 # @UnixSocketAddress:
4065 # Captures a socket address in the local ("Unix socket") namespace.
4067 # @path: filesystem path to use
4069 # Since: 1.3
4071 { 'struct': 'UnixSocketAddress',
4072   'data': {
4073     'path': 'str' } }
4076 # @VsockSocketAddress:
4078 # Captures a socket address in the vsock namespace.
4080 # @cid: unique host identifier
4081 # @port: port
4083 # Note: string types are used to allow for possible future hostname or
4084 # service resolution support.
4086 # Since: 2.8
4088 { 'struct': 'VsockSocketAddress',
4089   'data': {
4090     'cid': 'str',
4091     'port': 'str' } }
4094 # @SocketAddress:
4096 # Captures the address of a socket, which could also be a named file descriptor
4098 # Since: 1.3
4100 { 'union': 'SocketAddress',
4101   'data': {
4102     'inet': 'InetSocketAddress',
4103     'unix': 'UnixSocketAddress',
4104     'vsock': 'VsockSocketAddress',
4105     'fd': 'String' } }
4108 # @SocketAddressFlatType:
4110 # Available SocketAddressFlat types
4112 # @inet:  Internet address
4114 # @unix:  Unix domain socket
4116 # Since: 2.9
4118 { 'enum': 'SocketAddressFlatType',
4119   'data': [ 'unix', 'inet' ] }
4122 # @SocketAddressFlat:
4124 # Captures the address of a socket
4126 # @type:       Transport type
4128 # This is similar to SocketAddress, only distinction:
4130 # 1. SocketAddressFlat is a flat union, SocketAddress is a simple union.
4131 #    A flat union is nicer than simple because it avoids nesting
4132 #    (i.e. more {}) on the wire.
4134 # 2. SocketAddressFlat supports only types 'unix' and 'inet', because
4135 #    that's what its current users need.
4137 # Since: 2.9
4139 { 'union': 'SocketAddressFlat',
4140   'base': { 'type': 'SocketAddressFlatType' },
4141   'discriminator': 'type',
4142   'data': { 'unix': 'UnixSocketAddress',
4143             'inet': 'InetSocketAddress' } }
4146 # @getfd:
4148 # Receive a file descriptor via SCM rights and assign it a name
4150 # @fdname: file descriptor name
4152 # Returns: Nothing on success
4154 # Since: 0.14.0
4156 # Notes: If @fdname already exists, the file descriptor assigned to
4157 #        it will be closed and replaced by the received file
4158 #        descriptor.
4160 #        The 'closefd' command can be used to explicitly close the
4161 #        file descriptor when it is no longer needed.
4163 # Example:
4165 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
4166 # <- { "return": {} }
4169 { 'command': 'getfd', 'data': {'fdname': 'str'} }
4172 # @closefd:
4174 # Close a file descriptor previously passed via SCM rights
4176 # @fdname: file descriptor name
4178 # Returns: Nothing on success
4180 # Since: 0.14.0
4182 # Example:
4184 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
4185 # <- { "return": {} }
4188 { 'command': 'closefd', 'data': {'fdname': 'str'} }
4191 # @MachineInfo:
4193 # Information describing a machine.
4195 # @name: the name of the machine
4197 # @alias: #optional an alias for the machine name
4199 # @is-default: #optional whether the machine is default
4201 # @cpu-max: maximum number of CPUs supported by the machine type
4202 #           (since 1.5.0)
4204 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
4206 # Since: 1.2.0
4208 { 'struct': 'MachineInfo',
4209   'data': { 'name': 'str', '*alias': 'str',
4210             '*is-default': 'bool', 'cpu-max': 'int',
4211             'hotpluggable-cpus': 'bool'} }
4214 # @query-machines:
4216 # Return a list of supported machines
4218 # Returns: a list of MachineInfo
4220 # Since: 1.2.0
4222 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
4225 # @CpuDefinitionInfo:
4227 # Virtual CPU definition.
4229 # @name: the name of the CPU definition
4231 # @migration-safe: #optional whether a CPU definition can be safely used for
4232 #                  migration in combination with a QEMU compatibility machine
4233 #                  when migrating between different QMU versions and between
4234 #                  hosts with different sets of (hardware or software)
4235 #                  capabilities. If not provided, information is not available
4236 #                  and callers should not assume the CPU definition to be
4237 #                  migration-safe. (since 2.8)
4239 # @static: whether a CPU definition is static and will not change depending on
4240 #          QEMU version, machine type, machine options and accelerator options.
4241 #          A static model is always migration-safe. (since 2.8)
4243 # @unavailable-features: #optional List of properties that prevent
4244 #                        the CPU model from running in the current
4245 #                        host. (since 2.8)
4246 # @typename: Type name that can be used as argument to @device-list-properties,
4247 #            to introspect properties configurable using -cpu or -global.
4248 #            (since 2.9)
4250 # @unavailable-features is a list of QOM property names that
4251 # represent CPU model attributes that prevent the CPU from running.
4252 # If the QOM property is read-only, that means there's no known
4253 # way to make the CPU model run in the current host. Implementations
4254 # that choose not to provide specific information return the
4255 # property name "type".
4256 # If the property is read-write, it means that it MAY be possible
4257 # to run the CPU model in the current host if that property is
4258 # changed. Management software can use it as hints to suggest or
4259 # choose an alternative for the user, or just to generate meaningful
4260 # error messages explaining why the CPU model can't be used.
4261 # If @unavailable-features is an empty list, the CPU model is
4262 # runnable using the current host and machine-type.
4263 # If @unavailable-features is not present, runnability
4264 # information for the CPU is not available.
4266 # Since: 1.2.0
4268 { 'struct': 'CpuDefinitionInfo',
4269   'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
4270             '*unavailable-features': [ 'str' ], 'typename': 'str' } }
4273 # @query-cpu-definitions:
4275 # Return a list of supported virtual CPU definitions
4277 # Returns: a list of CpuDefInfo
4279 # Since: 1.2.0
4281 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
4284 # @CpuModelInfo:
4286 # Virtual CPU model.
4288 # A CPU model consists of the name of a CPU definition, to which
4289 # delta changes are applied (e.g. features added/removed). Most magic values
4290 # that an architecture might require should be hidden behind the name.
4291 # However, if required, architectures can expose relevant properties.
4293 # @name: the name of the CPU definition the model is based on
4294 # @props: #optional a dictionary of QOM properties to be applied
4296 # Since: 2.8.0
4298 { 'struct': 'CpuModelInfo',
4299   'data': { 'name': 'str',
4300             '*props': 'any' } }
4303 # @CpuModelExpansionType:
4305 # An enumeration of CPU model expansion types.
4307 # @static: Expand to a static CPU model, a combination of a static base
4308 #          model name and property delta changes. As the static base model will
4309 #          never change, the expanded CPU model will be the same, independant of
4310 #          independent of QEMU version, machine type, machine options, and
4311 #          accelerator options. Therefore, the resulting model can be used by
4312 #          tooling without having to specify a compatibility machine - e.g. when
4313 #          displaying the "host" model. static CPU models are migration-safe.
4315 # @full: Expand all properties. The produced model is not guaranteed to be
4316 #        migration-safe, but allows tooling to get an insight and work with
4317 #        model details.
4319 # Note: When a non-migration-safe CPU model is expanded in static mode, some
4320 # features enabled by the CPU model may be omitted, because they can't be
4321 # implemented by a static CPU model definition (e.g. cache info passthrough and
4322 # PMU passthrough in x86). If you need an accurate representation of the
4323 # features enabled by a non-migration-safe CPU model, use @full. If you need a
4324 # static representation that will keep ABI compatibility even when changing QEMU
4325 # version or machine-type, use @static (but keep in mind that some features may
4326 # be omitted).
4328 # Since: 2.8.0
4330 { 'enum': 'CpuModelExpansionType',
4331   'data': [ 'static', 'full' ] }
4335 # @CpuModelExpansionInfo:
4337 # The result of a cpu model expansion.
4339 # @model: the expanded CpuModelInfo.
4341 # Since: 2.8.0
4343 { 'struct': 'CpuModelExpansionInfo',
4344   'data': { 'model': 'CpuModelInfo' } }
4348 # @query-cpu-model-expansion:
4350 # Expands a given CPU model (or a combination of CPU model + additional options)
4351 # to different granularities, allowing tooling to get an understanding what a
4352 # specific CPU model looks like in QEMU under a certain configuration.
4354 # This interface can be used to query the "host" CPU model.
4356 # The data returned by this command may be affected by:
4358 # * QEMU version: CPU models may look different depending on the QEMU version.
4359 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
4360 # * machine-type: CPU model  may look different depending on the machine-type.
4361 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
4362 # * machine options (including accelerator): in some architectures, CPU models
4363 #   may look different depending on machine and accelerator options. (Except for
4364 #   CPU models reported as "static" in query-cpu-definitions.)
4365 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4366 #   global properties may affect expansion of CPU models. Using
4367 #   query-cpu-model-expansion while using these is not advised.
4369 # Some architectures may not support all expansion types. s390x supports
4370 # "full" and "static".
4372 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
4373 #          not supported, if the model cannot be expanded, if the model contains
4374 #          an unknown CPU definition name, unknown properties or properties
4375 #          with a wrong type. Also returns an error if an expansion type is
4376 #          not supported.
4378 # Since: 2.8.0
4380 { 'command': 'query-cpu-model-expansion',
4381   'data': { 'type': 'CpuModelExpansionType',
4382             'model': 'CpuModelInfo' },
4383   'returns': 'CpuModelExpansionInfo' }
4386 # @CpuModelCompareResult:
4388 # An enumeration of CPU model comparation results. The result is usually
4389 # calculated using e.g. CPU features or CPU generations.
4391 # @incompatible: If model A is incompatible to model B, model A is not
4392 #                guaranteed to run where model B runs and the other way around.
4394 # @identical: If model A is identical to model B, model A is guaranteed to run
4395 #             where model B runs and the other way around.
4397 # @superset: If model A is a superset of model B, model B is guaranteed to run
4398 #            where model A runs. There are no guarantees about the other way.
4400 # @subset: If model A is a subset of model B, model A is guaranteed to run
4401 #          where model B runs. There are no guarantees about the other way.
4403 # Since: 2.8.0
4405 { 'enum': 'CpuModelCompareResult',
4406   'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
4409 # @CpuModelCompareInfo:
4411 # The result of a CPU model comparison.
4413 # @result: The result of the compare operation.
4414 # @responsible-properties: List of properties that led to the comparison result
4415 #                          not being identical.
4417 # @responsible-properties is a list of QOM property names that led to
4418 # both CPUs not being detected as identical. For identical models, this
4419 # list is empty.
4420 # If a QOM property is read-only, that means there's no known way to make the
4421 # CPU models identical. If the special property name "type" is included, the
4422 # models are by definition not identical and cannot be made identical.
4424 # Since: 2.8.0
4426 { 'struct': 'CpuModelCompareInfo',
4427   'data': {'result': 'CpuModelCompareResult',
4428            'responsible-properties': ['str']
4429           }
4433 # @query-cpu-model-comparison:
4435 # Compares two CPU models, returning how they compare in a specific
4436 # configuration. The results indicates how both models compare regarding
4437 # runnability. This result can be used by tooling to make decisions if a
4438 # certain CPU model will run in a certain configuration or if a compatible
4439 # CPU model has to be created by baselining.
4441 # Usually, a CPU model is compared against the maximum possible CPU model
4442 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
4443 # model is identical or a subset, it will run in that configuration.
4445 # The result returned by this command may be affected by:
4447 # * QEMU version: CPU models may look different depending on the QEMU version.
4448 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
4449 # * machine-type: CPU model may look different depending on the machine-type.
4450 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
4451 # * machine options (including accelerator): in some architectures, CPU models
4452 #   may look different depending on machine and accelerator options. (Except for
4453 #   CPU models reported as "static" in query-cpu-definitions.)
4454 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4455 #   global properties may affect expansion of CPU models. Using
4456 #   query-cpu-model-expansion while using these is not advised.
4458 # Some architectures may not support comparing CPU models. s390x supports
4459 # comparing CPU models.
4461 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
4462 #          not supported, if a model cannot be used, if a model contains
4463 #          an unknown cpu definition name, unknown properties or properties
4464 #          with wrong types.
4466 # Since: 2.8.0
4468 { 'command': 'query-cpu-model-comparison',
4469   'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
4470   'returns': 'CpuModelCompareInfo' }
4473 # @CpuModelBaselineInfo:
4475 # The result of a CPU model baseline.
4477 # @model: the baselined CpuModelInfo.
4479 # Since: 2.8.0
4481 { 'struct': 'CpuModelBaselineInfo',
4482   'data': { 'model': 'CpuModelInfo' } }
4485 # @query-cpu-model-baseline:
4487 # Baseline two CPU models, creating a compatible third model. The created
4488 # model will always be a static, migration-safe CPU model (see "static"
4489 # CPU model expansion for details).
4491 # This interface can be used by tooling to create a compatible CPU model out
4492 # two CPU models. The created CPU model will be identical to or a subset of
4493 # both CPU models when comparing them. Therefore, the created CPU model is
4494 # guaranteed to run where the given CPU models run.
4496 # The result returned by this command may be affected by:
4498 # * QEMU version: CPU models may look different depending on the QEMU version.
4499 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
4500 # * machine-type: CPU model may look different depending on the machine-type.
4501 #   (Except for CPU models reported as "static" in query-cpu-definitions.)
4502 # * machine options (including accelerator): in some architectures, CPU models
4503 #   may look different depending on machine and accelerator options. (Except for
4504 #   CPU models reported as "static" in query-cpu-definitions.)
4505 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4506 #   global properties may affect expansion of CPU models. Using
4507 #   query-cpu-model-expansion while using these is not advised.
4509 # Some architectures may not support baselining CPU models. s390x supports
4510 # baselining CPU models.
4512 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
4513 #          not supported, if a model cannot be used, if a model contains
4514 #          an unknown cpu definition name, unknown properties or properties
4515 #          with wrong types.
4517 # Since: 2.8.0
4519 { 'command': 'query-cpu-model-baseline',
4520   'data': { 'modela': 'CpuModelInfo',
4521             'modelb': 'CpuModelInfo' },
4522   'returns': 'CpuModelBaselineInfo' }
4525 # @AddfdInfo:
4527 # Information about a file descriptor that was added to an fd set.
4529 # @fdset-id: The ID of the fd set that @fd was added to.
4531 # @fd: The file descriptor that was received via SCM rights and
4532 #      added to the fd set.
4534 # Since: 1.2.0
4536 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
4539 # @add-fd:
4541 # Add a file descriptor, that was passed via SCM rights, to an fd set.
4543 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
4545 # @opaque: #optional A free-form string that can be used to describe the fd.
4547 # Returns: @AddfdInfo on success
4549 #          If file descriptor was not received, FdNotSupplied
4551 #          If @fdset-id is a negative value, InvalidParameterValue
4553 # Notes: The list of fd sets is shared by all monitor connections.
4555 #        If @fdset-id is not specified, a new fd set will be created.
4557 # Since: 1.2.0
4559 # Example:
4561 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
4562 # <- { "return": { "fdset-id": 1, "fd": 3 } }
4565 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
4566   'returns': 'AddfdInfo' }
4569 # @remove-fd:
4571 # Remove a file descriptor from an fd set.
4573 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
4575 # @fd: #optional The file descriptor that is to be removed.
4577 # Returns: Nothing on success
4578 #          If @fdset-id or @fd is not found, FdNotFound
4580 # Since: 1.2.0
4582 # Notes: The list of fd sets is shared by all monitor connections.
4584 #        If @fd is not specified, all file descriptors in @fdset-id
4585 #        will be removed.
4587 # Example:
4589 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
4590 # <- { "return": {} }
4593 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
4596 # @FdsetFdInfo:
4598 # Information about a file descriptor that belongs to an fd set.
4600 # @fd: The file descriptor value.
4602 # @opaque: #optional A free-form string that can be used to describe the fd.
4604 # Since: 1.2.0
4606 { 'struct': 'FdsetFdInfo',
4607   'data': {'fd': 'int', '*opaque': 'str'} }
4610 # @FdsetInfo:
4612 # Information about an fd set.
4614 # @fdset-id: The ID of the fd set.
4616 # @fds: A list of file descriptors that belong to this fd set.
4618 # Since: 1.2.0
4620 { 'struct': 'FdsetInfo',
4621   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
4624 # @query-fdsets:
4626 # Return information describing all fd sets.
4628 # Returns: A list of @FdsetInfo
4630 # Since: 1.2.0
4632 # Note: The list of fd sets is shared by all monitor connections.
4634 # Example:
4636 # -> { "execute": "query-fdsets" }
4637 # <- { "return": [
4638 #        {
4639 #          "fds": [
4640 #            {
4641 #              "fd": 30,
4642 #              "opaque": "rdonly:/path/to/file"
4643 #            },
4644 #            {
4645 #              "fd": 24,
4646 #              "opaque": "rdwr:/path/to/file"
4647 #            }
4648 #          ],
4649 #          "fdset-id": 1
4650 #        },
4651 #        {
4652 #          "fds": [
4653 #            {
4654 #              "fd": 28
4655 #            },
4656 #            {
4657 #              "fd": 29
4658 #            }
4659 #          ],
4660 #          "fdset-id": 0
4661 #        }
4662 #      ]
4663 #    }
4666 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
4669 # @TargetInfo:
4671 # Information describing the QEMU target.
4673 # @arch: the target architecture (eg "x86_64", "i386", etc)
4675 # Since: 1.2.0
4677 { 'struct': 'TargetInfo',
4678   'data': { 'arch': 'str' } }
4681 # @query-target:
4683 # Return information about the target for this QEMU
4685 # Returns: TargetInfo
4687 # Since: 1.2.0
4689 { 'command': 'query-target', 'returns': 'TargetInfo' }
4692 # @QKeyCode:
4694 # An enumeration of key name.
4696 # This is used by the @send-key command.
4698 # @unmapped: since 2.0
4699 # @pause: since 2.0
4700 # @ro: since 2.4
4701 # @kp_comma: since 2.4
4702 # @kp_equals: since 2.6
4703 # @power: since 2.6
4704 # @hiragana: since 2.9
4705 # @henkan: since 2.9
4706 # @yen: since 2.9
4708 # Since: 1.3.0
4711 { 'enum': 'QKeyCode',
4712   'data': [ 'unmapped',
4713             'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
4714             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
4715             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
4716             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
4717             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
4718             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
4719             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
4720             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
4721             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
4722             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
4723             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
4724             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
4725             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
4726             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
4727             'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
4728             'ro', 'hiragana', 'henkan', 'yen',
4729             'kp_comma', 'kp_equals', 'power' ] }
4732 # @KeyValue:
4734 # Represents a keyboard key.
4736 # Since: 1.3.0
4738 { 'union': 'KeyValue',
4739   'data': {
4740     'number': 'int',
4741     'qcode': 'QKeyCode' } }
4744 # @send-key:
4746 # Send keys to guest.
4748 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
4749 #        simultaneously sent to the guest. A @KeyValue.number value is sent
4750 #        directly to the guest, while @KeyValue.qcode must be a valid
4751 #        @QKeyCode value
4753 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
4754 #             to 100
4756 # Returns: Nothing on success
4757 #          If key is unknown or redundant, InvalidParameter
4759 # Since: 1.3.0
4761 # Example:
4763 # -> { "execute": "send-key",
4764 #      "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
4765 #                               { "type": "qcode", "data": "alt" },
4766 #                               { "type": "qcode", "data": "delete" } ] } }
4767 # <- { "return": {} }
4770 { 'command': 'send-key',
4771   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
4774 # @screendump:
4776 # Write a PPM of the VGA screen to a file.
4778 # @filename: the path of a new PPM file to store the image
4780 # Returns: Nothing on success
4782 # Since: 0.14.0
4784 # Example:
4786 # -> { "execute": "screendump",
4787 #      "arguments": { "filename": "/tmp/image" } }
4788 # <- { "return": {} }
4791 { 'command': 'screendump', 'data': {'filename': 'str'} }
4795 # @ChardevCommon:
4797 # Configuration shared across all chardev backends
4799 # @logfile: #optional The name of a logfile to save output
4800 # @logappend: #optional true to append instead of truncate
4801 #             (default to false to truncate)
4803 # Since: 2.6
4805 { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
4806                                        '*logappend': 'bool' } }
4809 # @ChardevFile:
4811 # Configuration info for file chardevs.
4813 # @in:  #optional The name of the input file
4814 # @out: The name of the output file
4815 # @append: #optional Open the file in append mode (default false to
4816 #          truncate) (Since 2.6)
4818 # Since: 1.4
4820 { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
4821                                    'out' : 'str',
4822                                    '*append': 'bool' },
4823   'base': 'ChardevCommon' }
4826 # @ChardevHostdev:
4828 # Configuration info for device and pipe chardevs.
4830 # @device: The name of the special file for the device,
4831 #          i.e. /dev/ttyS0 on Unix or COM1: on Windows
4833 # Since: 1.4
4835 { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
4836   'base': 'ChardevCommon' }
4839 # @ChardevSocket:
4841 # Configuration info for (stream) socket chardevs.
4843 # @addr: socket address to listen on (server=true)
4844 #        or connect to (server=false)
4845 # @tls-creds: #optional the ID of the TLS credentials object (since 2.6)
4846 # @server: #optional create server socket (default: true)
4847 # @wait: #optional wait for incoming connection on server
4848 #        sockets (default: false).
4849 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
4850 # @telnet: #optional enable telnet protocol on server
4851 #          sockets (default: false)
4852 # @reconnect: #optional For a client socket, if a socket is disconnected,
4853 #          then attempt a reconnect after the given number of seconds.
4854 #          Setting this to zero disables this function. (default: 0)
4855 #          (Since: 2.2)
4857 # Since: 1.4
4859 { 'struct': 'ChardevSocket', 'data': { 'addr'       : 'SocketAddress',
4860                                      '*tls-creds'  : 'str',
4861                                      '*server'    : 'bool',
4862                                      '*wait'      : 'bool',
4863                                      '*nodelay'   : 'bool',
4864                                      '*telnet'    : 'bool',
4865                                      '*reconnect' : 'int' },
4866   'base': 'ChardevCommon' }
4869 # @ChardevUdp:
4871 # Configuration info for datagram socket chardevs.
4873 # @remote: remote address
4874 # @local: #optional local address
4876 # Since: 1.5
4878 { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
4879                                   '*local' : 'SocketAddress' },
4880   'base': 'ChardevCommon' }
4883 # @ChardevMux:
4885 # Configuration info for mux chardevs.
4887 # @chardev: name of the base chardev.
4889 # Since: 1.5
4891 { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
4892   'base': 'ChardevCommon' }
4895 # @ChardevStdio:
4897 # Configuration info for stdio chardevs.
4899 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
4900 #          be delivered to qemu.  Default: true in -nographic mode,
4901 #          false otherwise.
4903 # Since: 1.5
4905 { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
4906   'base': 'ChardevCommon' }
4910 # @ChardevSpiceChannel:
4912 # Configuration info for spice vm channel chardevs.
4914 # @type: kind of channel (for example vdagent).
4916 # Since: 1.5
4918 { 'struct': 'ChardevSpiceChannel', 'data': { 'type'  : 'str' },
4919   'base': 'ChardevCommon' }
4922 # @ChardevSpicePort:
4924 # Configuration info for spice port chardevs.
4926 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
4928 # Since: 1.5
4930 { 'struct': 'ChardevSpicePort', 'data': { 'fqdn'  : 'str' },
4931   'base': 'ChardevCommon' }
4934 # @ChardevVC:
4936 # Configuration info for virtual console chardevs.
4938 # @width:  console width,  in pixels
4939 # @height: console height, in pixels
4940 # @cols:   console width,  in chars
4941 # @rows:   console height, in chars
4943 # Since: 1.5
4945 { 'struct': 'ChardevVC', 'data': { '*width'  : 'int',
4946                                  '*height' : 'int',
4947                                  '*cols'   : 'int',
4948                                  '*rows'   : 'int' },
4949   'base': 'ChardevCommon' }
4952 # @ChardevRingbuf:
4954 # Configuration info for ring buffer chardevs.
4956 # @size: #optional ring buffer size, must be power of two, default is 65536
4958 # Since: 1.5
4960 { 'struct': 'ChardevRingbuf', 'data': { '*size'  : 'int' },
4961   'base': 'ChardevCommon' }
4964 # @ChardevBackend:
4966 # Configuration info for the new chardev backend.
4968 # Since: 1.4 (testdev since 2.2, wctablet since 2.9)
4970 { 'union': 'ChardevBackend', 'data': { 'file'   : 'ChardevFile',
4971                                        'serial' : 'ChardevHostdev',
4972                                        'parallel': 'ChardevHostdev',
4973                                        'pipe'   : 'ChardevHostdev',
4974                                        'socket' : 'ChardevSocket',
4975                                        'udp'    : 'ChardevUdp',
4976                                        'pty'    : 'ChardevCommon',
4977                                        'null'   : 'ChardevCommon',
4978                                        'mux'    : 'ChardevMux',
4979                                        'msmouse': 'ChardevCommon',
4980                                        'wctablet' : 'ChardevCommon',
4981                                        'braille': 'ChardevCommon',
4982                                        'testdev': 'ChardevCommon',
4983                                        'stdio'  : 'ChardevStdio',
4984                                        'console': 'ChardevCommon',
4985                                        'spicevmc' : 'ChardevSpiceChannel',
4986                                        'spiceport' : 'ChardevSpicePort',
4987                                        'vc'     : 'ChardevVC',
4988                                        'ringbuf': 'ChardevRingbuf',
4989                                        # next one is just for compatibility
4990                                        'memory' : 'ChardevRingbuf' } }
4993 # @ChardevReturn:
4995 # Return info about the chardev backend just created.
4997 # @pty: #optional name of the slave pseudoterminal device, present if
4998 #       and only if a chardev of type 'pty' was created
5000 # Since: 1.4
5002 { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
5005 # @chardev-add:
5007 # Add a character device backend
5009 # @id: the chardev's ID, must be unique
5010 # @backend: backend type and parameters
5012 # Returns: ChardevReturn.
5014 # Since: 1.4
5016 # Example:
5018 # -> { "execute" : "chardev-add",
5019 #      "arguments" : { "id" : "foo",
5020 #                      "backend" : { "type" : "null", "data" : {} } } }
5021 # <- { "return": {} }
5023 # -> { "execute" : "chardev-add",
5024 #      "arguments" : { "id" : "bar",
5025 #                      "backend" : { "type" : "file",
5026 #                                    "data" : { "out" : "/tmp/bar.log" } } } }
5027 # <- { "return": {} }
5029 # -> { "execute" : "chardev-add",
5030 #      "arguments" : { "id" : "baz",
5031 #                      "backend" : { "type" : "pty", "data" : {} } } }
5032 # <- { "return": { "pty" : "/dev/pty/42" } }
5035 { 'command': 'chardev-add', 'data': {'id'      : 'str',
5036                                      'backend' : 'ChardevBackend' },
5037   'returns': 'ChardevReturn' }
5040 # @chardev-remove:
5042 # Remove a character device backend
5044 # @id: the chardev's ID, must exist and not be in use
5046 # Returns: Nothing on success
5048 # Since: 1.4
5050 # Example:
5052 # -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
5053 # <- { "return": {} }
5056 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
5059 # @TpmModel:
5061 # An enumeration of TPM models
5063 # @tpm-tis: TPM TIS model
5065 # Since: 1.5
5067 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
5070 # @query-tpm-models:
5072 # Return a list of supported TPM models
5074 # Returns: a list of TpmModel
5076 # Since: 1.5
5078 # Example:
5080 # -> { "execute": "query-tpm-models" }
5081 # <- { "return": [ "tpm-tis" ] }
5084 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
5087 # @TpmType:
5089 # An enumeration of TPM types
5091 # @passthrough: TPM passthrough type
5093 # Since: 1.5
5095 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
5098 # @query-tpm-types:
5100 # Return a list of supported TPM types
5102 # Returns: a list of TpmType
5104 # Since: 1.5
5106 # Example:
5108 # -> { "execute": "query-tpm-types" }
5109 # <- { "return": [ "passthrough" ] }
5112 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
5115 # @TPMPassthroughOptions:
5117 # Information about the TPM passthrough type
5119 # @path: #optional string describing the path used for accessing the TPM device
5121 # @cancel-path: #optional string showing the TPM's sysfs cancel file
5122 #               for cancellation of TPM commands while they are executing
5124 # Since: 1.5
5126 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
5127                                              '*cancel-path' : 'str'} }
5130 # @TpmTypeOptions:
5132 # A union referencing different TPM backend types' configuration options
5134 # @type: 'passthrough' The configuration options for the TPM passthrough type
5136 # Since: 1.5
5138 { 'union': 'TpmTypeOptions',
5139    'data': { 'passthrough' : 'TPMPassthroughOptions' } }
5142 # @TPMInfo:
5144 # Information about the TPM
5146 # @id: The Id of the TPM
5148 # @model: The TPM frontend model
5150 # @options: The TPM (backend) type configuration options
5152 # Since: 1.5
5154 { 'struct': 'TPMInfo',
5155   'data': {'id': 'str',
5156            'model': 'TpmModel',
5157            'options': 'TpmTypeOptions' } }
5160 # @query-tpm:
5162 # Return information about the TPM device
5164 # Returns: @TPMInfo on success
5166 # Since: 1.5
5168 # Example:
5170 # -> { "execute": "query-tpm" }
5171 # <- { "return":
5172 #      [
5173 #        { "model": "tpm-tis",
5174 #          "options":
5175 #            { "type": "passthrough",
5176 #              "data":
5177 #                { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
5178 #                  "path": "/dev/tpm0"
5179 #                }
5180 #            },
5181 #          "id": "tpm0"
5182 #        }
5183 #      ]
5184 #    }
5187 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
5190 # @AcpiTableOptions:
5192 # Specify an ACPI table on the command line to load.
5194 # At most one of @file and @data can be specified. The list of files specified
5195 # by any one of them is loaded and concatenated in order. If both are omitted,
5196 # @data is implied.
5198 # Other fields / optargs can be used to override fields of the generic ACPI
5199 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
5200 # Description Table Header. If a header field is not overridden, then the
5201 # corresponding value from the concatenated blob is used (in case of @file), or
5202 # it is filled in with a hard-coded value (in case of @data).
5204 # String fields are copied into the matching ACPI member from lowest address
5205 # upwards, and silently truncated / NUL-padded to length.
5207 # @sig: #optional table signature / identifier (4 bytes)
5209 # @rev: #optional table revision number (dependent on signature, 1 byte)
5211 # @oem_id: #optional OEM identifier (6 bytes)
5213 # @oem_table_id: #optional OEM table identifier (8 bytes)
5215 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
5217 # @asl_compiler_id: #optional identifier of the utility that created the table
5218 #                   (4 bytes)
5220 # @asl_compiler_rev: #optional revision number of the utility that created the
5221 #                    table (4 bytes)
5223 # @file: #optional colon (:) separated list of pathnames to load and
5224 #        concatenate as table data. The resultant binary blob is expected to
5225 #        have an ACPI table header. At least one file is required. This field
5226 #        excludes @data.
5228 # @data: #optional colon (:) separated list of pathnames to load and
5229 #        concatenate as table data. The resultant binary blob must not have an
5230 #        ACPI table header. At least one file is required. This field excludes
5231 #        @file.
5233 # Since: 1.5
5235 { 'struct': 'AcpiTableOptions',
5236   'data': {
5237     '*sig':               'str',
5238     '*rev':               'uint8',
5239     '*oem_id':            'str',
5240     '*oem_table_id':      'str',
5241     '*oem_rev':           'uint32',
5242     '*asl_compiler_id':   'str',
5243     '*asl_compiler_rev':  'uint32',
5244     '*file':              'str',
5245     '*data':              'str' }}
5248 # @CommandLineParameterType:
5250 # Possible types for an option parameter.
5252 # @string: accepts a character string
5254 # @boolean: accepts "on" or "off"
5256 # @number: accepts a number
5258 # @size: accepts a number followed by an optional suffix (K)ilo,
5259 #        (M)ega, (G)iga, (T)era
5261 # Since: 1.5
5263 { 'enum': 'CommandLineParameterType',
5264   'data': ['string', 'boolean', 'number', 'size'] }
5267 # @CommandLineParameterInfo:
5269 # Details about a single parameter of a command line option.
5271 # @name: parameter name
5273 # @type: parameter @CommandLineParameterType
5275 # @help: #optional human readable text string, not suitable for parsing.
5277 # @default: #optional default value string (since 2.1)
5279 # Since: 1.5
5281 { 'struct': 'CommandLineParameterInfo',
5282   'data': { 'name': 'str',
5283             'type': 'CommandLineParameterType',
5284             '*help': 'str',
5285             '*default': 'str' } }
5288 # @CommandLineOptionInfo:
5290 # Details about a command line option, including its list of parameter details
5292 # @option: option name
5294 # @parameters: an array of @CommandLineParameterInfo
5296 # Since: 1.5
5298 { 'struct': 'CommandLineOptionInfo',
5299   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
5302 # @query-command-line-options:
5304 # Query command line option schema.
5306 # @option: #optional option name
5308 # Returns: list of @CommandLineOptionInfo for all options (or for the given
5309 #          @option).  Returns an error if the given @option doesn't exist.
5311 # Since: 1.5
5313 # Example:
5315 # -> { "execute": "query-command-line-options",
5316 #      "arguments": { "option": "option-rom" } }
5317 # <- { "return": [
5318 #         {
5319 #             "parameters": [
5320 #                 {
5321 #                     "name": "romfile",
5322 #                     "type": "string"
5323 #                 },
5324 #                 {
5325 #                     "name": "bootindex",
5326 #                     "type": "number"
5327 #                 }
5328 #             ],
5329 #             "option": "option-rom"
5330 #         }
5331 #      ]
5332 #    }
5335 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
5336  'returns': ['CommandLineOptionInfo'] }
5339 # @X86CPURegister32:
5341 # A X86 32-bit register
5343 # Since: 1.5
5345 { 'enum': 'X86CPURegister32',
5346   'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
5349 # @X86CPUFeatureWordInfo:
5351 # Information about a X86 CPU feature word
5353 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
5355 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
5356 #                   feature word
5358 # @cpuid-register: Output register containing the feature bits
5360 # @features: value of output register, containing the feature bits
5362 # Since: 1.5
5364 { 'struct': 'X86CPUFeatureWordInfo',
5365   'data': { 'cpuid-input-eax': 'int',
5366             '*cpuid-input-ecx': 'int',
5367             'cpuid-register': 'X86CPURegister32',
5368             'features': 'int' } }
5371 # @DummyForceArrays:
5373 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
5375 # Since: 2.5
5377 { 'struct': 'DummyForceArrays',
5378   'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
5382 # @RxState:
5384 # Packets receiving state
5386 # @normal: filter assigned packets according to the mac-table
5388 # @none: don't receive any assigned packet
5390 # @all: receive all assigned packets
5392 # Since: 1.6
5394 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
5397 # @RxFilterInfo:
5399 # Rx-filter information for a NIC.
5401 # @name: net client name
5403 # @promiscuous: whether promiscuous mode is enabled
5405 # @multicast: multicast receive state
5407 # @unicast: unicast receive state
5409 # @vlan: vlan receive state (Since 2.0)
5411 # @broadcast-allowed: whether to receive broadcast
5413 # @multicast-overflow: multicast table is overflowed or not
5415 # @unicast-overflow: unicast table is overflowed or not
5417 # @main-mac: the main macaddr string
5419 # @vlan-table: a list of active vlan id
5421 # @unicast-table: a list of unicast macaddr string
5423 # @multicast-table: a list of multicast macaddr string
5425 # Since: 1.6
5427 { 'struct': 'RxFilterInfo',
5428   'data': {
5429     'name':               'str',
5430     'promiscuous':        'bool',
5431     'multicast':          'RxState',
5432     'unicast':            'RxState',
5433     'vlan':               'RxState',
5434     'broadcast-allowed':  'bool',
5435     'multicast-overflow': 'bool',
5436     'unicast-overflow':   'bool',
5437     'main-mac':           'str',
5438     'vlan-table':         ['int'],
5439     'unicast-table':      ['str'],
5440     'multicast-table':    ['str'] }}
5443 # @query-rx-filter:
5445 # Return rx-filter information for all NICs (or for the given NIC).
5447 # @name: #optional net client name
5449 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
5450 #          Returns an error if the given @name doesn't exist, or given
5451 #          NIC doesn't support rx-filter querying, or given net client
5452 #          isn't a NIC.
5454 # Since: 1.6
5456 # Example:
5458 # -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
5459 # <- { "return": [
5460 #         {
5461 #             "promiscuous": true,
5462 #             "name": "vnet0",
5463 #             "main-mac": "52:54:00:12:34:56",
5464 #             "unicast": "normal",
5465 #             "vlan": "normal",
5466 #             "vlan-table": [
5467 #                 4,
5468 #                 0
5469 #             ],
5470 #             "unicast-table": [
5471 #             ],
5472 #             "multicast": "normal",
5473 #             "multicast-overflow": false,
5474 #             "unicast-overflow": false,
5475 #             "multicast-table": [
5476 #                 "01:00:5e:00:00:01",
5477 #                 "33:33:00:00:00:01",
5478 #                 "33:33:ff:12:34:56"
5479 #             ],
5480 #             "broadcast-allowed": false
5481 #         }
5482 #       ]
5483 #    }
5486 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
5487   'returns': ['RxFilterInfo'] }
5490 # @InputButton:
5492 # Button of a pointer input device (mouse, tablet).
5494 # @side: front side button of a 5-button mouse (since 2.9)
5496 # @extra: rear side button of a 5-button mouse (since 2.9)
5498 # Since: 2.0
5500 { 'enum'  : 'InputButton',
5501   'data'  : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
5502   'extra' ] }
5505 # @InputAxis:
5507 # Position axis of a pointer input device (mouse, tablet).
5509 # Since: 2.0
5511 { 'enum'  : 'InputAxis',
5512   'data'  : [ 'x', 'y' ] }
5515 # @InputKeyEvent:
5517 # Keyboard input event.
5519 # @key:    Which key this event is for.
5520 # @down:   True for key-down and false for key-up events.
5522 # Since: 2.0
5524 { 'struct'  : 'InputKeyEvent',
5525   'data'  : { 'key'     : 'KeyValue',
5526               'down'    : 'bool' } }
5529 # @InputBtnEvent:
5531 # Pointer button input event.
5533 # @button: Which button this event is for.
5534 # @down:   True for key-down and false for key-up events.
5536 # Since: 2.0
5538 { 'struct'  : 'InputBtnEvent',
5539   'data'  : { 'button'  : 'InputButton',
5540               'down'    : 'bool' } }
5543 # @InputMoveEvent:
5545 # Pointer motion input event.
5547 # @axis:   Which axis is referenced by @value.
5548 # @value:  Pointer position.  For absolute coordinates the
5549 #          valid range is 0 -> 0x7ffff
5551 # Since: 2.0
5553 { 'struct'  : 'InputMoveEvent',
5554   'data'  : { 'axis'    : 'InputAxis',
5555               'value'   : 'int' } }
5558 # @InputEvent:
5560 # Input event union.
5562 # @type: the input type, one of:
5563 #  - 'key': Input event of Keyboard
5564 #  - 'btn': Input event of pointer buttons
5565 #  - 'rel': Input event of relative pointer motion
5566 #  - 'abs': Input event of absolute pointer motion
5568 # Since: 2.0
5570 { 'union' : 'InputEvent',
5571   'data'  : { 'key'     : 'InputKeyEvent',
5572               'btn'     : 'InputBtnEvent',
5573               'rel'     : 'InputMoveEvent',
5574               'abs'     : 'InputMoveEvent' } }
5577 # @input-send-event:
5579 # Send input event(s) to guest.
5581 # @device: #optional display device to send event(s) to.
5582 # @head: #optional head to send event(s) to, in case the
5583 #        display device supports multiple scanouts.
5584 # @events: List of InputEvent union.
5586 # Returns: Nothing on success.
5588 # The @device and @head parameters can be used to send the input event
5589 # to specific input devices in case (a) multiple input devices of the
5590 # same kind are added to the virtual machine and (b) you have
5591 # configured input routing (see docs/multiseat.txt) for those input
5592 # devices.  The parameters work exactly like the device and head
5593 # properties of input devices.  If @device is missing, only devices
5594 # that have no input routing config are admissible.  If @device is
5595 # specified, both input devices with and without input routing config
5596 # are admissible, but devices with input routing config take
5597 # precedence.
5599 # Since: 2.6
5601 # Note: The consoles are visible in the qom tree, under
5602 # /backend/console[$index]. They have a device link and head property,
5603 # so it is possible to map which console belongs to which device and
5604 # display.
5606 # Example:
5608 # 1. Press left mouse button.
5610 # -> { "execute": "input-send-event",
5611 #     "arguments": { "device": "video0",
5612 #                    "events": [ { "type": "btn",
5613 #                    "data" : { "down": true, "button": "left" } } ] } }
5614 # <- { "return": {} }
5616 # -> { "execute": "input-send-event",
5617 #     "arguments": { "device": "video0",
5618 #                    "events": [ { "type": "btn",
5619 #                    "data" : { "down": false, "button": "left" } } ] } }
5620 # <- { "return": {} }
5622 # 2. Press ctrl-alt-del.
5624 # -> { "execute": "input-send-event",
5625 #      "arguments": { "events": [
5626 #         { "type": "key", "data" : { "down": true,
5627 #           "key": {"type": "qcode", "data": "ctrl" } } },
5628 #         { "type": "key", "data" : { "down": true,
5629 #           "key": {"type": "qcode", "data": "alt" } } },
5630 #         { "type": "key", "data" : { "down": true,
5631 #           "key": {"type": "qcode", "data": "delete" } } } ] } }
5632 # <- { "return": {} }
5634 # 3. Move mouse pointer to absolute coordinates (20000, 400).
5636 # -> { "execute": "input-send-event" ,
5637 #   "arguments": { "events": [
5638 #                { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
5639 #                { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
5640 # <- { "return": {} }
5643 { 'command': 'input-send-event',
5644   'data': { '*device': 'str',
5645             '*head'  : 'int',
5646             'events' : [ 'InputEvent' ] } }
5649 # @NumaOptionsType:
5651 # Since: 2.1
5653 { 'enum': 'NumaOptionsType',
5654   'data': [ 'node' ] }
5657 # @NumaOptions:
5659 # A discriminated record of NUMA options. (for OptsVisitor)
5661 # Since: 2.1
5663 { 'union': 'NumaOptions',
5664   'base': { 'type': 'NumaOptionsType' },
5665   'discriminator': 'type',
5666   'data': {
5667     'node': 'NumaNodeOptions' }}
5670 # @NumaNodeOptions:
5672 # Create a guest NUMA node. (for OptsVisitor)
5674 # @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
5676 # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
5677 #         if omitted)
5679 # @mem: #optional memory size of this node; mutually exclusive with @memdev.
5680 #       Equally divide total memory among nodes if both @mem and @memdev are
5681 #       omitted.
5683 # @memdev: #optional memory backend object.  If specified for one node,
5684 #          it must be specified for all nodes.
5686 # Since: 2.1
5688 { 'struct': 'NumaNodeOptions',
5689   'data': {
5690    '*nodeid': 'uint16',
5691    '*cpus':   ['uint16'],
5692    '*mem':    'size',
5693    '*memdev': 'str' }}
5696 # @HostMemPolicy:
5698 # Host memory policy types
5700 # @default: restore default policy, remove any nondefault policy
5702 # @preferred: set the preferred host nodes for allocation
5704 # @bind: a strict policy that restricts memory allocation to the
5705 #        host nodes specified
5707 # @interleave: memory allocations are interleaved across the set
5708 #              of host nodes specified
5710 # Since: 2.1
5712 { 'enum': 'HostMemPolicy',
5713   'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
5716 # @Memdev:
5718 # Information about memory backend
5720 # @id: #optional backend's ID if backend has 'id' property (since 2.9)
5722 # @size: memory backend size
5724 # @merge: enables or disables memory merge support
5726 # @dump: includes memory backend's memory in a core dump or not
5728 # @prealloc: enables or disables memory preallocation
5730 # @host-nodes: host nodes for its memory policy
5732 # @policy: memory policy of memory backend
5734 # Since: 2.1
5736 { 'struct': 'Memdev',
5737   'data': {
5738     '*id':        'str',
5739     'size':       'size',
5740     'merge':      'bool',
5741     'dump':       'bool',
5742     'prealloc':   'bool',
5743     'host-nodes': ['uint16'],
5744     'policy':     'HostMemPolicy' }}
5747 # @query-memdev:
5749 # Returns information for all memory backends.
5751 # Returns: a list of @Memdev.
5753 # Since: 2.1
5755 # Example:
5757 # -> { "execute": "query-memdev" }
5758 # <- { "return": [
5759 #        {
5760 #          "id": "mem1",
5761 #          "size": 536870912,
5762 #          "merge": false,
5763 #          "dump": true,
5764 #          "prealloc": false,
5765 #          "host-nodes": [0, 1],
5766 #          "policy": "bind"
5767 #        },
5768 #        {
5769 #          "size": 536870912,
5770 #          "merge": false,
5771 #          "dump": true,
5772 #          "prealloc": true,
5773 #          "host-nodes": [2, 3],
5774 #          "policy": "preferred"
5775 #        }
5776 #      ]
5777 #    }
5780 { 'command': 'query-memdev', 'returns': ['Memdev'] }
5783 # @PCDIMMDeviceInfo:
5785 # PCDIMMDevice state information
5787 # @id: #optional device's ID
5789 # @addr: physical address, where device is mapped
5791 # @size: size of memory that the device provides
5793 # @slot: slot number at which device is plugged in
5795 # @node: NUMA node number where device is plugged in
5797 # @memdev: memory backend linked with device
5799 # @hotplugged: true if device was hotplugged
5801 # @hotpluggable: true if device if could be added/removed while machine is running
5803 # Since: 2.1
5805 { 'struct': 'PCDIMMDeviceInfo',
5806   'data': { '*id': 'str',
5807             'addr': 'int',
5808             'size': 'int',
5809             'slot': 'int',
5810             'node': 'int',
5811             'memdev': 'str',
5812             'hotplugged': 'bool',
5813             'hotpluggable': 'bool'
5814           }
5818 # @MemoryDeviceInfo:
5820 # Union containing information about a memory device
5822 # Since: 2.1
5824 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
5827 # @query-memory-devices:
5829 # Lists available memory devices and their state
5831 # Since: 2.1
5833 # Example:
5835 # -> { "execute": "query-memory-devices" }
5836 # <- { "return": [ { "data":
5837 #                       { "addr": 5368709120,
5838 #                         "hotpluggable": true,
5839 #                         "hotplugged": true,
5840 #                         "id": "d1",
5841 #                         "memdev": "/objects/memX",
5842 #                         "node": 0,
5843 #                         "size": 1073741824,
5844 #                         "slot": 0},
5845 #                    "type": "dimm"
5846 #                  } ] }
5849 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
5852 # @ACPISlotType:
5854 # @DIMM: memory slot
5855 # @CPU: logical CPU slot (since 2.7)
5857 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
5860 # @ACPIOSTInfo:
5862 # OSPM Status Indication for a device
5863 # For description of possible values of @source and @status fields
5864 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
5866 # @device: #optional device ID associated with slot
5868 # @slot: slot ID, unique per slot of a given @slot-type
5870 # @slot-type: type of the slot
5872 # @source: an integer containing the source event
5874 # @status: an integer containing the status code
5876 # Since: 2.1
5878 { 'struct': 'ACPIOSTInfo',
5879   'data'  : { '*device': 'str',
5880               'slot': 'str',
5881               'slot-type': 'ACPISlotType',
5882               'source': 'int',
5883               'status': 'int' } }
5886 # @query-acpi-ospm-status:
5888 # Return a list of ACPIOSTInfo for devices that support status
5889 # reporting via ACPI _OST method.
5891 # Since: 2.1
5893 # Example:
5895 # -> { "execute": "query-acpi-ospm-status" }
5896 # <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
5897 #                  { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
5898 #                  { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
5899 #                  { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
5900 #    ]}
5903 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
5906 # @WatchdogExpirationAction:
5908 # An enumeration of the actions taken when the watchdog device's timer is
5909 # expired
5911 # @reset: system resets
5913 # @shutdown: system shutdown, note that it is similar to @powerdown, which
5914 #            tries to set to system status and notify guest
5916 # @poweroff: system poweroff, the emulator program exits
5918 # @pause: system pauses, similar to @stop
5920 # @debug: system enters debug state
5922 # @none: nothing is done
5924 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
5925 #              VCPUS on x86) (since 2.4)
5927 # Since: 2.1
5929 { 'enum': 'WatchdogExpirationAction',
5930   'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
5931             'inject-nmi' ] }
5934 # @IoOperationType:
5936 # An enumeration of the I/O operation types
5938 # @read: read operation
5940 # @write: write operation
5942 # Since: 2.1
5944 { 'enum': 'IoOperationType',
5945   'data': [ 'read', 'write' ] }
5948 # @GuestPanicAction:
5950 # An enumeration of the actions taken when guest OS panic is detected
5952 # @pause: system pauses
5954 # Since: 2.1 (poweroff since 2.8)
5956 { 'enum': 'GuestPanicAction',
5957   'data': [ 'pause', 'poweroff' ] }
5960 # @GuestPanicInformationType:
5962 # An enumeration of the guest panic information types
5964 # Since: 2.9
5966 { 'enum': 'GuestPanicInformationType',
5967   'data': [ 'hyper-v'] }
5970 # @GuestPanicInformation:
5972 # Information about a guest panic
5974 # Since: 2.9
5976 {'union': 'GuestPanicInformation',
5977  'base': {'type': 'GuestPanicInformationType'},
5978  'discriminator': 'type',
5979  'data': { 'hyper-v': 'GuestPanicInformationHyperV' } }
5982 # @GuestPanicInformationHyperV:
5984 # Hyper-V specific guest panic information (HV crash MSRs)
5986 # Since: 2.9
5988 {'struct': 'GuestPanicInformationHyperV',
5989  'data': { 'arg1': 'uint64',
5990            'arg2': 'uint64',
5991            'arg3': 'uint64',
5992            'arg4': 'uint64',
5993            'arg5': 'uint64' } }
5996 # @rtc-reset-reinjection:
5998 # This command will reset the RTC interrupt reinjection backlog.
5999 # Can be used if another mechanism to synchronize guest time
6000 # is in effect, for example QEMU guest agent's guest-set-time
6001 # command.
6003 # Since: 2.1
6005 # Example:
6007 # -> { "execute": "rtc-reset-reinjection" }
6008 # <- { "return": {} }
6011 { 'command': 'rtc-reset-reinjection' }
6013 # Rocker ethernet network switch
6014 { 'include': 'qapi/rocker.json' }
6017 # @ReplayMode:
6019 # Mode of the replay subsystem.
6021 # @none: normal execution mode. Replay or record are not enabled.
6023 # @record: record mode. All non-deterministic data is written into the
6024 #          replay log.
6026 # @play: replay mode. Non-deterministic data required for system execution
6027 #        is read from the log.
6029 # Since: 2.5
6031 { 'enum': 'ReplayMode',
6032   'data': [ 'none', 'record', 'play' ] }
6035 # @xen-load-devices-state:
6037 # Load the state of all devices from file. The RAM and the block devices
6038 # of the VM are not loaded by this command.
6040 # @filename: the file to load the state of the devices from as binary
6041 # data. See xen-save-devices-state.txt for a description of the binary
6042 # format.
6044 # Since: 2.7
6046 # Example:
6048 # -> { "execute": "xen-load-devices-state",
6049 #      "arguments": { "filename": "/tmp/resume" } }
6050 # <- { "return": {} }
6053 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
6056 # @xen-set-replication:
6058 # Enable or disable replication.
6060 # @enable: true to enable, false to disable.
6062 # @primary: true for primary or false for secondary.
6064 # @failover: #optional true to do failover, false to stop. but cannot be
6065 #            specified if 'enable' is true. default value is false.
6067 # Returns: nothing.
6069 # Example:
6071 # -> { "execute": "xen-set-replication",
6072 #      "arguments": {"enable": true, "primary": false} }
6073 # <- { "return": {} }
6075 # Since: 2.9
6077 { 'command': 'xen-set-replication',
6078   'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }
6081 # @ReplicationStatus:
6083 # The result format for 'query-xen-replication-status'.
6085 # @error: true if an error happened, false if replication is normal.
6087 # @desc: #optional the human readable error description string, when
6088 #        @error is 'true'.
6090 # Since: 2.9
6092 { 'struct': 'ReplicationStatus',
6093   'data': { 'error': 'bool', '*desc': 'str' } }
6096 # @query-xen-replication-status:
6098 # Query replication status while the vm is running.
6100 # Returns: A @ReplicationResult object showing the status.
6102 # Example:
6104 # -> { "execute": "query-xen-replication-status" }
6105 # <- { "return": { "error": false } }
6107 # Since: 2.9
6109 { 'command': 'query-xen-replication-status',
6110   'returns': 'ReplicationStatus' }
6113 # @xen-colo-do-checkpoint:
6115 # Xen uses this command to notify replication to trigger a checkpoint.
6117 # Returns: nothing.
6119 # Example:
6121 # -> { "execute": "xen-colo-do-checkpoint" }
6122 # <- { "return": {} }
6124 # Since: 2.9
6126 { 'command': 'xen-colo-do-checkpoint' }
6129 # @GICCapability:
6131 # The struct describes capability for a specific GIC (Generic
6132 # Interrupt Controller) version. These bits are not only decided by
6133 # QEMU/KVM software version, but also decided by the hardware that
6134 # the program is running upon.
6136 # @version:  version of GIC to be described. Currently, only 2 and 3
6137 #            are supported.
6139 # @emulated: whether current QEMU/hardware supports emulated GIC
6140 #            device in user space.
6142 # @kernel:   whether current QEMU/hardware supports hardware
6143 #            accelerated GIC device in kernel.
6145 # Since: 2.6
6147 { 'struct': 'GICCapability',
6148   'data': { 'version': 'int',
6149             'emulated': 'bool',
6150             'kernel': 'bool' } }
6153 # @query-gic-capabilities:
6155 # This command is ARM-only. It will return a list of GICCapability
6156 # objects that describe its capability bits.
6158 # Returns: a list of GICCapability objects.
6160 # Since: 2.6
6162 # Example:
6164 # -> { "execute": "query-gic-capabilities" }
6165 # <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
6166 #                 { "version": 3, "emulated": false, "kernel": true } ] }
6169 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
6172 # @CpuInstanceProperties:
6174 # List of properties to be used for hotplugging a CPU instance,
6175 # it should be passed by management with device_add command when
6176 # a CPU is being hotplugged.
6178 # @node-id: #optional NUMA node ID the CPU belongs to
6179 # @socket-id: #optional socket number within node/board the CPU belongs to
6180 # @core-id: #optional core number within socket the CPU belongs to
6181 # @thread-id: #optional thread number within core the CPU belongs to
6183 # Note: currently there are 4 properties that could be present
6184 # but management should be prepared to pass through other
6185 # properties with device_add command to allow for future
6186 # interface extension. This also requires the filed names to be kept in
6187 # sync with the properties passed to -device/device_add.
6189 # Since: 2.7
6191 { 'struct': 'CpuInstanceProperties',
6192   'data': { '*node-id': 'int',
6193             '*socket-id': 'int',
6194             '*core-id': 'int',
6195             '*thread-id': 'int'
6196   }
6200 # @HotpluggableCPU:
6202 # @type: CPU object type for usage with device_add command
6203 # @props: list of properties to be used for hotplugging CPU
6204 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
6205 # @qom-path: #optional link to existing CPU object if CPU is present or
6206 #            omitted if CPU is not present.
6208 # Since: 2.7
6210 { 'struct': 'HotpluggableCPU',
6211   'data': { 'type': 'str',
6212             'vcpus-count': 'int',
6213             'props': 'CpuInstanceProperties',
6214             '*qom-path': 'str'
6215           }
6219 # @query-hotpluggable-cpus:
6221 # Returns: a list of HotpluggableCPU objects.
6223 # Since: 2.7
6225 # Example:
6227 # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
6229 # -> { "execute": "query-hotpluggable-cpus" }
6230 # <- {"return": [
6231 #      { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
6232 #        "vcpus-count": 1 },
6233 #      { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
6234 #        "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
6235 #    ]}'
6237 # For pc machine type started with -smp 1,maxcpus=2:
6239 # -> { "execute": "query-hotpluggable-cpus" }
6240 # <- {"return": [
6241 #      {
6242 #         "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
6243 #         "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
6244 #      },
6245 #      {
6246 #         "qom-path": "/machine/unattached/device[0]",
6247 #         "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
6248 #         "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
6249 #      }
6250 #    ]}
6253 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }
6256 # @GuidInfo:
6258 # GUID information.
6260 # @guid: the globally unique identifier
6262 # Since: 2.9
6264 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
6267 # @query-vm-generation-id:
6269 # Show Virtual Machine Generation ID
6271 # Since 2.9
6273 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }