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