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