]> git.proxmox.com Git - mirror_qemu.git/blob - qapi-schema.json
Add chardev-send-break monitor command
[mirror_qemu.git] / qapi-schema.json
1 # -*- Mode: Python -*-
2 ##
3 # = Introduction
4 #
5 # This document describes all commands currently supported by QMP.
6 #
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.
10 #
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.
14 #
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.
18 #
19 # Also, the following notation is used to denote data flow:
20 #
21 # Example:
22 #
23 # | -> data issued by the Client
24 # | <- Server data response
25 #
26 # Please, refer to the QMP specification (docs/qmp-spec.txt) for
27 # detailed information on the Server command and response formats.
28 #
29 # = Stability Considerations
30 #
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.
34 #
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.
37 #
38 # If you're planning to adopt QMP, please observe the following:
39 #
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
43 #
44 # 2. DO NOT rely on anything which is not explicit documented
45 #
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)
49 #
50 ##
51
52 { 'pragma': { 'doc-required': true } }
53
54 # Whitelists to permit QAPI rule violations; think twice before you
55 # add to them!
56 { 'pragma': {
57 # Commands allowed to return a non-dictionary:
58 'returns-whitelist': [
59 'human-monitor-command',
60 'qom-get',
61 'query-migrate-cache-size',
62 'query-tpm-models',
63 'query-tpm-types',
64 'ringbuf-read' ],
65 'name-case-whitelist': [
66 'ACPISlotType', # DIMM, visible through query-acpi-ospm-status
67 'CpuInfoMIPS', # PC, visible through query-cpu
68 'CpuInfoTricore', # PC, visible through query-cpu
69 'QapiErrorClass', # all members, visible through errors
70 'UuidInfo', # UUID, visible through query-uuid
71 'X86CPURegister32', # all members, visible indirectly through qom-get
72 'q_obj_CpuInfo-base' # CPU, visible through query-cpu
73 ] } }
74
75 # QAPI common definitions
76 { 'include': 'qapi/common.json' }
77
78 # QAPI crypto definitions
79 { 'include': 'qapi/crypto.json' }
80
81 # QAPI block definitions
82 { 'include': 'qapi/block.json' }
83
84 # QAPI event definitions
85 { 'include': 'qapi/event.json' }
86
87 # Tracing commands
88 { 'include': 'qapi/trace.json' }
89
90 # QAPI introspection
91 { 'include': 'qapi/introspect.json' }
92
93 ##
94 # = QMP commands
95 ##
96
97 ##
98 # @qmp_capabilities:
99 #
100 # Enable QMP capabilities.
101 #
102 # Arguments: None.
103 #
104 # Example:
105 #
106 # -> { "execute": "qmp_capabilities" }
107 # <- { "return": {} }
108 #
109 # Notes: This command is valid exactly when first connecting: it must be
110 # issued before any other command will be accepted, and will fail once the
111 # monitor is accepting other commands. (see qemu docs/qmp-spec.txt)
112 #
113 # Since: 0.13
114 #
115 ##
116 { 'command': 'qmp_capabilities' }
117
118 ##
119 # @LostTickPolicy:
120 #
121 # Policy for handling lost ticks in timer devices.
122 #
123 # @discard: throw away the missed tick(s) and continue with future injection
124 # normally. Guest time may be delayed, unless the OS has explicit
125 # handling of lost ticks
126 #
127 # @delay: continue to deliver ticks at the normal rate. Guest time will be
128 # delayed due to the late tick
129 #
130 # @merge: merge the missed tick(s) into one tick and inject. Guest time
131 # may be delayed, depending on how the OS reacts to the merging
132 # of ticks
133 #
134 # @slew: deliver ticks at a higher rate to catch up with the missed tick. The
135 # guest time should not be delayed once catchup is complete.
136 #
137 # Since: 2.0
138 ##
139 { 'enum': 'LostTickPolicy',
140 'data': ['discard', 'delay', 'merge', 'slew' ] }
141
142 ##
143 # @add_client:
144 #
145 # Allow client connections for VNC, Spice and socket based
146 # character devices to be passed in to QEMU via SCM_RIGHTS.
147 #
148 # @protocol: protocol name. Valid names are "vnc", "spice" or the
149 # name of a character device (eg. from -chardev id=XXXX)
150 #
151 # @fdname: file descriptor name previously passed via 'getfd' command
152 #
153 # @skipauth: whether to skip authentication. Only applies
154 # to "vnc" and "spice" protocols
155 #
156 # @tls: whether to perform TLS. Only applies to the "spice"
157 # protocol
158 #
159 # Returns: nothing on success.
160 #
161 # Since: 0.14.0
162 #
163 # Example:
164 #
165 # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
166 # "fdname": "myclient" } }
167 # <- { "return": {} }
168 #
169 ##
170 { 'command': 'add_client',
171 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
172 '*tls': 'bool' } }
173
174 ##
175 # @NameInfo:
176 #
177 # Guest name information.
178 #
179 # @name: The name of the guest
180 #
181 # Since: 0.14.0
182 ##
183 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
184
185 ##
186 # @query-name:
187 #
188 # Return the name information of a guest.
189 #
190 # Returns: @NameInfo of the guest
191 #
192 # Since: 0.14.0
193 #
194 # Example:
195 #
196 # -> { "execute": "query-name" }
197 # <- { "return": { "name": "qemu-name" } }
198 #
199 ##
200 { 'command': 'query-name', 'returns': 'NameInfo' }
201
202 ##
203 # @KvmInfo:
204 #
205 # Information about support for KVM acceleration
206 #
207 # @enabled: true if KVM acceleration is active
208 #
209 # @present: true if KVM acceleration is built into this executable
210 #
211 # Since: 0.14.0
212 ##
213 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
214
215 ##
216 # @query-kvm:
217 #
218 # Returns information about KVM acceleration
219 #
220 # Returns: @KvmInfo
221 #
222 # Since: 0.14.0
223 #
224 # Example:
225 #
226 # -> { "execute": "query-kvm" }
227 # <- { "return": { "enabled": true, "present": true } }
228 #
229 ##
230 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
231
232 ##
233 # @RunState:
234 #
235 # An enumeration of VM run states.
236 #
237 # @debug: QEMU is running on a debugger
238 #
239 # @finish-migrate: guest is paused to finish the migration process
240 #
241 # @inmigrate: guest is paused waiting for an incoming migration. Note
242 # that this state does not tell whether the machine will start at the
243 # end of the migration. This depends on the command-line -S option and
244 # any invocation of 'stop' or 'cont' that has happened since QEMU was
245 # started.
246 #
247 # @internal-error: An internal error that prevents further guest execution
248 # has occurred
249 #
250 # @io-error: the last IOP has failed and the device is configured to pause
251 # on I/O errors
252 #
253 # @paused: guest has been paused via the 'stop' command
254 #
255 # @postmigrate: guest is paused following a successful 'migrate'
256 #
257 # @prelaunch: QEMU was started with -S and guest has not started
258 #
259 # @restore-vm: guest is paused to restore VM state
260 #
261 # @running: guest is actively running
262 #
263 # @save-vm: guest is paused to save the VM state
264 #
265 # @shutdown: guest is shut down (and -no-shutdown is in use)
266 #
267 # @suspended: guest is suspended (ACPI S3)
268 #
269 # @watchdog: the watchdog action is configured to pause and has been triggered
270 #
271 # @guest-panicked: guest has been panicked as a result of guest OS panic
272 #
273 # @colo: guest is paused to save/restore VM state under colo checkpoint,
274 # VM can not get into this state unless colo capability is enabled
275 # for migration. (since 2.8)
276 ##
277 { 'enum': 'RunState',
278 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
279 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
280 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
281 'guest-panicked', 'colo' ] }
282
283 ##
284 # @StatusInfo:
285 #
286 # Information about VCPU run state
287 #
288 # @running: true if all VCPUs are runnable, false if not runnable
289 #
290 # @singlestep: true if VCPUs are in single-step mode
291 #
292 # @status: the virtual machine @RunState
293 #
294 # Since: 0.14.0
295 #
296 # Notes: @singlestep is enabled through the GDB stub
297 ##
298 { 'struct': 'StatusInfo',
299 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
300
301 ##
302 # @query-status:
303 #
304 # Query the run status of all VCPUs
305 #
306 # Returns: @StatusInfo reflecting all VCPUs
307 #
308 # Since: 0.14.0
309 #
310 # Example:
311 #
312 # -> { "execute": "query-status" }
313 # <- { "return": { "running": true,
314 # "singlestep": false,
315 # "status": "running" } }
316 #
317 ##
318 { 'command': 'query-status', 'returns': 'StatusInfo' }
319
320 ##
321 # @UuidInfo:
322 #
323 # Guest UUID information (Universally Unique Identifier).
324 #
325 # @UUID: the UUID of the guest
326 #
327 # Since: 0.14.0
328 #
329 # Notes: If no UUID was specified for the guest, a null UUID is returned.
330 ##
331 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
332
333 ##
334 # @query-uuid:
335 #
336 # Query the guest UUID information.
337 #
338 # Returns: The @UuidInfo for the guest
339 #
340 # Since: 0.14.0
341 #
342 # Example:
343 #
344 # -> { "execute": "query-uuid" }
345 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
346 #
347 ##
348 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
349
350 ##
351 # @ChardevInfo:
352 #
353 # Information about a character device.
354 #
355 # @label: the label of the character device
356 #
357 # @filename: the filename of the character device
358 #
359 # @frontend-open: shows whether the frontend device attached to this backend
360 # (eg. with the chardev=... option) is in open or closed state
361 # (since 2.1)
362 #
363 # Notes: @filename is encoded using the QEMU command line character device
364 # encoding. See the QEMU man page for details.
365 #
366 # Since: 0.14.0
367 ##
368 { 'struct': 'ChardevInfo', 'data': {'label': 'str',
369 'filename': 'str',
370 'frontend-open': 'bool'} }
371
372 ##
373 # @query-chardev:
374 #
375 # Returns information about current character devices.
376 #
377 # Returns: a list of @ChardevInfo
378 #
379 # Since: 0.14.0
380 #
381 # Example:
382 #
383 # -> { "execute": "query-chardev" }
384 # <- {
385 # "return": [
386 # {
387 # "label": "charchannel0",
388 # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
389 # "frontend-open": false
390 # },
391 # {
392 # "label": "charmonitor",
393 # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
394 # "frontend-open": true
395 # },
396 # {
397 # "label": "charserial0",
398 # "filename": "pty:/dev/pts/2",
399 # "frontend-open": true
400 # }
401 # ]
402 # }
403 #
404 ##
405 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
406
407 ##
408 # @ChardevBackendInfo:
409 #
410 # Information about a character device backend
411 #
412 # @name: The backend name
413 #
414 # Since: 2.0
415 ##
416 { 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} }
417
418 ##
419 # @query-chardev-backends:
420 #
421 # Returns information about character device backends.
422 #
423 # Returns: a list of @ChardevBackendInfo
424 #
425 # Since: 2.0
426 #
427 # Example:
428 #
429 # -> { "execute": "query-chardev-backends" }
430 # <- {
431 # "return":[
432 # {
433 # "name":"udp"
434 # },
435 # {
436 # "name":"tcp"
437 # },
438 # {
439 # "name":"unix"
440 # },
441 # {
442 # "name":"spiceport"
443 # }
444 # ]
445 # }
446 #
447 ##
448 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
449
450 ##
451 # @DataFormat:
452 #
453 # An enumeration of data format.
454 #
455 # @utf8: Data is a UTF-8 string (RFC 3629)
456 #
457 # @base64: Data is Base64 encoded binary (RFC 3548)
458 #
459 # Since: 1.4
460 ##
461 { 'enum': 'DataFormat',
462 'data': [ 'utf8', 'base64' ] }
463
464 ##
465 # @ringbuf-write:
466 #
467 # Write to a ring buffer character device.
468 #
469 # @device: the ring buffer character device name
470 #
471 # @data: data to write
472 #
473 # @format: data encoding (default 'utf8').
474 # - base64: data must be base64 encoded text. Its binary
475 # decoding gets written.
476 # - utf8: data's UTF-8 encoding is written
477 # - data itself is always Unicode regardless of format, like
478 # any other string.
479 #
480 # Returns: Nothing on success
481 #
482 # Since: 1.4
483 #
484 # Example:
485 #
486 # -> { "execute": "ringbuf-write",
487 # "arguments": { "device": "foo",
488 # "data": "abcdefgh",
489 # "format": "utf8" } }
490 # <- { "return": {} }
491 #
492 ##
493 { 'command': 'ringbuf-write',
494 'data': {'device': 'str', 'data': 'str',
495 '*format': 'DataFormat'} }
496
497 ##
498 # @ringbuf-read:
499 #
500 # Read from a ring buffer character device.
501 #
502 # @device: the ring buffer character device name
503 #
504 # @size: how many bytes to read at most
505 #
506 # @format: data encoding (default 'utf8').
507 # - base64: the data read is returned in base64 encoding.
508 # - utf8: the data read is interpreted as UTF-8.
509 # Bug: can screw up when the buffer contains invalid UTF-8
510 # sequences, NUL characters, after the ring buffer lost
511 # data, and when reading stops because the size limit is
512 # reached.
513 # - The return value is always Unicode regardless of format,
514 # like any other string.
515 #
516 # Returns: data read from the device
517 #
518 # Since: 1.4
519 #
520 # Example:
521 #
522 # -> { "execute": "ringbuf-read",
523 # "arguments": { "device": "foo",
524 # "size": 1000,
525 # "format": "utf8" } }
526 # <- { "return": "abcdefgh" }
527 #
528 ##
529 { 'command': 'ringbuf-read',
530 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
531 'returns': 'str' }
532
533 ##
534 # @EventInfo:
535 #
536 # Information about a QMP event
537 #
538 # @name: The event name
539 #
540 # Since: 1.2.0
541 ##
542 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
543
544 ##
545 # @query-events:
546 #
547 # Return a list of supported QMP events by this server
548 #
549 # Returns: A list of @EventInfo for all supported events
550 #
551 # Since: 1.2.0
552 #
553 # Example:
554 #
555 # -> { "execute": "query-events" }
556 # <- {
557 # "return": [
558 # {
559 # "name":"SHUTDOWN"
560 # },
561 # {
562 # "name":"RESET"
563 # }
564 # ]
565 # }
566 #
567 # Note: This example has been shortened as the real response is too long.
568 #
569 ##
570 { 'command': 'query-events', 'returns': ['EventInfo'] }
571
572 ##
573 # @MigrationStats:
574 #
575 # Detailed migration status.
576 #
577 # @transferred: amount of bytes already transferred to the target VM
578 #
579 # @remaining: amount of bytes remaining to be transferred to the target VM
580 #
581 # @total: total amount of bytes involved in the migration process
582 #
583 # @duplicate: number of duplicate (zero) pages (since 1.2)
584 #
585 # @skipped: number of skipped zero pages (since 1.5)
586 #
587 # @normal: number of normal pages (since 1.2)
588 #
589 # @normal-bytes: number of normal bytes sent (since 1.2)
590 #
591 # @dirty-pages-rate: number of pages dirtied by second by the
592 # guest (since 1.3)
593 #
594 # @mbps: throughput in megabits/sec. (since 1.6)
595 #
596 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
597 #
598 # @postcopy-requests: The number of page requests received from the destination
599 # (since 2.7)
600 #
601 # @page-size: The number of bytes per page for the various page-based
602 # statistics (since 2.10)
603 #
604 # Since: 0.14.0
605 ##
606 { 'struct': 'MigrationStats',
607 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
608 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
609 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
610 'mbps' : 'number', 'dirty-sync-count' : 'int',
611 'postcopy-requests' : 'int', 'page-size' : 'int' } }
612
613 ##
614 # @XBZRLECacheStats:
615 #
616 # Detailed XBZRLE migration cache statistics
617 #
618 # @cache-size: XBZRLE cache size
619 #
620 # @bytes: amount of bytes already transferred to the target VM
621 #
622 # @pages: amount of pages transferred to the target VM
623 #
624 # @cache-miss: number of cache miss
625 #
626 # @cache-miss-rate: rate of cache miss (since 2.1)
627 #
628 # @overflow: number of overflows
629 #
630 # Since: 1.2
631 ##
632 { 'struct': 'XBZRLECacheStats',
633 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
634 'cache-miss': 'int', 'cache-miss-rate': 'number',
635 'overflow': 'int' } }
636
637 ##
638 # @MigrationStatus:
639 #
640 # An enumeration of migration status.
641 #
642 # @none: no migration has ever happened.
643 #
644 # @setup: migration process has been initiated.
645 #
646 # @cancelling: in the process of cancelling migration.
647 #
648 # @cancelled: cancelling migration is finished.
649 #
650 # @active: in the process of doing migration.
651 #
652 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
653 #
654 # @completed: migration is finished.
655 #
656 # @failed: some error occurred during migration process.
657 #
658 # @colo: VM is in the process of fault tolerance, VM can not get into this
659 # state unless colo capability is enabled for migration. (since 2.8)
660 #
661 # Since: 2.3
662 #
663 ##
664 { 'enum': 'MigrationStatus',
665 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
666 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
667
668 ##
669 # @MigrationInfo:
670 #
671 # Information about current migration process.
672 #
673 # @status: @MigrationStatus describing the current migration status.
674 # If this field is not returned, no migration process
675 # has been initiated
676 #
677 # @ram: @MigrationStats containing detailed migration
678 # status, only returned if status is 'active' or
679 # 'completed'(since 1.2)
680 #
681 # @disk: @MigrationStats containing detailed disk migration
682 # status, only returned if status is 'active' and it is a block
683 # migration
684 #
685 # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
686 # migration statistics, only returned if XBZRLE feature is on and
687 # status is 'active' or 'completed' (since 1.2)
688 #
689 # @total-time: total amount of milliseconds since migration started.
690 # If migration has ended, it returns the total migration
691 # time. (since 1.2)
692 #
693 # @downtime: only present when migration finishes correctly
694 # total downtime in milliseconds for the guest.
695 # (since 1.3)
696 #
697 # @expected-downtime: only present while migration is active
698 # expected downtime in milliseconds for the guest in last walk
699 # of the dirty bitmap. (since 1.3)
700 #
701 # @setup-time: amount of setup time in milliseconds _before_ the
702 # iterations begin but _after_ the QMP command is issued. This is designed
703 # to provide an accounting of any activities (such as RDMA pinning) which
704 # may be expensive, but do not actually occur during the iterative
705 # migration rounds themselves. (since 1.6)
706 #
707 # @cpu-throttle-percentage: percentage of time guest cpus are being
708 # throttled during auto-converge. This is only present when auto-converge
709 # has started throttling guest cpus. (Since 2.7)
710 #
711 # @error-desc: the human readable error description string, when
712 # @status is 'failed'. Clients should not attempt to parse the
713 # error strings. (Since 2.7)
714 #
715 # Since: 0.14.0
716 ##
717 { 'struct': 'MigrationInfo',
718 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
719 '*disk': 'MigrationStats',
720 '*xbzrle-cache': 'XBZRLECacheStats',
721 '*total-time': 'int',
722 '*expected-downtime': 'int',
723 '*downtime': 'int',
724 '*setup-time': 'int',
725 '*cpu-throttle-percentage': 'int',
726 '*error-desc': 'str'} }
727
728 ##
729 # @query-migrate:
730 #
731 # Returns information about current migration process. If migration
732 # is active there will be another json-object with RAM migration
733 # status and if block migration is active another one with block
734 # migration status.
735 #
736 # Returns: @MigrationInfo
737 #
738 # Since: 0.14.0
739 #
740 # Example:
741 #
742 # 1. Before the first migration
743 #
744 # -> { "execute": "query-migrate" }
745 # <- { "return": {} }
746 #
747 # 2. Migration is done and has succeeded
748 #
749 # -> { "execute": "query-migrate" }
750 # <- { "return": {
751 # "status": "completed",
752 # "ram":{
753 # "transferred":123,
754 # "remaining":123,
755 # "total":246,
756 # "total-time":12345,
757 # "setup-time":12345,
758 # "downtime":12345,
759 # "duplicate":123,
760 # "normal":123,
761 # "normal-bytes":123456,
762 # "dirty-sync-count":15
763 # }
764 # }
765 # }
766 #
767 # 3. Migration is done and has failed
768 #
769 # -> { "execute": "query-migrate" }
770 # <- { "return": { "status": "failed" } }
771 #
772 # 4. Migration is being performed and is not a block migration:
773 #
774 # -> { "execute": "query-migrate" }
775 # <- {
776 # "return":{
777 # "status":"active",
778 # "ram":{
779 # "transferred":123,
780 # "remaining":123,
781 # "total":246,
782 # "total-time":12345,
783 # "setup-time":12345,
784 # "expected-downtime":12345,
785 # "duplicate":123,
786 # "normal":123,
787 # "normal-bytes":123456,
788 # "dirty-sync-count":15
789 # }
790 # }
791 # }
792 #
793 # 5. Migration is being performed and is a block migration:
794 #
795 # -> { "execute": "query-migrate" }
796 # <- {
797 # "return":{
798 # "status":"active",
799 # "ram":{
800 # "total":1057024,
801 # "remaining":1053304,
802 # "transferred":3720,
803 # "total-time":12345,
804 # "setup-time":12345,
805 # "expected-downtime":12345,
806 # "duplicate":123,
807 # "normal":123,
808 # "normal-bytes":123456,
809 # "dirty-sync-count":15
810 # },
811 # "disk":{
812 # "total":20971520,
813 # "remaining":20880384,
814 # "transferred":91136
815 # }
816 # }
817 # }
818 #
819 # 6. Migration is being performed and XBZRLE is active:
820 #
821 # -> { "execute": "query-migrate" }
822 # <- {
823 # "return":{
824 # "status":"active",
825 # "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
826 # "ram":{
827 # "total":1057024,
828 # "remaining":1053304,
829 # "transferred":3720,
830 # "total-time":12345,
831 # "setup-time":12345,
832 # "expected-downtime":12345,
833 # "duplicate":10,
834 # "normal":3333,
835 # "normal-bytes":3412992,
836 # "dirty-sync-count":15
837 # },
838 # "xbzrle-cache":{
839 # "cache-size":67108864,
840 # "bytes":20971520,
841 # "pages":2444343,
842 # "cache-miss":2244,
843 # "cache-miss-rate":0.123,
844 # "overflow":34434
845 # }
846 # }
847 # }
848 #
849 ##
850 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
851
852 ##
853 # @MigrationCapability:
854 #
855 # Migration capabilities enumeration
856 #
857 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
858 # This feature allows us to minimize migration traffic for certain work
859 # loads, by sending compressed difference of the pages
860 #
861 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
862 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
863 # Disabled by default. (since 2.0)
864 #
865 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
866 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
867 # source and target VM to support this feature. To enable it is sufficient
868 # to enable the capability on the source VM. The feature is disabled by
869 # default. (since 1.6)
870 #
871 # @compress: Use multiple compression threads to accelerate live migration.
872 # This feature can help to reduce the migration traffic, by sending
873 # compressed pages. Please note that if compress and xbzrle are both
874 # on, compress only takes effect in the ram bulk stage, after that,
875 # it will be disabled and only xbzrle takes effect, this can help to
876 # minimize migration traffic. The feature is disabled by default.
877 # (since 2.4 )
878 #
879 # @events: generate events for each migration state change
880 # (since 2.4 )
881 #
882 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
883 # to speed up convergence of RAM migration. (since 1.6)
884 #
885 # @postcopy-ram: Start executing on the migration target before all of RAM has
886 # been migrated, pulling the remaining pages along as needed. NOTE: If
887 # the migration fails during postcopy the VM will fail. (since 2.6)
888 #
889 # @x-colo: If enabled, migration will never end, and the state of the VM on the
890 # primary side will be migrated continuously to the VM on secondary
891 # side, this process is called COarse-Grain LOck Stepping (COLO) for
892 # Non-stop Service. (since 2.8)
893 #
894 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
895 # during postcopy-ram migration. (since 2.9)
896 #
897 # @block: If enabled, QEMU will also migrate the contents of all block
898 # devices. Default is disabled. A possible alternative uses
899 # mirror jobs to a builtin NBD server on the destination, which
900 # offers more flexibility.
901 # (Since 2.10)
902 #
903 # @return-path: If enabled, migration will use the return path even
904 # for precopy. (since 2.10)
905 #
906 # Since: 1.2
907 ##
908 { 'enum': 'MigrationCapability',
909 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
910 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
911 'block', 'return-path' ] }
912
913 ##
914 # @MigrationCapabilityStatus:
915 #
916 # Migration capability information
917 #
918 # @capability: capability enum
919 #
920 # @state: capability state bool
921 #
922 # Since: 1.2
923 ##
924 { 'struct': 'MigrationCapabilityStatus',
925 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
926
927 ##
928 # @migrate-set-capabilities:
929 #
930 # Enable/Disable the following migration capabilities (like xbzrle)
931 #
932 # @capabilities: json array of capability modifications to make
933 #
934 # Since: 1.2
935 #
936 # Example:
937 #
938 # -> { "execute": "migrate-set-capabilities" , "arguments":
939 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
940 #
941 ##
942 { 'command': 'migrate-set-capabilities',
943 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
944
945 ##
946 # @query-migrate-capabilities:
947 #
948 # Returns information about the current migration capabilities status
949 #
950 # Returns: @MigrationCapabilitiesStatus
951 #
952 # Since: 1.2
953 #
954 # Example:
955 #
956 # -> { "execute": "query-migrate-capabilities" }
957 # <- { "return": [
958 # {"state": false, "capability": "xbzrle"},
959 # {"state": false, "capability": "rdma-pin-all"},
960 # {"state": false, "capability": "auto-converge"},
961 # {"state": false, "capability": "zero-blocks"},
962 # {"state": false, "capability": "compress"},
963 # {"state": true, "capability": "events"},
964 # {"state": false, "capability": "postcopy-ram"},
965 # {"state": false, "capability": "x-colo"}
966 # ]}
967 #
968 ##
969 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
970
971 ##
972 # @MigrationParameter:
973 #
974 # Migration parameters enumeration
975 #
976 # @compress-level: Set the compression level to be used in live migration,
977 # the compression level is an integer between 0 and 9, where 0 means
978 # no compression, 1 means the best compression speed, and 9 means best
979 # compression ratio which will consume more CPU.
980 #
981 # @compress-threads: Set compression thread count to be used in live migration,
982 # the compression thread count is an integer between 1 and 255.
983 #
984 # @decompress-threads: Set decompression thread count to be used in live
985 # migration, the decompression thread count is an integer between 1
986 # and 255. Usually, decompression is at least 4 times as fast as
987 # compression, so set the decompress-threads to the number about 1/4
988 # of compress-threads is adequate.
989 #
990 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
991 # when migration auto-converge is activated. The
992 # default value is 20. (Since 2.7)
993 #
994 # @cpu-throttle-increment: throttle percentage increase each time
995 # auto-converge detects that migration is not making
996 # progress. The default value is 10. (Since 2.7)
997 #
998 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
999 # establishing a TLS connection over the migration data channel.
1000 # On the outgoing side of the migration, the credentials must
1001 # be for a 'client' endpoint, while for the incoming side the
1002 # credentials must be for a 'server' endpoint. Setting this
1003 # will enable TLS for all migrations. The default is unset,
1004 # resulting in unsecured migration at the QEMU level. (Since 2.7)
1005 #
1006 # @tls-hostname: hostname of the target host for the migration. This is
1007 # required when using x509 based TLS credentials and the
1008 # migration URI does not already include a hostname. For
1009 # example if using fd: or exec: based migration, the
1010 # hostname must be provided so that the server's x509
1011 # certificate identity can be validated. (Since 2.7)
1012 #
1013 # @max-bandwidth: to set maximum speed for migration. maximum speed in
1014 # bytes per second. (Since 2.8)
1015 #
1016 # @downtime-limit: set maximum tolerated downtime for migration. maximum
1017 # downtime in milliseconds (Since 2.8)
1018 #
1019 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
1020 # periodic mode. (Since 2.8)
1021 #
1022 # @block-incremental: Affects how much storage is migrated when the
1023 # block migration capability is enabled. When false, the entire
1024 # storage backing chain is migrated into a flattened image at
1025 # the destination; when true, only the active qcow2 layer is
1026 # migrated and the destination must already have access to the
1027 # same backing chain as was used on the source. (since 2.10)
1028 #
1029 # Since: 2.4
1030 ##
1031 { 'enum': 'MigrationParameter',
1032 'data': ['compress-level', 'compress-threads', 'decompress-threads',
1033 'cpu-throttle-initial', 'cpu-throttle-increment',
1034 'tls-creds', 'tls-hostname', 'max-bandwidth',
1035 'downtime-limit', 'x-checkpoint-delay', 'block-incremental' ] }
1036
1037 ##
1038 # @migrate-set-parameters:
1039 #
1040 # Set various migration parameters.
1041 #
1042 # Since: 2.4
1043 #
1044 # Example:
1045 #
1046 # -> { "execute": "migrate-set-parameters" ,
1047 # "arguments": { "compress-level": 1 } }
1048 #
1049 ##
1050 { 'command': 'migrate-set-parameters', 'boxed': true,
1051 'data': 'MigrationParameters' }
1052
1053 ##
1054 # @MigrationParameters:
1055 #
1056 # Optional members can be omitted on input ('migrate-set-parameters')
1057 # but most members will always be present on output
1058 # ('query-migrate-parameters'), with the exception of tls-creds and
1059 # tls-hostname.
1060 #
1061 # @compress-level: compression level
1062 #
1063 # @compress-threads: compression thread count
1064 #
1065 # @decompress-threads: decompression thread count
1066 #
1067 # @cpu-throttle-initial: Initial percentage of time guest cpus are
1068 # throttledwhen migration auto-converge is activated.
1069 # The default value is 20. (Since 2.7)
1070 #
1071 # @cpu-throttle-increment: throttle percentage increase each time
1072 # auto-converge detects that migration is not making
1073 # progress. The default value is 10. (Since 2.7)
1074 #
1075 # @tls-creds: ID of the 'tls-creds' object that provides credentials
1076 # for establishing a TLS connection over the migration data
1077 # channel. On the outgoing side of the migration, the credentials
1078 # must be for a 'client' endpoint, while for the incoming side the
1079 # credentials must be for a 'server' endpoint. Setting this
1080 # will enable TLS for all migrations. The default is unset,
1081 # resulting in unsecured migration at the QEMU level. (Since 2.7)
1082 # An empty string means that QEMU will use plain text mode for
1083 # migration, rather than TLS (Since 2.9)
1084 #
1085 # @tls-hostname: hostname of the target host for the migration. This
1086 # is required when using x509 based TLS credentials and the
1087 # migration URI does not already include a hostname. For
1088 # example if using fd: or exec: based migration, the
1089 # hostname must be provided so that the server's x509
1090 # certificate identity can be validated. (Since 2.7)
1091 # An empty string means that QEMU will use the hostname
1092 # associated with the migration URI, if any. (Since 2.9)
1093 #
1094 # @max-bandwidth: to set maximum speed for migration. maximum speed in
1095 # bytes per second. (Since 2.8)
1096 #
1097 # @downtime-limit: set maximum tolerated downtime for migration. maximum
1098 # downtime in milliseconds (Since 2.8)
1099 #
1100 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
1101 #
1102 # @block-incremental: Affects how much storage is migrated when the
1103 # block migration capability is enabled. When false, the entire
1104 # storage backing chain is migrated into a flattened image at
1105 # the destination; when true, only the active qcow2 layer is
1106 # migrated and the destination must already have access to the
1107 # same backing chain as was used on the source. (since 2.10)
1108 #
1109 # Since: 2.4
1110 ##
1111 { 'struct': 'MigrationParameters',
1112 'data': { '*compress-level': 'int',
1113 '*compress-threads': 'int',
1114 '*decompress-threads': 'int',
1115 '*cpu-throttle-initial': 'int',
1116 '*cpu-throttle-increment': 'int',
1117 '*tls-creds': 'str',
1118 '*tls-hostname': 'str',
1119 '*max-bandwidth': 'int',
1120 '*downtime-limit': 'int',
1121 '*x-checkpoint-delay': 'int',
1122 '*block-incremental': 'bool' } }
1123
1124 ##
1125 # @query-migrate-parameters:
1126 #
1127 # Returns information about the current migration parameters
1128 #
1129 # Returns: @MigrationParameters
1130 #
1131 # Since: 2.4
1132 #
1133 # Example:
1134 #
1135 # -> { "execute": "query-migrate-parameters" }
1136 # <- { "return": {
1137 # "decompress-threads": 2,
1138 # "cpu-throttle-increment": 10,
1139 # "compress-threads": 8,
1140 # "compress-level": 1,
1141 # "cpu-throttle-initial": 20,
1142 # "max-bandwidth": 33554432,
1143 # "downtime-limit": 300
1144 # }
1145 # }
1146 #
1147 ##
1148 { 'command': 'query-migrate-parameters',
1149 'returns': 'MigrationParameters' }
1150
1151 ##
1152 # @client_migrate_info:
1153 #
1154 # Set migration information for remote display. This makes the server
1155 # ask the client to automatically reconnect using the new parameters
1156 # once migration finished successfully. Only implemented for SPICE.
1157 #
1158 # @protocol: must be "spice"
1159 # @hostname: migration target hostname
1160 # @port: spice tcp port for plaintext channels
1161 # @tls-port: spice tcp port for tls-secured channels
1162 # @cert-subject: server certificate subject
1163 #
1164 # Since: 0.14.0
1165 #
1166 # Example:
1167 #
1168 # -> { "execute": "client_migrate_info",
1169 # "arguments": { "protocol": "spice",
1170 # "hostname": "virt42.lab.kraxel.org",
1171 # "port": 1234 } }
1172 # <- { "return": {} }
1173 #
1174 ##
1175 { 'command': 'client_migrate_info',
1176 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
1177 '*tls-port': 'int', '*cert-subject': 'str' } }
1178
1179 ##
1180 # @migrate-start-postcopy:
1181 #
1182 # Followup to a migration command to switch the migration to postcopy mode.
1183 # The postcopy-ram capability must be set before the original migration
1184 # command.
1185 #
1186 # Since: 2.5
1187 #
1188 # Example:
1189 #
1190 # -> { "execute": "migrate-start-postcopy" }
1191 # <- { "return": {} }
1192 #
1193 ##
1194 { 'command': 'migrate-start-postcopy' }
1195
1196 ##
1197 # @COLOMessage:
1198 #
1199 # The message transmission between Primary side and Secondary side.
1200 #
1201 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
1202 #
1203 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
1204 #
1205 # @checkpoint-reply: SVM gets PVM's checkpoint request
1206 #
1207 # @vmstate-send: VM's state will be sent by PVM.
1208 #
1209 # @vmstate-size: The total size of VMstate.
1210 #
1211 # @vmstate-received: VM's state has been received by SVM.
1212 #
1213 # @vmstate-loaded: VM's state has been loaded by SVM.
1214 #
1215 # Since: 2.8
1216 ##
1217 { 'enum': 'COLOMessage',
1218 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
1219 'vmstate-send', 'vmstate-size', 'vmstate-received',
1220 'vmstate-loaded' ] }
1221
1222 ##
1223 # @COLOMode:
1224 #
1225 # The colo mode
1226 #
1227 # @unknown: unknown mode
1228 #
1229 # @primary: master side
1230 #
1231 # @secondary: slave side
1232 #
1233 # Since: 2.8
1234 ##
1235 { 'enum': 'COLOMode',
1236 'data': [ 'unknown', 'primary', 'secondary'] }
1237
1238 ##
1239 # @FailoverStatus:
1240 #
1241 # An enumeration of COLO failover status
1242 #
1243 # @none: no failover has ever happened
1244 #
1245 # @require: got failover requirement but not handled
1246 #
1247 # @active: in the process of doing failover
1248 #
1249 # @completed: finish the process of failover
1250 #
1251 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
1252 #
1253 # Since: 2.8
1254 ##
1255 { 'enum': 'FailoverStatus',
1256 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
1257
1258 ##
1259 # @x-colo-lost-heartbeat:
1260 #
1261 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
1262 # If this command is sent to the PVM, the Primary side will exit COLO mode.
1263 # If sent to the Secondary, the Secondary side will run failover work,
1264 # then takes over server operation to become the service VM.
1265 #
1266 # Since: 2.8
1267 #
1268 # Example:
1269 #
1270 # -> { "execute": "x-colo-lost-heartbeat" }
1271 # <- { "return": {} }
1272 #
1273 ##
1274 { 'command': 'x-colo-lost-heartbeat' }
1275
1276 ##
1277 # @MouseInfo:
1278 #
1279 # Information about a mouse device.
1280 #
1281 # @name: the name of the mouse device
1282 #
1283 # @index: the index of the mouse device
1284 #
1285 # @current: true if this device is currently receiving mouse events
1286 #
1287 # @absolute: true if this device supports absolute coordinates as input
1288 #
1289 # Since: 0.14.0
1290 ##
1291 { 'struct': 'MouseInfo',
1292 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
1293 'absolute': 'bool'} }
1294
1295 ##
1296 # @query-mice:
1297 #
1298 # Returns information about each active mouse device
1299 #
1300 # Returns: a list of @MouseInfo for each device
1301 #
1302 # Since: 0.14.0
1303 #
1304 # Example:
1305 #
1306 # -> { "execute": "query-mice" }
1307 # <- { "return": [
1308 # {
1309 # "name":"QEMU Microsoft Mouse",
1310 # "index":0,
1311 # "current":false,
1312 # "absolute":false
1313 # },
1314 # {
1315 # "name":"QEMU PS/2 Mouse",
1316 # "index":1,
1317 # "current":true,
1318 # "absolute":true
1319 # }
1320 # ]
1321 # }
1322 #
1323 ##
1324 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
1325
1326 ##
1327 # @CpuInfoArch:
1328 #
1329 # An enumeration of cpu types that enable additional information during
1330 # @query-cpus.
1331 #
1332 # Since: 2.6
1333 ##
1334 { 'enum': 'CpuInfoArch',
1335 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
1336
1337 ##
1338 # @CpuInfo:
1339 #
1340 # Information about a virtual CPU
1341 #
1342 # @CPU: the index of the virtual CPU
1343 #
1344 # @current: this only exists for backwards compatibility and should be ignored
1345 #
1346 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
1347 # to a processor specific low power mode.
1348 #
1349 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
1350 #
1351 # @thread_id: ID of the underlying host thread
1352 #
1353 # @props: properties describing to which node/socket/core/thread
1354 # virtual CPU belongs to, provided if supported by board (since 2.10)
1355 #
1356 # @arch: architecture of the cpu, which determines which additional fields
1357 # will be listed (since 2.6)
1358 #
1359 # Since: 0.14.0
1360 #
1361 # Notes: @halted is a transient state that changes frequently. By the time the
1362 # data is sent to the client, the guest may no longer be halted.
1363 ##
1364 { 'union': 'CpuInfo',
1365 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
1366 'qom_path': 'str', 'thread_id': 'int',
1367 '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' },
1368 'discriminator': 'arch',
1369 'data': { 'x86': 'CpuInfoX86',
1370 'sparc': 'CpuInfoSPARC',
1371 'ppc': 'CpuInfoPPC',
1372 'mips': 'CpuInfoMIPS',
1373 'tricore': 'CpuInfoTricore',
1374 'other': 'CpuInfoOther' } }
1375
1376 ##
1377 # @CpuInfoX86:
1378 #
1379 # Additional information about a virtual i386 or x86_64 CPU
1380 #
1381 # @pc: the 64-bit instruction pointer
1382 #
1383 # Since: 2.6
1384 ##
1385 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
1386
1387 ##
1388 # @CpuInfoSPARC:
1389 #
1390 # Additional information about a virtual SPARC CPU
1391 #
1392 # @pc: the PC component of the instruction pointer
1393 #
1394 # @npc: the NPC component of the instruction pointer
1395 #
1396 # Since: 2.6
1397 ##
1398 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
1399
1400 ##
1401 # @CpuInfoPPC:
1402 #
1403 # Additional information about a virtual PPC CPU
1404 #
1405 # @nip: the instruction pointer
1406 #
1407 # Since: 2.6
1408 ##
1409 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
1410
1411 ##
1412 # @CpuInfoMIPS:
1413 #
1414 # Additional information about a virtual MIPS CPU
1415 #
1416 # @PC: the instruction pointer
1417 #
1418 # Since: 2.6
1419 ##
1420 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
1421
1422 ##
1423 # @CpuInfoTricore:
1424 #
1425 # Additional information about a virtual Tricore CPU
1426 #
1427 # @PC: the instruction pointer
1428 #
1429 # Since: 2.6
1430 ##
1431 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
1432
1433 ##
1434 # @CpuInfoOther:
1435 #
1436 # No additional information is available about the virtual CPU
1437 #
1438 # Since: 2.6
1439 #
1440 ##
1441 { 'struct': 'CpuInfoOther', 'data': { } }
1442
1443 ##
1444 # @query-cpus:
1445 #
1446 # Returns a list of information about each virtual CPU.
1447 #
1448 # Returns: a list of @CpuInfo for each virtual CPU
1449 #
1450 # Since: 0.14.0
1451 #
1452 # Example:
1453 #
1454 # -> { "execute": "query-cpus" }
1455 # <- { "return": [
1456 # {
1457 # "CPU":0,
1458 # "current":true,
1459 # "halted":false,
1460 # "qom_path":"/machine/unattached/device[0]",
1461 # "arch":"x86",
1462 # "pc":3227107138,
1463 # "thread_id":3134
1464 # },
1465 # {
1466 # "CPU":1,
1467 # "current":false,
1468 # "halted":true,
1469 # "qom_path":"/machine/unattached/device[2]",
1470 # "arch":"x86",
1471 # "pc":7108165,
1472 # "thread_id":3135
1473 # }
1474 # ]
1475 # }
1476 #
1477 ##
1478 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
1479
1480 ##
1481 # @IOThreadInfo:
1482 #
1483 # Information about an iothread
1484 #
1485 # @id: the identifier of the iothread
1486 #
1487 # @thread-id: ID of the underlying host thread
1488 #
1489 # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
1490 # (since 2.9)
1491 #
1492 # @poll-grow: how many ns will be added to polling time, 0 means that it's not
1493 # configured (since 2.9)
1494 #
1495 # @poll-shrink: how many ns will be removed from polling time, 0 means that
1496 # it's not configured (since 2.9)
1497 #
1498 # Since: 2.0
1499 ##
1500 { 'struct': 'IOThreadInfo',
1501 'data': {'id': 'str',
1502 'thread-id': 'int',
1503 'poll-max-ns': 'int',
1504 'poll-grow': 'int',
1505 'poll-shrink': 'int' } }
1506
1507 ##
1508 # @query-iothreads:
1509 #
1510 # Returns a list of information about each iothread.
1511 #
1512 # Note: this list excludes the QEMU main loop thread, which is not declared
1513 # using the -object iothread command-line option. It is always the main thread
1514 # of the process.
1515 #
1516 # Returns: a list of @IOThreadInfo for each iothread
1517 #
1518 # Since: 2.0
1519 #
1520 # Example:
1521 #
1522 # -> { "execute": "query-iothreads" }
1523 # <- { "return": [
1524 # {
1525 # "id":"iothread0",
1526 # "thread-id":3134
1527 # },
1528 # {
1529 # "id":"iothread1",
1530 # "thread-id":3135
1531 # }
1532 # ]
1533 # }
1534 #
1535 ##
1536 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
1537
1538 ##
1539 # @NetworkAddressFamily:
1540 #
1541 # The network address family
1542 #
1543 # @ipv4: IPV4 family
1544 #
1545 # @ipv6: IPV6 family
1546 #
1547 # @unix: unix socket
1548 #
1549 # @vsock: vsock family (since 2.8)
1550 #
1551 # @unknown: otherwise
1552 #
1553 # Since: 2.1
1554 ##
1555 { 'enum': 'NetworkAddressFamily',
1556 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
1557
1558 ##
1559 # @VncBasicInfo:
1560 #
1561 # The basic information for vnc network connection
1562 #
1563 # @host: IP address
1564 #
1565 # @service: The service name of the vnc port. This may depend on the host
1566 # system's service database so symbolic names should not be relied
1567 # on.
1568 #
1569 # @family: address family
1570 #
1571 # @websocket: true in case the socket is a websocket (since 2.3).
1572 #
1573 # Since: 2.1
1574 ##
1575 { 'struct': 'VncBasicInfo',
1576 'data': { 'host': 'str',
1577 'service': 'str',
1578 'family': 'NetworkAddressFamily',
1579 'websocket': 'bool' } }
1580
1581 ##
1582 # @VncServerInfo:
1583 #
1584 # The network connection information for server
1585 #
1586 # @auth: authentication method used for
1587 # the plain (non-websocket) VNC server
1588 #
1589 # Since: 2.1
1590 ##
1591 { 'struct': 'VncServerInfo',
1592 'base': 'VncBasicInfo',
1593 'data': { '*auth': 'str' } }
1594
1595 ##
1596 # @VncClientInfo:
1597 #
1598 # Information about a connected VNC client.
1599 #
1600 # @x509_dname: If x509 authentication is in use, the Distinguished
1601 # Name of the client.
1602 #
1603 # @sasl_username: If SASL authentication is in use, the SASL username
1604 # used for authentication.
1605 #
1606 # Since: 0.14.0
1607 ##
1608 { 'struct': 'VncClientInfo',
1609 'base': 'VncBasicInfo',
1610 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1611
1612 ##
1613 # @VncInfo:
1614 #
1615 # Information about the VNC session.
1616 #
1617 # @enabled: true if the VNC server is enabled, false otherwise
1618 #
1619 # @host: The hostname the VNC server is bound to. This depends on
1620 # the name resolution on the host and may be an IP address.
1621 #
1622 # @family: 'ipv6' if the host is listening for IPv6 connections
1623 # 'ipv4' if the host is listening for IPv4 connections
1624 # 'unix' if the host is listening on a unix domain socket
1625 # 'unknown' otherwise
1626 #
1627 # @service: The service name of the server's port. This may depends
1628 # on the host system's service database so symbolic names should not
1629 # be relied on.
1630 #
1631 # @auth: the current authentication type used by the server
1632 # 'none' if no authentication is being used
1633 # 'vnc' if VNC authentication is being used
1634 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
1635 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1636 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1637 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1638 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1639 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1640 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1641 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1642 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1643 #
1644 # @clients: a list of @VncClientInfo of all currently connected clients
1645 #
1646 # Since: 0.14.0
1647 ##
1648 { 'struct': 'VncInfo',
1649 'data': {'enabled': 'bool', '*host': 'str',
1650 '*family': 'NetworkAddressFamily',
1651 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1652
1653 ##
1654 # @VncPrimaryAuth:
1655 #
1656 # vnc primary authentication method.
1657 #
1658 # Since: 2.3
1659 ##
1660 { 'enum': 'VncPrimaryAuth',
1661 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1662 'tls', 'vencrypt', 'sasl' ] }
1663
1664 ##
1665 # @VncVencryptSubAuth:
1666 #
1667 # vnc sub authentication method with vencrypt.
1668 #
1669 # Since: 2.3
1670 ##
1671 { 'enum': 'VncVencryptSubAuth',
1672 'data': [ 'plain',
1673 'tls-none', 'x509-none',
1674 'tls-vnc', 'x509-vnc',
1675 'tls-plain', 'x509-plain',
1676 'tls-sasl', 'x509-sasl' ] }
1677
1678
1679 ##
1680 # @VncServerInfo2:
1681 #
1682 # The network connection information for server
1683 #
1684 # @auth: The current authentication type used by the servers
1685 #
1686 # @vencrypt: The vencrypt sub authentication type used by the
1687 # servers, only specified in case auth == vencrypt.
1688 #
1689 # Since: 2.9
1690 ##
1691 { 'struct': 'VncServerInfo2',
1692 'base': 'VncBasicInfo',
1693 'data': { 'auth' : 'VncPrimaryAuth',
1694 '*vencrypt' : 'VncVencryptSubAuth' } }
1695
1696
1697 ##
1698 # @VncInfo2:
1699 #
1700 # Information about a vnc server
1701 #
1702 # @id: vnc server name.
1703 #
1704 # @server: A list of @VncBasincInfo describing all listening sockets.
1705 # The list can be empty (in case the vnc server is disabled).
1706 # It also may have multiple entries: normal + websocket,
1707 # possibly also ipv4 + ipv6 in the future.
1708 #
1709 # @clients: A list of @VncClientInfo of all currently connected clients.
1710 # The list can be empty, for obvious reasons.
1711 #
1712 # @auth: The current authentication type used by the non-websockets servers
1713 #
1714 # @vencrypt: The vencrypt authentication type used by the servers,
1715 # only specified in case auth == vencrypt.
1716 #
1717 # @display: The display device the vnc server is linked to.
1718 #
1719 # Since: 2.3
1720 ##
1721 { 'struct': 'VncInfo2',
1722 'data': { 'id' : 'str',
1723 'server' : ['VncServerInfo2'],
1724 'clients' : ['VncClientInfo'],
1725 'auth' : 'VncPrimaryAuth',
1726 '*vencrypt' : 'VncVencryptSubAuth',
1727 '*display' : 'str' } }
1728
1729 ##
1730 # @query-vnc:
1731 #
1732 # Returns information about the current VNC server
1733 #
1734 # Returns: @VncInfo
1735 #
1736 # Since: 0.14.0
1737 #
1738 # Example:
1739 #
1740 # -> { "execute": "query-vnc" }
1741 # <- { "return": {
1742 # "enabled":true,
1743 # "host":"0.0.0.0",
1744 # "service":"50402",
1745 # "auth":"vnc",
1746 # "family":"ipv4",
1747 # "clients":[
1748 # {
1749 # "host":"127.0.0.1",
1750 # "service":"50401",
1751 # "family":"ipv4"
1752 # }
1753 # ]
1754 # }
1755 # }
1756 #
1757 ##
1758 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1759
1760 ##
1761 # @query-vnc-servers:
1762 #
1763 # Returns a list of vnc servers. The list can be empty.
1764 #
1765 # Returns: a list of @VncInfo2
1766 #
1767 # Since: 2.3
1768 ##
1769 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1770
1771 ##
1772 # @SpiceBasicInfo:
1773 #
1774 # The basic information for SPICE network connection
1775 #
1776 # @host: IP address
1777 #
1778 # @port: port number
1779 #
1780 # @family: address family
1781 #
1782 # Since: 2.1
1783 ##
1784 { 'struct': 'SpiceBasicInfo',
1785 'data': { 'host': 'str',
1786 'port': 'str',
1787 'family': 'NetworkAddressFamily' } }
1788
1789 ##
1790 # @SpiceServerInfo:
1791 #
1792 # Information about a SPICE server
1793 #
1794 # @auth: authentication method
1795 #
1796 # Since: 2.1
1797 ##
1798 { 'struct': 'SpiceServerInfo',
1799 'base': 'SpiceBasicInfo',
1800 'data': { '*auth': 'str' } }
1801
1802 ##
1803 # @SpiceChannel:
1804 #
1805 # Information about a SPICE client channel.
1806 #
1807 # @connection-id: SPICE connection id number. All channels with the same id
1808 # belong to the same SPICE session.
1809 #
1810 # @channel-type: SPICE channel type number. "1" is the main control
1811 # channel, filter for this one if you want to track spice
1812 # sessions only
1813 #
1814 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1815 # multiple channels of the same type exist, such as multiple
1816 # display channels in a multihead setup
1817 #
1818 # @tls: true if the channel is encrypted, false otherwise.
1819 #
1820 # Since: 0.14.0
1821 ##
1822 { 'struct': 'SpiceChannel',
1823 'base': 'SpiceBasicInfo',
1824 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1825 'tls': 'bool'} }
1826
1827 ##
1828 # @SpiceQueryMouseMode:
1829 #
1830 # An enumeration of Spice mouse states.
1831 #
1832 # @client: Mouse cursor position is determined by the client.
1833 #
1834 # @server: Mouse cursor position is determined by the server.
1835 #
1836 # @unknown: No information is available about mouse mode used by
1837 # the spice server.
1838 #
1839 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1840 #
1841 # Since: 1.1
1842 ##
1843 { 'enum': 'SpiceQueryMouseMode',
1844 'data': [ 'client', 'server', 'unknown' ] }
1845
1846 ##
1847 # @SpiceInfo:
1848 #
1849 # Information about the SPICE session.
1850 #
1851 # @enabled: true if the SPICE server is enabled, false otherwise
1852 #
1853 # @migrated: true if the last guest migration completed and spice
1854 # migration had completed as well. false otherwise. (since 1.4)
1855 #
1856 # @host: The hostname the SPICE server is bound to. This depends on
1857 # the name resolution on the host and may be an IP address.
1858 #
1859 # @port: The SPICE server's port number.
1860 #
1861 # @compiled-version: SPICE server version.
1862 #
1863 # @tls-port: The SPICE server's TLS port number.
1864 #
1865 # @auth: the current authentication type used by the server
1866 # 'none' if no authentication is being used
1867 # 'spice' uses SASL or direct TLS authentication, depending on command
1868 # line options
1869 #
1870 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1871 # be determined by the client or the server, or unknown if spice
1872 # server doesn't provide this information. (since: 1.1)
1873 #
1874 # @channels: a list of @SpiceChannel for each active spice channel
1875 #
1876 # Since: 0.14.0
1877 ##
1878 { 'struct': 'SpiceInfo',
1879 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1880 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1881 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1882
1883 ##
1884 # @query-spice:
1885 #
1886 # Returns information about the current SPICE server
1887 #
1888 # Returns: @SpiceInfo
1889 #
1890 # Since: 0.14.0
1891 #
1892 # Example:
1893 #
1894 # -> { "execute": "query-spice" }
1895 # <- { "return": {
1896 # "enabled": true,
1897 # "auth": "spice",
1898 # "port": 5920,
1899 # "tls-port": 5921,
1900 # "host": "0.0.0.0",
1901 # "channels": [
1902 # {
1903 # "port": "54924",
1904 # "family": "ipv4",
1905 # "channel-type": 1,
1906 # "connection-id": 1804289383,
1907 # "host": "127.0.0.1",
1908 # "channel-id": 0,
1909 # "tls": true
1910 # },
1911 # {
1912 # "port": "36710",
1913 # "family": "ipv4",
1914 # "channel-type": 4,
1915 # "connection-id": 1804289383,
1916 # "host": "127.0.0.1",
1917 # "channel-id": 0,
1918 # "tls": false
1919 # },
1920 # [ ... more channels follow ... ]
1921 # ]
1922 # }
1923 # }
1924 #
1925 ##
1926 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1927
1928 ##
1929 # @BalloonInfo:
1930 #
1931 # Information about the guest balloon device.
1932 #
1933 # @actual: the number of bytes the balloon currently contains
1934 #
1935 # Since: 0.14.0
1936 #
1937 ##
1938 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1939
1940 ##
1941 # @query-balloon:
1942 #
1943 # Return information about the balloon device.
1944 #
1945 # Returns: @BalloonInfo on success
1946 #
1947 # If the balloon driver is enabled but not functional because the KVM
1948 # kernel module cannot support it, KvmMissingCap
1949 #
1950 # If no balloon device is present, DeviceNotActive
1951 #
1952 # Since: 0.14.0
1953 #
1954 # Example:
1955 #
1956 # -> { "execute": "query-balloon" }
1957 # <- { "return": {
1958 # "actual": 1073741824,
1959 # }
1960 # }
1961 #
1962 ##
1963 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1964
1965 ##
1966 # @PciMemoryRange:
1967 #
1968 # A PCI device memory region
1969 #
1970 # @base: the starting address (guest physical)
1971 #
1972 # @limit: the ending address (guest physical)
1973 #
1974 # Since: 0.14.0
1975 ##
1976 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1977
1978 ##
1979 # @PciMemoryRegion:
1980 #
1981 # Information about a PCI device I/O region.
1982 #
1983 # @bar: the index of the Base Address Register for this region
1984 #
1985 # @type: 'io' if the region is a PIO region
1986 # 'memory' if the region is a MMIO region
1987 #
1988 # @size: memory size
1989 #
1990 # @prefetch: if @type is 'memory', true if the memory is prefetchable
1991 #
1992 # @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
1993 #
1994 # Since: 0.14.0
1995 ##
1996 { 'struct': 'PciMemoryRegion',
1997 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1998 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1999
2000 ##
2001 # @PciBusInfo:
2002 #
2003 # Information about a bus of a PCI Bridge device
2004 #
2005 # @number: primary bus interface number. This should be the number of the
2006 # bus the device resides on.
2007 #
2008 # @secondary: secondary bus interface number. This is the number of the
2009 # main bus for the bridge
2010 #
2011 # @subordinate: This is the highest number bus that resides below the
2012 # bridge.
2013 #
2014 # @io_range: The PIO range for all devices on this bridge
2015 #
2016 # @memory_range: The MMIO range for all devices on this bridge
2017 #
2018 # @prefetchable_range: The range of prefetchable MMIO for all devices on
2019 # this bridge
2020 #
2021 # Since: 2.4
2022 ##
2023 { 'struct': 'PciBusInfo',
2024 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
2025 'io_range': 'PciMemoryRange',
2026 'memory_range': 'PciMemoryRange',
2027 'prefetchable_range': 'PciMemoryRange' } }
2028
2029 ##
2030 # @PciBridgeInfo:
2031 #
2032 # Information about a PCI Bridge device
2033 #
2034 # @bus: information about the bus the device resides on
2035 #
2036 # @devices: a list of @PciDeviceInfo for each device on this bridge
2037 #
2038 # Since: 0.14.0
2039 ##
2040 { 'struct': 'PciBridgeInfo',
2041 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
2042
2043 ##
2044 # @PciDeviceClass:
2045 #
2046 # Information about the Class of a PCI device
2047 #
2048 # @desc: a string description of the device's class
2049 #
2050 # @class: the class code of the device
2051 #
2052 # Since: 2.4
2053 ##
2054 { 'struct': 'PciDeviceClass',
2055 'data': {'*desc': 'str', 'class': 'int'} }
2056
2057 ##
2058 # @PciDeviceId:
2059 #
2060 # Information about the Id of a PCI device
2061 #
2062 # @device: the PCI device id
2063 #
2064 # @vendor: the PCI vendor id
2065 #
2066 # Since: 2.4
2067 ##
2068 { 'struct': 'PciDeviceId',
2069 'data': {'device': 'int', 'vendor': 'int'} }
2070
2071 ##
2072 # @PciDeviceInfo:
2073 #
2074 # Information about a PCI device
2075 #
2076 # @bus: the bus number of the device
2077 #
2078 # @slot: the slot the device is located in
2079 #
2080 # @function: the function of the slot used by the device
2081 #
2082 # @class_info: the class of the device
2083 #
2084 # @id: the PCI device id
2085 #
2086 # @irq: if an IRQ is assigned to the device, the IRQ number
2087 #
2088 # @qdev_id: the device name of the PCI device
2089 #
2090 # @pci_bridge: if the device is a PCI bridge, the bridge information
2091 #
2092 # @regions: a list of the PCI I/O regions associated with the device
2093 #
2094 # Notes: the contents of @class_info.desc are not stable and should only be
2095 # treated as informational.
2096 #
2097 # Since: 0.14.0
2098 ##
2099 { 'struct': 'PciDeviceInfo',
2100 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
2101 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
2102 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
2103 'regions': ['PciMemoryRegion']} }
2104
2105 ##
2106 # @PciInfo:
2107 #
2108 # Information about a PCI bus
2109 #
2110 # @bus: the bus index
2111 #
2112 # @devices: a list of devices on this bus
2113 #
2114 # Since: 0.14.0
2115 ##
2116 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
2117
2118 ##
2119 # @query-pci:
2120 #
2121 # Return information about the PCI bus topology of the guest.
2122 #
2123 # Returns: a list of @PciInfo for each PCI bus. Each bus is
2124 # represented by a json-object, which has a key with a json-array of
2125 # all PCI devices attached to it. Each device is represented by a
2126 # json-object.
2127 #
2128 # Since: 0.14.0
2129 #
2130 # Example:
2131 #
2132 # -> { "execute": "query-pci" }
2133 # <- { "return": [
2134 # {
2135 # "bus": 0,
2136 # "devices": [
2137 # {
2138 # "bus": 0,
2139 # "qdev_id": "",
2140 # "slot": 0,
2141 # "class_info": {
2142 # "class": 1536,
2143 # "desc": "Host bridge"
2144 # },
2145 # "id": {
2146 # "device": 32902,
2147 # "vendor": 4663
2148 # },
2149 # "function": 0,
2150 # "regions": [
2151 # ]
2152 # },
2153 # {
2154 # "bus": 0,
2155 # "qdev_id": "",
2156 # "slot": 1,
2157 # "class_info": {
2158 # "class": 1537,
2159 # "desc": "ISA bridge"
2160 # },
2161 # "id": {
2162 # "device": 32902,
2163 # "vendor": 28672
2164 # },
2165 # "function": 0,
2166 # "regions": [
2167 # ]
2168 # },
2169 # {
2170 # "bus": 0,
2171 # "qdev_id": "",
2172 # "slot": 1,
2173 # "class_info": {
2174 # "class": 257,
2175 # "desc": "IDE controller"
2176 # },
2177 # "id": {
2178 # "device": 32902,
2179 # "vendor": 28688
2180 # },
2181 # "function": 1,
2182 # "regions": [
2183 # {
2184 # "bar": 4,
2185 # "size": 16,
2186 # "address": 49152,
2187 # "type": "io"
2188 # }
2189 # ]
2190 # },
2191 # {
2192 # "bus": 0,
2193 # "qdev_id": "",
2194 # "slot": 2,
2195 # "class_info": {
2196 # "class": 768,
2197 # "desc": "VGA controller"
2198 # },
2199 # "id": {
2200 # "device": 4115,
2201 # "vendor": 184
2202 # },
2203 # "function": 0,
2204 # "regions": [
2205 # {
2206 # "prefetch": true,
2207 # "mem_type_64": false,
2208 # "bar": 0,
2209 # "size": 33554432,
2210 # "address": 4026531840,
2211 # "type": "memory"
2212 # },
2213 # {
2214 # "prefetch": false,
2215 # "mem_type_64": false,
2216 # "bar": 1,
2217 # "size": 4096,
2218 # "address": 4060086272,
2219 # "type": "memory"
2220 # },
2221 # {
2222 # "prefetch": false,
2223 # "mem_type_64": false,
2224 # "bar": 6,
2225 # "size": 65536,
2226 # "address": -1,
2227 # "type": "memory"
2228 # }
2229 # ]
2230 # },
2231 # {
2232 # "bus": 0,
2233 # "qdev_id": "",
2234 # "irq": 11,
2235 # "slot": 4,
2236 # "class_info": {
2237 # "class": 1280,
2238 # "desc": "RAM controller"
2239 # },
2240 # "id": {
2241 # "device": 6900,
2242 # "vendor": 4098
2243 # },
2244 # "function": 0,
2245 # "regions": [
2246 # {
2247 # "bar": 0,
2248 # "size": 32,
2249 # "address": 49280,
2250 # "type": "io"
2251 # }
2252 # ]
2253 # }
2254 # ]
2255 # }
2256 # ]
2257 # }
2258 #
2259 # Note: This example has been shortened as the real response is too long.
2260 #
2261 ##
2262 { 'command': 'query-pci', 'returns': ['PciInfo'] }
2263
2264 ##
2265 # @quit:
2266 #
2267 # This command will cause the QEMU process to exit gracefully. While every
2268 # attempt is made to send the QMP response before terminating, this is not
2269 # guaranteed. When using this interface, a premature EOF would not be
2270 # unexpected.
2271 #
2272 # Since: 0.14.0
2273 #
2274 # Example:
2275 #
2276 # -> { "execute": "quit" }
2277 # <- { "return": {} }
2278 ##
2279 { 'command': 'quit' }
2280
2281 ##
2282 # @stop:
2283 #
2284 # Stop all guest VCPU execution.
2285 #
2286 # Since: 0.14.0
2287 #
2288 # Notes: This function will succeed even if the guest is already in the stopped
2289 # state. In "inmigrate" state, it will ensure that the guest
2290 # remains paused once migration finishes, as if the -S option was
2291 # passed on the command line.
2292 #
2293 # Example:
2294 #
2295 # -> { "execute": "stop" }
2296 # <- { "return": {} }
2297 #
2298 ##
2299 { 'command': 'stop' }
2300
2301 ##
2302 # @system_reset:
2303 #
2304 # Performs a hard reset of a guest.
2305 #
2306 # Since: 0.14.0
2307 #
2308 # Example:
2309 #
2310 # -> { "execute": "system_reset" }
2311 # <- { "return": {} }
2312 #
2313 ##
2314 { 'command': 'system_reset' }
2315
2316 ##
2317 # @system_powerdown:
2318 #
2319 # Requests that a guest perform a powerdown operation.
2320 #
2321 # Since: 0.14.0
2322 #
2323 # Notes: A guest may or may not respond to this command. This command
2324 # returning does not indicate that a guest has accepted the request or
2325 # that it has shut down. Many guests will respond to this command by
2326 # prompting the user in some way.
2327 # Example:
2328 #
2329 # -> { "execute": "system_powerdown" }
2330 # <- { "return": {} }
2331 #
2332 ##
2333 { 'command': 'system_powerdown' }
2334
2335 ##
2336 # @cpu:
2337 #
2338 # This command is a nop that is only provided for the purposes of compatibility.
2339 #
2340 # Since: 0.14.0
2341 #
2342 # Notes: Do not use this command.
2343 ##
2344 { 'command': 'cpu', 'data': {'index': 'int'} }
2345
2346 ##
2347 # @cpu-add:
2348 #
2349 # Adds CPU with specified ID
2350 #
2351 # @id: ID of CPU to be created, valid values [0..max_cpus)
2352 #
2353 # Returns: Nothing on success
2354 #
2355 # Since: 1.5
2356 #
2357 # Example:
2358 #
2359 # -> { "execute": "cpu-add", "arguments": { "id": 2 } }
2360 # <- { "return": {} }
2361 #
2362 ##
2363 { 'command': 'cpu-add', 'data': {'id': 'int'} }
2364
2365 ##
2366 # @memsave:
2367 #
2368 # Save a portion of guest memory to a file.
2369 #
2370 # @val: the virtual address of the guest to start from
2371 #
2372 # @size: the size of memory region to save
2373 #
2374 # @filename: the file to save the memory to as binary data
2375 #
2376 # @cpu-index: the index of the virtual CPU to use for translating the
2377 # virtual address (defaults to CPU 0)
2378 #
2379 # Returns: Nothing on success
2380 #
2381 # Since: 0.14.0
2382 #
2383 # Notes: Errors were not reliably returned until 1.1
2384 #
2385 # Example:
2386 #
2387 # -> { "execute": "memsave",
2388 # "arguments": { "val": 10,
2389 # "size": 100,
2390 # "filename": "/tmp/virtual-mem-dump" } }
2391 # <- { "return": {} }
2392 #
2393 ##
2394 { 'command': 'memsave',
2395 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
2396
2397 ##
2398 # @pmemsave:
2399 #
2400 # Save a portion of guest physical memory to a file.
2401 #
2402 # @val: the physical address of the guest to start from
2403 #
2404 # @size: the size of memory region to save
2405 #
2406 # @filename: the file to save the memory to as binary data
2407 #
2408 # Returns: Nothing on success
2409 #
2410 # Since: 0.14.0
2411 #
2412 # Notes: Errors were not reliably returned until 1.1
2413 #
2414 # Example:
2415 #
2416 # -> { "execute": "pmemsave",
2417 # "arguments": { "val": 10,
2418 # "size": 100,
2419 # "filename": "/tmp/physical-mem-dump" } }
2420 # <- { "return": {} }
2421 #
2422 ##
2423 { 'command': 'pmemsave',
2424 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
2425
2426 ##
2427 # @cont:
2428 #
2429 # Resume guest VCPU execution.
2430 #
2431 # Since: 0.14.0
2432 #
2433 # Returns: If successful, nothing
2434 # If QEMU was started with an encrypted block device and a key has
2435 # not yet been set, DeviceEncrypted.
2436 #
2437 # Notes: This command will succeed if the guest is currently running. It
2438 # will also succeed if the guest is in the "inmigrate" state; in
2439 # this case, the effect of the command is to make sure the guest
2440 # starts once migration finishes, removing the effect of the -S
2441 # command line option if it was passed.
2442 #
2443 # Example:
2444 #
2445 # -> { "execute": "cont" }
2446 # <- { "return": {} }
2447 #
2448 ##
2449 { 'command': 'cont' }
2450
2451 ##
2452 # @system_wakeup:
2453 #
2454 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
2455 #
2456 # Since: 1.1
2457 #
2458 # Returns: nothing.
2459 #
2460 # Example:
2461 #
2462 # -> { "execute": "system_wakeup" }
2463 # <- { "return": {} }
2464 #
2465 ##
2466 { 'command': 'system_wakeup' }
2467
2468 ##
2469 # @inject-nmi:
2470 #
2471 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
2472 # The command fails when the guest doesn't support injecting.
2473 #
2474 # Returns: If successful, nothing
2475 #
2476 # Since: 0.14.0
2477 #
2478 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
2479 #
2480 # Example:
2481 #
2482 # -> { "execute": "inject-nmi" }
2483 # <- { "return": {} }
2484 #
2485 ##
2486 { 'command': 'inject-nmi' }
2487
2488 ##
2489 # @set_link:
2490 #
2491 # Sets the link status of a virtual network adapter.
2492 #
2493 # @name: the device name of the virtual network adapter
2494 #
2495 # @up: true to set the link status to be up
2496 #
2497 # Returns: Nothing on success
2498 # If @name is not a valid network device, DeviceNotFound
2499 #
2500 # Since: 0.14.0
2501 #
2502 # Notes: Not all network adapters support setting link status. This command
2503 # will succeed even if the network adapter does not support link status
2504 # notification.
2505 #
2506 # Example:
2507 #
2508 # -> { "execute": "set_link",
2509 # "arguments": { "name": "e1000.0", "up": false } }
2510 # <- { "return": {} }
2511 #
2512 ##
2513 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
2514
2515 ##
2516 # @balloon:
2517 #
2518 # Request the balloon driver to change its balloon size.
2519 #
2520 # @value: the target size of the balloon in bytes
2521 #
2522 # Returns: Nothing on success
2523 # If the balloon driver is enabled but not functional because the KVM
2524 # kernel module cannot support it, KvmMissingCap
2525 # If no balloon device is present, DeviceNotActive
2526 #
2527 # Notes: This command just issues a request to the guest. When it returns,
2528 # the balloon size may not have changed. A guest can change the balloon
2529 # size independent of this command.
2530 #
2531 # Since: 0.14.0
2532 #
2533 # Example:
2534 #
2535 # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
2536 # <- { "return": {} }
2537 #
2538 ##
2539 { 'command': 'balloon', 'data': {'value': 'int'} }
2540
2541 ##
2542 # @Abort:
2543 #
2544 # This action can be used to test transaction failure.
2545 #
2546 # Since: 1.6
2547 ##
2548 { 'struct': 'Abort',
2549 'data': { } }
2550
2551 ##
2552 # @ActionCompletionMode:
2553 #
2554 # An enumeration of Transactional completion modes.
2555 #
2556 # @individual: Do not attempt to cancel any other Actions if any Actions fail
2557 # after the Transaction request succeeds. All Actions that
2558 # can complete successfully will do so without waiting on others.
2559 # This is the default.
2560 #
2561 # @grouped: If any Action fails after the Transaction succeeds, cancel all
2562 # Actions. Actions do not complete until all Actions are ready to
2563 # complete. May be rejected by Actions that do not support this
2564 # completion mode.
2565 #
2566 # Since: 2.5
2567 ##
2568 { 'enum': 'ActionCompletionMode',
2569 'data': [ 'individual', 'grouped' ] }
2570
2571 ##
2572 # @TransactionAction:
2573 #
2574 # A discriminated record of operations that can be performed with
2575 # @transaction. Action @type can be:
2576 #
2577 # - @abort: since 1.6
2578 # - @block-dirty-bitmap-add: since 2.5
2579 # - @block-dirty-bitmap-clear: since 2.5
2580 # - @blockdev-backup: since 2.3
2581 # - @blockdev-snapshot: since 2.5
2582 # - @blockdev-snapshot-internal-sync: since 1.7
2583 # - @blockdev-snapshot-sync: since 1.1
2584 # - @drive-backup: since 1.6
2585 #
2586 # Since: 1.1
2587 ##
2588 { 'union': 'TransactionAction',
2589 'data': {
2590 'abort': 'Abort',
2591 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
2592 'block-dirty-bitmap-clear': 'BlockDirtyBitmap',
2593 'blockdev-backup': 'BlockdevBackup',
2594 'blockdev-snapshot': 'BlockdevSnapshot',
2595 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
2596 'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
2597 'drive-backup': 'DriveBackup'
2598 } }
2599
2600 ##
2601 # @TransactionProperties:
2602 #
2603 # Optional arguments to modify the behavior of a Transaction.
2604 #
2605 # @completion-mode: Controls how jobs launched asynchronously by
2606 # Actions will complete or fail as a group.
2607 # See @ActionCompletionMode for details.
2608 #
2609 # Since: 2.5
2610 ##
2611 { 'struct': 'TransactionProperties',
2612 'data': {
2613 '*completion-mode': 'ActionCompletionMode'
2614 }
2615 }
2616
2617 ##
2618 # @transaction:
2619 #
2620 # Executes a number of transactionable QMP commands atomically. If any
2621 # operation fails, then the entire set of actions will be abandoned and the
2622 # appropriate error returned.
2623 #
2624 # For external snapshots, the dictionary contains the device, the file to use for
2625 # the new snapshot, and the format. The default format, if not specified, is
2626 # qcow2.
2627 #
2628 # Each new snapshot defaults to being created by QEMU (wiping any
2629 # contents if the file already exists), but it is also possible to reuse
2630 # an externally-created file. In the latter case, you should ensure that
2631 # the new image file has the same contents as the current one; QEMU cannot
2632 # perform any meaningful check. Typically this is achieved by using the
2633 # current image file as the backing file for the new image.
2634 #
2635 # On failure, the original disks pre-snapshot attempt will be used.
2636 #
2637 # For internal snapshots, the dictionary contains the device and the snapshot's
2638 # name. If an internal snapshot matching name already exists, the request will
2639 # be rejected. Only some image formats support it, for example, qcow2, rbd,
2640 # and sheepdog.
2641 #
2642 # On failure, qemu will try delete the newly created internal snapshot in the
2643 # transaction. When an I/O error occurs during deletion, the user needs to fix
2644 # it later with qemu-img or other command.
2645 #
2646 # @actions: List of @TransactionAction;
2647 # information needed for the respective operations.
2648 #
2649 # @properties: structure of additional options to control the
2650 # execution of the transaction. See @TransactionProperties
2651 # for additional detail.
2652 #
2653 # Returns: nothing on success
2654 #
2655 # Errors depend on the operations of the transaction
2656 #
2657 # Note: The transaction aborts on the first failure. Therefore, there will be
2658 # information on only one failed operation returned in an error condition, and
2659 # subsequent actions will not have been attempted.
2660 #
2661 # Since: 1.1
2662 #
2663 # Example:
2664 #
2665 # -> { "execute": "transaction",
2666 # "arguments": { "actions": [
2667 # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
2668 # "snapshot-file": "/some/place/my-image",
2669 # "format": "qcow2" } },
2670 # { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
2671 # "snapshot-file": "/some/place/my-image2",
2672 # "snapshot-node-name": "node3432",
2673 # "mode": "existing",
2674 # "format": "qcow2" } },
2675 # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
2676 # "snapshot-file": "/some/place/my-image2",
2677 # "mode": "existing",
2678 # "format": "qcow2" } },
2679 # { "type": "blockdev-snapshot-internal-sync", "data" : {
2680 # "device": "ide-hd2",
2681 # "name": "snapshot0" } } ] } }
2682 # <- { "return": {} }
2683 #
2684 ##
2685 { 'command': 'transaction',
2686 'data': { 'actions': [ 'TransactionAction' ],
2687 '*properties': 'TransactionProperties'
2688 }
2689 }
2690
2691 ##
2692 # @human-monitor-command:
2693 #
2694 # Execute a command on the human monitor and return the output.
2695 #
2696 # @command-line: the command to execute in the human monitor
2697 #
2698 # @cpu-index: The CPU to use for commands that require an implicit CPU
2699 #
2700 # Returns: the output of the command as a string
2701 #
2702 # Since: 0.14.0
2703 #
2704 # Notes: This command only exists as a stop-gap. Its use is highly
2705 # discouraged. The semantics of this command are not
2706 # guaranteed: this means that command names, arguments and
2707 # responses can change or be removed at ANY time. Applications
2708 # that rely on long term stability guarantees should NOT
2709 # use this command.
2710 #
2711 # Known limitations:
2712 #
2713 # * This command is stateless, this means that commands that depend
2714 # on state information (such as getfd) might not work
2715 #
2716 # * Commands that prompt the user for data (eg. 'cont' when the block
2717 # device is encrypted) don't currently work
2718 #
2719 # Example:
2720 #
2721 # -> { "execute": "human-monitor-command",
2722 # "arguments": { "command-line": "info kvm" } }
2723 # <- { "return": "kvm support: enabled\r\n" }
2724 #
2725 ##
2726 { 'command': 'human-monitor-command',
2727 'data': {'command-line': 'str', '*cpu-index': 'int'},
2728 'returns': 'str' }
2729
2730 ##
2731 # @migrate_cancel:
2732 #
2733 # Cancel the current executing migration process.
2734 #
2735 # Returns: nothing on success
2736 #
2737 # Notes: This command succeeds even if there is no migration process running.
2738 #
2739 # Since: 0.14.0
2740 #
2741 # Example:
2742 #
2743 # -> { "execute": "migrate_cancel" }
2744 # <- { "return": {} }
2745 #
2746 ##
2747 { 'command': 'migrate_cancel' }
2748
2749 ##
2750 # @migrate_set_downtime:
2751 #
2752 # Set maximum tolerated downtime for migration.
2753 #
2754 # @value: maximum downtime in seconds
2755 #
2756 # Returns: nothing on success
2757 #
2758 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2759 #
2760 # Since: 0.14.0
2761 #
2762 # Example:
2763 #
2764 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
2765 # <- { "return": {} }
2766 #
2767 ##
2768 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
2769
2770 ##
2771 # @migrate_set_speed:
2772 #
2773 # Set maximum speed for migration.
2774 #
2775 # @value: maximum speed in bytes per second.
2776 #
2777 # Returns: nothing on success
2778 #
2779 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2780 #
2781 # Since: 0.14.0
2782 #
2783 # Example:
2784 #
2785 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
2786 # <- { "return": {} }
2787 #
2788 ##
2789 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
2790
2791 ##
2792 # @migrate-set-cache-size:
2793 #
2794 # Set cache size to be used by XBZRLE migration
2795 #
2796 # @value: cache size in bytes
2797 #
2798 # The size will be rounded down to the nearest power of 2.
2799 # The cache size can be modified before and during ongoing migration
2800 #
2801 # Returns: nothing on success
2802 #
2803 # Since: 1.2
2804 #
2805 # Example:
2806 #
2807 # -> { "execute": "migrate-set-cache-size",
2808 # "arguments": { "value": 536870912 } }
2809 # <- { "return": {} }
2810 #
2811 ##
2812 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
2813
2814 ##
2815 # @query-migrate-cache-size:
2816 #
2817 # Query migration XBZRLE cache size
2818 #
2819 # Returns: XBZRLE cache size in bytes
2820 #
2821 # Since: 1.2
2822 #
2823 # Example:
2824 #
2825 # -> { "execute": "query-migrate-cache-size" }
2826 # <- { "return": 67108864 }
2827 #
2828 ##
2829 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
2830
2831 ##
2832 # @ObjectPropertyInfo:
2833 #
2834 # @name: the name of the property
2835 #
2836 # @type: the type of the property. This will typically come in one of four
2837 # forms:
2838 #
2839 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
2840 # These types are mapped to the appropriate JSON type.
2841 #
2842 # 2) A child type in the form 'child<subtype>' where subtype is a qdev
2843 # device type name. Child properties create the composition tree.
2844 #
2845 # 3) A link type in the form 'link<subtype>' where subtype is a qdev
2846 # device type name. Link properties form the device model graph.
2847 #
2848 # Since: 1.2
2849 ##
2850 { 'struct': 'ObjectPropertyInfo',
2851 'data': { 'name': 'str', 'type': 'str' } }
2852
2853 ##
2854 # @qom-list:
2855 #
2856 # This command will list any properties of a object given a path in the object
2857 # model.
2858 #
2859 # @path: the path within the object model. See @qom-get for a description of
2860 # this parameter.
2861 #
2862 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
2863 # object.
2864 #
2865 # Since: 1.2
2866 ##
2867 { 'command': 'qom-list',
2868 'data': { 'path': 'str' },
2869 'returns': [ 'ObjectPropertyInfo' ] }
2870
2871 ##
2872 # @qom-get:
2873 #
2874 # This command will get a property from a object model path and return the
2875 # value.
2876 #
2877 # @path: The path within the object model. There are two forms of supported
2878 # paths--absolute and partial paths.
2879 #
2880 # Absolute paths are derived from the root object and can follow child<>
2881 # or link<> properties. Since they can follow link<> properties, they
2882 # can be arbitrarily long. Absolute paths look like absolute filenames
2883 # and are prefixed with a leading slash.
2884 #
2885 # Partial paths look like relative filenames. They do not begin
2886 # with a prefix. The matching rules for partial paths are subtle but
2887 # designed to make specifying objects easy. At each level of the
2888 # composition tree, the partial path is matched as an absolute path.
2889 # The first match is not returned. At least two matches are searched
2890 # for. A successful result is only returned if only one match is
2891 # found. If more than one match is found, a flag is return to
2892 # indicate that the match was ambiguous.
2893 #
2894 # @property: The property name to read
2895 #
2896 # Returns: The property value. The type depends on the property
2897 # type. child<> and link<> properties are returned as #str
2898 # pathnames. All integer property types (u8, u16, etc) are
2899 # returned as #int.
2900 #
2901 # Since: 1.2
2902 ##
2903 { 'command': 'qom-get',
2904 'data': { 'path': 'str', 'property': 'str' },
2905 'returns': 'any' }
2906
2907 ##
2908 # @qom-set:
2909 #
2910 # This command will set a property from a object model path.
2911 #
2912 # @path: see @qom-get for a description of this parameter
2913 #
2914 # @property: the property name to set
2915 #
2916 # @value: a value who's type is appropriate for the property type. See @qom-get
2917 # for a description of type mapping.
2918 #
2919 # Since: 1.2
2920 ##
2921 { 'command': 'qom-set',
2922 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
2923
2924 ##
2925 # @set_password:
2926 #
2927 # Sets the password of a remote display session.
2928 #
2929 # @protocol: `vnc' to modify the VNC server password
2930 # `spice' to modify the Spice server password
2931 #
2932 # @password: the new password
2933 #
2934 # @connected: how to handle existing clients when changing the
2935 # password. If nothing is specified, defaults to `keep'
2936 # `fail' to fail the command if clients are connected
2937 # `disconnect' to disconnect existing clients
2938 # `keep' to maintain existing clients
2939 #
2940 # Returns: Nothing on success
2941 # If Spice is not enabled, DeviceNotFound
2942 #
2943 # Since: 0.14.0
2944 #
2945 # Example:
2946 #
2947 # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
2948 # "password": "secret" } }
2949 # <- { "return": {} }
2950 #
2951 ##
2952 { 'command': 'set_password',
2953 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2954
2955 ##
2956 # @expire_password:
2957 #
2958 # Expire the password of a remote display server.
2959 #
2960 # @protocol: the name of the remote display protocol `vnc' or `spice'
2961 #
2962 # @time: when to expire the password.
2963 # `now' to expire the password immediately
2964 # `never' to cancel password expiration
2965 # `+INT' where INT is the number of seconds from now (integer)
2966 # `INT' where INT is the absolute time in seconds
2967 #
2968 # Returns: Nothing on success
2969 # If @protocol is `spice' and Spice is not active, DeviceNotFound
2970 #
2971 # Since: 0.14.0
2972 #
2973 # Notes: Time is relative to the server and currently there is no way to
2974 # coordinate server time with client time. It is not recommended to
2975 # use the absolute time version of the @time parameter unless you're
2976 # sure you are on the same machine as the QEMU instance.
2977 #
2978 # Example:
2979 #
2980 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
2981 # "time": "+60" } }
2982 # <- { "return": {} }
2983 #
2984 ##
2985 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2986
2987 ##
2988 # @change-vnc-password:
2989 #
2990 # Change the VNC server password.
2991 #
2992 # @password: the new password to use with VNC authentication
2993 #
2994 # Since: 1.1
2995 #
2996 # Notes: An empty password in this command will set the password to the empty
2997 # string. Existing clients are unaffected by executing this command.
2998 ##
2999 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
3000
3001 ##
3002 # @change:
3003 #
3004 # This command is multiple commands multiplexed together.
3005 #
3006 # @device: This is normally the name of a block device but it may also be 'vnc'.
3007 # when it's 'vnc', then sub command depends on @target
3008 #
3009 # @target: If @device is a block device, then this is the new filename.
3010 # If @device is 'vnc', then if the value 'password' selects the vnc
3011 # change password command. Otherwise, this specifies a new server URI
3012 # address to listen to for VNC connections.
3013 #
3014 # @arg: If @device is a block device, then this is an optional format to open
3015 # the device with.
3016 # If @device is 'vnc' and @target is 'password', this is the new VNC
3017 # password to set. If this argument is an empty string, then no future
3018 # logins will be allowed.
3019 #
3020 # Returns: Nothing on success.
3021 # If @device is not a valid block device, DeviceNotFound
3022 # If the new block device is encrypted, DeviceEncrypted. Note that
3023 # if this error is returned, the device has been opened successfully
3024 # and an additional call to @block_passwd is required to set the
3025 # device's password. The behavior of reads and writes to the block
3026 # device between when these calls are executed is undefined.
3027 #
3028 # Notes: This interface is deprecated, and it is strongly recommended that you
3029 # avoid using it. For changing block devices, use
3030 # blockdev-change-medium; for changing VNC parameters, use
3031 # change-vnc-password.
3032 #
3033 # Since: 0.14.0
3034 #
3035 # Example:
3036 #
3037 # 1. Change a removable medium
3038 #
3039 # -> { "execute": "change",
3040 # "arguments": { "device": "ide1-cd0",
3041 # "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
3042 # <- { "return": {} }
3043 #
3044 # 2. Change VNC password
3045 #
3046 # -> { "execute": "change",
3047 # "arguments": { "device": "vnc", "target": "password",
3048 # "arg": "foobar1" } }
3049 # <- { "return": {} }
3050 #
3051 ##
3052 { 'command': 'change',
3053 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
3054
3055 ##
3056 # @ObjectTypeInfo:
3057 #
3058 # This structure describes a search result from @qom-list-types
3059 #
3060 # @name: the type name found in the search
3061 #
3062 # Since: 1.1
3063 ##
3064 { 'struct': 'ObjectTypeInfo',
3065 'data': { 'name': 'str' } }
3066
3067 ##
3068 # @qom-list-types:
3069 #
3070 # This command will return a list of types given search parameters
3071 #
3072 # @implements: if specified, only return types that implement this type name
3073 #
3074 # @abstract: if true, include abstract types in the results
3075 #
3076 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
3077 #
3078 # Since: 1.1
3079 ##
3080 { 'command': 'qom-list-types',
3081 'data': { '*implements': 'str', '*abstract': 'bool' },
3082 'returns': [ 'ObjectTypeInfo' ] }
3083
3084 ##
3085 # @DevicePropertyInfo:
3086 #
3087 # Information about device properties.
3088 #
3089 # @name: the name of the property
3090 # @type: the typename of the property
3091 # @description: if specified, the description of the property.
3092 # (since 2.2)
3093 #
3094 # Since: 1.2
3095 ##
3096 { 'struct': 'DevicePropertyInfo',
3097 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
3098
3099 ##
3100 # @device-list-properties:
3101 #
3102 # List properties associated with a device.
3103 #
3104 # @typename: the type name of a device
3105 #
3106 # Returns: a list of DevicePropertyInfo describing a devices properties
3107 #
3108 # Since: 1.2
3109 ##
3110 { 'command': 'device-list-properties',
3111 'data': { 'typename': 'str'},
3112 'returns': [ 'DevicePropertyInfo' ] }
3113
3114 ##
3115 # @migrate:
3116 #
3117 # Migrates the current running guest to another Virtual Machine.
3118 #
3119 # @uri: the Uniform Resource Identifier of the destination VM
3120 #
3121 # @blk: do block migration (full disk copy)
3122 #
3123 # @inc: incremental disk copy migration
3124 #
3125 # @detach: this argument exists only for compatibility reasons and
3126 # is ignored by QEMU
3127 #
3128 # Returns: nothing on success
3129 #
3130 # Since: 0.14.0
3131 #
3132 # Notes:
3133 #
3134 # 1. The 'query-migrate' command should be used to check migration's progress
3135 # and final result (this information is provided by the 'status' member)
3136 #
3137 # 2. All boolean arguments default to false
3138 #
3139 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
3140 # be used
3141 #
3142 # Example:
3143 #
3144 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
3145 # <- { "return": {} }
3146 #
3147 ##
3148 { 'command': 'migrate',
3149 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
3150
3151 ##
3152 # @migrate-incoming:
3153 #
3154 # Start an incoming migration, the qemu must have been started
3155 # with -incoming defer
3156 #
3157 # @uri: The Uniform Resource Identifier identifying the source or
3158 # address to listen on
3159 #
3160 # Returns: nothing on success
3161 #
3162 # Since: 2.3
3163 #
3164 # Notes:
3165 #
3166 # 1. It's a bad idea to use a string for the uri, but it needs to stay
3167 # compatible with -incoming and the format of the uri is already exposed
3168 # above libvirt.
3169 #
3170 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
3171 # be used.
3172 #
3173 # 3. The uri format is the same as for -incoming
3174 #
3175 # Example:
3176 #
3177 # -> { "execute": "migrate-incoming",
3178 # "arguments": { "uri": "tcp::4446" } }
3179 # <- { "return": {} }
3180 #
3181 ##
3182 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
3183
3184 ##
3185 # @xen-save-devices-state:
3186 #
3187 # Save the state of all devices to file. The RAM and the block devices
3188 # of the VM are not saved by this command.
3189 #
3190 # @filename: the file to save the state of the devices to as binary
3191 # data. See xen-save-devices-state.txt for a description of the binary
3192 # format.
3193 #
3194 # Returns: Nothing on success
3195 #
3196 # Since: 1.1
3197 #
3198 # Example:
3199 #
3200 # -> { "execute": "xen-save-devices-state",
3201 # "arguments": { "filename": "/tmp/save" } }
3202 # <- { "return": {} }
3203 #
3204 ##
3205 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
3206
3207 ##
3208 # @xen-set-global-dirty-log:
3209 #
3210 # Enable or disable the global dirty log mode.
3211 #
3212 # @enable: true to enable, false to disable.
3213 #
3214 # Returns: nothing
3215 #
3216 # Since: 1.3
3217 #
3218 # Example:
3219 #
3220 # -> { "execute": "xen-set-global-dirty-log",
3221 # "arguments": { "enable": true } }
3222 # <- { "return": {} }
3223 #
3224 ##
3225 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
3226
3227 ##
3228 # @device_add:
3229 #
3230 # @driver: the name of the new device's driver
3231 #
3232 # @bus: the device's parent bus (device tree path)
3233 #
3234 # @id: the device's ID, must be unique
3235 #
3236 # Additional arguments depend on the type.
3237 #
3238 # Add a device.
3239 #
3240 # Notes:
3241 # 1. For detailed information about this command, please refer to the
3242 # 'docs/qdev-device-use.txt' file.
3243 #
3244 # 2. It's possible to list device properties by running QEMU with the
3245 # "-device DEVICE,help" command-line argument, where DEVICE is the
3246 # device's name
3247 #
3248 # Example:
3249 #
3250 # -> { "execute": "device_add",
3251 # "arguments": { "driver": "e1000", "id": "net1",
3252 # "bus": "pci.0",
3253 # "mac": "52:54:00:12:34:56" } }
3254 # <- { "return": {} }
3255 #
3256 # TODO: This command effectively bypasses QAPI completely due to its
3257 # "additional arguments" business. It shouldn't have been added to
3258 # the schema in this form. It should be qapified properly, or
3259 # replaced by a properly qapified command.
3260 #
3261 # Since: 0.13
3262 ##
3263 { 'command': 'device_add',
3264 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'},
3265 'gen': false } # so we can get the additional arguments
3266
3267 ##
3268 # @device_del:
3269 #
3270 # Remove a device from a guest
3271 #
3272 # @id: the device's ID or QOM path
3273 #
3274 # Returns: Nothing on success
3275 # If @id is not a valid device, DeviceNotFound
3276 #
3277 # Notes: When this command completes, the device may not be removed from the
3278 # guest. Hot removal is an operation that requires guest cooperation.
3279 # This command merely requests that the guest begin the hot removal
3280 # process. Completion of the device removal process is signaled with a
3281 # DEVICE_DELETED event. Guest reset will automatically complete removal
3282 # for all devices.
3283 #
3284 # Since: 0.14.0
3285 #
3286 # Example:
3287 #
3288 # -> { "execute": "device_del",
3289 # "arguments": { "id": "net1" } }
3290 # <- { "return": {} }
3291 #
3292 # -> { "execute": "device_del",
3293 # "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
3294 # <- { "return": {} }
3295 #
3296 ##
3297 { 'command': 'device_del', 'data': {'id': 'str'} }
3298
3299 ##
3300 # @DumpGuestMemoryFormat:
3301 #
3302 # An enumeration of guest-memory-dump's format.
3303 #
3304 # @elf: elf format
3305 #
3306 # @kdump-zlib: kdump-compressed format with zlib-compressed
3307 #
3308 # @kdump-lzo: kdump-compressed format with lzo-compressed
3309 #
3310 # @kdump-snappy: kdump-compressed format with snappy-compressed
3311 #
3312 # Since: 2.0
3313 ##
3314 { 'enum': 'DumpGuestMemoryFormat',
3315 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
3316
3317 ##
3318 # @dump-guest-memory:
3319 #
3320 # Dump guest's memory to vmcore. It is a synchronous operation that can take
3321 # very long depending on the amount of guest memory.
3322 #
3323 # @paging: if true, do paging to get guest's memory mapping. This allows
3324 # using gdb to process the core file.
3325 #
3326 # IMPORTANT: this option can make QEMU allocate several gigabytes
3327 # of RAM. This can happen for a large guest, or a
3328 # malicious guest pretending to be large.
3329 #
3330 # Also, paging=true has the following limitations:
3331 #
3332 # 1. The guest may be in a catastrophic state or can have corrupted
3333 # memory, which cannot be trusted
3334 # 2. The guest can be in real-mode even if paging is enabled. For
3335 # example, the guest uses ACPI to sleep, and ACPI sleep state
3336 # goes in real-mode
3337 # 3. Currently only supported on i386 and x86_64.
3338 #
3339 # @protocol: the filename or file descriptor of the vmcore. The supported
3340 # protocols are:
3341 #
3342 # 1. file: the protocol starts with "file:", and the following
3343 # string is the file's path.
3344 # 2. fd: the protocol starts with "fd:", and the following string
3345 # is the fd's name.
3346 #
3347 # @detach: if true, QMP will return immediately rather than
3348 # waiting for the dump to finish. The user can track progress
3349 # using "query-dump". (since 2.6).
3350 #
3351 # @begin: if specified, the starting physical address.
3352 #
3353 # @length: if specified, the memory size, in bytes. If you don't
3354 # want to dump all guest's memory, please specify the start @begin
3355 # and @length
3356 #
3357 # @format: if specified, the format of guest memory dump. But non-elf
3358 # format is conflict with paging and filter, ie. @paging, @begin and
3359 # @length is not allowed to be specified with non-elf @format at the
3360 # same time (since 2.0)
3361 #
3362 # Note: All boolean arguments default to false
3363 #
3364 # Returns: nothing on success
3365 #
3366 # Since: 1.2
3367 #
3368 # Example:
3369 #
3370 # -> { "execute": "dump-guest-memory",
3371 # "arguments": { "protocol": "fd:dump" } }
3372 # <- { "return": {} }
3373 #
3374 ##
3375 { 'command': 'dump-guest-memory',
3376 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
3377 '*begin': 'int', '*length': 'int',
3378 '*format': 'DumpGuestMemoryFormat'} }
3379
3380 ##
3381 # @DumpStatus:
3382 #
3383 # Describe the status of a long-running background guest memory dump.
3384 #
3385 # @none: no dump-guest-memory has started yet.
3386 #
3387 # @active: there is one dump running in background.
3388 #
3389 # @completed: the last dump has finished successfully.
3390 #
3391 # @failed: the last dump has failed.
3392 #
3393 # Since: 2.6
3394 ##
3395 { 'enum': 'DumpStatus',
3396 'data': [ 'none', 'active', 'completed', 'failed' ] }
3397
3398 ##
3399 # @DumpQueryResult:
3400 #
3401 # The result format for 'query-dump'.
3402 #
3403 # @status: enum of @DumpStatus, which shows current dump status
3404 #
3405 # @completed: bytes written in latest dump (uncompressed)
3406 #
3407 # @total: total bytes to be written in latest dump (uncompressed)
3408 #
3409 # Since: 2.6
3410 ##
3411 { 'struct': 'DumpQueryResult',
3412 'data': { 'status': 'DumpStatus',
3413 'completed': 'int',
3414 'total': 'int' } }
3415
3416 ##
3417 # @query-dump:
3418 #
3419 # Query latest dump status.
3420 #
3421 # Returns: A @DumpStatus object showing the dump status.
3422 #
3423 # Since: 2.6
3424 #
3425 # Example:
3426 #
3427 # -> { "execute": "query-dump" }
3428 # <- { "return": { "status": "active", "completed": 1024000,
3429 # "total": 2048000 } }
3430 #
3431 ##
3432 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
3433
3434 ##
3435 # @DumpGuestMemoryCapability:
3436 #
3437 # A list of the available formats for dump-guest-memory
3438 #
3439 # Since: 2.0
3440 ##
3441 { 'struct': 'DumpGuestMemoryCapability',
3442 'data': {
3443 'formats': ['DumpGuestMemoryFormat'] } }
3444
3445 ##
3446 # @query-dump-guest-memory-capability:
3447 #
3448 # Returns the available formats for dump-guest-memory
3449 #
3450 # Returns: A @DumpGuestMemoryCapability object listing available formats for
3451 # dump-guest-memory
3452 #
3453 # Since: 2.0
3454 #
3455 # Example:
3456 #
3457 # -> { "execute": "query-dump-guest-memory-capability" }
3458 # <- { "return": { "formats":
3459 # ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
3460 #
3461 ##
3462 { 'command': 'query-dump-guest-memory-capability',
3463 'returns': 'DumpGuestMemoryCapability' }
3464
3465 ##
3466 # @dump-skeys:
3467 #
3468 # Dump guest's storage keys
3469 #
3470 # @filename: the path to the file to dump to
3471 #
3472 # This command is only supported on s390 architecture.
3473 #
3474 # Since: 2.5
3475 #
3476 # Example:
3477 #
3478 # -> { "execute": "dump-skeys",
3479 # "arguments": { "filename": "/tmp/skeys" } }
3480 # <- { "return": {} }
3481 #
3482 ##
3483 { 'command': 'dump-skeys',
3484 'data': { 'filename': 'str' } }
3485
3486 ##
3487 # @netdev_add:
3488 #
3489 # Add a network backend.
3490 #
3491 # @type: the type of network backend. Current valid values are 'user', 'tap',
3492 # 'vde', 'socket', 'dump' and 'bridge'
3493 #
3494 # @id: the name of the new network backend
3495 #
3496 # Additional arguments depend on the type.
3497 #
3498 # TODO: This command effectively bypasses QAPI completely due to its
3499 # "additional arguments" business. It shouldn't have been added to
3500 # the schema in this form. It should be qapified properly, or
3501 # replaced by a properly qapified command.
3502 #
3503 # Since: 0.14.0
3504 #
3505 # Returns: Nothing on success
3506 # If @type is not a valid network backend, DeviceNotFound
3507 #
3508 # Example:
3509 #
3510 # -> { "execute": "netdev_add",
3511 # "arguments": { "type": "user", "id": "netdev1",
3512 # "dnssearch": "example.org" } }
3513 # <- { "return": {} }
3514 #
3515 ##
3516 { 'command': 'netdev_add',
3517 'data': {'type': 'str', 'id': 'str'},
3518 'gen': false } # so we can get the additional arguments
3519
3520 ##
3521 # @netdev_del:
3522 #
3523 # Remove a network backend.
3524 #
3525 # @id: the name of the network backend to remove
3526 #
3527 # Returns: Nothing on success
3528 # If @id is not a valid network backend, DeviceNotFound
3529 #
3530 # Since: 0.14.0
3531 #
3532 # Example:
3533 #
3534 # -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
3535 # <- { "return": {} }
3536 #
3537 ##
3538 { 'command': 'netdev_del', 'data': {'id': 'str'} }
3539
3540 ##
3541 # @object-add:
3542 #
3543 # Create a QOM object.
3544 #
3545 # @qom-type: the class name for the object to be created
3546 #
3547 # @id: the name of the new object
3548 #
3549 # @props: a dictionary of properties to be passed to the backend
3550 #
3551 # Returns: Nothing on success
3552 # Error if @qom-type is not a valid class name
3553 #
3554 # Since: 2.0
3555 #
3556 # Example:
3557 #
3558 # -> { "execute": "object-add",
3559 # "arguments": { "qom-type": "rng-random", "id": "rng1",
3560 # "props": { "filename": "/dev/hwrng" } } }
3561 # <- { "return": {} }
3562 #
3563 ##
3564 { 'command': 'object-add',
3565 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
3566
3567 ##
3568 # @object-del:
3569 #
3570 # Remove a QOM object.
3571 #
3572 # @id: the name of the QOM object to remove
3573 #
3574 # Returns: Nothing on success
3575 # Error if @id is not a valid id for a QOM object
3576 #
3577 # Since: 2.0
3578 #
3579 # Example:
3580 #
3581 # -> { "execute": "object-del", "arguments": { "id": "rng1" } }
3582 # <- { "return": {} }
3583 #
3584 ##
3585 { 'command': 'object-del', 'data': {'id': 'str'} }
3586
3587 ##
3588 # @NetdevNoneOptions:
3589 #
3590 # Use it alone to have zero network devices.
3591 #
3592 # Since: 1.2
3593 ##
3594 { 'struct': 'NetdevNoneOptions',
3595 'data': { } }
3596
3597 ##
3598 # @NetLegacyNicOptions:
3599 #
3600 # Create a new Network Interface Card.
3601 #
3602 # @netdev: id of -netdev to connect to
3603 #
3604 # @macaddr: MAC address
3605 #
3606 # @model: device model (e1000, rtl8139, virtio etc.)
3607 #
3608 # @addr: PCI device address
3609 #
3610 # @vectors: number of MSI-x vectors, 0 to disable MSI-X
3611 #
3612 # Since: 1.2
3613 ##
3614 { 'struct': 'NetLegacyNicOptions',
3615 'data': {
3616 '*netdev': 'str',
3617 '*macaddr': 'str',
3618 '*model': 'str',
3619 '*addr': 'str',
3620 '*vectors': 'uint32' } }
3621
3622 ##
3623 # @String:
3624 #
3625 # A fat type wrapping 'str', to be embedded in lists.
3626 #
3627 # Since: 1.2
3628 ##
3629 { 'struct': 'String',
3630 'data': {
3631 'str': 'str' } }
3632
3633 ##
3634 # @NetdevUserOptions:
3635 #
3636 # Use the user mode network stack which requires no administrator privilege to
3637 # run.
3638 #
3639 # @hostname: client hostname reported by the builtin DHCP server
3640 #
3641 # @restrict: isolate the guest from the host
3642 #
3643 # @ipv4: whether to support IPv4, default true for enabled
3644 # (since 2.6)
3645 #
3646 # @ipv6: whether to support IPv6, default true for enabled
3647 # (since 2.6)
3648 #
3649 # @ip: legacy parameter, use net= instead
3650 #
3651 # @net: IP network address that the guest will see, in the
3652 # form addr[/netmask] The netmask is optional, and can be
3653 # either in the form a.b.c.d or as a number of valid top-most
3654 # bits. Default is 10.0.2.0/24.
3655 #
3656 # @host: guest-visible address of the host
3657 #
3658 # @tftp: root directory of the built-in TFTP server
3659 #
3660 # @bootfile: BOOTP filename, for use with tftp=
3661 #
3662 # @dhcpstart: the first of the 16 IPs the built-in DHCP server can
3663 # assign
3664 #
3665 # @dns: guest-visible address of the virtual nameserver
3666 #
3667 # @dnssearch: list of DNS suffixes to search, passed as DHCP option
3668 # to the guest
3669 #
3670 # @ipv6-prefix: IPv6 network prefix (default is fec0::) (since
3671 # 2.6). The network prefix is given in the usual
3672 # hexadecimal IPv6 address notation.
3673 #
3674 # @ipv6-prefixlen: IPv6 network prefix length (default is 64)
3675 # (since 2.6)
3676 #
3677 # @ipv6-host: guest-visible IPv6 address of the host (since 2.6)
3678 #
3679 # @ipv6-dns: guest-visible IPv6 address of the virtual
3680 # nameserver (since 2.6)
3681 #
3682 # @smb: root directory of the built-in SMB server
3683 #
3684 # @smbserver: IP address of the built-in SMB server
3685 #
3686 # @hostfwd: redirect incoming TCP or UDP host connections to guest
3687 # endpoints
3688 #
3689 # @guestfwd: forward guest TCP connections
3690 #
3691 # Since: 1.2
3692 ##
3693 { 'struct': 'NetdevUserOptions',
3694 'data': {
3695 '*hostname': 'str',
3696 '*restrict': 'bool',
3697 '*ipv4': 'bool',
3698 '*ipv6': 'bool',
3699 '*ip': 'str',
3700 '*net': 'str',
3701 '*host': 'str',
3702 '*tftp': 'str',
3703 '*bootfile': 'str',
3704 '*dhcpstart': 'str',
3705 '*dns': 'str',
3706 '*dnssearch': ['String'],
3707 '*ipv6-prefix': 'str',
3708 '*ipv6-prefixlen': 'int',
3709 '*ipv6-host': 'str',
3710 '*ipv6-dns': 'str',
3711 '*smb': 'str',
3712 '*smbserver': 'str',
3713 '*hostfwd': ['String'],
3714 '*guestfwd': ['String'] } }
3715
3716 ##
3717 # @NetdevTapOptions:
3718 #
3719 # Connect the host TAP network interface name to the VLAN.
3720 #
3721 # @ifname: interface name
3722 #
3723 # @fd: file descriptor of an already opened tap
3724 #
3725 # @fds: multiple file descriptors of already opened multiqueue capable
3726 # tap
3727 #
3728 # @script: script to initialize the interface
3729 #
3730 # @downscript: script to shut down the interface
3731 #
3732 # @br: bridge name (since 2.8)
3733 #
3734 # @helper: command to execute to configure bridge
3735 #
3736 # @sndbuf: send buffer limit. Understands [TGMKkb] suffixes.
3737 #
3738 # @vnet_hdr: enable the IFF_VNET_HDR flag on the tap interface
3739 #
3740 # @vhost: enable vhost-net network accelerator
3741 #
3742 # @vhostfd: file descriptor of an already opened vhost net device
3743 #
3744 # @vhostfds: file descriptors of multiple already opened vhost net
3745 # devices
3746 #
3747 # @vhostforce: vhost on for non-MSIX virtio guests
3748 #
3749 # @queues: number of queues to be created for multiqueue capable tap
3750 #
3751 # @poll-us: maximum number of microseconds that could
3752 # be spent on busy polling for tap (since 2.7)
3753 #
3754 # Since: 1.2
3755 ##
3756 { 'struct': 'NetdevTapOptions',
3757 'data': {
3758 '*ifname': 'str',
3759 '*fd': 'str',
3760 '*fds': 'str',
3761 '*script': 'str',
3762 '*downscript': 'str',
3763 '*br': 'str',
3764 '*helper': 'str',
3765 '*sndbuf': 'size',
3766 '*vnet_hdr': 'bool',
3767 '*vhost': 'bool',
3768 '*vhostfd': 'str',
3769 '*vhostfds': 'str',
3770 '*vhostforce': 'bool',
3771 '*queues': 'uint32',
3772 '*poll-us': 'uint32'} }
3773
3774 ##
3775 # @NetdevSocketOptions:
3776 #
3777 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
3778 # socket connection.
3779 #
3780 # @fd: file descriptor of an already opened socket
3781 #
3782 # @listen: port number, and optional hostname, to listen on
3783 #
3784 # @connect: port number, and optional hostname, to connect to
3785 #
3786 # @mcast: UDP multicast address and port number
3787 #
3788 # @localaddr: source address and port for multicast and udp packets
3789 #
3790 # @udp: UDP unicast address and port number
3791 #
3792 # Since: 1.2
3793 ##
3794 { 'struct': 'NetdevSocketOptions',
3795 'data': {
3796 '*fd': 'str',
3797 '*listen': 'str',
3798 '*connect': 'str',
3799 '*mcast': 'str',
3800 '*localaddr': 'str',
3801 '*udp': 'str' } }
3802
3803 ##
3804 # @NetdevL2TPv3Options:
3805 #
3806 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
3807 #
3808 # @src: source address
3809 #
3810 # @dst: destination address
3811 #
3812 # @srcport: source port - mandatory for udp, optional for ip
3813 #
3814 # @dstport: destination port - mandatory for udp, optional for ip
3815 #
3816 # @ipv6: force the use of ipv6
3817 #
3818 # @udp: use the udp version of l2tpv3 encapsulation
3819 #
3820 # @cookie64: use 64 bit coookies
3821 #
3822 # @counter: have sequence counter
3823 #
3824 # @pincounter: pin sequence counter to zero -
3825 # workaround for buggy implementations or
3826 # networks with packet reorder
3827 #
3828 # @txcookie: 32 or 64 bit transmit cookie
3829 #
3830 # @rxcookie: 32 or 64 bit receive cookie
3831 #
3832 # @txsession: 32 bit transmit session
3833 #
3834 # @rxsession: 32 bit receive session - if not specified
3835 # set to the same value as transmit
3836 #
3837 # @offset: additional offset - allows the insertion of
3838 # additional application-specific data before the packet payload
3839 #
3840 # Since: 2.1
3841 ##
3842 { 'struct': 'NetdevL2TPv3Options',
3843 'data': {
3844 'src': 'str',
3845 'dst': 'str',
3846 '*srcport': 'str',
3847 '*dstport': 'str',
3848 '*ipv6': 'bool',
3849 '*udp': 'bool',
3850 '*cookie64': 'bool',
3851 '*counter': 'bool',
3852 '*pincounter': 'bool',
3853 '*txcookie': 'uint64',
3854 '*rxcookie': 'uint64',
3855 'txsession': 'uint32',
3856 '*rxsession': 'uint32',
3857 '*offset': 'uint32' } }
3858
3859 ##
3860 # @NetdevVdeOptions:
3861 #
3862 # Connect the VLAN to a vde switch running on the host.
3863 #
3864 # @sock: socket path
3865 #
3866 # @port: port number
3867 #
3868 # @group: group owner of socket
3869 #
3870 # @mode: permissions for socket
3871 #
3872 # Since: 1.2
3873 ##
3874 { 'struct': 'NetdevVdeOptions',
3875 'data': {
3876 '*sock': 'str',
3877 '*port': 'uint16',
3878 '*group': 'str',
3879 '*mode': 'uint16' } }
3880
3881 ##
3882 # @NetdevDumpOptions:
3883 #
3884 # Dump VLAN network traffic to a file.
3885 #
3886 # @len: per-packet size limit (64k default). Understands [TGMKkb]
3887 # suffixes.
3888 #
3889 # @file: dump file path (default is qemu-vlan0.pcap)
3890 #
3891 # Since: 1.2
3892 ##
3893 { 'struct': 'NetdevDumpOptions',
3894 'data': {
3895 '*len': 'size',
3896 '*file': 'str' } }
3897
3898 ##
3899 # @NetdevBridgeOptions:
3900 #
3901 # Connect a host TAP network interface to a host bridge device.
3902 #
3903 # @br: bridge name
3904 #
3905 # @helper: command to execute to configure bridge
3906 #
3907 # Since: 1.2
3908 ##
3909 { 'struct': 'NetdevBridgeOptions',
3910 'data': {
3911 '*br': 'str',
3912 '*helper': 'str' } }
3913
3914 ##
3915 # @NetdevHubPortOptions:
3916 #
3917 # Connect two or more net clients through a software hub.
3918 #
3919 # @hubid: hub identifier number
3920 #
3921 # Since: 1.2
3922 ##
3923 { 'struct': 'NetdevHubPortOptions',
3924 'data': {
3925 'hubid': 'int32' } }
3926
3927 ##
3928 # @NetdevNetmapOptions:
3929 #
3930 # Connect a client to a netmap-enabled NIC or to a VALE switch port
3931 #
3932 # @ifname: Either the name of an existing network interface supported by
3933 # netmap, or the name of a VALE port (created on the fly).
3934 # A VALE port name is in the form 'valeXXX:YYY', where XXX and
3935 # YYY are non-negative integers. XXX identifies a switch and
3936 # YYY identifies a port of the switch. VALE ports having the
3937 # same XXX are therefore connected to the same switch.
3938 #
3939 # @devname: path of the netmap device (default: '/dev/netmap').
3940 #
3941 # Since: 2.0
3942 ##
3943 { 'struct': 'NetdevNetmapOptions',
3944 'data': {
3945 'ifname': 'str',
3946 '*devname': 'str' } }
3947
3948 ##
3949 # @NetdevVhostUserOptions:
3950 #
3951 # Vhost-user network backend
3952 #
3953 # @chardev: name of a unix socket chardev
3954 #
3955 # @vhostforce: vhost on for non-MSIX virtio guests (default: false).
3956 #
3957 # @queues: number of queues to be created for multiqueue vhost-user
3958 # (default: 1) (Since 2.5)
3959 #
3960 # Since: 2.1
3961 ##
3962 { 'struct': 'NetdevVhostUserOptions',
3963 'data': {
3964 'chardev': 'str',
3965 '*vhostforce': 'bool',
3966 '*queues': 'int' } }
3967
3968 ##
3969 # @NetClientDriver:
3970 #
3971 # Available netdev drivers.
3972 #
3973 # Since: 2.7
3974 ##
3975 { 'enum': 'NetClientDriver',
3976 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
3977 'bridge', 'hubport', 'netmap', 'vhost-user' ] }
3978
3979 ##
3980 # @Netdev:
3981 #
3982 # Captures the configuration of a network device.
3983 #
3984 # @id: identifier for monitor commands.
3985 #
3986 # @type: Specify the driver used for interpreting remaining arguments.
3987 #
3988 # Since: 1.2
3989 #
3990 # 'l2tpv3' - since 2.1
3991 ##
3992 { 'union': 'Netdev',
3993 'base': { 'id': 'str', 'type': 'NetClientDriver' },
3994 'discriminator': 'type',
3995 'data': {
3996 'none': 'NetdevNoneOptions',
3997 'nic': 'NetLegacyNicOptions',
3998 'user': 'NetdevUserOptions',
3999 'tap': 'NetdevTapOptions',
4000 'l2tpv3': 'NetdevL2TPv3Options',
4001 'socket': 'NetdevSocketOptions',
4002 'vde': 'NetdevVdeOptions',
4003 'dump': 'NetdevDumpOptions',
4004 'bridge': 'NetdevBridgeOptions',
4005 'hubport': 'NetdevHubPortOptions',
4006 'netmap': 'NetdevNetmapOptions',
4007 'vhost-user': 'NetdevVhostUserOptions' } }
4008
4009 ##
4010 # @NetLegacy:
4011 #
4012 # Captures the configuration of a network device; legacy.
4013 #
4014 # @vlan: vlan number
4015 #
4016 # @id: identifier for monitor commands
4017 #
4018 # @name: identifier for monitor commands, ignored if @id is present
4019 #
4020 # @opts: device type specific properties (legacy)
4021 #
4022 # Since: 1.2
4023 ##
4024 { 'struct': 'NetLegacy',
4025 'data': {
4026 '*vlan': 'int32',
4027 '*id': 'str',
4028 '*name': 'str',
4029 'opts': 'NetLegacyOptions' } }
4030
4031 ##
4032 # @NetLegacyOptionsType:
4033 #
4034 # Since: 1.2
4035 ##
4036 { 'enum': 'NetLegacyOptionsType',
4037 'data': ['none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',
4038 'dump', 'bridge', 'netmap', 'vhost-user'] }
4039
4040 ##
4041 # @NetLegacyOptions:
4042 #
4043 # Like Netdev, but for use only by the legacy command line options
4044 #
4045 # Since: 1.2
4046 ##
4047 { 'union': 'NetLegacyOptions',
4048 'base': { 'type': 'NetLegacyOptionsType' },
4049 'discriminator': 'type',
4050 'data': {
4051 'none': 'NetdevNoneOptions',
4052 'nic': 'NetLegacyNicOptions',
4053 'user': 'NetdevUserOptions',
4054 'tap': 'NetdevTapOptions',
4055 'l2tpv3': 'NetdevL2TPv3Options',
4056 'socket': 'NetdevSocketOptions',
4057 'vde': 'NetdevVdeOptions',
4058 'dump': 'NetdevDumpOptions',
4059 'bridge': 'NetdevBridgeOptions',
4060 'netmap': 'NetdevNetmapOptions',
4061 'vhost-user': 'NetdevVhostUserOptions' } }
4062
4063 ##
4064 # @NetFilterDirection:
4065 #
4066 # Indicates whether a netfilter is attached to a netdev's transmit queue or
4067 # receive queue or both.
4068 #
4069 # @all: the filter is attached both to the receive and the transmit
4070 # queue of the netdev (default).
4071 #
4072 # @rx: the filter is attached to the receive queue of the netdev,
4073 # where it will receive packets sent to the netdev.
4074 #
4075 # @tx: the filter is attached to the transmit queue of the netdev,
4076 # where it will receive packets sent by the netdev.
4077 #
4078 # Since: 2.5
4079 ##
4080 { 'enum': 'NetFilterDirection',
4081 'data': [ 'all', 'rx', 'tx' ] }
4082
4083 ##
4084 # @InetSocketAddressBase:
4085 #
4086 # @host: host part of the address
4087 # @port: port part of the address
4088 ##
4089 { 'struct': 'InetSocketAddressBase',
4090 'data': {
4091 'host': 'str',
4092 'port': 'str' } }
4093
4094 ##
4095 # @InetSocketAddress:
4096 #
4097 # Captures a socket address or address range in the Internet namespace.
4098 #
4099 # @numeric: true if the host/port are guaranteed to be numeric,
4100 # false if name resolution should be attempted. Defaults to false.
4101 # (Since 2.9)
4102 #
4103 # @to: If present, this is range of possible addresses, with port
4104 # between @port and @to.
4105 #
4106 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
4107 #
4108 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
4109 #
4110 # Since: 1.3
4111 ##
4112 { 'struct': 'InetSocketAddress',
4113 'base': 'InetSocketAddressBase',
4114 'data': {
4115 '*numeric': 'bool',
4116 '*to': 'uint16',
4117 '*ipv4': 'bool',
4118 '*ipv6': 'bool' } }
4119
4120 ##
4121 # @UnixSocketAddress:
4122 #
4123 # Captures a socket address in the local ("Unix socket") namespace.
4124 #
4125 # @path: filesystem path to use
4126 #
4127 # Since: 1.3
4128 ##
4129 { 'struct': 'UnixSocketAddress',
4130 'data': {
4131 'path': 'str' } }
4132
4133 ##
4134 # @VsockSocketAddress:
4135 #
4136 # Captures a socket address in the vsock namespace.
4137 #
4138 # @cid: unique host identifier
4139 # @port: port
4140 #
4141 # Note: string types are used to allow for possible future hostname or
4142 # service resolution support.
4143 #
4144 # Since: 2.8
4145 ##
4146 { 'struct': 'VsockSocketAddress',
4147 'data': {
4148 'cid': 'str',
4149 'port': 'str' } }
4150
4151 ##
4152 # @SocketAddressLegacy:
4153 #
4154 # Captures the address of a socket, which could also be a named file descriptor
4155 #
4156 # Note: This type is deprecated in favor of SocketAddress. The
4157 # difference between SocketAddressLegacy and SocketAddress is that the
4158 # latter is a flat union rather than a simple union. Flat is nicer
4159 # because it avoids nesting on the wire, i.e. that form has fewer {}.
4160
4161 #
4162 # Since: 1.3
4163 ##
4164 { 'union': 'SocketAddressLegacy',
4165 'data': {
4166 'inet': 'InetSocketAddress',
4167 'unix': 'UnixSocketAddress',
4168 'vsock': 'VsockSocketAddress',
4169 'fd': 'String' } }
4170
4171 ##
4172 # @SocketAddressType:
4173 #
4174 # Available SocketAddress types
4175 #
4176 # @inet: Internet address
4177 #
4178 # @unix: Unix domain socket
4179 #
4180 # Since: 2.9
4181 ##
4182 { 'enum': 'SocketAddressType',
4183 'data': [ 'inet', 'unix', 'vsock', 'fd' ] }
4184
4185 ##
4186 # @SocketAddress:
4187 #
4188 # Captures the address of a socket, which could also be a named file
4189 # descriptor
4190 #
4191 # @type: Transport type
4192 #
4193 # Since: 2.9
4194 ##
4195 { 'union': 'SocketAddress',
4196 'base': { 'type': 'SocketAddressType' },
4197 'discriminator': 'type',
4198 'data': { 'inet': 'InetSocketAddress',
4199 'unix': 'UnixSocketAddress',
4200 'vsock': 'VsockSocketAddress',
4201 'fd': 'String' } }
4202
4203 ##
4204 # @getfd:
4205 #
4206 # Receive a file descriptor via SCM rights and assign it a name
4207 #
4208 # @fdname: file descriptor name
4209 #
4210 # Returns: Nothing on success
4211 #
4212 # Since: 0.14.0
4213 #
4214 # Notes: If @fdname already exists, the file descriptor assigned to
4215 # it will be closed and replaced by the received file
4216 # descriptor.
4217 #
4218 # The 'closefd' command can be used to explicitly close the
4219 # file descriptor when it is no longer needed.
4220 #
4221 # Example:
4222 #
4223 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
4224 # <- { "return": {} }
4225 #
4226 ##
4227 { 'command': 'getfd', 'data': {'fdname': 'str'} }
4228
4229 ##
4230 # @closefd:
4231 #
4232 # Close a file descriptor previously passed via SCM rights
4233 #
4234 # @fdname: file descriptor name
4235 #
4236 # Returns: Nothing on success
4237 #
4238 # Since: 0.14.0
4239 #
4240 # Example:
4241 #
4242 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
4243 # <- { "return": {} }
4244 #
4245 ##
4246 { 'command': 'closefd', 'data': {'fdname': 'str'} }
4247
4248 ##
4249 # @MachineInfo:
4250 #
4251 # Information describing a machine.
4252 #
4253 # @name: the name of the machine
4254 #
4255 # @alias: an alias for the machine name
4256 #
4257 # @is-default: whether the machine is default
4258 #
4259 # @cpu-max: maximum number of CPUs supported by the machine type
4260 # (since 1.5.0)
4261 #
4262 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
4263 #
4264 # Since: 1.2.0
4265 ##
4266 { 'struct': 'MachineInfo',
4267 'data': { 'name': 'str', '*alias': 'str',
4268 '*is-default': 'bool', 'cpu-max': 'int',
4269 'hotpluggable-cpus': 'bool'} }
4270
4271 ##
4272 # @query-machines:
4273 #
4274 # Return a list of supported machines
4275 #
4276 # Returns: a list of MachineInfo
4277 #
4278 # Since: 1.2.0
4279 ##
4280 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
4281
4282 ##
4283 # @CpuDefinitionInfo:
4284 #
4285 # Virtual CPU definition.
4286 #
4287 # @name: the name of the CPU definition
4288 #
4289 # @migration-safe: whether a CPU definition can be safely used for
4290 # migration in combination with a QEMU compatibility machine
4291 # when migrating between different QMU versions and between
4292 # hosts with different sets of (hardware or software)
4293 # capabilities. If not provided, information is not available
4294 # and callers should not assume the CPU definition to be
4295 # migration-safe. (since 2.8)
4296 #
4297 # @static: whether a CPU definition is static and will not change depending on
4298 # QEMU version, machine type, machine options and accelerator options.
4299 # A static model is always migration-safe. (since 2.8)
4300 #
4301 # @unavailable-features: List of properties that prevent
4302 # the CPU model from running in the current
4303 # host. (since 2.8)
4304 # @typename: Type name that can be used as argument to @device-list-properties,
4305 # to introspect properties configurable using -cpu or -global.
4306 # (since 2.9)
4307 #
4308 # @unavailable-features is a list of QOM property names that
4309 # represent CPU model attributes that prevent the CPU from running.
4310 # If the QOM property is read-only, that means there's no known
4311 # way to make the CPU model run in the current host. Implementations
4312 # that choose not to provide specific information return the
4313 # property name "type".
4314 # If the property is read-write, it means that it MAY be possible
4315 # to run the CPU model in the current host if that property is
4316 # changed. Management software can use it as hints to suggest or
4317 # choose an alternative for the user, or just to generate meaningful
4318 # error messages explaining why the CPU model can't be used.
4319 # If @unavailable-features is an empty list, the CPU model is
4320 # runnable using the current host and machine-type.
4321 # If @unavailable-features is not present, runnability
4322 # information for the CPU is not available.
4323 #
4324 # Since: 1.2.0
4325 ##
4326 { 'struct': 'CpuDefinitionInfo',
4327 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
4328 '*unavailable-features': [ 'str' ], 'typename': 'str' } }
4329
4330 ##
4331 # @query-cpu-definitions:
4332 #
4333 # Return a list of supported virtual CPU definitions
4334 #
4335 # Returns: a list of CpuDefInfo
4336 #
4337 # Since: 1.2.0
4338 ##
4339 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
4340
4341 ##
4342 # @CpuModelInfo:
4343 #
4344 # Virtual CPU model.
4345 #
4346 # A CPU model consists of the name of a CPU definition, to which
4347 # delta changes are applied (e.g. features added/removed). Most magic values
4348 # that an architecture might require should be hidden behind the name.
4349 # However, if required, architectures can expose relevant properties.
4350 #
4351 # @name: the name of the CPU definition the model is based on
4352 # @props: a dictionary of QOM properties to be applied
4353 #
4354 # Since: 2.8.0
4355 ##
4356 { 'struct': 'CpuModelInfo',
4357 'data': { 'name': 'str',
4358 '*props': 'any' } }
4359
4360 ##
4361 # @CpuModelExpansionType:
4362 #
4363 # An enumeration of CPU model expansion types.
4364 #
4365 # @static: Expand to a static CPU model, a combination of a static base
4366 # model name and property delta changes. As the static base model will
4367 # never change, the expanded CPU model will be the same, independant of
4368 # independent of QEMU version, machine type, machine options, and
4369 # accelerator options. Therefore, the resulting model can be used by
4370 # tooling without having to specify a compatibility machine - e.g. when
4371 # displaying the "host" model. static CPU models are migration-safe.
4372 #
4373 # @full: Expand all properties. The produced model is not guaranteed to be
4374 # migration-safe, but allows tooling to get an insight and work with
4375 # model details.
4376 #
4377 # Note: When a non-migration-safe CPU model is expanded in static mode, some
4378 # features enabled by the CPU model may be omitted, because they can't be
4379 # implemented by a static CPU model definition (e.g. cache info passthrough and
4380 # PMU passthrough in x86). If you need an accurate representation of the
4381 # features enabled by a non-migration-safe CPU model, use @full. If you need a
4382 # static representation that will keep ABI compatibility even when changing QEMU
4383 # version or machine-type, use @static (but keep in mind that some features may
4384 # be omitted).
4385 #
4386 # Since: 2.8.0
4387 ##
4388 { 'enum': 'CpuModelExpansionType',
4389 'data': [ 'static', 'full' ] }
4390
4391
4392 ##
4393 # @CpuModelExpansionInfo:
4394 #
4395 # The result of a cpu model expansion.
4396 #
4397 # @model: the expanded CpuModelInfo.
4398 #
4399 # Since: 2.8.0
4400 ##
4401 { 'struct': 'CpuModelExpansionInfo',
4402 'data': { 'model': 'CpuModelInfo' } }
4403
4404
4405 ##
4406 # @query-cpu-model-expansion:
4407 #
4408 # Expands a given CPU model (or a combination of CPU model + additional options)
4409 # to different granularities, allowing tooling to get an understanding what a
4410 # specific CPU model looks like in QEMU under a certain configuration.
4411 #
4412 # This interface can be used to query the "host" CPU model.
4413 #
4414 # The data returned by this command may be affected by:
4415 #
4416 # * QEMU version: CPU models may look different depending on the QEMU version.
4417 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4418 # * machine-type: CPU model may look different depending on the machine-type.
4419 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4420 # * machine options (including accelerator): in some architectures, CPU models
4421 # may look different depending on machine and accelerator options. (Except for
4422 # CPU models reported as "static" in query-cpu-definitions.)
4423 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4424 # global properties may affect expansion of CPU models. Using
4425 # query-cpu-model-expansion while using these is not advised.
4426 #
4427 # Some architectures may not support all expansion types. s390x supports
4428 # "full" and "static".
4429 #
4430 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
4431 # not supported, if the model cannot be expanded, if the model contains
4432 # an unknown CPU definition name, unknown properties or properties
4433 # with a wrong type. Also returns an error if an expansion type is
4434 # not supported.
4435 #
4436 # Since: 2.8.0
4437 ##
4438 { 'command': 'query-cpu-model-expansion',
4439 'data': { 'type': 'CpuModelExpansionType',
4440 'model': 'CpuModelInfo' },
4441 'returns': 'CpuModelExpansionInfo' }
4442
4443 ##
4444 # @CpuModelCompareResult:
4445 #
4446 # An enumeration of CPU model comparation results. The result is usually
4447 # calculated using e.g. CPU features or CPU generations.
4448 #
4449 # @incompatible: If model A is incompatible to model B, model A is not
4450 # guaranteed to run where model B runs and the other way around.
4451 #
4452 # @identical: If model A is identical to model B, model A is guaranteed to run
4453 # where model B runs and the other way around.
4454 #
4455 # @superset: If model A is a superset of model B, model B is guaranteed to run
4456 # where model A runs. There are no guarantees about the other way.
4457 #
4458 # @subset: If model A is a subset of model B, model A is guaranteed to run
4459 # where model B runs. There are no guarantees about the other way.
4460 #
4461 # Since: 2.8.0
4462 ##
4463 { 'enum': 'CpuModelCompareResult',
4464 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
4465
4466 ##
4467 # @CpuModelCompareInfo:
4468 #
4469 # The result of a CPU model comparison.
4470 #
4471 # @result: The result of the compare operation.
4472 # @responsible-properties: List of properties that led to the comparison result
4473 # not being identical.
4474 #
4475 # @responsible-properties is a list of QOM property names that led to
4476 # both CPUs not being detected as identical. For identical models, this
4477 # list is empty.
4478 # If a QOM property is read-only, that means there's no known way to make the
4479 # CPU models identical. If the special property name "type" is included, the
4480 # models are by definition not identical and cannot be made identical.
4481 #
4482 # Since: 2.8.0
4483 ##
4484 { 'struct': 'CpuModelCompareInfo',
4485 'data': {'result': 'CpuModelCompareResult',
4486 'responsible-properties': ['str']
4487 }
4488 }
4489
4490 ##
4491 # @query-cpu-model-comparison:
4492 #
4493 # Compares two CPU models, returning how they compare in a specific
4494 # configuration. The results indicates how both models compare regarding
4495 # runnability. This result can be used by tooling to make decisions if a
4496 # certain CPU model will run in a certain configuration or if a compatible
4497 # CPU model has to be created by baselining.
4498 #
4499 # Usually, a CPU model is compared against the maximum possible CPU model
4500 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
4501 # model is identical or a subset, it will run in that configuration.
4502 #
4503 # The result returned by this command may be affected by:
4504 #
4505 # * QEMU version: CPU models may look different depending on the QEMU version.
4506 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4507 # * machine-type: CPU model may look different depending on the machine-type.
4508 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4509 # * machine options (including accelerator): in some architectures, CPU models
4510 # may look different depending on machine and accelerator options. (Except for
4511 # CPU models reported as "static" in query-cpu-definitions.)
4512 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4513 # global properties may affect expansion of CPU models. Using
4514 # query-cpu-model-expansion while using these is not advised.
4515 #
4516 # Some architectures may not support comparing CPU models. s390x supports
4517 # comparing CPU models.
4518 #
4519 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
4520 # not supported, if a model cannot be used, if a model contains
4521 # an unknown cpu definition name, unknown properties or properties
4522 # with wrong types.
4523 #
4524 # Since: 2.8.0
4525 ##
4526 { 'command': 'query-cpu-model-comparison',
4527 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
4528 'returns': 'CpuModelCompareInfo' }
4529
4530 ##
4531 # @CpuModelBaselineInfo:
4532 #
4533 # The result of a CPU model baseline.
4534 #
4535 # @model: the baselined CpuModelInfo.
4536 #
4537 # Since: 2.8.0
4538 ##
4539 { 'struct': 'CpuModelBaselineInfo',
4540 'data': { 'model': 'CpuModelInfo' } }
4541
4542 ##
4543 # @query-cpu-model-baseline:
4544 #
4545 # Baseline two CPU models, creating a compatible third model. The created
4546 # model will always be a static, migration-safe CPU model (see "static"
4547 # CPU model expansion for details).
4548 #
4549 # This interface can be used by tooling to create a compatible CPU model out
4550 # two CPU models. The created CPU model will be identical to or a subset of
4551 # both CPU models when comparing them. Therefore, the created CPU model is
4552 # guaranteed to run where the given CPU models run.
4553 #
4554 # The result returned by this command may be affected by:
4555 #
4556 # * QEMU version: CPU models may look different depending on the QEMU version.
4557 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4558 # * machine-type: CPU model may look different depending on the machine-type.
4559 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4560 # * machine options (including accelerator): in some architectures, CPU models
4561 # may look different depending on machine and accelerator options. (Except for
4562 # CPU models reported as "static" in query-cpu-definitions.)
4563 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4564 # global properties may affect expansion of CPU models. Using
4565 # query-cpu-model-expansion while using these is not advised.
4566 #
4567 # Some architectures may not support baselining CPU models. s390x supports
4568 # baselining CPU models.
4569 #
4570 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
4571 # not supported, if a model cannot be used, if a model contains
4572 # an unknown cpu definition name, unknown properties or properties
4573 # with wrong types.
4574 #
4575 # Since: 2.8.0
4576 ##
4577 { 'command': 'query-cpu-model-baseline',
4578 'data': { 'modela': 'CpuModelInfo',
4579 'modelb': 'CpuModelInfo' },
4580 'returns': 'CpuModelBaselineInfo' }
4581
4582 ##
4583 # @AddfdInfo:
4584 #
4585 # Information about a file descriptor that was added to an fd set.
4586 #
4587 # @fdset-id: The ID of the fd set that @fd was added to.
4588 #
4589 # @fd: The file descriptor that was received via SCM rights and
4590 # added to the fd set.
4591 #
4592 # Since: 1.2.0
4593 ##
4594 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
4595
4596 ##
4597 # @add-fd:
4598 #
4599 # Add a file descriptor, that was passed via SCM rights, to an fd set.
4600 #
4601 # @fdset-id: The ID of the fd set to add the file descriptor to.
4602 #
4603 # @opaque: A free-form string that can be used to describe the fd.
4604 #
4605 # Returns: @AddfdInfo on success
4606 #
4607 # If file descriptor was not received, FdNotSupplied
4608 #
4609 # If @fdset-id is a negative value, InvalidParameterValue
4610 #
4611 # Notes: The list of fd sets is shared by all monitor connections.
4612 #
4613 # If @fdset-id is not specified, a new fd set will be created.
4614 #
4615 # Since: 1.2.0
4616 #
4617 # Example:
4618 #
4619 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
4620 # <- { "return": { "fdset-id": 1, "fd": 3 } }
4621 #
4622 ##
4623 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
4624 'returns': 'AddfdInfo' }
4625
4626 ##
4627 # @remove-fd:
4628 #
4629 # Remove a file descriptor from an fd set.
4630 #
4631 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
4632 #
4633 # @fd: The file descriptor that is to be removed.
4634 #
4635 # Returns: Nothing on success
4636 # If @fdset-id or @fd is not found, FdNotFound
4637 #
4638 # Since: 1.2.0
4639 #
4640 # Notes: The list of fd sets is shared by all monitor connections.
4641 #
4642 # If @fd is not specified, all file descriptors in @fdset-id
4643 # will be removed.
4644 #
4645 # Example:
4646 #
4647 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
4648 # <- { "return": {} }
4649 #
4650 ##
4651 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
4652
4653 ##
4654 # @FdsetFdInfo:
4655 #
4656 # Information about a file descriptor that belongs to an fd set.
4657 #
4658 # @fd: The file descriptor value.
4659 #
4660 # @opaque: A free-form string that can be used to describe the fd.
4661 #
4662 # Since: 1.2.0
4663 ##
4664 { 'struct': 'FdsetFdInfo',
4665 'data': {'fd': 'int', '*opaque': 'str'} }
4666
4667 ##
4668 # @FdsetInfo:
4669 #
4670 # Information about an fd set.
4671 #
4672 # @fdset-id: The ID of the fd set.
4673 #
4674 # @fds: A list of file descriptors that belong to this fd set.
4675 #
4676 # Since: 1.2.0
4677 ##
4678 { 'struct': 'FdsetInfo',
4679 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
4680
4681 ##
4682 # @query-fdsets:
4683 #
4684 # Return information describing all fd sets.
4685 #
4686 # Returns: A list of @FdsetInfo
4687 #
4688 # Since: 1.2.0
4689 #
4690 # Note: The list of fd sets is shared by all monitor connections.
4691 #
4692 # Example:
4693 #
4694 # -> { "execute": "query-fdsets" }
4695 # <- { "return": [
4696 # {
4697 # "fds": [
4698 # {
4699 # "fd": 30,
4700 # "opaque": "rdonly:/path/to/file"
4701 # },
4702 # {
4703 # "fd": 24,
4704 # "opaque": "rdwr:/path/to/file"
4705 # }
4706 # ],
4707 # "fdset-id": 1
4708 # },
4709 # {
4710 # "fds": [
4711 # {
4712 # "fd": 28
4713 # },
4714 # {
4715 # "fd": 29
4716 # }
4717 # ],
4718 # "fdset-id": 0
4719 # }
4720 # ]
4721 # }
4722 #
4723 ##
4724 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
4725
4726 ##
4727 # @TargetInfo:
4728 #
4729 # Information describing the QEMU target.
4730 #
4731 # @arch: the target architecture (eg "x86_64", "i386", etc)
4732 #
4733 # Since: 1.2.0
4734 ##
4735 { 'struct': 'TargetInfo',
4736 'data': { 'arch': 'str' } }
4737
4738 ##
4739 # @query-target:
4740 #
4741 # Return information about the target for this QEMU
4742 #
4743 # Returns: TargetInfo
4744 #
4745 # Since: 1.2.0
4746 ##
4747 { 'command': 'query-target', 'returns': 'TargetInfo' }
4748
4749 ##
4750 # @QKeyCode:
4751 #
4752 # An enumeration of key name.
4753 #
4754 # This is used by the @send-key command.
4755 #
4756 # @unmapped: since 2.0
4757 # @pause: since 2.0
4758 # @ro: since 2.4
4759 # @kp_comma: since 2.4
4760 # @kp_equals: since 2.6
4761 # @power: since 2.6
4762 # @hiragana: since 2.9
4763 # @henkan: since 2.9
4764 # @yen: since 2.9
4765 #
4766 # Since: 1.3.0
4767 #
4768 ##
4769 { 'enum': 'QKeyCode',
4770 'data': [ 'unmapped',
4771 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
4772 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
4773 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
4774 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
4775 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
4776 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
4777 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
4778 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
4779 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
4780 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
4781 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
4782 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
4783 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
4784 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
4785 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
4786 'ro', 'hiragana', 'henkan', 'yen',
4787 'kp_comma', 'kp_equals', 'power' ] }
4788
4789 ##
4790 # @KeyValue:
4791 #
4792 # Represents a keyboard key.
4793 #
4794 # Since: 1.3.0
4795 ##
4796 { 'union': 'KeyValue',
4797 'data': {
4798 'number': 'int',
4799 'qcode': 'QKeyCode' } }
4800
4801 ##
4802 # @send-key:
4803 #
4804 # Send keys to guest.
4805 #
4806 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
4807 # simultaneously sent to the guest. A @KeyValue.number value is sent
4808 # directly to the guest, while @KeyValue.qcode must be a valid
4809 # @QKeyCode value
4810 #
4811 # @hold-time: time to delay key up events, milliseconds. Defaults
4812 # to 100
4813 #
4814 # Returns: Nothing on success
4815 # If key is unknown or redundant, InvalidParameter
4816 #
4817 # Since: 1.3.0
4818 #
4819 # Example:
4820 #
4821 # -> { "execute": "send-key",
4822 # "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
4823 # { "type": "qcode", "data": "alt" },
4824 # { "type": "qcode", "data": "delete" } ] } }
4825 # <- { "return": {} }
4826 #
4827 ##
4828 { 'command': 'send-key',
4829 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
4830
4831 ##
4832 # @screendump:
4833 #
4834 # Write a PPM of the VGA screen to a file.
4835 #
4836 # @filename: the path of a new PPM file to store the image
4837 #
4838 # Returns: Nothing on success
4839 #
4840 # Since: 0.14.0
4841 #
4842 # Example:
4843 #
4844 # -> { "execute": "screendump",
4845 # "arguments": { "filename": "/tmp/image" } }
4846 # <- { "return": {} }
4847 #
4848 ##
4849 { 'command': 'screendump', 'data': {'filename': 'str'} }
4850
4851
4852 ##
4853 # @ChardevCommon:
4854 #
4855 # Configuration shared across all chardev backends
4856 #
4857 # @logfile: The name of a logfile to save output
4858 # @logappend: true to append instead of truncate
4859 # (default to false to truncate)
4860 #
4861 # Since: 2.6
4862 ##
4863 { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
4864 '*logappend': 'bool' } }
4865
4866 ##
4867 # @ChardevFile:
4868 #
4869 # Configuration info for file chardevs.
4870 #
4871 # @in: The name of the input file
4872 # @out: The name of the output file
4873 # @append: Open the file in append mode (default false to
4874 # truncate) (Since 2.6)
4875 #
4876 # Since: 1.4
4877 ##
4878 { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
4879 'out' : 'str',
4880 '*append': 'bool' },
4881 'base': 'ChardevCommon' }
4882
4883 ##
4884 # @ChardevHostdev:
4885 #
4886 # Configuration info for device and pipe chardevs.
4887 #
4888 # @device: The name of the special file for the device,
4889 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
4890 #
4891 # Since: 1.4
4892 ##
4893 { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
4894 'base': 'ChardevCommon' }
4895
4896 ##
4897 # @ChardevSocket:
4898 #
4899 # Configuration info for (stream) socket chardevs.
4900 #
4901 # @addr: socket address to listen on (server=true)
4902 # or connect to (server=false)
4903 # @tls-creds: the ID of the TLS credentials object (since 2.6)
4904 # @server: create server socket (default: true)
4905 # @wait: wait for incoming connection on server
4906 # sockets (default: false).
4907 # @nodelay: set TCP_NODELAY socket option (default: false)
4908 # @telnet: enable telnet protocol on server
4909 # sockets (default: false)
4910 # @tn3270: enable tn3270 protocol on server
4911 # sockets (default: false) (Since: 2.10)
4912 # @reconnect: For a client socket, if a socket is disconnected,
4913 # then attempt a reconnect after the given number of seconds.
4914 # Setting this to zero disables this function. (default: 0)
4915 # (Since: 2.2)
4916 #
4917 # Since: 1.4
4918 ##
4919 { 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddressLegacy',
4920 '*tls-creds' : 'str',
4921 '*server' : 'bool',
4922 '*wait' : 'bool',
4923 '*nodelay' : 'bool',
4924 '*telnet' : 'bool',
4925 '*tn3270' : 'bool',
4926 '*reconnect' : 'int' },
4927 'base': 'ChardevCommon' }
4928
4929 ##
4930 # @ChardevUdp:
4931 #
4932 # Configuration info for datagram socket chardevs.
4933 #
4934 # @remote: remote address
4935 # @local: local address
4936 #
4937 # Since: 1.5
4938 ##
4939 { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddressLegacy',
4940 '*local' : 'SocketAddressLegacy' },
4941 'base': 'ChardevCommon' }
4942
4943 ##
4944 # @ChardevMux:
4945 #
4946 # Configuration info for mux chardevs.
4947 #
4948 # @chardev: name of the base chardev.
4949 #
4950 # Since: 1.5
4951 ##
4952 { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
4953 'base': 'ChardevCommon' }
4954
4955 ##
4956 # @ChardevStdio:
4957 #
4958 # Configuration info for stdio chardevs.
4959 #
4960 # @signal: Allow signals (such as SIGINT triggered by ^C)
4961 # be delivered to qemu. Default: true in -nographic mode,
4962 # false otherwise.
4963 #
4964 # Since: 1.5
4965 ##
4966 { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
4967 'base': 'ChardevCommon' }
4968
4969
4970 ##
4971 # @ChardevSpiceChannel:
4972 #
4973 # Configuration info for spice vm channel chardevs.
4974 #
4975 # @type: kind of channel (for example vdagent).
4976 #
4977 # Since: 1.5
4978 ##
4979 { 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' },
4980 'base': 'ChardevCommon' }
4981
4982 ##
4983 # @ChardevSpicePort:
4984 #
4985 # Configuration info for spice port chardevs.
4986 #
4987 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
4988 #
4989 # Since: 1.5
4990 ##
4991 { 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' },
4992 'base': 'ChardevCommon' }
4993
4994 ##
4995 # @ChardevVC:
4996 #
4997 # Configuration info for virtual console chardevs.
4998 #
4999 # @width: console width, in pixels
5000 # @height: console height, in pixels
5001 # @cols: console width, in chars
5002 # @rows: console height, in chars
5003 #
5004 # Since: 1.5
5005 ##
5006 { 'struct': 'ChardevVC', 'data': { '*width' : 'int',
5007 '*height' : 'int',
5008 '*cols' : 'int',
5009 '*rows' : 'int' },
5010 'base': 'ChardevCommon' }
5011
5012 ##
5013 # @ChardevRingbuf:
5014 #
5015 # Configuration info for ring buffer chardevs.
5016 #
5017 # @size: ring buffer size, must be power of two, default is 65536
5018 #
5019 # Since: 1.5
5020 ##
5021 { 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' },
5022 'base': 'ChardevCommon' }
5023
5024 ##
5025 # @ChardevBackend:
5026 #
5027 # Configuration info for the new chardev backend.
5028 #
5029 # Since: 1.4 (testdev since 2.2, wctablet since 2.9)
5030 ##
5031 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
5032 'serial' : 'ChardevHostdev',
5033 'parallel': 'ChardevHostdev',
5034 'pipe' : 'ChardevHostdev',
5035 'socket' : 'ChardevSocket',
5036 'udp' : 'ChardevUdp',
5037 'pty' : 'ChardevCommon',
5038 'null' : 'ChardevCommon',
5039 'mux' : 'ChardevMux',
5040 'msmouse': 'ChardevCommon',
5041 'wctablet' : 'ChardevCommon',
5042 'braille': 'ChardevCommon',
5043 'testdev': 'ChardevCommon',
5044 'stdio' : 'ChardevStdio',
5045 'console': 'ChardevCommon',
5046 'spicevmc' : 'ChardevSpiceChannel',
5047 'spiceport' : 'ChardevSpicePort',
5048 'vc' : 'ChardevVC',
5049 'ringbuf': 'ChardevRingbuf',
5050 # next one is just for compatibility
5051 'memory' : 'ChardevRingbuf' } }
5052
5053 ##
5054 # @ChardevReturn:
5055 #
5056 # Return info about the chardev backend just created.
5057 #
5058 # @pty: name of the slave pseudoterminal device, present if
5059 # and only if a chardev of type 'pty' was created
5060 #
5061 # Since: 1.4
5062 ##
5063 { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
5064
5065 ##
5066 # @chardev-add:
5067 #
5068 # Add a character device backend
5069 #
5070 # @id: the chardev's ID, must be unique
5071 # @backend: backend type and parameters
5072 #
5073 # Returns: ChardevReturn.
5074 #
5075 # Since: 1.4
5076 #
5077 # Example:
5078 #
5079 # -> { "execute" : "chardev-add",
5080 # "arguments" : { "id" : "foo",
5081 # "backend" : { "type" : "null", "data" : {} } } }
5082 # <- { "return": {} }
5083 #
5084 # -> { "execute" : "chardev-add",
5085 # "arguments" : { "id" : "bar",
5086 # "backend" : { "type" : "file",
5087 # "data" : { "out" : "/tmp/bar.log" } } } }
5088 # <- { "return": {} }
5089 #
5090 # -> { "execute" : "chardev-add",
5091 # "arguments" : { "id" : "baz",
5092 # "backend" : { "type" : "pty", "data" : {} } } }
5093 # <- { "return": { "pty" : "/dev/pty/42" } }
5094 #
5095 ##
5096 { 'command': 'chardev-add', 'data': {'id' : 'str',
5097 'backend' : 'ChardevBackend' },
5098 'returns': 'ChardevReturn' }
5099
5100 ##
5101 # @chardev-remove:
5102 #
5103 # Remove a character device backend
5104 #
5105 # @id: the chardev's ID, must exist and not be in use
5106 #
5107 # Returns: Nothing on success
5108 #
5109 # Since: 1.4
5110 #
5111 # Example:
5112 #
5113 # -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
5114 # <- { "return": {} }
5115 #
5116 ##
5117 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
5118
5119 ##
5120 # @chardev-send-break:
5121 #
5122 # Send a break to a character device
5123 #
5124 # @id: the chardev's ID, must exist
5125 #
5126 # Returns: Nothing on success
5127 #
5128 # Since: 2.10
5129 #
5130 # Example:
5131 #
5132 # -> { "execute": "chardev-send-break", "arguments": { "id" : "foo" } }
5133 # <- { "return": {} }
5134 #
5135 ##
5136 { 'command': 'chardev-send-break', 'data': {'id': 'str'} }
5137
5138
5139 ##
5140 # @TpmModel:
5141 #
5142 # An enumeration of TPM models
5143 #
5144 # @tpm-tis: TPM TIS model
5145 #
5146 # Since: 1.5
5147 ##
5148 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
5149
5150 ##
5151 # @query-tpm-models:
5152 #
5153 # Return a list of supported TPM models
5154 #
5155 # Returns: a list of TpmModel
5156 #
5157 # Since: 1.5
5158 #
5159 # Example:
5160 #
5161 # -> { "execute": "query-tpm-models" }
5162 # <- { "return": [ "tpm-tis" ] }
5163 #
5164 ##
5165 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
5166
5167 ##
5168 # @TpmType:
5169 #
5170 # An enumeration of TPM types
5171 #
5172 # @passthrough: TPM passthrough type
5173 #
5174 # Since: 1.5
5175 ##
5176 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
5177
5178 ##
5179 # @query-tpm-types:
5180 #
5181 # Return a list of supported TPM types
5182 #
5183 # Returns: a list of TpmType
5184 #
5185 # Since: 1.5
5186 #
5187 # Example:
5188 #
5189 # -> { "execute": "query-tpm-types" }
5190 # <- { "return": [ "passthrough" ] }
5191 #
5192 ##
5193 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
5194
5195 ##
5196 # @TPMPassthroughOptions:
5197 #
5198 # Information about the TPM passthrough type
5199 #
5200 # @path: string describing the path used for accessing the TPM device
5201 #
5202 # @cancel-path: string showing the TPM's sysfs cancel file
5203 # for cancellation of TPM commands while they are executing
5204 #
5205 # Since: 1.5
5206 ##
5207 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
5208 '*cancel-path' : 'str'} }
5209
5210 ##
5211 # @TpmTypeOptions:
5212 #
5213 # A union referencing different TPM backend types' configuration options
5214 #
5215 # @type: 'passthrough' The configuration options for the TPM passthrough type
5216 #
5217 # Since: 1.5
5218 ##
5219 { 'union': 'TpmTypeOptions',
5220 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
5221
5222 ##
5223 # @TPMInfo:
5224 #
5225 # Information about the TPM
5226 #
5227 # @id: The Id of the TPM
5228 #
5229 # @model: The TPM frontend model
5230 #
5231 # @options: The TPM (backend) type configuration options
5232 #
5233 # Since: 1.5
5234 ##
5235 { 'struct': 'TPMInfo',
5236 'data': {'id': 'str',
5237 'model': 'TpmModel',
5238 'options': 'TpmTypeOptions' } }
5239
5240 ##
5241 # @query-tpm:
5242 #
5243 # Return information about the TPM device
5244 #
5245 # Returns: @TPMInfo on success
5246 #
5247 # Since: 1.5
5248 #
5249 # Example:
5250 #
5251 # -> { "execute": "query-tpm" }
5252 # <- { "return":
5253 # [
5254 # { "model": "tpm-tis",
5255 # "options":
5256 # { "type": "passthrough",
5257 # "data":
5258 # { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
5259 # "path": "/dev/tpm0"
5260 # }
5261 # },
5262 # "id": "tpm0"
5263 # }
5264 # ]
5265 # }
5266 #
5267 ##
5268 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
5269
5270 ##
5271 # @AcpiTableOptions:
5272 #
5273 # Specify an ACPI table on the command line to load.
5274 #
5275 # At most one of @file and @data can be specified. The list of files specified
5276 # by any one of them is loaded and concatenated in order. If both are omitted,
5277 # @data is implied.
5278 #
5279 # Other fields / optargs can be used to override fields of the generic ACPI
5280 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
5281 # Description Table Header. If a header field is not overridden, then the
5282 # corresponding value from the concatenated blob is used (in case of @file), or
5283 # it is filled in with a hard-coded value (in case of @data).
5284 #
5285 # String fields are copied into the matching ACPI member from lowest address
5286 # upwards, and silently truncated / NUL-padded to length.
5287 #
5288 # @sig: table signature / identifier (4 bytes)
5289 #
5290 # @rev: table revision number (dependent on signature, 1 byte)
5291 #
5292 # @oem_id: OEM identifier (6 bytes)
5293 #
5294 # @oem_table_id: OEM table identifier (8 bytes)
5295 #
5296 # @oem_rev: OEM-supplied revision number (4 bytes)
5297 #
5298 # @asl_compiler_id: identifier of the utility that created the table
5299 # (4 bytes)
5300 #
5301 # @asl_compiler_rev: revision number of the utility that created the
5302 # table (4 bytes)
5303 #
5304 # @file: colon (:) separated list of pathnames to load and
5305 # concatenate as table data. The resultant binary blob is expected to
5306 # have an ACPI table header. At least one file is required. This field
5307 # excludes @data.
5308 #
5309 # @data: colon (:) separated list of pathnames to load and
5310 # concatenate as table data. The resultant binary blob must not have an
5311 # ACPI table header. At least one file is required. This field excludes
5312 # @file.
5313 #
5314 # Since: 1.5
5315 ##
5316 { 'struct': 'AcpiTableOptions',
5317 'data': {
5318 '*sig': 'str',
5319 '*rev': 'uint8',
5320 '*oem_id': 'str',
5321 '*oem_table_id': 'str',
5322 '*oem_rev': 'uint32',
5323 '*asl_compiler_id': 'str',
5324 '*asl_compiler_rev': 'uint32',
5325 '*file': 'str',
5326 '*data': 'str' }}
5327
5328 ##
5329 # @CommandLineParameterType:
5330 #
5331 # Possible types for an option parameter.
5332 #
5333 # @string: accepts a character string
5334 #
5335 # @boolean: accepts "on" or "off"
5336 #
5337 # @number: accepts a number
5338 #
5339 # @size: accepts a number followed by an optional suffix (K)ilo,
5340 # (M)ega, (G)iga, (T)era
5341 #
5342 # Since: 1.5
5343 ##
5344 { 'enum': 'CommandLineParameterType',
5345 'data': ['string', 'boolean', 'number', 'size'] }
5346
5347 ##
5348 # @CommandLineParameterInfo:
5349 #
5350 # Details about a single parameter of a command line option.
5351 #
5352 # @name: parameter name
5353 #
5354 # @type: parameter @CommandLineParameterType
5355 #
5356 # @help: human readable text string, not suitable for parsing.
5357 #
5358 # @default: default value string (since 2.1)
5359 #
5360 # Since: 1.5
5361 ##
5362 { 'struct': 'CommandLineParameterInfo',
5363 'data': { 'name': 'str',
5364 'type': 'CommandLineParameterType',
5365 '*help': 'str',
5366 '*default': 'str' } }
5367
5368 ##
5369 # @CommandLineOptionInfo:
5370 #
5371 # Details about a command line option, including its list of parameter details
5372 #
5373 # @option: option name
5374 #
5375 # @parameters: an array of @CommandLineParameterInfo
5376 #
5377 # Since: 1.5
5378 ##
5379 { 'struct': 'CommandLineOptionInfo',
5380 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
5381
5382 ##
5383 # @query-command-line-options:
5384 #
5385 # Query command line option schema.
5386 #
5387 # @option: option name
5388 #
5389 # Returns: list of @CommandLineOptionInfo for all options (or for the given
5390 # @option). Returns an error if the given @option doesn't exist.
5391 #
5392 # Since: 1.5
5393 #
5394 # Example:
5395 #
5396 # -> { "execute": "query-command-line-options",
5397 # "arguments": { "option": "option-rom" } }
5398 # <- { "return": [
5399 # {
5400 # "parameters": [
5401 # {
5402 # "name": "romfile",
5403 # "type": "string"
5404 # },
5405 # {
5406 # "name": "bootindex",
5407 # "type": "number"
5408 # }
5409 # ],
5410 # "option": "option-rom"
5411 # }
5412 # ]
5413 # }
5414 #
5415 ##
5416 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
5417 'returns': ['CommandLineOptionInfo'] }
5418
5419 ##
5420 # @X86CPURegister32:
5421 #
5422 # A X86 32-bit register
5423 #
5424 # Since: 1.5
5425 ##
5426 { 'enum': 'X86CPURegister32',
5427 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
5428
5429 ##
5430 # @X86CPUFeatureWordInfo:
5431 #
5432 # Information about a X86 CPU feature word
5433 #
5434 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
5435 #
5436 # @cpuid-input-ecx: Input ECX value for CPUID instruction for that
5437 # feature word
5438 #
5439 # @cpuid-register: Output register containing the feature bits
5440 #
5441 # @features: value of output register, containing the feature bits
5442 #
5443 # Since: 1.5
5444 ##
5445 { 'struct': 'X86CPUFeatureWordInfo',
5446 'data': { 'cpuid-input-eax': 'int',
5447 '*cpuid-input-ecx': 'int',
5448 'cpuid-register': 'X86CPURegister32',
5449 'features': 'int' } }
5450
5451 ##
5452 # @DummyForceArrays:
5453 #
5454 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
5455 #
5456 # Since: 2.5
5457 ##
5458 { 'struct': 'DummyForceArrays',
5459 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
5460
5461
5462 ##
5463 # @RxState:
5464 #
5465 # Packets receiving state
5466 #
5467 # @normal: filter assigned packets according to the mac-table
5468 #
5469 # @none: don't receive any assigned packet
5470 #
5471 # @all: receive all assigned packets
5472 #
5473 # Since: 1.6
5474 ##
5475 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
5476
5477 ##
5478 # @RxFilterInfo:
5479 #
5480 # Rx-filter information for a NIC.
5481 #
5482 # @name: net client name
5483 #
5484 # @promiscuous: whether promiscuous mode is enabled
5485 #
5486 # @multicast: multicast receive state
5487 #
5488 # @unicast: unicast receive state
5489 #
5490 # @vlan: vlan receive state (Since 2.0)
5491 #
5492 # @broadcast-allowed: whether to receive broadcast
5493 #
5494 # @multicast-overflow: multicast table is overflowed or not
5495 #
5496 # @unicast-overflow: unicast table is overflowed or not
5497 #
5498 # @main-mac: the main macaddr string
5499 #
5500 # @vlan-table: a list of active vlan id
5501 #
5502 # @unicast-table: a list of unicast macaddr string
5503 #
5504 # @multicast-table: a list of multicast macaddr string
5505 #
5506 # Since: 1.6
5507 ##
5508 { 'struct': 'RxFilterInfo',
5509 'data': {
5510 'name': 'str',
5511 'promiscuous': 'bool',
5512 'multicast': 'RxState',
5513 'unicast': 'RxState',
5514 'vlan': 'RxState',
5515 'broadcast-allowed': 'bool',
5516 'multicast-overflow': 'bool',
5517 'unicast-overflow': 'bool',
5518 'main-mac': 'str',
5519 'vlan-table': ['int'],
5520 'unicast-table': ['str'],
5521 'multicast-table': ['str'] }}
5522
5523 ##
5524 # @query-rx-filter:
5525 #
5526 # Return rx-filter information for all NICs (or for the given NIC).
5527 #
5528 # @name: net client name
5529 #
5530 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
5531 # Returns an error if the given @name doesn't exist, or given
5532 # NIC doesn't support rx-filter querying, or given net client
5533 # isn't a NIC.
5534 #
5535 # Since: 1.6
5536 #
5537 # Example:
5538 #
5539 # -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
5540 # <- { "return": [
5541 # {
5542 # "promiscuous": true,
5543 # "name": "vnet0",
5544 # "main-mac": "52:54:00:12:34:56",
5545 # "unicast": "normal",
5546 # "vlan": "normal",
5547 # "vlan-table": [
5548 # 4,
5549 # 0
5550 # ],
5551 # "unicast-table": [
5552 # ],
5553 # "multicast": "normal",
5554 # "multicast-overflow": false,
5555 # "unicast-overflow": false,
5556 # "multicast-table": [
5557 # "01:00:5e:00:00:01",
5558 # "33:33:00:00:00:01",
5559 # "33:33:ff:12:34:56"
5560 # ],
5561 # "broadcast-allowed": false
5562 # }
5563 # ]
5564 # }
5565 #
5566 ##
5567 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
5568 'returns': ['RxFilterInfo'] }
5569
5570 ##
5571 # @InputButton:
5572 #
5573 # Button of a pointer input device (mouse, tablet).
5574 #
5575 # @side: front side button of a 5-button mouse (since 2.9)
5576 #
5577 # @extra: rear side button of a 5-button mouse (since 2.9)
5578 #
5579 # Since: 2.0
5580 ##
5581 { 'enum' : 'InputButton',
5582 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
5583 'extra' ] }
5584
5585 ##
5586 # @InputAxis:
5587 #
5588 # Position axis of a pointer input device (mouse, tablet).
5589 #
5590 # Since: 2.0
5591 ##
5592 { 'enum' : 'InputAxis',
5593 'data' : [ 'x', 'y' ] }
5594
5595 ##
5596 # @InputKeyEvent:
5597 #
5598 # Keyboard input event.
5599 #
5600 # @key: Which key this event is for.
5601 # @down: True for key-down and false for key-up events.
5602 #
5603 # Since: 2.0
5604 ##
5605 { 'struct' : 'InputKeyEvent',
5606 'data' : { 'key' : 'KeyValue',
5607 'down' : 'bool' } }
5608
5609 ##
5610 # @InputBtnEvent:
5611 #
5612 # Pointer button input event.
5613 #
5614 # @button: Which button this event is for.
5615 # @down: True for key-down and false for key-up events.
5616 #
5617 # Since: 2.0
5618 ##
5619 { 'struct' : 'InputBtnEvent',
5620 'data' : { 'button' : 'InputButton',
5621 'down' : 'bool' } }
5622
5623 ##
5624 # @InputMoveEvent:
5625 #
5626 # Pointer motion input event.
5627 #
5628 # @axis: Which axis is referenced by @value.
5629 # @value: Pointer position. For absolute coordinates the
5630 # valid range is 0 -> 0x7ffff
5631 #
5632 # Since: 2.0
5633 ##
5634 { 'struct' : 'InputMoveEvent',
5635 'data' : { 'axis' : 'InputAxis',
5636 'value' : 'int' } }
5637
5638 ##
5639 # @InputEvent:
5640 #
5641 # Input event union.
5642 #
5643 # @type: the input type, one of:
5644 # - 'key': Input event of Keyboard
5645 # - 'btn': Input event of pointer buttons
5646 # - 'rel': Input event of relative pointer motion
5647 # - 'abs': Input event of absolute pointer motion
5648 #
5649 # Since: 2.0
5650 ##
5651 { 'union' : 'InputEvent',
5652 'data' : { 'key' : 'InputKeyEvent',
5653 'btn' : 'InputBtnEvent',
5654 'rel' : 'InputMoveEvent',
5655 'abs' : 'InputMoveEvent' } }
5656
5657 ##
5658 # @input-send-event:
5659 #
5660 # Send input event(s) to guest.
5661 #
5662 # @device: display device to send event(s) to.
5663 # @head: head to send event(s) to, in case the
5664 # display device supports multiple scanouts.
5665 # @events: List of InputEvent union.
5666 #
5667 # Returns: Nothing on success.
5668 #
5669 # The @device and @head parameters can be used to send the input event
5670 # to specific input devices in case (a) multiple input devices of the
5671 # same kind are added to the virtual machine and (b) you have
5672 # configured input routing (see docs/multiseat.txt) for those input
5673 # devices. The parameters work exactly like the device and head
5674 # properties of input devices. If @device is missing, only devices
5675 # that have no input routing config are admissible. If @device is
5676 # specified, both input devices with and without input routing config
5677 # are admissible, but devices with input routing config take
5678 # precedence.
5679 #
5680 # Since: 2.6
5681 #
5682 # Note: The consoles are visible in the qom tree, under
5683 # /backend/console[$index]. They have a device link and head property,
5684 # so it is possible to map which console belongs to which device and
5685 # display.
5686 #
5687 # Example:
5688 #
5689 # 1. Press left mouse button.
5690 #
5691 # -> { "execute": "input-send-event",
5692 # "arguments": { "device": "video0",
5693 # "events": [ { "type": "btn",
5694 # "data" : { "down": true, "button": "left" } } ] } }
5695 # <- { "return": {} }
5696 #
5697 # -> { "execute": "input-send-event",
5698 # "arguments": { "device": "video0",
5699 # "events": [ { "type": "btn",
5700 # "data" : { "down": false, "button": "left" } } ] } }
5701 # <- { "return": {} }
5702 #
5703 # 2. Press ctrl-alt-del.
5704 #
5705 # -> { "execute": "input-send-event",
5706 # "arguments": { "events": [
5707 # { "type": "key", "data" : { "down": true,
5708 # "key": {"type": "qcode", "data": "ctrl" } } },
5709 # { "type": "key", "data" : { "down": true,
5710 # "key": {"type": "qcode", "data": "alt" } } },
5711 # { "type": "key", "data" : { "down": true,
5712 # "key": {"type": "qcode", "data": "delete" } } } ] } }
5713 # <- { "return": {} }
5714 #
5715 # 3. Move mouse pointer to absolute coordinates (20000, 400).
5716 #
5717 # -> { "execute": "input-send-event" ,
5718 # "arguments": { "events": [
5719 # { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
5720 # { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
5721 # <- { "return": {} }
5722 #
5723 ##
5724 { 'command': 'input-send-event',
5725 'data': { '*device': 'str',
5726 '*head' : 'int',
5727 'events' : [ 'InputEvent' ] } }
5728
5729 ##
5730 # @NumaOptionsType:
5731 #
5732 # @node: NUMA nodes configuration
5733 #
5734 # @dist: NUMA distance configuration (since 2.10)
5735 #
5736 # @cpu: property based CPU(s) to node mapping (Since: 2.10)
5737 #
5738 # Since: 2.1
5739 ##
5740 { 'enum': 'NumaOptionsType',
5741 'data': [ 'node', 'dist', 'cpu' ] }
5742
5743 ##
5744 # @NumaOptions:
5745 #
5746 # A discriminated record of NUMA options. (for OptsVisitor)
5747 #
5748 # Since: 2.1
5749 ##
5750 { 'union': 'NumaOptions',
5751 'base': { 'type': 'NumaOptionsType' },
5752 'discriminator': 'type',
5753 'data': {
5754 'node': 'NumaNodeOptions',
5755 'dist': 'NumaDistOptions',
5756 'cpu': 'NumaCpuOptions' }}
5757
5758 ##
5759 # @NumaNodeOptions:
5760 #
5761 # Create a guest NUMA node. (for OptsVisitor)
5762 #
5763 # @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
5764 #
5765 # @cpus: VCPUs belonging to this node (assign VCPUS round-robin
5766 # if omitted)
5767 #
5768 # @mem: memory size of this node; mutually exclusive with @memdev.
5769 # Equally divide total memory among nodes if both @mem and @memdev are
5770 # omitted.
5771 #
5772 # @memdev: memory backend object. If specified for one node,
5773 # it must be specified for all nodes.
5774 #
5775 # Since: 2.1
5776 ##
5777 { 'struct': 'NumaNodeOptions',
5778 'data': {
5779 '*nodeid': 'uint16',
5780 '*cpus': ['uint16'],
5781 '*mem': 'size',
5782 '*memdev': 'str' }}
5783
5784 ##
5785 # @NumaDistOptions:
5786 #
5787 # Set the distance between 2 NUMA nodes.
5788 #
5789 # @src: source NUMA node.
5790 #
5791 # @dst: destination NUMA node.
5792 #
5793 # @val: NUMA distance from source node to destination node.
5794 # When a node is unreachable from another node, set the distance
5795 # between them to 255.
5796 #
5797 # Since: 2.10
5798 ##
5799 { 'struct': 'NumaDistOptions',
5800 'data': {
5801 'src': 'uint16',
5802 'dst': 'uint16',
5803 'val': 'uint8' }}
5804
5805 ##
5806 # @NumaCpuOptions:
5807 #
5808 # Option "-numa cpu" overrides default cpu to node mapping.
5809 # It accepts the same set of cpu properties as returned by
5810 # query-hotpluggable-cpus[].props, where node-id could be used to
5811 # override default node mapping.
5812 #
5813 # Since: 2.10
5814 ##
5815 { 'struct': 'NumaCpuOptions',
5816 'base': 'CpuInstanceProperties',
5817 'data' : {} }
5818
5819 ##
5820 # @HostMemPolicy:
5821 #
5822 # Host memory policy types
5823 #
5824 # @default: restore default policy, remove any nondefault policy
5825 #
5826 # @preferred: set the preferred host nodes for allocation
5827 #
5828 # @bind: a strict policy that restricts memory allocation to the
5829 # host nodes specified
5830 #
5831 # @interleave: memory allocations are interleaved across the set
5832 # of host nodes specified
5833 #
5834 # Since: 2.1
5835 ##
5836 { 'enum': 'HostMemPolicy',
5837 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
5838
5839 ##
5840 # @Memdev:
5841 #
5842 # Information about memory backend
5843 #
5844 # @id: backend's ID if backend has 'id' property (since 2.9)
5845 #
5846 # @size: memory backend size
5847 #
5848 # @merge: enables or disables memory merge support
5849 #
5850 # @dump: includes memory backend's memory in a core dump or not
5851 #
5852 # @prealloc: enables or disables memory preallocation
5853 #
5854 # @host-nodes: host nodes for its memory policy
5855 #
5856 # @policy: memory policy of memory backend
5857 #
5858 # Since: 2.1
5859 ##
5860 { 'struct': 'Memdev',
5861 'data': {
5862 '*id': 'str',
5863 'size': 'size',
5864 'merge': 'bool',
5865 'dump': 'bool',
5866 'prealloc': 'bool',
5867 'host-nodes': ['uint16'],
5868 'policy': 'HostMemPolicy' }}
5869
5870 ##
5871 # @query-memdev:
5872 #
5873 # Returns information for all memory backends.
5874 #
5875 # Returns: a list of @Memdev.
5876 #
5877 # Since: 2.1
5878 #
5879 # Example:
5880 #
5881 # -> { "execute": "query-memdev" }
5882 # <- { "return": [
5883 # {
5884 # "id": "mem1",
5885 # "size": 536870912,
5886 # "merge": false,
5887 # "dump": true,
5888 # "prealloc": false,
5889 # "host-nodes": [0, 1],
5890 # "policy": "bind"
5891 # },
5892 # {
5893 # "size": 536870912,
5894 # "merge": false,
5895 # "dump": true,
5896 # "prealloc": true,
5897 # "host-nodes": [2, 3],
5898 # "policy": "preferred"
5899 # }
5900 # ]
5901 # }
5902 #
5903 ##
5904 { 'command': 'query-memdev', 'returns': ['Memdev'] }
5905
5906 ##
5907 # @PCDIMMDeviceInfo:
5908 #
5909 # PCDIMMDevice state information
5910 #
5911 # @id: device's ID
5912 #
5913 # @addr: physical address, where device is mapped
5914 #
5915 # @size: size of memory that the device provides
5916 #
5917 # @slot: slot number at which device is plugged in
5918 #
5919 # @node: NUMA node number where device is plugged in
5920 #
5921 # @memdev: memory backend linked with device
5922 #
5923 # @hotplugged: true if device was hotplugged
5924 #
5925 # @hotpluggable: true if device if could be added/removed while machine is running
5926 #
5927 # Since: 2.1
5928 ##
5929 { 'struct': 'PCDIMMDeviceInfo',
5930 'data': { '*id': 'str',
5931 'addr': 'int',
5932 'size': 'int',
5933 'slot': 'int',
5934 'node': 'int',
5935 'memdev': 'str',
5936 'hotplugged': 'bool',
5937 'hotpluggable': 'bool'
5938 }
5939 }
5940
5941 ##
5942 # @MemoryDeviceInfo:
5943 #
5944 # Union containing information about a memory device
5945 #
5946 # Since: 2.1
5947 ##
5948 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
5949
5950 ##
5951 # @query-memory-devices:
5952 #
5953 # Lists available memory devices and their state
5954 #
5955 # Since: 2.1
5956 #
5957 # Example:
5958 #
5959 # -> { "execute": "query-memory-devices" }
5960 # <- { "return": [ { "data":
5961 # { "addr": 5368709120,
5962 # "hotpluggable": true,
5963 # "hotplugged": true,
5964 # "id": "d1",
5965 # "memdev": "/objects/memX",
5966 # "node": 0,
5967 # "size": 1073741824,
5968 # "slot": 0},
5969 # "type": "dimm"
5970 # } ] }
5971 #
5972 ##
5973 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
5974
5975 ##
5976 # @ACPISlotType:
5977 #
5978 # @DIMM: memory slot
5979 # @CPU: logical CPU slot (since 2.7)
5980 ##
5981 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
5982
5983 ##
5984 # @ACPIOSTInfo:
5985 #
5986 # OSPM Status Indication for a device
5987 # For description of possible values of @source and @status fields
5988 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
5989 #
5990 # @device: device ID associated with slot
5991 #
5992 # @slot: slot ID, unique per slot of a given @slot-type
5993 #
5994 # @slot-type: type of the slot
5995 #
5996 # @source: an integer containing the source event
5997 #
5998 # @status: an integer containing the status code
5999 #
6000 # Since: 2.1
6001 ##
6002 { 'struct': 'ACPIOSTInfo',
6003 'data' : { '*device': 'str',
6004 'slot': 'str',
6005 'slot-type': 'ACPISlotType',
6006 'source': 'int',
6007 'status': 'int' } }
6008
6009 ##
6010 # @query-acpi-ospm-status:
6011 #
6012 # Return a list of ACPIOSTInfo for devices that support status
6013 # reporting via ACPI _OST method.
6014 #
6015 # Since: 2.1
6016 #
6017 # Example:
6018 #
6019 # -> { "execute": "query-acpi-ospm-status" }
6020 # <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
6021 # { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
6022 # { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
6023 # { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
6024 # ]}
6025 #
6026 ##
6027 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
6028
6029 ##
6030 # @WatchdogExpirationAction:
6031 #
6032 # An enumeration of the actions taken when the watchdog device's timer is
6033 # expired
6034 #
6035 # @reset: system resets
6036 #
6037 # @shutdown: system shutdown, note that it is similar to @powerdown, which
6038 # tries to set to system status and notify guest
6039 #
6040 # @poweroff: system poweroff, the emulator program exits
6041 #
6042 # @pause: system pauses, similar to @stop
6043 #
6044 # @debug: system enters debug state
6045 #
6046 # @none: nothing is done
6047 #
6048 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
6049 # VCPUS on x86) (since 2.4)
6050 #
6051 # Since: 2.1
6052 ##
6053 { 'enum': 'WatchdogExpirationAction',
6054 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
6055 'inject-nmi' ] }
6056
6057 ##
6058 # @IoOperationType:
6059 #
6060 # An enumeration of the I/O operation types
6061 #
6062 # @read: read operation
6063 #
6064 # @write: write operation
6065 #
6066 # Since: 2.1
6067 ##
6068 { 'enum': 'IoOperationType',
6069 'data': [ 'read', 'write' ] }
6070
6071 ##
6072 # @GuestPanicAction:
6073 #
6074 # An enumeration of the actions taken when guest OS panic is detected
6075 #
6076 # @pause: system pauses
6077 #
6078 # Since: 2.1 (poweroff since 2.8)
6079 ##
6080 { 'enum': 'GuestPanicAction',
6081 'data': [ 'pause', 'poweroff' ] }
6082
6083 ##
6084 # @GuestPanicInformationType:
6085 #
6086 # An enumeration of the guest panic information types
6087 #
6088 # Since: 2.9
6089 ##
6090 { 'enum': 'GuestPanicInformationType',
6091 'data': [ 'hyper-v'] }
6092
6093 ##
6094 # @GuestPanicInformation:
6095 #
6096 # Information about a guest panic
6097 #
6098 # Since: 2.9
6099 ##
6100 {'union': 'GuestPanicInformation',
6101 'base': {'type': 'GuestPanicInformationType'},
6102 'discriminator': 'type',
6103 'data': { 'hyper-v': 'GuestPanicInformationHyperV' } }
6104
6105 ##
6106 # @GuestPanicInformationHyperV:
6107 #
6108 # Hyper-V specific guest panic information (HV crash MSRs)
6109 #
6110 # Since: 2.9
6111 ##
6112 {'struct': 'GuestPanicInformationHyperV',
6113 'data': { 'arg1': 'uint64',
6114 'arg2': 'uint64',
6115 'arg3': 'uint64',
6116 'arg4': 'uint64',
6117 'arg5': 'uint64' } }
6118
6119 ##
6120 # @rtc-reset-reinjection:
6121 #
6122 # This command will reset the RTC interrupt reinjection backlog.
6123 # Can be used if another mechanism to synchronize guest time
6124 # is in effect, for example QEMU guest agent's guest-set-time
6125 # command.
6126 #
6127 # Since: 2.1
6128 #
6129 # Example:
6130 #
6131 # -> { "execute": "rtc-reset-reinjection" }
6132 # <- { "return": {} }
6133 #
6134 ##
6135 { 'command': 'rtc-reset-reinjection' }
6136
6137 # Rocker ethernet network switch
6138 { 'include': 'qapi/rocker.json' }
6139
6140 ##
6141 # @ReplayMode:
6142 #
6143 # Mode of the replay subsystem.
6144 #
6145 # @none: normal execution mode. Replay or record are not enabled.
6146 #
6147 # @record: record mode. All non-deterministic data is written into the
6148 # replay log.
6149 #
6150 # @play: replay mode. Non-deterministic data required for system execution
6151 # is read from the log.
6152 #
6153 # Since: 2.5
6154 ##
6155 { 'enum': 'ReplayMode',
6156 'data': [ 'none', 'record', 'play' ] }
6157
6158 ##
6159 # @xen-load-devices-state:
6160 #
6161 # Load the state of all devices from file. The RAM and the block devices
6162 # of the VM are not loaded by this command.
6163 #
6164 # @filename: the file to load the state of the devices from as binary
6165 # data. See xen-save-devices-state.txt for a description of the binary
6166 # format.
6167 #
6168 # Since: 2.7
6169 #
6170 # Example:
6171 #
6172 # -> { "execute": "xen-load-devices-state",
6173 # "arguments": { "filename": "/tmp/resume" } }
6174 # <- { "return": {} }
6175 #
6176 ##
6177 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
6178
6179 ##
6180 # @xen-set-replication:
6181 #
6182 # Enable or disable replication.
6183 #
6184 # @enable: true to enable, false to disable.
6185 #
6186 # @primary: true for primary or false for secondary.
6187 #
6188 # @failover: true to do failover, false to stop. but cannot be
6189 # specified if 'enable' is true. default value is false.
6190 #
6191 # Returns: nothing.
6192 #
6193 # Example:
6194 #
6195 # -> { "execute": "xen-set-replication",
6196 # "arguments": {"enable": true, "primary": false} }
6197 # <- { "return": {} }
6198 #
6199 # Since: 2.9
6200 ##
6201 { 'command': 'xen-set-replication',
6202 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }
6203
6204 ##
6205 # @ReplicationStatus:
6206 #
6207 # The result format for 'query-xen-replication-status'.
6208 #
6209 # @error: true if an error happened, false if replication is normal.
6210 #
6211 # @desc: the human readable error description string, when
6212 # @error is 'true'.
6213 #
6214 # Since: 2.9
6215 ##
6216 { 'struct': 'ReplicationStatus',
6217 'data': { 'error': 'bool', '*desc': 'str' } }
6218
6219 ##
6220 # @query-xen-replication-status:
6221 #
6222 # Query replication status while the vm is running.
6223 #
6224 # Returns: A @ReplicationResult object showing the status.
6225 #
6226 # Example:
6227 #
6228 # -> { "execute": "query-xen-replication-status" }
6229 # <- { "return": { "error": false } }
6230 #
6231 # Since: 2.9
6232 ##
6233 { 'command': 'query-xen-replication-status',
6234 'returns': 'ReplicationStatus' }
6235
6236 ##
6237 # @xen-colo-do-checkpoint:
6238 #
6239 # Xen uses this command to notify replication to trigger a checkpoint.
6240 #
6241 # Returns: nothing.
6242 #
6243 # Example:
6244 #
6245 # -> { "execute": "xen-colo-do-checkpoint" }
6246 # <- { "return": {} }
6247 #
6248 # Since: 2.9
6249 ##
6250 { 'command': 'xen-colo-do-checkpoint' }
6251
6252 ##
6253 # @GICCapability:
6254 #
6255 # The struct describes capability for a specific GIC (Generic
6256 # Interrupt Controller) version. These bits are not only decided by
6257 # QEMU/KVM software version, but also decided by the hardware that
6258 # the program is running upon.
6259 #
6260 # @version: version of GIC to be described. Currently, only 2 and 3
6261 # are supported.
6262 #
6263 # @emulated: whether current QEMU/hardware supports emulated GIC
6264 # device in user space.
6265 #
6266 # @kernel: whether current QEMU/hardware supports hardware
6267 # accelerated GIC device in kernel.
6268 #
6269 # Since: 2.6
6270 ##
6271 { 'struct': 'GICCapability',
6272 'data': { 'version': 'int',
6273 'emulated': 'bool',
6274 'kernel': 'bool' } }
6275
6276 ##
6277 # @query-gic-capabilities:
6278 #
6279 # This command is ARM-only. It will return a list of GICCapability
6280 # objects that describe its capability bits.
6281 #
6282 # Returns: a list of GICCapability objects.
6283 #
6284 # Since: 2.6
6285 #
6286 # Example:
6287 #
6288 # -> { "execute": "query-gic-capabilities" }
6289 # <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
6290 # { "version": 3, "emulated": false, "kernel": true } ] }
6291 #
6292 ##
6293 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
6294
6295 ##
6296 # @CpuInstanceProperties:
6297 #
6298 # List of properties to be used for hotplugging a CPU instance,
6299 # it should be passed by management with device_add command when
6300 # a CPU is being hotplugged.
6301 #
6302 # @node-id: NUMA node ID the CPU belongs to
6303 # @socket-id: socket number within node/board the CPU belongs to
6304 # @core-id: core number within socket the CPU belongs to
6305 # @thread-id: thread number within core the CPU belongs to
6306 #
6307 # Note: currently there are 4 properties that could be present
6308 # but management should be prepared to pass through other
6309 # properties with device_add command to allow for future
6310 # interface extension. This also requires the filed names to be kept in
6311 # sync with the properties passed to -device/device_add.
6312 #
6313 # Since: 2.7
6314 ##
6315 { 'struct': 'CpuInstanceProperties',
6316 'data': { '*node-id': 'int',
6317 '*socket-id': 'int',
6318 '*core-id': 'int',
6319 '*thread-id': 'int'
6320 }
6321 }
6322
6323 ##
6324 # @HotpluggableCPU:
6325 #
6326 # @type: CPU object type for usage with device_add command
6327 # @props: list of properties to be used for hotplugging CPU
6328 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
6329 # @qom-path: link to existing CPU object if CPU is present or
6330 # omitted if CPU is not present.
6331 #
6332 # Since: 2.7
6333 ##
6334 { 'struct': 'HotpluggableCPU',
6335 'data': { 'type': 'str',
6336 'vcpus-count': 'int',
6337 'props': 'CpuInstanceProperties',
6338 '*qom-path': 'str'
6339 }
6340 }
6341
6342 ##
6343 # @query-hotpluggable-cpus:
6344 #
6345 # Returns: a list of HotpluggableCPU objects.
6346 #
6347 # Since: 2.7
6348 #
6349 # Example:
6350 #
6351 # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
6352 #
6353 # -> { "execute": "query-hotpluggable-cpus" }
6354 # <- {"return": [
6355 # { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
6356 # "vcpus-count": 1 },
6357 # { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
6358 # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
6359 # ]}'
6360 #
6361 # For pc machine type started with -smp 1,maxcpus=2:
6362 #
6363 # -> { "execute": "query-hotpluggable-cpus" }
6364 # <- {"return": [
6365 # {
6366 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
6367 # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
6368 # },
6369 # {
6370 # "qom-path": "/machine/unattached/device[0]",
6371 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
6372 # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
6373 # }
6374 # ]}
6375 #
6376 ##
6377 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }
6378
6379 ##
6380 # @GuidInfo:
6381 #
6382 # GUID information.
6383 #
6384 # @guid: the globally unique identifier
6385 #
6386 # Since: 2.9
6387 ##
6388 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
6389
6390 ##
6391 # @query-vm-generation-id:
6392 #
6393 # Show Virtual Machine Generation ID
6394 #
6395 # Since 2.9
6396 ##
6397 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }