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