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