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