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