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