]> Git Repo - qemu.git/blob - qapi-schema.json
wdt_ib700: replace register_ioport*
[qemu.git] / qapi-schema.json
1 # -*- Mode: Python -*-
2 #
3 # QAPI Schema
4
5 ##
6 # @ErrorClass
7 #
8 # QEMU error classes
9 #
10 # @GenericError: this is used for errors that don't require a specific error
11 #                class. This should be the default case for most errors
12 #
13 # @CommandNotFound: the requested command has not been found
14 #
15 # @DeviceEncrypted: the requested operation can't be fulfilled because the
16 #                   selected device is encrypted
17 #
18 # @DeviceNotActive: a device has failed to be become active
19 #
20 # @DeviceNotFound: the requested device has not been found
21 #
22 # @KVMMissingCap: the requested operation can't be fulfilled because a
23 #                 required KVM capability is missing
24 #
25 # Since: 1.2
26 ##
27 { 'enum': 'ErrorClass',
28   'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
29             'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
30
31 ##
32 # @add_client
33 #
34 # Allow client connections for VNC, Spice and socket based
35 # character devices to be passed in to QEMU via SCM_RIGHTS.
36 #
37 # @protocol: protocol name. Valid names are "vnc", "spice" or the
38 #            name of a character device (eg. from -chardev id=XXXX)
39 #
40 # @fdname: file descriptor name previously passed via 'getfd' command
41 #
42 # @skipauth: #optional whether to skip authentication. Only applies
43 #            to "vnc" and "spice" protocols
44 #
45 # @tls: #optional whether to perform TLS. Only applies to the "spice"
46 #       protocol
47 #
48 # Returns: nothing on success.
49 #
50 # Since: 0.14.0
51 ##
52 { 'command': 'add_client',
53   'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
54             '*tls': 'bool' } }
55
56 ##
57 # @NameInfo:
58 #
59 # Guest name information.
60 #
61 # @name: #optional The name of the guest
62 #
63 # Since 0.14.0
64 ##
65 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
66
67 ##
68 # @query-name:
69 #
70 # Return the name information of a guest.
71 #
72 # Returns: @NameInfo of the guest
73 #
74 # Since 0.14.0
75 ##
76 { 'command': 'query-name', 'returns': 'NameInfo' }
77
78 ##
79 # @VersionInfo:
80 #
81 # A description of QEMU's version.
82 #
83 # @qemu.major:  The major version of QEMU
84 #
85 # @qemu.minor:  The minor version of QEMU
86 #
87 # @qemu.micro:  The micro version of QEMU.  By current convention, a micro
88 #               version of 50 signifies a development branch.  A micro version
89 #               greater than or equal to 90 signifies a release candidate for
90 #               the next minor version.  A micro version of less than 50
91 #               signifies a stable release.
92 #
93 # @package:     QEMU will always set this field to an empty string.  Downstream
94 #               versions of QEMU should set this to a non-empty string.  The
95 #               exact format depends on the downstream however it highly
96 #               recommended that a unique name is used.
97 #
98 # Since: 0.14.0
99 ##
100 { 'type': 'VersionInfo',
101   'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
102            'package': 'str'} }
103
104 ##
105 # @query-version:
106 #
107 # Returns the current version of QEMU.
108 #
109 # Returns:  A @VersionInfo object describing the current version of QEMU.
110 #
111 # Since: 0.14.0
112 ##
113 { 'command': 'query-version', 'returns': 'VersionInfo' }
114
115 ##
116 # @KvmInfo:
117 #
118 # Information about support for KVM acceleration
119 #
120 # @enabled: true if KVM acceleration is active
121 #
122 # @present: true if KVM acceleration is built into this executable
123 #
124 # Since: 0.14.0
125 ##
126 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
127
128 ##
129 # @query-kvm:
130 #
131 # Returns information about KVM acceleration
132 #
133 # Returns: @KvmInfo
134 #
135 # Since: 0.14.0
136 ##
137 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
138
139 ##
140 # @RunState
141 #
142 # An enumeration of VM run states.
143 #
144 # @debug: QEMU is running on a debugger
145 #
146 # @finish-migrate: guest is paused to finish the migration process
147 #
148 # @inmigrate: guest is paused waiting for an incoming migration.  Note
149 # that this state does not tell whether the machine will start at the
150 # end of the migration.  This depends on the command-line -S option and
151 # any invocation of 'stop' or 'cont' that has happened since QEMU was
152 # started.
153 #
154 # @internal-error: An internal error that prevents further guest execution
155 # has occurred
156 #
157 # @io-error: the last IOP has failed and the device is configured to pause
158 # on I/O errors
159 #
160 # @paused: guest has been paused via the 'stop' command
161 #
162 # @postmigrate: guest is paused following a successful 'migrate'
163 #
164 # @prelaunch: QEMU was started with -S and guest has not started
165 #
166 # @restore-vm: guest is paused to restore VM state
167 #
168 # @running: guest is actively running
169 #
170 # @save-vm: guest is paused to save the VM state
171 #
172 # @shutdown: guest is shut down (and -no-shutdown is in use)
173 #
174 # @suspended: guest is suspended (ACPI S3)
175 #
176 # @watchdog: the watchdog action is configured to pause and has been triggered
177 #
178 # @guest-panicked: guest has been panicked as a result of guest OS panic
179 ##
180 { 'enum': 'RunState',
181   'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
182             'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
183             'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
184             'guest-panicked' ] }
185
186 ##
187 # @SnapshotInfo
188 #
189 # @id: unique snapshot id
190 #
191 # @name: user chosen name
192 #
193 # @vm-state-size: size of the VM state
194 #
195 # @date-sec: UTC date of the snapshot in seconds
196 #
197 # @date-nsec: fractional part in nano seconds to be used with date-sec
198 #
199 # @vm-clock-sec: VM clock relative to boot in seconds
200 #
201 # @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec
202 #
203 # Since: 1.3
204 #
205 ##
206
207 { 'type': 'SnapshotInfo',
208   'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
209             'date-sec': 'int', 'date-nsec': 'int',
210             'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } }
211
212 ##
213 # @ImageInfo:
214 #
215 # Information about a QEMU image file
216 #
217 # @filename: name of the image file
218 #
219 # @format: format of the image file
220 #
221 # @virtual-size: maximum capacity in bytes of the image
222 #
223 # @actual-size: #optional actual size on disk in bytes of the image
224 #
225 # @dirty-flag: #optional true if image is not cleanly closed
226 #
227 # @cluster-size: #optional size of a cluster in bytes
228 #
229 # @encrypted: #optional true if the image is encrypted
230 #
231 # @backing-filename: #optional name of the backing file
232 #
233 # @full-backing-filename: #optional full path of the backing file
234 #
235 # @backing-filename-format: #optional the format of the backing file
236 #
237 # @snapshots: #optional list of VM snapshots
238 #
239 # @backing-image: #optional info of the backing image (since 1.6)
240 #
241 # Since: 1.3
242 #
243 ##
244
245 { 'type': 'ImageInfo',
246   'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
247            '*actual-size': 'int', 'virtual-size': 'int',
248            '*cluster-size': 'int', '*encrypted': 'bool',
249            '*backing-filename': 'str', '*full-backing-filename': 'str',
250            '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'],
251            '*backing-image': 'ImageInfo' } }
252
253 ##
254 # @ImageCheck:
255 #
256 # Information about a QEMU image file check
257 #
258 # @filename: name of the image file checked
259 #
260 # @format: format of the image file checked
261 #
262 # @check-errors: number of unexpected errors occurred during check
263 #
264 # @image-end-offset: #optional offset (in bytes) where the image ends, this
265 #                    field is present if the driver for the image format
266 #                    supports it
267 #
268 # @corruptions: #optional number of corruptions found during the check if any
269 #
270 # @leaks: #optional number of leaks found during the check if any
271 #
272 # @corruptions-fixed: #optional number of corruptions fixed during the check
273 #                     if any
274 #
275 # @leaks-fixed: #optional number of leaks fixed during the check if any
276 #
277 # @total-clusters: #optional total number of clusters, this field is present
278 #                  if the driver for the image format supports it
279 #
280 # @allocated-clusters: #optional total number of allocated clusters, this
281 #                      field is present if the driver for the image format
282 #                      supports it
283 #
284 # @fragmented-clusters: #optional total number of fragmented clusters, this
285 #                       field is present if the driver for the image format
286 #                       supports it
287 #
288 # @compressed-clusters: #optional total number of compressed clusters, this
289 #                       field is present if the driver for the image format
290 #                       supports it
291 #
292 # Since: 1.4
293 #
294 ##
295
296 { 'type': 'ImageCheck',
297   'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
298            '*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int',
299            '*corruptions-fixed': 'int', '*leaks-fixed': 'int',
300            '*total-clusters': 'int', '*allocated-clusters': 'int',
301            '*fragmented-clusters': 'int', '*compressed-clusters': 'int' } }
302
303 ##
304 # @StatusInfo:
305 #
306 # Information about VCPU run state
307 #
308 # @running: true if all VCPUs are runnable, false if not runnable
309 #
310 # @singlestep: true if VCPUs are in single-step mode
311 #
312 # @status: the virtual machine @RunState
313 #
314 # Since:  0.14.0
315 #
316 # Notes: @singlestep is enabled through the GDB stub
317 ##
318 { 'type': 'StatusInfo',
319   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
320
321 ##
322 # @query-status:
323 #
324 # Query the run status of all VCPUs
325 #
326 # Returns: @StatusInfo reflecting all VCPUs
327 #
328 # Since:  0.14.0
329 ##
330 { 'command': 'query-status', 'returns': 'StatusInfo' }
331
332 ##
333 # @UuidInfo:
334 #
335 # Guest UUID information.
336 #
337 # @UUID: the UUID of the guest
338 #
339 # Since: 0.14.0
340 #
341 # Notes: If no UUID was specified for the guest, a null UUID is returned.
342 ##
343 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
344
345 ##
346 # @query-uuid:
347 #
348 # Query the guest UUID information.
349 #
350 # Returns: The @UuidInfo for the guest
351 #
352 # Since 0.14.0
353 ##
354 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
355
356 ##
357 # @ChardevInfo:
358 #
359 # Information about a character device.
360 #
361 # @label: the label of the character device
362 #
363 # @filename: the filename of the character device
364 #
365 # Notes: @filename is encoded using the QEMU command line character device
366 #        encoding.  See the QEMU man page for details.
367 #
368 # Since: 0.14.0
369 ##
370 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
371
372 ##
373 # @query-chardev:
374 #
375 # Returns information about current character devices.
376 #
377 # Returns: a list of @ChardevInfo
378 #
379 # Since: 0.14.0
380 ##
381 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
382
383 ##
384 # @DataFormat:
385 #
386 # An enumeration of data format.
387 #
388 # @utf8: Data is a UTF-8 string (RFC 3629)
389 #
390 # @base64: Data is Base64 encoded binary (RFC 3548)
391 #
392 # Since: 1.4
393 ##
394 { 'enum': 'DataFormat',
395   'data': [ 'utf8', 'base64' ] }
396
397 ##
398 # @ringbuf-write:
399 #
400 # Write to a ring buffer character device.
401 #
402 # @device: the ring buffer character device name
403 #
404 # @data: data to write
405 #
406 # @format: #optional data encoding (default 'utf8').
407 #          - base64: data must be base64 encoded text.  Its binary
408 #            decoding gets written.
409 #            Bug: invalid base64 is currently not rejected.
410 #            Whitespace *is* invalid.
411 #          - utf8: data's UTF-8 encoding is written
412 #          - data itself is always Unicode regardless of format, like
413 #            any other string.
414 #
415 # Returns: Nothing on success
416 #
417 # Since: 1.4
418 ##
419 { 'command': 'ringbuf-write',
420   'data': {'device': 'str', 'data': 'str',
421            '*format': 'DataFormat'} }
422
423 ##
424 # @ringbuf-read:
425 #
426 # Read from a ring buffer character device.
427 #
428 # @device: the ring buffer character device name
429 #
430 # @size: how many bytes to read at most
431 #
432 # @format: #optional data encoding (default 'utf8').
433 #          - base64: the data read is returned in base64 encoding.
434 #          - utf8: the data read is interpreted as UTF-8.
435 #            Bug: can screw up when the buffer contains invalid UTF-8
436 #            sequences, NUL characters, after the ring buffer lost
437 #            data, and when reading stops because the size limit is
438 #            reached.
439 #          - The return value is always Unicode regardless of format,
440 #            like any other string.
441 #
442 # Returns: data read from the device
443 #
444 # Since: 1.4
445 ##
446 { 'command': 'ringbuf-read',
447   'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
448   'returns': 'str' }
449
450 ##
451 # @CommandInfo:
452 #
453 # Information about a QMP command
454 #
455 # @name: The command name
456 #
457 # Since: 0.14.0
458 ##
459 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
460
461 ##
462 # @query-commands:
463 #
464 # Return a list of supported QMP commands by this server
465 #
466 # Returns: A list of @CommandInfo for all supported commands
467 #
468 # Since: 0.14.0
469 ##
470 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
471
472 ##
473 # @EventInfo:
474 #
475 # Information about a QMP event
476 #
477 # @name: The event name
478 #
479 # Since: 1.2.0
480 ##
481 { 'type': 'EventInfo', 'data': {'name': 'str'} }
482
483 ##
484 # @query-events:
485 #
486 # Return a list of supported QMP events by this server
487 #
488 # Returns: A list of @EventInfo for all supported events
489 #
490 # Since: 1.2.0
491 ##
492 { 'command': 'query-events', 'returns': ['EventInfo'] }
493
494 ##
495 # @MigrationStats
496 #
497 # Detailed migration status.
498 #
499 # @transferred: amount of bytes already transferred to the target VM
500 #
501 # @remaining: amount of bytes remaining to be transferred to the target VM
502 #
503 # @total: total amount of bytes involved in the migration process
504 #
505 # @duplicate: number of duplicate (zero) pages (since 1.2)
506 #
507 # @skipped: number of skipped zero pages (since 1.5)
508 #
509 # @normal : number of normal pages (since 1.2)
510 #
511 # @normal-bytes: number of normal bytes sent (since 1.2)
512 #
513 # @dirty-pages-rate: number of pages dirtied by second by the
514 #        guest (since 1.3)
515 #
516 # @mbps: throughput in megabits/sec. (since 1.6)
517 #
518 # Since: 0.14.0
519 ##
520 { 'type': 'MigrationStats',
521   'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
522            'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
523            'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
524            'mbps' : 'number' } }
525
526 ##
527 # @XBZRLECacheStats
528 #
529 # Detailed XBZRLE migration cache statistics
530 #
531 # @cache-size: XBZRLE cache size
532 #
533 # @bytes: amount of bytes already transferred to the target VM
534 #
535 # @pages: amount of pages transferred to the target VM
536 #
537 # @cache-miss: number of cache miss
538 #
539 # @overflow: number of overflows
540 #
541 # Since: 1.2
542 ##
543 { 'type': 'XBZRLECacheStats',
544   'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
545            'cache-miss': 'int', 'overflow': 'int' } }
546
547 ##
548 # @MigrationInfo
549 #
550 # Information about current migration process.
551 #
552 # @status: #optional string describing the current migration status.
553 #          As of 0.14.0 this can be 'active', 'completed', 'failed' or
554 #          'cancelled'. If this field is not returned, no migration process
555 #          has been initiated
556 #
557 # @ram: #optional @MigrationStats containing detailed migration
558 #       status, only returned if status is 'active' or
559 #       'completed'. 'comppleted' (since 1.2)
560 #
561 # @disk: #optional @MigrationStats containing detailed disk migration
562 #        status, only returned if status is 'active' and it is a block
563 #        migration
564 #
565 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
566 #                migration statistics, only returned if XBZRLE feature is on and
567 #                status is 'active' or 'completed' (since 1.2)
568 #
569 # @total-time: #optional total amount of milliseconds since migration started.
570 #        If migration has ended, it returns the total migration
571 #        time. (since 1.2)
572 #
573 # @downtime: #optional only present when migration finishes correctly
574 #        total downtime in milliseconds for the guest.
575 #        (since 1.3)
576 #
577 # @expected-downtime: #optional only present while migration is active
578 #        expected downtime in milliseconds for the guest in last walk
579 #        of the dirty bitmap. (since 1.3)
580 #
581 # Since: 0.14.0
582 ##
583 { 'type': 'MigrationInfo',
584   'data': {'*status': 'str', '*ram': 'MigrationStats',
585            '*disk': 'MigrationStats',
586            '*xbzrle-cache': 'XBZRLECacheStats',
587            '*total-time': 'int',
588            '*expected-downtime': 'int',
589            '*downtime': 'int'} }
590
591 ##
592 # @query-migrate
593 #
594 # Returns information about current migration process.
595 #
596 # Returns: @MigrationInfo
597 #
598 # Since: 0.14.0
599 ##
600 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
601
602 ##
603 # @MigrationCapability
604 #
605 # Migration capabilities enumeration
606 #
607 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
608 #          This feature allows us to minimize migration traffic for certain work
609 #          loads, by sending compressed difference of the pages
610 #
611 # @x-rdma-pin-all: Controls whether or not the entire VM memory footprint is
612 #          mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
613 #          Disabled by default. Experimental: may (or may not) be renamed after
614 #          further testing is complete. (since 1.6)
615 #
616 # Since: 1.2
617 ##
618 { 'enum': 'MigrationCapability',
619   'data': ['xbzrle', 'x-rdma-pin-all'] }
620
621 ##
622 # @MigrationCapabilityStatus
623 #
624 # Migration capability information
625 #
626 # @capability: capability enum
627 #
628 # @state: capability state bool
629 #
630 # Since: 1.2
631 ##
632 { 'type': 'MigrationCapabilityStatus',
633   'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
634
635 ##
636 # @migrate-set-capabilities
637 #
638 # Enable/Disable the following migration capabilities (like xbzrle)
639 #
640 # @capabilities: json array of capability modifications to make
641 #
642 # Since: 1.2
643 ##
644 { 'command': 'migrate-set-capabilities',
645   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
646
647 ##
648 # @query-migrate-capabilities
649 #
650 # Returns information about the current migration capabilities status
651 #
652 # Returns: @MigrationCapabilitiesStatus
653 #
654 # Since: 1.2
655 ##
656 { 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}
657
658 ##
659 # @MouseInfo:
660 #
661 # Information about a mouse device.
662 #
663 # @name: the name of the mouse device
664 #
665 # @index: the index of the mouse device
666 #
667 # @current: true if this device is currently receiving mouse events
668 #
669 # @absolute: true if this device supports absolute coordinates as input
670 #
671 # Since: 0.14.0
672 ##
673 { 'type': 'MouseInfo',
674   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
675            'absolute': 'bool'} }
676
677 ##
678 # @query-mice:
679 #
680 # Returns information about each active mouse device
681 #
682 # Returns: a list of @MouseInfo for each device
683 #
684 # Since: 0.14.0
685 ##
686 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
687
688 ##
689 # @CpuInfo:
690 #
691 # Information about a virtual CPU
692 #
693 # @CPU: the index of the virtual CPU
694 #
695 # @current: this only exists for backwards compatible and should be ignored
696 #
697 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
698 #          to a processor specific low power mode.
699 #
700 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
701 #                pointer.
702 #                If the target is Sparc, this is the PC component of the
703 #                instruction pointer.
704 #
705 # @nip: #optional If the target is PPC, the instruction pointer
706 #
707 # @npc: #optional If the target is Sparc, the NPC component of the instruction
708 #                 pointer
709 #
710 # @PC: #optional If the target is MIPS, the instruction pointer
711 #
712 # @thread_id: ID of the underlying host thread
713 #
714 # Since: 0.14.0
715 #
716 # Notes: @halted is a transient state that changes frequently.  By the time the
717 #        data is sent to the client, the guest may no longer be halted.
718 ##
719 { 'type': 'CpuInfo',
720   'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
721            '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
722
723 ##
724 # @query-cpus:
725 #
726 # Returns a list of information about each virtual CPU.
727 #
728 # Returns: a list of @CpuInfo for each virtual CPU
729 #
730 # Since: 0.14.0
731 ##
732 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
733
734 ##
735 # @BlockDeviceInfo:
736 #
737 # Information about the backing device for a block device.
738 #
739 # @file: the filename of the backing device
740 #
741 # @ro: true if the backing device was open read-only
742 #
743 # @drv: the name of the block format used to open the backing device. As of
744 #       0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
745 #       'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
746 #       'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
747 #       'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
748 #
749 # @backing_file: #optional the name of the backing file (for copy-on-write)
750 #
751 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
752 #
753 # @encrypted: true if the backing device is encrypted
754 #
755 # @encryption_key_missing: true if the backing device is encrypted but an
756 #                          valid encryption key is missing
757 #
758 # @bps: total throughput limit in bytes per second is specified
759 #
760 # @bps_rd: read throughput limit in bytes per second is specified
761 #
762 # @bps_wr: write throughput limit in bytes per second is specified
763 #
764 # @iops: total I/O operations per second is specified
765 #
766 # @iops_rd: read I/O operations per second is specified
767 #
768 # @iops_wr: write I/O operations per second is specified
769 #
770 # @image: the info of image used (since: 1.6)
771 #
772 # Since: 0.14.0
773 #
774 # Notes: This interface is only found in @BlockInfo.
775 ##
776 { 'type': 'BlockDeviceInfo',
777   'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
778             '*backing_file': 'str', 'backing_file_depth': 'int',
779             'encrypted': 'bool', 'encryption_key_missing': 'bool',
780             'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
781             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
782             'image': 'ImageInfo' } }
783
784 ##
785 # @BlockDeviceIoStatus:
786 #
787 # An enumeration of block device I/O status.
788 #
789 # @ok: The last I/O operation has succeeded
790 #
791 # @failed: The last I/O operation has failed
792 #
793 # @nospace: The last I/O operation has failed due to a no-space condition
794 #
795 # Since: 1.0
796 ##
797 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
798
799 ##
800 # @BlockDirtyInfo:
801 #
802 # Block dirty bitmap information.
803 #
804 # @count: number of dirty bytes according to the dirty bitmap
805 #
806 # @granularity: granularity of the dirty bitmap in bytes (since 1.4)
807 #
808 # Since: 1.3
809 ##
810 { 'type': 'BlockDirtyInfo',
811   'data': {'count': 'int', 'granularity': 'int'} }
812
813 ##
814 # @BlockInfo:
815 #
816 # Block device information.  This structure describes a virtual device and
817 # the backing device associated with it.
818 #
819 # @device: The device name associated with the virtual device.
820 #
821 # @type: This field is returned only for compatibility reasons, it should
822 #        not be used (always returns 'unknown')
823 #
824 # @removable: True if the device supports removable media.
825 #
826 # @locked: True if the guest has locked this device from having its media
827 #          removed
828 #
829 # @tray_open: #optional True if the device has a tray and it is open
830 #             (only present if removable is true)
831 #
832 # @dirty: #optional dirty bitmap information (only present if the dirty
833 #         bitmap is enabled)
834 #
835 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
836 #             supports it and the VM is configured to stop on errors
837 #
838 # @inserted: #optional @BlockDeviceInfo describing the device if media is
839 #            present
840 #
841 # Since:  0.14.0
842 ##
843 { 'type': 'BlockInfo',
844   'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
845            'locked': 'bool', '*inserted': 'BlockDeviceInfo',
846            '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
847            '*dirty': 'BlockDirtyInfo' } }
848
849 ##
850 # @query-block:
851 #
852 # Get a list of BlockInfo for all virtual block devices.
853 #
854 # Returns: a list of @BlockInfo describing each virtual block device
855 #
856 # Since: 0.14.0
857 ##
858 { 'command': 'query-block', 'returns': ['BlockInfo'] }
859
860 ##
861 # @BlockDeviceStats:
862 #
863 # Statistics of a virtual block device or a block backing device.
864 #
865 # @rd_bytes:      The number of bytes read by the device.
866 #
867 # @wr_bytes:      The number of bytes written by the device.
868 #
869 # @rd_operations: The number of read operations performed by the device.
870 #
871 # @wr_operations: The number of write operations performed by the device.
872 #
873 # @flush_operations: The number of cache flush operations performed by the
874 #                    device (since 0.15.0)
875 #
876 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
877 #                       (since 0.15.0).
878 #
879 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
880 #
881 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
882 #
883 # @wr_highest_offset: The offset after the greatest byte written to the
884 #                     device.  The intended use of this information is for
885 #                     growable sparse files (like qcow2) that are used on top
886 #                     of a physical device.
887 #
888 # Since: 0.14.0
889 ##
890 { 'type': 'BlockDeviceStats',
891   'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
892            'wr_operations': 'int', 'flush_operations': 'int',
893            'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
894            'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
895
896 ##
897 # @BlockStats:
898 #
899 # Statistics of a virtual block device or a block backing device.
900 #
901 # @device: #optional If the stats are for a virtual block device, the name
902 #          corresponding to the virtual block device.
903 #
904 # @stats:  A @BlockDeviceStats for the device.
905 #
906 # @parent: #optional This may point to the backing block device if this is a
907 #          a virtual block device.  If it's a backing block, this will point
908 #          to the backing file is one is present.
909 #
910 # Since: 0.14.0
911 ##
912 { 'type': 'BlockStats',
913   'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
914            '*parent': 'BlockStats'} }
915
916 ##
917 # @query-blockstats:
918 #
919 # Query the @BlockStats for all virtual block devices.
920 #
921 # Returns: A list of @BlockStats for each virtual block devices.
922 #
923 # Since: 0.14.0
924 ##
925 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
926
927 ##
928 # @VncClientInfo:
929 #
930 # Information about a connected VNC client.
931 #
932 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
933 #        when possible.
934 #
935 # @family: 'ipv6' if the client is connected via IPv6 and TCP
936 #          'ipv4' if the client is connected via IPv4 and TCP
937 #          'unix' if the client is connected via a unix domain socket
938 #          'unknown' otherwise
939 #
940 # @service: The service name of the client's port.  This may depends on the
941 #           host system's service database so symbolic names should not be
942 #           relied on.
943 #
944 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
945 #              Name of the client.
946 #
947 # @sasl_username: #optional If SASL authentication is in use, the SASL username
948 #                 used for authentication.
949 #
950 # Since: 0.14.0
951 ##
952 { 'type': 'VncClientInfo',
953   'data': {'host': 'str', 'family': 'str', 'service': 'str',
954            '*x509_dname': 'str', '*sasl_username': 'str'} }
955
956 ##
957 # @VncInfo:
958 #
959 # Information about the VNC session.
960 #
961 # @enabled: true if the VNC server is enabled, false otherwise
962 #
963 # @host: #optional The hostname the VNC server is bound to.  This depends on
964 #        the name resolution on the host and may be an IP address.
965 #
966 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
967 #                    'ipv4' if the host is listening for IPv4 connections
968 #                    'unix' if the host is listening on a unix domain socket
969 #                    'unknown' otherwise
970 #
971 # @service: #optional The service name of the server's port.  This may depends
972 #           on the host system's service database so symbolic names should not
973 #           be relied on.
974 #
975 # @auth: #optional the current authentication type used by the server
976 #        'none' if no authentication is being used
977 #        'vnc' if VNC authentication is being used
978 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
979 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
980 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
981 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
982 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
983 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
984 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
985 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
986 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
987 #
988 # @clients: a list of @VncClientInfo of all currently connected clients
989 #
990 # Since: 0.14.0
991 ##
992 { 'type': 'VncInfo',
993   'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
994            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
995
996 ##
997 # @query-vnc:
998 #
999 # Returns information about the current VNC server
1000 #
1001 # Returns: @VncInfo
1002 #
1003 # Since: 0.14.0
1004 ##
1005 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1006
1007 ##
1008 # @SpiceChannel
1009 #
1010 # Information about a SPICE client channel.
1011 #
1012 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
1013 #        when possible.
1014 #
1015 # @family: 'ipv6' if the client is connected via IPv6 and TCP
1016 #          'ipv4' if the client is connected via IPv4 and TCP
1017 #          'unix' if the client is connected via a unix domain socket
1018 #          'unknown' otherwise
1019 #
1020 # @port: The client's port number.
1021 #
1022 # @connection-id: SPICE connection id number.  All channels with the same id
1023 #                 belong to the same SPICE session.
1024 #
1025 # @connection-type: SPICE channel type number.  "1" is the main control
1026 #                   channel, filter for this one if you want to track spice
1027 #                   sessions only
1028 #
1029 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
1030 #              multiple channels of the same type exist, such as multiple
1031 #              display channels in a multihead setup
1032 #
1033 # @tls: true if the channel is encrypted, false otherwise.
1034 #
1035 # Since: 0.14.0
1036 ##
1037 { 'type': 'SpiceChannel',
1038   'data': {'host': 'str', 'family': 'str', 'port': 'str',
1039            'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1040            'tls': 'bool'} }
1041
1042 ##
1043 # @SpiceQueryMouseMode
1044 #
1045 # An enumeration of Spice mouse states.
1046 #
1047 # @client: Mouse cursor position is determined by the client.
1048 #
1049 # @server: Mouse cursor position is determined by the server.
1050 #
1051 # @unknown: No information is available about mouse mode used by
1052 #           the spice server.
1053 #
1054 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1055 #
1056 # Since: 1.1
1057 ##
1058 { 'enum': 'SpiceQueryMouseMode',
1059   'data': [ 'client', 'server', 'unknown' ] }
1060
1061 ##
1062 # @SpiceInfo
1063 #
1064 # Information about the SPICE session.
1065 #
1066 # @enabled: true if the SPICE server is enabled, false otherwise
1067 #
1068 # @migrated: true if the last guest migration completed and spice
1069 #            migration had completed as well. false otherwise.
1070 #
1071 # @host: #optional The hostname the SPICE server is bound to.  This depends on
1072 #        the name resolution on the host and may be an IP address.
1073 #
1074 # @port: #optional The SPICE server's port number.
1075 #
1076 # @compiled-version: #optional SPICE server version.
1077 #
1078 # @tls-port: #optional The SPICE server's TLS port number.
1079 #
1080 # @auth: #optional the current authentication type used by the server
1081 #        'none'  if no authentication is being used
1082 #        'spice' uses SASL or direct TLS authentication, depending on command
1083 #                line options
1084 #
1085 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1086 #              be determined by the client or the server, or unknown if spice
1087 #              server doesn't provide this information.
1088 #
1089 #              Since: 1.1
1090 #
1091 # @channels: a list of @SpiceChannel for each active spice channel
1092 #
1093 # Since: 0.14.0
1094 ##
1095 { 'type': 'SpiceInfo',
1096   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1097            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1098            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1099
1100 ##
1101 # @query-spice
1102 #
1103 # Returns information about the current SPICE server
1104 #
1105 # Returns: @SpiceInfo
1106 #
1107 # Since: 0.14.0
1108 ##
1109 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1110
1111 ##
1112 # @BalloonInfo:
1113 #
1114 # Information about the guest balloon device.
1115 #
1116 # @actual: the number of bytes the balloon currently contains
1117 #
1118 # Since: 0.14.0
1119 #
1120 ##
1121 { 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
1122
1123 ##
1124 # @query-balloon:
1125 #
1126 # Return information about the balloon device.
1127 #
1128 # Returns: @BalloonInfo on success
1129 #          If the balloon driver is enabled but not functional because the KVM
1130 #          kernel module cannot support it, KvmMissingCap
1131 #          If no balloon device is present, DeviceNotActive
1132 #
1133 # Since: 0.14.0
1134 ##
1135 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1136
1137 ##
1138 # @PciMemoryRange:
1139 #
1140 # A PCI device memory region
1141 #
1142 # @base: the starting address (guest physical)
1143 #
1144 # @limit: the ending address (guest physical)
1145 #
1146 # Since: 0.14.0
1147 ##
1148 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1149
1150 ##
1151 # @PciMemoryRegion
1152 #
1153 # Information about a PCI device I/O region.
1154 #
1155 # @bar: the index of the Base Address Register for this region
1156 #
1157 # @type: 'io' if the region is a PIO region
1158 #        'memory' if the region is a MMIO region
1159 #
1160 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1161 #
1162 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1163 #
1164 # Since: 0.14.0
1165 ##
1166 { 'type': 'PciMemoryRegion',
1167   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1168            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1169
1170 ##
1171 # @PciBridgeInfo:
1172 #
1173 # Information about a PCI Bridge device
1174 #
1175 # @bus.number: primary bus interface number.  This should be the number of the
1176 #              bus the device resides on.
1177 #
1178 # @bus.secondary: secondary bus interface number.  This is the number of the
1179 #                 main bus for the bridge
1180 #
1181 # @bus.subordinate: This is the highest number bus that resides below the
1182 #                   bridge.
1183 #
1184 # @bus.io_range: The PIO range for all devices on this bridge
1185 #
1186 # @bus.memory_range: The MMIO range for all devices on this bridge
1187 #
1188 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1189 #                          this bridge
1190 #
1191 # @devices: a list of @PciDeviceInfo for each device on this bridge
1192 #
1193 # Since: 0.14.0
1194 ##
1195 { 'type': 'PciBridgeInfo',
1196   'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1197                     'io_range': 'PciMemoryRange',
1198                     'memory_range': 'PciMemoryRange',
1199                     'prefetchable_range': 'PciMemoryRange' },
1200            '*devices': ['PciDeviceInfo']} }
1201
1202 ##
1203 # @PciDeviceInfo:
1204 #
1205 # Information about a PCI device
1206 #
1207 # @bus: the bus number of the device
1208 #
1209 # @slot: the slot the device is located in
1210 #
1211 # @function: the function of the slot used by the device
1212 #
1213 # @class_info.desc: #optional a string description of the device's class
1214 #
1215 # @class_info.class: the class code of the device
1216 #
1217 # @id.device: the PCI device id
1218 #
1219 # @id.vendor: the PCI vendor id
1220 #
1221 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1222 #
1223 # @qdev_id: the device name of the PCI device
1224 #
1225 # @pci_bridge: if the device is a PCI bridge, the bridge information
1226 #
1227 # @regions: a list of the PCI I/O regions associated with the device
1228 #
1229 # Notes: the contents of @class_info.desc are not stable and should only be
1230 #        treated as informational.
1231 #
1232 # Since: 0.14.0
1233 ##
1234 { 'type': 'PciDeviceInfo',
1235   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1236            'class_info': {'*desc': 'str', 'class': 'int'},
1237            'id': {'device': 'int', 'vendor': 'int'},
1238            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1239            'regions': ['PciMemoryRegion']} }
1240
1241 ##
1242 # @PciInfo:
1243 #
1244 # Information about a PCI bus
1245 #
1246 # @bus: the bus index
1247 #
1248 # @devices: a list of devices on this bus
1249 #
1250 # Since: 0.14.0
1251 ##
1252 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1253
1254 ##
1255 # @query-pci:
1256 #
1257 # Return information about the PCI bus topology of the guest.
1258 #
1259 # Returns: a list of @PciInfo for each PCI bus
1260 #
1261 # Since: 0.14.0
1262 ##
1263 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1264
1265 ##
1266 # @BlockdevOnError:
1267 #
1268 # An enumeration of possible behaviors for errors on I/O operations.
1269 # The exact meaning depends on whether the I/O was initiated by a guest
1270 # or by a block job
1271 #
1272 # @report: for guest operations, report the error to the guest;
1273 #          for jobs, cancel the job
1274 #
1275 # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1276 #          or BLOCK_JOB_ERROR)
1277 #
1278 # @enospc: same as @stop on ENOSPC, same as @report otherwise.
1279 #
1280 # @stop: for guest operations, stop the virtual machine;
1281 #        for jobs, pause the job
1282 #
1283 # Since: 1.3
1284 ##
1285 { 'enum': 'BlockdevOnError',
1286   'data': ['report', 'ignore', 'enospc', 'stop'] }
1287
1288 ##
1289 # @MirrorSyncMode:
1290 #
1291 # An enumeration of possible behaviors for the initial synchronization
1292 # phase of storage mirroring.
1293 #
1294 # @top: copies data in the topmost image to the destination
1295 #
1296 # @full: copies data from all images to the destination
1297 #
1298 # @none: only copy data written from now on
1299 #
1300 # Since: 1.3
1301 ##
1302 { 'enum': 'MirrorSyncMode',
1303   'data': ['top', 'full', 'none'] }
1304
1305 ##
1306 # @BlockJobInfo:
1307 #
1308 # Information about a long-running block device operation.
1309 #
1310 # @type: the job type ('stream' for image streaming)
1311 #
1312 # @device: the block device name
1313 #
1314 # @len: the maximum progress value
1315 #
1316 # @busy: false if the job is known to be in a quiescent state, with
1317 #        no pending I/O.  Since 1.3.
1318 #
1319 # @paused: whether the job is paused or, if @busy is true, will
1320 #          pause itself as soon as possible.  Since 1.3.
1321 #
1322 # @offset: the current progress value
1323 #
1324 # @speed: the rate limit, bytes per second
1325 #
1326 # @io-status: the status of the job (since 1.3)
1327 #
1328 # Since: 1.1
1329 ##
1330 { 'type': 'BlockJobInfo',
1331   'data': {'type': 'str', 'device': 'str', 'len': 'int',
1332            'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1333            'io-status': 'BlockDeviceIoStatus'} }
1334
1335 ##
1336 # @query-block-jobs:
1337 #
1338 # Return information about long-running block device operations.
1339 #
1340 # Returns: a list of @BlockJobInfo for each active block job
1341 #
1342 # Since: 1.1
1343 ##
1344 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1345
1346 ##
1347 # @quit:
1348 #
1349 # This command will cause the QEMU process to exit gracefully.  While every
1350 # attempt is made to send the QMP response before terminating, this is not
1351 # guaranteed.  When using this interface, a premature EOF would not be
1352 # unexpected.
1353 #
1354 # Since: 0.14.0
1355 ##
1356 { 'command': 'quit' }
1357
1358 ##
1359 # @stop:
1360 #
1361 # Stop all guest VCPU execution.
1362 #
1363 # Since:  0.14.0
1364 #
1365 # Notes:  This function will succeed even if the guest is already in the stopped
1366 #         state.  In "inmigrate" state, it will ensure that the guest
1367 #         remains paused once migration finishes, as if the -S option was
1368 #         passed on the command line.
1369 ##
1370 { 'command': 'stop' }
1371
1372 ##
1373 # @system_reset:
1374 #
1375 # Performs a hard reset of a guest.
1376 #
1377 # Since: 0.14.0
1378 ##
1379 { 'command': 'system_reset' }
1380
1381 ##
1382 # @system_powerdown:
1383 #
1384 # Requests that a guest perform a powerdown operation.
1385 #
1386 # Since: 0.14.0
1387 #
1388 # Notes: A guest may or may not respond to this command.  This command
1389 #        returning does not indicate that a guest has accepted the request or
1390 #        that it has shut down.  Many guests will respond to this command by
1391 #        prompting the user in some way.
1392 ##
1393 { 'command': 'system_powerdown' }
1394
1395 ##
1396 # @cpu:
1397 #
1398 # This command is a nop that is only provided for the purposes of compatibility.
1399 #
1400 # Since: 0.14.0
1401 #
1402 # Notes: Do not use this command.
1403 ##
1404 { 'command': 'cpu', 'data': {'index': 'int'} }
1405
1406 ##
1407 # @cpu-add
1408 #
1409 # Adds CPU with specified ID
1410 #
1411 # @id: ID of CPU to be created, valid values [0..max_cpus)
1412 #
1413 # Returns: Nothing on success
1414 #
1415 # Since 1.5
1416 ##
1417 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1418
1419 ##
1420 # @memsave:
1421 #
1422 # Save a portion of guest memory to a file.
1423 #
1424 # @val: the virtual address of the guest to start from
1425 #
1426 # @size: the size of memory region to save
1427 #
1428 # @filename: the file to save the memory to as binary data
1429 #
1430 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1431 #                       virtual address (defaults to CPU 0)
1432 #
1433 # Returns: Nothing on success
1434 #
1435 # Since: 0.14.0
1436 #
1437 # Notes: Errors were not reliably returned until 1.1
1438 ##
1439 { 'command': 'memsave',
1440   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1441
1442 ##
1443 # @pmemsave:
1444 #
1445 # Save a portion of guest physical memory to a file.
1446 #
1447 # @val: the physical address of the guest to start from
1448 #
1449 # @size: the size of memory region to save
1450 #
1451 # @filename: the file to save the memory to as binary data
1452 #
1453 # Returns: Nothing on success
1454 #
1455 # Since: 0.14.0
1456 #
1457 # Notes: Errors were not reliably returned until 1.1
1458 ##
1459 { 'command': 'pmemsave',
1460   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1461
1462 ##
1463 # @cont:
1464 #
1465 # Resume guest VCPU execution.
1466 #
1467 # Since:  0.14.0
1468 #
1469 # Returns:  If successful, nothing
1470 #           If QEMU was started with an encrypted block device and a key has
1471 #              not yet been set, DeviceEncrypted.
1472 #
1473 # Notes:  This command will succeed if the guest is currently running.  It
1474 #         will also succeed if the guest is in the "inmigrate" state; in
1475 #         this case, the effect of the command is to make sure the guest
1476 #         starts once migration finishes, removing the effect of the -S
1477 #         command line option if it was passed.
1478 ##
1479 { 'command': 'cont' }
1480
1481 ##
1482 # @system_wakeup:
1483 #
1484 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1485 #
1486 # Since:  1.1
1487 #
1488 # Returns:  nothing.
1489 ##
1490 { 'command': 'system_wakeup' }
1491
1492 ##
1493 # @inject-nmi:
1494 #
1495 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1496 #
1497 # Returns:  If successful, nothing
1498 #
1499 # Since:  0.14.0
1500 #
1501 # Notes: Only x86 Virtual Machines support this command.
1502 ##
1503 { 'command': 'inject-nmi' }
1504
1505 ##
1506 # @set_link:
1507 #
1508 # Sets the link status of a virtual network adapter.
1509 #
1510 # @name: the device name of the virtual network adapter
1511 #
1512 # @up: true to set the link status to be up
1513 #
1514 # Returns: Nothing on success
1515 #          If @name is not a valid network device, DeviceNotFound
1516 #
1517 # Since: 0.14.0
1518 #
1519 # Notes: Not all network adapters support setting link status.  This command
1520 #        will succeed even if the network adapter does not support link status
1521 #        notification.
1522 ##
1523 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1524
1525 ##
1526 # @block_passwd:
1527 #
1528 # This command sets the password of a block device that has not been open
1529 # with a password and requires one.
1530 #
1531 # The two cases where this can happen are a block device is created through
1532 # QEMU's initial command line or a block device is changed through the legacy
1533 # @change interface.
1534 #
1535 # In the event that the block device is created through the initial command
1536 # line, the VM will start in the stopped state regardless of whether '-S' is
1537 # used.  The intention is for a management tool to query the block devices to
1538 # determine which ones are encrypted, set the passwords with this command, and
1539 # then start the guest with the @cont command.
1540 #
1541 # @device:   the name of the device to set the password on
1542 #
1543 # @password: the password to use for the device
1544 #
1545 # Returns: nothing on success
1546 #          If @device is not a valid block device, DeviceNotFound
1547 #          If @device is not encrypted, DeviceNotEncrypted
1548 #
1549 # Notes:  Not all block formats support encryption and some that do are not
1550 #         able to validate that a password is correct.  Disk corruption may
1551 #         occur if an invalid password is specified.
1552 #
1553 # Since: 0.14.0
1554 ##
1555 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1556
1557 ##
1558 # @balloon:
1559 #
1560 # Request the balloon driver to change its balloon size.
1561 #
1562 # @value: the target size of the balloon in bytes
1563 #
1564 # Returns: Nothing on success
1565 #          If the balloon driver is enabled but not functional because the KVM
1566 #            kernel module cannot support it, KvmMissingCap
1567 #          If no balloon device is present, DeviceNotActive
1568 #
1569 # Notes: This command just issues a request to the guest.  When it returns,
1570 #        the balloon size may not have changed.  A guest can change the balloon
1571 #        size independent of this command.
1572 #
1573 # Since: 0.14.0
1574 ##
1575 { 'command': 'balloon', 'data': {'value': 'int'} }
1576
1577 ##
1578 # @block_resize
1579 #
1580 # Resize a block image while a guest is running.
1581 #
1582 # @device:  the name of the device to get the image resized
1583 #
1584 # @size:  new image size in bytes
1585 #
1586 # Returns: nothing on success
1587 #          If @device is not a valid block device, DeviceNotFound
1588 #
1589 # Since: 0.14.0
1590 ##
1591 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1592
1593 ##
1594 # @NewImageMode
1595 #
1596 # An enumeration that tells QEMU how to set the backing file path in
1597 # a new image file.
1598 #
1599 # @existing: QEMU should look for an existing image file.
1600 #
1601 # @absolute-paths: QEMU should create a new image with absolute paths
1602 # for the backing file.
1603 #
1604 # Since: 1.1
1605 ##
1606 { 'enum': 'NewImageMode',
1607   'data': [ 'existing', 'absolute-paths' ] }
1608
1609 ##
1610 # @BlockdevSnapshot
1611 #
1612 # @device:  the name of the device to generate the snapshot from.
1613 #
1614 # @snapshot-file: the target of the new image. A new file will be created.
1615 #
1616 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1617 #
1618 # @mode: #optional whether and how QEMU should create a new image, default is
1619 #        'absolute-paths'.
1620 ##
1621 { 'type': 'BlockdevSnapshot',
1622   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1623             '*mode': 'NewImageMode' } }
1624
1625 ##
1626 # @DriveBackup
1627 #
1628 # @device: the name of the device which should be copied.
1629 #
1630 # @target: the target of the new image. If the file exists, or if it
1631 #          is a device, the existing file/device will be used as the new
1632 #          destination.  If it does not exist, a new file will be created.
1633 #
1634 # @format: #optional the format of the new destination, default is to
1635 #          probe if @mode is 'existing', else the format of the source
1636 #
1637 # @mode: #optional whether and how QEMU should create a new image, default is
1638 #        'absolute-paths'.
1639 #
1640 # @speed: #optional the maximum speed, in bytes per second
1641 #
1642 # @on-source-error: #optional the action to take on an error on the source,
1643 #                   default 'report'.  'stop' and 'enospc' can only be used
1644 #                   if the block device supports io-status (see BlockInfo).
1645 #
1646 # @on-target-error: #optional the action to take on an error on the target,
1647 #                   default 'report' (no limitations, since this applies to
1648 #                   a different block device than @device).
1649 #
1650 # Note that @on-source-error and @on-target-error only affect background I/O.
1651 # If an error occurs during a guest write request, the device's rerror/werror
1652 # actions will be used.
1653 #
1654 # Since: 1.6
1655 ##
1656 { 'type': 'DriveBackup',
1657   'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1658             '*mode': 'NewImageMode', '*speed': 'int',
1659             '*on-source-error': 'BlockdevOnError',
1660             '*on-target-error': 'BlockdevOnError' } }
1661
1662 ##
1663 # @Abort
1664 #
1665 # This action can be used to test transaction failure.
1666 #
1667 # Since: 1.6
1668 ###
1669 { 'type': 'Abort',
1670   'data': { } }
1671
1672 ##
1673 # @TransactionAction
1674 #
1675 # A discriminated record of operations that can be performed with
1676 # @transaction.
1677 ##
1678 { 'union': 'TransactionAction',
1679   'data': {
1680        'blockdev-snapshot-sync': 'BlockdevSnapshot',
1681        'drive-backup': 'DriveBackup',
1682        'abort': 'Abort'
1683    } }
1684
1685 ##
1686 # @transaction
1687 #
1688 # Executes a number of transactionable QMP commands atomically. If any
1689 # operation fails, then the entire set of actions will be abandoned and the
1690 # appropriate error returned.
1691 #
1692 #  List of:
1693 #  @TransactionAction: information needed for the respective operation
1694 #
1695 # Returns: nothing on success
1696 #          Errors depend on the operations of the transaction
1697 #
1698 # Note: The transaction aborts on the first failure.  Therefore, there will be
1699 # information on only one failed operation returned in an error condition, and
1700 # subsequent actions will not have been attempted.
1701 #
1702 # Since 1.1
1703 ##
1704 { 'command': 'transaction',
1705   'data': { 'actions': [ 'TransactionAction' ] } }
1706
1707 ##
1708 # @blockdev-snapshot-sync
1709 #
1710 # Generates a synchronous snapshot of a block device.
1711 #
1712 # @device:  the name of the device to generate the snapshot from.
1713 #
1714 # @snapshot-file: the target of the new image. If the file exists, or if it
1715 #                 is a device, the snapshot will be created in the existing
1716 #                 file/device. If does not exist, a new file will be created.
1717 #
1718 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1719 #
1720 # @mode: #optional whether and how QEMU should create a new image, default is
1721 #        'absolute-paths'.
1722 #
1723 # Returns: nothing on success
1724 #          If @device is not a valid block device, DeviceNotFound
1725 #
1726 # Since 0.14.0
1727 ##
1728 { 'command': 'blockdev-snapshot-sync',
1729   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1730             '*mode': 'NewImageMode'} }
1731
1732 ##
1733 # @human-monitor-command:
1734 #
1735 # Execute a command on the human monitor and return the output.
1736 #
1737 # @command-line: the command to execute in the human monitor
1738 #
1739 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1740 #
1741 # Returns: the output of the command as a string
1742 #
1743 # Since: 0.14.0
1744 #
1745 # Notes: This command only exists as a stop-gap.  It's use is highly
1746 #        discouraged.  The semantics of this command are not guaranteed.
1747 #
1748 #        Known limitations:
1749 #
1750 #        o This command is stateless, this means that commands that depend
1751 #          on state information (such as getfd) might not work
1752 #
1753 #       o Commands that prompt the user for data (eg. 'cont' when the block
1754 #         device is encrypted) don't currently work
1755 ##
1756 { 'command': 'human-monitor-command',
1757   'data': {'command-line': 'str', '*cpu-index': 'int'},
1758   'returns': 'str' }
1759
1760 ##
1761 # @block-commit
1762 #
1763 # Live commit of data from overlay image nodes into backing nodes - i.e.,
1764 # writes data between 'top' and 'base' into 'base'.
1765 #
1766 # @device:  the name of the device
1767 #
1768 # @base:   #optional The file name of the backing image to write data into.
1769 #                    If not specified, this is the deepest backing image
1770 #
1771 # @top:              The file name of the backing image within the image chain,
1772 #                    which contains the topmost data to be committed down.
1773 #                    Note, the active layer as 'top' is currently unsupported.
1774 #
1775 #                    If top == base, that is an error.
1776 #
1777 #
1778 # @speed:  #optional the maximum speed, in bytes per second
1779 #
1780 # Returns: Nothing on success
1781 #          If commit or stream is already active on this device, DeviceInUse
1782 #          If @device does not exist, DeviceNotFound
1783 #          If image commit is not supported by this device, NotSupported
1784 #          If @base or @top is invalid, a generic error is returned
1785 #          If @top is the active layer, or omitted, a generic error is returned
1786 #          If @speed is invalid, InvalidParameter
1787 #
1788 # Since: 1.3
1789 #
1790 ##
1791 { 'command': 'block-commit',
1792   'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1793             '*speed': 'int' } }
1794
1795 ##
1796 # @drive-backup
1797 #
1798 # Start a point-in-time copy of a block device to a new destination.  The
1799 # status of ongoing drive-backup operations can be checked with
1800 # query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
1801 # The operation can be stopped before it has completed using the
1802 # block-job-cancel command.
1803 #
1804 # @device: the name of the device which should be copied.
1805 #
1806 # @target: the target of the new image. If the file exists, or if it
1807 #          is a device, the existing file/device will be used as the new
1808 #          destination.  If it does not exist, a new file will be created.
1809 #
1810 # @format: #optional the format of the new destination, default is to
1811 #          probe if @mode is 'existing', else the format of the source
1812 #
1813 # @mode: #optional whether and how QEMU should create a new image, default is
1814 #        'absolute-paths'.
1815 #
1816 # @speed: #optional the maximum speed, in bytes per second
1817 #
1818 # @on-source-error: #optional the action to take on an error on the source,
1819 #                   default 'report'.  'stop' and 'enospc' can only be used
1820 #                   if the block device supports io-status (see BlockInfo).
1821 #
1822 # @on-target-error: #optional the action to take on an error on the target,
1823 #                   default 'report' (no limitations, since this applies to
1824 #                   a different block device than @device).
1825 #
1826 # Note that @on-source-error and @on-target-error only affect background I/O.
1827 # If an error occurs during a guest write request, the device's rerror/werror
1828 # actions will be used.
1829 #
1830 # Returns: nothing on success
1831 #          If @device is not a valid block device, DeviceNotFound
1832 #
1833 # Since 1.6
1834 ##
1835 { 'command': 'drive-backup',
1836   'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1837             '*mode': 'NewImageMode', '*speed': 'int',
1838             '*on-source-error': 'BlockdevOnError',
1839             '*on-target-error': 'BlockdevOnError' } }
1840
1841 ##
1842 # @drive-mirror
1843 #
1844 # Start mirroring a block device's writes to a new destination.
1845 #
1846 # @device:  the name of the device whose writes should be mirrored.
1847 #
1848 # @target: the target of the new image. If the file exists, or if it
1849 #          is a device, the existing file/device will be used as the new
1850 #          destination.  If it does not exist, a new file will be created.
1851 #
1852 # @format: #optional the format of the new destination, default is to
1853 #          probe if @mode is 'existing', else the format of the source
1854 #
1855 # @mode: #optional whether and how QEMU should create a new image, default is
1856 #        'absolute-paths'.
1857 #
1858 # @speed:  #optional the maximum speed, in bytes per second
1859 #
1860 # @sync: what parts of the disk image should be copied to the destination
1861 #        (all the disk, only the sectors allocated in the topmost image, or
1862 #        only new I/O).
1863 #
1864 # @granularity: #optional granularity of the dirty bitmap, default is 64K
1865 #               if the image format doesn't have clusters, 4K if the clusters
1866 #               are smaller than that, else the cluster size.  Must be a
1867 #               power of 2 between 512 and 64M (since 1.4).
1868 #
1869 # @buf-size: #optional maximum amount of data in flight from source to
1870 #            target (since 1.4).
1871 #
1872 # @on-source-error: #optional the action to take on an error on the source,
1873 #                   default 'report'.  'stop' and 'enospc' can only be used
1874 #                   if the block device supports io-status (see BlockInfo).
1875 #
1876 # @on-target-error: #optional the action to take on an error on the target,
1877 #                   default 'report' (no limitations, since this applies to
1878 #                   a different block device than @device).
1879 #
1880 # Returns: nothing on success
1881 #          If @device is not a valid block device, DeviceNotFound
1882 #
1883 # Since 1.3
1884 ##
1885 { 'command': 'drive-mirror',
1886   'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1887             'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
1888             '*speed': 'int', '*granularity': 'uint32',
1889             '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
1890             '*on-target-error': 'BlockdevOnError' } }
1891
1892 ##
1893 # @migrate_cancel
1894 #
1895 # Cancel the current executing migration process.
1896 #
1897 # Returns: nothing on success
1898 #
1899 # Notes: This command succeeds even if there is no migration process running.
1900 #
1901 # Since: 0.14.0
1902 ##
1903 { 'command': 'migrate_cancel' }
1904
1905 ##
1906 # @migrate_set_downtime
1907 #
1908 # Set maximum tolerated downtime for migration.
1909 #
1910 # @value: maximum downtime in seconds
1911 #
1912 # Returns: nothing on success
1913 #
1914 # Since: 0.14.0
1915 ##
1916 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1917
1918 ##
1919 # @migrate_set_speed
1920 #
1921 # Set maximum speed for migration.
1922 #
1923 # @value: maximum speed in bytes.
1924 #
1925 # Returns: nothing on success
1926 #
1927 # Notes: A value lesser than zero will be automatically round up to zero.
1928 #
1929 # Since: 0.14.0
1930 ##
1931 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1932
1933 ##
1934 # @migrate-set-cache-size
1935 #
1936 # Set XBZRLE cache size
1937 #
1938 # @value: cache size in bytes
1939 #
1940 # The size will be rounded down to the nearest power of 2.
1941 # The cache size can be modified before and during ongoing migration
1942 #
1943 # Returns: nothing on success
1944 #
1945 # Since: 1.2
1946 ##
1947 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1948
1949 ##
1950 # @query-migrate-cache-size
1951 #
1952 # query XBZRLE cache size
1953 #
1954 # Returns: XBZRLE cache size in bytes
1955 #
1956 # Since: 1.2
1957 ##
1958 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1959
1960 ##
1961 # @ObjectPropertyInfo:
1962 #
1963 # @name: the name of the property
1964 #
1965 # @type: the type of the property.  This will typically come in one of four
1966 #        forms:
1967 #
1968 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1969 #           These types are mapped to the appropriate JSON type.
1970 #
1971 #        2) A legacy type in the form 'legacy<subtype>' where subtype is the
1972 #           legacy qdev typename.  These types are always treated as strings.
1973 #
1974 #        3) A child type in the form 'child<subtype>' where subtype is a qdev
1975 #           device type name.  Child properties create the composition tree.
1976 #
1977 #        4) A link type in the form 'link<subtype>' where subtype is a qdev
1978 #           device type name.  Link properties form the device model graph.
1979 #
1980 # Since: 1.2
1981 ##
1982 { 'type': 'ObjectPropertyInfo',
1983   'data': { 'name': 'str', 'type': 'str' } }
1984
1985 ##
1986 # @qom-list:
1987 #
1988 # This command will list any properties of a object given a path in the object
1989 # model.
1990 #
1991 # @path: the path within the object model.  See @qom-get for a description of
1992 #        this parameter.
1993 #
1994 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1995 #          object.
1996 #
1997 # Since: 1.2
1998 ##
1999 { 'command': 'qom-list',
2000   'data': { 'path': 'str' },
2001   'returns': [ 'ObjectPropertyInfo' ] }
2002
2003 ##
2004 # @qom-get:
2005 #
2006 # This command will get a property from a object model path and return the
2007 # value.
2008 #
2009 # @path: The path within the object model.  There are two forms of supported
2010 #        paths--absolute and partial paths.
2011 #
2012 #        Absolute paths are derived from the root object and can follow child<>
2013 #        or link<> properties.  Since they can follow link<> properties, they
2014 #        can be arbitrarily long.  Absolute paths look like absolute filenames
2015 #        and are prefixed  with a leading slash.
2016 #
2017 #        Partial paths look like relative filenames.  They do not begin
2018 #        with a prefix.  The matching rules for partial paths are subtle but
2019 #        designed to make specifying objects easy.  At each level of the
2020 #        composition tree, the partial path is matched as an absolute path.
2021 #        The first match is not returned.  At least two matches are searched
2022 #        for.  A successful result is only returned if only one match is
2023 #        found.  If more than one match is found, a flag is return to
2024 #        indicate that the match was ambiguous.
2025 #
2026 # @property: The property name to read
2027 #
2028 # Returns: The property value.  The type depends on the property type.  legacy<>
2029 #          properties are returned as #str.  child<> and link<> properties are
2030 #          returns as #str pathnames.  All integer property types (u8, u16, etc)
2031 #          are returned as #int.
2032 #
2033 # Since: 1.2
2034 ##
2035 { 'command': 'qom-get',
2036   'data': { 'path': 'str', 'property': 'str' },
2037   'returns': 'visitor',
2038   'gen': 'no' }
2039
2040 ##
2041 # @qom-set:
2042 #
2043 # This command will set a property from a object model path.
2044 #
2045 # @path: see @qom-get for a description of this parameter
2046 #
2047 # @property: the property name to set
2048 #
2049 # @value: a value who's type is appropriate for the property type.  See @qom-get
2050 #         for a description of type mapping.
2051 #
2052 # Since: 1.2
2053 ##
2054 { 'command': 'qom-set',
2055   'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
2056   'gen': 'no' }
2057
2058 ##
2059 # @set_password:
2060 #
2061 # Sets the password of a remote display session.
2062 #
2063 # @protocol: `vnc' to modify the VNC server password
2064 #            `spice' to modify the Spice server password
2065 #
2066 # @password: the new password
2067 #
2068 # @connected: #optional how to handle existing clients when changing the
2069 #                       password.  If nothing is specified, defaults to `keep'
2070 #                       `fail' to fail the command if clients are connected
2071 #                       `disconnect' to disconnect existing clients
2072 #                       `keep' to maintain existing clients
2073 #
2074 # Returns: Nothing on success
2075 #          If Spice is not enabled, DeviceNotFound
2076 #
2077 # Since: 0.14.0
2078 ##
2079 { 'command': 'set_password',
2080   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2081
2082 ##
2083 # @expire_password:
2084 #
2085 # Expire the password of a remote display server.
2086 #
2087 # @protocol: the name of the remote display protocol `vnc' or `spice'
2088 #
2089 # @time: when to expire the password.
2090 #        `now' to expire the password immediately
2091 #        `never' to cancel password expiration
2092 #        `+INT' where INT is the number of seconds from now (integer)
2093 #        `INT' where INT is the absolute time in seconds
2094 #
2095 # Returns: Nothing on success
2096 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
2097 #
2098 # Since: 0.14.0
2099 #
2100 # Notes: Time is relative to the server and currently there is no way to
2101 #        coordinate server time with client time.  It is not recommended to
2102 #        use the absolute time version of the @time parameter unless you're
2103 #        sure you are on the same machine as the QEMU instance.
2104 ##
2105 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2106
2107 ##
2108 # @eject:
2109 #
2110 # Ejects a device from a removable drive.
2111 #
2112 # @device:  The name of the device
2113 #
2114 # @force:   @optional If true, eject regardless of whether the drive is locked.
2115 #           If not specified, the default value is false.
2116 #
2117 # Returns:  Nothing on success
2118 #           If @device is not a valid block device, DeviceNotFound
2119 #
2120 # Notes:    Ejecting a device will no media results in success
2121 #
2122 # Since: 0.14.0
2123 ##
2124 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
2125
2126 ##
2127 # @change-vnc-password:
2128 #
2129 # Change the VNC server password.
2130 #
2131 # @target:  the new password to use with VNC authentication
2132 #
2133 # Since: 1.1
2134 #
2135 # Notes:  An empty password in this command will set the password to the empty
2136 #         string.  Existing clients are unaffected by executing this command.
2137 ##
2138 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2139
2140 ##
2141 # @change:
2142 #
2143 # This command is multiple commands multiplexed together.
2144 #
2145 # @device: This is normally the name of a block device but it may also be 'vnc'.
2146 #          when it's 'vnc', then sub command depends on @target
2147 #
2148 # @target: If @device is a block device, then this is the new filename.
2149 #          If @device is 'vnc', then if the value 'password' selects the vnc
2150 #          change password command.   Otherwise, this specifies a new server URI
2151 #          address to listen to for VNC connections.
2152 #
2153 # @arg:    If @device is a block device, then this is an optional format to open
2154 #          the device with.
2155 #          If @device is 'vnc' and @target is 'password', this is the new VNC
2156 #          password to set.  If this argument is an empty string, then no future
2157 #          logins will be allowed.
2158 #
2159 # Returns: Nothing on success.
2160 #          If @device is not a valid block device, DeviceNotFound
2161 #          If the new block device is encrypted, DeviceEncrypted.  Note that
2162 #          if this error is returned, the device has been opened successfully
2163 #          and an additional call to @block_passwd is required to set the
2164 #          device's password.  The behavior of reads and writes to the block
2165 #          device between when these calls are executed is undefined.
2166 #
2167 # Notes:  It is strongly recommended that this interface is not used especially
2168 #         for changing block devices.
2169 #
2170 # Since: 0.14.0
2171 ##
2172 { 'command': 'change',
2173   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2174
2175 ##
2176 # @block_set_io_throttle:
2177 #
2178 # Change I/O throttle limits for a block drive.
2179 #
2180 # @device: The name of the device
2181 #
2182 # @bps: total throughput limit in bytes per second
2183 #
2184 # @bps_rd: read throughput limit in bytes per second
2185 #
2186 # @bps_wr: write throughput limit in bytes per second
2187 #
2188 # @iops: total I/O operations per second
2189 #
2190 # @ops_rd: read I/O operations per second
2191 #
2192 # @iops_wr: write I/O operations per second
2193 #
2194 # Returns: Nothing on success
2195 #          If @device is not a valid block device, DeviceNotFound
2196 #
2197 # Since: 1.1
2198 ##
2199 { 'command': 'block_set_io_throttle',
2200   'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
2201             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
2202
2203 ##
2204 # @block-stream:
2205 #
2206 # Copy data from a backing file into a block device.
2207 #
2208 # The block streaming operation is performed in the background until the entire
2209 # backing file has been copied.  This command returns immediately once streaming
2210 # has started.  The status of ongoing block streaming operations can be checked
2211 # with query-block-jobs.  The operation can be stopped before it has completed
2212 # using the block-job-cancel command.
2213 #
2214 # If a base file is specified then sectors are not copied from that base file and
2215 # its backing chain.  When streaming completes the image file will have the base
2216 # file as its backing file.  This can be used to stream a subset of the backing
2217 # file chain instead of flattening the entire image.
2218 #
2219 # On successful completion the image file is updated to drop the backing file
2220 # and the BLOCK_JOB_COMPLETED event is emitted.
2221 #
2222 # @device: the device name
2223 #
2224 # @base:   #optional the common backing file name
2225 #
2226 # @speed:  #optional the maximum speed, in bytes per second
2227 #
2228 # @on-error: #optional the action to take on an error (default report).
2229 #            'stop' and 'enospc' can only be used if the block device
2230 #            supports io-status (see BlockInfo).  Since 1.3.
2231 #
2232 # Returns: Nothing on success
2233 #          If @device does not exist, DeviceNotFound
2234 #
2235 # Since: 1.1
2236 ##
2237 { 'command': 'block-stream',
2238   'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
2239             '*on-error': 'BlockdevOnError' } }
2240
2241 ##
2242 # @block-job-set-speed:
2243 #
2244 # Set maximum speed for a background block operation.
2245 #
2246 # This command can only be issued when there is an active block job.
2247 #
2248 # Throttling can be disabled by setting the speed to 0.
2249 #
2250 # @device: the device name
2251 #
2252 # @speed:  the maximum speed, in bytes per second, or 0 for unlimited.
2253 #          Defaults to 0.
2254 #
2255 # Returns: Nothing on success
2256 #          If no background operation is active on this device, DeviceNotActive
2257 #
2258 # Since: 1.1
2259 ##
2260 { 'command': 'block-job-set-speed',
2261   'data': { 'device': 'str', 'speed': 'int' } }
2262
2263 ##
2264 # @block-job-cancel:
2265 #
2266 # Stop an active background block operation.
2267 #
2268 # This command returns immediately after marking the active background block
2269 # operation for cancellation.  It is an error to call this command if no
2270 # operation is in progress.
2271 #
2272 # The operation will cancel as soon as possible and then emit the
2273 # BLOCK_JOB_CANCELLED event.  Before that happens the job is still visible when
2274 # enumerated using query-block-jobs.
2275 #
2276 # For streaming, the image file retains its backing file unless the streaming
2277 # operation happens to complete just as it is being cancelled.  A new streaming
2278 # operation can be started at a later time to finish copying all data from the
2279 # backing file.
2280 #
2281 # @device: the device name
2282 #
2283 # @force: #optional whether to allow cancellation of a paused job (default
2284 #         false).  Since 1.3.
2285 #
2286 # Returns: Nothing on success
2287 #          If no background operation is active on this device, DeviceNotActive
2288 #
2289 # Since: 1.1
2290 ##
2291 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
2292
2293 ##
2294 # @block-job-pause:
2295 #
2296 # Pause an active background block operation.
2297 #
2298 # This command returns immediately after marking the active background block
2299 # operation for pausing.  It is an error to call this command if no
2300 # operation is in progress.  Pausing an already paused job has no cumulative
2301 # effect; a single block-job-resume command will resume the job.
2302 #
2303 # The operation will pause as soon as possible.  No event is emitted when
2304 # the operation is actually paused.  Cancelling a paused job automatically
2305 # resumes it.
2306 #
2307 # @device: the device name
2308 #
2309 # Returns: Nothing on success
2310 #          If no background operation is active on this device, DeviceNotActive
2311 #
2312 # Since: 1.3
2313 ##
2314 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2315
2316 ##
2317 # @block-job-resume:
2318 #
2319 # Resume an active background block operation.
2320 #
2321 # This command returns immediately after resuming a paused background block
2322 # operation.  It is an error to call this command if no operation is in
2323 # progress.  Resuming an already running job is not an error.
2324 #
2325 # This command also clears the error status of the job.
2326 #
2327 # @device: the device name
2328 #
2329 # Returns: Nothing on success
2330 #          If no background operation is active on this device, DeviceNotActive
2331 #
2332 # Since: 1.3
2333 ##
2334 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
2335
2336 ##
2337 # @block-job-complete:
2338 #
2339 # Manually trigger completion of an active background block operation.  This
2340 # is supported for drive mirroring, where it also switches the device to
2341 # write to the target path only.  The ability to complete is signaled with
2342 # a BLOCK_JOB_READY event.
2343 #
2344 # This command completes an active background block operation synchronously.
2345 # The ordering of this command's return with the BLOCK_JOB_COMPLETED event
2346 # is not defined.  Note that if an I/O error occurs during the processing of
2347 # this command: 1) the command itself will fail; 2) the error will be processed
2348 # according to the rerror/werror arguments that were specified when starting
2349 # the operation.
2350 #
2351 # A cancelled or paused job cannot be completed.
2352 #
2353 # @device: the device name
2354 #
2355 # Returns: Nothing on success
2356 #          If no background operation is active on this device, DeviceNotActive
2357 #
2358 # Since: 1.3
2359 ##
2360 { 'command': 'block-job-complete', 'data': { 'device': 'str' } }
2361
2362 ##
2363 # @ObjectTypeInfo:
2364 #
2365 # This structure describes a search result from @qom-list-types
2366 #
2367 # @name: the type name found in the search
2368 #
2369 # Since: 1.1
2370 #
2371 # Notes: This command is experimental and may change syntax in future releases.
2372 ##
2373 { 'type': 'ObjectTypeInfo',
2374   'data': { 'name': 'str' } }
2375
2376 ##
2377 # @qom-list-types:
2378 #
2379 # This command will return a list of types given search parameters
2380 #
2381 # @implements: if specified, only return types that implement this type name
2382 #
2383 # @abstract: if true, include abstract types in the results
2384 #
2385 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2386 #
2387 # Since: 1.1
2388 ##
2389 { 'command': 'qom-list-types',
2390   'data': { '*implements': 'str', '*abstract': 'bool' },
2391   'returns': [ 'ObjectTypeInfo' ] }
2392
2393 ##
2394 # @DevicePropertyInfo:
2395 #
2396 # Information about device properties.
2397 #
2398 # @name: the name of the property
2399 # @type: the typename of the property
2400 #
2401 # Since: 1.2
2402 ##
2403 { 'type': 'DevicePropertyInfo',
2404   'data': { 'name': 'str', 'type': 'str' } }
2405
2406 ##
2407 # @device-list-properties:
2408 #
2409 # List properties associated with a device.
2410 #
2411 # @typename: the type name of a device
2412 #
2413 # Returns: a list of DevicePropertyInfo describing a devices properties
2414 #
2415 # Since: 1.2
2416 ##
2417 { 'command': 'device-list-properties',
2418   'data': { 'typename': 'str'},
2419   'returns': [ 'DevicePropertyInfo' ] }
2420
2421 ##
2422 # @migrate
2423 #
2424 # Migrates the current running guest to another Virtual Machine.
2425 #
2426 # @uri: the Uniform Resource Identifier of the destination VM
2427 #
2428 # @blk: #optional do block migration (full disk copy)
2429 #
2430 # @inc: #optional incremental disk copy migration
2431 #
2432 # @detach: this argument exists only for compatibility reasons and
2433 #          is ignored by QEMU
2434 #
2435 # Returns: nothing on success
2436 #
2437 # Since: 0.14.0
2438 ##
2439 { 'command': 'migrate',
2440   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2441
2442 # @xen-save-devices-state:
2443 #
2444 # Save the state of all devices to file. The RAM and the block devices
2445 # of the VM are not saved by this command.
2446 #
2447 # @filename: the file to save the state of the devices to as binary
2448 # data. See xen-save-devices-state.txt for a description of the binary
2449 # format.
2450 #
2451 # Returns: Nothing on success
2452 #
2453 # Since: 1.1
2454 ##
2455 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2456
2457 ##
2458 # @xen-set-global-dirty-log
2459 #
2460 # Enable or disable the global dirty log mode.
2461 #
2462 # @enable: true to enable, false to disable.
2463 #
2464 # Returns: nothing
2465 #
2466 # Since: 1.3
2467 ##
2468 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2469
2470 ##
2471 # @device_del:
2472 #
2473 # Remove a device from a guest
2474 #
2475 # @id: the name of the device
2476 #
2477 # Returns: Nothing on success
2478 #          If @id is not a valid device, DeviceNotFound
2479 #
2480 # Notes: When this command completes, the device may not be removed from the
2481 #        guest.  Hot removal is an operation that requires guest cooperation.
2482 #        This command merely requests that the guest begin the hot removal
2483 #        process.  Completion of the device removal process is signaled with a
2484 #        DEVICE_DELETED event. Guest reset will automatically complete removal
2485 #        for all devices.
2486 #
2487 # Since: 0.14.0
2488 ##
2489 { 'command': 'device_del', 'data': {'id': 'str'} }
2490
2491 ##
2492 # @dump-guest-memory
2493 #
2494 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2495 # very long depending on the amount of guest memory. This command is only
2496 # supported on i386 and x86_64.
2497 #
2498 # @paging: if true, do paging to get guest's memory mapping. This allows
2499 #          using gdb to process the core file.
2500 #
2501 #          IMPORTANT: this option can make QEMU allocate several gigabytes
2502 #                     of RAM. This can happen for a large guest, or a
2503 #                     malicious guest pretending to be large.
2504 #
2505 #          Also, paging=true has the following limitations:
2506 #
2507 #             1. The guest may be in a catastrophic state or can have corrupted
2508 #                memory, which cannot be trusted
2509 #             2. The guest can be in real-mode even if paging is enabled. For
2510 #                example, the guest uses ACPI to sleep, and ACPI sleep state
2511 #                goes in real-mode
2512 #
2513 # @protocol: the filename or file descriptor of the vmcore. The supported
2514 #            protocols are:
2515 #
2516 #            1. file: the protocol starts with "file:", and the following
2517 #               string is the file's path.
2518 #            2. fd: the protocol starts with "fd:", and the following string
2519 #               is the fd's name.
2520 #
2521 # @begin: #optional if specified, the starting physical address.
2522 #
2523 # @length: #optional if specified, the memory size, in bytes. If you don't
2524 #          want to dump all guest's memory, please specify the start @begin
2525 #          and @length
2526 #
2527 # Returns: nothing on success
2528 #
2529 # Since: 1.2
2530 ##
2531 { 'command': 'dump-guest-memory',
2532   'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2533             '*length': 'int' } }
2534
2535 ##
2536 # @netdev_add:
2537 #
2538 # Add a network backend.
2539 #
2540 # @type: the type of network backend.  Current valid values are 'user', 'tap',
2541 #        'vde', 'socket', 'dump' and 'bridge'
2542 #
2543 # @id: the name of the new network backend
2544 #
2545 # @props: #optional a list of properties to be passed to the backend in
2546 #         the format 'name=value', like 'ifname=tap0,script=no'
2547 #
2548 # Notes: The semantics of @props is not well defined.  Future commands will be
2549 #        introduced that provide stronger typing for backend creation.
2550 #
2551 # Since: 0.14.0
2552 #
2553 # Returns: Nothing on success
2554 #          If @type is not a valid network backend, DeviceNotFound
2555 ##
2556 { 'command': 'netdev_add',
2557   'data': {'type': 'str', 'id': 'str', '*props': '**'},
2558   'gen': 'no' }
2559
2560 ##
2561 # @netdev_del:
2562 #
2563 # Remove a network backend.
2564 #
2565 # @id: the name of the network backend to remove
2566 #
2567 # Returns: Nothing on success
2568 #          If @id is not a valid network backend, DeviceNotFound
2569 #
2570 # Since: 0.14.0
2571 ##
2572 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2573
2574 ##
2575 # @NetdevNoneOptions
2576 #
2577 # Use it alone to have zero network devices.
2578 #
2579 # Since 1.2
2580 ##
2581 { 'type': 'NetdevNoneOptions',
2582   'data': { } }
2583
2584 ##
2585 # @NetLegacyNicOptions
2586 #
2587 # Create a new Network Interface Card.
2588 #
2589 # @netdev: #optional id of -netdev to connect to
2590 #
2591 # @macaddr: #optional MAC address
2592 #
2593 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2594 #
2595 # @addr: #optional PCI device address
2596 #
2597 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2598 #
2599 # Since 1.2
2600 ##
2601 { 'type': 'NetLegacyNicOptions',
2602   'data': {
2603     '*netdev':  'str',
2604     '*macaddr': 'str',
2605     '*model':   'str',
2606     '*addr':    'str',
2607     '*vectors': 'uint32' } }
2608
2609 ##
2610 # @String
2611 #
2612 # A fat type wrapping 'str', to be embedded in lists.
2613 #
2614 # Since 1.2
2615 ##
2616 { 'type': 'String',
2617   'data': {
2618     'str': 'str' } }
2619
2620 ##
2621 # @NetdevUserOptions
2622 #
2623 # Use the user mode network stack which requires no administrator privilege to
2624 # run.
2625 #
2626 # @hostname: #optional client hostname reported by the builtin DHCP server
2627 #
2628 # @restrict: #optional isolate the guest from the host
2629 #
2630 # @ip: #optional legacy parameter, use net= instead
2631 #
2632 # @net: #optional IP address and optional netmask
2633 #
2634 # @host: #optional guest-visible address of the host
2635 #
2636 # @tftp: #optional root directory of the built-in TFTP server
2637 #
2638 # @bootfile: #optional BOOTP filename, for use with tftp=
2639 #
2640 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2641 #             assign
2642 #
2643 # @dns: #optional guest-visible address of the virtual nameserver
2644 #
2645 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2646 #             to the guest
2647 #
2648 # @smb: #optional root directory of the built-in SMB server
2649 #
2650 # @smbserver: #optional IP address of the built-in SMB server
2651 #
2652 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2653 #           endpoints
2654 #
2655 # @guestfwd: #optional forward guest TCP connections
2656 #
2657 # Since 1.2
2658 ##
2659 { 'type': 'NetdevUserOptions',
2660   'data': {
2661     '*hostname':  'str',
2662     '*restrict':  'bool',
2663     '*ip':        'str',
2664     '*net':       'str',
2665     '*host':      'str',
2666     '*tftp':      'str',
2667     '*bootfile':  'str',
2668     '*dhcpstart': 'str',
2669     '*dns':       'str',
2670     '*dnssearch': ['String'],
2671     '*smb':       'str',
2672     '*smbserver': 'str',
2673     '*hostfwd':   ['String'],
2674     '*guestfwd':  ['String'] } }
2675
2676 ##
2677 # @NetdevTapOptions
2678 #
2679 # Connect the host TAP network interface name to the VLAN.
2680 #
2681 # @ifname: #optional interface name
2682 #
2683 # @fd: #optional file descriptor of an already opened tap
2684 #
2685 # @fds: #optional multiple file descriptors of already opened multiqueue capable
2686 # tap
2687 #
2688 # @script: #optional script to initialize the interface
2689 #
2690 # @downscript: #optional script to shut down the interface
2691 #
2692 # @helper: #optional command to execute to configure bridge
2693 #
2694 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2695 #
2696 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2697 #
2698 # @vhost: #optional enable vhost-net network accelerator
2699 #
2700 # @vhostfd: #optional file descriptor of an already opened vhost net device
2701 #
2702 # @vhostfds: #optional file descriptors of multiple already opened vhost net
2703 # devices
2704 #
2705 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2706 #
2707 # @queues: #optional number of queues to be created for multiqueue capable tap
2708 #
2709 # Since 1.2
2710 ##
2711 { 'type': 'NetdevTapOptions',
2712   'data': {
2713     '*ifname':     'str',
2714     '*fd':         'str',
2715     '*fds':        'str',
2716     '*script':     'str',
2717     '*downscript': 'str',
2718     '*helper':     'str',
2719     '*sndbuf':     'size',
2720     '*vnet_hdr':   'bool',
2721     '*vhost':      'bool',
2722     '*vhostfd':    'str',
2723     '*vhostfds':   'str',
2724     '*vhostforce': 'bool',
2725     '*queues':     'uint32'} }
2726
2727 ##
2728 # @NetdevSocketOptions
2729 #
2730 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2731 # socket connection.
2732 #
2733 # @fd: #optional file descriptor of an already opened socket
2734 #
2735 # @listen: #optional port number, and optional hostname, to listen on
2736 #
2737 # @connect: #optional port number, and optional hostname, to connect to
2738 #
2739 # @mcast: #optional UDP multicast address and port number
2740 #
2741 # @localaddr: #optional source address and port for multicast and udp packets
2742 #
2743 # @udp: #optional UDP unicast address and port number
2744 #
2745 # Since 1.2
2746 ##
2747 { 'type': 'NetdevSocketOptions',
2748   'data': {
2749     '*fd':        'str',
2750     '*listen':    'str',
2751     '*connect':   'str',
2752     '*mcast':     'str',
2753     '*localaddr': 'str',
2754     '*udp':       'str' } }
2755
2756 ##
2757 # @NetdevVdeOptions
2758 #
2759 # Connect the VLAN to a vde switch running on the host.
2760 #
2761 # @sock: #optional socket path
2762 #
2763 # @port: #optional port number
2764 #
2765 # @group: #optional group owner of socket
2766 #
2767 # @mode: #optional permissions for socket
2768 #
2769 # Since 1.2
2770 ##
2771 { 'type': 'NetdevVdeOptions',
2772   'data': {
2773     '*sock':  'str',
2774     '*port':  'uint16',
2775     '*group': 'str',
2776     '*mode':  'uint16' } }
2777
2778 ##
2779 # @NetdevDumpOptions
2780 #
2781 # Dump VLAN network traffic to a file.
2782 #
2783 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2784 # suffixes.
2785 #
2786 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2787 #
2788 # Since 1.2
2789 ##
2790 { 'type': 'NetdevDumpOptions',
2791   'data': {
2792     '*len':  'size',
2793     '*file': 'str' } }
2794
2795 ##
2796 # @NetdevBridgeOptions
2797 #
2798 # Connect a host TAP network interface to a host bridge device.
2799 #
2800 # @br: #optional bridge name
2801 #
2802 # @helper: #optional command to execute to configure bridge
2803 #
2804 # Since 1.2
2805 ##
2806 { 'type': 'NetdevBridgeOptions',
2807   'data': {
2808     '*br':     'str',
2809     '*helper': 'str' } }
2810
2811 ##
2812 # @NetdevHubPortOptions
2813 #
2814 # Connect two or more net clients through a software hub.
2815 #
2816 # @hubid: hub identifier number
2817 #
2818 # Since 1.2
2819 ##
2820 { 'type': 'NetdevHubPortOptions',
2821   'data': {
2822     'hubid':     'int32' } }
2823
2824 ##
2825 # @NetClientOptions
2826 #
2827 # A discriminated record of network device traits.
2828 #
2829 # Since 1.2
2830 ##
2831 { 'union': 'NetClientOptions',
2832   'data': {
2833     'none':     'NetdevNoneOptions',
2834     'nic':      'NetLegacyNicOptions',
2835     'user':     'NetdevUserOptions',
2836     'tap':      'NetdevTapOptions',
2837     'socket':   'NetdevSocketOptions',
2838     'vde':      'NetdevVdeOptions',
2839     'dump':     'NetdevDumpOptions',
2840     'bridge':   'NetdevBridgeOptions',
2841     'hubport':  'NetdevHubPortOptions' } }
2842
2843 ##
2844 # @NetLegacy
2845 #
2846 # Captures the configuration of a network device; legacy.
2847 #
2848 # @vlan: #optional vlan number
2849 #
2850 # @id: #optional identifier for monitor commands
2851 #
2852 # @name: #optional identifier for monitor commands, ignored if @id is present
2853 #
2854 # @opts: device type specific properties (legacy)
2855 #
2856 # Since 1.2
2857 ##
2858 { 'type': 'NetLegacy',
2859   'data': {
2860     '*vlan': 'int32',
2861     '*id':   'str',
2862     '*name': 'str',
2863     'opts':  'NetClientOptions' } }
2864
2865 ##
2866 # @Netdev
2867 #
2868 # Captures the configuration of a network device.
2869 #
2870 # @id: identifier for monitor commands.
2871 #
2872 # @opts: device type specific properties
2873 #
2874 # Since 1.2
2875 ##
2876 { 'type': 'Netdev',
2877   'data': {
2878     'id':   'str',
2879     'opts': 'NetClientOptions' } }
2880
2881 ##
2882 # @InetSocketAddress
2883 #
2884 # Captures a socket address or address range in the Internet namespace.
2885 #
2886 # @host: host part of the address
2887 #
2888 # @port: port part of the address, or lowest port if @to is present
2889 #
2890 # @to: highest port to try
2891 #
2892 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2893 #        #optional
2894 #
2895 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2896 #        #optional
2897 #
2898 # Since 1.3
2899 ##
2900 { 'type': 'InetSocketAddress',
2901   'data': {
2902     'host': 'str',
2903     'port': 'str',
2904     '*to': 'uint16',
2905     '*ipv4': 'bool',
2906     '*ipv6': 'bool' } }
2907
2908 ##
2909 # @UnixSocketAddress
2910 #
2911 # Captures a socket address in the local ("Unix socket") namespace.
2912 #
2913 # @path: filesystem path to use
2914 #
2915 # Since 1.3
2916 ##
2917 { 'type': 'UnixSocketAddress',
2918   'data': {
2919     'path': 'str' } }
2920
2921 ##
2922 # @SocketAddress
2923 #
2924 # Captures the address of a socket, which could also be a named file descriptor
2925 #
2926 # Since 1.3
2927 ##
2928 { 'union': 'SocketAddress',
2929   'data': {
2930     'inet': 'InetSocketAddress',
2931     'unix': 'UnixSocketAddress',
2932     'fd': 'String' } }
2933
2934 ##
2935 # @getfd:
2936 #
2937 # Receive a file descriptor via SCM rights and assign it a name
2938 #
2939 # @fdname: file descriptor name
2940 #
2941 # Returns: Nothing on success
2942 #
2943 # Since: 0.14.0
2944 #
2945 # Notes: If @fdname already exists, the file descriptor assigned to
2946 #        it will be closed and replaced by the received file
2947 #        descriptor.
2948 #        The 'closefd' command can be used to explicitly close the
2949 #        file descriptor when it is no longer needed.
2950 ##
2951 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2952
2953 ##
2954 # @closefd:
2955 #
2956 # Close a file descriptor previously passed via SCM rights
2957 #
2958 # @fdname: file descriptor name
2959 #
2960 # Returns: Nothing on success
2961 #
2962 # Since: 0.14.0
2963 ##
2964 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2965
2966 ##
2967 # @MachineInfo:
2968 #
2969 # Information describing a machine.
2970 #
2971 # @name: the name of the machine
2972 #
2973 # @alias: #optional an alias for the machine name
2974 #
2975 # @default: #optional whether the machine is default
2976 #
2977 # @cpu-max: maximum number of CPUs supported by the machine type
2978 #           (since 1.5.0)
2979 #
2980 # Since: 1.2.0
2981 ##
2982 { 'type': 'MachineInfo',
2983   'data': { 'name': 'str', '*alias': 'str',
2984             '*is-default': 'bool', 'cpu-max': 'int' } }
2985
2986 ##
2987 # @query-machines:
2988 #
2989 # Return a list of supported machines
2990 #
2991 # Returns: a list of MachineInfo
2992 #
2993 # Since: 1.2.0
2994 ##
2995 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2996
2997 ##
2998 # @CpuDefinitionInfo:
2999 #
3000 # Virtual CPU definition.
3001 #
3002 # @name: the name of the CPU definition
3003 #
3004 # Since: 1.2.0
3005 ##
3006 { 'type': 'CpuDefinitionInfo',
3007   'data': { 'name': 'str' } }
3008
3009 ##
3010 # @query-cpu-definitions:
3011 #
3012 # Return a list of supported virtual CPU definitions
3013 #
3014 # Returns: a list of CpuDefInfo
3015 #
3016 # Since: 1.2.0
3017 ##
3018 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3019
3020 # @AddfdInfo:
3021 #
3022 # Information about a file descriptor that was added to an fd set.
3023 #
3024 # @fdset-id: The ID of the fd set that @fd was added to.
3025 #
3026 # @fd: The file descriptor that was received via SCM rights and
3027 #      added to the fd set.
3028 #
3029 # Since: 1.2.0
3030 ##
3031 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3032
3033 ##
3034 # @add-fd:
3035 #
3036 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3037 #
3038 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3039 #
3040 # @opaque: #optional A free-form string that can be used to describe the fd.
3041 #
3042 # Returns: @AddfdInfo on success
3043 #          If file descriptor was not received, FdNotSupplied
3044 #          If @fdset-id is a negative value, InvalidParameterValue
3045 #
3046 # Notes: The list of fd sets is shared by all monitor connections.
3047 #
3048 #        If @fdset-id is not specified, a new fd set will be created.
3049 #
3050 # Since: 1.2.0
3051 ##
3052 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3053   'returns': 'AddfdInfo' }
3054
3055 ##
3056 # @remove-fd:
3057 #
3058 # Remove a file descriptor from an fd set.
3059 #
3060 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3061 #
3062 # @fd: #optional The file descriptor that is to be removed.
3063 #
3064 # Returns: Nothing on success
3065 #          If @fdset-id or @fd is not found, FdNotFound
3066 #
3067 # Since: 1.2.0
3068 #
3069 # Notes: The list of fd sets is shared by all monitor connections.
3070 #
3071 #        If @fd is not specified, all file descriptors in @fdset-id
3072 #        will be removed.
3073 ##
3074 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3075
3076 ##
3077 # @FdsetFdInfo:
3078 #
3079 # Information about a file descriptor that belongs to an fd set.
3080 #
3081 # @fd: The file descriptor value.
3082 #
3083 # @opaque: #optional A free-form string that can be used to describe the fd.
3084 #
3085 # Since: 1.2.0
3086 ##
3087 { 'type': 'FdsetFdInfo',
3088   'data': {'fd': 'int', '*opaque': 'str'} }
3089
3090 ##
3091 # @FdsetInfo:
3092 #
3093 # Information about an fd set.
3094 #
3095 # @fdset-id: The ID of the fd set.
3096 #
3097 # @fds: A list of file descriptors that belong to this fd set.
3098 #
3099 # Since: 1.2.0
3100 ##
3101 { 'type': 'FdsetInfo',
3102   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3103
3104 ##
3105 # @query-fdsets:
3106 #
3107 # Return information describing all fd sets.
3108 #
3109 # Returns: A list of @FdsetInfo
3110 #
3111 # Since: 1.2.0
3112 #
3113 # Note: The list of fd sets is shared by all monitor connections.
3114 #
3115 ##
3116 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3117
3118 ##
3119 # @TargetInfo:
3120 #
3121 # Information describing the QEMU target.
3122 #
3123 # @arch: the target architecture (eg "x86_64", "i386", etc)
3124 #
3125 # Since: 1.2.0
3126 ##
3127 { 'type': 'TargetInfo',
3128   'data': { 'arch': 'str' } }
3129
3130 ##
3131 # @query-target:
3132 #
3133 # Return information about the target for this QEMU
3134 #
3135 # Returns: TargetInfo
3136 #
3137 # Since: 1.2.0
3138 ##
3139 { 'command': 'query-target', 'returns': 'TargetInfo' }
3140
3141 ##
3142 # @QKeyCode:
3143 #
3144 # An enumeration of key name.
3145 #
3146 # This is used by the send-key command.
3147 #
3148 # Since: 1.3.0
3149 ##
3150 { 'enum': 'QKeyCode',
3151   'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3152             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3153             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3154             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3155             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3156             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3157             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3158             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3159             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3160             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3161             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3162             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3163             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3164             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3165              'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
3166
3167 ##
3168 # @KeyValue
3169 #
3170 # Represents a keyboard key.
3171 #
3172 # Since: 1.3.0
3173 ##
3174 { 'union': 'KeyValue',
3175   'data': {
3176     'number': 'int',
3177     'qcode': 'QKeyCode' } }
3178
3179 ##
3180 # @send-key:
3181 #
3182 # Send keys to guest.
3183 #
3184 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3185 #        simultaneously sent to the guest. A @KeyValue.number value is sent
3186 #        directly to the guest, while @KeyValue.qcode must be a valid
3187 #        @QKeyCode value
3188 #
3189 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3190 #             to 100
3191 #
3192 # Returns: Nothing on success
3193 #          If key is unknown or redundant, InvalidParameter
3194 #
3195 # Since: 1.3.0
3196 #
3197 ##
3198 { 'command': 'send-key',
3199   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3200
3201 ##
3202 # @screendump:
3203 #
3204 # Write a PPM of the VGA screen to a file.
3205 #
3206 # @filename: the path of a new PPM file to store the image
3207 #
3208 # Returns: Nothing on success
3209 #
3210 # Since: 0.14.0
3211 ##
3212 { 'command': 'screendump', 'data': {'filename': 'str'} }
3213
3214 ##
3215 # @nbd-server-start:
3216 #
3217 # Start an NBD server listening on the given host and port.  Block
3218 # devices can then be exported using @nbd-server-add.  The NBD
3219 # server will present them as named exports; for example, another
3220 # QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
3221 #
3222 # @addr: Address on which to listen.
3223 #
3224 # Returns: error if the server is already running.
3225 #
3226 # Since: 1.3.0
3227 ##
3228 { 'command': 'nbd-server-start',
3229   'data': { 'addr': 'SocketAddress' } }
3230
3231 ##
3232 # @nbd-server-add:
3233 #
3234 # Export a device to QEMU's embedded NBD server.
3235 #
3236 # @device: Block device to be exported
3237 #
3238 # @writable: Whether clients should be able to write to the device via the
3239 #     NBD connection (default false). #optional
3240 #
3241 # Returns: error if the device is already marked for export.
3242 #
3243 # Since: 1.3.0
3244 ##
3245 { 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3246
3247 ##
3248 # @nbd-server-stop:
3249 #
3250 # Stop QEMU's embedded NBD server, and unregister all devices previously
3251 # added via @nbd-server-add.
3252 #
3253 # Since: 1.3.0
3254 ##
3255 { 'command': 'nbd-server-stop' }
3256
3257 ##
3258 # @ChardevFile:
3259 #
3260 # Configuration info for file chardevs.
3261 #
3262 # @in:  #optional The name of the input file
3263 # @out: The name of the output file
3264 #
3265 # Since: 1.4
3266 ##
3267 { 'type': 'ChardevFile', 'data': { '*in' : 'str',
3268                                    'out' : 'str' } }
3269
3270 ##
3271 # @ChardevHostdev:
3272 #
3273 # Configuration info for device and pipe chardevs.
3274 #
3275 # @device: The name of the special file for the device,
3276 #          i.e. /dev/ttyS0 on Unix or COM1: on Windows
3277 # @type: What kind of device this is.
3278 #
3279 # Since: 1.4
3280 ##
3281 { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
3282
3283 ##
3284 # @ChardevSocket:
3285 #
3286 # Configuration info for (stream) socket chardevs.
3287 #
3288 # @addr: socket address to listen on (server=true)
3289 #        or connect to (server=false)
3290 # @server: #optional create server socket (default: true)
3291 # @wait: #optional wait for incoming connection on server
3292 #        sockets (default: false).
3293 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3294 # @telnet: #optional enable telnet protocol on server
3295 #          sockets (default: false)
3296 #
3297 # Since: 1.4
3298 ##
3299 { 'type': 'ChardevSocket', 'data': { 'addr'     : 'SocketAddress',
3300                                      '*server'  : 'bool',
3301                                      '*wait'    : 'bool',
3302                                      '*nodelay' : 'bool',
3303                                      '*telnet'  : 'bool' } }
3304
3305 ##
3306 # @ChardevUdp:
3307 #
3308 # Configuration info for datagram socket chardevs.
3309 #
3310 # @remote: remote address
3311 # @local: #optional local address
3312 #
3313 # Since: 1.5
3314 ##
3315 { 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3316                                   '*local' : 'SocketAddress' } }
3317
3318 ##
3319 # @ChardevMux:
3320 #
3321 # Configuration info for mux chardevs.
3322 #
3323 # @chardev: name of the base chardev.
3324 #
3325 # Since: 1.5
3326 ##
3327 { 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
3328
3329 ##
3330 # @ChardevStdio:
3331 #
3332 # Configuration info for stdio chardevs.
3333 #
3334 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3335 #          be delivered to qemu.  Default: true in -nographic mode,
3336 #          false otherwise.
3337 #
3338 # Since: 1.5
3339 ##
3340 { 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
3341
3342 ##
3343 # @ChardevSpiceChannel:
3344 #
3345 # Configuration info for spice vm channel chardevs.
3346 #
3347 # @type: kind of channel (for example vdagent).
3348 #
3349 # Since: 1.5
3350 ##
3351 { 'type': 'ChardevSpiceChannel', 'data': { 'type'  : 'str' } }
3352
3353 ##
3354 # @ChardevSpicePort:
3355 #
3356 # Configuration info for spice port chardevs.
3357 #
3358 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3359 #
3360 # Since: 1.5
3361 ##
3362 { 'type': 'ChardevSpicePort', 'data': { 'fqdn'  : 'str' } }
3363
3364 ##
3365 # @ChardevVC:
3366 #
3367 # Configuration info for virtual console chardevs.
3368 #
3369 # @width:  console width,  in pixels
3370 # @height: console height, in pixels
3371 # @cols:   console width,  in chars
3372 # @rows:   console height, in chars
3373 #
3374 # Since: 1.5
3375 ##
3376 { 'type': 'ChardevVC', 'data': { '*width'  : 'int',
3377                                  '*height' : 'int',
3378                                  '*cols'   : 'int',
3379                                  '*rows'   : 'int' } }
3380
3381 ##
3382 # @ChardevMemory:
3383 #
3384 # Configuration info for memory chardevs
3385 #
3386 # @size: #optional Ringbuffer size, must be power of two, default is 65536
3387 #
3388 # Since: 1.5
3389 ##
3390 { 'type': 'ChardevMemory', 'data': { '*size'  : 'int' } }
3391
3392 ##
3393 # @ChardevBackend:
3394 #
3395 # Configuration info for the new chardev backend.
3396 #
3397 # Since: 1.4
3398 ##
3399 { 'type': 'ChardevDummy', 'data': { } }
3400
3401 { 'union': 'ChardevBackend', 'data': { 'file'   : 'ChardevFile',
3402                                        'serial' : 'ChardevHostdev',
3403                                        'parallel': 'ChardevHostdev',
3404                                        'pipe'   : 'ChardevHostdev',
3405                                        'socket' : 'ChardevSocket',
3406                                        'udp'    : 'ChardevUdp',
3407                                        'pty'    : 'ChardevDummy',
3408                                        'null'   : 'ChardevDummy',
3409                                        'mux'    : 'ChardevMux',
3410                                        'msmouse': 'ChardevDummy',
3411                                        'braille': 'ChardevDummy',
3412                                        'stdio'  : 'ChardevStdio',
3413                                        'console': 'ChardevDummy',
3414                                        'spicevmc' : 'ChardevSpiceChannel',
3415                                        'spiceport' : 'ChardevSpicePort',
3416                                        'vc'     : 'ChardevVC',
3417                                        'memory' : 'ChardevMemory' } }
3418
3419 ##
3420 # @ChardevReturn:
3421 #
3422 # Return info about the chardev backend just created.
3423 #
3424 # @pty: #optional name of the slave pseudoterminal device, present if
3425 #       and only if a chardev of type 'pty' was created
3426 #
3427 # Since: 1.4
3428 ##
3429 { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3430
3431 ##
3432 # @chardev-add:
3433 #
3434 # Add a character device backend
3435 #
3436 # @id: the chardev's ID, must be unique
3437 # @backend: backend type and parameters
3438 #
3439 # Returns: ChardevReturn.
3440 #
3441 # Since: 1.4
3442 ##
3443 { 'command': 'chardev-add', 'data': {'id'      : 'str',
3444                                      'backend' : 'ChardevBackend' },
3445   'returns': 'ChardevReturn' }
3446
3447 ##
3448 # @chardev-remove:
3449 #
3450 # Remove a character device backend
3451 #
3452 # @id: the chardev's ID, must exist and not be in use
3453 #
3454 # Returns: Nothing on success
3455 #
3456 # Since: 1.4
3457 ##
3458 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3459
3460 ##
3461 # @TpmModel:
3462 #
3463 # An enumeration of TPM models
3464 #
3465 # @tpm-tis: TPM TIS model
3466 #
3467 # Since: 1.5
3468 ##
3469 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3470
3471 ##
3472 # @query-tpm-models:
3473 #
3474 # Return a list of supported TPM models
3475 #
3476 # Returns: a list of TpmModel
3477 #
3478 # Since: 1.5
3479 ##
3480 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3481
3482 ##
3483 # @TpmType:
3484 #
3485 # An enumeration of TPM types
3486 #
3487 # @passthrough: TPM passthrough type
3488 #
3489 # Since: 1.5
3490 ##
3491 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3492
3493 ##
3494 # @query-tpm-types:
3495 #
3496 # Return a list of supported TPM types
3497 #
3498 # Returns: a list of TpmType
3499 #
3500 # Since: 1.5
3501 ##
3502 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3503
3504 ##
3505 # @TPMPassthroughOptions:
3506 #
3507 # Information about the TPM passthrough type
3508 #
3509 # @path: #optional string describing the path used for accessing the TPM device
3510 #
3511 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3512 #               for cancellation of TPM commands while they are executing
3513 #
3514 # Since: 1.5
3515 ##
3516 { 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3517                                              '*cancel-path' : 'str'} }
3518
3519 ##
3520 # @TpmTypeOptions:
3521 #
3522 # A union referencing different TPM backend types' configuration options
3523 #
3524 # @passthrough: The configuration options for the TPM passthrough type
3525 #
3526 # Since: 1.5
3527 ##
3528 { 'union': 'TpmTypeOptions',
3529    'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3530
3531 ##
3532 # @TpmInfo:
3533 #
3534 # Information about the TPM
3535 #
3536 # @id: The Id of the TPM
3537 #
3538 # @model: The TPM frontend model
3539 #
3540 # @options: The TPM (backend) type configuration options
3541 #
3542 # Since: 1.5
3543 ##
3544 { 'type': 'TPMInfo',
3545   'data': {'id': 'str',
3546            'model': 'TpmModel',
3547            'options': 'TpmTypeOptions' } }
3548
3549 ##
3550 # @query-tpm:
3551 #
3552 # Return information about the TPM device
3553 #
3554 # Returns: @TPMInfo on success
3555 #
3556 # Since: 1.5
3557 ##
3558 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
3559
3560 ##
3561 # @AcpiTableOptions
3562 #
3563 # Specify an ACPI table on the command line to load.
3564 #
3565 # At most one of @file and @data can be specified. The list of files specified
3566 # by any one of them is loaded and concatenated in order. If both are omitted,
3567 # @data is implied.
3568 #
3569 # Other fields / optargs can be used to override fields of the generic ACPI
3570 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
3571 # Description Table Header. If a header field is not overridden, then the
3572 # corresponding value from the concatenated blob is used (in case of @file), or
3573 # it is filled in with a hard-coded value (in case of @data).
3574 #
3575 # String fields are copied into the matching ACPI member from lowest address
3576 # upwards, and silently truncated / NUL-padded to length.
3577 #
3578 # @sig: #optional table signature / identifier (4 bytes)
3579 #
3580 # @rev: #optional table revision number (dependent on signature, 1 byte)
3581 #
3582 # @oem_id: #optional OEM identifier (6 bytes)
3583 #
3584 # @oem_table_id: #optional OEM table identifier (8 bytes)
3585 #
3586 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
3587 #
3588 # @asl_compiler_id: #optional identifier of the utility that created the table
3589 #                   (4 bytes)
3590 #
3591 # @asl_compiler_rev: #optional revision number of the utility that created the
3592 #                    table (4 bytes)
3593 #
3594 # @file: #optional colon (:) separated list of pathnames to load and
3595 #        concatenate as table data. The resultant binary blob is expected to
3596 #        have an ACPI table header. At least one file is required. This field
3597 #        excludes @data.
3598 #
3599 # @data: #optional colon (:) separated list of pathnames to load and
3600 #        concatenate as table data. The resultant binary blob must not have an
3601 #        ACPI table header. At least one file is required. This field excludes
3602 #        @file.
3603 #
3604 # Since 1.5
3605 ##
3606 { 'type': 'AcpiTableOptions',
3607   'data': {
3608     '*sig':               'str',
3609     '*rev':               'uint8',
3610     '*oem_id':            'str',
3611     '*oem_table_id':      'str',
3612     '*oem_rev':           'uint32',
3613     '*asl_compiler_id':   'str',
3614     '*asl_compiler_rev':  'uint32',
3615     '*file':              'str',
3616     '*data':              'str' }}
3617
3618 ##
3619 # @CommandLineParameterType:
3620 #
3621 # Possible types for an option parameter.
3622 #
3623 # @string: accepts a character string
3624 #
3625 # @boolean: accepts "on" or "off"
3626 #
3627 # @number: accepts a number
3628 #
3629 # @size: accepts a number followed by an optional suffix (K)ilo,
3630 #        (M)ega, (G)iga, (T)era
3631 #
3632 # Since 1.5
3633 ##
3634 { 'enum': 'CommandLineParameterType',
3635   'data': ['string', 'boolean', 'number', 'size'] }
3636
3637 ##
3638 # @CommandLineParameterInfo:
3639 #
3640 # Details about a single parameter of a command line option.
3641 #
3642 # @name: parameter name
3643 #
3644 # @type: parameter @CommandLineParameterType
3645 #
3646 # @help: #optional human readable text string, not suitable for parsing.
3647 #
3648 # Since 1.5
3649 ##
3650 { 'type': 'CommandLineParameterInfo',
3651   'data': { 'name': 'str',
3652             'type': 'CommandLineParameterType',
3653             '*help': 'str' } }
3654
3655 ##
3656 # @CommandLineOptionInfo:
3657 #
3658 # Details about a command line option, including its list of parameter details
3659 #
3660 # @option: option name
3661 #
3662 # @parameters: an array of @CommandLineParameterInfo
3663 #
3664 # Since 1.5
3665 ##
3666 { 'type': 'CommandLineOptionInfo',
3667   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
3668
3669 ##
3670 # @query-command-line-options:
3671 #
3672 # Query command line option schema.
3673 #
3674 # @option: #optional option name
3675 #
3676 # Returns: list of @CommandLineOptionInfo for all options (or for the given
3677 #          @option).  Returns an error if the given @option doesn't exist.
3678 #
3679 # Since 1.5
3680 ##
3681 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
3682  'returns': ['CommandLineOptionInfo'] }
3683
3684 ##
3685 # @X86CPURegister32
3686 #
3687 # A X86 32-bit register
3688 #
3689 # Since: 1.5
3690 ##
3691 { 'enum': 'X86CPURegister32',
3692   'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
3693
3694 ##
3695 # @X86CPUFeatureWordInfo
3696 #
3697 # Information about a X86 CPU feature word
3698 #
3699 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
3700 #
3701 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
3702 #                   feature word
3703 #
3704 # @cpuid-register: Output register containing the feature bits
3705 #
3706 # @features: value of output register, containing the feature bits
3707 #
3708 # Since: 1.5
3709 ##
3710 { 'type': 'X86CPUFeatureWordInfo',
3711   'data': { 'cpuid-input-eax': 'int',
3712             '*cpuid-input-ecx': 'int',
3713             'cpuid-register': 'X86CPURegister32',
3714             'features': 'int' } }
This page took 0.226546 seconds and 4 git commands to generate.