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