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