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