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