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