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