]> git.proxmox.com Git - mirror_qemu.git/blame - qapi-schema.json
qapi: fix schema symbol sections
[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
a090187d
DB
8# QAPI crypto definitions
9{ 'include': 'qapi/crypto.json' }
10
5db15096
BC
11# QAPI block definitions
12{ 'include': 'qapi/block.json' }
13
82d72d9d
WX
14# QAPI event definitions
15{ 'include': 'qapi/event.json' }
16
1dde0f48
LV
17# Tracing commands
18{ 'include': 'qapi/trace.json' }
19
39a18158
MA
20# QAPI introspection
21{ 'include': 'qapi/introspect.json' }
22
119ebac1
MAL
23##
24# @qmp_capabilities:
25#
26# Enable QMP capabilities.
27#
28# Arguments: None.
29#
30# Example:
31#
32# -> { "execute": "qmp_capabilities" }
33# <- { "return": {} }
34#
35# Notes: This command is valid exactly when first connecting: it must be
36# issued before any other command will be accepted, and will fail once the
37# monitor is accepting other commands. (see qemu docs/qmp-spec.txt)
38#
39# Since: 0.13
40#
41##
42{ 'command': 'qmp_capabilities' }
43
104059da 44##
801db5ec 45# @LostTickPolicy:
104059da
PB
46#
47# Policy for handling lost ticks in timer devices.
48#
49# @discard: throw away the missed tick(s) and continue with future injection
50# normally. Guest time may be delayed, unless the OS has explicit
51# handling of lost ticks
52#
53# @delay: continue to deliver ticks at the normal rate. Guest time will be
54# delayed due to the late tick
55#
56# @merge: merge the missed tick(s) into one tick and inject. Guest time
57# may be delayed, depending on how the OS reacts to the merging
58# of ticks
59#
60# @slew: deliver ticks at a higher rate to catch up with the missed tick. The
61# guest time should not be delayed once catchup is complete.
62#
63# Since: 2.0
64##
65{ 'enum': 'LostTickPolicy',
66 'data': ['discard', 'delay', 'merge', 'slew' ] }
67
49687ace 68##
b224e5e2
LC
69# @add_client
70#
71# Allow client connections for VNC, Spice and socket based
72# character devices to be passed in to QEMU via SCM_RIGHTS.
73#
74# @protocol: protocol name. Valid names are "vnc", "spice" or the
75# name of a character device (eg. from -chardev id=XXXX)
76#
77# @fdname: file descriptor name previously passed via 'getfd' command
78#
79# @skipauth: #optional whether to skip authentication. Only applies
80# to "vnc" and "spice" protocols
81#
82# @tls: #optional whether to perform TLS. Only applies to the "spice"
83# protocol
84#
85# Returns: nothing on success.
86#
87# Since: 0.14.0
88##
89{ 'command': 'add_client',
90 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
91 '*tls': 'bool' } }
92
48a32bed
AL
93##
94# @NameInfo:
95#
96# Guest name information.
97#
98# @name: #optional The name of the guest
99#
100# Since 0.14.0
101##
895a2a80 102{ 'struct': 'NameInfo', 'data': {'*name': 'str'} }
48a32bed
AL
103
104##
105# @query-name:
106#
107# Return the name information of a guest.
108#
109# Returns: @NameInfo of the guest
110#
111# Since 0.14.0
112##
113{ 'command': 'query-name', 'returns': 'NameInfo' }
b9c15f16 114
292a2602
LC
115##
116# @KvmInfo:
117#
118# Information about support for KVM acceleration
119#
120# @enabled: true if KVM acceleration is active
121#
122# @present: true if KVM acceleration is built into this executable
123#
124# Since: 0.14.0
125##
895a2a80 126{ 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
292a2602
LC
127
128##
129# @query-kvm:
130#
131# Returns information about KVM acceleration
132#
133# Returns: @KvmInfo
134#
135# Since: 0.14.0
136##
137{ 'command': 'query-kvm', 'returns': 'KvmInfo' }
138
1fa9a5e4
LC
139##
140# @RunState
141#
6932a69b 142# An enumeration of VM run states.
1fa9a5e4
LC
143#
144# @debug: QEMU is running on a debugger
145#
0a24c7b1
LC
146# @finish-migrate: guest is paused to finish the migration process
147#
1e998146
PB
148# @inmigrate: guest is paused waiting for an incoming migration. Note
149# that this state does not tell whether the machine will start at the
150# end of the migration. This depends on the command-line -S option and
151# any invocation of 'stop' or 'cont' that has happened since QEMU was
152# started.
1fa9a5e4
LC
153#
154# @internal-error: An internal error that prevents further guest execution
155# has occurred
156#
157# @io-error: the last IOP has failed and the device is configured to pause
158# on I/O errors
159#
160# @paused: guest has been paused via the 'stop' command
161#
162# @postmigrate: guest is paused following a successful 'migrate'
163#
164# @prelaunch: QEMU was started with -S and guest has not started
165#
1fa9a5e4
LC
166# @restore-vm: guest is paused to restore VM state
167#
168# @running: guest is actively running
169#
170# @save-vm: guest is paused to save the VM state
171#
172# @shutdown: guest is shut down (and -no-shutdown is in use)
173#
ad02b96a
LC
174# @suspended: guest is suspended (ACPI S3)
175#
1fa9a5e4 176# @watchdog: the watchdog action is configured to pause and has been triggered
ede085b3
HT
177#
178# @guest-panicked: guest has been panicked as a result of guest OS panic
21142ba7 179#
252093a7
HZ
180# @colo: guest is paused to save/restore VM state under colo checkpoint,
181# VM can not get into this state unless colo capability is enabled
182# for migration. (since 2.8)
1fa9a5e4
LC
183##
184{ 'enum': 'RunState',
185 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
186 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
ede085b3 187 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
21142ba7 188 'guest-panicked', 'colo' ] }
1fa9a5e4
LC
189
190##
191# @StatusInfo:
192#
193# Information about VCPU run state
194#
195# @running: true if all VCPUs are runnable, false if not runnable
196#
197# @singlestep: true if VCPUs are in single-step mode
198#
199# @status: the virtual machine @RunState
200#
201# Since: 0.14.0
202#
203# Notes: @singlestep is enabled through the GDB stub
204##
895a2a80 205{ 'struct': 'StatusInfo',
1fa9a5e4
LC
206 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
207
208##
209# @query-status:
210#
211# Query the run status of all VCPUs
212#
213# Returns: @StatusInfo reflecting all VCPUs
214#
215# Since: 0.14.0
216##
217{ 'command': 'query-status', 'returns': 'StatusInfo' }
218
efab767e
LC
219##
220# @UuidInfo:
221#
222# Guest UUID information.
223#
224# @UUID: the UUID of the guest
225#
226# Since: 0.14.0
227#
228# Notes: If no UUID was specified for the guest, a null UUID is returned.
229##
895a2a80 230{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
efab767e
LC
231
232##
233# @query-uuid:
234#
235# Query the guest UUID information.
236#
237# Returns: The @UuidInfo for the guest
238#
239# Since 0.14.0
240##
241{ 'command': 'query-uuid', 'returns': 'UuidInfo' }
242
c5a415a0
LC
243##
244# @ChardevInfo:
245#
246# Information about a character device.
247#
248# @label: the label of the character device
249#
250# @filename: the filename of the character device
251#
32a97ea1
LE
252# @frontend-open: shows whether the frontend device attached to this backend
253# (eg. with the chardev=... option) is in open or closed state
254# (since 2.1)
255#
c5a415a0
LC
256# Notes: @filename is encoded using the QEMU command line character device
257# encoding. See the QEMU man page for details.
258#
259# Since: 0.14.0
260##
895a2a80 261{ 'struct': 'ChardevInfo', 'data': {'label': 'str',
32a97ea1
LE
262 'filename': 'str',
263 'frontend-open': 'bool'} }
c5a415a0
LC
264
265##
266# @query-chardev:
267#
268# Returns information about current character devices.
269#
270# Returns: a list of @ChardevInfo
271#
272# Since: 0.14.0
273##
274{ 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
aa9b79bc 275
77d1c3c6
MK
276##
277# @ChardevBackendInfo:
278#
279# Information about a character device backend
280#
281# @name: The backend name
282#
283# Since: 2.0
284##
895a2a80 285{ 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} }
77d1c3c6
MK
286
287##
288# @query-chardev-backends:
289#
290# Returns information about character device backends.
291#
292# Returns: a list of @ChardevBackendInfo
293#
294# Since: 2.0
295##
296{ 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
297
1f590cf9
LL
298##
299# @DataFormat:
300#
301# An enumeration of data format.
302#
3949e594 303# @utf8: Data is a UTF-8 string (RFC 3629)
1f590cf9 304#
3949e594 305# @base64: Data is Base64 encoded binary (RFC 3548)
1f590cf9
LL
306#
307# Since: 1.4
308##
ad0f171e 309{ 'enum': 'DataFormat',
1f590cf9
LL
310 'data': [ 'utf8', 'base64' ] }
311
312##
3949e594 313# @ringbuf-write:
1f590cf9 314#
3949e594 315# Write to a ring buffer character device.
1f590cf9 316#
3949e594 317# @device: the ring buffer character device name
1f590cf9 318#
3949e594 319# @data: data to write
1f590cf9 320#
3949e594
MA
321# @format: #optional data encoding (default 'utf8').
322# - base64: data must be base64 encoded text. Its binary
323# decoding gets written.
3949e594
MA
324# - utf8: data's UTF-8 encoding is written
325# - data itself is always Unicode regardless of format, like
326# any other string.
1f590cf9
LL
327#
328# Returns: Nothing on success
1f590cf9
LL
329#
330# Since: 1.4
331##
3949e594 332{ 'command': 'ringbuf-write',
82e59a67 333 'data': {'device': 'str', 'data': 'str',
1f590cf9
LL
334 '*format': 'DataFormat'} }
335
49b6d722 336##
3949e594 337# @ringbuf-read:
49b6d722 338#
3949e594 339# Read from a ring buffer character device.
49b6d722 340#
3949e594 341# @device: the ring buffer character device name
49b6d722 342#
3949e594 343# @size: how many bytes to read at most
49b6d722 344#
3949e594
MA
345# @format: #optional data encoding (default 'utf8').
346# - base64: the data read is returned in base64 encoding.
347# - utf8: the data read is interpreted as UTF-8.
348# Bug: can screw up when the buffer contains invalid UTF-8
349# sequences, NUL characters, after the ring buffer lost
350# data, and when reading stops because the size limit is
351# reached.
352# - The return value is always Unicode regardless of format,
353# like any other string.
49b6d722 354#
3ab651fc 355# Returns: data read from the device
49b6d722
LL
356#
357# Since: 1.4
358##
3949e594 359{ 'command': 'ringbuf-read',
49b6d722 360 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
3ab651fc 361 'returns': 'str' }
49b6d722 362
4860853d
DB
363##
364# @EventInfo:
365#
366# Information about a QMP event
367#
368# @name: The event name
369#
370# Since: 1.2.0
371##
895a2a80 372{ 'struct': 'EventInfo', 'data': {'name': 'str'} }
4860853d
DB
373
374##
375# @query-events:
376#
377# Return a list of supported QMP events by this server
378#
379# Returns: A list of @EventInfo for all supported events
380#
381# Since: 1.2.0
382##
383{ 'command': 'query-events', 'returns': ['EventInfo'] }
384
791e7c82
LC
385##
386# @MigrationStats
387#
388# Detailed migration status.
389#
390# @transferred: amount of bytes already transferred to the target VM
391#
392# @remaining: amount of bytes remaining to be transferred to the target VM
393#
394# @total: total amount of bytes involved in the migration process
395#
f1c72795
PL
396# @duplicate: number of duplicate (zero) pages (since 1.2)
397#
398# @skipped: number of skipped zero pages (since 1.5)
004d4c10
OW
399#
400# @normal : number of normal pages (since 1.2)
401#
8d017193
JQ
402# @normal-bytes: number of normal bytes sent (since 1.2)
403#
404# @dirty-pages-rate: number of pages dirtied by second by the
405# guest (since 1.3)
004d4c10 406#
7e114f8c
MH
407# @mbps: throughput in megabits/sec. (since 1.6)
408#
58570ed8
C
409# @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
410#
d3bf5418
DDAG
411# @postcopy-requests: The number of page requests received from the destination
412# (since 2.7)
413#
004d4c10 414# Since: 0.14.0
791e7c82 415##
895a2a80 416{ 'struct': 'MigrationStats',
d5f8a570 417 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
f1c72795 418 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
7e114f8c 419 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
d3bf5418
DDAG
420 'mbps' : 'number', 'dirty-sync-count' : 'int',
421 'postcopy-requests' : 'int' } }
791e7c82 422
f36d55af
OW
423##
424# @XBZRLECacheStats
425#
426# Detailed XBZRLE migration cache statistics
427#
428# @cache-size: XBZRLE cache size
429#
430# @bytes: amount of bytes already transferred to the target VM
431#
432# @pages: amount of pages transferred to the target VM
433#
434# @cache-miss: number of cache miss
435#
8bc39233
C
436# @cache-miss-rate: rate of cache miss (since 2.1)
437#
f36d55af
OW
438# @overflow: number of overflows
439#
440# Since: 1.2
441##
895a2a80 442{ 'struct': 'XBZRLECacheStats',
f36d55af 443 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
8bc39233
C
444 'cache-miss': 'int', 'cache-miss-rate': 'number',
445 'overflow': 'int' } }
f36d55af 446
49687ace 447##
24b8c39b
HZ
448# @MigrationStatus:
449#
450# An enumeration of migration status.
451#
452# @none: no migration has ever happened.
453#
454# @setup: migration process has been initiated.
455#
456# @cancelling: in the process of cancelling migration.
457#
458# @cancelled: cancelling migration is finished.
459#
460# @active: in the process of doing migration.
461#
9ec055ae
DDAG
462# @postcopy-active: like active, but now in postcopy mode. (since 2.5)
463#
24b8c39b
HZ
464# @completed: migration is finished.
465#
466# @failed: some error occurred during migration process.
467#
252093a7
HZ
468# @colo: VM is in the process of fault tolerance, VM can not get into this
469# state unless colo capability is enabled for migration. (since 2.8)
0b827d5e 470#
24b8c39b
HZ
471# Since: 2.3
472#
473##
474{ 'enum': 'MigrationStatus',
475 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
0b827d5e 476 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
24b8c39b 477
791e7c82
LC
478##
479# @MigrationInfo
480#
481# Information about current migration process.
482#
24b8c39b
HZ
483# @status: #optional @MigrationStatus describing the current migration status.
484# If this field is not returned, no migration process
791e7c82
LC
485# has been initiated
486#
d5f8a570
JQ
487# @ram: #optional @MigrationStats containing detailed migration
488# status, only returned if status is 'active' or
24b8c39b 489# 'completed'(since 1.2)
791e7c82
LC
490#
491# @disk: #optional @MigrationStats containing detailed disk migration
492# status, only returned if status is 'active' and it is a block
493# migration
494#
f36d55af
OW
495# @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
496# migration statistics, only returned if XBZRLE feature is on and
497# status is 'active' or 'completed' (since 1.2)
498#
7aa939af
JQ
499# @total-time: #optional total amount of milliseconds since migration started.
500# If migration has ended, it returns the total migration
501# time. (since 1.2)
502#
9c5a9fcf
JQ
503# @downtime: #optional only present when migration finishes correctly
504# total downtime in milliseconds for the guest.
505# (since 1.3)
506#
2c52ddf1
JQ
507# @expected-downtime: #optional only present while migration is active
508# expected downtime in milliseconds for the guest in last walk
509# of the dirty bitmap. (since 1.3)
510#
ed4fbd10
MH
511# @setup-time: #optional amount of setup time in milliseconds _before_ the
512# iterations begin but _after_ the QMP command is issued. This is designed
513# to provide an accounting of any activities (such as RDMA pinning) which
514# may be expensive, but do not actually occur during the iterative
515# migration rounds themselves. (since 1.6)
516#
d85a31d1
JH
517# @cpu-throttle-percentage: #optional percentage of time guest cpus are being
518# throttled during auto-converge. This is only present when auto-converge
519# has started throttling guest cpus. (Since 2.7)
4782893e 520#
d59ce6f3
DB
521# @error-desc: #optional the human readable error description string, when
522# @status is 'failed'. Clients should not attempt to parse the
bdbba12b 523# error strings. (Since 2.7)
d59ce6f3 524#
791e7c82
LC
525# Since: 0.14.0
526##
895a2a80 527{ 'struct': 'MigrationInfo',
24b8c39b 528 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
f36d55af 529 '*disk': 'MigrationStats',
7aa939af 530 '*xbzrle-cache': 'XBZRLECacheStats',
9c5a9fcf 531 '*total-time': 'int',
2c52ddf1 532 '*expected-downtime': 'int',
ed4fbd10 533 '*downtime': 'int',
4782893e 534 '*setup-time': 'int',
d59ce6f3
DB
535 '*cpu-throttle-percentage': 'int',
536 '*error-desc': 'str'} }
791e7c82
LC
537
538##
539# @query-migrate
540#
541# Returns information about current migration process.
542#
543# Returns: @MigrationInfo
544#
545# Since: 0.14.0
546##
547{ 'command': 'query-migrate', 'returns': 'MigrationInfo' }
548
bbf6da32
OW
549##
550# @MigrationCapability
551#
552# Migration capabilities enumeration
553#
554# @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
555# This feature allows us to minimize migration traffic for certain work
556# loads, by sending compressed difference of the pages
557#
41310c68 558# @rdma-pin-all: Controls whether or not the entire VM memory footprint is
60d9222c 559# mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
41310c68 560# Disabled by default. (since 2.0)
60d9222c 561#
323004a3
PL
562# @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
563# essentially saves 1MB of zeroes per block on the wire. Enabling requires
564# source and target VM to support this feature. To enable it is sufficient
565# to enable the capability on the source VM. The feature is disabled by
566# default. (since 1.6)
567#
dde4e694
LL
568# @compress: Use multiple compression threads to accelerate live migration.
569# This feature can help to reduce the migration traffic, by sending
570# compressed pages. Please note that if compress and xbzrle are both
571# on, compress only takes effect in the ram bulk stage, after that,
572# it will be disabled and only xbzrle takes effect, this can help to
573# minimize migration traffic. The feature is disabled by default.
574# (since 2.4 )
575#
b05dc723
JQ
576# @events: generate events for each migration state change
577# (since 2.4 )
578#
9781c371
JQ
579# @auto-converge: If enabled, QEMU will automatically throttle down the guest
580# to speed up convergence of RAM migration. (since 1.6)
581#
32c3db5b 582# @postcopy-ram: Start executing on the migration target before all of RAM has
53dd370c 583# been migrated, pulling the remaining pages along as needed. NOTE: If
32c3db5b 584# the migration fails during postcopy the VM will fail. (since 2.6)
53dd370c 585#
35a6ed4f
HZ
586# @x-colo: If enabled, migration will never end, and the state of the VM on the
587# primary side will be migrated continuously to the VM on secondary
588# side, this process is called COarse-Grain LOck Stepping (COLO) for
589# Non-stop Service. (since 2.8)
590#
bbf6da32
OW
591# Since: 1.2
592##
593{ 'enum': 'MigrationCapability',
dde4e694 594 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
35a6ed4f 595 'compress', 'events', 'postcopy-ram', 'x-colo'] }
bbf6da32
OW
596
597##
598# @MigrationCapabilityStatus
599#
600# Migration capability information
601#
602# @capability: capability enum
603#
604# @state: capability state bool
605#
606# Since: 1.2
607##
895a2a80 608{ 'struct': 'MigrationCapabilityStatus',
bbf6da32
OW
609 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
610
611##
00458433
OW
612# @migrate-set-capabilities
613#
614# Enable/Disable the following migration capabilities (like xbzrle)
615#
616# @capabilities: json array of capability modifications to make
617#
618# Since: 1.2
619##
620{ 'command': 'migrate-set-capabilities',
621 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
622
623##
bbf6da32
OW
624# @query-migrate-capabilities
625#
626# Returns information about the current migration capabilities status
627#
628# Returns: @MigrationCapabilitiesStatus
629#
630# Since: 1.2
631##
632{ 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
633
49687ace 634##
43c60a81
LL
635# @MigrationParameter
636#
637# Migration parameters enumeration
638#
639# @compress-level: Set the compression level to be used in live migration,
640# the compression level is an integer between 0 and 9, where 0 means
641# no compression, 1 means the best compression speed, and 9 means best
642# compression ratio which will consume more CPU.
643#
644# @compress-threads: Set compression thread count to be used in live migration,
645# the compression thread count is an integer between 1 and 255.
646#
647# @decompress-threads: Set decompression thread count to be used in live
648# migration, the decompression thread count is an integer between 1
649# and 255. Usually, decompression is at least 4 times as fast as
650# compression, so set the decompress-threads to the number about 1/4
651# of compress-threads is adequate.
652#
d85a31d1
JH
653# @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
654# when migration auto-converge is activated. The
655# default value is 20. (Since 2.7)
1626fee3 656#
d85a31d1
JH
657# @cpu-throttle-increment: throttle percentage increase each time
658# auto-converge detects that migration is not making
659# progress. The default value is 10. (Since 2.7)
69ef1f36
DB
660#
661# @tls-creds: ID of the 'tls-creds' object that provides credentials for
662# establishing a TLS connection over the migration data channel.
663# On the outgoing side of the migration, the credentials must
664# be for a 'client' endpoint, while for the incoming side the
665# credentials must be for a 'server' endpoint. Setting this
666# will enable TLS for all migrations. The default is unset,
667# resulting in unsecured migration at the QEMU level. (Since 2.7)
668#
669# @tls-hostname: hostname of the target host for the migration. This is
670# required when using x509 based TLS credentials and the
671# migration URI does not already include a hostname. For
672# example if using fd: or exec: based migration, the
673# hostname must be provided so that the server's x509
bdbba12b 674# certificate identity can be validated. (Since 2.7)
69ef1f36 675#
2ff30257
AA
676# @max-bandwidth: to set maximum speed for migration. maximum speed in
677# bytes per second. (Since 2.8)
678#
679# @downtime-limit: set maximum tolerated downtime for migration. maximum
680# downtime in milliseconds (Since 2.8)
681#
68b53591
HZ
682# @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
683# periodic mode. (Since 2.8)
684#
43c60a81
LL
685# Since: 2.4
686##
687{ 'enum': 'MigrationParameter',
1626fee3 688 'data': ['compress-level', 'compress-threads', 'decompress-threads',
69ef1f36 689 'cpu-throttle-initial', 'cpu-throttle-increment',
2ff30257 690 'tls-creds', 'tls-hostname', 'max-bandwidth',
68b53591 691 'downtime-limit', 'x-checkpoint-delay' ] }
43c60a81 692
49687ace 693##
85de8323
LL
694# @migrate-set-parameters
695#
de63ab61 696# Set various migration parameters. See MigrationParameters for details.
69ef1f36 697#
68b53591
HZ
698# @x-checkpoint-delay: the delay time between two checkpoints. (Since 2.8)
699#
85de8323
LL
700# Since: 2.4
701##
7f375e04 702{ 'command': 'migrate-set-parameters', 'boxed': true,
de63ab61 703 'data': 'MigrationParameters' }
85de8323 704
49687ace 705##
85de8323
LL
706# @MigrationParameters
707#
de63ab61
EB
708# Optional members can be omitted on input ('migrate-set-parameters')
709# but most members will always be present on output
710# ('query-migrate-parameters'), with the exception of tls-creds and
711# tls-hostname.
85de8323 712#
de63ab61 713# @compress-level: #optional compression level
85de8323 714#
de63ab61 715# @compress-threads: #optional compression thread count
85de8323 716#
de63ab61 717# @decompress-threads: #optional decompression thread count
1626fee3 718#
de63ab61
EB
719# @cpu-throttle-initial: #optional Initial percentage of time guest cpus are
720# throttledwhen migration auto-converge is activated.
721# The default value is 20. (Since 2.7)
722#
723# @cpu-throttle-increment: #optional throttle percentage increase each time
d85a31d1
JH
724# auto-converge detects that migration is not making
725# progress. The default value is 10. (Since 2.7)
1626fee3 726#
de63ab61
EB
727# @tls-creds: #optional ID of the 'tls-creds' object that provides credentials
728# for establishing a TLS connection over the migration data
729# channel. On the outgoing side of the migration, the credentials
730# must be for a 'client' endpoint, while for the incoming side the
69ef1f36
DB
731# credentials must be for a 'server' endpoint. Setting this
732# will enable TLS for all migrations. The default is unset,
bdbba12b 733# resulting in unsecured migration at the QEMU level. (Since 2.7)
69ef1f36 734#
de63ab61
EB
735# @tls-hostname: #optional hostname of the target host for the migration. This
736# is required when using x509 based TLS credentials and the
69ef1f36
DB
737# migration URI does not already include a hostname. For
738# example if using fd: or exec: based migration, the
739# hostname must be provided so that the server's x509
bdbba12b 740# certificate identity can be validated. (Since 2.7)
69ef1f36 741#
2ff30257
AA
742# @max-bandwidth: to set maximum speed for migration. maximum speed in
743# bytes per second. (Since 2.8)
744#
745# @downtime-limit: set maximum tolerated downtime for migration. maximum
746# downtime in milliseconds (Since 2.8)
747#
68b53591
HZ
748# @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
749#
85de8323
LL
750# Since: 2.4
751##
752{ 'struct': 'MigrationParameters',
de63ab61
EB
753 'data': { '*compress-level': 'int',
754 '*compress-threads': 'int',
755 '*decompress-threads': 'int',
756 '*cpu-throttle-initial': 'int',
757 '*cpu-throttle-increment': 'int',
758 '*tls-creds': 'str',
2ff30257
AA
759 '*tls-hostname': 'str',
760 '*max-bandwidth': 'int',
68b53591
HZ
761 '*downtime-limit': 'int',
762 '*x-checkpoint-delay': 'int'} }
6235b9cd 763
85de8323
LL
764##
765# @query-migrate-parameters
766#
767# Returns information about the current migration parameters
768#
769# Returns: @MigrationParameters
770#
771# Since: 2.4
772##
773{ 'command': 'query-migrate-parameters',
774 'returns': 'MigrationParameters' }
775
b8a185bc
MA
776##
777# @client_migrate_info
778#
779# Set migration information for remote display. This makes the server
780# ask the client to automatically reconnect using the new parameters
781# once migration finished successfully. Only implemented for SPICE.
782#
783# @protocol: must be "spice"
784# @hostname: migration target hostname
785# @port: #optional spice tcp port for plaintext channels
786# @tls-port: #optional spice tcp port for tls-secured channels
787# @cert-subject: #optional server certificate subject
788#
789# Since: 0.14.0
790##
791{ 'command': 'client_migrate_info',
792 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
793 '*tls-port': 'int', '*cert-subject': 'str' } }
794
4886a1bc
DDAG
795##
796# @migrate-start-postcopy
797#
a54d340b 798# Followup to a migration command to switch the migration to postcopy mode.
32c3db5b 799# The postcopy-ram capability must be set before the original migration
a54d340b 800# command.
4886a1bc
DDAG
801#
802# Since: 2.5
49687ace 803##
4886a1bc
DDAG
804{ 'command': 'migrate-start-postcopy' }
805
e235cec3 806##
4f97558e
HZ
807# @COLOMessage
808#
809# The message transmission between Primary side and Secondary side.
810#
811# @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
812#
813# @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
814#
815# @checkpoint-reply: SVM gets PVM's checkpoint request
816#
817# @vmstate-send: VM's state will be sent by PVM.
818#
819# @vmstate-size: The total size of VMstate.
820#
821# @vmstate-received: VM's state has been received by SVM.
822#
823# @vmstate-loaded: VM's state has been loaded by SVM.
824#
825# Since: 2.8
826##
827{ 'enum': 'COLOMessage',
828 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
829 'vmstate-send', 'vmstate-size', 'vmstate-received',
830 'vmstate-loaded' ] }
831
d89e666e
HZ
832##
833# @COLOMode
834#
835# The colo mode
836#
837# @unknown: unknown mode
838#
839# @primary: master side
840#
841# @secondary: slave side
842#
843# Since: 2.8
844##
845{ 'enum': 'COLOMode',
846 'data': [ 'unknown', 'primary', 'secondary'] }
847
aef06085
HZ
848##
849# @FailoverStatus
850#
851# An enumeration of COLO failover status
852#
853# @none: no failover has ever happened
854#
855# @require: got failover requirement but not handled
856#
857# @active: in the process of doing failover
858#
859# @completed: finish the process of failover
860#
861# Since: 2.8
862##
863{ 'enum': 'FailoverStatus',
864 'data': [ 'none', 'require', 'active', 'completed'] }
865
d89e666e
HZ
866##
867# @x-colo-lost-heartbeat
868#
869# Tell qemu that heartbeat is lost, request it to do takeover procedures.
870# If this command is sent to the PVM, the Primary side will exit COLO mode.
871# If sent to the Secondary, the Secondary side will run failover work,
872# then takes over server operation to become the service VM.
873#
874# Since: 2.8
875##
876{ 'command': 'x-colo-lost-heartbeat' }
877
878##
e235cec3
LC
879# @MouseInfo:
880#
881# Information about a mouse device.
882#
883# @name: the name of the mouse device
884#
885# @index: the index of the mouse device
886#
887# @current: true if this device is currently receiving mouse events
888#
889# @absolute: true if this device supports absolute coordinates as input
890#
891# Since: 0.14.0
892##
895a2a80 893{ 'struct': 'MouseInfo',
e235cec3
LC
894 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
895 'absolute': 'bool'} }
896
897##
898# @query-mice:
899#
900# Returns information about each active mouse device
901#
902# Returns: a list of @MouseInfo for each device
903#
904# Since: 0.14.0
905##
906{ 'command': 'query-mice', 'returns': ['MouseInfo'] }
907
de0b36b6 908##
86f4b687 909# @CpuInfoArch:
de0b36b6 910#
86f4b687
EB
911# An enumeration of cpu types that enable additional information during
912# @query-cpus.
913#
914# Since: 2.6
915##
916{ 'enum': 'CpuInfoArch',
917 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
918
919##
3666a97f 920# @CpuInfo:
86f4b687 921#
3666a97f 922# Information about a virtual CPU
de0b36b6
LC
923#
924# @CPU: the index of the virtual CPU
925#
86f4b687 926# @current: this only exists for backwards compatibility and should be ignored
b80e560b 927#
de0b36b6
LC
928# @halted: true if the virtual CPU is in the halt state. Halt usually refers
929# to a processor specific low power mode.
930#
58f88d4b
EH
931# @qom_path: path to the CPU object in the QOM tree (since 2.4)
932#
de0b36b6
LC
933# @thread_id: ID of the underlying host thread
934#
86f4b687
EB
935# @arch: architecture of the cpu, which determines which additional fields
936# will be listed (since 2.6)
937#
de0b36b6
LC
938# Since: 0.14.0
939#
940# Notes: @halted is a transient state that changes frequently. By the time the
941# data is sent to the client, the guest may no longer be halted.
942##
3666a97f
EB
943{ 'union': 'CpuInfo',
944 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
945 'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' },
946 'discriminator': 'arch',
86f4b687
EB
947 'data': { 'x86': 'CpuInfoX86',
948 'sparc': 'CpuInfoSPARC',
949 'ppc': 'CpuInfoPPC',
950 'mips': 'CpuInfoMIPS',
951 'tricore': 'CpuInfoTricore',
952 'other': 'CpuInfoOther' } }
953
954##
955# @CpuInfoX86:
956#
957# Additional information about a virtual i386 or x86_64 CPU
958#
959# @pc: the 64-bit instruction pointer
960#
961# Since 2.6
962##
963{ 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
964
965##
966# @CpuInfoSPARC:
967#
968# Additional information about a virtual SPARC CPU
969#
970# @pc: the PC component of the instruction pointer
971#
972# @npc: the NPC component of the instruction pointer
973#
974# Since 2.6
975##
976{ 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
977
978##
979# @CpuInfoPPC:
980#
981# Additional information about a virtual PPC CPU
982#
983# @nip: the instruction pointer
984#
985# Since 2.6
986##
987{ 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
988
989##
990# @CpuInfoMIPS:
991#
992# Additional information about a virtual MIPS CPU
993#
994# @PC: the instruction pointer
995#
996# Since 2.6
997##
998{ 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
999
1000##
1001# @CpuInfoTricore:
1002#
1003# Additional information about a virtual Tricore CPU
1004#
1005# @PC: the instruction pointer
1006#
1007# Since 2.6
1008##
1009{ 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
1010
1011##
1012# @CpuInfoOther:
1013#
1014# No additional information is available about the virtual CPU
1015#
1016# Since 2.6
1017#
1018##
1019{ 'struct': 'CpuInfoOther', 'data': { } }
de0b36b6
LC
1020
1021##
1022# @query-cpus:
1023#
1024# Returns a list of information about each virtual CPU.
1025#
1026# Returns: a list of @CpuInfo for each virtual CPU
1027#
1028# Since: 0.14.0
1029##
1030{ 'command': 'query-cpus', 'returns': ['CpuInfo'] }
1031
dc3dd0d2
SH
1032##
1033# @IOThreadInfo:
1034#
1035# Information about an iothread
1036#
1037# @id: the identifier of the iothread
1038#
1039# @thread-id: ID of the underlying host thread
1040#
1041# Since: 2.0
1042##
895a2a80 1043{ 'struct': 'IOThreadInfo',
dc3dd0d2
SH
1044 'data': {'id': 'str', 'thread-id': 'int'} }
1045
1046##
1047# @query-iothreads:
1048#
1049# Returns a list of information about each iothread.
1050#
1051# Note this list excludes the QEMU main loop thread, which is not declared
1052# using the -object iothread command-line option. It is always the main thread
1053# of the process.
1054#
1055# Returns: a list of @IOThreadInfo for each iothread
1056#
1057# Since: 2.0
1058##
1059{ 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
1060
2b54aa87 1061##
a589569f 1062# @NetworkAddressFamily
2b54aa87 1063#
a589569f
WX
1064# The network address family
1065#
1066# @ipv4: IPV4 family
1067#
1068# @ipv6: IPV6 family
1069#
1070# @unix: unix socket
1071#
6a02c806
SH
1072# @vsock: vsock family (since 2.8)
1073#
a589569f
WX
1074# @unknown: otherwise
1075#
1076# Since: 2.1
1077##
1078{ 'enum': 'NetworkAddressFamily',
6a02c806 1079 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
a589569f
WX
1080
1081##
1082# @VncBasicInfo
2b54aa87 1083#
a589569f 1084# The basic information for vnc network connection
2b54aa87 1085#
a589569f 1086# @host: IP address
2b54aa87 1087#
2f44a08b
WX
1088# @service: The service name of the vnc port. This may depend on the host
1089# system's service database so symbolic names should not be relied
1090# on.
a589569f
WX
1091#
1092# @family: address family
1093#
4478aa76
GH
1094# @websocket: true in case the socket is a websocket (since 2.3).
1095#
a589569f
WX
1096# Since: 2.1
1097##
895a2a80 1098{ 'struct': 'VncBasicInfo',
a589569f
WX
1099 'data': { 'host': 'str',
1100 'service': 'str',
4478aa76
GH
1101 'family': 'NetworkAddressFamily',
1102 'websocket': 'bool' } }
a589569f
WX
1103
1104##
1105# @VncServerInfo
2b54aa87 1106#
a589569f 1107# The network connection information for server
2b54aa87 1108#
a589569f 1109# @auth: #optional, authentication method
2b54aa87 1110#
a589569f
WX
1111# Since: 2.1
1112##
895a2a80 1113{ 'struct': 'VncServerInfo',
a589569f
WX
1114 'base': 'VncBasicInfo',
1115 'data': { '*auth': 'str' } }
1116
1117##
1118# @VncClientInfo:
1119#
1120# Information about a connected VNC client.
2b54aa87
LC
1121#
1122# @x509_dname: #optional If x509 authentication is in use, the Distinguished
1123# Name of the client.
1124#
1125# @sasl_username: #optional If SASL authentication is in use, the SASL username
1126# used for authentication.
1127#
1128# Since: 0.14.0
1129##
895a2a80 1130{ 'struct': 'VncClientInfo',
a589569f 1131 'base': 'VncBasicInfo',
2f44a08b 1132 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
2b54aa87
LC
1133
1134##
1135# @VncInfo:
1136#
1137# Information about the VNC session.
1138#
1139# @enabled: true if the VNC server is enabled, false otherwise
1140#
1141# @host: #optional The hostname the VNC server is bound to. This depends on
1142# the name resolution on the host and may be an IP address.
1143#
1144# @family: #optional 'ipv6' if the host is listening for IPv6 connections
1145# 'ipv4' if the host is listening for IPv4 connections
1146# 'unix' if the host is listening on a unix domain socket
1147# 'unknown' otherwise
1148#
1149# @service: #optional The service name of the server's port. This may depends
1150# on the host system's service database so symbolic names should not
1151# be relied on.
1152#
1153# @auth: #optional the current authentication type used by the server
1154# 'none' if no authentication is being used
1155# 'vnc' if VNC authentication is being used
1156# 'vencrypt+plain' if VEncrypt is used with plain text authentication
1157# 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1158# 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1159# 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1160# 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1161# 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1162# 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1163# 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1164# 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1165#
1166# @clients: a list of @VncClientInfo of all currently connected clients
1167#
1168# Since: 0.14.0
1169##
895a2a80 1170{ 'struct': 'VncInfo',
a589569f
WX
1171 'data': {'enabled': 'bool', '*host': 'str',
1172 '*family': 'NetworkAddressFamily',
2b54aa87
LC
1173 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1174
df887684
GH
1175##
1176# @VncPriAuth:
1177#
1178# vnc primary authentication method.
1179#
1180# Since: 2.3
1181##
1182{ 'enum': 'VncPrimaryAuth',
1183 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1184 'tls', 'vencrypt', 'sasl' ] }
1185
1186##
1187# @VncVencryptSubAuth:
1188#
1189# vnc sub authentication method with vencrypt.
1190#
1191# Since: 2.3
1192##
1193{ 'enum': 'VncVencryptSubAuth',
1194 'data': [ 'plain',
1195 'tls-none', 'x509-none',
1196 'tls-vnc', 'x509-vnc',
1197 'tls-plain', 'x509-plain',
1198 'tls-sasl', 'x509-sasl' ] }
1199
1200##
1201# @VncInfo2:
1202#
1203# Information about a vnc server
1204#
1205# @id: vnc server name.
1206#
1207# @server: A list of @VncBasincInfo describing all listening sockets.
1208# The list can be empty (in case the vnc server is disabled).
1209# It also may have multiple entries: normal + websocket,
1210# possibly also ipv4 + ipv6 in the future.
1211#
1212# @clients: A list of @VncClientInfo of all currently connected clients.
1213# The list can be empty, for obvious reasons.
1214#
1215# @auth: The current authentication type used by the server
1216#
1217# @vencrypt: #optional The vencrypt sub authentication type used by the server,
1218# only specified in case auth == vencrypt.
1219#
1220# @display: #optional The display device the vnc server is linked to.
1221#
1222# Since: 2.3
1223##
895a2a80 1224{ 'struct': 'VncInfo2',
df887684
GH
1225 'data': { 'id' : 'str',
1226 'server' : ['VncBasicInfo'],
1227 'clients' : ['VncClientInfo'],
1228 'auth' : 'VncPrimaryAuth',
1229 '*vencrypt' : 'VncVencryptSubAuth',
1230 '*display' : 'str' } }
1231
2b54aa87
LC
1232##
1233# @query-vnc:
1234#
1235# Returns information about the current VNC server
1236#
1237# Returns: @VncInfo
2b54aa87
LC
1238#
1239# Since: 0.14.0
1240##
1241{ 'command': 'query-vnc', 'returns': 'VncInfo' }
1242
df887684
GH
1243##
1244# @query-vnc-servers:
1245#
1246# Returns a list of vnc servers. The list can be empty.
1247#
1248# Returns: a list of @VncInfo2
1249#
1250# Since: 2.3
1251##
1252{ 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1253
d1f29646 1254##
a589569f 1255# @SpiceBasicInfo
d1f29646 1256#
a589569f
WX
1257# The basic information for SPICE network connection
1258#
1259# @host: IP address
d1f29646 1260#
a589569f 1261# @port: port number
d1f29646 1262#
a589569f 1263# @family: address family
d1f29646 1264#
a589569f
WX
1265# Since: 2.1
1266##
895a2a80 1267{ 'struct': 'SpiceBasicInfo',
a589569f
WX
1268 'data': { 'host': 'str',
1269 'port': 'str',
1270 'family': 'NetworkAddressFamily' } }
1271
1272##
1273# @SpiceServerInfo
d1f29646 1274#
a589569f 1275# Information about a SPICE server
d1f29646 1276#
a589569f 1277# @auth: #optional, authentication method
d1f29646 1278#
a589569f
WX
1279# Since: 2.1
1280##
895a2a80 1281{ 'struct': 'SpiceServerInfo',
a589569f
WX
1282 'base': 'SpiceBasicInfo',
1283 'data': { '*auth': 'str' } }
1284
1285##
1286# @SpiceChannel
1287#
1288# Information about a SPICE client channel.
d1f29646
LC
1289#
1290# @connection-id: SPICE connection id number. All channels with the same id
1291# belong to the same SPICE session.
1292#
7e781c79
CR
1293# @channel-type: SPICE channel type number. "1" is the main control
1294# channel, filter for this one if you want to track spice
1295# sessions only
d1f29646 1296#
419e1bdf
AL
1297# @channel-id: SPICE channel ID number. Usually "0", might be different when
1298# multiple channels of the same type exist, such as multiple
d1f29646
LC
1299# display channels in a multihead setup
1300#
1301# @tls: true if the channel is encrypted, false otherwise.
1302#
1303# Since: 0.14.0
1304##
895a2a80 1305{ 'struct': 'SpiceChannel',
a589569f
WX
1306 'base': 'SpiceBasicInfo',
1307 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
d1f29646
LC
1308 'tls': 'bool'} }
1309
4efee029
AL
1310##
1311# @SpiceQueryMouseMode
1312#
6932a69b 1313# An enumeration of Spice mouse states.
4efee029
AL
1314#
1315# @client: Mouse cursor position is determined by the client.
1316#
1317# @server: Mouse cursor position is determined by the server.
1318#
1319# @unknown: No information is available about mouse mode used by
1320# the spice server.
1321#
1322# Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1323#
1324# Since: 1.1
1325##
1326{ 'enum': 'SpiceQueryMouseMode',
1327 'data': [ 'client', 'server', 'unknown' ] }
1328
d1f29646
LC
1329##
1330# @SpiceInfo
1331#
1332# Information about the SPICE session.
b80e560b 1333#
d1f29646
LC
1334# @enabled: true if the SPICE server is enabled, false otherwise
1335#
61c4efe2
YH
1336# @migrated: true if the last guest migration completed and spice
1337# migration had completed as well. false otherwise.
1338#
d1f29646
LC
1339# @host: #optional The hostname the SPICE server is bound to. This depends on
1340# the name resolution on the host and may be an IP address.
1341#
1342# @port: #optional The SPICE server's port number.
1343#
1344# @compiled-version: #optional SPICE server version.
1345#
1346# @tls-port: #optional The SPICE server's TLS port number.
1347#
1348# @auth: #optional the current authentication type used by the server
419e1bdf
AL
1349# 'none' if no authentication is being used
1350# 'spice' uses SASL or direct TLS authentication, depending on command
1351# line options
d1f29646 1352#
4efee029
AL
1353# @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1354# be determined by the client or the server, or unknown if spice
1355# server doesn't provide this information.
1356#
1357# Since: 1.1
1358#
d1f29646
LC
1359# @channels: a list of @SpiceChannel for each active spice channel
1360#
1361# Since: 0.14.0
1362##
895a2a80 1363{ 'struct': 'SpiceInfo',
61c4efe2 1364 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
d1f29646 1365 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
4efee029 1366 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
d1f29646
LC
1367
1368##
1369# @query-spice
1370#
1371# Returns information about the current SPICE server
1372#
1373# Returns: @SpiceInfo
1374#
1375# Since: 0.14.0
1376##
1377{ 'command': 'query-spice', 'returns': 'SpiceInfo' }
1378
96637bcd
LC
1379##
1380# @BalloonInfo:
1381#
1382# Information about the guest balloon device.
1383#
1384# @actual: the number of bytes the balloon currently contains
1385#
96637bcd
LC
1386# Since: 0.14.0
1387#
96637bcd 1388##
895a2a80 1389{ 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
96637bcd
LC
1390
1391##
1392# @query-balloon:
1393#
1394# Return information about the balloon device.
1395#
1396# Returns: @BalloonInfo on success
1397# If the balloon driver is enabled but not functional because the KVM
1398# kernel module cannot support it, KvmMissingCap
1399# If no balloon device is present, DeviceNotActive
1400#
1401# Since: 0.14.0
1402##
1403{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1404
79627472
LC
1405##
1406# @PciMemoryRange:
1407#
1408# A PCI device memory region
1409#
1410# @base: the starting address (guest physical)
1411#
1412# @limit: the ending address (guest physical)
1413#
1414# Since: 0.14.0
1415##
895a2a80 1416{ 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
79627472
LC
1417
1418##
1419# @PciMemoryRegion
1420#
1421# Information about a PCI device I/O region.
1422#
1423# @bar: the index of the Base Address Register for this region
1424#
1425# @type: 'io' if the region is a PIO region
1426# 'memory' if the region is a MMIO region
1427#
1428# @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1429#
1430# @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1431#
1432# Since: 0.14.0
1433##
895a2a80 1434{ 'struct': 'PciMemoryRegion',
79627472
LC
1435 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1436 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1437
1438##
9fa02cd1 1439# @PciBusInfo:
79627472 1440#
9fa02cd1 1441# Information about a bus of a PCI Bridge device
79627472 1442#
9fa02cd1
EB
1443# @number: primary bus interface number. This should be the number of the
1444# bus the device resides on.
79627472 1445#
9fa02cd1
EB
1446# @secondary: secondary bus interface number. This is the number of the
1447# main bus for the bridge
79627472 1448#
9fa02cd1
EB
1449# @subordinate: This is the highest number bus that resides below the
1450# bridge.
79627472 1451#
9fa02cd1 1452# @io_range: The PIO range for all devices on this bridge
79627472 1453#
9fa02cd1 1454# @memory_range: The MMIO range for all devices on this bridge
79627472 1455#
9fa02cd1
EB
1456# @prefetchable_range: The range of prefetchable MMIO for all devices on
1457# this bridge
1458#
1459# Since: 2.4
1460##
1461{ 'struct': 'PciBusInfo',
1462 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1463 'io_range': 'PciMemoryRange',
1464 'memory_range': 'PciMemoryRange',
1465 'prefetchable_range': 'PciMemoryRange' } }
1466
1467##
1468# @PciBridgeInfo:
1469#
1470# Information about a PCI Bridge device
1471#
1472# @bus: information about the bus the device resides on
79627472
LC
1473#
1474# @devices: a list of @PciDeviceInfo for each device on this bridge
1475#
1476# Since: 0.14.0
1477##
895a2a80 1478{ 'struct': 'PciBridgeInfo',
9fa02cd1
EB
1479 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
1480
1481##
1482# @PciDeviceClass:
1483#
1484# Information about the Class of a PCI device
1485#
1486# @desc: #optional a string description of the device's class
1487#
1488# @class: the class code of the device
1489#
1490# Since: 2.4
1491##
1492{ 'struct': 'PciDeviceClass',
1493 'data': {'*desc': 'str', 'class': 'int'} }
1494
1495##
1496# @PciDeviceId:
1497#
1498# Information about the Id of a PCI device
1499#
1500# @device: the PCI device id
1501#
1502# @vendor: the PCI vendor id
1503#
1504# Since: 2.4
1505##
1506{ 'struct': 'PciDeviceId',
1507 'data': {'device': 'int', 'vendor': 'int'} }
79627472
LC
1508
1509##
1510# @PciDeviceInfo:
1511#
1512# Information about a PCI device
1513#
1514# @bus: the bus number of the device
1515#
1516# @slot: the slot the device is located in
1517#
1518# @function: the function of the slot used by the device
1519#
9fa02cd1 1520# @class_info: the class of the device
79627472 1521#
9fa02cd1 1522# @id: the PCI device id
79627472
LC
1523#
1524# @irq: #optional if an IRQ is assigned to the device, the IRQ number
1525#
1526# @qdev_id: the device name of the PCI device
1527#
1528# @pci_bridge: if the device is a PCI bridge, the bridge information
1529#
1530# @regions: a list of the PCI I/O regions associated with the device
1531#
1532# Notes: the contents of @class_info.desc are not stable and should only be
1533# treated as informational.
1534#
1535# Since: 0.14.0
1536##
895a2a80 1537{ 'struct': 'PciDeviceInfo',
79627472 1538 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
9fa02cd1 1539 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
79627472
LC
1540 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1541 'regions': ['PciMemoryRegion']} }
1542
1543##
1544# @PciInfo:
1545#
1546# Information about a PCI bus
1547#
1548# @bus: the bus index
1549#
1550# @devices: a list of devices on this bus
1551#
1552# Since: 0.14.0
1553##
895a2a80 1554{ 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
79627472
LC
1555
1556##
1557# @query-pci:
1558#
1559# Return information about the PCI bus topology of the guest.
1560#
1561# Returns: a list of @PciInfo for each PCI bus
1562#
1563# Since: 0.14.0
1564##
1565{ 'command': 'query-pci', 'returns': ['PciInfo'] }
1566
7a7f325e
LC
1567##
1568# @quit:
1569#
1570# This command will cause the QEMU process to exit gracefully. While every
1571# attempt is made to send the QMP response before terminating, this is not
1572# guaranteed. When using this interface, a premature EOF would not be
1573# unexpected.
1574#
1575# Since: 0.14.0
1576##
1577{ 'command': 'quit' }
5f158f21
LC
1578
1579##
1580# @stop:
1581#
1582# Stop all guest VCPU execution.
1583#
1584# Since: 0.14.0
1585#
1586# Notes: This function will succeed even if the guest is already in the stopped
1e998146
PB
1587# state. In "inmigrate" state, it will ensure that the guest
1588# remains paused once migration finishes, as if the -S option was
1589# passed on the command line.
5f158f21
LC
1590##
1591{ 'command': 'stop' }
38d22653
LC
1592
1593##
1594# @system_reset:
1595#
1596# Performs a hard reset of a guest.
1597#
1598# Since: 0.14.0
1599##
1600{ 'command': 'system_reset' }
5bc465e4
LC
1601
1602##
1603# @system_powerdown:
1604#
1605# Requests that a guest perform a powerdown operation.
1606#
1607# Since: 0.14.0
1608#
1609# Notes: A guest may or may not respond to this command. This command
1610# returning does not indicate that a guest has accepted the request or
1611# that it has shut down. Many guests will respond to this command by
1612# prompting the user in some way.
1613##
1614{ 'command': 'system_powerdown' }
755f1968
LC
1615
1616##
1617# @cpu:
1618#
1619# This command is a nop that is only provided for the purposes of compatibility.
1620#
1621# Since: 0.14.0
1622#
1623# Notes: Do not use this command.
1624##
1625{ 'command': 'cpu', 'data': {'index': 'int'} }
0cfd6a9a 1626
69ca3ea5
IM
1627##
1628# @cpu-add
1629#
1630# Adds CPU with specified ID
1631#
1632# @id: ID of CPU to be created, valid values [0..max_cpus)
1633#
1634# Returns: Nothing on success
1635#
1636# Since 1.5
1637##
1638{ 'command': 'cpu-add', 'data': {'id': 'int'} }
1639
0cfd6a9a
LC
1640##
1641# @memsave:
1642#
1643# Save a portion of guest memory to a file.
1644#
1645# @val: the virtual address of the guest to start from
1646#
1647# @size: the size of memory region to save
1648#
1649# @filename: the file to save the memory to as binary data
1650#
1651# @cpu-index: #optional the index of the virtual CPU to use for translating the
1652# virtual address (defaults to CPU 0)
1653#
1654# Returns: Nothing on success
0cfd6a9a
LC
1655#
1656# Since: 0.14.0
1657#
1658# Notes: Errors were not reliably returned until 1.1
1659##
1660{ 'command': 'memsave',
1661 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
6d3962bf
LC
1662
1663##
1664# @pmemsave:
1665#
1666# Save a portion of guest physical memory to a file.
1667#
1668# @val: the physical address of the guest to start from
1669#
1670# @size: the size of memory region to save
1671#
1672# @filename: the file to save the memory to as binary data
1673#
1674# Returns: Nothing on success
6d3962bf
LC
1675#
1676# Since: 0.14.0
1677#
1678# Notes: Errors were not reliably returned until 1.1
1679##
1680{ 'command': 'pmemsave',
1681 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
e42e818b
LC
1682
1683##
1684# @cont:
1685#
1686# Resume guest VCPU execution.
1687#
1688# Since: 0.14.0
1689#
1690# Returns: If successful, nothing
e42e818b
LC
1691# If QEMU was started with an encrypted block device and a key has
1692# not yet been set, DeviceEncrypted.
1693#
1e998146
PB
1694# Notes: This command will succeed if the guest is currently running. It
1695# will also succeed if the guest is in the "inmigrate" state; in
1696# this case, the effect of the command is to make sure the guest
1697# starts once migration finishes, removing the effect of the -S
1698# command line option if it was passed.
e42e818b
LC
1699##
1700{ 'command': 'cont' }
1701
9b9df25a
GH
1702##
1703# @system_wakeup:
1704#
1705# Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1706#
1707# Since: 1.1
1708#
1709# Returns: nothing.
1710##
1711{ 'command': 'system_wakeup' }
1712
ab49ab5c
LC
1713##
1714# @inject-nmi:
1715#
9cb805fd 1716# Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
ab49ab5c
LC
1717#
1718# Returns: If successful, nothing
ab49ab5c
LC
1719#
1720# Since: 0.14.0
1721#
9cb805fd 1722# Note: prior to 2.1, this command was only supported for x86 and s390 VMs
ab49ab5c
LC
1723##
1724{ 'command': 'inject-nmi' }
4b37156c
LC
1725
1726##
1727# @set_link:
1728#
1729# Sets the link status of a virtual network adapter.
1730#
1731# @name: the device name of the virtual network adapter
1732#
1733# @up: true to set the link status to be up
1734#
1735# Returns: Nothing on success
1736# If @name is not a valid network device, DeviceNotFound
1737#
1738# Since: 0.14.0
1739#
1740# Notes: Not all network adapters support setting link status. This command
1741# will succeed even if the network adapter does not support link status
1742# notification.
1743##
1744{ 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
a4dea8a9 1745
d72f3264
LC
1746##
1747# @balloon:
1748#
1749# Request the balloon driver to change its balloon size.
1750#
1751# @value: the target size of the balloon in bytes
1752#
1753# Returns: Nothing on success
1754# If the balloon driver is enabled but not functional because the KVM
1755# kernel module cannot support it, KvmMissingCap
1756# If no balloon device is present, DeviceNotActive
1757#
1758# Notes: This command just issues a request to the guest. When it returns,
1759# the balloon size may not have changed. A guest can change the balloon
1760# size independent of this command.
1761#
1762# Since: 0.14.0
1763##
1764{ 'command': 'balloon', 'data': {'value': 'int'} }
5e7caacb 1765
78b18b78
SH
1766##
1767# @Abort
1768#
1769# This action can be used to test transaction failure.
1770#
1771# Since: 1.6
1772###
895a2a80 1773{ 'struct': 'Abort',
78b18b78
SH
1774 'data': { } }
1775
94d16a64
JS
1776##
1777# @ActionCompletionMode
1778#
1779# An enumeration of Transactional completion modes.
1780#
1781# @individual: Do not attempt to cancel any other Actions if any Actions fail
1782# after the Transaction request succeeds. All Actions that
1783# can complete successfully will do so without waiting on others.
1784# This is the default.
1785#
1786# @grouped: If any Action fails after the Transaction succeeds, cancel all
1787# Actions. Actions do not complete until all Actions are ready to
1788# complete. May be rejected by Actions that do not support this
1789# completion mode.
1790#
1791# Since: 2.5
1792##
1793{ 'enum': 'ActionCompletionMode',
1794 'data': [ 'individual', 'grouped' ] }
1795
8802d1fd 1796##
c8a83e85 1797# @TransactionAction
8802d1fd 1798#
52e7c241
PB
1799# A discriminated record of operations that can be performed with
1800# @transaction.
b7b9d39a
FZ
1801#
1802# Since 1.1
1803#
1804# drive-backup since 1.6
1805# abort since 1.6
1806# blockdev-snapshot-internal-sync since 1.7
bd8baecd 1807# blockdev-backup since 2.3
43de7e2d 1808# blockdev-snapshot since 2.5
df9a681d
FZ
1809# block-dirty-bitmap-add since 2.5
1810# block-dirty-bitmap-clear since 2.5
8802d1fd 1811##
c8a83e85 1812{ 'union': 'TransactionAction',
52e7c241 1813 'data': {
43de7e2d 1814 'blockdev-snapshot': 'BlockdevSnapshot',
a911e6ae 1815 'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
78b18b78 1816 'drive-backup': 'DriveBackup',
bd8baecd 1817 'blockdev-backup': 'BlockdevBackup',
bbe86010 1818 'abort': 'Abort',
df9a681d
FZ
1819 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
1820 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
1821 'block-dirty-bitmap-clear': 'BlockDirtyBitmap'
52e7c241 1822 } }
8802d1fd 1823
94d16a64
JS
1824##
1825# @TransactionProperties
1826#
1827# Optional arguments to modify the behavior of a Transaction.
1828#
1829# @completion-mode: #optional Controls how jobs launched asynchronously by
1830# Actions will complete or fail as a group.
1831# See @ActionCompletionMode for details.
1832#
1833# Since: 2.5
1834##
1835{ 'struct': 'TransactionProperties',
1836 'data': {
1837 '*completion-mode': 'ActionCompletionMode'
1838 }
1839}
1840
8802d1fd 1841##
52e7c241 1842# @transaction
8802d1fd 1843#
c8a83e85
KW
1844# Executes a number of transactionable QMP commands atomically. If any
1845# operation fails, then the entire set of actions will be abandoned and the
1846# appropriate error returned.
8802d1fd 1847#
94d16a64
JS
1848# @actions: List of @TransactionAction;
1849# information needed for the respective operations.
1850#
1851# @properties: #optional structure of additional options to control the
1852# execution of the transaction. See @TransactionProperties
1853# for additional detail.
8802d1fd
JC
1854#
1855# Returns: nothing on success
c8a83e85 1856# Errors depend on the operations of the transaction
8802d1fd 1857#
c8a83e85
KW
1858# Note: The transaction aborts on the first failure. Therefore, there will be
1859# information on only one failed operation returned in an error condition, and
52e7c241
PB
1860# subsequent actions will not have been attempted.
1861#
1862# Since 1.1
8802d1fd 1863##
52e7c241 1864{ 'command': 'transaction',
94d16a64
JS
1865 'data': { 'actions': [ 'TransactionAction' ],
1866 '*properties': 'TransactionProperties'
1867 }
1868}
8802d1fd 1869
d51a67b4
LC
1870##
1871# @human-monitor-command:
1872#
1873# Execute a command on the human monitor and return the output.
1874#
1875# @command-line: the command to execute in the human monitor
1876#
1877# @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1878#
1879# Returns: the output of the command as a string
1880#
1ad166b6 1881# Since: 0.14.0
08e4ed6c 1882#
1ad166b6
BC
1883# Notes: This command only exists as a stop-gap. Its use is highly
1884# discouraged. The semantics of this command are not guaranteed.
b952b558 1885#
1ad166b6 1886# Known limitations:
b952b558 1887#
1ad166b6
BC
1888# o This command is stateless, this means that commands that depend
1889# on state information (such as getfd) might not work
d9b902db 1890#
1ad166b6
BC
1891# o Commands that prompt the user for data (eg. 'cont' when the block
1892# device is encrypted) don't currently work
d9b902db 1893##
1ad166b6
BC
1894{ 'command': 'human-monitor-command',
1895 'data': {'command-line': 'str', '*cpu-index': 'int'},
1896 'returns': 'str' }
d9b902db
PB
1897
1898##
6cdedb07
LC
1899# @migrate_cancel
1900#
1901# Cancel the current executing migration process.
1902#
1903# Returns: nothing on success
1904#
1905# Notes: This command succeeds even if there is no migration process running.
1906#
1907# Since: 0.14.0
1908##
1909{ 'command': 'migrate_cancel' }
4f0a993b
LC
1910
1911##
1912# @migrate_set_downtime
1913#
1914# Set maximum tolerated downtime for migration.
1915#
1916# @value: maximum downtime in seconds
1917#
1918# Returns: nothing on success
1919#
2ff30257
AA
1920# Notes: This command is deprecated in favor of 'migrate-set-parameters'
1921#
4f0a993b
LC
1922# Since: 0.14.0
1923##
1924{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
3dc85383
LC
1925
1926##
1927# @migrate_set_speed
1928#
1929# Set maximum speed for migration.
1930#
1931# @value: maximum speed in bytes.
1932#
1933# Returns: nothing on success
1934#
2ff30257 1935# Notes: This command is deprecated in favor of 'migrate-set-parameters'
3dc85383
LC
1936#
1937# Since: 0.14.0
1938##
1939{ 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
b4b12c62 1940
9e1ba4cc
OW
1941##
1942# @migrate-set-cache-size
1943#
1944# Set XBZRLE cache size
1945#
1946# @value: cache size in bytes
1947#
1948# The size will be rounded down to the nearest power of 2.
1949# The cache size can be modified before and during ongoing migration
1950#
1951# Returns: nothing on success
1952#
1953# Since: 1.2
1954##
1955{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1956
1957##
1958# @query-migrate-cache-size
1959#
1960# query XBZRLE cache size
1961#
1962# Returns: XBZRLE cache size in bytes
1963#
1964# Since: 1.2
1965##
1966{ 'command': 'query-migrate-cache-size', 'returns': 'int' }
1967
b4b12c62 1968##
d03ee401 1969# @ObjectPropertyInfo:
b4b12c62
AL
1970#
1971# @name: the name of the property
1972#
1973# @type: the type of the property. This will typically come in one of four
1974# forms:
1975#
1976# 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1977# These types are mapped to the appropriate JSON type.
1978#
33b23b4b 1979# 2) A child type in the form 'child<subtype>' where subtype is a qdev
b4b12c62
AL
1980# device type name. Child properties create the composition tree.
1981#
33b23b4b 1982# 3) A link type in the form 'link<subtype>' where subtype is a qdev
b4b12c62
AL
1983# device type name. Link properties form the device model graph.
1984#
51920820 1985# Since: 1.2
b4b12c62 1986##
895a2a80 1987{ 'struct': 'ObjectPropertyInfo',
b4b12c62
AL
1988 'data': { 'name': 'str', 'type': 'str' } }
1989
1990##
1991# @qom-list:
1992#
57c9fafe 1993# This command will list any properties of a object given a path in the object
b4b12c62
AL
1994# model.
1995#
57c9fafe 1996# @path: the path within the object model. See @qom-get for a description of
b4b12c62
AL
1997# this parameter.
1998#
57c9fafe
AL
1999# Returns: a list of @ObjectPropertyInfo that describe the properties of the
2000# object.
b4b12c62 2001#
51920820 2002# Since: 1.2
b4b12c62
AL
2003##
2004{ 'command': 'qom-list',
2005 'data': { 'path': 'str' },
57c9fafe 2006 'returns': [ 'ObjectPropertyInfo' ] }
eb6e8ea5
AL
2007
2008##
2009# @qom-get:
2010#
57c9fafe 2011# This command will get a property from a object model path and return the
eb6e8ea5
AL
2012# value.
2013#
57c9fafe 2014# @path: The path within the object model. There are two forms of supported
eb6e8ea5
AL
2015# paths--absolute and partial paths.
2016#
57c9fafe 2017# Absolute paths are derived from the root object and can follow child<>
eb6e8ea5
AL
2018# or link<> properties. Since they can follow link<> properties, they
2019# can be arbitrarily long. Absolute paths look like absolute filenames
2020# and are prefixed with a leading slash.
2021#
2022# Partial paths look like relative filenames. They do not begin
2023# with a prefix. The matching rules for partial paths are subtle but
57c9fafe 2024# designed to make specifying objects easy. At each level of the
eb6e8ea5
AL
2025# composition tree, the partial path is matched as an absolute path.
2026# The first match is not returned. At least two matches are searched
2027# for. A successful result is only returned if only one match is
2028# found. If more than one match is found, a flag is return to
2029# indicate that the match was ambiguous.
2030#
2031# @property: The property name to read
2032#
33b23b4b
MAL
2033# Returns: The property value. The type depends on the property
2034# type. child<> and link<> properties are returned as #str
2035# pathnames. All integer property types (u8, u16, etc) are
2036# returned as #int.
eb6e8ea5 2037#
51920820 2038# Since: 1.2
eb6e8ea5
AL
2039##
2040{ 'command': 'qom-get',
2041 'data': { 'path': 'str', 'property': 'str' },
6eb3937e 2042 'returns': 'any' }
eb6e8ea5
AL
2043
2044##
2045# @qom-set:
2046#
57c9fafe 2047# This command will set a property from a object model path.
eb6e8ea5
AL
2048#
2049# @path: see @qom-get for a description of this parameter
2050#
2051# @property: the property name to set
2052#
2053# @value: a value who's type is appropriate for the property type. See @qom-get
2054# for a description of type mapping.
2055#
51920820 2056# Since: 1.2
eb6e8ea5
AL
2057##
2058{ 'command': 'qom-set',
6eb3937e 2059 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
fbf796fd
LC
2060
2061##
2062# @set_password:
2063#
2064# Sets the password of a remote display session.
2065#
2066# @protocol: `vnc' to modify the VNC server password
2067# `spice' to modify the Spice server password
2068#
2069# @password: the new password
2070#
2071# @connected: #optional how to handle existing clients when changing the
b80e560b 2072# password. If nothing is specified, defaults to `keep'
fbf796fd
LC
2073# `fail' to fail the command if clients are connected
2074# `disconnect' to disconnect existing clients
2075# `keep' to maintain existing clients
2076#
2077# Returns: Nothing on success
2078# If Spice is not enabled, DeviceNotFound
fbf796fd
LC
2079#
2080# Since: 0.14.0
2081##
2082{ 'command': 'set_password',
2083 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
9ad5372d
LC
2084
2085##
2086# @expire_password:
2087#
2088# Expire the password of a remote display server.
2089#
2090# @protocol: the name of the remote display protocol `vnc' or `spice'
2091#
2092# @time: when to expire the password.
2093# `now' to expire the password immediately
2094# `never' to cancel password expiration
2095# `+INT' where INT is the number of seconds from now (integer)
2096# `INT' where INT is the absolute time in seconds
2097#
2098# Returns: Nothing on success
2099# If @protocol is `spice' and Spice is not active, DeviceNotFound
9ad5372d
LC
2100#
2101# Since: 0.14.0
2102#
2103# Notes: Time is relative to the server and currently there is no way to
2104# coordinate server time with client time. It is not recommended to
2105# use the absolute time version of the @time parameter unless you're
2106# sure you are on the same machine as the QEMU instance.
2107##
2108{ 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
c245b6a3 2109
270b243f
LC
2110##
2111# @change-vnc-password:
2112#
2113# Change the VNC server password.
2114#
1c854067 2115# @password: the new password to use with VNC authentication
270b243f
LC
2116#
2117# Since: 1.1
2118#
2119# Notes: An empty password in this command will set the password to the empty
2120# string. Existing clients are unaffected by executing this command.
2121##
2122{ 'command': 'change-vnc-password', 'data': {'password': 'str'} }
333a96ec
LC
2123
2124##
2125# @change:
2126#
2127# This command is multiple commands multiplexed together.
2128#
2129# @device: This is normally the name of a block device but it may also be 'vnc'.
2130# when it's 'vnc', then sub command depends on @target
2131#
2132# @target: If @device is a block device, then this is the new filename.
2133# If @device is 'vnc', then if the value 'password' selects the vnc
2134# change password command. Otherwise, this specifies a new server URI
2135# address to listen to for VNC connections.
2136#
2137# @arg: If @device is a block device, then this is an optional format to open
2138# the device with.
2139# If @device is 'vnc' and @target is 'password', this is the new VNC
2140# password to set. If this argument is an empty string, then no future
2141# logins will be allowed.
2142#
2143# Returns: Nothing on success.
2144# If @device is not a valid block device, DeviceNotFound
333a96ec
LC
2145# If the new block device is encrypted, DeviceEncrypted. Note that
2146# if this error is returned, the device has been opened successfully
2147# and an additional call to @block_passwd is required to set the
2148# device's password. The behavior of reads and writes to the block
2149# device between when these calls are executed is undefined.
2150#
24fb4133
HR
2151# Notes: This interface is deprecated, and it is strongly recommended that you
2152# avoid using it. For changing block devices, use
2153# blockdev-change-medium; for changing VNC parameters, use
2154# change-vnc-password.
333a96ec
LC
2155#
2156# Since: 0.14.0
2157##
2158{ 'command': 'change',
2159 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
80047da5 2160
5eeee3fa
AL
2161##
2162# @ObjectTypeInfo:
2163#
2164# This structure describes a search result from @qom-list-types
2165#
2166# @name: the type name found in the search
2167#
2168# Since: 1.1
2169#
2170# Notes: This command is experimental and may change syntax in future releases.
2171##
895a2a80 2172{ 'struct': 'ObjectTypeInfo',
5eeee3fa
AL
2173 'data': { 'name': 'str' } }
2174
2175##
2176# @qom-list-types:
2177#
2178# This command will return a list of types given search parameters
2179#
2180# @implements: if specified, only return types that implement this type name
2181#
2182# @abstract: if true, include abstract types in the results
2183#
2184# Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2185#
2186# Since: 1.1
5eeee3fa
AL
2187##
2188{ 'command': 'qom-list-types',
2189 'data': { '*implements': 'str', '*abstract': 'bool' },
2190 'returns': [ 'ObjectTypeInfo' ] }
e1c37d0e 2191
1daa31b9
AL
2192##
2193# @DevicePropertyInfo:
2194#
2195# Information about device properties.
2196#
2197# @name: the name of the property
2198# @type: the typename of the property
07d09c58
GA
2199# @description: #optional if specified, the description of the property.
2200# (since 2.2)
1daa31b9
AL
2201#
2202# Since: 1.2
2203##
895a2a80 2204{ 'struct': 'DevicePropertyInfo',
07d09c58 2205 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
1daa31b9
AL
2206
2207##
2208# @device-list-properties:
2209#
2210# List properties associated with a device.
2211#
2212# @typename: the type name of a device
2213#
2214# Returns: a list of DevicePropertyInfo describing a devices properties
2215#
2216# Since: 1.2
2217##
2218{ 'command': 'device-list-properties',
2219 'data': { 'typename': 'str'},
2220 'returns': [ 'DevicePropertyInfo' ] }
2221
e1c37d0e
LC
2222##
2223# @migrate
2224#
2225# Migrates the current running guest to another Virtual Machine.
2226#
2227# @uri: the Uniform Resource Identifier of the destination VM
2228#
2229# @blk: #optional do block migration (full disk copy)
2230#
2231# @inc: #optional incremental disk copy migration
2232#
2233# @detach: this argument exists only for compatibility reasons and
2234# is ignored by QEMU
2235#
2236# Returns: nothing on success
2237#
2238# Since: 0.14.0
2239##
2240{ 'command': 'migrate',
2241 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
33cf629a 2242
bf1ae1f4
DDAG
2243##
2244# @migrate-incoming
2245#
2246# Start an incoming migration, the qemu must have been started
2247# with -incoming defer
2248#
2249# @uri: The Uniform Resource Identifier identifying the source or
2250# address to listen on
2251#
2252# Returns: nothing on success
2253#
2254# Since: 2.3
d8760534
DDAG
2255# Note: It's a bad idea to use a string for the uri, but it needs to stay
2256# compatible with -incoming and the format of the uri is already exposed
2257# above libvirt
bf1ae1f4
DDAG
2258##
2259{ 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
2260
49687ace 2261##
a7ae8355
SS
2262# @xen-save-devices-state:
2263#
2264# Save the state of all devices to file. The RAM and the block devices
2265# of the VM are not saved by this command.
2266#
2267# @filename: the file to save the state of the devices to as binary
2268# data. See xen-save-devices-state.txt for a description of the binary
2269# format.
2270#
2271# Returns: Nothing on success
a7ae8355
SS
2272#
2273# Since: 1.1
2274##
2275{ 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
a15fef21 2276
39f42439
AP
2277##
2278# @xen-set-global-dirty-log
2279#
2280# Enable or disable the global dirty log mode.
2281#
2282# @enable: true to enable, false to disable.
2283#
2284# Returns: nothing
2285#
2286# Since: 1.3
2287##
2288{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2289
94cfd07f
MAL
2290##
2291# @device_add:
2292#
2293# @driver: the name of the new device's driver
2294#
2295# @bus: #optional the device's parent bus (device tree path)
2296#
2297# @id: the device's ID, must be unique
2298#
2299# Additional arguments depend on the type.
2300#
2301# Add a device.
2302#
2303# Notes:
2304# 1. For detailed information about this command, please refer to the
2305# 'docs/qdev-device-use.txt' file.
2306#
2307# 2. It's possible to list device properties by running QEMU with the
2308# "-device DEVICE,help" command-line argument, where DEVICE is the
2309# device's name
2310#
2311# Example:
2312#
2313# -> { "execute": "device_add",
2314# "arguments": { "driver": "e1000", "id": "net1",
2315# "bus": "pci.0",
2316# "mac": "52:54:00:12:34:56" } }
2317# <- { "return": {} }
2318#
2319# TODO This command effectively bypasses QAPI completely due to its
2320# "additional arguments" business. It shouldn't have been added to
2321# the schema in this form. It should be qapified properly, or
2322# replaced by a properly qapified command.
2323#
2324# Since: 0.13
2325##
2326{ 'command': 'device_add',
2327 'data': {'driver': 'str', 'id': 'str'},
2328 'gen': false } # so we can get the additional arguments
2329
a15fef21
LC
2330##
2331# @device_del:
2332#
2333# Remove a device from a guest
2334#
6287d827 2335# @id: the name or QOM path of the device
a15fef21
LC
2336#
2337# Returns: Nothing on success
2338# If @id is not a valid device, DeviceNotFound
a15fef21
LC
2339#
2340# Notes: When this command completes, the device may not be removed from the
2341# guest. Hot removal is an operation that requires guest cooperation.
2342# This command merely requests that the guest begin the hot removal
0402a5d6
MT
2343# process. Completion of the device removal process is signaled with a
2344# DEVICE_DELETED event. Guest reset will automatically complete removal
2345# for all devices.
a15fef21
LC
2346#
2347# Since: 0.14.0
2348##
2349{ 'command': 'device_del', 'data': {'id': 'str'} }
783e9b48 2350
b53ccc30
QN
2351##
2352# @DumpGuestMemoryFormat:
2353#
2354# An enumeration of guest-memory-dump's format.
2355#
2356# @elf: elf format
2357#
2358# @kdump-zlib: kdump-compressed format with zlib-compressed
2359#
2360# @kdump-lzo: kdump-compressed format with lzo-compressed
2361#
2362# @kdump-snappy: kdump-compressed format with snappy-compressed
2363#
2364# Since: 2.0
2365##
2366{ 'enum': 'DumpGuestMemoryFormat',
2367 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
2368
783e9b48
WC
2369##
2370# @dump-guest-memory
2371#
2372# Dump guest's memory to vmcore. It is a synchronous operation that can take
f1cd4830 2373# very long depending on the amount of guest memory.
f5b0d93b
LC
2374#
2375# @paging: if true, do paging to get guest's memory mapping. This allows
d691180e 2376# using gdb to process the core file.
f5b0d93b 2377#
d691180e
LC
2378# IMPORTANT: this option can make QEMU allocate several gigabytes
2379# of RAM. This can happen for a large guest, or a
2380# malicious guest pretending to be large.
2381#
2382# Also, paging=true has the following limitations:
2383#
2384# 1. The guest may be in a catastrophic state or can have corrupted
2385# memory, which cannot be trusted
2386# 2. The guest can be in real-mode even if paging is enabled. For
2387# example, the guest uses ACPI to sleep, and ACPI sleep state
2388# goes in real-mode
f1cd4830 2389# 3. Currently only supported on i386 and x86_64.
f5b0d93b 2390#
783e9b48 2391# @protocol: the filename or file descriptor of the vmcore. The supported
d691180e 2392# protocols are:
f5b0d93b 2393#
d691180e
LC
2394# 1. file: the protocol starts with "file:", and the following
2395# string is the file's path.
2396# 2. fd: the protocol starts with "fd:", and the following string
2397# is the fd's name.
f5b0d93b 2398#
228de9cf 2399# @detach: #optional if true, QMP will return immediately rather than
39ba2ea6
PX
2400# waiting for the dump to finish. The user can track progress
2401# using "query-dump". (since 2.6).
228de9cf 2402#
783e9b48 2403# @begin: #optional if specified, the starting physical address.
f5b0d93b 2404#
783e9b48 2405# @length: #optional if specified, the memory size, in bytes. If you don't
d691180e
LC
2406# want to dump all guest's memory, please specify the start @begin
2407# and @length
783e9b48 2408#
b53ccc30
QN
2409# @format: #optional if specified, the format of guest memory dump. But non-elf
2410# format is conflict with paging and filter, ie. @paging, @begin and
2411# @length is not allowed to be specified with non-elf @format at the
2412# same time (since 2.0)
2413#
783e9b48 2414# Returns: nothing on success
783e9b48
WC
2415#
2416# Since: 1.2
2417##
2418{ 'command': 'dump-guest-memory',
228de9cf
PX
2419 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
2420 '*begin': 'int', '*length': 'int',
2421 '*format': 'DumpGuestMemoryFormat'} }
d691180e 2422
baf28f57
PX
2423##
2424# @DumpStatus
2425#
2426# Describe the status of a long-running background guest memory dump.
2427#
2428# @none: no dump-guest-memory has started yet.
2429#
2430# @active: there is one dump running in background.
2431#
2432# @completed: the last dump has finished successfully.
2433#
2434# @failed: the last dump has failed.
2435#
2436# Since 2.6
2437##
2438{ 'enum': 'DumpStatus',
2439 'data': [ 'none', 'active', 'completed', 'failed' ] }
2440
39ba2ea6
PX
2441##
2442# @DumpQueryResult
2443#
2444# The result format for 'query-dump'.
2445#
2446# @status: enum of @DumpStatus, which shows current dump status
2447#
2448# @completed: bytes written in latest dump (uncompressed)
2449#
2450# @total: total bytes to be written in latest dump (uncompressed)
2451#
2452# Since 2.6
2453##
2454{ 'struct': 'DumpQueryResult',
2455 'data': { 'status': 'DumpStatus',
2456 'completed': 'int',
2457 'total': 'int' } }
2458
2459##
2460# @query-dump
2461#
2462# Query latest dump status.
2463#
2464# Returns: A @DumpStatus object showing the dump status.
2465#
2466# Since: 2.6
2467##
2468{ 'command': 'query-dump', 'returns': 'DumpQueryResult' }
2469
7d6dc7f3
QN
2470##
2471# @DumpGuestMemoryCapability:
2472#
2473# A list of the available formats for dump-guest-memory
2474#
2475# Since: 2.0
2476##
895a2a80 2477{ 'struct': 'DumpGuestMemoryCapability',
7d6dc7f3
QN
2478 'data': {
2479 'formats': ['DumpGuestMemoryFormat'] } }
2480
2481##
2482# @query-dump-guest-memory-capability:
2483#
2484# Returns the available formats for dump-guest-memory
2485#
2486# Returns: A @DumpGuestMemoryCapability object listing available formats for
2487# dump-guest-memory
2488#
2489# Since: 2.0
2490##
2491{ 'command': 'query-dump-guest-memory-capability',
2492 'returns': 'DumpGuestMemoryCapability' }
d691180e 2493
7ee0c3e3
JH
2494##
2495# @dump-skeys
2496#
2497# Dump guest's storage keys
2498#
2499# @filename: the path to the file to dump to
2500#
2501# This command is only supported on s390 architecture.
2502#
2503# Since: 2.5
2504##
2505{ 'command': 'dump-skeys',
2506 'data': { 'filename': 'str' } }
2507
928059a3
LC
2508##
2509# @netdev_add:
2510#
2511# Add a network backend.
2512#
2513# @type: the type of network backend. Current valid values are 'user', 'tap',
2514# 'vde', 'socket', 'dump' and 'bridge'
2515#
2516# @id: the name of the new network backend
2517#
b8a98326 2518# Additional arguments depend on the type.
928059a3 2519#
b8a98326
MA
2520# TODO This command effectively bypasses QAPI completely due to its
2521# "additional arguments" business. It shouldn't have been added to
2522# the schema in this form. It should be qapified properly, or
2523# replaced by a properly qapified command.
928059a3
LC
2524#
2525# Since: 0.14.0
2526#
2527# Returns: Nothing on success
2528# If @type is not a valid network backend, DeviceNotFound
928059a3
LC
2529##
2530{ 'command': 'netdev_add',
b8a98326
MA
2531 'data': {'type': 'str', 'id': 'str'},
2532 'gen': false } # so we can get the additional arguments
5f964155
LC
2533
2534##
2535# @netdev_del:
2536#
2537# Remove a network backend.
2538#
2539# @id: the name of the network backend to remove
2540#
2541# Returns: Nothing on success
2542# If @id is not a valid network backend, DeviceNotFound
2543#
2544# Since: 0.14.0
2545##
2546{ 'command': 'netdev_del', 'data': {'id': 'str'} }
208c9d1b 2547
cff8b2c6
PB
2548##
2549# @object-add:
2550#
2551# Create a QOM object.
2552#
2553# @qom-type: the class name for the object to be created
2554#
2555# @id: the name of the new object
2556#
2557# @props: #optional a dictionary of properties to be passed to the backend
2558#
2559# Returns: Nothing on success
2560# Error if @qom-type is not a valid class name
2561#
2562# Since: 2.0
2563##
2564{ 'command': 'object-add',
6eb3937e 2565 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
cff8b2c6 2566
ab2d0531
PB
2567##
2568# @object-del:
2569#
2570# Remove a QOM object.
2571#
2572# @id: the name of the QOM object to remove
2573#
2574# Returns: Nothing on success
2575# Error if @id is not a valid id for a QOM object
2576#
2577# Since: 2.0
2578##
2579{ 'command': 'object-del', 'data': {'id': 'str'} }
2580
14aa0c2d
LE
2581##
2582# @NetdevNoneOptions
2583#
2584# Use it alone to have zero network devices.
2585#
2586# Since 1.2
2587##
895a2a80 2588{ 'struct': 'NetdevNoneOptions',
14aa0c2d
LE
2589 'data': { } }
2590
2591##
2592# @NetLegacyNicOptions
2593#
2594# Create a new Network Interface Card.
2595#
2596# @netdev: #optional id of -netdev to connect to
2597#
2598# @macaddr: #optional MAC address
2599#
2600# @model: #optional device model (e1000, rtl8139, virtio etc.)
2601#
2602# @addr: #optional PCI device address
2603#
2604# @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2605#
2606# Since 1.2
2607##
895a2a80 2608{ 'struct': 'NetLegacyNicOptions',
14aa0c2d
LE
2609 'data': {
2610 '*netdev': 'str',
2611 '*macaddr': 'str',
2612 '*model': 'str',
2613 '*addr': 'str',
2614 '*vectors': 'uint32' } }
2615
2616##
2617# @String
2618#
2619# A fat type wrapping 'str', to be embedded in lists.
2620#
2621# Since 1.2
2622##
895a2a80 2623{ 'struct': 'String',
14aa0c2d
LE
2624 'data': {
2625 'str': 'str' } }
2626
2627##
2628# @NetdevUserOptions
2629#
2630# Use the user mode network stack which requires no administrator privilege to
2631# run.
2632#
2633# @hostname: #optional client hostname reported by the builtin DHCP server
2634#
2635# @restrict: #optional isolate the guest from the host
2636#
0b11c036
ST
2637# @ipv4: #optional whether to support IPv4, default true for enabled
2638# (since 2.6)
2639#
2640# @ipv6: #optional whether to support IPv6, default true for enabled
2641# (since 2.6)
2642#
14aa0c2d
LE
2643# @ip: #optional legacy parameter, use net= instead
2644#
d8eb3864
ST
2645# @net: #optional IP network address that the guest will see, in the
2646# form addr[/netmask] The netmask is optional, and can be
2647# either in the form a.b.c.d or as a number of valid top-most
2648# bits. Default is 10.0.2.0/24.
14aa0c2d
LE
2649#
2650# @host: #optional guest-visible address of the host
2651#
2652# @tftp: #optional root directory of the built-in TFTP server
2653#
2654# @bootfile: #optional BOOTP filename, for use with tftp=
2655#
2656# @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2657# assign
2658#
2659# @dns: #optional guest-visible address of the virtual nameserver
2660#
63d2960b
KS
2661# @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2662# to the guest
2663#
d8eb3864
ST
2664# @ipv6-prefix: #optional IPv6 network prefix (default is fec0::) (since
2665# 2.6). The network prefix is given in the usual
2666# hexadecimal IPv6 address notation.
7aac531e 2667#
d8eb3864
ST
2668# @ipv6-prefixlen: #optional IPv6 network prefix length (default is 64)
2669# (since 2.6)
7aac531e 2670#
d8eb3864 2671# @ipv6-host: #optional guest-visible IPv6 address of the host (since 2.6)
7aac531e 2672#
d8eb3864
ST
2673# @ipv6-dns: #optional guest-visible IPv6 address of the virtual
2674# nameserver (since 2.6)
7aac531e 2675#
14aa0c2d
LE
2676# @smb: #optional root directory of the built-in SMB server
2677#
2678# @smbserver: #optional IP address of the built-in SMB server
2679#
2680# @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2681# endpoints
2682#
2683# @guestfwd: #optional forward guest TCP connections
2684#
2685# Since 1.2
2686##
895a2a80 2687{ 'struct': 'NetdevUserOptions',
14aa0c2d
LE
2688 'data': {
2689 '*hostname': 'str',
2690 '*restrict': 'bool',
0b11c036
ST
2691 '*ipv4': 'bool',
2692 '*ipv6': 'bool',
14aa0c2d
LE
2693 '*ip': 'str',
2694 '*net': 'str',
2695 '*host': 'str',
2696 '*tftp': 'str',
2697 '*bootfile': 'str',
2698 '*dhcpstart': 'str',
2699 '*dns': 'str',
63d2960b 2700 '*dnssearch': ['String'],
d8eb3864
ST
2701 '*ipv6-prefix': 'str',
2702 '*ipv6-prefixlen': 'int',
2703 '*ipv6-host': 'str',
2704 '*ipv6-dns': 'str',
14aa0c2d
LE
2705 '*smb': 'str',
2706 '*smbserver': 'str',
2707 '*hostfwd': ['String'],
2708 '*guestfwd': ['String'] } }
2709
2710##
2711# @NetdevTapOptions
2712#
2713# Connect the host TAP network interface name to the VLAN.
2714#
2715# @ifname: #optional interface name
2716#
2717# @fd: #optional file descriptor of an already opened tap
2718#
2ca81baa
JW
2719# @fds: #optional multiple file descriptors of already opened multiqueue capable
2720# tap
2721#
14aa0c2d
LE
2722# @script: #optional script to initialize the interface
2723#
2724# @downscript: #optional script to shut down the interface
2725#
584613ea
AK
2726# @br: #optional bridge name (since 2.8)
2727#
14aa0c2d
LE
2728# @helper: #optional command to execute to configure bridge
2729#
2730# @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2731#
2732# @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2733#
2734# @vhost: #optional enable vhost-net network accelerator
2735#
2736# @vhostfd: #optional file descriptor of an already opened vhost net device
2737#
2ca81baa
JW
2738# @vhostfds: #optional file descriptors of multiple already opened vhost net
2739# devices
2740#
14aa0c2d
LE
2741# @vhostforce: #optional vhost on for non-MSIX virtio guests
2742#
ec396014
JW
2743# @queues: #optional number of queues to be created for multiqueue capable tap
2744#
69e87b32
JW
2745# @poll-us: #optional maximum number of microseconds that could
2746# be spent on busy polling for tap (since 2.7)
2747#
14aa0c2d
LE
2748# Since 1.2
2749##
895a2a80 2750{ 'struct': 'NetdevTapOptions',
14aa0c2d
LE
2751 'data': {
2752 '*ifname': 'str',
2753 '*fd': 'str',
264986e2 2754 '*fds': 'str',
14aa0c2d
LE
2755 '*script': 'str',
2756 '*downscript': 'str',
584613ea 2757 '*br': 'str',
14aa0c2d
LE
2758 '*helper': 'str',
2759 '*sndbuf': 'size',
2760 '*vnet_hdr': 'bool',
2761 '*vhost': 'bool',
2762 '*vhostfd': 'str',
264986e2
JW
2763 '*vhostfds': 'str',
2764 '*vhostforce': 'bool',
69e87b32
JW
2765 '*queues': 'uint32',
2766 '*poll-us': 'uint32'} }
14aa0c2d
LE
2767
2768##
2769# @NetdevSocketOptions
2770#
2771# Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2772# socket connection.
2773#
2774# @fd: #optional file descriptor of an already opened socket
2775#
2776# @listen: #optional port number, and optional hostname, to listen on
2777#
2778# @connect: #optional port number, and optional hostname, to connect to
2779#
2780# @mcast: #optional UDP multicast address and port number
2781#
2782# @localaddr: #optional source address and port for multicast and udp packets
2783#
2784# @udp: #optional UDP unicast address and port number
2785#
2786# Since 1.2
2787##
895a2a80 2788{ 'struct': 'NetdevSocketOptions',
14aa0c2d
LE
2789 'data': {
2790 '*fd': 'str',
2791 '*listen': 'str',
2792 '*connect': 'str',
2793 '*mcast': 'str',
2794 '*localaddr': 'str',
2795 '*udp': 'str' } }
2796
3fb69aa1
AI
2797##
2798# @NetdevL2TPv3Options
2799#
2800# Connect the VLAN to Ethernet over L2TPv3 Static tunnel
2801#
2802# @src: source address
2803#
2804# @dst: destination address
2805#
2806# @srcport: #optional source port - mandatory for udp, optional for ip
2807#
2808# @dstport: #optional destination port - mandatory for udp, optional for ip
2809#
2810# @ipv6: #optional - force the use of ipv6
2811#
2812# @udp: #optional - use the udp version of l2tpv3 encapsulation
2813#
2814# @cookie64: #optional - use 64 bit coookies
2815#
2816# @counter: #optional have sequence counter
2817#
2818# @pincounter: #optional pin sequence counter to zero -
2819# workaround for buggy implementations or
2820# networks with packet reorder
2821#
2822# @txcookie: #optional 32 or 64 bit transmit cookie
2823#
2824# @rxcookie: #optional 32 or 64 bit receive cookie
2825#
2826# @txsession: 32 bit transmit session
2827#
2828# @rxsession: #optional 32 bit receive session - if not specified
2829# set to the same value as transmit
2830#
2831# @offset: #optional additional offset - allows the insertion of
2832# additional application-specific data before the packet payload
2833#
2834# Since 2.1
2835##
895a2a80 2836{ 'struct': 'NetdevL2TPv3Options',
3fb69aa1
AI
2837 'data': {
2838 'src': 'str',
2839 'dst': 'str',
2840 '*srcport': 'str',
2841 '*dstport': 'str',
2842 '*ipv6': 'bool',
2843 '*udp': 'bool',
2844 '*cookie64': 'bool',
2845 '*counter': 'bool',
2846 '*pincounter': 'bool',
2847 '*txcookie': 'uint64',
2848 '*rxcookie': 'uint64',
2849 'txsession': 'uint32',
2850 '*rxsession': 'uint32',
2851 '*offset': 'uint32' } }
2852
14aa0c2d
LE
2853##
2854# @NetdevVdeOptions
2855#
2856# Connect the VLAN to a vde switch running on the host.
2857#
2858# @sock: #optional socket path
2859#
2860# @port: #optional port number
2861#
2862# @group: #optional group owner of socket
2863#
2864# @mode: #optional permissions for socket
2865#
2866# Since 1.2
2867##
895a2a80 2868{ 'struct': 'NetdevVdeOptions',
14aa0c2d
LE
2869 'data': {
2870 '*sock': 'str',
2871 '*port': 'uint16',
2872 '*group': 'str',
2873 '*mode': 'uint16' } }
2874
2875##
2876# @NetdevDumpOptions
2877#
2878# Dump VLAN network traffic to a file.
2879#
2880# @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2881# suffixes.
2882#
2883# @file: #optional dump file path (default is qemu-vlan0.pcap)
2884#
2885# Since 1.2
2886##
895a2a80 2887{ 'struct': 'NetdevDumpOptions',
14aa0c2d
LE
2888 'data': {
2889 '*len': 'size',
2890 '*file': 'str' } }
2891
2892##
2893# @NetdevBridgeOptions
2894#
2895# Connect a host TAP network interface to a host bridge device.
2896#
2897# @br: #optional bridge name
2898#
2899# @helper: #optional command to execute to configure bridge
2900#
2901# Since 1.2
2902##
895a2a80 2903{ 'struct': 'NetdevBridgeOptions',
14aa0c2d
LE
2904 'data': {
2905 '*br': 'str',
2906 '*helper': 'str' } }
2907
f6c874e3
SH
2908##
2909# @NetdevHubPortOptions
2910#
2911# Connect two or more net clients through a software hub.
2912#
2913# @hubid: hub identifier number
2914#
2915# Since 1.2
2916##
895a2a80 2917{ 'struct': 'NetdevHubPortOptions',
f6c874e3
SH
2918 'data': {
2919 'hubid': 'int32' } }
2920
58952137
VM
2921##
2922# @NetdevNetmapOptions
2923#
2924# Connect a client to a netmap-enabled NIC or to a VALE switch port
2925#
2926# @ifname: Either the name of an existing network interface supported by
2927# netmap, or the name of a VALE port (created on the fly).
2928# A VALE port name is in the form 'valeXXX:YYY', where XXX and
2929# YYY are non-negative integers. XXX identifies a switch and
2930# YYY identifies a port of the switch. VALE ports having the
2931# same XXX are therefore connected to the same switch.
2932#
2933# @devname: #optional path of the netmap device (default: '/dev/netmap').
2934#
c27de2a3 2935# Since 2.0
58952137 2936##
895a2a80 2937{ 'struct': 'NetdevNetmapOptions',
58952137
VM
2938 'data': {
2939 'ifname': 'str',
2940 '*devname': 'str' } }
2941
03ce5744
NN
2942##
2943# @NetdevVhostUserOptions
2944#
2945# Vhost-user network backend
2946#
2947# @chardev: name of a unix socket chardev
2948#
2949# @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
2950#
b931bfbf
CO
2951# @queues: #optional number of queues to be created for multiqueue vhost-user
2952# (default: 1) (Since 2.5)
2953#
03ce5744
NN
2954# Since 2.1
2955##
895a2a80 2956{ 'struct': 'NetdevVhostUserOptions',
03ce5744
NN
2957 'data': {
2958 'chardev': 'str',
b931bfbf
CO
2959 '*vhostforce': 'bool',
2960 '*queues': 'int' } }
03ce5744 2961
14aa0c2d 2962##
f394b2e2 2963# @NetClientDriver
14aa0c2d 2964#
f394b2e2
EB
2965# Available netdev drivers.
2966#
2967# Since 2.7
2968##
2969{ 'enum': 'NetClientDriver',
2970 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
2971 'bridge', 'hubport', 'netmap', 'vhost-user' ] }
2972
2973##
2974# @Netdev
2975#
2976# Captures the configuration of a network device.
2977#
2978# @id: identifier for monitor commands.
2979#
2980# @type: Specify the driver used for interpreting remaining arguments.
14aa0c2d
LE
2981#
2982# Since 1.2
3fb69aa1
AI
2983#
2984# 'l2tpv3' - since 2.1
14aa0c2d 2985##
f394b2e2
EB
2986{ 'union': 'Netdev',
2987 'base': { 'id': 'str', 'type': 'NetClientDriver' },
2988 'discriminator': 'type',
14aa0c2d 2989 'data': {
f6c874e3
SH
2990 'none': 'NetdevNoneOptions',
2991 'nic': 'NetLegacyNicOptions',
2992 'user': 'NetdevUserOptions',
2993 'tap': 'NetdevTapOptions',
3fb69aa1 2994 'l2tpv3': 'NetdevL2TPv3Options',
f6c874e3
SH
2995 'socket': 'NetdevSocketOptions',
2996 'vde': 'NetdevVdeOptions',
2997 'dump': 'NetdevDumpOptions',
2998 'bridge': 'NetdevBridgeOptions',
58952137 2999 'hubport': 'NetdevHubPortOptions',
03ce5744
NN
3000 'netmap': 'NetdevNetmapOptions',
3001 'vhost-user': 'NetdevVhostUserOptions' } }
14aa0c2d
LE
3002
3003##
3004# @NetLegacy
3005#
3006# Captures the configuration of a network device; legacy.
3007#
3008# @vlan: #optional vlan number
3009#
3010# @id: #optional identifier for monitor commands
3011#
3012# @name: #optional identifier for monitor commands, ignored if @id is present
3013#
3014# @opts: device type specific properties (legacy)
3015#
3016# Since 1.2
3017##
895a2a80 3018{ 'struct': 'NetLegacy',
14aa0c2d
LE
3019 'data': {
3020 '*vlan': 'int32',
3021 '*id': 'str',
3022 '*name': 'str',
f394b2e2 3023 'opts': 'NetLegacyOptions' } }
14aa0c2d
LE
3024
3025##
f394b2e2 3026# @NetLegacyOptions
14aa0c2d 3027#
f394b2e2 3028# Like Netdev, but for use only by the legacy command line options
14aa0c2d
LE
3029#
3030# Since 1.2
3031##
f394b2e2 3032{ 'union': 'NetLegacyOptions',
14aa0c2d 3033 'data': {
f394b2e2
EB
3034 'none': 'NetdevNoneOptions',
3035 'nic': 'NetLegacyNicOptions',
3036 'user': 'NetdevUserOptions',
3037 'tap': 'NetdevTapOptions',
3038 'l2tpv3': 'NetdevL2TPv3Options',
3039 'socket': 'NetdevSocketOptions',
3040 'vde': 'NetdevVdeOptions',
3041 'dump': 'NetdevDumpOptions',
3042 'bridge': 'NetdevBridgeOptions',
3043 'netmap': 'NetdevNetmapOptions',
3044 'vhost-user': 'NetdevVhostUserOptions' } }
14aa0c2d 3045
fdccce45
YH
3046##
3047# @NetFilterDirection
3048#
3049# Indicates whether a netfilter is attached to a netdev's transmit queue or
3050# receive queue or both.
3051#
3052# @all: the filter is attached both to the receive and the transmit
3053# queue of the netdev (default).
3054#
3055# @rx: the filter is attached to the receive queue of the netdev,
3056# where it will receive packets sent to the netdev.
3057#
3058# @tx: the filter is attached to the transmit queue of the netdev,
3059# where it will receive packets sent by the netdev.
3060#
3061# Since 2.5
3062##
3063{ 'enum': 'NetFilterDirection',
3064 'data': [ 'all', 'rx', 'tx' ] }
3065
5be8c759
PB
3066##
3067# @InetSocketAddress
3068#
3069# Captures a socket address or address range in the Internet namespace.
3070#
3071# @host: host part of the address
3072#
2ea1793b 3073# @port: port part of the address, or lowest port if @to is present
5be8c759
PB
3074#
3075# @to: highest port to try
3076#
3077# @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
3078# #optional
3079#
3080# @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
3081# #optional
3082#
3083# Since 1.3
3084##
895a2a80 3085{ 'struct': 'InetSocketAddress',
5be8c759
PB
3086 'data': {
3087 'host': 'str',
2ea1793b 3088 'port': 'str',
5be8c759
PB
3089 '*to': 'uint16',
3090 '*ipv4': 'bool',
3091 '*ipv6': 'bool' } }
3092
3093##
3094# @UnixSocketAddress
3095#
3096# Captures a socket address in the local ("Unix socket") namespace.
3097#
3098# @path: filesystem path to use
3099#
3100# Since 1.3
3101##
895a2a80 3102{ 'struct': 'UnixSocketAddress',
5be8c759
PB
3103 'data': {
3104 'path': 'str' } }
3105
6a02c806
SH
3106##
3107# @VsockSocketAddress
3108#
3109# Captures a socket address in the vsock namespace.
3110#
3111# @cid: unique host identifier
3112# @port: port
3113#
3114# Note that string types are used to allow for possible future hostname or
3115# service resolution support.
3116#
3117# Since 2.8
3118##
3119{ 'struct': 'VsockSocketAddress',
3120 'data': {
3121 'cid': 'str',
3122 'port': 'str' } }
3123
5be8c759
PB
3124##
3125# @SocketAddress
3126#
3127# Captures the address of a socket, which could also be a named file descriptor
3128#
3129# Since 1.3
3130##
3131{ 'union': 'SocketAddress',
3132 'data': {
3133 'inet': 'InetSocketAddress',
3134 'unix': 'UnixSocketAddress',
6a02c806 3135 'vsock': 'VsockSocketAddress',
5be8c759
PB
3136 'fd': 'String' } }
3137
208c9d1b
CB
3138##
3139# @getfd:
3140#
3141# Receive a file descriptor via SCM rights and assign it a name
3142#
3143# @fdname: file descriptor name
3144#
3145# Returns: Nothing on success
208c9d1b
CB
3146#
3147# Since: 0.14.0
3148#
3149# Notes: If @fdname already exists, the file descriptor assigned to
3150# it will be closed and replaced by the received file
3151# descriptor.
3152# The 'closefd' command can be used to explicitly close the
3153# file descriptor when it is no longer needed.
3154##
3155{ 'command': 'getfd', 'data': {'fdname': 'str'} }
3156
3157##
3158# @closefd:
3159#
3160# Close a file descriptor previously passed via SCM rights
3161#
3162# @fdname: file descriptor name
3163#
3164# Returns: Nothing on success
208c9d1b
CB
3165#
3166# Since: 0.14.0
3167##
3168{ 'command': 'closefd', 'data': {'fdname': 'str'} }
01d3c80d
AL
3169
3170##
3171# @MachineInfo:
3172#
3173# Information describing a machine.
3174#
3175# @name: the name of the machine
3176#
3177# @alias: #optional an alias for the machine name
3178#
3179# @default: #optional whether the machine is default
3180#
c72e7688
MN
3181# @cpu-max: maximum number of CPUs supported by the machine type
3182# (since 1.5.0)
3183#
62c9467d
PK
3184# @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
3185#
01d3c80d
AL
3186# Since: 1.2.0
3187##
895a2a80 3188{ 'struct': 'MachineInfo',
01d3c80d 3189 'data': { 'name': 'str', '*alias': 'str',
62c9467d
PK
3190 '*is-default': 'bool', 'cpu-max': 'int',
3191 'hotpluggable-cpus': 'bool'} }
01d3c80d
AL
3192
3193##
3194# @query-machines:
3195#
3196# Return a list of supported machines
3197#
3198# Returns: a list of MachineInfo
3199#
3200# Since: 1.2.0
3201##
3202{ 'command': 'query-machines', 'returns': ['MachineInfo'] }
e4e31c63
AL
3203
3204##
3205# @CpuDefinitionInfo:
3206#
3207# Virtual CPU definition.
3208#
3209# @name: the name of the CPU definition
3210#
fc4b84b1
DH
3211# @migration-safe: #optional whether a CPU definition can be safely used for
3212# migration in combination with a QEMU compatibility machine
3213# when migrating between different QMU versions and between
3214# hosts with different sets of (hardware or software)
3215# capabilities. If not provided, information is not available
3216# and callers should not assume the CPU definition to be
3217# migration-safe. (since 2.8)
3218#
3219# @static: whether a CPU definition is static and will not change depending on
3220# QEMU version, machine type, machine options and accelerator options.
3221# A static model is always migration-safe. (since 2.8)
3222#
9504e710
EH
3223# @unavailable-features: #optional List of properties that prevent
3224# the CPU model from running in the current
3225# host. (since 2.8)
3226#
3227# @unavailable-features is a list of QOM property names that
3228# represent CPU model attributes that prevent the CPU from running.
3229# If the QOM property is read-only, that means there's no known
3230# way to make the CPU model run in the current host. Implementations
3231# that choose not to provide specific information return the
3232# property name "type".
3233# If the property is read-write, it means that it MAY be possible
3234# to run the CPU model in the current host if that property is
3235# changed. Management software can use it as hints to suggest or
3236# choose an alternative for the user, or just to generate meaningful
3237# error messages explaining why the CPU model can't be used.
3238# If @unavailable-features is an empty list, the CPU model is
3239# runnable using the current host and machine-type.
3240# If @unavailable-features is not present, runnability
3241# information for the CPU is not available.
3242#
e4e31c63
AL
3243# Since: 1.2.0
3244##
895a2a80 3245{ 'struct': 'CpuDefinitionInfo',
9504e710
EH
3246 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
3247 '*unavailable-features': [ 'str' ] } }
e4e31c63
AL
3248
3249##
3250# @query-cpu-definitions:
3251#
3252# Return a list of supported virtual CPU definitions
3253#
3254# Returns: a list of CpuDefInfo
3255#
3256# Since: 1.2.0
3257##
3258{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
ba1c048a 3259
e09484ef
DH
3260##
3261# @CpuModelInfo:
3262#
3263# Virtual CPU model.
3264#
3265# A CPU model consists of the name of a CPU definition, to which
3266# delta changes are applied (e.g. features added/removed). Most magic values
3267# that an architecture might require should be hidden behind the name.
3268# However, if required, architectures can expose relevant properties.
3269#
3270# @name: the name of the CPU definition the model is based on
3271# @props: #optional a dictionary of QOM properties to be applied
3272#
3273# Since: 2.8.0
3274##
3275{ 'struct': 'CpuModelInfo',
3276 'data': { 'name': 'str',
3277 '*props': 'any' } }
3278
3279##
3280# @CpuModelExpansionType
3281#
3282# An enumeration of CPU model expansion types.
3283#
3284# @static: Expand to a static CPU model, a combination of a static base
3285# model name and property delta changes. As the static base model will
3286# never change, the expanded CPU model will be the same, independant of
3287# independent of QEMU version, machine type, machine options, and
3288# accelerator options. Therefore, the resulting model can be used by
3289# tooling without having to specify a compatibility machine - e.g. when
3290# displaying the "host" model. static CPU models are migration-safe.
3291#
3292# @full: Expand all properties. The produced model is not guaranteed to be
3293# migration-safe, but allows tooling to get an insight and work with
3294# model details.
3295#
3296# Since: 2.8.0
3297##
3298{ 'enum': 'CpuModelExpansionType',
3299 'data': [ 'static', 'full' ] }
3300
3301
3302##
3303# @CpuModelExpansionInfo
3304#
3305# The result of a cpu model expansion.
3306#
3307# @model: the expanded CpuModelInfo.
3308#
3309# Since: 2.8.0
3310##
3311{ 'struct': 'CpuModelExpansionInfo',
3312 'data': { 'model': 'CpuModelInfo' } }
3313
3314
3315##
3316# @query-cpu-model-expansion:
3317#
3318# Expands a given CPU model (or a combination of CPU model + additional options)
3319# to different granularities, allowing tooling to get an understanding what a
3320# specific CPU model looks like in QEMU under a certain configuration.
3321#
3322# This interface can be used to query the "host" CPU model.
3323#
3324# The data returned by this command may be affected by:
3325#
3326# * QEMU version: CPU models may look different depending on the QEMU version.
3327# (Except for CPU models reported as "static" in query-cpu-definitions.)
3328# * machine-type: CPU model may look different depending on the machine-type.
3329# (Except for CPU models reported as "static" in query-cpu-definitions.)
3330# * machine options (including accelerator): in some architectures, CPU models
3331# may look different depending on machine and accelerator options. (Except for
3332# CPU models reported as "static" in query-cpu-definitions.)
3333# * "-cpu" arguments and global properties: arguments to the -cpu option and
3334# global properties may affect expansion of CPU models. Using
3335# query-cpu-model-expansion while using these is not advised.
3336#
137974ce
DH
3337# Some architectures may not support all expansion types. s390x supports
3338# "full" and "static".
e09484ef
DH
3339#
3340# Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
3341# not supported, if the model cannot be expanded, if the model contains
3342# an unknown CPU definition name, unknown properties or properties
3343# with a wrong type. Also returns an error if an expansion type is
3344# not supported.
3345#
3346# Since: 2.8.0
3347##
3348{ 'command': 'query-cpu-model-expansion',
3349 'data': { 'type': 'CpuModelExpansionType',
3350 'model': 'CpuModelInfo' },
3351 'returns': 'CpuModelExpansionInfo' }
3352
0031e0d6
DH
3353##
3354# @CpuModelCompareResult:
3355#
3356# An enumeration of CPU model comparation results. The result is usually
4d4ccabd 3357# calculated using e.g. CPU features or CPU generations.
0031e0d6
DH
3358#
3359# @incompatible: If model A is incompatible to model B, model A is not
3360# guaranteed to run where model B runs and the other way around.
3361#
3362# @identical: If model A is identical to model B, model A is guaranteed to run
3363# where model B runs and the other way around.
3364#
3365# @superset: If model A is a superset of model B, model B is guaranteed to run
3366# where model A runs. There are no guarantees about the other way.
3367#
3368# @subset: If model A is a subset of model B, model A is guaranteed to run
3369# where model B runs. There are no guarantees about the other way.
3370#
3371# Since: 2.8.0
3372##
3373{ 'enum': 'CpuModelCompareResult',
3374 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
3375
3376##
3377# @CpuModelCompareInfo
3378#
3379# The result of a CPU model comparison.
3380#
3381# @result: The result of the compare operation.
3382# @responsible-properties: List of properties that led to the comparison result
3383# not being identical.
3384#
3385# @responsible-properties is a list of QOM property names that led to
3386# both CPUs not being detected as identical. For identical models, this
3387# list is empty.
3388# If a QOM property is read-only, that means there's no known way to make the
3389# CPU models identical. If the special property name "type" is included, the
3390# models are by definition not identical and cannot be made identical.
3391#
3392# Since: 2.8.0
3393##
3394{ 'struct': 'CpuModelCompareInfo',
3395 'data': {'result': 'CpuModelCompareResult',
3396 'responsible-properties': ['str']
3397 }
3398}
3399
3400##
3401# @query-cpu-model-comparison:
3402#
3403# Compares two CPU models, returning how they compare in a specific
3404# configuration. The results indicates how both models compare regarding
3405# runnability. This result can be used by tooling to make decisions if a
3406# certain CPU model will run in a certain configuration or if a compatible
3407# CPU model has to be created by baselining.
3408#
3409# Usually, a CPU model is compared against the maximum possible CPU model
4d4ccabd 3410# of a certain configuration (e.g. the "host" model for KVM). If that CPU
0031e0d6
DH
3411# model is identical or a subset, it will run in that configuration.
3412#
3413# The result returned by this command may be affected by:
3414#
3415# * QEMU version: CPU models may look different depending on the QEMU version.
3416# (Except for CPU models reported as "static" in query-cpu-definitions.)
4d4ccabd 3417# * machine-type: CPU model may look different depending on the machine-type.
0031e0d6
DH
3418# (Except for CPU models reported as "static" in query-cpu-definitions.)
3419# * machine options (including accelerator): in some architectures, CPU models
3420# may look different depending on machine and accelerator options. (Except for
3421# CPU models reported as "static" in query-cpu-definitions.)
3422# * "-cpu" arguments and global properties: arguments to the -cpu option and
3423# global properties may affect expansion of CPU models. Using
3424# query-cpu-model-expansion while using these is not advised.
3425#
4e82ef05
DH
3426# Some architectures may not support comparing CPU models. s390x supports
3427# comparing CPU models.
0031e0d6
DH
3428#
3429# Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
3430# not supported, if a model cannot be used, if a model contains
3431# an unknown cpu definition name, unknown properties or properties
3432# with wrong types.
3433#
3434# Since: 2.8.0
3435##
3436{ 'command': 'query-cpu-model-comparison',
3437 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
3438 'returns': 'CpuModelCompareInfo' }
3439
b18b6043
DH
3440##
3441# @CpuModelBaselineInfo
3442#
3443# The result of a CPU model baseline.
3444#
3445# @model: the baselined CpuModelInfo.
3446#
3447# Since: 2.8.0
3448##
3449{ 'struct': 'CpuModelBaselineInfo',
3450 'data': { 'model': 'CpuModelInfo' } }
3451
3452##
3453# @query-cpu-model-baseline:
3454#
3455# Baseline two CPU models, creating a compatible third model. The created
3456# model will always be a static, migration-safe CPU model (see "static"
3457# CPU model expansion for details).
3458#
3459# This interface can be used by tooling to create a compatible CPU model out
3460# two CPU models. The created CPU model will be identical to or a subset of
3461# both CPU models when comparing them. Therefore, the created CPU model is
3462# guaranteed to run where the given CPU models run.
3463#
3464# The result returned by this command may be affected by:
3465#
3466# * QEMU version: CPU models may look different depending on the QEMU version.
3467# (Except for CPU models reported as "static" in query-cpu-definitions.)
4d4ccabd 3468# * machine-type: CPU model may look different depending on the machine-type.
b18b6043
DH
3469# (Except for CPU models reported as "static" in query-cpu-definitions.)
3470# * machine options (including accelerator): in some architectures, CPU models
3471# may look different depending on machine and accelerator options. (Except for
3472# CPU models reported as "static" in query-cpu-definitions.)
3473# * "-cpu" arguments and global properties: arguments to the -cpu option and
3474# global properties may affect expansion of CPU models. Using
3475# query-cpu-model-expansion while using these is not advised.
3476#
f1a47d08
DH
3477# Some architectures may not support baselining CPU models. s390x supports
3478# baselining CPU models.
b18b6043
DH
3479#
3480# Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
3481# not supported, if a model cannot be used, if a model contains
3482# an unknown cpu definition name, unknown properties or properties
3483# with wrong types.
3484#
3485# Since: 2.8.0
3486##
3487{ 'command': 'query-cpu-model-baseline',
3488 'data': { 'modela': 'CpuModelInfo',
3489 'modelb': 'CpuModelInfo' },
3490 'returns': 'CpuModelBaselineInfo' }
3491
49687ace 3492##
ba1c048a
CB
3493# @AddfdInfo:
3494#
3495# Information about a file descriptor that was added to an fd set.
3496#
3497# @fdset-id: The ID of the fd set that @fd was added to.
3498#
3499# @fd: The file descriptor that was received via SCM rights and
3500# added to the fd set.
3501#
3502# Since: 1.2.0
3503##
895a2a80 3504{ 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
ba1c048a
CB
3505
3506##
3507# @add-fd:
3508#
3509# Add a file descriptor, that was passed via SCM rights, to an fd set.
3510#
3511# @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3512#
3513# @opaque: #optional A free-form string that can be used to describe the fd.
3514#
3515# Returns: @AddfdInfo on success
3516# If file descriptor was not received, FdNotSupplied
9ac54af0 3517# If @fdset-id is a negative value, InvalidParameterValue
ba1c048a
CB
3518#
3519# Notes: The list of fd sets is shared by all monitor connections.
3520#
3521# If @fdset-id is not specified, a new fd set will be created.
3522#
3523# Since: 1.2.0
3524##
3525{ 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3526 'returns': 'AddfdInfo' }
3527
3528##
3529# @remove-fd:
3530#
3531# Remove a file descriptor from an fd set.
3532#
3533# @fdset-id: The ID of the fd set that the file descriptor belongs to.
3534#
3535# @fd: #optional The file descriptor that is to be removed.
3536#
3537# Returns: Nothing on success
3538# If @fdset-id or @fd is not found, FdNotFound
3539#
3540# Since: 1.2.0
3541#
3542# Notes: The list of fd sets is shared by all monitor connections.
3543#
3544# If @fd is not specified, all file descriptors in @fdset-id
3545# will be removed.
3546##
3547{ 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3548
3549##
3550# @FdsetFdInfo:
3551#
3552# Information about a file descriptor that belongs to an fd set.
3553#
3554# @fd: The file descriptor value.
3555#
3556# @opaque: #optional A free-form string that can be used to describe the fd.
3557#
3558# Since: 1.2.0
3559##
895a2a80 3560{ 'struct': 'FdsetFdInfo',
ba1c048a
CB
3561 'data': {'fd': 'int', '*opaque': 'str'} }
3562
3563##
3564# @FdsetInfo:
3565#
3566# Information about an fd set.
3567#
3568# @fdset-id: The ID of the fd set.
3569#
3570# @fds: A list of file descriptors that belong to this fd set.
3571#
3572# Since: 1.2.0
3573##
895a2a80 3574{ 'struct': 'FdsetInfo',
ba1c048a
CB
3575 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3576
3577##
3578# @query-fdsets:
3579#
3580# Return information describing all fd sets.
3581#
3582# Returns: A list of @FdsetInfo
3583#
3584# Since: 1.2.0
3585#
3586# Note: The list of fd sets is shared by all monitor connections.
3587#
3588##
3589{ 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
99afc91d 3590
99afc91d
DB
3591##
3592# @TargetInfo:
3593#
3594# Information describing the QEMU target.
3595#
3596# @arch: the target architecture (eg "x86_64", "i386", etc)
3597#
3598# Since: 1.2.0
3599##
895a2a80 3600{ 'struct': 'TargetInfo',
c02a9552 3601 'data': { 'arch': 'str' } }
99afc91d
DB
3602
3603##
3604# @query-target:
3605#
3606# Return information about the target for this QEMU
3607#
3608# Returns: TargetInfo
3609#
3610# Since: 1.2.0
3611##
3612{ 'command': 'query-target', 'returns': 'TargetInfo' }
411656f4
AK
3613
3614##
3615# @QKeyCode:
3616#
3617# An enumeration of key name.
3618#
3619# This is used by the send-key command.
3620#
3621# Since: 1.3.0
bbd1b1cc 3622#
8b6b0c59 3623# 'unmapped' and 'pause' since 2.0
b771f470 3624# 'ro' and 'kp_comma' since 2.4
a3541278 3625# 'kp_equals' and 'power' since 2.6
411656f4
AK
3626##
3627{ 'enum': 'QKeyCode',
bbd1b1cc
GH
3628 'data': [ 'unmapped',
3629 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
411656f4
AK
3630 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3631 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3632 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3633 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3634 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3635 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3636 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3637 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3638 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3639 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3640 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3641 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3642 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
b771f470 3643 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro',
a3541278 3644 'kp_comma', 'kp_equals', 'power' ] }
e4c8f004 3645
9f328977
LC
3646##
3647# @KeyValue
3648#
3649# Represents a keyboard key.
3650#
3651# Since: 1.3.0
3652##
3653{ 'union': 'KeyValue',
3654 'data': {
3655 'number': 'int',
3656 'qcode': 'QKeyCode' } }
3657
e4c8f004
AK
3658##
3659# @send-key:
3660#
3661# Send keys to guest.
3662#
9f328977
LC
3663# @keys: An array of @KeyValue elements. All @KeyValues in this array are
3664# simultaneously sent to the guest. A @KeyValue.number value is sent
3665# directly to the guest, while @KeyValue.qcode must be a valid
3666# @QKeyCode value
e4c8f004
AK
3667#
3668# @hold-time: #optional time to delay key up events, milliseconds. Defaults
3669# to 100
3670#
3671# Returns: Nothing on success
3672# If key is unknown or redundant, InvalidParameter
3673#
3674# Since: 1.3.0
3675#
3676##
3677{ 'command': 'send-key',
9f328977 3678 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
ad39cf6d
LC
3679
3680##
3681# @screendump:
3682#
3683# Write a PPM of the VGA screen to a file.
3684#
3685# @filename: the path of a new PPM file to store the image
3686#
3687# Returns: Nothing on success
3688#
3689# Since: 0.14.0
3690##
3691{ 'command': 'screendump', 'data': {'filename': 'str'} }
6dd844db 3692
d0d7708b
DB
3693
3694##
3695# @ChardevCommon:
3696#
3697# Configuration shared across all chardev backends
3698#
3699# @logfile: #optional The name of a logfile to save output
3700# @logappend: #optional true to append instead of truncate
3701# (default to false to truncate)
3702#
3703# Since: 2.6
3704##
3705{ 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
3706 '*logappend': 'bool' } }
3707
ffbdbe59
GH
3708##
3709# @ChardevFile:
3710#
3711# Configuration info for file chardevs.
3712#
3713# @in: #optional The name of the input file
3714# @out: The name of the output file
31e38a22
OK
3715# @append: #optional Open the file in append mode (default false to
3716# truncate) (Since 2.6)
ffbdbe59
GH
3717#
3718# Since: 1.4
3719##
895a2a80 3720{ 'struct': 'ChardevFile', 'data': { '*in' : 'str',
31e38a22 3721 'out' : 'str',
d0d7708b
DB
3722 '*append': 'bool' },
3723 'base': 'ChardevCommon' }
ffbdbe59 3724
d59044ef 3725##
d36b2b90 3726# @ChardevHostdev:
d59044ef 3727#
548cbb36 3728# Configuration info for device and pipe chardevs.
d59044ef
GH
3729#
3730# @device: The name of the special file for the device,
3731# i.e. /dev/ttyS0 on Unix or COM1: on Windows
3732# @type: What kind of device this is.
3733#
3734# Since: 1.4
3735##
d0d7708b
DB
3736{ 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
3737 'base': 'ChardevCommon' }
d59044ef 3738
f6bd5d6e
GH
3739##
3740# @ChardevSocket:
3741#
3ecc059d 3742# Configuration info for (stream) socket chardevs.
f6bd5d6e
GH
3743#
3744# @addr: socket address to listen on (server=true)
3745# or connect to (server=false)
a8fb5427 3746# @tls-creds: #optional the ID of the TLS credentials object (since 2.6)
f6bd5d6e 3747# @server: #optional create server socket (default: true)
ef993ba7
GH
3748# @wait: #optional wait for incoming connection on server
3749# sockets (default: false).
f6bd5d6e 3750# @nodelay: #optional set TCP_NODELAY socket option (default: false)
ef993ba7
GH
3751# @telnet: #optional enable telnet protocol on server
3752# sockets (default: false)
5dd1f02b
CM
3753# @reconnect: #optional For a client socket, if a socket is disconnected,
3754# then attempt a reconnect after the given number of seconds.
3755# Setting this to zero disables this function. (default: 0)
3756# (Since: 2.2)
f6bd5d6e
GH
3757#
3758# Since: 1.4
3759##
895a2a80 3760{ 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
a8fb5427 3761 '*tls-creds' : 'str',
5dd1f02b
CM
3762 '*server' : 'bool',
3763 '*wait' : 'bool',
3764 '*nodelay' : 'bool',
3765 '*telnet' : 'bool',
d0d7708b
DB
3766 '*reconnect' : 'int' },
3767 'base': 'ChardevCommon' }
f6bd5d6e 3768
3ecc059d 3769##
08d0ab3f 3770# @ChardevUdp:
3ecc059d
GH
3771#
3772# Configuration info for datagram socket chardevs.
3773#
3774# @remote: remote address
3775# @local: #optional local address
3776#
3777# Since: 1.5
3778##
895a2a80 3779{ 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
d0d7708b
DB
3780 '*local' : 'SocketAddress' },
3781 'base': 'ChardevCommon' }
3ecc059d 3782
edb2fb3c
GH
3783##
3784# @ChardevMux:
3785#
3786# Configuration info for mux chardevs.
3787#
3788# @chardev: name of the base chardev.
3789#
3790# Since: 1.5
3791##
d0d7708b
DB
3792{ 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
3793 'base': 'ChardevCommon' }
edb2fb3c 3794
7c358031
GH
3795##
3796# @ChardevStdio:
3797#
3798# Configuration info for stdio chardevs.
3799#
3800# @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3801# be delivered to qemu. Default: true in -nographic mode,
3802# false otherwise.
3803#
3804# Since: 1.5
3805##
d0d7708b
DB
3806{ 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
3807 'base': 'ChardevCommon' }
3808
7c358031 3809
cd153e2a
GH
3810##
3811# @ChardevSpiceChannel:
3812#
3813# Configuration info for spice vm channel chardevs.
3814#
3815# @type: kind of channel (for example vdagent).
3816#
3817# Since: 1.5
3818##
d0d7708b
DB
3819{ 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' },
3820 'base': 'ChardevCommon' }
cd153e2a
GH
3821
3822##
3823# @ChardevSpicePort:
3824#
3825# Configuration info for spice port chardevs.
3826#
3827# @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3828#
3829# Since: 1.5
3830##
d0d7708b
DB
3831{ 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' },
3832 'base': 'ChardevCommon' }
cd153e2a 3833
702ec69c
GH
3834##
3835# @ChardevVC:
3836#
3837# Configuration info for virtual console chardevs.
3838#
3839# @width: console width, in pixels
3840# @height: console height, in pixels
3841# @cols: console width, in chars
3842# @rows: console height, in chars
3843#
3844# Since: 1.5
3845##
895a2a80 3846{ 'struct': 'ChardevVC', 'data': { '*width' : 'int',
702ec69c
GH
3847 '*height' : 'int',
3848 '*cols' : 'int',
d0d7708b
DB
3849 '*rows' : 'int' },
3850 'base': 'ChardevCommon' }
702ec69c 3851
1da48c65 3852##
4f57378f 3853# @ChardevRingbuf:
1da48c65 3854#
3a1da42e 3855# Configuration info for ring buffer chardevs.
1da48c65 3856#
3a1da42e 3857# @size: #optional ring buffer size, must be power of two, default is 65536
1da48c65
GH
3858#
3859# Since: 1.5
3860##
d0d7708b
DB
3861{ 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' },
3862 'base': 'ChardevCommon' }
1da48c65 3863
f1a1a356
GH
3864##
3865# @ChardevBackend:
3866#
3867# Configuration info for the new chardev backend.
3868#
5692399f 3869# Since: 1.4 (testdev since 2.2)
f1a1a356 3870##
f6bd5d6e 3871{ 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
d36b2b90
MA
3872 'serial' : 'ChardevHostdev',
3873 'parallel': 'ChardevHostdev',
548cbb36 3874 'pipe' : 'ChardevHostdev',
f6bd5d6e 3875 'socket' : 'ChardevSocket',
08d0ab3f 3876 'udp' : 'ChardevUdp',
b1918fbb
EB
3877 'pty' : 'ChardevCommon',
3878 'null' : 'ChardevCommon',
f5a51cab 3879 'mux' : 'ChardevMux',
b1918fbb
EB
3880 'msmouse': 'ChardevCommon',
3881 'braille': 'ChardevCommon',
3882 'testdev': 'ChardevCommon',
d9ac374f 3883 'stdio' : 'ChardevStdio',
b1918fbb 3884 'console': 'ChardevCommon',
cd153e2a 3885 'spicevmc' : 'ChardevSpiceChannel',
702ec69c 3886 'spiceport' : 'ChardevSpicePort',
1da48c65 3887 'vc' : 'ChardevVC',
3a1da42e
MA
3888 'ringbuf': 'ChardevRingbuf',
3889 # next one is just for compatibility
4f57378f 3890 'memory' : 'ChardevRingbuf' } }
f1a1a356
GH
3891
3892##
3893# @ChardevReturn:
3894#
3895# Return info about the chardev backend just created.
3896#
58fa4325
MA
3897# @pty: #optional name of the slave pseudoterminal device, present if
3898# and only if a chardev of type 'pty' was created
3899#
f1a1a356
GH
3900# Since: 1.4
3901##
895a2a80 3902{ 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
f1a1a356
GH
3903
3904##
3905# @chardev-add:
3906#
58fa4325 3907# Add a character device backend
f1a1a356
GH
3908#
3909# @id: the chardev's ID, must be unique
3910# @backend: backend type and parameters
3911#
58fa4325 3912# Returns: ChardevReturn.
f1a1a356
GH
3913#
3914# Since: 1.4
3915##
3916{ 'command': 'chardev-add', 'data': {'id' : 'str',
3917 'backend' : 'ChardevBackend' },
3918 'returns': 'ChardevReturn' }
3919
3920##
3921# @chardev-remove:
3922#
58fa4325 3923# Remove a character device backend
f1a1a356
GH
3924#
3925# @id: the chardev's ID, must exist and not be in use
3926#
3927# Returns: Nothing on success
3928#
3929# Since: 1.4
3930##
3931{ 'command': 'chardev-remove', 'data': {'id': 'str'} }
d1a0cf73
SB
3932
3933##
3934# @TpmModel:
3935#
3936# An enumeration of TPM models
3937#
3938# @tpm-tis: TPM TIS model
3939#
3940# Since: 1.5
3941##
3942{ 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3943
3944##
3945# @query-tpm-models:
3946#
3947# Return a list of supported TPM models
3948#
3949# Returns: a list of TpmModel
3950#
3951# Since: 1.5
3952##
3953{ 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3954
3955##
3956# @TpmType:
3957#
3958# An enumeration of TPM types
3959#
3960# @passthrough: TPM passthrough type
3961#
3962# Since: 1.5
3963##
3964{ 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3965
3966##
3967# @query-tpm-types:
3968#
3969# Return a list of supported TPM types
3970#
3971# Returns: a list of TpmType
3972#
3973# Since: 1.5
3974##
3975{ 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3976
3977##
3978# @TPMPassthroughOptions:
3979#
3980# Information about the TPM passthrough type
3981#
3982# @path: #optional string describing the path used for accessing the TPM device
3983#
3984# @cancel-path: #optional string showing the TPM's sysfs cancel file
3985# for cancellation of TPM commands while they are executing
3986#
3987# Since: 1.5
3988##
895a2a80 3989{ 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
d1a0cf73
SB
3990 '*cancel-path' : 'str'} }
3991
3992##
3993# @TpmTypeOptions:
3994#
3995# A union referencing different TPM backend types' configuration options
3996#
88ca7bcf 3997# @passthrough: The configuration options for the TPM passthrough type
d1a0cf73
SB
3998#
3999# Since: 1.5
4000##
4001{ 'union': 'TpmTypeOptions',
88ca7bcf 4002 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
d1a0cf73
SB
4003
4004##
4005# @TpmInfo:
4006#
4007# Information about the TPM
4008#
4009# @id: The Id of the TPM
4010#
4011# @model: The TPM frontend model
4012#
88ca7bcf 4013# @options: The TPM (backend) type configuration options
d1a0cf73
SB
4014#
4015# Since: 1.5
4016##
895a2a80 4017{ 'struct': 'TPMInfo',
d1a0cf73
SB
4018 'data': {'id': 'str',
4019 'model': 'TpmModel',
88ca7bcf 4020 'options': 'TpmTypeOptions' } }
d1a0cf73
SB
4021
4022##
4023# @query-tpm:
4024#
4025# Return information about the TPM device
4026#
4027# Returns: @TPMInfo on success
4028#
4029# Since: 1.5
4030##
4031{ 'command': 'query-tpm', 'returns': ['TPMInfo'] }
8ccbad5c
LE
4032
4033##
4034# @AcpiTableOptions
4035#
4036# Specify an ACPI table on the command line to load.
4037#
4038# At most one of @file and @data can be specified. The list of files specified
4039# by any one of them is loaded and concatenated in order. If both are omitted,
4040# @data is implied.
4041#
4042# Other fields / optargs can be used to override fields of the generic ACPI
4043# table header; refer to the ACPI specification 5.0, section 5.2.6 System
4044# Description Table Header. If a header field is not overridden, then the
4045# corresponding value from the concatenated blob is used (in case of @file), or
4046# it is filled in with a hard-coded value (in case of @data).
4047#
4048# String fields are copied into the matching ACPI member from lowest address
4049# upwards, and silently truncated / NUL-padded to length.
4050#
4051# @sig: #optional table signature / identifier (4 bytes)
4052#
4053# @rev: #optional table revision number (dependent on signature, 1 byte)
4054#
4055# @oem_id: #optional OEM identifier (6 bytes)
4056#
4057# @oem_table_id: #optional OEM table identifier (8 bytes)
4058#
4059# @oem_rev: #optional OEM-supplied revision number (4 bytes)
4060#
4061# @asl_compiler_id: #optional identifier of the utility that created the table
4062# (4 bytes)
4063#
4064# @asl_compiler_rev: #optional revision number of the utility that created the
4065# table (4 bytes)
4066#
4067# @file: #optional colon (:) separated list of pathnames to load and
4068# concatenate as table data. The resultant binary blob is expected to
4069# have an ACPI table header. At least one file is required. This field
4070# excludes @data.
4071#
4072# @data: #optional colon (:) separated list of pathnames to load and
4073# concatenate as table data. The resultant binary blob must not have an
4074# ACPI table header. At least one file is required. This field excludes
4075# @file.
4076#
4077# Since 1.5
4078##
895a2a80 4079{ 'struct': 'AcpiTableOptions',
8ccbad5c
LE
4080 'data': {
4081 '*sig': 'str',
4082 '*rev': 'uint8',
4083 '*oem_id': 'str',
4084 '*oem_table_id': 'str',
4085 '*oem_rev': 'uint32',
4086 '*asl_compiler_id': 'str',
4087 '*asl_compiler_rev': 'uint32',
4088 '*file': 'str',
4089 '*data': 'str' }}
1f8f987d
AK
4090
4091##
4092# @CommandLineParameterType:
4093#
4094# Possible types for an option parameter.
4095#
4096# @string: accepts a character string
4097#
4098# @boolean: accepts "on" or "off"
4099#
4100# @number: accepts a number
4101#
4102# @size: accepts a number followed by an optional suffix (K)ilo,
4103# (M)ega, (G)iga, (T)era
4104#
4105# Since 1.5
4106##
4107{ 'enum': 'CommandLineParameterType',
4108 'data': ['string', 'boolean', 'number', 'size'] }
4109
4110##
4111# @CommandLineParameterInfo:
4112#
4113# Details about a single parameter of a command line option.
4114#
4115# @name: parameter name
4116#
4117# @type: parameter @CommandLineParameterType
4118#
4119# @help: #optional human readable text string, not suitable for parsing.
4120#
e36af94f
CL
4121# @default: #optional default value string (since 2.1)
4122#
1f8f987d
AK
4123# Since 1.5
4124##
895a2a80 4125{ 'struct': 'CommandLineParameterInfo',
1f8f987d
AK
4126 'data': { 'name': 'str',
4127 'type': 'CommandLineParameterType',
e36af94f
CL
4128 '*help': 'str',
4129 '*default': 'str' } }
1f8f987d
AK
4130
4131##
4132# @CommandLineOptionInfo:
4133#
4134# Details about a command line option, including its list of parameter details
4135#
4136# @option: option name
4137#
4138# @parameters: an array of @CommandLineParameterInfo
4139#
4140# Since 1.5
4141##
895a2a80 4142{ 'struct': 'CommandLineOptionInfo',
1f8f987d
AK
4143 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
4144
4145##
4146# @query-command-line-options:
4147#
4148# Query command line option schema.
4149#
4150# @option: #optional option name
4151#
4152# Returns: list of @CommandLineOptionInfo for all options (or for the given
4153# @option). Returns an error if the given @option doesn't exist.
4154#
4155# Since 1.5
4156##
4157{'command': 'query-command-line-options', 'data': { '*option': 'str' },
4158 'returns': ['CommandLineOptionInfo'] }
8e8aba50
EH
4159
4160##
4161# @X86CPURegister32
4162#
4163# A X86 32-bit register
4164#
4165# Since: 1.5
4166##
4167{ 'enum': 'X86CPURegister32',
4168 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4169
4170##
4171# @X86CPUFeatureWordInfo
4172#
4173# Information about a X86 CPU feature word
4174#
4175# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4176#
4177# @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
4178# feature word
4179#
4180# @cpuid-register: Output register containing the feature bits
4181#
4182# @features: value of output register, containing the feature bits
4183#
4184# Since: 1.5
4185##
895a2a80 4186{ 'struct': 'X86CPUFeatureWordInfo',
8e8aba50
EH
4187 'data': { 'cpuid-input-eax': 'int',
4188 '*cpuid-input-ecx': 'int',
4189 'cpuid-register': 'X86CPURegister32',
4190 'features': 'int' } }
b1be4280 4191
9f08c8ec
EB
4192##
4193# @DummyForceArrays
4194#
4195# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
4196#
4197# Since 2.5
4198##
4199{ 'struct': 'DummyForceArrays',
4200 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
4201
4202
b1be4280
AK
4203##
4204# @RxState:
4205#
4206# Packets receiving state
4207#
4208# @normal: filter assigned packets according to the mac-table
4209#
4210# @none: don't receive any assigned packet
4211#
4212# @all: receive all assigned packets
4213#
4214# Since: 1.6
4215##
4216{ 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
4217
4218##
4219# @RxFilterInfo:
4220#
4221# Rx-filter information for a NIC.
4222#
4223# @name: net client name
4224#
4225# @promiscuous: whether promiscuous mode is enabled
4226#
4227# @multicast: multicast receive state
4228#
4229# @unicast: unicast receive state
4230#
f7bc8ef8
AK
4231# @vlan: vlan receive state (Since 2.0)
4232#
b1be4280
AK
4233# @broadcast-allowed: whether to receive broadcast
4234#
4235# @multicast-overflow: multicast table is overflowed or not
4236#
4237# @unicast-overflow: unicast table is overflowed or not
4238#
4239# @main-mac: the main macaddr string
4240#
4241# @vlan-table: a list of active vlan id
4242#
4243# @unicast-table: a list of unicast macaddr string
4244#
4245# @multicast-table: a list of multicast macaddr string
4246#
4247# Since 1.6
4248##
895a2a80 4249{ 'struct': 'RxFilterInfo',
b1be4280
AK
4250 'data': {
4251 'name': 'str',
4252 'promiscuous': 'bool',
4253 'multicast': 'RxState',
4254 'unicast': 'RxState',
f7bc8ef8 4255 'vlan': 'RxState',
b1be4280
AK
4256 'broadcast-allowed': 'bool',
4257 'multicast-overflow': 'bool',
4258 'unicast-overflow': 'bool',
4259 'main-mac': 'str',
4260 'vlan-table': ['int'],
4261 'unicast-table': ['str'],
4262 'multicast-table': ['str'] }}
4263
4264##
4265# @query-rx-filter:
4266#
4267# Return rx-filter information for all NICs (or for the given NIC).
4268#
4269# @name: #optional net client name
4270#
4271# Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4272# Returns an error if the given @name doesn't exist, or given
4273# NIC doesn't support rx-filter querying, or given net client
4274# isn't a NIC.
4275#
4276# Since: 1.6
4277##
4278{ 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4279 'returns': ['RxFilterInfo'] }
d26c9a15 4280
031fa964
GH
4281##
4282# @InputButton
4283#
4284# Button of a pointer input device (mouse, tablet).
4285#
4286# Since: 2.0
4287##
4288{ 'enum' : 'InputButton',
f22d0af0 4289 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down' ] }
031fa964
GH
4290
4291##
513e7cdb 4292# @InputAxis
031fa964
GH
4293#
4294# Position axis of a pointer input device (mouse, tablet).
4295#
4296# Since: 2.0
4297##
4298{ 'enum' : 'InputAxis',
01df5143 4299 'data' : [ 'x', 'y' ] }
031fa964
GH
4300
4301##
4302# @InputKeyEvent
4303#
4304# Keyboard input event.
4305#
4306# @key: Which key this event is for.
4307# @down: True for key-down and false for key-up events.
4308#
4309# Since: 2.0
4310##
895a2a80 4311{ 'struct' : 'InputKeyEvent',
031fa964
GH
4312 'data' : { 'key' : 'KeyValue',
4313 'down' : 'bool' } }
4314
4315##
4316# @InputBtnEvent
4317#
4318# Pointer button input event.
4319#
4320# @button: Which button this event is for.
4321# @down: True for key-down and false for key-up events.
4322#
4323# Since: 2.0
4324##
895a2a80 4325{ 'struct' : 'InputBtnEvent',
031fa964
GH
4326 'data' : { 'button' : 'InputButton',
4327 'down' : 'bool' } }
4328
4329##
4330# @InputMoveEvent
4331#
4332# Pointer motion input event.
4333#
4334# @axis: Which axis is referenced by @value.
4335# @value: Pointer position. For absolute coordinates the
4336# valid range is 0 -> 0x7ffff
4337#
4338# Since: 2.0
4339##
895a2a80 4340{ 'struct' : 'InputMoveEvent',
031fa964
GH
4341 'data' : { 'axis' : 'InputAxis',
4342 'value' : 'int' } }
4343
4344##
4345# @InputEvent
4346#
4347# Input event union.
4348#
935fb915
AK
4349# @key: Input event of Keyboard
4350# @btn: Input event of pointer buttons
4351# @rel: Input event of relative pointer motion
4352# @abs: Input event of absolute pointer motion
4353#
031fa964
GH
4354# Since: 2.0
4355##
4356{ 'union' : 'InputEvent',
4357 'data' : { 'key' : 'InputKeyEvent',
4358 'btn' : 'InputBtnEvent',
4359 'rel' : 'InputMoveEvent',
4360 'abs' : 'InputMoveEvent' } }
0042109a 4361
50c6617f 4362##
6575ccdd 4363# @input-send-event
50c6617f
MT
4364#
4365# Send input event(s) to guest.
4366#
b98d26e3
GH
4367# @device: #optional display device to send event(s) to.
4368# @head: #optional head to send event(s) to, in case the
4369# display device supports multiple scanouts.
50c6617f
MT
4370# @events: List of InputEvent union.
4371#
4372# Returns: Nothing on success.
4373#
b98d26e3
GH
4374# The @display and @head parameters can be used to send the input
4375# event to specific input devices in case (a) multiple input devices
4376# of the same kind are added to the virtual machine and (b) you have
4377# configured input routing (see docs/multiseat.txt) for those input
4378# devices. The parameters work exactly like the device and head
4379# properties of input devices. If @device is missing, only devices
4380# that have no input routing config are admissible. If @device is
4381# specified, both input devices with and without input routing config
4382# are admissible, but devices with input routing config take
4383# precedence.
df5b2adb 4384#
6575ccdd 4385# Since: 2.6
50c6617f 4386##
6575ccdd 4387{ 'command': 'input-send-event',
b98d26e3
GH
4388 'data': { '*device': 'str',
4389 '*head' : 'int',
4390 'events' : [ 'InputEvent' ] } }
50c6617f 4391
0042109a
WG
4392##
4393# @NumaOptions
4394#
4395# A discriminated record of NUMA options. (for OptsVisitor)
4396#
4397# Since 2.1
4398##
4399{ 'union': 'NumaOptions',
4400 'data': {
4401 'node': 'NumaNodeOptions' }}
4402
4403##
4404# @NumaNodeOptions
4405#
4406# Create a guest NUMA node. (for OptsVisitor)
4407#
4408# @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
4409#
4410# @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
4411# if omitted)
4412#
7febe36f
PB
4413# @mem: #optional memory size of this node; mutually exclusive with @memdev.
4414# Equally divide total memory among nodes if both @mem and @memdev are
4415# omitted.
4416#
4417# @memdev: #optional memory backend object. If specified for one node,
4418# it must be specified for all nodes.
0042109a
WG
4419#
4420# Since: 2.1
4421##
895a2a80 4422{ 'struct': 'NumaNodeOptions',
0042109a
WG
4423 'data': {
4424 '*nodeid': 'uint16',
4425 '*cpus': ['uint16'],
7febe36f
PB
4426 '*mem': 'size',
4427 '*memdev': 'str' }}
4cf1b76b
HT
4428
4429##
4430# @HostMemPolicy
4431#
4432# Host memory policy types
4433#
4434# @default: restore default policy, remove any nondefault policy
4435#
4436# @preferred: set the preferred host nodes for allocation
4437#
4438# @bind: a strict policy that restricts memory allocation to the
4439# host nodes specified
4440#
4441# @interleave: memory allocations are interleaved across the set
4442# of host nodes specified
4443#
4444# Since 2.1
4445##
4446{ 'enum': 'HostMemPolicy',
4447 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
76b5d850
HT
4448
4449##
4450# @Memdev:
4451#
8f4e5ac3 4452# Information about memory backend
76b5d850 4453#
8f4e5ac3 4454# @size: memory backend size
76b5d850
HT
4455#
4456# @merge: enables or disables memory merge support
4457#
8f4e5ac3 4458# @dump: includes memory backend's memory in a core dump or not
76b5d850
HT
4459#
4460# @prealloc: enables or disables memory preallocation
4461#
4462# @host-nodes: host nodes for its memory policy
4463#
8f4e5ac3 4464# @policy: memory policy of memory backend
76b5d850
HT
4465#
4466# Since: 2.1
4467##
895a2a80 4468{ 'struct': 'Memdev',
76b5d850
HT
4469 'data': {
4470 'size': 'size',
4471 'merge': 'bool',
4472 'dump': 'bool',
4473 'prealloc': 'bool',
4474 'host-nodes': ['uint16'],
4475 'policy': 'HostMemPolicy' }}
4476
4477##
4478# @query-memdev:
4479#
8f4e5ac3 4480# Returns information for all memory backends.
76b5d850
HT
4481#
4482# Returns: a list of @Memdev.
4483#
4484# Since: 2.1
4485##
4486{ 'command': 'query-memdev', 'returns': ['Memdev'] }
8f4e5ac3
IM
4487
4488##
6f2e2730
IM
4489# @PCDIMMDeviceInfo:
4490#
4491# PCDIMMDevice state information
4492#
4493# @id: #optional device's ID
4494#
4495# @addr: physical address, where device is mapped
4496#
4497# @size: size of memory that the device provides
4498#
4499# @slot: slot number at which device is plugged in
4500#
4501# @node: NUMA node number where device is plugged in
4502#
4503# @memdev: memory backend linked with device
4504#
4505# @hotplugged: true if device was hotplugged
4506#
4507# @hotpluggable: true if device if could be added/removed while machine is running
4508#
4509# Since: 2.1
4510##
895a2a80 4511{ 'struct': 'PCDIMMDeviceInfo',
6f2e2730
IM
4512 'data': { '*id': 'str',
4513 'addr': 'int',
4514 'size': 'int',
4515 'slot': 'int',
4516 'node': 'int',
4517 'memdev': 'str',
4518 'hotplugged': 'bool',
4519 'hotpluggable': 'bool'
4520 }
4521}
4522
4523##
4524# @MemoryDeviceInfo:
4525#
4526# Union containing information about a memory device
4527#
4528# Since: 2.1
4529##
4530{ 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
4531
4532##
4533# @query-memory-devices
4534#
4535# Lists available memory devices and their state
4536#
4537# Since: 2.1
4538##
4539{ 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
521b3673 4540
49687ace
MAL
4541##
4542# @ACPISlotType
521b3673
IM
4543#
4544# @DIMM: memory slot
76623d00 4545# @CPU: logical CPU slot (since 2.7)
49687ace 4546##
76623d00 4547{ 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
521b3673 4548
49687ace
MAL
4549##
4550# @ACPIOSTInfo
521b3673
IM
4551#
4552# OSPM Status Indication for a device
4553# For description of possible values of @source and @status fields
4554# see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
4555#
4556# @device: #optional device ID associated with slot
4557#
4558# @slot: slot ID, unique per slot of a given @slot-type
4559#
4560# @slot-type: type of the slot
4561#
4562# @source: an integer containing the source event
4563#
4564# @status: an integer containing the status code
4565#
4566# Since: 2.1
4567##
895a2a80 4568{ 'struct': 'ACPIOSTInfo',
521b3673
IM
4569 'data' : { '*device': 'str',
4570 'slot': 'str',
4571 'slot-type': 'ACPISlotType',
4572 'source': 'int',
4573 'status': 'int' } }
02419bcb
IM
4574
4575##
4576# @query-acpi-ospm-status
4577#
4578# Lists ACPI OSPM status of ACPI device objects,
4579# which might be reported via _OST method
4580#
4581# Since: 2.1
4582##
4583{ 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
f668470f 4584
99eaf09c
WX
4585##
4586# @WatchdogExpirationAction
4587#
4588# An enumeration of the actions taken when the watchdog device's timer is
4589# expired
4590#
4591# @reset: system resets
4592#
4593# @shutdown: system shutdown, note that it is similar to @powerdown, which
4594# tries to set to system status and notify guest
4595#
4596# @poweroff: system poweroff, the emulator program exits
4597#
4598# @pause: system pauses, similar to @stop
4599#
4600# @debug: system enters debug state
4601#
4602# @none: nothing is done
4603#
795dc6e4
MCL
4604# @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
4605# VCPUS on x86) (since 2.4)
4606#
99eaf09c
WX
4607# Since: 2.1
4608##
4609{ 'enum': 'WatchdogExpirationAction',
795dc6e4
MCL
4610 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
4611 'inject-nmi' ] }
99eaf09c 4612
5a2d2cbd
WX
4613##
4614# @IoOperationType
4615#
4616# An enumeration of the I/O operation types
4617#
4618# @read: read operation
4619#
4620# @write: write operation
4621#
4622# Since: 2.1
4623##
4624{ 'enum': 'IoOperationType',
4625 'data': [ 'read', 'write' ] }
4626
3a449690
WX
4627##
4628# @GuestPanicAction
4629#
4630# An enumeration of the actions taken when guest OS panic is detected
4631#
4632# @pause: system pauses
4633#
864111f4 4634# Since: 2.1 (poweroff since 2.8)
3a449690
WX
4635##
4636{ 'enum': 'GuestPanicAction',
864111f4 4637 'data': [ 'pause', 'poweroff' ] }
f2ae8abf
MT
4638
4639##
4640# @rtc-reset-reinjection
4641#
4642# This command will reset the RTC interrupt reinjection backlog.
4643# Can be used if another mechanism to synchronize guest time
4644# is in effect, for example QEMU guest agent's guest-set-time
4645# command.
4646#
4647# Since: 2.1
4648##
4649{ 'command': 'rtc-reset-reinjection' }
fafa4d50
SF
4650
4651# Rocker ethernet network switch
4652{ 'include': 'qapi/rocker.json' }
d73abd6d
PD
4653
4654##
4655# ReplayMode:
4656#
4657# Mode of the replay subsystem.
4658#
4659# @none: normal execution mode. Replay or record are not enabled.
4660#
4661# @record: record mode. All non-deterministic data is written into the
4662# replay log.
4663#
4664# @play: replay mode. Non-deterministic data required for system execution
4665# is read from the log.
4666#
4667# Since: 2.5
4668##
4669{ 'enum': 'ReplayMode',
4670 'data': [ 'none', 'record', 'play' ] }
ae50a770 4671
88c16567
WC
4672##
4673# @xen-load-devices-state:
4674#
4675# Load the state of all devices from file. The RAM and the block devices
4676# of the VM are not loaded by this command.
4677#
4678# @filename: the file to load the state of the devices from as binary
4679# data. See xen-save-devices-state.txt for a description of the binary
4680# format.
4681#
4682# Since: 2.7
4683##
4684{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
4685
ae50a770
PX
4686##
4687# @GICCapability:
4688#
4689# The struct describes capability for a specific GIC (Generic
4690# Interrupt Controller) version. These bits are not only decided by
4691# QEMU/KVM software version, but also decided by the hardware that
4692# the program is running upon.
4693#
4694# @version: version of GIC to be described. Currently, only 2 and 3
4695# are supported.
4696#
4697# @emulated: whether current QEMU/hardware supports emulated GIC
4698# device in user space.
4699#
4700# @kernel: whether current QEMU/hardware supports hardware
4701# accelerated GIC device in kernel.
4702#
4703# Since: 2.6
4704##
4705{ 'struct': 'GICCapability',
4706 'data': { 'version': 'int',
4707 'emulated': 'bool',
4708 'kernel': 'bool' } }
4709
4710##
4711# @query-gic-capabilities:
4712#
4713# This command is ARM-only. It will return a list of GICCapability
4714# objects that describe its capability bits.
4715#
4716# Returns: a list of GICCapability objects.
4717#
4718# Since: 2.6
4719##
4720{ 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
d4633541
IM
4721
4722##
4723# CpuInstanceProperties
4724#
4725# List of properties to be used for hotplugging a CPU instance,
4726# it should be passed by management with device_add command when
4727# a CPU is being hotplugged.
4728#
4729# Note: currently there are 4 properties that could be present
4730# but management should be prepared to pass through other
4731# properties with device_add command to allow for future
27393c33
PK
4732# interface extension. This also requires the filed names to be kept in
4733# sync with the properties passed to -device/device_add.
d4633541 4734#
27393c33
PK
4735# @node-id: #optional NUMA node ID the CPU belongs to
4736# @socket-id: #optional socket number within node/board the CPU belongs to
4737# @core-id: #optional core number within socket the CPU belongs to
4738# @thread-id: #optional thread number within core the CPU belongs to
d4633541
IM
4739#
4740# Since: 2.7
4741##
4742{ 'struct': 'CpuInstanceProperties',
27393c33
PK
4743 'data': { '*node-id': 'int',
4744 '*socket-id': 'int',
4745 '*core-id': 'int',
4746 '*thread-id': 'int'
d4633541
IM
4747 }
4748}
4749
4750##
4751# @HotpluggableCPU
4752#
4753# @type: CPU object type for usage with device_add command
4754# @props: list of properties to be used for hotplugging CPU
4755# @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
4756# @qom-path: #optional link to existing CPU object if CPU is present or
4757# omitted if CPU is not present.
4758#
4759# Since: 2.7
4760##
4761{ 'struct': 'HotpluggableCPU',
4762 'data': { 'type': 'str',
4763 'vcpus-count': 'int',
4764 'props': 'CpuInstanceProperties',
4765 '*qom-path': 'str'
4766 }
4767}
4768
4769##
4770# @query-hotpluggable-cpus
4771#
4772# Returns: a list of HotpluggableCPU objects.
4773#
4774# Since: 2.7
4775##
4776{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }