linux-user/uname: Return correct uname string for x86_64
[qemu.git] / qapi-schema.json
blobdc2abe479efce60c9e3e9c5abcdf4b55fc492603
1 # -*- Mode: Python -*-
3 # QAPI Schema
5 # QAPI common definitions
6 { 'include': 'qapi/common.json' }
8 # QAPI block definitions
9 { 'include': 'qapi/block.json' }
12 # LostTickPolicy:
14 # Policy for handling lost ticks in timer devices.
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
20 # @delay: continue to deliver ticks at the normal rate.  Guest time will be
21 #         delayed due to the late tick
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
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.
30 # Since: 2.0
32 { 'enum': 'LostTickPolicy',
33   'data': ['discard', 'delay', 'merge', 'slew' ] }
35 # @add_client
37 # Allow client connections for VNC, Spice and socket based
38 # character devices to be passed in to QEMU via SCM_RIGHTS.
40 # @protocol: protocol name. Valid names are "vnc", "spice" or the
41 #            name of a character device (eg. from -chardev id=XXXX)
43 # @fdname: file descriptor name previously passed via 'getfd' command
45 # @skipauth: #optional whether to skip authentication. Only applies
46 #            to "vnc" and "spice" protocols
48 # @tls: #optional whether to perform TLS. Only applies to the "spice"
49 #       protocol
51 # Returns: nothing on success.
53 # Since: 0.14.0
55 { 'command': 'add_client',
56   'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
57             '*tls': 'bool' } }
60 # @NameInfo:
62 # Guest name information.
64 # @name: #optional The name of the guest
66 # Since 0.14.0
68 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
71 # @query-name:
73 # Return the name information of a guest.
75 # Returns: @NameInfo of the guest
77 # Since 0.14.0
79 { 'command': 'query-name', 'returns': 'NameInfo' }
82 # @KvmInfo:
84 # Information about support for KVM acceleration
86 # @enabled: true if KVM acceleration is active
88 # @present: true if KVM acceleration is built into this executable
90 # Since: 0.14.0
92 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
95 # @query-kvm:
97 # Returns information about KVM acceleration
99 # Returns: @KvmInfo
101 # Since: 0.14.0
103 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
106 # @RunState
108 # An enumeration of VM run states.
110 # @debug: QEMU is running on a debugger
112 # @finish-migrate: guest is paused to finish the migration process
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.
120 # @internal-error: An internal error that prevents further guest execution
121 # has occurred
123 # @io-error: the last IOP has failed and the device is configured to pause
124 # on I/O errors
126 # @paused: guest has been paused via the 'stop' command
128 # @postmigrate: guest is paused following a successful 'migrate'
130 # @prelaunch: QEMU was started with -S and guest has not started
132 # @restore-vm: guest is paused to restore VM state
134 # @running: guest is actively running
136 # @save-vm: guest is paused to save the VM state
138 # @shutdown: guest is shut down (and -no-shutdown is in use)
140 # @suspended: guest is suspended (ACPI S3)
142 # @watchdog: the watchdog action is configured to pause and has been triggered
144 # @guest-panicked: guest has been panicked as a result of guest OS panic
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' ] }
153 # @StatusInfo:
155 # Information about VCPU run state
157 # @running: true if all VCPUs are runnable, false if not runnable
159 # @singlestep: true if VCPUs are in single-step mode
161 # @status: the virtual machine @RunState
163 # Since:  0.14.0
165 # Notes: @singlestep is enabled through the GDB stub
167 { 'type': 'StatusInfo',
168   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
171 # @query-status:
173 # Query the run status of all VCPUs
175 # Returns: @StatusInfo reflecting all VCPUs
177 # Since:  0.14.0
179 { 'command': 'query-status', 'returns': 'StatusInfo' }
182 # @UuidInfo:
184 # Guest UUID information.
186 # @UUID: the UUID of the guest
188 # Since: 0.14.0
190 # Notes: If no UUID was specified for the guest, a null UUID is returned.
192 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
195 # @query-uuid:
197 # Query the guest UUID information.
199 # Returns: The @UuidInfo for the guest
201 # Since 0.14.0
203 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
206 # @ChardevInfo:
208 # Information about a character device.
210 # @label: the label of the character device
212 # @filename: the filename of the character device
214 # Notes: @filename is encoded using the QEMU command line character device
215 #        encoding.  See the QEMU man page for details.
217 # Since: 0.14.0
219 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
222 # @query-chardev:
224 # Returns information about current character devices.
226 # Returns: a list of @ChardevInfo
228 # Since: 0.14.0
230 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
233 # @ChardevBackendInfo:
235 # Information about a character device backend
237 # @name: The backend name
239 # Since: 2.0
241 { 'type': 'ChardevBackendInfo', 'data': {'name': 'str'} }
244 # @query-chardev-backends:
246 # Returns information about character device backends.
248 # Returns: a list of @ChardevBackendInfo
250 # Since: 2.0
252 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
255 # @DataFormat:
257 # An enumeration of data format.
259 # @utf8: Data is a UTF-8 string (RFC 3629)
261 # @base64: Data is Base64 encoded binary (RFC 3548)
263 # Since: 1.4
265 { 'enum': 'DataFormat',
266   'data': [ 'utf8', 'base64' ] }
269 # @ringbuf-write:
271 # Write to a ring buffer character device.
273 # @device: the ring buffer character device name
275 # @data: data to write
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.
286 # Returns: Nothing on success
288 # Since: 1.4
290 { 'command': 'ringbuf-write',
291   'data': {'device': 'str', 'data': 'str',
292            '*format': 'DataFormat'} }
295 # @ringbuf-read:
297 # Read from a ring buffer character device.
299 # @device: the ring buffer character device name
301 # @size: how many bytes to read at most
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.
313 # Returns: data read from the device
315 # Since: 1.4
317 { 'command': 'ringbuf-read',
318   'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
319   'returns': 'str' }
322 # @EventInfo:
324 # Information about a QMP event
326 # @name: The event name
328 # Since: 1.2.0
330 { 'type': 'EventInfo', 'data': {'name': 'str'} }
333 # @query-events:
335 # Return a list of supported QMP events by this server
337 # Returns: A list of @EventInfo for all supported events
339 # Since: 1.2.0
341 { 'command': 'query-events', 'returns': ['EventInfo'] }
344 # @MigrationStats
346 # Detailed migration status.
348 # @transferred: amount of bytes already transferred to the target VM
350 # @remaining: amount of bytes remaining to be transferred to the target VM
352 # @total: total amount of bytes involved in the migration process
354 # @duplicate: number of duplicate (zero) pages (since 1.2)
356 # @skipped: number of skipped zero pages (since 1.5)
358 # @normal : number of normal pages (since 1.2)
360 # @normal-bytes: number of normal bytes sent (since 1.2)
362 # @dirty-pages-rate: number of pages dirtied by second by the
363 #        guest (since 1.3)
365 # @mbps: throughput in megabits/sec. (since 1.6)
367 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
369 # Since: 0.14.0
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' } }
378 # @XBZRLECacheStats
380 # Detailed XBZRLE migration cache statistics
382 # @cache-size: XBZRLE cache size
384 # @bytes: amount of bytes already transferred to the target VM
386 # @pages: amount of pages transferred to the target VM
388 # @cache-miss: number of cache miss
390 # @cache-miss-rate: rate of cache miss (since 2.1)
392 # @overflow: number of overflows
394 # Since: 1.2
396 { 'type': 'XBZRLECacheStats',
397   'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
398            'cache-miss': 'int', 'cache-miss-rate': 'number',
399            'overflow': 'int' } }
402 # @MigrationInfo
404 # Information about current migration process.
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
411 # @ram: #optional @MigrationStats containing detailed migration
412 #       status, only returned if status is 'active' or
413 #       'completed'. 'comppleted' (since 1.2)
415 # @disk: #optional @MigrationStats containing detailed disk migration
416 #        status, only returned if status is 'active' and it is a block
417 #        migration
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)
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)
427 # @downtime: #optional only present when migration finishes correctly
428 #        total downtime in milliseconds for the guest.
429 #        (since 1.3)
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)
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)
441 # Since: 0.14.0
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'} }
453 # @query-migrate
455 # Returns information about current migration process.
457 # Returns: @MigrationInfo
459 # Since: 0.14.0
461 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
464 # @MigrationCapability
466 # Migration capabilities enumeration
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
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)
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)
482 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
483 #          to speed up convergence of RAM migration. (since 1.6)
485 # Since: 1.2
487 { 'enum': 'MigrationCapability',
488   'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks'] }
491 # @MigrationCapabilityStatus
493 # Migration capability information
495 # @capability: capability enum
497 # @state: capability state bool
499 # Since: 1.2
501 { 'type': 'MigrationCapabilityStatus',
502   'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
505 # @migrate-set-capabilities
507 # Enable/Disable the following migration capabilities (like xbzrle)
509 # @capabilities: json array of capability modifications to make
511 # Since: 1.2
513 { 'command': 'migrate-set-capabilities',
514   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
517 # @query-migrate-capabilities
519 # Returns information about the current migration capabilities status
521 # Returns: @MigrationCapabilitiesStatus
523 # Since: 1.2
525 { 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}
528 # @MouseInfo:
530 # Information about a mouse device.
532 # @name: the name of the mouse device
534 # @index: the index of the mouse device
536 # @current: true if this device is currently receiving mouse events
538 # @absolute: true if this device supports absolute coordinates as input
540 # Since: 0.14.0
542 { 'type': 'MouseInfo',
543   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
544            'absolute': 'bool'} }
547 # @query-mice:
549 # Returns information about each active mouse device
551 # Returns: a list of @MouseInfo for each device
553 # Since: 0.14.0
555 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
558 # @CpuInfo:
560 # Information about a virtual CPU
562 # @CPU: the index of the virtual CPU
564 # @current: this only exists for backwards compatible and should be ignored
566 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
567 #          to a processor specific low power mode.
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.
574 # @nip: #optional If the target is PPC, the instruction pointer
576 # @npc: #optional If the target is Sparc, the NPC component of the instruction
577 #                 pointer
579 # @PC: #optional If the target is MIPS, the instruction pointer
581 # @thread_id: ID of the underlying host thread
583 # Since: 0.14.0
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.
588 { 'type': 'CpuInfo',
589   'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
590            '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
593 # @query-cpus:
595 # Returns a list of information about each virtual CPU.
597 # Returns: a list of @CpuInfo for each virtual CPU
599 # Since: 0.14.0
601 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
604 # @IOThreadInfo:
606 # Information about an iothread
608 # @id: the identifier of the iothread
610 # @thread-id: ID of the underlying host thread
612 # Since: 2.0
614 { 'type': 'IOThreadInfo',
615   'data': {'id': 'str', 'thread-id': 'int'} }
618 # @query-iothreads:
620 # Returns a list of information about each iothread.
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.
626 # Returns: a list of @IOThreadInfo for each iothread
628 # Since: 2.0
630 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
633 # @VncClientInfo:
635 # Information about a connected VNC client.
637 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
638 #        when possible.
640 # @family: 'ipv6' if the client is connected via IPv6 and TCP
641 #          'ipv4' if the client is connected via IPv4 and TCP
642 #          'unix' if the client is connected via a unix domain socket
643 #          'unknown' otherwise
645 # @service: The service name of the client's port.  This may depends on the
646 #           host system's service database so symbolic names should not be
647 #           relied on.
649 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
650 #              Name of the client.
652 # @sasl_username: #optional If SASL authentication is in use, the SASL username
653 #                 used for authentication.
655 # Since: 0.14.0
657 { 'type': 'VncClientInfo',
658   'data': {'host': 'str', 'family': 'str', 'service': 'str',
659            '*x509_dname': 'str', '*sasl_username': 'str'} }
662 # @VncInfo:
664 # Information about the VNC session.
666 # @enabled: true if the VNC server is enabled, false otherwise
668 # @host: #optional The hostname the VNC server is bound to.  This depends on
669 #        the name resolution on the host and may be an IP address.
671 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
672 #                    'ipv4' if the host is listening for IPv4 connections
673 #                    'unix' if the host is listening on a unix domain socket
674 #                    'unknown' otherwise
676 # @service: #optional The service name of the server's port.  This may depends
677 #           on the host system's service database so symbolic names should not
678 #           be relied on.
680 # @auth: #optional the current authentication type used by the server
681 #        'none' if no authentication is being used
682 #        'vnc' if VNC authentication is being used
683 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
684 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
685 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
686 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
687 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
688 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
689 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
690 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
691 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
693 # @clients: a list of @VncClientInfo of all currently connected clients
695 # Since: 0.14.0
697 { 'type': 'VncInfo',
698   'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
699            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
702 # @query-vnc:
704 # Returns information about the current VNC server
706 # Returns: @VncInfo
708 # Since: 0.14.0
710 { 'command': 'query-vnc', 'returns': 'VncInfo' }
713 # @SpiceChannel
715 # Information about a SPICE client channel.
717 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
718 #        when possible.
720 # @family: 'ipv6' if the client is connected via IPv6 and TCP
721 #          'ipv4' if the client is connected via IPv4 and TCP
722 #          'unix' if the client is connected via a unix domain socket
723 #          'unknown' otherwise
725 # @port: The client's port number.
727 # @connection-id: SPICE connection id number.  All channels with the same id
728 #                 belong to the same SPICE session.
730 # @connection-type: SPICE channel type number.  "1" is the main control
731 #                   channel, filter for this one if you want to track spice
732 #                   sessions only
734 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
735 #              multiple channels of the same type exist, such as multiple
736 #              display channels in a multihead setup
738 # @tls: true if the channel is encrypted, false otherwise.
740 # Since: 0.14.0
742 { 'type': 'SpiceChannel',
743   'data': {'host': 'str', 'family': 'str', 'port': 'str',
744            'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
745            'tls': 'bool'} }
748 # @SpiceQueryMouseMode
750 # An enumeration of Spice mouse states.
752 # @client: Mouse cursor position is determined by the client.
754 # @server: Mouse cursor position is determined by the server.
756 # @unknown: No information is available about mouse mode used by
757 #           the spice server.
759 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
761 # Since: 1.1
763 { 'enum': 'SpiceQueryMouseMode',
764   'data': [ 'client', 'server', 'unknown' ] }
767 # @SpiceInfo
769 # Information about the SPICE session.
771 # @enabled: true if the SPICE server is enabled, false otherwise
773 # @migrated: true if the last guest migration completed and spice
774 #            migration had completed as well. false otherwise.
776 # @host: #optional The hostname the SPICE server is bound to.  This depends on
777 #        the name resolution on the host and may be an IP address.
779 # @port: #optional The SPICE server's port number.
781 # @compiled-version: #optional SPICE server version.
783 # @tls-port: #optional The SPICE server's TLS port number.
785 # @auth: #optional the current authentication type used by the server
786 #        'none'  if no authentication is being used
787 #        'spice' uses SASL or direct TLS authentication, depending on command
788 #                line options
790 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
791 #              be determined by the client or the server, or unknown if spice
792 #              server doesn't provide this information.
794 #              Since: 1.1
796 # @channels: a list of @SpiceChannel for each active spice channel
798 # Since: 0.14.0
800 { 'type': 'SpiceInfo',
801   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
802            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
803            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
806 # @query-spice
808 # Returns information about the current SPICE server
810 # Returns: @SpiceInfo
812 # Since: 0.14.0
814 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
817 # @BalloonInfo:
819 # Information about the guest balloon device.
821 # @actual: the number of bytes the balloon currently contains
823 # Since: 0.14.0
826 { 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
829 # @query-balloon:
831 # Return information about the balloon device.
833 # Returns: @BalloonInfo on success
834 #          If the balloon driver is enabled but not functional because the KVM
835 #          kernel module cannot support it, KvmMissingCap
836 #          If no balloon device is present, DeviceNotActive
838 # Since: 0.14.0
840 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
843 # @PciMemoryRange:
845 # A PCI device memory region
847 # @base: the starting address (guest physical)
849 # @limit: the ending address (guest physical)
851 # Since: 0.14.0
853 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
856 # @PciMemoryRegion
858 # Information about a PCI device I/O region.
860 # @bar: the index of the Base Address Register for this region
862 # @type: 'io' if the region is a PIO region
863 #        'memory' if the region is a MMIO region
865 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
867 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
869 # Since: 0.14.0
871 { 'type': 'PciMemoryRegion',
872   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
873            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
876 # @PciBridgeInfo:
878 # Information about a PCI Bridge device
880 # @bus.number: primary bus interface number.  This should be the number of the
881 #              bus the device resides on.
883 # @bus.secondary: secondary bus interface number.  This is the number of the
884 #                 main bus for the bridge
886 # @bus.subordinate: This is the highest number bus that resides below the
887 #                   bridge.
889 # @bus.io_range: The PIO range for all devices on this bridge
891 # @bus.memory_range: The MMIO range for all devices on this bridge
893 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
894 #                          this bridge
896 # @devices: a list of @PciDeviceInfo for each device on this bridge
898 # Since: 0.14.0
900 { 'type': 'PciBridgeInfo',
901   'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
902                     'io_range': 'PciMemoryRange',
903                     'memory_range': 'PciMemoryRange',
904                     'prefetchable_range': 'PciMemoryRange' },
905            '*devices': ['PciDeviceInfo']} }
908 # @PciDeviceInfo:
910 # Information about a PCI device
912 # @bus: the bus number of the device
914 # @slot: the slot the device is located in
916 # @function: the function of the slot used by the device
918 # @class_info.desc: #optional a string description of the device's class
920 # @class_info.class: the class code of the device
922 # @id.device: the PCI device id
924 # @id.vendor: the PCI vendor id
926 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
928 # @qdev_id: the device name of the PCI device
930 # @pci_bridge: if the device is a PCI bridge, the bridge information
932 # @regions: a list of the PCI I/O regions associated with the device
934 # Notes: the contents of @class_info.desc are not stable and should only be
935 #        treated as informational.
937 # Since: 0.14.0
939 { 'type': 'PciDeviceInfo',
940   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
941            'class_info': {'*desc': 'str', 'class': 'int'},
942            'id': {'device': 'int', 'vendor': 'int'},
943            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
944            'regions': ['PciMemoryRegion']} }
947 # @PciInfo:
949 # Information about a PCI bus
951 # @bus: the bus index
953 # @devices: a list of devices on this bus
955 # Since: 0.14.0
957 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
960 # @query-pci:
962 # Return information about the PCI bus topology of the guest.
964 # Returns: a list of @PciInfo for each PCI bus
966 # Since: 0.14.0
968 { 'command': 'query-pci', 'returns': ['PciInfo'] }
971 # @quit:
973 # This command will cause the QEMU process to exit gracefully.  While every
974 # attempt is made to send the QMP response before terminating, this is not
975 # guaranteed.  When using this interface, a premature EOF would not be
976 # unexpected.
978 # Since: 0.14.0
980 { 'command': 'quit' }
983 # @stop:
985 # Stop all guest VCPU execution.
987 # Since:  0.14.0
989 # Notes:  This function will succeed even if the guest is already in the stopped
990 #         state.  In "inmigrate" state, it will ensure that the guest
991 #         remains paused once migration finishes, as if the -S option was
992 #         passed on the command line.
994 { 'command': 'stop' }
997 # @system_reset:
999 # Performs a hard reset of a guest.
1001 # Since: 0.14.0
1003 { 'command': 'system_reset' }
1006 # @system_powerdown:
1008 # Requests that a guest perform a powerdown operation.
1010 # Since: 0.14.0
1012 # Notes: A guest may or may not respond to this command.  This command
1013 #        returning does not indicate that a guest has accepted the request or
1014 #        that it has shut down.  Many guests will respond to this command by
1015 #        prompting the user in some way.
1017 { 'command': 'system_powerdown' }
1020 # @cpu:
1022 # This command is a nop that is only provided for the purposes of compatibility.
1024 # Since: 0.14.0
1026 # Notes: Do not use this command.
1028 { 'command': 'cpu', 'data': {'index': 'int'} }
1031 # @cpu-add
1033 # Adds CPU with specified ID
1035 # @id: ID of CPU to be created, valid values [0..max_cpus)
1037 # Returns: Nothing on success
1039 # Since 1.5
1041 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1044 # @memsave:
1046 # Save a portion of guest memory to a file.
1048 # @val: the virtual address of the guest to start from
1050 # @size: the size of memory region to save
1052 # @filename: the file to save the memory to as binary data
1054 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1055 #                       virtual address (defaults to CPU 0)
1057 # Returns: Nothing on success
1059 # Since: 0.14.0
1061 # Notes: Errors were not reliably returned until 1.1
1063 { 'command': 'memsave',
1064   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1067 # @pmemsave:
1069 # Save a portion of guest physical memory to a file.
1071 # @val: the physical address of the guest to start from
1073 # @size: the size of memory region to save
1075 # @filename: the file to save the memory to as binary data
1077 # Returns: Nothing on success
1079 # Since: 0.14.0
1081 # Notes: Errors were not reliably returned until 1.1
1083 { 'command': 'pmemsave',
1084   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1087 # @cont:
1089 # Resume guest VCPU execution.
1091 # Since:  0.14.0
1093 # Returns:  If successful, nothing
1094 #           If QEMU was started with an encrypted block device and a key has
1095 #              not yet been set, DeviceEncrypted.
1097 # Notes:  This command will succeed if the guest is currently running.  It
1098 #         will also succeed if the guest is in the "inmigrate" state; in
1099 #         this case, the effect of the command is to make sure the guest
1100 #         starts once migration finishes, removing the effect of the -S
1101 #         command line option if it was passed.
1103 { 'command': 'cont' }
1106 # @system_wakeup:
1108 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1110 # Since:  1.1
1112 # Returns:  nothing.
1114 { 'command': 'system_wakeup' }
1117 # @inject-nmi:
1119 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1121 # Returns:  If successful, nothing
1123 # Since:  0.14.0
1125 # Notes: Only x86 Virtual Machines support this command.
1127 { 'command': 'inject-nmi' }
1130 # @set_link:
1132 # Sets the link status of a virtual network adapter.
1134 # @name: the device name of the virtual network adapter
1136 # @up: true to set the link status to be up
1138 # Returns: Nothing on success
1139 #          If @name is not a valid network device, DeviceNotFound
1141 # Since: 0.14.0
1143 # Notes: Not all network adapters support setting link status.  This command
1144 #        will succeed even if the network adapter does not support link status
1145 #        notification.
1147 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1150 # @balloon:
1152 # Request the balloon driver to change its balloon size.
1154 # @value: the target size of the balloon in bytes
1156 # Returns: Nothing on success
1157 #          If the balloon driver is enabled but not functional because the KVM
1158 #            kernel module cannot support it, KvmMissingCap
1159 #          If no balloon device is present, DeviceNotActive
1161 # Notes: This command just issues a request to the guest.  When it returns,
1162 #        the balloon size may not have changed.  A guest can change the balloon
1163 #        size independent of this command.
1165 # Since: 0.14.0
1167 { 'command': 'balloon', 'data': {'value': 'int'} }
1170 # @Abort
1172 # This action can be used to test transaction failure.
1174 # Since: 1.6
1176 { 'type': 'Abort',
1177   'data': { } }
1180 # @TransactionAction
1182 # A discriminated record of operations that can be performed with
1183 # @transaction.
1185 { 'union': 'TransactionAction',
1186   'data': {
1187        'blockdev-snapshot-sync': 'BlockdevSnapshot',
1188        'drive-backup': 'DriveBackup',
1189        'abort': 'Abort',
1190        'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal'
1191    } }
1194 # @transaction
1196 # Executes a number of transactionable QMP commands atomically. If any
1197 # operation fails, then the entire set of actions will be abandoned and the
1198 # appropriate error returned.
1200 #  List of:
1201 #  @TransactionAction: information needed for the respective operation
1203 # Returns: nothing on success
1204 #          Errors depend on the operations of the transaction
1206 # Note: The transaction aborts on the first failure.  Therefore, there will be
1207 # information on only one failed operation returned in an error condition, and
1208 # subsequent actions will not have been attempted.
1210 # Since 1.1
1212 { 'command': 'transaction',
1213   'data': { 'actions': [ 'TransactionAction' ] } }
1216 # @human-monitor-command:
1218 # Execute a command on the human monitor and return the output.
1220 # @command-line: the command to execute in the human monitor
1222 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1224 # Returns: the output of the command as a string
1226 # Since: 0.14.0
1228 # Notes: This command only exists as a stop-gap.  Its use is highly
1229 #        discouraged.  The semantics of this command are not guaranteed.
1231 #        Known limitations:
1233 #        o This command is stateless, this means that commands that depend
1234 #          on state information (such as getfd) might not work
1236 #       o Commands that prompt the user for data (eg. 'cont' when the block
1237 #         device is encrypted) don't currently work
1239 { 'command': 'human-monitor-command',
1240   'data': {'command-line': 'str', '*cpu-index': 'int'},
1241   'returns': 'str' }
1244 # @migrate_cancel
1246 # Cancel the current executing migration process.
1248 # Returns: nothing on success
1250 # Notes: This command succeeds even if there is no migration process running.
1252 # Since: 0.14.0
1254 { 'command': 'migrate_cancel' }
1257 # @migrate_set_downtime
1259 # Set maximum tolerated downtime for migration.
1261 # @value: maximum downtime in seconds
1263 # Returns: nothing on success
1265 # Since: 0.14.0
1267 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1270 # @migrate_set_speed
1272 # Set maximum speed for migration.
1274 # @value: maximum speed in bytes.
1276 # Returns: nothing on success
1278 # Notes: A value lesser than zero will be automatically round up to zero.
1280 # Since: 0.14.0
1282 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1285 # @migrate-set-cache-size
1287 # Set XBZRLE cache size
1289 # @value: cache size in bytes
1291 # The size will be rounded down to the nearest power of 2.
1292 # The cache size can be modified before and during ongoing migration
1294 # Returns: nothing on success
1296 # Since: 1.2
1298 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1301 # @query-migrate-cache-size
1303 # query XBZRLE cache size
1305 # Returns: XBZRLE cache size in bytes
1307 # Since: 1.2
1309 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1312 # @ObjectPropertyInfo:
1314 # @name: the name of the property
1316 # @type: the type of the property.  This will typically come in one of four
1317 #        forms:
1319 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1320 #           These types are mapped to the appropriate JSON type.
1322 #        2) A legacy type in the form 'legacy<subtype>' where subtype is the
1323 #           legacy qdev typename.  These types are always treated as strings.
1325 #        3) A child type in the form 'child<subtype>' where subtype is a qdev
1326 #           device type name.  Child properties create the composition tree.
1328 #        4) A link type in the form 'link<subtype>' where subtype is a qdev
1329 #           device type name.  Link properties form the device model graph.
1331 # Since: 1.2
1333 { 'type': 'ObjectPropertyInfo',
1334   'data': { 'name': 'str', 'type': 'str' } }
1337 # @qom-list:
1339 # This command will list any properties of a object given a path in the object
1340 # model.
1342 # @path: the path within the object model.  See @qom-get for a description of
1343 #        this parameter.
1345 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1346 #          object.
1348 # Since: 1.2
1350 { 'command': 'qom-list',
1351   'data': { 'path': 'str' },
1352   'returns': [ 'ObjectPropertyInfo' ] }
1355 # @qom-get:
1357 # This command will get a property from a object model path and return the
1358 # value.
1360 # @path: The path within the object model.  There are two forms of supported
1361 #        paths--absolute and partial paths.
1363 #        Absolute paths are derived from the root object and can follow child<>
1364 #        or link<> properties.  Since they can follow link<> properties, they
1365 #        can be arbitrarily long.  Absolute paths look like absolute filenames
1366 #        and are prefixed  with a leading slash.
1368 #        Partial paths look like relative filenames.  They do not begin
1369 #        with a prefix.  The matching rules for partial paths are subtle but
1370 #        designed to make specifying objects easy.  At each level of the
1371 #        composition tree, the partial path is matched as an absolute path.
1372 #        The first match is not returned.  At least two matches are searched
1373 #        for.  A successful result is only returned if only one match is
1374 #        found.  If more than one match is found, a flag is return to
1375 #        indicate that the match was ambiguous.
1377 # @property: The property name to read
1379 # Returns: The property value.  The type depends on the property type.  legacy<>
1380 #          properties are returned as #str.  child<> and link<> properties are
1381 #          returns as #str pathnames.  All integer property types (u8, u16, etc)
1382 #          are returned as #int.
1384 # Since: 1.2
1386 { 'command': 'qom-get',
1387   'data': { 'path': 'str', 'property': 'str' },
1388   'returns': 'visitor',
1389   'gen': 'no' }
1392 # @qom-set:
1394 # This command will set a property from a object model path.
1396 # @path: see @qom-get for a description of this parameter
1398 # @property: the property name to set
1400 # @value: a value who's type is appropriate for the property type.  See @qom-get
1401 #         for a description of type mapping.
1403 # Since: 1.2
1405 { 'command': 'qom-set',
1406   'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1407   'gen': 'no' }
1410 # @set_password:
1412 # Sets the password of a remote display session.
1414 # @protocol: `vnc' to modify the VNC server password
1415 #            `spice' to modify the Spice server password
1417 # @password: the new password
1419 # @connected: #optional how to handle existing clients when changing the
1420 #                       password.  If nothing is specified, defaults to `keep'
1421 #                       `fail' to fail the command if clients are connected
1422 #                       `disconnect' to disconnect existing clients
1423 #                       `keep' to maintain existing clients
1425 # Returns: Nothing on success
1426 #          If Spice is not enabled, DeviceNotFound
1428 # Since: 0.14.0
1430 { 'command': 'set_password',
1431   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1434 # @expire_password:
1436 # Expire the password of a remote display server.
1438 # @protocol: the name of the remote display protocol `vnc' or `spice'
1440 # @time: when to expire the password.
1441 #        `now' to expire the password immediately
1442 #        `never' to cancel password expiration
1443 #        `+INT' where INT is the number of seconds from now (integer)
1444 #        `INT' where INT is the absolute time in seconds
1446 # Returns: Nothing on success
1447 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
1449 # Since: 0.14.0
1451 # Notes: Time is relative to the server and currently there is no way to
1452 #        coordinate server time with client time.  It is not recommended to
1453 #        use the absolute time version of the @time parameter unless you're
1454 #        sure you are on the same machine as the QEMU instance.
1456 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1459 # @change-vnc-password:
1461 # Change the VNC server password.
1463 # @target:  the new password to use with VNC authentication
1465 # Since: 1.1
1467 # Notes:  An empty password in this command will set the password to the empty
1468 #         string.  Existing clients are unaffected by executing this command.
1470 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1473 # @change:
1475 # This command is multiple commands multiplexed together.
1477 # @device: This is normally the name of a block device but it may also be 'vnc'.
1478 #          when it's 'vnc', then sub command depends on @target
1480 # @target: If @device is a block device, then this is the new filename.
1481 #          If @device is 'vnc', then if the value 'password' selects the vnc
1482 #          change password command.   Otherwise, this specifies a new server URI
1483 #          address to listen to for VNC connections.
1485 # @arg:    If @device is a block device, then this is an optional format to open
1486 #          the device with.
1487 #          If @device is 'vnc' and @target is 'password', this is the new VNC
1488 #          password to set.  If this argument is an empty string, then no future
1489 #          logins will be allowed.
1491 # Returns: Nothing on success.
1492 #          If @device is not a valid block device, DeviceNotFound
1493 #          If the new block device is encrypted, DeviceEncrypted.  Note that
1494 #          if this error is returned, the device has been opened successfully
1495 #          and an additional call to @block_passwd is required to set the
1496 #          device's password.  The behavior of reads and writes to the block
1497 #          device between when these calls are executed is undefined.
1499 # Notes:  It is strongly recommended that this interface is not used especially
1500 #         for changing block devices.
1502 # Since: 0.14.0
1504 { 'command': 'change',
1505   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1508 # @ObjectTypeInfo:
1510 # This structure describes a search result from @qom-list-types
1512 # @name: the type name found in the search
1514 # Since: 1.1
1516 # Notes: This command is experimental and may change syntax in future releases.
1518 { 'type': 'ObjectTypeInfo',
1519   'data': { 'name': 'str' } }
1522 # @qom-list-types:
1524 # This command will return a list of types given search parameters
1526 # @implements: if specified, only return types that implement this type name
1528 # @abstract: if true, include abstract types in the results
1530 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1532 # Since: 1.1
1534 { 'command': 'qom-list-types',
1535   'data': { '*implements': 'str', '*abstract': 'bool' },
1536   'returns': [ 'ObjectTypeInfo' ] }
1539 # @DevicePropertyInfo:
1541 # Information about device properties.
1543 # @name: the name of the property
1544 # @type: the typename of the property
1546 # Since: 1.2
1548 { 'type': 'DevicePropertyInfo',
1549   'data': { 'name': 'str', 'type': 'str' } }
1552 # @device-list-properties:
1554 # List properties associated with a device.
1556 # @typename: the type name of a device
1558 # Returns: a list of DevicePropertyInfo describing a devices properties
1560 # Since: 1.2
1562 { 'command': 'device-list-properties',
1563   'data': { 'typename': 'str'},
1564   'returns': [ 'DevicePropertyInfo' ] }
1567 # @migrate
1569 # Migrates the current running guest to another Virtual Machine.
1571 # @uri: the Uniform Resource Identifier of the destination VM
1573 # @blk: #optional do block migration (full disk copy)
1575 # @inc: #optional incremental disk copy migration
1577 # @detach: this argument exists only for compatibility reasons and
1578 #          is ignored by QEMU
1580 # Returns: nothing on success
1582 # Since: 0.14.0
1584 { 'command': 'migrate',
1585   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
1587 # @xen-save-devices-state:
1589 # Save the state of all devices to file. The RAM and the block devices
1590 # of the VM are not saved by this command.
1592 # @filename: the file to save the state of the devices to as binary
1593 # data. See xen-save-devices-state.txt for a description of the binary
1594 # format.
1596 # Returns: Nothing on success
1598 # Since: 1.1
1600 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
1603 # @xen-set-global-dirty-log
1605 # Enable or disable the global dirty log mode.
1607 # @enable: true to enable, false to disable.
1609 # Returns: nothing
1611 # Since: 1.3
1613 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1616 # @device_del:
1618 # Remove a device from a guest
1620 # @id: the name of the device
1622 # Returns: Nothing on success
1623 #          If @id is not a valid device, DeviceNotFound
1625 # Notes: When this command completes, the device may not be removed from the
1626 #        guest.  Hot removal is an operation that requires guest cooperation.
1627 #        This command merely requests that the guest begin the hot removal
1628 #        process.  Completion of the device removal process is signaled with a
1629 #        DEVICE_DELETED event. Guest reset will automatically complete removal
1630 #        for all devices.
1632 # Since: 0.14.0
1634 { 'command': 'device_del', 'data': {'id': 'str'} }
1637 # @DumpGuestMemoryFormat:
1639 # An enumeration of guest-memory-dump's format.
1641 # @elf: elf format
1643 # @kdump-zlib: kdump-compressed format with zlib-compressed
1645 # @kdump-lzo: kdump-compressed format with lzo-compressed
1647 # @kdump-snappy: kdump-compressed format with snappy-compressed
1649 # Since: 2.0
1651 { 'enum': 'DumpGuestMemoryFormat',
1652   'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
1655 # @dump-guest-memory
1657 # Dump guest's memory to vmcore. It is a synchronous operation that can take
1658 # very long depending on the amount of guest memory. This command is only
1659 # supported on i386 and x86_64.
1661 # @paging: if true, do paging to get guest's memory mapping. This allows
1662 #          using gdb to process the core file.
1664 #          IMPORTANT: this option can make QEMU allocate several gigabytes
1665 #                     of RAM. This can happen for a large guest, or a
1666 #                     malicious guest pretending to be large.
1668 #          Also, paging=true has the following limitations:
1670 #             1. The guest may be in a catastrophic state or can have corrupted
1671 #                memory, which cannot be trusted
1672 #             2. The guest can be in real-mode even if paging is enabled. For
1673 #                example, the guest uses ACPI to sleep, and ACPI sleep state
1674 #                goes in real-mode
1676 # @protocol: the filename or file descriptor of the vmcore. The supported
1677 #            protocols are:
1679 #            1. file: the protocol starts with "file:", and the following
1680 #               string is the file's path.
1681 #            2. fd: the protocol starts with "fd:", and the following string
1682 #               is the fd's name.
1684 # @begin: #optional if specified, the starting physical address.
1686 # @length: #optional if specified, the memory size, in bytes. If you don't
1687 #          want to dump all guest's memory, please specify the start @begin
1688 #          and @length
1690 # @format: #optional if specified, the format of guest memory dump. But non-elf
1691 #          format is conflict with paging and filter, ie. @paging, @begin and
1692 #          @length is not allowed to be specified with non-elf @format at the
1693 #          same time (since 2.0)
1695 # Returns: nothing on success
1697 # Since: 1.2
1699 { 'command': 'dump-guest-memory',
1700   'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
1701             '*length': 'int', '*format': 'DumpGuestMemoryFormat' } }
1704 # @DumpGuestMemoryCapability:
1706 # A list of the available formats for dump-guest-memory
1708 # Since: 2.0
1710 { 'type': 'DumpGuestMemoryCapability',
1711   'data': {
1712       'formats': ['DumpGuestMemoryFormat'] } }
1715 # @query-dump-guest-memory-capability:
1717 # Returns the available formats for dump-guest-memory
1719 # Returns:  A @DumpGuestMemoryCapability object listing available formats for
1720 #           dump-guest-memory
1722 # Since: 2.0
1724 { 'command': 'query-dump-guest-memory-capability',
1725   'returns': 'DumpGuestMemoryCapability' }
1728 # @netdev_add:
1730 # Add a network backend.
1732 # @type: the type of network backend.  Current valid values are 'user', 'tap',
1733 #        'vde', 'socket', 'dump' and 'bridge'
1735 # @id: the name of the new network backend
1737 # @props: #optional a list of properties to be passed to the backend in
1738 #         the format 'name=value', like 'ifname=tap0,script=no'
1740 # Notes: The semantics of @props is not well defined.  Future commands will be
1741 #        introduced that provide stronger typing for backend creation.
1743 # Since: 0.14.0
1745 # Returns: Nothing on success
1746 #          If @type is not a valid network backend, DeviceNotFound
1748 { 'command': 'netdev_add',
1749   'data': {'type': 'str', 'id': 'str', '*props': '**'},
1750   'gen': 'no' }
1753 # @netdev_del:
1755 # Remove a network backend.
1757 # @id: the name of the network backend to remove
1759 # Returns: Nothing on success
1760 #          If @id is not a valid network backend, DeviceNotFound
1762 # Since: 0.14.0
1764 { 'command': 'netdev_del', 'data': {'id': 'str'} }
1767 # @object-add:
1769 # Create a QOM object.
1771 # @qom-type: the class name for the object to be created
1773 # @id: the name of the new object
1775 # @props: #optional a dictionary of properties to be passed to the backend
1777 # Returns: Nothing on success
1778 #          Error if @qom-type is not a valid class name
1780 # Since: 2.0
1782 { 'command': 'object-add',
1783   'data': {'qom-type': 'str', 'id': 'str', '*props': 'dict'},
1784   'gen': 'no' }
1787 # @object-del:
1789 # Remove a QOM object.
1791 # @id: the name of the QOM object to remove
1793 # Returns: Nothing on success
1794 #          Error if @id is not a valid id for a QOM object
1796 # Since: 2.0
1798 { 'command': 'object-del', 'data': {'id': 'str'} }
1801 # @NetdevNoneOptions
1803 # Use it alone to have zero network devices.
1805 # Since 1.2
1807 { 'type': 'NetdevNoneOptions',
1808   'data': { } }
1811 # @NetLegacyNicOptions
1813 # Create a new Network Interface Card.
1815 # @netdev: #optional id of -netdev to connect to
1817 # @macaddr: #optional MAC address
1819 # @model: #optional device model (e1000, rtl8139, virtio etc.)
1821 # @addr: #optional PCI device address
1823 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
1825 # Since 1.2
1827 { 'type': 'NetLegacyNicOptions',
1828   'data': {
1829     '*netdev':  'str',
1830     '*macaddr': 'str',
1831     '*model':   'str',
1832     '*addr':    'str',
1833     '*vectors': 'uint32' } }
1836 # @String
1838 # A fat type wrapping 'str', to be embedded in lists.
1840 # Since 1.2
1842 { 'type': 'String',
1843   'data': {
1844     'str': 'str' } }
1847 # @NetdevUserOptions
1849 # Use the user mode network stack which requires no administrator privilege to
1850 # run.
1852 # @hostname: #optional client hostname reported by the builtin DHCP server
1854 # @restrict: #optional isolate the guest from the host
1856 # @ip: #optional legacy parameter, use net= instead
1858 # @net: #optional IP address and optional netmask
1860 # @host: #optional guest-visible address of the host
1862 # @tftp: #optional root directory of the built-in TFTP server
1864 # @bootfile: #optional BOOTP filename, for use with tftp=
1866 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
1867 #             assign
1869 # @dns: #optional guest-visible address of the virtual nameserver
1871 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
1872 #             to the guest
1874 # @smb: #optional root directory of the built-in SMB server
1876 # @smbserver: #optional IP address of the built-in SMB server
1878 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
1879 #           endpoints
1881 # @guestfwd: #optional forward guest TCP connections
1883 # Since 1.2
1885 { 'type': 'NetdevUserOptions',
1886   'data': {
1887     '*hostname':  'str',
1888     '*restrict':  'bool',
1889     '*ip':        'str',
1890     '*net':       'str',
1891     '*host':      'str',
1892     '*tftp':      'str',
1893     '*bootfile':  'str',
1894     '*dhcpstart': 'str',
1895     '*dns':       'str',
1896     '*dnssearch': ['String'],
1897     '*smb':       'str',
1898     '*smbserver': 'str',
1899     '*hostfwd':   ['String'],
1900     '*guestfwd':  ['String'] } }
1903 # @NetdevTapOptions
1905 # Connect the host TAP network interface name to the VLAN.
1907 # @ifname: #optional interface name
1909 # @fd: #optional file descriptor of an already opened tap
1911 # @fds: #optional multiple file descriptors of already opened multiqueue capable
1912 # tap
1914 # @script: #optional script to initialize the interface
1916 # @downscript: #optional script to shut down the interface
1918 # @helper: #optional command to execute to configure bridge
1920 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
1922 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
1924 # @vhost: #optional enable vhost-net network accelerator
1926 # @vhostfd: #optional file descriptor of an already opened vhost net device
1928 # @vhostfds: #optional file descriptors of multiple already opened vhost net
1929 # devices
1931 # @vhostforce: #optional vhost on for non-MSIX virtio guests
1933 # @queues: #optional number of queues to be created for multiqueue capable tap
1935 # Since 1.2
1937 { 'type': 'NetdevTapOptions',
1938   'data': {
1939     '*ifname':     'str',
1940     '*fd':         'str',
1941     '*fds':        'str',
1942     '*script':     'str',
1943     '*downscript': 'str',
1944     '*helper':     'str',
1945     '*sndbuf':     'size',
1946     '*vnet_hdr':   'bool',
1947     '*vhost':      'bool',
1948     '*vhostfd':    'str',
1949     '*vhostfds':   'str',
1950     '*vhostforce': 'bool',
1951     '*queues':     'uint32'} }
1954 # @NetdevSocketOptions
1956 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
1957 # socket connection.
1959 # @fd: #optional file descriptor of an already opened socket
1961 # @listen: #optional port number, and optional hostname, to listen on
1963 # @connect: #optional port number, and optional hostname, to connect to
1965 # @mcast: #optional UDP multicast address and port number
1967 # @localaddr: #optional source address and port for multicast and udp packets
1969 # @udp: #optional UDP unicast address and port number
1971 # Since 1.2
1973 { 'type': 'NetdevSocketOptions',
1974   'data': {
1975     '*fd':        'str',
1976     '*listen':    'str',
1977     '*connect':   'str',
1978     '*mcast':     'str',
1979     '*localaddr': 'str',
1980     '*udp':       'str' } }
1983 # @NetdevVdeOptions
1985 # Connect the VLAN to a vde switch running on the host.
1987 # @sock: #optional socket path
1989 # @port: #optional port number
1991 # @group: #optional group owner of socket
1993 # @mode: #optional permissions for socket
1995 # Since 1.2
1997 { 'type': 'NetdevVdeOptions',
1998   'data': {
1999     '*sock':  'str',
2000     '*port':  'uint16',
2001     '*group': 'str',
2002     '*mode':  'uint16' } }
2005 # @NetdevDumpOptions
2007 # Dump VLAN network traffic to a file.
2009 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2010 # suffixes.
2012 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2014 # Since 1.2
2016 { 'type': 'NetdevDumpOptions',
2017   'data': {
2018     '*len':  'size',
2019     '*file': 'str' } }
2022 # @NetdevBridgeOptions
2024 # Connect a host TAP network interface to a host bridge device.
2026 # @br: #optional bridge name
2028 # @helper: #optional command to execute to configure bridge
2030 # Since 1.2
2032 { 'type': 'NetdevBridgeOptions',
2033   'data': {
2034     '*br':     'str',
2035     '*helper': 'str' } }
2038 # @NetdevHubPortOptions
2040 # Connect two or more net clients through a software hub.
2042 # @hubid: hub identifier number
2044 # Since 1.2
2046 { 'type': 'NetdevHubPortOptions',
2047   'data': {
2048     'hubid':     'int32' } }
2051 # @NetdevNetmapOptions
2053 # Connect a client to a netmap-enabled NIC or to a VALE switch port
2055 # @ifname: Either the name of an existing network interface supported by
2056 #          netmap, or the name of a VALE port (created on the fly).
2057 #          A VALE port name is in the form 'valeXXX:YYY', where XXX and
2058 #          YYY are non-negative integers. XXX identifies a switch and
2059 #          YYY identifies a port of the switch. VALE ports having the
2060 #          same XXX are therefore connected to the same switch.
2062 # @devname: #optional path of the netmap device (default: '/dev/netmap').
2064 # Since 2.0
2066 { 'type': 'NetdevNetmapOptions',
2067   'data': {
2068     'ifname':     'str',
2069     '*devname':    'str' } }
2072 # @NetClientOptions
2074 # A discriminated record of network device traits.
2076 # Since 1.2
2078 { 'union': 'NetClientOptions',
2079   'data': {
2080     'none':     'NetdevNoneOptions',
2081     'nic':      'NetLegacyNicOptions',
2082     'user':     'NetdevUserOptions',
2083     'tap':      'NetdevTapOptions',
2084     'socket':   'NetdevSocketOptions',
2085     'vde':      'NetdevVdeOptions',
2086     'dump':     'NetdevDumpOptions',
2087     'bridge':   'NetdevBridgeOptions',
2088     'hubport':  'NetdevHubPortOptions',
2089     'netmap':   'NetdevNetmapOptions' } }
2092 # @NetLegacy
2094 # Captures the configuration of a network device; legacy.
2096 # @vlan: #optional vlan number
2098 # @id: #optional identifier for monitor commands
2100 # @name: #optional identifier for monitor commands, ignored if @id is present
2102 # @opts: device type specific properties (legacy)
2104 # Since 1.2
2106 { 'type': 'NetLegacy',
2107   'data': {
2108     '*vlan': 'int32',
2109     '*id':   'str',
2110     '*name': 'str',
2111     'opts':  'NetClientOptions' } }
2114 # @Netdev
2116 # Captures the configuration of a network device.
2118 # @id: identifier for monitor commands.
2120 # @opts: device type specific properties
2122 # Since 1.2
2124 { 'type': 'Netdev',
2125   'data': {
2126     'id':   'str',
2127     'opts': 'NetClientOptions' } }
2130 # @InetSocketAddress
2132 # Captures a socket address or address range in the Internet namespace.
2134 # @host: host part of the address
2136 # @port: port part of the address, or lowest port if @to is present
2138 # @to: highest port to try
2140 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2141 #        #optional
2143 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2144 #        #optional
2146 # Since 1.3
2148 { 'type': 'InetSocketAddress',
2149   'data': {
2150     'host': 'str',
2151     'port': 'str',
2152     '*to': 'uint16',
2153     '*ipv4': 'bool',
2154     '*ipv6': 'bool' } }
2157 # @UnixSocketAddress
2159 # Captures a socket address in the local ("Unix socket") namespace.
2161 # @path: filesystem path to use
2163 # Since 1.3
2165 { 'type': 'UnixSocketAddress',
2166   'data': {
2167     'path': 'str' } }
2170 # @SocketAddress
2172 # Captures the address of a socket, which could also be a named file descriptor
2174 # Since 1.3
2176 { 'union': 'SocketAddress',
2177   'data': {
2178     'inet': 'InetSocketAddress',
2179     'unix': 'UnixSocketAddress',
2180     'fd': 'String' } }
2183 # @getfd:
2185 # Receive a file descriptor via SCM rights and assign it a name
2187 # @fdname: file descriptor name
2189 # Returns: Nothing on success
2191 # Since: 0.14.0
2193 # Notes: If @fdname already exists, the file descriptor assigned to
2194 #        it will be closed and replaced by the received file
2195 #        descriptor.
2196 #        The 'closefd' command can be used to explicitly close the
2197 #        file descriptor when it is no longer needed.
2199 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2202 # @closefd:
2204 # Close a file descriptor previously passed via SCM rights
2206 # @fdname: file descriptor name
2208 # Returns: Nothing on success
2210 # Since: 0.14.0
2212 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2215 # @MachineInfo:
2217 # Information describing a machine.
2219 # @name: the name of the machine
2221 # @alias: #optional an alias for the machine name
2223 # @default: #optional whether the machine is default
2225 # @cpu-max: maximum number of CPUs supported by the machine type
2226 #           (since 1.5.0)
2228 # Since: 1.2.0
2230 { 'type': 'MachineInfo',
2231   'data': { 'name': 'str', '*alias': 'str',
2232             '*is-default': 'bool', 'cpu-max': 'int' } }
2235 # @query-machines:
2237 # Return a list of supported machines
2239 # Returns: a list of MachineInfo
2241 # Since: 1.2.0
2243 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2246 # @CpuDefinitionInfo:
2248 # Virtual CPU definition.
2250 # @name: the name of the CPU definition
2252 # Since: 1.2.0
2254 { 'type': 'CpuDefinitionInfo',
2255   'data': { 'name': 'str' } }
2258 # @query-cpu-definitions:
2260 # Return a list of supported virtual CPU definitions
2262 # Returns: a list of CpuDefInfo
2264 # Since: 1.2.0
2266 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2268 # @AddfdInfo:
2270 # Information about a file descriptor that was added to an fd set.
2272 # @fdset-id: The ID of the fd set that @fd was added to.
2274 # @fd: The file descriptor that was received via SCM rights and
2275 #      added to the fd set.
2277 # Since: 1.2.0
2279 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2282 # @add-fd:
2284 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2286 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2288 # @opaque: #optional A free-form string that can be used to describe the fd.
2290 # Returns: @AddfdInfo on success
2291 #          If file descriptor was not received, FdNotSupplied
2292 #          If @fdset-id is a negative value, InvalidParameterValue
2294 # Notes: The list of fd sets is shared by all monitor connections.
2296 #        If @fdset-id is not specified, a new fd set will be created.
2298 # Since: 1.2.0
2300 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2301   'returns': 'AddfdInfo' }
2304 # @remove-fd:
2306 # Remove a file descriptor from an fd set.
2308 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2310 # @fd: #optional The file descriptor that is to be removed.
2312 # Returns: Nothing on success
2313 #          If @fdset-id or @fd is not found, FdNotFound
2315 # Since: 1.2.0
2317 # Notes: The list of fd sets is shared by all monitor connections.
2319 #        If @fd is not specified, all file descriptors in @fdset-id
2320 #        will be removed.
2322 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2325 # @FdsetFdInfo:
2327 # Information about a file descriptor that belongs to an fd set.
2329 # @fd: The file descriptor value.
2331 # @opaque: #optional A free-form string that can be used to describe the fd.
2333 # Since: 1.2.0
2335 { 'type': 'FdsetFdInfo',
2336   'data': {'fd': 'int', '*opaque': 'str'} }
2339 # @FdsetInfo:
2341 # Information about an fd set.
2343 # @fdset-id: The ID of the fd set.
2345 # @fds: A list of file descriptors that belong to this fd set.
2347 # Since: 1.2.0
2349 { 'type': 'FdsetInfo',
2350   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2353 # @query-fdsets:
2355 # Return information describing all fd sets.
2357 # Returns: A list of @FdsetInfo
2359 # Since: 1.2.0
2361 # Note: The list of fd sets is shared by all monitor connections.
2364 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2367 # @TargetInfo:
2369 # Information describing the QEMU target.
2371 # @arch: the target architecture (eg "x86_64", "i386", etc)
2373 # Since: 1.2.0
2375 { 'type': 'TargetInfo',
2376   'data': { 'arch': 'str' } }
2379 # @query-target:
2381 # Return information about the target for this QEMU
2383 # Returns: TargetInfo
2385 # Since: 1.2.0
2387 { 'command': 'query-target', 'returns': 'TargetInfo' }
2390 # @QKeyCode:
2392 # An enumeration of key name.
2394 # This is used by the send-key command.
2396 # Since: 1.3.0
2398 # 'unmapped' and 'pause' since 2.0
2400 { 'enum': 'QKeyCode',
2401   'data': [ 'unmapped',
2402             'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
2403             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
2404             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
2405             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
2406             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
2407             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
2408             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
2409             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
2410             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
2411             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
2412             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
2413             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
2414             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
2415             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
2416              'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause' ] }
2419 # @KeyValue
2421 # Represents a keyboard key.
2423 # Since: 1.3.0
2425 { 'union': 'KeyValue',
2426   'data': {
2427     'number': 'int',
2428     'qcode': 'QKeyCode' } }
2431 # @send-key:
2433 # Send keys to guest.
2435 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
2436 #        simultaneously sent to the guest. A @KeyValue.number value is sent
2437 #        directly to the guest, while @KeyValue.qcode must be a valid
2438 #        @QKeyCode value
2440 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
2441 #             to 100
2443 # Returns: Nothing on success
2444 #          If key is unknown or redundant, InvalidParameter
2446 # Since: 1.3.0
2449 { 'command': 'send-key',
2450   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
2453 # @screendump:
2455 # Write a PPM of the VGA screen to a file.
2457 # @filename: the path of a new PPM file to store the image
2459 # Returns: Nothing on success
2461 # Since: 0.14.0
2463 { 'command': 'screendump', 'data': {'filename': 'str'} }
2466 # @ChardevFile:
2468 # Configuration info for file chardevs.
2470 # @in:  #optional The name of the input file
2471 # @out: The name of the output file
2473 # Since: 1.4
2475 { 'type': 'ChardevFile', 'data': { '*in' : 'str',
2476                                    'out' : 'str' } }
2479 # @ChardevHostdev:
2481 # Configuration info for device and pipe chardevs.
2483 # @device: The name of the special file for the device,
2484 #          i.e. /dev/ttyS0 on Unix or COM1: on Windows
2485 # @type: What kind of device this is.
2487 # Since: 1.4
2489 { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
2492 # @ChardevSocket:
2494 # Configuration info for (stream) socket chardevs.
2496 # @addr: socket address to listen on (server=true)
2497 #        or connect to (server=false)
2498 # @server: #optional create server socket (default: true)
2499 # @wait: #optional wait for incoming connection on server
2500 #        sockets (default: false).
2501 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
2502 # @telnet: #optional enable telnet protocol on server
2503 #          sockets (default: false)
2505 # Since: 1.4
2507 { 'type': 'ChardevSocket', 'data': { 'addr'     : 'SocketAddress',
2508                                      '*server'  : 'bool',
2509                                      '*wait'    : 'bool',
2510                                      '*nodelay' : 'bool',
2511                                      '*telnet'  : 'bool' } }
2514 # @ChardevUdp:
2516 # Configuration info for datagram socket chardevs.
2518 # @remote: remote address
2519 # @local: #optional local address
2521 # Since: 1.5
2523 { 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
2524                                   '*local' : 'SocketAddress' } }
2527 # @ChardevMux:
2529 # Configuration info for mux chardevs.
2531 # @chardev: name of the base chardev.
2533 # Since: 1.5
2535 { 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
2538 # @ChardevStdio:
2540 # Configuration info for stdio chardevs.
2542 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
2543 #          be delivered to qemu.  Default: true in -nographic mode,
2544 #          false otherwise.
2546 # Since: 1.5
2548 { 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
2551 # @ChardevSpiceChannel:
2553 # Configuration info for spice vm channel chardevs.
2555 # @type: kind of channel (for example vdagent).
2557 # Since: 1.5
2559 { 'type': 'ChardevSpiceChannel', 'data': { 'type'  : 'str' } }
2562 # @ChardevSpicePort:
2564 # Configuration info for spice port chardevs.
2566 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
2568 # Since: 1.5
2570 { 'type': 'ChardevSpicePort', 'data': { 'fqdn'  : 'str' } }
2573 # @ChardevVC:
2575 # Configuration info for virtual console chardevs.
2577 # @width:  console width,  in pixels
2578 # @height: console height, in pixels
2579 # @cols:   console width,  in chars
2580 # @rows:   console height, in chars
2582 # Since: 1.5
2584 { 'type': 'ChardevVC', 'data': { '*width'  : 'int',
2585                                  '*height' : 'int',
2586                                  '*cols'   : 'int',
2587                                  '*rows'   : 'int' } }
2590 # @ChardevRingbuf:
2592 # Configuration info for ring buffer chardevs.
2594 # @size: #optional ring buffer size, must be power of two, default is 65536
2596 # Since: 1.5
2598 { 'type': 'ChardevRingbuf', 'data': { '*size'  : 'int' } }
2601 # @ChardevBackend:
2603 # Configuration info for the new chardev backend.
2605 # Since: 1.4
2607 { 'type': 'ChardevDummy', 'data': { } }
2609 { 'union': 'ChardevBackend', 'data': { 'file'   : 'ChardevFile',
2610                                        'serial' : 'ChardevHostdev',
2611                                        'parallel': 'ChardevHostdev',
2612                                        'pipe'   : 'ChardevHostdev',
2613                                        'socket' : 'ChardevSocket',
2614                                        'udp'    : 'ChardevUdp',
2615                                        'pty'    : 'ChardevDummy',
2616                                        'null'   : 'ChardevDummy',
2617                                        'mux'    : 'ChardevMux',
2618                                        'msmouse': 'ChardevDummy',
2619                                        'braille': 'ChardevDummy',
2620                                        'stdio'  : 'ChardevStdio',
2621                                        'console': 'ChardevDummy',
2622                                        'spicevmc' : 'ChardevSpiceChannel',
2623                                        'spiceport' : 'ChardevSpicePort',
2624                                        'vc'     : 'ChardevVC',
2625                                        'ringbuf': 'ChardevRingbuf',
2626                                        # next one is just for compatibility
2627                                        'memory' : 'ChardevRingbuf' } }
2630 # @ChardevReturn:
2632 # Return info about the chardev backend just created.
2634 # @pty: #optional name of the slave pseudoterminal device, present if
2635 #       and only if a chardev of type 'pty' was created
2637 # Since: 1.4
2639 { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
2642 # @chardev-add:
2644 # Add a character device backend
2646 # @id: the chardev's ID, must be unique
2647 # @backend: backend type and parameters
2649 # Returns: ChardevReturn.
2651 # Since: 1.4
2653 { 'command': 'chardev-add', 'data': {'id'      : 'str',
2654                                      'backend' : 'ChardevBackend' },
2655   'returns': 'ChardevReturn' }
2658 # @chardev-remove:
2660 # Remove a character device backend
2662 # @id: the chardev's ID, must exist and not be in use
2664 # Returns: Nothing on success
2666 # Since: 1.4
2668 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
2671 # @TpmModel:
2673 # An enumeration of TPM models
2675 # @tpm-tis: TPM TIS model
2677 # Since: 1.5
2679 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
2682 # @query-tpm-models:
2684 # Return a list of supported TPM models
2686 # Returns: a list of TpmModel
2688 # Since: 1.5
2690 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
2693 # @TpmType:
2695 # An enumeration of TPM types
2697 # @passthrough: TPM passthrough type
2699 # Since: 1.5
2701 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
2704 # @query-tpm-types:
2706 # Return a list of supported TPM types
2708 # Returns: a list of TpmType
2710 # Since: 1.5
2712 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
2715 # @TPMPassthroughOptions:
2717 # Information about the TPM passthrough type
2719 # @path: #optional string describing the path used for accessing the TPM device
2721 # @cancel-path: #optional string showing the TPM's sysfs cancel file
2722 #               for cancellation of TPM commands while they are executing
2724 # Since: 1.5
2726 { 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
2727                                              '*cancel-path' : 'str'} }
2730 # @TpmTypeOptions:
2732 # A union referencing different TPM backend types' configuration options
2734 # @passthrough: The configuration options for the TPM passthrough type
2736 # Since: 1.5
2738 { 'union': 'TpmTypeOptions',
2739    'data': { 'passthrough' : 'TPMPassthroughOptions' } }
2742 # @TpmInfo:
2744 # Information about the TPM
2746 # @id: The Id of the TPM
2748 # @model: The TPM frontend model
2750 # @options: The TPM (backend) type configuration options
2752 # Since: 1.5
2754 { 'type': 'TPMInfo',
2755   'data': {'id': 'str',
2756            'model': 'TpmModel',
2757            'options': 'TpmTypeOptions' } }
2760 # @query-tpm:
2762 # Return information about the TPM device
2764 # Returns: @TPMInfo on success
2766 # Since: 1.5
2768 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
2771 # @AcpiTableOptions
2773 # Specify an ACPI table on the command line to load.
2775 # At most one of @file and @data can be specified. The list of files specified
2776 # by any one of them is loaded and concatenated in order. If both are omitted,
2777 # @data is implied.
2779 # Other fields / optargs can be used to override fields of the generic ACPI
2780 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
2781 # Description Table Header. If a header field is not overridden, then the
2782 # corresponding value from the concatenated blob is used (in case of @file), or
2783 # it is filled in with a hard-coded value (in case of @data).
2785 # String fields are copied into the matching ACPI member from lowest address
2786 # upwards, and silently truncated / NUL-padded to length.
2788 # @sig: #optional table signature / identifier (4 bytes)
2790 # @rev: #optional table revision number (dependent on signature, 1 byte)
2792 # @oem_id: #optional OEM identifier (6 bytes)
2794 # @oem_table_id: #optional OEM table identifier (8 bytes)
2796 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
2798 # @asl_compiler_id: #optional identifier of the utility that created the table
2799 #                   (4 bytes)
2801 # @asl_compiler_rev: #optional revision number of the utility that created the
2802 #                    table (4 bytes)
2804 # @file: #optional colon (:) separated list of pathnames to load and
2805 #        concatenate as table data. The resultant binary blob is expected to
2806 #        have an ACPI table header. At least one file is required. This field
2807 #        excludes @data.
2809 # @data: #optional colon (:) separated list of pathnames to load and
2810 #        concatenate as table data. The resultant binary blob must not have an
2811 #        ACPI table header. At least one file is required. This field excludes
2812 #        @file.
2814 # Since 1.5
2816 { 'type': 'AcpiTableOptions',
2817   'data': {
2818     '*sig':               'str',
2819     '*rev':               'uint8',
2820     '*oem_id':            'str',
2821     '*oem_table_id':      'str',
2822     '*oem_rev':           'uint32',
2823     '*asl_compiler_id':   'str',
2824     '*asl_compiler_rev':  'uint32',
2825     '*file':              'str',
2826     '*data':              'str' }}
2829 # @CommandLineParameterType:
2831 # Possible types for an option parameter.
2833 # @string: accepts a character string
2835 # @boolean: accepts "on" or "off"
2837 # @number: accepts a number
2839 # @size: accepts a number followed by an optional suffix (K)ilo,
2840 #        (M)ega, (G)iga, (T)era
2842 # Since 1.5
2844 { 'enum': 'CommandLineParameterType',
2845   'data': ['string', 'boolean', 'number', 'size'] }
2848 # @CommandLineParameterInfo:
2850 # Details about a single parameter of a command line option.
2852 # @name: parameter name
2854 # @type: parameter @CommandLineParameterType
2856 # @help: #optional human readable text string, not suitable for parsing.
2858 # @default: #optional default value string (since 2.1)
2860 # Since 1.5
2862 { 'type': 'CommandLineParameterInfo',
2863   'data': { 'name': 'str',
2864             'type': 'CommandLineParameterType',
2865             '*help': 'str',
2866             '*default': 'str' } }
2869 # @CommandLineOptionInfo:
2871 # Details about a command line option, including its list of parameter details
2873 # @option: option name
2875 # @parameters: an array of @CommandLineParameterInfo
2877 # Since 1.5
2879 { 'type': 'CommandLineOptionInfo',
2880   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
2883 # @query-command-line-options:
2885 # Query command line option schema.
2887 # @option: #optional option name
2889 # Returns: list of @CommandLineOptionInfo for all options (or for the given
2890 #          @option).  Returns an error if the given @option doesn't exist.
2892 # Since 1.5
2894 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
2895  'returns': ['CommandLineOptionInfo'] }
2898 # @X86CPURegister32
2900 # A X86 32-bit register
2902 # Since: 1.5
2904 { 'enum': 'X86CPURegister32',
2905   'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
2908 # @X86CPUFeatureWordInfo
2910 # Information about a X86 CPU feature word
2912 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
2914 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
2915 #                   feature word
2917 # @cpuid-register: Output register containing the feature bits
2919 # @features: value of output register, containing the feature bits
2921 # Since: 1.5
2923 { 'type': 'X86CPUFeatureWordInfo',
2924   'data': { 'cpuid-input-eax': 'int',
2925             '*cpuid-input-ecx': 'int',
2926             'cpuid-register': 'X86CPURegister32',
2927             'features': 'int' } }
2930 # @RxState:
2932 # Packets receiving state
2934 # @normal: filter assigned packets according to the mac-table
2936 # @none: don't receive any assigned packet
2938 # @all: receive all assigned packets
2940 # Since: 1.6
2942 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
2945 # @RxFilterInfo:
2947 # Rx-filter information for a NIC.
2949 # @name: net client name
2951 # @promiscuous: whether promiscuous mode is enabled
2953 # @multicast: multicast receive state
2955 # @unicast: unicast receive state
2957 # @vlan: vlan receive state (Since 2.0)
2959 # @broadcast-allowed: whether to receive broadcast
2961 # @multicast-overflow: multicast table is overflowed or not
2963 # @unicast-overflow: unicast table is overflowed or not
2965 # @main-mac: the main macaddr string
2967 # @vlan-table: a list of active vlan id
2969 # @unicast-table: a list of unicast macaddr string
2971 # @multicast-table: a list of multicast macaddr string
2973 # Since 1.6
2976 { 'type': 'RxFilterInfo',
2977   'data': {
2978     'name':               'str',
2979     'promiscuous':        'bool',
2980     'multicast':          'RxState',
2981     'unicast':            'RxState',
2982     'vlan':               'RxState',
2983     'broadcast-allowed':  'bool',
2984     'multicast-overflow': 'bool',
2985     'unicast-overflow':   'bool',
2986     'main-mac':           'str',
2987     'vlan-table':         ['int'],
2988     'unicast-table':      ['str'],
2989     'multicast-table':    ['str'] }}
2992 # @query-rx-filter:
2994 # Return rx-filter information for all NICs (or for the given NIC).
2996 # @name: #optional net client name
2998 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
2999 #          Returns an error if the given @name doesn't exist, or given
3000 #          NIC doesn't support rx-filter querying, or given net client
3001 #          isn't a NIC.
3003 # Since: 1.6
3005 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
3006   'returns': ['RxFilterInfo'] }
3009 # @InputButton
3011 # Button of a pointer input device (mouse, tablet).
3013 # Since: 2.0
3015 { 'enum'  : 'InputButton',
3016   'data'  : [ 'Left', 'Middle', 'Right', 'WheelUp', 'WheelDown' ] }
3019 # @InputButton
3021 # Position axis of a pointer input device (mouse, tablet).
3023 # Since: 2.0
3025 { 'enum'  : 'InputAxis',
3026   'data'  : [ 'X', 'Y' ] }
3029 # @InputKeyEvent
3031 # Keyboard input event.
3033 # @key:    Which key this event is for.
3034 # @down:   True for key-down and false for key-up events.
3036 # Since: 2.0
3038 { 'type'  : 'InputKeyEvent',
3039   'data'  : { 'key'     : 'KeyValue',
3040               'down'    : 'bool' } }
3043 # @InputBtnEvent
3045 # Pointer button input event.
3047 # @button: Which button this event is for.
3048 # @down:   True for key-down and false for key-up events.
3050 # Since: 2.0
3052 { 'type'  : 'InputBtnEvent',
3053   'data'  : { 'button'  : 'InputButton',
3054               'down'    : 'bool' } }
3057 # @InputMoveEvent
3059 # Pointer motion input event.
3061 # @axis:   Which axis is referenced by @value.
3062 # @value:  Pointer position.  For absolute coordinates the
3063 #          valid range is 0 -> 0x7ffff
3065 # Since: 2.0
3067 { 'type'  : 'InputMoveEvent',
3068   'data'  : { 'axis'    : 'InputAxis',
3069               'value'   : 'int' } }
3072 # @InputEvent
3074 # Input event union.
3076 # Since: 2.0
3078 { 'union' : 'InputEvent',
3079   'data'  : { 'key'     : 'InputKeyEvent',
3080               'btn'     : 'InputBtnEvent',
3081               'rel'     : 'InputMoveEvent',
3082               'abs'     : 'InputMoveEvent' } }