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