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