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