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