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