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