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