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