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