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