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