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