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