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