]> git.proxmox.com Git - mirror_qemu.git/blame - qapi-schema.json
rdma: introduce MIG_STATE_NONE and change MIG_STATE_SETUP state transition
[mirror_qemu.git] / qapi-schema.json
CommitLineData
e3193601
AL
1# -*- Mode: Python -*-
2#
3# QAPI Schema
48a32bed 4
dcafd323
LC
5##
6# @ErrorClass
7#
8# QEMU error classes
9#
10# @GenericError: this is used for errors that don't require a specific error
11# class. This should be the default case for most errors
12#
13# @CommandNotFound: the requested command has not been found
14#
15# @DeviceEncrypted: the requested operation can't be fulfilled because the
16# selected device is encrypted
17#
18# @DeviceNotActive: a device has failed to be become active
19#
20# @DeviceNotFound: the requested device has not been found
21#
22# @KVMMissingCap: the requested operation can't be fulfilled because a
23# required KVM capability is missing
24#
dcafd323
LC
25# Since: 1.2
26##
27{ 'enum': 'ErrorClass',
28 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
1e998146 29 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
dcafd323 30
b224e5e2
LC
31##
32# @add_client
33#
34# Allow client connections for VNC, Spice and socket based
35# character devices to be passed in to QEMU via SCM_RIGHTS.
36#
37# @protocol: protocol name. Valid names are "vnc", "spice" or the
38# name of a character device (eg. from -chardev id=XXXX)
39#
40# @fdname: file descriptor name previously passed via 'getfd' command
41#
42# @skipauth: #optional whether to skip authentication. Only applies
43# to "vnc" and "spice" protocols
44#
45# @tls: #optional whether to perform TLS. Only applies to the "spice"
46# protocol
47#
48# Returns: nothing on success.
49#
50# Since: 0.14.0
51##
52{ 'command': 'add_client',
53 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
54 '*tls': 'bool' } }
55
48a32bed
AL
56##
57# @NameInfo:
58#
59# Guest name information.
60#
61# @name: #optional The name of the guest
62#
63# Since 0.14.0
64##
65{ 'type': 'NameInfo', 'data': {'*name': 'str'} }
66
67##
68# @query-name:
69#
70# Return the name information of a guest.
71#
72# Returns: @NameInfo of the guest
73#
74# Since 0.14.0
75##
76{ 'command': 'query-name', 'returns': 'NameInfo' }
b9c15f16
LC
77
78##
79# @VersionInfo:
80#
81# A description of QEMU's version.
82#
83# @qemu.major: The major version of QEMU
84#
85# @qemu.minor: The minor version of QEMU
86#
87# @qemu.micro: The micro version of QEMU. By current convention, a micro
88# version of 50 signifies a development branch. A micro version
89# greater than or equal to 90 signifies a release candidate for
90# the next minor version. A micro version of less than 50
91# signifies a stable release.
92#
93# @package: QEMU will always set this field to an empty string. Downstream
94# versions of QEMU should set this to a non-empty string. The
95# exact format depends on the downstream however it highly
96# recommended that a unique name is used.
97#
98# Since: 0.14.0
99##
100{ 'type': 'VersionInfo',
101 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
102 'package': 'str'} }
103
104##
105# @query-version:
106#
107# Returns the current version of QEMU.
108#
109# Returns: A @VersionInfo object describing the current version of QEMU.
110#
111# Since: 0.14.0
112##
113{ 'command': 'query-version', 'returns': 'VersionInfo' }
292a2602
LC
114
115##
116# @KvmInfo:
117#
118# Information about support for KVM acceleration
119#
120# @enabled: true if KVM acceleration is active
121#
122# @present: true if KVM acceleration is built into this executable
123#
124# Since: 0.14.0
125##
126{ 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
127
128##
129# @query-kvm:
130#
131# Returns information about KVM acceleration
132#
133# Returns: @KvmInfo
134#
135# Since: 0.14.0
136##
137{ 'command': 'query-kvm', 'returns': 'KvmInfo' }
138
1fa9a5e4
LC
139##
140# @RunState
141#
6932a69b 142# An enumeration of VM run states.
1fa9a5e4
LC
143#
144# @debug: QEMU is running on a debugger
145#
0a24c7b1
LC
146# @finish-migrate: guest is paused to finish the migration process
147#
1e998146
PB
148# @inmigrate: guest is paused waiting for an incoming migration. Note
149# that this state does not tell whether the machine will start at the
150# end of the migration. This depends on the command-line -S option and
151# any invocation of 'stop' or 'cont' that has happened since QEMU was
152# started.
1fa9a5e4
LC
153#
154# @internal-error: An internal error that prevents further guest execution
155# has occurred
156#
157# @io-error: the last IOP has failed and the device is configured to pause
158# on I/O errors
159#
160# @paused: guest has been paused via the 'stop' command
161#
162# @postmigrate: guest is paused following a successful 'migrate'
163#
164# @prelaunch: QEMU was started with -S and guest has not started
165#
1fa9a5e4
LC
166# @restore-vm: guest is paused to restore VM state
167#
168# @running: guest is actively running
169#
170# @save-vm: guest is paused to save the VM state
171#
172# @shutdown: guest is shut down (and -no-shutdown is in use)
173#
ad02b96a
LC
174# @suspended: guest is suspended (ACPI S3)
175#
1fa9a5e4 176# @watchdog: the watchdog action is configured to pause and has been triggered
ede085b3
HT
177#
178# @guest-panicked: guest has been panicked as a result of guest OS panic
1fa9a5e4
LC
179##
180{ 'enum': 'RunState',
181 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
182 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
ede085b3
HT
183 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
184 'guest-panicked' ] }
1fa9a5e4 185
c249ee68
BC
186##
187# @SnapshotInfo
188#
189# @id: unique snapshot id
190#
191# @name: user chosen name
192#
193# @vm-state-size: size of the VM state
194#
195# @date-sec: UTC date of the snapshot in seconds
196#
197# @date-nsec: fractional part in nano seconds to be used with date-sec
198#
199# @vm-clock-sec: VM clock relative to boot in seconds
200#
201# @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec
202#
203# Since: 1.3
204#
205##
206
207{ 'type': 'SnapshotInfo',
208 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
209 'date-sec': 'int', 'date-nsec': 'int',
210 'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } }
211
212##
213# @ImageInfo:
214#
215# Information about a QEMU image file
216#
217# @filename: name of the image file
218#
219# @format: format of the image file
220#
221# @virtual-size: maximum capacity in bytes of the image
222#
223# @actual-size: #optional actual size on disk in bytes of the image
224#
225# @dirty-flag: #optional true if image is not cleanly closed
226#
227# @cluster-size: #optional size of a cluster in bytes
228#
229# @encrypted: #optional true if the image is encrypted
230#
231# @backing-filename: #optional name of the backing file
232#
233# @full-backing-filename: #optional full path of the backing file
234#
235# @backing-filename-format: #optional the format of the backing file
236#
237# @snapshots: #optional list of VM snapshots
238#
553a7e87
WX
239# @backing-image: #optional info of the backing image (since 1.6)
240#
c249ee68
BC
241# Since: 1.3
242#
243##
244
245{ 'type': 'ImageInfo',
246 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
247 '*actual-size': 'int', 'virtual-size': 'int',
248 '*cluster-size': 'int', '*encrypted': 'bool',
249 '*backing-filename': 'str', '*full-backing-filename': 'str',
553a7e87
WX
250 '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'],
251 '*backing-image': 'ImageInfo' } }
c249ee68 252
8599ea4c
FS
253##
254# @ImageCheck:
255#
256# Information about a QEMU image file check
257#
258# @filename: name of the image file checked
259#
260# @format: format of the image file checked
261#
262# @check-errors: number of unexpected errors occurred during check
263#
264# @image-end-offset: #optional offset (in bytes) where the image ends, this
265# field is present if the driver for the image format
266# supports it
267#
268# @corruptions: #optional number of corruptions found during the check if any
269#
270# @leaks: #optional number of leaks found during the check if any
271#
272# @corruptions-fixed: #optional number of corruptions fixed during the check
273# if any
274#
275# @leaks-fixed: #optional number of leaks fixed during the check if any
276#
277# @total-clusters: #optional total number of clusters, this field is present
278# if the driver for the image format supports it
279#
280# @allocated-clusters: #optional total number of allocated clusters, this
281# field is present if the driver for the image format
282# supports it
283#
284# @fragmented-clusters: #optional total number of fragmented clusters, this
285# field is present if the driver for the image format
286# supports it
287#
e6439d78
SH
288# @compressed-clusters: #optional total number of compressed clusters, this
289# field is present if the driver for the image format
290# supports it
291#
8599ea4c
FS
292# Since: 1.4
293#
294##
295
296{ 'type': 'ImageCheck',
297 'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
298 '*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int',
299 '*corruptions-fixed': 'int', '*leaks-fixed': 'int',
300 '*total-clusters': 'int', '*allocated-clusters': 'int',
e6439d78 301 '*fragmented-clusters': 'int', '*compressed-clusters': 'int' } }
8599ea4c 302
1fa9a5e4
LC
303##
304# @StatusInfo:
305#
306# Information about VCPU run state
307#
308# @running: true if all VCPUs are runnable, false if not runnable
309#
310# @singlestep: true if VCPUs are in single-step mode
311#
312# @status: the virtual machine @RunState
313#
314# Since: 0.14.0
315#
316# Notes: @singlestep is enabled through the GDB stub
317##
318{ 'type': 'StatusInfo',
319 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
320
321##
322# @query-status:
323#
324# Query the run status of all VCPUs
325#
326# Returns: @StatusInfo reflecting all VCPUs
327#
328# Since: 0.14.0
329##
330{ 'command': 'query-status', 'returns': 'StatusInfo' }
331
efab767e
LC
332##
333# @UuidInfo:
334#
335# Guest UUID information.
336#
337# @UUID: the UUID of the guest
338#
339# Since: 0.14.0
340#
341# Notes: If no UUID was specified for the guest, a null UUID is returned.
342##
343{ 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
344
345##
346# @query-uuid:
347#
348# Query the guest UUID information.
349#
350# Returns: The @UuidInfo for the guest
351#
352# Since 0.14.0
353##
354{ 'command': 'query-uuid', 'returns': 'UuidInfo' }
355
c5a415a0
LC
356##
357# @ChardevInfo:
358#
359# Information about a character device.
360#
361# @label: the label of the character device
362#
363# @filename: the filename of the character device
364#
365# Notes: @filename is encoded using the QEMU command line character device
366# encoding. See the QEMU man page for details.
367#
368# Since: 0.14.0
369##
370{ 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
371
372##
373# @query-chardev:
374#
375# Returns information about current character devices.
376#
377# Returns: a list of @ChardevInfo
378#
379# Since: 0.14.0
380##
381{ 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
aa9b79bc 382
1f590cf9
LL
383##
384# @DataFormat:
385#
386# An enumeration of data format.
387#
3949e594 388# @utf8: Data is a UTF-8 string (RFC 3629)
1f590cf9 389#
3949e594 390# @base64: Data is Base64 encoded binary (RFC 3548)
1f590cf9
LL
391#
392# Since: 1.4
393##
ad0f171e 394{ 'enum': 'DataFormat',
1f590cf9
LL
395 'data': [ 'utf8', 'base64' ] }
396
397##
3949e594 398# @ringbuf-write:
1f590cf9 399#
3949e594 400# Write to a ring buffer character device.
1f590cf9 401#
3949e594 402# @device: the ring buffer character device name
1f590cf9 403#
3949e594 404# @data: data to write
1f590cf9 405#
3949e594
MA
406# @format: #optional data encoding (default 'utf8').
407# - base64: data must be base64 encoded text. Its binary
408# decoding gets written.
409# Bug: invalid base64 is currently not rejected.
410# Whitespace *is* invalid.
411# - utf8: data's UTF-8 encoding is written
412# - data itself is always Unicode regardless of format, like
413# any other string.
1f590cf9
LL
414#
415# Returns: Nothing on success
1f590cf9
LL
416#
417# Since: 1.4
418##
3949e594 419{ 'command': 'ringbuf-write',
82e59a67 420 'data': {'device': 'str', 'data': 'str',
1f590cf9
LL
421 '*format': 'DataFormat'} }
422
49b6d722 423##
3949e594 424# @ringbuf-read:
49b6d722 425#
3949e594 426# Read from a ring buffer character device.
49b6d722 427#
3949e594 428# @device: the ring buffer character device name
49b6d722 429#
3949e594 430# @size: how many bytes to read at most
49b6d722 431#
3949e594
MA
432# @format: #optional data encoding (default 'utf8').
433# - base64: the data read is returned in base64 encoding.
434# - utf8: the data read is interpreted as UTF-8.
435# Bug: can screw up when the buffer contains invalid UTF-8
436# sequences, NUL characters, after the ring buffer lost
437# data, and when reading stops because the size limit is
438# reached.
439# - The return value is always Unicode regardless of format,
440# like any other string.
49b6d722 441#
3ab651fc 442# Returns: data read from the device
49b6d722
LL
443#
444# Since: 1.4
445##
3949e594 446{ 'command': 'ringbuf-read',
49b6d722 447 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
3ab651fc 448 'returns': 'str' }
49b6d722 449
aa9b79bc
LC
450##
451# @CommandInfo:
452#
453# Information about a QMP command
454#
455# @name: The command name
456#
457# Since: 0.14.0
458##
459{ 'type': 'CommandInfo', 'data': {'name': 'str'} }
460
461##
462# @query-commands:
463#
464# Return a list of supported QMP commands by this server
465#
466# Returns: A list of @CommandInfo for all supported commands
467#
468# Since: 0.14.0
469##
470{ 'command': 'query-commands', 'returns': ['CommandInfo'] }
471
4860853d
DB
472##
473# @EventInfo:
474#
475# Information about a QMP event
476#
477# @name: The event name
478#
479# Since: 1.2.0
480##
481{ 'type': 'EventInfo', 'data': {'name': 'str'} }
482
483##
484# @query-events:
485#
486# Return a list of supported QMP events by this server
487#
488# Returns: A list of @EventInfo for all supported events
489#
490# Since: 1.2.0
491##
492{ 'command': 'query-events', 'returns': ['EventInfo'] }
493
791e7c82
LC
494##
495# @MigrationStats
496#
497# Detailed migration status.
498#
499# @transferred: amount of bytes already transferred to the target VM
500#
501# @remaining: amount of bytes remaining to be transferred to the target VM
502#
503# @total: total amount of bytes involved in the migration process
504#
f1c72795
PL
505# @duplicate: number of duplicate (zero) pages (since 1.2)
506#
507# @skipped: number of skipped zero pages (since 1.5)
004d4c10
OW
508#
509# @normal : number of normal pages (since 1.2)
510#
8d017193
JQ
511# @normal-bytes: number of normal bytes sent (since 1.2)
512#
513# @dirty-pages-rate: number of pages dirtied by second by the
514# guest (since 1.3)
004d4c10 515#
7e114f8c
MH
516# @mbps: throughput in megabits/sec. (since 1.6)
517#
004d4c10 518# Since: 0.14.0
791e7c82
LC
519##
520{ 'type': 'MigrationStats',
d5f8a570 521 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
f1c72795 522 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
7e114f8c
MH
523 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
524 'mbps' : 'number' } }
791e7c82 525
f36d55af
OW
526##
527# @XBZRLECacheStats
528#
529# Detailed XBZRLE migration cache statistics
530#
531# @cache-size: XBZRLE cache size
532#
533# @bytes: amount of bytes already transferred to the target VM
534#
535# @pages: amount of pages transferred to the target VM
536#
537# @cache-miss: number of cache miss
538#
539# @overflow: number of overflows
540#
541# Since: 1.2
542##
543{ 'type': 'XBZRLECacheStats',
544 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
545 'cache-miss': 'int', 'overflow': 'int' } }
546
791e7c82
LC
547##
548# @MigrationInfo
549#
550# Information about current migration process.
551#
552# @status: #optional string describing the current migration status.
553# As of 0.14.0 this can be 'active', 'completed', 'failed' or
554# 'cancelled'. If this field is not returned, no migration process
555# has been initiated
556#
d5f8a570
JQ
557# @ram: #optional @MigrationStats containing detailed migration
558# status, only returned if status is 'active' or
559# 'completed'. 'comppleted' (since 1.2)
791e7c82
LC
560#
561# @disk: #optional @MigrationStats containing detailed disk migration
562# status, only returned if status is 'active' and it is a block
563# migration
564#
f36d55af
OW
565# @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
566# migration statistics, only returned if XBZRLE feature is on and
567# status is 'active' or 'completed' (since 1.2)
568#
7aa939af
JQ
569# @total-time: #optional total amount of milliseconds since migration started.
570# If migration has ended, it returns the total migration
571# time. (since 1.2)
572#
9c5a9fcf
JQ
573# @downtime: #optional only present when migration finishes correctly
574# total downtime in milliseconds for the guest.
575# (since 1.3)
576#
2c52ddf1
JQ
577# @expected-downtime: #optional only present while migration is active
578# expected downtime in milliseconds for the guest in last walk
579# of the dirty bitmap. (since 1.3)
580#
791e7c82
LC
581# Since: 0.14.0
582##
583{ 'type': 'MigrationInfo',
584 'data': {'*status': 'str', '*ram': 'MigrationStats',
f36d55af 585 '*disk': 'MigrationStats',
7aa939af 586 '*xbzrle-cache': 'XBZRLECacheStats',
9c5a9fcf 587 '*total-time': 'int',
2c52ddf1 588 '*expected-downtime': 'int',
9c5a9fcf 589 '*downtime': 'int'} }
791e7c82
LC
590
591##
592# @query-migrate
593#
594# Returns information about current migration process.
595#
596# Returns: @MigrationInfo
597#
598# Since: 0.14.0
599##
600{ 'command': 'query-migrate', 'returns': 'MigrationInfo' }
601
bbf6da32
OW
602##
603# @MigrationCapability
604#
605# Migration capabilities enumeration
606#
607# @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
608# This feature allows us to minimize migration traffic for certain work
609# loads, by sending compressed difference of the pages
610#
60d9222c
MH
611# @x-rdma-pin-all: Controls whether or not the entire VM memory footprint is
612# mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
613# Disabled by default. Experimental: may (or may not) be renamed after
614# further testing is complete. (since 1.6)
615#
323004a3
PL
616# @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
617# essentially saves 1MB of zeroes per block on the wire. Enabling requires
618# source and target VM to support this feature. To enable it is sufficient
619# to enable the capability on the source VM. The feature is disabled by
620# default. (since 1.6)
621#
bbf6da32
OW
622# Since: 1.2
623##
624{ 'enum': 'MigrationCapability',
323004a3 625 'data': ['xbzrle', 'x-rdma-pin-all', 'auto-converge', 'zero-blocks'] }
bbf6da32
OW
626
627##
628# @MigrationCapabilityStatus
629#
630# Migration capability information
631#
632# @capability: capability enum
633#
634# @state: capability state bool
635#
636# Since: 1.2
637##
638{ 'type': 'MigrationCapabilityStatus',
639 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
640
641##
00458433
OW
642# @migrate-set-capabilities
643#
644# Enable/Disable the following migration capabilities (like xbzrle)
645#
646# @capabilities: json array of capability modifications to make
647#
648# Since: 1.2
649##
650{ 'command': 'migrate-set-capabilities',
651 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
652
653##
bbf6da32
OW
654# @query-migrate-capabilities
655#
656# Returns information about the current migration capabilities status
657#
658# Returns: @MigrationCapabilitiesStatus
659#
660# Since: 1.2
661##
662{ 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
663
e235cec3
LC
664##
665# @MouseInfo:
666#
667# Information about a mouse device.
668#
669# @name: the name of the mouse device
670#
671# @index: the index of the mouse device
672#
673# @current: true if this device is currently receiving mouse events
674#
675# @absolute: true if this device supports absolute coordinates as input
676#
677# Since: 0.14.0
678##
679{ 'type': 'MouseInfo',
680 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
681 'absolute': 'bool'} }
682
683##
684# @query-mice:
685#
686# Returns information about each active mouse device
687#
688# Returns: a list of @MouseInfo for each device
689#
690# Since: 0.14.0
691##
692{ 'command': 'query-mice', 'returns': ['MouseInfo'] }
693
de0b36b6
LC
694##
695# @CpuInfo:
696#
697# Information about a virtual CPU
698#
699# @CPU: the index of the virtual CPU
700#
701# @current: this only exists for backwards compatible and should be ignored
b80e560b 702#
de0b36b6
LC
703# @halted: true if the virtual CPU is in the halt state. Halt usually refers
704# to a processor specific low power mode.
705#
706# @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
707# pointer.
708# If the target is Sparc, this is the PC component of the
709# instruction pointer.
710#
711# @nip: #optional If the target is PPC, the instruction pointer
712#
713# @npc: #optional If the target is Sparc, the NPC component of the instruction
714# pointer
715#
716# @PC: #optional If the target is MIPS, the instruction pointer
717#
718# @thread_id: ID of the underlying host thread
719#
720# Since: 0.14.0
721#
722# Notes: @halted is a transient state that changes frequently. By the time the
723# data is sent to the client, the guest may no longer be halted.
724##
725{ 'type': 'CpuInfo',
726 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
727 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
728
729##
730# @query-cpus:
731#
732# Returns a list of information about each virtual CPU.
733#
734# Returns: a list of @CpuInfo for each virtual CPU
735#
736# Since: 0.14.0
737##
738{ 'command': 'query-cpus', 'returns': ['CpuInfo'] }
739
b2023818
LC
740##
741# @BlockDeviceInfo:
742#
743# Information about the backing device for a block device.
744#
745# @file: the filename of the backing device
746#
747# @ro: true if the backing device was open read-only
748#
749# @drv: the name of the block format used to open the backing device. As of
750# 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
751# 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
752# 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
753# 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
754#
755# @backing_file: #optional the name of the backing file (for copy-on-write)
756#
2e3e3317
BC
757# @backing_file_depth: number of files in the backing file chain (since: 1.2)
758#
b2023818
LC
759# @encrypted: true if the backing device is encrypted
760#
c75a1a8a
LC
761# @encryption_key_missing: true if the backing device is encrypted but an
762# valid encryption key is missing
763#
727f005e
ZYW
764# @bps: total throughput limit in bytes per second is specified
765#
766# @bps_rd: read throughput limit in bytes per second is specified
767#
768# @bps_wr: write throughput limit in bytes per second is specified
769#
770# @iops: total I/O operations per second is specified
771#
772# @iops_rd: read I/O operations per second is specified
773#
774# @iops_wr: write I/O operations per second is specified
775#
553a7e87
WX
776# @image: the info of image used (since: 1.6)
777#
b2023818
LC
778# Since: 0.14.0
779#
780# Notes: This interface is only found in @BlockInfo.
781##
782{ 'type': 'BlockDeviceInfo',
783 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
2e3e3317 784 '*backing_file': 'str', 'backing_file_depth': 'int',
c75a1a8a
LC
785 'encrypted': 'bool', 'encryption_key_missing': 'bool',
786 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
553a7e87
WX
787 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
788 'image': 'ImageInfo' } }
b2023818
LC
789
790##
791# @BlockDeviceIoStatus:
792#
793# An enumeration of block device I/O status.
794#
795# @ok: The last I/O operation has succeeded
796#
797# @failed: The last I/O operation has failed
798#
799# @nospace: The last I/O operation has failed due to a no-space condition
800#
801# Since: 1.0
802##
803{ 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
804
b9a9b3a4
PB
805##
806# @BlockDirtyInfo:
807#
808# Block dirty bitmap information.
809#
810# @count: number of dirty bytes according to the dirty bitmap
811#
50717e94
PB
812# @granularity: granularity of the dirty bitmap in bytes (since 1.4)
813#
b9a9b3a4
PB
814# Since: 1.3
815##
816{ 'type': 'BlockDirtyInfo',
50717e94 817 'data': {'count': 'int', 'granularity': 'int'} }
b9a9b3a4 818
b2023818
LC
819##
820# @BlockInfo:
821#
822# Block device information. This structure describes a virtual device and
823# the backing device associated with it.
824#
825# @device: The device name associated with the virtual device.
826#
827# @type: This field is returned only for compatibility reasons, it should
828# not be used (always returns 'unknown')
829#
830# @removable: True if the device supports removable media.
831#
832# @locked: True if the guest has locked this device from having its media
833# removed
834#
835# @tray_open: #optional True if the device has a tray and it is open
836# (only present if removable is true)
837#
b9a9b3a4
PB
838# @dirty: #optional dirty bitmap information (only present if the dirty
839# bitmap is enabled)
840#
b2023818
LC
841# @io-status: #optional @BlockDeviceIoStatus. Only present if the device
842# supports it and the VM is configured to stop on errors
843#
844# @inserted: #optional @BlockDeviceInfo describing the device if media is
845# present
846#
847# Since: 0.14.0
848##
849{ 'type': 'BlockInfo',
850 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
851 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
b9a9b3a4
PB
852 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
853 '*dirty': 'BlockDirtyInfo' } }
b2023818
LC
854
855##
856# @query-block:
857#
858# Get a list of BlockInfo for all virtual block devices.
859#
860# Returns: a list of @BlockInfo describing each virtual block device
861#
862# Since: 0.14.0
863##
864{ 'command': 'query-block', 'returns': ['BlockInfo'] }
865
f11f57e4
LC
866##
867# @BlockDeviceStats:
868#
869# Statistics of a virtual block device or a block backing device.
870#
871# @rd_bytes: The number of bytes read by the device.
872#
873# @wr_bytes: The number of bytes written by the device.
874#
875# @rd_operations: The number of read operations performed by the device.
876#
877# @wr_operations: The number of write operations performed by the device.
878#
879# @flush_operations: The number of cache flush operations performed by the
880# device (since 0.15.0)
881#
882# @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
883# (since 0.15.0).
884#
885# @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
886#
887# @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
888#
889# @wr_highest_offset: The offset after the greatest byte written to the
890# device. The intended use of this information is for
891# growable sparse files (like qcow2) that are used on top
892# of a physical device.
893#
894# Since: 0.14.0
895##
896{ 'type': 'BlockDeviceStats',
897 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
898 'wr_operations': 'int', 'flush_operations': 'int',
899 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
900 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
901
902##
903# @BlockStats:
904#
905# Statistics of a virtual block device or a block backing device.
906#
907# @device: #optional If the stats are for a virtual block device, the name
908# corresponding to the virtual block device.
909#
910# @stats: A @BlockDeviceStats for the device.
911#
912# @parent: #optional This may point to the backing block device if this is a
913# a virtual block device. If it's a backing block, this will point
914# to the backing file is one is present.
915#
916# Since: 0.14.0
917##
918{ 'type': 'BlockStats',
919 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
920 '*parent': 'BlockStats'} }
921
922##
923# @query-blockstats:
924#
925# Query the @BlockStats for all virtual block devices.
926#
927# Returns: A list of @BlockStats for each virtual block devices.
928#
929# Since: 0.14.0
930##
931{ 'command': 'query-blockstats', 'returns': ['BlockStats'] }
932
2b54aa87
LC
933##
934# @VncClientInfo:
935#
936# Information about a connected VNC client.
937#
938# @host: The host name of the client. QEMU tries to resolve this to a DNS name
939# when possible.
940#
941# @family: 'ipv6' if the client is connected via IPv6 and TCP
942# 'ipv4' if the client is connected via IPv4 and TCP
943# 'unix' if the client is connected via a unix domain socket
944# 'unknown' otherwise
945#
946# @service: The service name of the client's port. This may depends on the
947# host system's service database so symbolic names should not be
948# relied on.
949#
950# @x509_dname: #optional If x509 authentication is in use, the Distinguished
951# Name of the client.
952#
953# @sasl_username: #optional If SASL authentication is in use, the SASL username
954# used for authentication.
955#
956# Since: 0.14.0
957##
958{ 'type': 'VncClientInfo',
959 'data': {'host': 'str', 'family': 'str', 'service': 'str',
960 '*x509_dname': 'str', '*sasl_username': 'str'} }
961
962##
963# @VncInfo:
964#
965# Information about the VNC session.
966#
967# @enabled: true if the VNC server is enabled, false otherwise
968#
969# @host: #optional The hostname the VNC server is bound to. This depends on
970# the name resolution on the host and may be an IP address.
971#
972# @family: #optional 'ipv6' if the host is listening for IPv6 connections
973# 'ipv4' if the host is listening for IPv4 connections
974# 'unix' if the host is listening on a unix domain socket
975# 'unknown' otherwise
976#
977# @service: #optional The service name of the server's port. This may depends
978# on the host system's service database so symbolic names should not
979# be relied on.
980#
981# @auth: #optional the current authentication type used by the server
982# 'none' if no authentication is being used
983# 'vnc' if VNC authentication is being used
984# 'vencrypt+plain' if VEncrypt is used with plain text authentication
985# 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
986# 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
987# 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
988# 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
989# 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
990# 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
991# 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
992# 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
993#
994# @clients: a list of @VncClientInfo of all currently connected clients
995#
996# Since: 0.14.0
997##
998{ 'type': 'VncInfo',
999 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
1000 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1001
1002##
1003# @query-vnc:
1004#
1005# Returns information about the current VNC server
1006#
1007# Returns: @VncInfo
2b54aa87
LC
1008#
1009# Since: 0.14.0
1010##
1011{ 'command': 'query-vnc', 'returns': 'VncInfo' }
1012
d1f29646
LC
1013##
1014# @SpiceChannel
1015#
1016# Information about a SPICE client channel.
1017#
1018# @host: The host name of the client. QEMU tries to resolve this to a DNS name
1019# when possible.
1020#
1021# @family: 'ipv6' if the client is connected via IPv6 and TCP
1022# 'ipv4' if the client is connected via IPv4 and TCP
1023# 'unix' if the client is connected via a unix domain socket
1024# 'unknown' otherwise
1025#
1026# @port: The client's port number.
1027#
1028# @connection-id: SPICE connection id number. All channels with the same id
1029# belong to the same SPICE session.
1030#
419e1bdf
AL
1031# @connection-type: SPICE channel type number. "1" is the main control
1032# channel, filter for this one if you want to track spice
1033# sessions only
d1f29646 1034#
419e1bdf
AL
1035# @channel-id: SPICE channel ID number. Usually "0", might be different when
1036# multiple channels of the same type exist, such as multiple
d1f29646
LC
1037# display channels in a multihead setup
1038#
1039# @tls: true if the channel is encrypted, false otherwise.
1040#
1041# Since: 0.14.0
1042##
1043{ 'type': 'SpiceChannel',
1044 'data': {'host': 'str', 'family': 'str', 'port': 'str',
1045 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1046 'tls': 'bool'} }
1047
4efee029
AL
1048##
1049# @SpiceQueryMouseMode
1050#
6932a69b 1051# An enumeration of Spice mouse states.
4efee029
AL
1052#
1053# @client: Mouse cursor position is determined by the client.
1054#
1055# @server: Mouse cursor position is determined by the server.
1056#
1057# @unknown: No information is available about mouse mode used by
1058# the spice server.
1059#
1060# Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1061#
1062# Since: 1.1
1063##
1064{ 'enum': 'SpiceQueryMouseMode',
1065 'data': [ 'client', 'server', 'unknown' ] }
1066
d1f29646
LC
1067##
1068# @SpiceInfo
1069#
1070# Information about the SPICE session.
b80e560b 1071#
d1f29646
LC
1072# @enabled: true if the SPICE server is enabled, false otherwise
1073#
61c4efe2
YH
1074# @migrated: true if the last guest migration completed and spice
1075# migration had completed as well. false otherwise.
1076#
d1f29646
LC
1077# @host: #optional The hostname the SPICE server is bound to. This depends on
1078# the name resolution on the host and may be an IP address.
1079#
1080# @port: #optional The SPICE server's port number.
1081#
1082# @compiled-version: #optional SPICE server version.
1083#
1084# @tls-port: #optional The SPICE server's TLS port number.
1085#
1086# @auth: #optional the current authentication type used by the server
419e1bdf
AL
1087# 'none' if no authentication is being used
1088# 'spice' uses SASL or direct TLS authentication, depending on command
1089# line options
d1f29646 1090#
4efee029
AL
1091# @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1092# be determined by the client or the server, or unknown if spice
1093# server doesn't provide this information.
1094#
1095# Since: 1.1
1096#
d1f29646
LC
1097# @channels: a list of @SpiceChannel for each active spice channel
1098#
1099# Since: 0.14.0
1100##
1101{ 'type': 'SpiceInfo',
61c4efe2 1102 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
d1f29646 1103 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
4efee029 1104 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
d1f29646
LC
1105
1106##
1107# @query-spice
1108#
1109# Returns information about the current SPICE server
1110#
1111# Returns: @SpiceInfo
1112#
1113# Since: 0.14.0
1114##
1115{ 'command': 'query-spice', 'returns': 'SpiceInfo' }
1116
96637bcd
LC
1117##
1118# @BalloonInfo:
1119#
1120# Information about the guest balloon device.
1121#
1122# @actual: the number of bytes the balloon currently contains
1123#
96637bcd
LC
1124# Since: 0.14.0
1125#
96637bcd 1126##
01ceb97e 1127{ 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
96637bcd
LC
1128
1129##
1130# @query-balloon:
1131#
1132# Return information about the balloon device.
1133#
1134# Returns: @BalloonInfo on success
1135# If the balloon driver is enabled but not functional because the KVM
1136# kernel module cannot support it, KvmMissingCap
1137# If no balloon device is present, DeviceNotActive
1138#
1139# Since: 0.14.0
1140##
1141{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1142
79627472
LC
1143##
1144# @PciMemoryRange:
1145#
1146# A PCI device memory region
1147#
1148# @base: the starting address (guest physical)
1149#
1150# @limit: the ending address (guest physical)
1151#
1152# Since: 0.14.0
1153##
1154{ 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1155
1156##
1157# @PciMemoryRegion
1158#
1159# Information about a PCI device I/O region.
1160#
1161# @bar: the index of the Base Address Register for this region
1162#
1163# @type: 'io' if the region is a PIO region
1164# 'memory' if the region is a MMIO region
1165#
1166# @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1167#
1168# @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1169#
1170# Since: 0.14.0
1171##
1172{ 'type': 'PciMemoryRegion',
1173 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1174 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1175
1176##
1177# @PciBridgeInfo:
1178#
1179# Information about a PCI Bridge device
1180#
1181# @bus.number: primary bus interface number. This should be the number of the
1182# bus the device resides on.
1183#
1184# @bus.secondary: secondary bus interface number. This is the number of the
1185# main bus for the bridge
1186#
1187# @bus.subordinate: This is the highest number bus that resides below the
1188# bridge.
1189#
1190# @bus.io_range: The PIO range for all devices on this bridge
1191#
1192# @bus.memory_range: The MMIO range for all devices on this bridge
1193#
1194# @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1195# this bridge
1196#
1197# @devices: a list of @PciDeviceInfo for each device on this bridge
1198#
1199# Since: 0.14.0
1200##
1201{ 'type': 'PciBridgeInfo',
1202 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1203 'io_range': 'PciMemoryRange',
1204 'memory_range': 'PciMemoryRange',
1205 'prefetchable_range': 'PciMemoryRange' },
1206 '*devices': ['PciDeviceInfo']} }
1207
1208##
1209# @PciDeviceInfo:
1210#
1211# Information about a PCI device
1212#
1213# @bus: the bus number of the device
1214#
1215# @slot: the slot the device is located in
1216#
1217# @function: the function of the slot used by the device
1218#
1219# @class_info.desc: #optional a string description of the device's class
1220#
1221# @class_info.class: the class code of the device
1222#
1223# @id.device: the PCI device id
1224#
1225# @id.vendor: the PCI vendor id
1226#
1227# @irq: #optional if an IRQ is assigned to the device, the IRQ number
1228#
1229# @qdev_id: the device name of the PCI device
1230#
1231# @pci_bridge: if the device is a PCI bridge, the bridge information
1232#
1233# @regions: a list of the PCI I/O regions associated with the device
1234#
1235# Notes: the contents of @class_info.desc are not stable and should only be
1236# treated as informational.
1237#
1238# Since: 0.14.0
1239##
1240{ 'type': 'PciDeviceInfo',
1241 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1242 'class_info': {'*desc': 'str', 'class': 'int'},
1243 'id': {'device': 'int', 'vendor': 'int'},
1244 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1245 'regions': ['PciMemoryRegion']} }
1246
1247##
1248# @PciInfo:
1249#
1250# Information about a PCI bus
1251#
1252# @bus: the bus index
1253#
1254# @devices: a list of devices on this bus
1255#
1256# Since: 0.14.0
1257##
1258{ 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1259
1260##
1261# @query-pci:
1262#
1263# Return information about the PCI bus topology of the guest.
1264#
1265# Returns: a list of @PciInfo for each PCI bus
1266#
1267# Since: 0.14.0
1268##
1269{ 'command': 'query-pci', 'returns': ['PciInfo'] }
1270
92aa5c6d
PB
1271##
1272# @BlockdevOnError:
1273#
1274# An enumeration of possible behaviors for errors on I/O operations.
1275# The exact meaning depends on whether the I/O was initiated by a guest
1276# or by a block job
1277#
1278# @report: for guest operations, report the error to the guest;
1279# for jobs, cancel the job
1280#
1281# @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1282# or BLOCK_JOB_ERROR)
1283#
1284# @enospc: same as @stop on ENOSPC, same as @report otherwise.
1285#
1286# @stop: for guest operations, stop the virtual machine;
1287# for jobs, pause the job
1288#
1289# Since: 1.3
1290##
1291{ 'enum': 'BlockdevOnError',
1292 'data': ['report', 'ignore', 'enospc', 'stop'] }
1293
893f7eba
PB
1294##
1295# @MirrorSyncMode:
1296#
1297# An enumeration of possible behaviors for the initial synchronization
1298# phase of storage mirroring.
1299#
1300# @top: copies data in the topmost image to the destination
1301#
1302# @full: copies data from all images to the destination
1303#
1304# @none: only copy data written from now on
1305#
1306# Since: 1.3
1307##
1308{ 'enum': 'MirrorSyncMode',
1309 'data': ['top', 'full', 'none'] }
1310
fb5458cd
SH
1311##
1312# @BlockJobInfo:
1313#
1314# Information about a long-running block device operation.
1315#
1316# @type: the job type ('stream' for image streaming)
1317#
1318# @device: the block device name
1319#
1320# @len: the maximum progress value
1321#
8d65883f
PB
1322# @busy: false if the job is known to be in a quiescent state, with
1323# no pending I/O. Since 1.3.
1324#
8acc72a4
PB
1325# @paused: whether the job is paused or, if @busy is true, will
1326# pause itself as soon as possible. Since 1.3.
1327#
fb5458cd
SH
1328# @offset: the current progress value
1329#
1330# @speed: the rate limit, bytes per second
1331#
32c81a4a
PB
1332# @io-status: the status of the job (since 1.3)
1333#
fb5458cd
SH
1334# Since: 1.1
1335##
1336{ 'type': 'BlockJobInfo',
1337 'data': {'type': 'str', 'device': 'str', 'len': 'int',
32c81a4a
PB
1338 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1339 'io-status': 'BlockDeviceIoStatus'} }
fb5458cd
SH
1340
1341##
1342# @query-block-jobs:
1343#
1344# Return information about long-running block device operations.
1345#
1346# Returns: a list of @BlockJobInfo for each active block job
1347#
1348# Since: 1.1
1349##
1350{ 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1351
7a7f325e
LC
1352##
1353# @quit:
1354#
1355# This command will cause the QEMU process to exit gracefully. While every
1356# attempt is made to send the QMP response before terminating, this is not
1357# guaranteed. When using this interface, a premature EOF would not be
1358# unexpected.
1359#
1360# Since: 0.14.0
1361##
1362{ 'command': 'quit' }
5f158f21
LC
1363
1364##
1365# @stop:
1366#
1367# Stop all guest VCPU execution.
1368#
1369# Since: 0.14.0
1370#
1371# Notes: This function will succeed even if the guest is already in the stopped
1e998146
PB
1372# state. In "inmigrate" state, it will ensure that the guest
1373# remains paused once migration finishes, as if the -S option was
1374# passed on the command line.
5f158f21
LC
1375##
1376{ 'command': 'stop' }
38d22653
LC
1377
1378##
1379# @system_reset:
1380#
1381# Performs a hard reset of a guest.
1382#
1383# Since: 0.14.0
1384##
1385{ 'command': 'system_reset' }
5bc465e4
LC
1386
1387##
1388# @system_powerdown:
1389#
1390# Requests that a guest perform a powerdown operation.
1391#
1392# Since: 0.14.0
1393#
1394# Notes: A guest may or may not respond to this command. This command
1395# returning does not indicate that a guest has accepted the request or
1396# that it has shut down. Many guests will respond to this command by
1397# prompting the user in some way.
1398##
1399{ 'command': 'system_powerdown' }
755f1968
LC
1400
1401##
1402# @cpu:
1403#
1404# This command is a nop that is only provided for the purposes of compatibility.
1405#
1406# Since: 0.14.0
1407#
1408# Notes: Do not use this command.
1409##
1410{ 'command': 'cpu', 'data': {'index': 'int'} }
0cfd6a9a 1411
69ca3ea5
IM
1412##
1413# @cpu-add
1414#
1415# Adds CPU with specified ID
1416#
1417# @id: ID of CPU to be created, valid values [0..max_cpus)
1418#
1419# Returns: Nothing on success
1420#
1421# Since 1.5
1422##
1423{ 'command': 'cpu-add', 'data': {'id': 'int'} }
1424
0cfd6a9a
LC
1425##
1426# @memsave:
1427#
1428# Save a portion of guest memory to a file.
1429#
1430# @val: the virtual address of the guest to start from
1431#
1432# @size: the size of memory region to save
1433#
1434# @filename: the file to save the memory to as binary data
1435#
1436# @cpu-index: #optional the index of the virtual CPU to use for translating the
1437# virtual address (defaults to CPU 0)
1438#
1439# Returns: Nothing on success
0cfd6a9a
LC
1440#
1441# Since: 0.14.0
1442#
1443# Notes: Errors were not reliably returned until 1.1
1444##
1445{ 'command': 'memsave',
1446 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
6d3962bf
LC
1447
1448##
1449# @pmemsave:
1450#
1451# Save a portion of guest physical memory to a file.
1452#
1453# @val: the physical address of the guest to start from
1454#
1455# @size: the size of memory region to save
1456#
1457# @filename: the file to save the memory to as binary data
1458#
1459# Returns: Nothing on success
6d3962bf
LC
1460#
1461# Since: 0.14.0
1462#
1463# Notes: Errors were not reliably returned until 1.1
1464##
1465{ 'command': 'pmemsave',
1466 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
e42e818b
LC
1467
1468##
1469# @cont:
1470#
1471# Resume guest VCPU execution.
1472#
1473# Since: 0.14.0
1474#
1475# Returns: If successful, nothing
e42e818b
LC
1476# If QEMU was started with an encrypted block device and a key has
1477# not yet been set, DeviceEncrypted.
1478#
1e998146
PB
1479# Notes: This command will succeed if the guest is currently running. It
1480# will also succeed if the guest is in the "inmigrate" state; in
1481# this case, the effect of the command is to make sure the guest
1482# starts once migration finishes, removing the effect of the -S
1483# command line option if it was passed.
e42e818b
LC
1484##
1485{ 'command': 'cont' }
1486
9b9df25a
GH
1487##
1488# @system_wakeup:
1489#
1490# Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1491#
1492# Since: 1.1
1493#
1494# Returns: nothing.
1495##
1496{ 'command': 'system_wakeup' }
1497
ab49ab5c
LC
1498##
1499# @inject-nmi:
1500#
1501# Injects an Non-Maskable Interrupt into all guest's VCPUs.
1502#
1503# Returns: If successful, nothing
ab49ab5c
LC
1504#
1505# Since: 0.14.0
1506#
1507# Notes: Only x86 Virtual Machines support this command.
1508##
1509{ 'command': 'inject-nmi' }
4b37156c
LC
1510
1511##
1512# @set_link:
1513#
1514# Sets the link status of a virtual network adapter.
1515#
1516# @name: the device name of the virtual network adapter
1517#
1518# @up: true to set the link status to be up
1519#
1520# Returns: Nothing on success
1521# If @name is not a valid network device, DeviceNotFound
1522#
1523# Since: 0.14.0
1524#
1525# Notes: Not all network adapters support setting link status. This command
1526# will succeed even if the network adapter does not support link status
1527# notification.
1528##
1529{ 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
a4dea8a9
LC
1530
1531##
1532# @block_passwd:
1533#
1534# This command sets the password of a block device that has not been open
1535# with a password and requires one.
1536#
1537# The two cases where this can happen are a block device is created through
1538# QEMU's initial command line or a block device is changed through the legacy
1539# @change interface.
1540#
1541# In the event that the block device is created through the initial command
1542# line, the VM will start in the stopped state regardless of whether '-S' is
1543# used. The intention is for a management tool to query the block devices to
1544# determine which ones are encrypted, set the passwords with this command, and
1545# then start the guest with the @cont command.
1546#
1547# @device: the name of the device to set the password on
1548#
1549# @password: the password to use for the device
1550#
1551# Returns: nothing on success
1552# If @device is not a valid block device, DeviceNotFound
1553# If @device is not encrypted, DeviceNotEncrypted
a4dea8a9
LC
1554#
1555# Notes: Not all block formats support encryption and some that do are not
1556# able to validate that a password is correct. Disk corruption may
1557# occur if an invalid password is specified.
1558#
1559# Since: 0.14.0
1560##
1561{ 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
d72f3264
LC
1562
1563##
1564# @balloon:
1565#
1566# Request the balloon driver to change its balloon size.
1567#
1568# @value: the target size of the balloon in bytes
1569#
1570# Returns: Nothing on success
1571# If the balloon driver is enabled but not functional because the KVM
1572# kernel module cannot support it, KvmMissingCap
1573# If no balloon device is present, DeviceNotActive
1574#
1575# Notes: This command just issues a request to the guest. When it returns,
1576# the balloon size may not have changed. A guest can change the balloon
1577# size independent of this command.
1578#
1579# Since: 0.14.0
1580##
1581{ 'command': 'balloon', 'data': {'value': 'int'} }
5e7caacb
LC
1582
1583##
1584# @block_resize
1585#
1586# Resize a block image while a guest is running.
1587#
1588# @device: the name of the device to get the image resized
1589#
1590# @size: new image size in bytes
1591#
1592# Returns: nothing on success
1593# If @device is not a valid block device, DeviceNotFound
5e7caacb
LC
1594#
1595# Since: 0.14.0
1596##
1597{ 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
6106e249 1598
8802d1fd 1599##
bc8b094f
PB
1600# @NewImageMode
1601#
1602# An enumeration that tells QEMU how to set the backing file path in
1603# a new image file.
1604#
1605# @existing: QEMU should look for an existing image file.
1606#
1607# @absolute-paths: QEMU should create a new image with absolute paths
1608# for the backing file.
1609#
1610# Since: 1.1
1611##
ad0f171e 1612{ 'enum': 'NewImageMode',
bc8b094f
PB
1613 'data': [ 'existing', 'absolute-paths' ] }
1614
8802d1fd 1615##
52e7c241 1616# @BlockdevSnapshot
8802d1fd
JC
1617#
1618# @device: the name of the device to generate the snapshot from.
1619#
1620# @snapshot-file: the target of the new image. A new file will be created.
1621#
1622# @format: #optional the format of the snapshot image, default is 'qcow2'.
6cc2a415
PB
1623#
1624# @mode: #optional whether and how QEMU should create a new image, default is
8bde9b6f 1625# 'absolute-paths'.
8802d1fd 1626##
52e7c241 1627{ 'type': 'BlockdevSnapshot',
bc8b094f
PB
1628 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1629 '*mode': 'NewImageMode' } }
8802d1fd 1630
3037f364
SH
1631##
1632# @DriveBackup
1633#
1634# @device: the name of the device which should be copied.
1635#
1636# @target: the target of the new image. If the file exists, or if it
1637# is a device, the existing file/device will be used as the new
1638# destination. If it does not exist, a new file will be created.
1639#
1640# @format: #optional the format of the new destination, default is to
1641# probe if @mode is 'existing', else the format of the source
1642#
b53169ea
SH
1643# @sync: what parts of the disk image should be copied to the destination
1644# (all the disk, only the sectors allocated in the topmost image, or
1645# only new I/O).
1646#
3037f364
SH
1647# @mode: #optional whether and how QEMU should create a new image, default is
1648# 'absolute-paths'.
1649#
1650# @speed: #optional the maximum speed, in bytes per second
1651#
1652# @on-source-error: #optional the action to take on an error on the source,
1653# default 'report'. 'stop' and 'enospc' can only be used
1654# if the block device supports io-status (see BlockInfo).
1655#
1656# @on-target-error: #optional the action to take on an error on the target,
1657# default 'report' (no limitations, since this applies to
1658# a different block device than @device).
1659#
1660# Note that @on-source-error and @on-target-error only affect background I/O.
1661# If an error occurs during a guest write request, the device's rerror/werror
1662# actions will be used.
1663#
1664# Since: 1.6
1665##
1666{ 'type': 'DriveBackup',
1667 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
b53169ea
SH
1668 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
1669 '*speed': 'int',
3037f364
SH
1670 '*on-source-error': 'BlockdevOnError',
1671 '*on-target-error': 'BlockdevOnError' } }
1672
78b18b78
SH
1673##
1674# @Abort
1675#
1676# This action can be used to test transaction failure.
1677#
1678# Since: 1.6
1679###
1680{ 'type': 'Abort',
1681 'data': { } }
1682
8802d1fd 1683##
c8a83e85 1684# @TransactionAction
8802d1fd 1685#
52e7c241
PB
1686# A discriminated record of operations that can be performed with
1687# @transaction.
8802d1fd 1688##
c8a83e85 1689{ 'union': 'TransactionAction',
52e7c241 1690 'data': {
3037f364 1691 'blockdev-snapshot-sync': 'BlockdevSnapshot',
78b18b78
SH
1692 'drive-backup': 'DriveBackup',
1693 'abort': 'Abort'
52e7c241 1694 } }
8802d1fd
JC
1695
1696##
52e7c241 1697# @transaction
8802d1fd 1698#
c8a83e85
KW
1699# Executes a number of transactionable QMP commands atomically. If any
1700# operation fails, then the entire set of actions will be abandoned and the
1701# appropriate error returned.
8802d1fd
JC
1702#
1703# List of:
c8a83e85 1704# @TransactionAction: information needed for the respective operation
8802d1fd
JC
1705#
1706# Returns: nothing on success
c8a83e85 1707# Errors depend on the operations of the transaction
8802d1fd 1708#
c8a83e85
KW
1709# Note: The transaction aborts on the first failure. Therefore, there will be
1710# information on only one failed operation returned in an error condition, and
52e7c241
PB
1711# subsequent actions will not have been attempted.
1712#
1713# Since 1.1
8802d1fd 1714##
52e7c241 1715{ 'command': 'transaction',
c8a83e85 1716 'data': { 'actions': [ 'TransactionAction' ] } }
8802d1fd 1717
6106e249
LC
1718##
1719# @blockdev-snapshot-sync
1720#
1721# Generates a synchronous snapshot of a block device.
1722#
852ad1a9 1723# For the arguments, see the documentation of BlockdevSnapshot.
6cc2a415 1724#
6106e249
LC
1725# Returns: nothing on success
1726# If @device is not a valid block device, DeviceNotFound
6106e249 1727#
6106e249
LC
1728# Since 0.14.0
1729##
1730{ 'command': 'blockdev-snapshot-sync',
852ad1a9 1731 'data': 'BlockdevSnapshot' }
d51a67b4
LC
1732
1733##
1734# @human-monitor-command:
1735#
1736# Execute a command on the human monitor and return the output.
1737#
1738# @command-line: the command to execute in the human monitor
1739#
1740# @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1741#
1742# Returns: the output of the command as a string
1743#
1744# Since: 0.14.0
1745#
1746# Notes: This command only exists as a stop-gap. It's use is highly
1747# discouraged. The semantics of this command are not guaranteed.
1748#
1749# Known limitations:
1750#
1751# o This command is stateless, this means that commands that depend
1752# on state information (such as getfd) might not work
1753#
1754# o Commands that prompt the user for data (eg. 'cont' when the block
1755# device is encrypted) don't currently work
1756##
1757{ 'command': 'human-monitor-command',
1758 'data': {'command-line': 'str', '*cpu-index': 'int'},
b80e560b 1759 'returns': 'str' }
6cdedb07
LC
1760
1761##
ed61fc10
JC
1762# @block-commit
1763#
1764# Live commit of data from overlay image nodes into backing nodes - i.e.,
1765# writes data between 'top' and 'base' into 'base'.
1766#
1767# @device: the name of the device
1768#
1769# @base: #optional The file name of the backing image to write data into.
1770# If not specified, this is the deepest backing image
1771#
1772# @top: The file name of the backing image within the image chain,
1773# which contains the topmost data to be committed down.
1774# Note, the active layer as 'top' is currently unsupported.
1775#
1776# If top == base, that is an error.
1777#
1778#
1779# @speed: #optional the maximum speed, in bytes per second
1780#
1781# Returns: Nothing on success
1782# If commit or stream is already active on this device, DeviceInUse
1783# If @device does not exist, DeviceNotFound
1784# If image commit is not supported by this device, NotSupported
1785# If @base or @top is invalid, a generic error is returned
1786# If @top is the active layer, or omitted, a generic error is returned
1787# If @speed is invalid, InvalidParameter
1788#
1789# Since: 1.3
1790#
1791##
1792{ 'command': 'block-commit',
1793 'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1794 '*speed': 'int' } }
1795
99a9addf
SH
1796##
1797# @drive-backup
1798#
1799# Start a point-in-time copy of a block device to a new destination. The
1800# status of ongoing drive-backup operations can be checked with
1801# query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
1802# The operation can be stopped before it has completed using the
1803# block-job-cancel command.
1804#
f53cae50 1805# For the arguments, see the documentation of DriveBackup.
99a9addf
SH
1806#
1807# Returns: nothing on success
1808# If @device is not a valid block device, DeviceNotFound
1809#
1810# Since 1.6
1811##
f53cae50 1812{ 'command': 'drive-backup', 'data': 'DriveBackup' }
99a9addf 1813
d9b902db
PB
1814##
1815# @drive-mirror
1816#
1817# Start mirroring a block device's writes to a new destination.
1818#
1819# @device: the name of the device whose writes should be mirrored.
1820#
1821# @target: the target of the new image. If the file exists, or if it
1822# is a device, the existing file/device will be used as the new
1823# destination. If it does not exist, a new file will be created.
1824#
1825# @format: #optional the format of the new destination, default is to
1826# probe if @mode is 'existing', else the format of the source
1827#
1828# @mode: #optional whether and how QEMU should create a new image, default is
1829# 'absolute-paths'.
1830#
1831# @speed: #optional the maximum speed, in bytes per second
1832#
1833# @sync: what parts of the disk image should be copied to the destination
1834# (all the disk, only the sectors allocated in the topmost image, or
1835# only new I/O).
1836#
eee13dfe
PB
1837# @granularity: #optional granularity of the dirty bitmap, default is 64K
1838# if the image format doesn't have clusters, 4K if the clusters
1839# are smaller than that, else the cluster size. Must be a
1840# power of 2 between 512 and 64M (since 1.4).
1841#
08e4ed6c
PB
1842# @buf-size: #optional maximum amount of data in flight from source to
1843# target (since 1.4).
1844#
b952b558
PB
1845# @on-source-error: #optional the action to take on an error on the source,
1846# default 'report'. 'stop' and 'enospc' can only be used
1847# if the block device supports io-status (see BlockInfo).
1848#
1849# @on-target-error: #optional the action to take on an error on the target,
1850# default 'report' (no limitations, since this applies to
1851# a different block device than @device).
1852#
d9b902db
PB
1853# Returns: nothing on success
1854# If @device is not a valid block device, DeviceNotFound
1855#
1856# Since 1.3
1857##
1858{ 'command': 'drive-mirror',
1859 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1860 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
eee13dfe 1861 '*speed': 'int', '*granularity': 'uint32',
08e4ed6c 1862 '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
b952b558 1863 '*on-target-error': 'BlockdevOnError' } }
d9b902db
PB
1864
1865##
6cdedb07
LC
1866# @migrate_cancel
1867#
1868# Cancel the current executing migration process.
1869#
1870# Returns: nothing on success
1871#
1872# Notes: This command succeeds even if there is no migration process running.
1873#
1874# Since: 0.14.0
1875##
1876{ 'command': 'migrate_cancel' }
4f0a993b
LC
1877
1878##
1879# @migrate_set_downtime
1880#
1881# Set maximum tolerated downtime for migration.
1882#
1883# @value: maximum downtime in seconds
1884#
1885# Returns: nothing on success
1886#
1887# Since: 0.14.0
1888##
1889{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
3dc85383
LC
1890
1891##
1892# @migrate_set_speed
1893#
1894# Set maximum speed for migration.
1895#
1896# @value: maximum speed in bytes.
1897#
1898# Returns: nothing on success
1899#
1900# Notes: A value lesser than zero will be automatically round up to zero.
1901#
1902# Since: 0.14.0
1903##
1904{ 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
b4b12c62 1905
9e1ba4cc
OW
1906##
1907# @migrate-set-cache-size
1908#
1909# Set XBZRLE cache size
1910#
1911# @value: cache size in bytes
1912#
1913# The size will be rounded down to the nearest power of 2.
1914# The cache size can be modified before and during ongoing migration
1915#
1916# Returns: nothing on success
1917#
1918# Since: 1.2
1919##
1920{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1921
1922##
1923# @query-migrate-cache-size
1924#
1925# query XBZRLE cache size
1926#
1927# Returns: XBZRLE cache size in bytes
1928#
1929# Since: 1.2
1930##
1931{ 'command': 'query-migrate-cache-size', 'returns': 'int' }
1932
b4b12c62 1933##
d03ee401 1934# @ObjectPropertyInfo:
b4b12c62
AL
1935#
1936# @name: the name of the property
1937#
1938# @type: the type of the property. This will typically come in one of four
1939# forms:
1940#
1941# 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1942# These types are mapped to the appropriate JSON type.
1943#
1944# 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1945# legacy qdev typename. These types are always treated as strings.
1946#
1947# 3) A child type in the form 'child<subtype>' where subtype is a qdev
1948# device type name. Child properties create the composition tree.
1949#
1950# 4) A link type in the form 'link<subtype>' where subtype is a qdev
1951# device type name. Link properties form the device model graph.
1952#
51920820 1953# Since: 1.2
b4b12c62 1954##
57c9fafe 1955{ 'type': 'ObjectPropertyInfo',
b4b12c62
AL
1956 'data': { 'name': 'str', 'type': 'str' } }
1957
1958##
1959# @qom-list:
1960#
57c9fafe 1961# This command will list any properties of a object given a path in the object
b4b12c62
AL
1962# model.
1963#
57c9fafe 1964# @path: the path within the object model. See @qom-get for a description of
b4b12c62
AL
1965# this parameter.
1966#
57c9fafe
AL
1967# Returns: a list of @ObjectPropertyInfo that describe the properties of the
1968# object.
b4b12c62 1969#
51920820 1970# Since: 1.2
b4b12c62
AL
1971##
1972{ 'command': 'qom-list',
1973 'data': { 'path': 'str' },
57c9fafe 1974 'returns': [ 'ObjectPropertyInfo' ] }
eb6e8ea5
AL
1975
1976##
1977# @qom-get:
1978#
57c9fafe 1979# This command will get a property from a object model path and return the
eb6e8ea5
AL
1980# value.
1981#
57c9fafe 1982# @path: The path within the object model. There are two forms of supported
eb6e8ea5
AL
1983# paths--absolute and partial paths.
1984#
57c9fafe 1985# Absolute paths are derived from the root object and can follow child<>
eb6e8ea5
AL
1986# or link<> properties. Since they can follow link<> properties, they
1987# can be arbitrarily long. Absolute paths look like absolute filenames
1988# and are prefixed with a leading slash.
1989#
1990# Partial paths look like relative filenames. They do not begin
1991# with a prefix. The matching rules for partial paths are subtle but
57c9fafe 1992# designed to make specifying objects easy. At each level of the
eb6e8ea5
AL
1993# composition tree, the partial path is matched as an absolute path.
1994# The first match is not returned. At least two matches are searched
1995# for. A successful result is only returned if only one match is
1996# found. If more than one match is found, a flag is return to
1997# indicate that the match was ambiguous.
1998#
1999# @property: The property name to read
2000#
2001# Returns: The property value. The type depends on the property type. legacy<>
2002# properties are returned as #str. child<> and link<> properties are
2003# returns as #str pathnames. All integer property types (u8, u16, etc)
2004# are returned as #int.
2005#
51920820 2006# Since: 1.2
eb6e8ea5
AL
2007##
2008{ 'command': 'qom-get',
2009 'data': { 'path': 'str', 'property': 'str' },
2010 'returns': 'visitor',
2011 'gen': 'no' }
2012
2013##
2014# @qom-set:
2015#
57c9fafe 2016# This command will set a property from a object model path.
eb6e8ea5
AL
2017#
2018# @path: see @qom-get for a description of this parameter
2019#
2020# @property: the property name to set
2021#
2022# @value: a value who's type is appropriate for the property type. See @qom-get
2023# for a description of type mapping.
2024#
51920820 2025# Since: 1.2
eb6e8ea5
AL
2026##
2027{ 'command': 'qom-set',
2028 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
2029 'gen': 'no' }
fbf796fd
LC
2030
2031##
2032# @set_password:
2033#
2034# Sets the password of a remote display session.
2035#
2036# @protocol: `vnc' to modify the VNC server password
2037# `spice' to modify the Spice server password
2038#
2039# @password: the new password
2040#
2041# @connected: #optional how to handle existing clients when changing the
b80e560b 2042# password. If nothing is specified, defaults to `keep'
fbf796fd
LC
2043# `fail' to fail the command if clients are connected
2044# `disconnect' to disconnect existing clients
2045# `keep' to maintain existing clients
2046#
2047# Returns: Nothing on success
2048# If Spice is not enabled, DeviceNotFound
fbf796fd
LC
2049#
2050# Since: 0.14.0
2051##
2052{ 'command': 'set_password',
2053 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
9ad5372d
LC
2054
2055##
2056# @expire_password:
2057#
2058# Expire the password of a remote display server.
2059#
2060# @protocol: the name of the remote display protocol `vnc' or `spice'
2061#
2062# @time: when to expire the password.
2063# `now' to expire the password immediately
2064# `never' to cancel password expiration
2065# `+INT' where INT is the number of seconds from now (integer)
2066# `INT' where INT is the absolute time in seconds
2067#
2068# Returns: Nothing on success
2069# If @protocol is `spice' and Spice is not active, DeviceNotFound
9ad5372d
LC
2070#
2071# Since: 0.14.0
2072#
2073# Notes: Time is relative to the server and currently there is no way to
2074# coordinate server time with client time. It is not recommended to
2075# use the absolute time version of the @time parameter unless you're
2076# sure you are on the same machine as the QEMU instance.
2077##
2078{ 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
c245b6a3
LC
2079
2080##
2081# @eject:
2082#
2083# Ejects a device from a removable drive.
2084#
2085# @device: The name of the device
2086#
2087# @force: @optional If true, eject regardless of whether the drive is locked.
2088# If not specified, the default value is false.
2089#
2090# Returns: Nothing on success
2091# If @device is not a valid block device, DeviceNotFound
c245b6a3
LC
2092#
2093# Notes: Ejecting a device will no media results in success
2094#
2095# Since: 0.14.0
2096##
2097{ 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
270b243f
LC
2098
2099##
2100# @change-vnc-password:
2101#
2102# Change the VNC server password.
2103#
2104# @target: the new password to use with VNC authentication
2105#
2106# Since: 1.1
2107#
2108# Notes: An empty password in this command will set the password to the empty
2109# string. Existing clients are unaffected by executing this command.
2110##
2111{ 'command': 'change-vnc-password', 'data': {'password': 'str'} }
333a96ec
LC
2112
2113##
2114# @change:
2115#
2116# This command is multiple commands multiplexed together.
2117#
2118# @device: This is normally the name of a block device but it may also be 'vnc'.
2119# when it's 'vnc', then sub command depends on @target
2120#
2121# @target: If @device is a block device, then this is the new filename.
2122# If @device is 'vnc', then if the value 'password' selects the vnc
2123# change password command. Otherwise, this specifies a new server URI
2124# address to listen to for VNC connections.
2125#
2126# @arg: If @device is a block device, then this is an optional format to open
2127# the device with.
2128# If @device is 'vnc' and @target is 'password', this is the new VNC
2129# password to set. If this argument is an empty string, then no future
2130# logins will be allowed.
2131#
2132# Returns: Nothing on success.
2133# If @device is not a valid block device, DeviceNotFound
333a96ec
LC
2134# If the new block device is encrypted, DeviceEncrypted. Note that
2135# if this error is returned, the device has been opened successfully
2136# and an additional call to @block_passwd is required to set the
2137# device's password. The behavior of reads and writes to the block
2138# device between when these calls are executed is undefined.
2139#
2140# Notes: It is strongly recommended that this interface is not used especially
2141# for changing block devices.
2142#
2143# Since: 0.14.0
2144##
2145{ 'command': 'change',
2146 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
80047da5
LC
2147
2148##
2149# @block_set_io_throttle:
2150#
2151# Change I/O throttle limits for a block drive.
2152#
2153# @device: The name of the device
2154#
2155# @bps: total throughput limit in bytes per second
2156#
2157# @bps_rd: read throughput limit in bytes per second
2158#
2159# @bps_wr: write throughput limit in bytes per second
2160#
2161# @iops: total I/O operations per second
2162#
2163# @ops_rd: read I/O operations per second
2164#
2165# @iops_wr: write I/O operations per second
2166#
2167# Returns: Nothing on success
2168# If @device is not a valid block device, DeviceNotFound
80047da5
LC
2169#
2170# Since: 1.1
b80e560b 2171##
80047da5
LC
2172{ 'command': 'block_set_io_throttle',
2173 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
2174 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
12bd451f 2175
db58f9c0
SH
2176##
2177# @block-stream:
12bd451f
SH
2178#
2179# Copy data from a backing file into a block device.
2180#
2181# The block streaming operation is performed in the background until the entire
2182# backing file has been copied. This command returns immediately once streaming
2183# has started. The status of ongoing block streaming operations can be checked
2184# with query-block-jobs. The operation can be stopped before it has completed
db58f9c0 2185# using the block-job-cancel command.
12bd451f
SH
2186#
2187# If a base file is specified then sectors are not copied from that base file and
2188# its backing chain. When streaming completes the image file will have the base
2189# file as its backing file. This can be used to stream a subset of the backing
2190# file chain instead of flattening the entire image.
2191#
2192# On successful completion the image file is updated to drop the backing file
2193# and the BLOCK_JOB_COMPLETED event is emitted.
2194#
2195# @device: the device name
2196#
2197# @base: #optional the common backing file name
2198#
c83c66c3
SH
2199# @speed: #optional the maximum speed, in bytes per second
2200#
1d809098
PB
2201# @on-error: #optional the action to take on an error (default report).
2202# 'stop' and 'enospc' can only be used if the block device
2203# supports io-status (see BlockInfo). Since 1.3.
2204#
12bd451f 2205# Returns: Nothing on success
12bd451f 2206# If @device does not exist, DeviceNotFound
12bd451f
SH
2207#
2208# Since: 1.1
2209##
1d809098
PB
2210{ 'command': 'block-stream',
2211 'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
2212 '*on-error': 'BlockdevOnError' } }
2d47c6e9
SH
2213
2214##
db58f9c0 2215# @block-job-set-speed:
2d47c6e9
SH
2216#
2217# Set maximum speed for a background block operation.
2218#
2219# This command can only be issued when there is an active block job.
2220#
2221# Throttling can be disabled by setting the speed to 0.
2222#
2223# @device: the device name
2224#
c83c66c3
SH
2225# @speed: the maximum speed, in bytes per second, or 0 for unlimited.
2226# Defaults to 0.
2d47c6e9
SH
2227#
2228# Returns: Nothing on success
05290d80 2229# If no background operation is active on this device, DeviceNotActive
2d47c6e9
SH
2230#
2231# Since: 1.1
2232##
db58f9c0 2233{ 'command': 'block-job-set-speed',
882ec7ce 2234 'data': { 'device': 'str', 'speed': 'int' } }
370521a1
SH
2235
2236##
db58f9c0 2237# @block-job-cancel:
370521a1 2238#
05290d80 2239# Stop an active background block operation.
370521a1 2240#
05290d80 2241# This command returns immediately after marking the active background block
370521a1
SH
2242# operation for cancellation. It is an error to call this command if no
2243# operation is in progress.
2244#
2245# The operation will cancel as soon as possible and then emit the
2246# BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
2247# enumerated using query-block-jobs.
2248#
05290d80
PB
2249# For streaming, the image file retains its backing file unless the streaming
2250# operation happens to complete just as it is being cancelled. A new streaming
2251# operation can be started at a later time to finish copying all data from the
2252# backing file.
370521a1
SH
2253#
2254# @device: the device name
2255#
6e37fb81
PB
2256# @force: #optional whether to allow cancellation of a paused job (default
2257# false). Since 1.3.
2258#
370521a1 2259# Returns: Nothing on success
05290d80 2260# If no background operation is active on this device, DeviceNotActive
370521a1
SH
2261#
2262# Since: 1.1
2263##
6e37fb81
PB
2264{ 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
2265
2266##
2267# @block-job-pause:
2268#
2269# Pause an active background block operation.
2270#
2271# This command returns immediately after marking the active background block
2272# operation for pausing. It is an error to call this command if no
2273# operation is in progress. Pausing an already paused job has no cumulative
2274# effect; a single block-job-resume command will resume the job.
2275#
2276# The operation will pause as soon as possible. No event is emitted when
2277# the operation is actually paused. Cancelling a paused job automatically
2278# resumes it.
2279#
2280# @device: the device name
2281#
2282# Returns: Nothing on success
2283# If no background operation is active on this device, DeviceNotActive
2284#
2285# Since: 1.3
2286##
2287{ 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2288
2289##
2290# @block-job-resume:
2291#
2292# Resume an active background block operation.
2293#
2294# This command returns immediately after resuming a paused background block
2295# operation. It is an error to call this command if no operation is in
2296# progress. Resuming an already running job is not an error.
2297#
32c81a4a
PB
2298# This command also clears the error status of the job.
2299#
6e37fb81
PB
2300# @device: the device name
2301#
2302# Returns: Nothing on success
2303# If no background operation is active on this device, DeviceNotActive
2304#
2305# Since: 1.3
2306##
2307{ 'command': 'block-job-resume', 'data': { 'device': 'str' } }
5eeee3fa 2308
aeae883b
PB
2309##
2310# @block-job-complete:
2311#
2312# Manually trigger completion of an active background block operation. This
2313# is supported for drive mirroring, where it also switches the device to
a66a2a36
PB
2314# write to the target path only. The ability to complete is signaled with
2315# a BLOCK_JOB_READY event.
aeae883b
PB
2316#
2317# This command completes an active background block operation synchronously.
2318# The ordering of this command's return with the BLOCK_JOB_COMPLETED event
2319# is not defined. Note that if an I/O error occurs during the processing of
2320# this command: 1) the command itself will fail; 2) the error will be processed
2321# according to the rerror/werror arguments that were specified when starting
2322# the operation.
2323#
2324# A cancelled or paused job cannot be completed.
2325#
2326# @device: the device name
2327#
2328# Returns: Nothing on success
2329# If no background operation is active on this device, DeviceNotActive
2330#
2331# Since: 1.3
2332##
2333{ 'command': 'block-job-complete', 'data': { 'device': 'str' } }
2334
5eeee3fa
AL
2335##
2336# @ObjectTypeInfo:
2337#
2338# This structure describes a search result from @qom-list-types
2339#
2340# @name: the type name found in the search
2341#
2342# Since: 1.1
2343#
2344# Notes: This command is experimental and may change syntax in future releases.
2345##
2346{ 'type': 'ObjectTypeInfo',
2347 'data': { 'name': 'str' } }
2348
2349##
2350# @qom-list-types:
2351#
2352# This command will return a list of types given search parameters
2353#
2354# @implements: if specified, only return types that implement this type name
2355#
2356# @abstract: if true, include abstract types in the results
2357#
2358# Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2359#
2360# Since: 1.1
5eeee3fa
AL
2361##
2362{ 'command': 'qom-list-types',
2363 'data': { '*implements': 'str', '*abstract': 'bool' },
2364 'returns': [ 'ObjectTypeInfo' ] }
e1c37d0e 2365
1daa31b9
AL
2366##
2367# @DevicePropertyInfo:
2368#
2369# Information about device properties.
2370#
2371# @name: the name of the property
2372# @type: the typename of the property
2373#
2374# Since: 1.2
2375##
2376{ 'type': 'DevicePropertyInfo',
2377 'data': { 'name': 'str', 'type': 'str' } }
2378
2379##
2380# @device-list-properties:
2381#
2382# List properties associated with a device.
2383#
2384# @typename: the type name of a device
2385#
2386# Returns: a list of DevicePropertyInfo describing a devices properties
2387#
2388# Since: 1.2
2389##
2390{ 'command': 'device-list-properties',
2391 'data': { 'typename': 'str'},
2392 'returns': [ 'DevicePropertyInfo' ] }
2393
e1c37d0e
LC
2394##
2395# @migrate
2396#
2397# Migrates the current running guest to another Virtual Machine.
2398#
2399# @uri: the Uniform Resource Identifier of the destination VM
2400#
2401# @blk: #optional do block migration (full disk copy)
2402#
2403# @inc: #optional incremental disk copy migration
2404#
2405# @detach: this argument exists only for compatibility reasons and
2406# is ignored by QEMU
2407#
2408# Returns: nothing on success
2409#
2410# Since: 0.14.0
2411##
2412{ 'command': 'migrate',
2413 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
33cf629a 2414
a7ae8355
SS
2415# @xen-save-devices-state:
2416#
2417# Save the state of all devices to file. The RAM and the block devices
2418# of the VM are not saved by this command.
2419#
2420# @filename: the file to save the state of the devices to as binary
2421# data. See xen-save-devices-state.txt for a description of the binary
2422# format.
2423#
2424# Returns: Nothing on success
a7ae8355
SS
2425#
2426# Since: 1.1
2427##
2428{ 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
a15fef21 2429
39f42439
AP
2430##
2431# @xen-set-global-dirty-log
2432#
2433# Enable or disable the global dirty log mode.
2434#
2435# @enable: true to enable, false to disable.
2436#
2437# Returns: nothing
2438#
2439# Since: 1.3
2440##
2441{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2442
a15fef21
LC
2443##
2444# @device_del:
2445#
2446# Remove a device from a guest
2447#
2448# @id: the name of the device
2449#
2450# Returns: Nothing on success
2451# If @id is not a valid device, DeviceNotFound
a15fef21
LC
2452#
2453# Notes: When this command completes, the device may not be removed from the
2454# guest. Hot removal is an operation that requires guest cooperation.
2455# This command merely requests that the guest begin the hot removal
0402a5d6
MT
2456# process. Completion of the device removal process is signaled with a
2457# DEVICE_DELETED event. Guest reset will automatically complete removal
2458# for all devices.
a15fef21
LC
2459#
2460# Since: 0.14.0
2461##
2462{ 'command': 'device_del', 'data': {'id': 'str'} }
783e9b48
WC
2463
2464##
2465# @dump-guest-memory
2466#
2467# Dump guest's memory to vmcore. It is a synchronous operation that can take
2468# very long depending on the amount of guest memory. This command is only
f5b0d93b
LC
2469# supported on i386 and x86_64.
2470#
2471# @paging: if true, do paging to get guest's memory mapping. This allows
d691180e 2472# using gdb to process the core file.
f5b0d93b 2473#
d691180e
LC
2474# IMPORTANT: this option can make QEMU allocate several gigabytes
2475# of RAM. This can happen for a large guest, or a
2476# malicious guest pretending to be large.
2477#
2478# Also, paging=true has the following limitations:
2479#
2480# 1. The guest may be in a catastrophic state or can have corrupted
2481# memory, which cannot be trusted
2482# 2. The guest can be in real-mode even if paging is enabled. For
2483# example, the guest uses ACPI to sleep, and ACPI sleep state
2484# goes in real-mode
f5b0d93b 2485#
783e9b48 2486# @protocol: the filename or file descriptor of the vmcore. The supported
d691180e 2487# protocols are:
f5b0d93b 2488#
d691180e
LC
2489# 1. file: the protocol starts with "file:", and the following
2490# string is the file's path.
2491# 2. fd: the protocol starts with "fd:", and the following string
2492# is the fd's name.
f5b0d93b 2493#
783e9b48 2494# @begin: #optional if specified, the starting physical address.
f5b0d93b 2495#
783e9b48 2496# @length: #optional if specified, the memory size, in bytes. If you don't
d691180e
LC
2497# want to dump all guest's memory, please specify the start @begin
2498# and @length
783e9b48
WC
2499#
2500# Returns: nothing on success
783e9b48
WC
2501#
2502# Since: 1.2
2503##
2504{ 'command': 'dump-guest-memory',
2505 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2506 '*length': 'int' } }
d691180e 2507
928059a3
LC
2508##
2509# @netdev_add:
2510#
2511# Add a network backend.
2512#
2513# @type: the type of network backend. Current valid values are 'user', 'tap',
2514# 'vde', 'socket', 'dump' and 'bridge'
2515#
2516# @id: the name of the new network backend
2517#
2518# @props: #optional a list of properties to be passed to the backend in
2519# the format 'name=value', like 'ifname=tap0,script=no'
2520#
2521# Notes: The semantics of @props is not well defined. Future commands will be
2522# introduced that provide stronger typing for backend creation.
2523#
2524# Since: 0.14.0
2525#
2526# Returns: Nothing on success
2527# If @type is not a valid network backend, DeviceNotFound
928059a3
LC
2528##
2529{ 'command': 'netdev_add',
2530 'data': {'type': 'str', 'id': 'str', '*props': '**'},
2531 'gen': 'no' }
5f964155
LC
2532
2533##
2534# @netdev_del:
2535#
2536# Remove a network backend.
2537#
2538# @id: the name of the network backend to remove
2539#
2540# Returns: Nothing on success
2541# If @id is not a valid network backend, DeviceNotFound
2542#
2543# Since: 0.14.0
2544##
2545{ 'command': 'netdev_del', 'data': {'id': 'str'} }
208c9d1b 2546
14aa0c2d
LE
2547##
2548# @NetdevNoneOptions
2549#
2550# Use it alone to have zero network devices.
2551#
2552# Since 1.2
2553##
2554{ 'type': 'NetdevNoneOptions',
2555 'data': { } }
2556
2557##
2558# @NetLegacyNicOptions
2559#
2560# Create a new Network Interface Card.
2561#
2562# @netdev: #optional id of -netdev to connect to
2563#
2564# @macaddr: #optional MAC address
2565#
2566# @model: #optional device model (e1000, rtl8139, virtio etc.)
2567#
2568# @addr: #optional PCI device address
2569#
2570# @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2571#
2572# Since 1.2
2573##
2574{ 'type': 'NetLegacyNicOptions',
2575 'data': {
2576 '*netdev': 'str',
2577 '*macaddr': 'str',
2578 '*model': 'str',
2579 '*addr': 'str',
2580 '*vectors': 'uint32' } }
2581
2582##
2583# @String
2584#
2585# A fat type wrapping 'str', to be embedded in lists.
2586#
2587# Since 1.2
2588##
2589{ 'type': 'String',
2590 'data': {
2591 'str': 'str' } }
2592
2593##
2594# @NetdevUserOptions
2595#
2596# Use the user mode network stack which requires no administrator privilege to
2597# run.
2598#
2599# @hostname: #optional client hostname reported by the builtin DHCP server
2600#
2601# @restrict: #optional isolate the guest from the host
2602#
2603# @ip: #optional legacy parameter, use net= instead
2604#
2605# @net: #optional IP address and optional netmask
2606#
2607# @host: #optional guest-visible address of the host
2608#
2609# @tftp: #optional root directory of the built-in TFTP server
2610#
2611# @bootfile: #optional BOOTP filename, for use with tftp=
2612#
2613# @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2614# assign
2615#
2616# @dns: #optional guest-visible address of the virtual nameserver
2617#
63d2960b
KS
2618# @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2619# to the guest
2620#
14aa0c2d
LE
2621# @smb: #optional root directory of the built-in SMB server
2622#
2623# @smbserver: #optional IP address of the built-in SMB server
2624#
2625# @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2626# endpoints
2627#
2628# @guestfwd: #optional forward guest TCP connections
2629#
2630# Since 1.2
2631##
2632{ 'type': 'NetdevUserOptions',
2633 'data': {
2634 '*hostname': 'str',
2635 '*restrict': 'bool',
2636 '*ip': 'str',
2637 '*net': 'str',
2638 '*host': 'str',
2639 '*tftp': 'str',
2640 '*bootfile': 'str',
2641 '*dhcpstart': 'str',
2642 '*dns': 'str',
63d2960b 2643 '*dnssearch': ['String'],
14aa0c2d
LE
2644 '*smb': 'str',
2645 '*smbserver': 'str',
2646 '*hostfwd': ['String'],
2647 '*guestfwd': ['String'] } }
2648
2649##
2650# @NetdevTapOptions
2651#
2652# Connect the host TAP network interface name to the VLAN.
2653#
2654# @ifname: #optional interface name
2655#
2656# @fd: #optional file descriptor of an already opened tap
2657#
2ca81baa
JW
2658# @fds: #optional multiple file descriptors of already opened multiqueue capable
2659# tap
2660#
14aa0c2d
LE
2661# @script: #optional script to initialize the interface
2662#
2663# @downscript: #optional script to shut down the interface
2664#
2665# @helper: #optional command to execute to configure bridge
2666#
2667# @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2668#
2669# @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2670#
2671# @vhost: #optional enable vhost-net network accelerator
2672#
2673# @vhostfd: #optional file descriptor of an already opened vhost net device
2674#
2ca81baa
JW
2675# @vhostfds: #optional file descriptors of multiple already opened vhost net
2676# devices
2677#
14aa0c2d
LE
2678# @vhostforce: #optional vhost on for non-MSIX virtio guests
2679#
ec396014
JW
2680# @queues: #optional number of queues to be created for multiqueue capable tap
2681#
14aa0c2d
LE
2682# Since 1.2
2683##
2684{ 'type': 'NetdevTapOptions',
2685 'data': {
2686 '*ifname': 'str',
2687 '*fd': 'str',
264986e2 2688 '*fds': 'str',
14aa0c2d
LE
2689 '*script': 'str',
2690 '*downscript': 'str',
2691 '*helper': 'str',
2692 '*sndbuf': 'size',
2693 '*vnet_hdr': 'bool',
2694 '*vhost': 'bool',
2695 '*vhostfd': 'str',
264986e2
JW
2696 '*vhostfds': 'str',
2697 '*vhostforce': 'bool',
2698 '*queues': 'uint32'} }
14aa0c2d
LE
2699
2700##
2701# @NetdevSocketOptions
2702#
2703# Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2704# socket connection.
2705#
2706# @fd: #optional file descriptor of an already opened socket
2707#
2708# @listen: #optional port number, and optional hostname, to listen on
2709#
2710# @connect: #optional port number, and optional hostname, to connect to
2711#
2712# @mcast: #optional UDP multicast address and port number
2713#
2714# @localaddr: #optional source address and port for multicast and udp packets
2715#
2716# @udp: #optional UDP unicast address and port number
2717#
2718# Since 1.2
2719##
2720{ 'type': 'NetdevSocketOptions',
2721 'data': {
2722 '*fd': 'str',
2723 '*listen': 'str',
2724 '*connect': 'str',
2725 '*mcast': 'str',
2726 '*localaddr': 'str',
2727 '*udp': 'str' } }
2728
2729##
2730# @NetdevVdeOptions
2731#
2732# Connect the VLAN to a vde switch running on the host.
2733#
2734# @sock: #optional socket path
2735#
2736# @port: #optional port number
2737#
2738# @group: #optional group owner of socket
2739#
2740# @mode: #optional permissions for socket
2741#
2742# Since 1.2
2743##
2744{ 'type': 'NetdevVdeOptions',
2745 'data': {
2746 '*sock': 'str',
2747 '*port': 'uint16',
2748 '*group': 'str',
2749 '*mode': 'uint16' } }
2750
2751##
2752# @NetdevDumpOptions
2753#
2754# Dump VLAN network traffic to a file.
2755#
2756# @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2757# suffixes.
2758#
2759# @file: #optional dump file path (default is qemu-vlan0.pcap)
2760#
2761# Since 1.2
2762##
2763{ 'type': 'NetdevDumpOptions',
2764 'data': {
2765 '*len': 'size',
2766 '*file': 'str' } }
2767
2768##
2769# @NetdevBridgeOptions
2770#
2771# Connect a host TAP network interface to a host bridge device.
2772#
2773# @br: #optional bridge name
2774#
2775# @helper: #optional command to execute to configure bridge
2776#
2777# Since 1.2
2778##
2779{ 'type': 'NetdevBridgeOptions',
2780 'data': {
2781 '*br': 'str',
2782 '*helper': 'str' } }
2783
f6c874e3
SH
2784##
2785# @NetdevHubPortOptions
2786#
2787# Connect two or more net clients through a software hub.
2788#
2789# @hubid: hub identifier number
2790#
2791# Since 1.2
2792##
2793{ 'type': 'NetdevHubPortOptions',
2794 'data': {
2795 'hubid': 'int32' } }
2796
14aa0c2d
LE
2797##
2798# @NetClientOptions
2799#
2800# A discriminated record of network device traits.
2801#
2802# Since 1.2
2803##
2804{ 'union': 'NetClientOptions',
2805 'data': {
f6c874e3
SH
2806 'none': 'NetdevNoneOptions',
2807 'nic': 'NetLegacyNicOptions',
2808 'user': 'NetdevUserOptions',
2809 'tap': 'NetdevTapOptions',
2810 'socket': 'NetdevSocketOptions',
2811 'vde': 'NetdevVdeOptions',
2812 'dump': 'NetdevDumpOptions',
2813 'bridge': 'NetdevBridgeOptions',
2814 'hubport': 'NetdevHubPortOptions' } }
14aa0c2d
LE
2815
2816##
2817# @NetLegacy
2818#
2819# Captures the configuration of a network device; legacy.
2820#
2821# @vlan: #optional vlan number
2822#
2823# @id: #optional identifier for monitor commands
2824#
2825# @name: #optional identifier for monitor commands, ignored if @id is present
2826#
2827# @opts: device type specific properties (legacy)
2828#
2829# Since 1.2
2830##
2831{ 'type': 'NetLegacy',
2832 'data': {
2833 '*vlan': 'int32',
2834 '*id': 'str',
2835 '*name': 'str',
2836 'opts': 'NetClientOptions' } }
2837
2838##
2839# @Netdev
2840#
2841# Captures the configuration of a network device.
2842#
2843# @id: identifier for monitor commands.
2844#
2845# @opts: device type specific properties
2846#
2847# Since 1.2
2848##
2849{ 'type': 'Netdev',
2850 'data': {
2851 'id': 'str',
2852 'opts': 'NetClientOptions' } }
2853
5be8c759
PB
2854##
2855# @InetSocketAddress
2856#
2857# Captures a socket address or address range in the Internet namespace.
2858#
2859# @host: host part of the address
2860#
2861# @port: port part of the address, or lowest port if @to is present
2862#
2863# @to: highest port to try
2864#
2865# @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2866# #optional
2867#
2868# @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2869# #optional
2870#
2871# Since 1.3
2872##
2873{ 'type': 'InetSocketAddress',
2874 'data': {
2875 'host': 'str',
2876 'port': 'str',
2877 '*to': 'uint16',
2878 '*ipv4': 'bool',
2879 '*ipv6': 'bool' } }
2880
2881##
2882# @UnixSocketAddress
2883#
2884# Captures a socket address in the local ("Unix socket") namespace.
2885#
2886# @path: filesystem path to use
2887#
2888# Since 1.3
2889##
2890{ 'type': 'UnixSocketAddress',
2891 'data': {
2892 'path': 'str' } }
2893
2894##
2895# @SocketAddress
2896#
2897# Captures the address of a socket, which could also be a named file descriptor
2898#
2899# Since 1.3
2900##
2901{ 'union': 'SocketAddress',
2902 'data': {
2903 'inet': 'InetSocketAddress',
2904 'unix': 'UnixSocketAddress',
2905 'fd': 'String' } }
2906
208c9d1b
CB
2907##
2908# @getfd:
2909#
2910# Receive a file descriptor via SCM rights and assign it a name
2911#
2912# @fdname: file descriptor name
2913#
2914# Returns: Nothing on success
208c9d1b
CB
2915#
2916# Since: 0.14.0
2917#
2918# Notes: If @fdname already exists, the file descriptor assigned to
2919# it will be closed and replaced by the received file
2920# descriptor.
2921# The 'closefd' command can be used to explicitly close the
2922# file descriptor when it is no longer needed.
2923##
2924{ 'command': 'getfd', 'data': {'fdname': 'str'} }
2925
2926##
2927# @closefd:
2928#
2929# Close a file descriptor previously passed via SCM rights
2930#
2931# @fdname: file descriptor name
2932#
2933# Returns: Nothing on success
208c9d1b
CB
2934#
2935# Since: 0.14.0
2936##
2937{ 'command': 'closefd', 'data': {'fdname': 'str'} }
01d3c80d
AL
2938
2939##
2940# @MachineInfo:
2941#
2942# Information describing a machine.
2943#
2944# @name: the name of the machine
2945#
2946# @alias: #optional an alias for the machine name
2947#
2948# @default: #optional whether the machine is default
2949#
c72e7688
MN
2950# @cpu-max: maximum number of CPUs supported by the machine type
2951# (since 1.5.0)
2952#
01d3c80d
AL
2953# Since: 1.2.0
2954##
2955{ 'type': 'MachineInfo',
2956 'data': { 'name': 'str', '*alias': 'str',
c72e7688 2957 '*is-default': 'bool', 'cpu-max': 'int' } }
01d3c80d
AL
2958
2959##
2960# @query-machines:
2961#
2962# Return a list of supported machines
2963#
2964# Returns: a list of MachineInfo
2965#
2966# Since: 1.2.0
2967##
2968{ 'command': 'query-machines', 'returns': ['MachineInfo'] }
e4e31c63
AL
2969
2970##
2971# @CpuDefinitionInfo:
2972#
2973# Virtual CPU definition.
2974#
2975# @name: the name of the CPU definition
2976#
2977# Since: 1.2.0
2978##
2979{ 'type': 'CpuDefinitionInfo',
2980 'data': { 'name': 'str' } }
2981
2982##
2983# @query-cpu-definitions:
2984#
2985# Return a list of supported virtual CPU definitions
2986#
2987# Returns: a list of CpuDefInfo
2988#
2989# Since: 1.2.0
2990##
2991{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
ba1c048a
CB
2992
2993# @AddfdInfo:
2994#
2995# Information about a file descriptor that was added to an fd set.
2996#
2997# @fdset-id: The ID of the fd set that @fd was added to.
2998#
2999# @fd: The file descriptor that was received via SCM rights and
3000# added to the fd set.
3001#
3002# Since: 1.2.0
3003##
3004{ 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3005
3006##
3007# @add-fd:
3008#
3009# Add a file descriptor, that was passed via SCM rights, to an fd set.
3010#
3011# @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3012#
3013# @opaque: #optional A free-form string that can be used to describe the fd.
3014#
3015# Returns: @AddfdInfo on success
3016# If file descriptor was not received, FdNotSupplied
9ac54af0 3017# If @fdset-id is a negative value, InvalidParameterValue
ba1c048a
CB
3018#
3019# Notes: The list of fd sets is shared by all monitor connections.
3020#
3021# If @fdset-id is not specified, a new fd set will be created.
3022#
3023# Since: 1.2.0
3024##
3025{ 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3026 'returns': 'AddfdInfo' }
3027
3028##
3029# @remove-fd:
3030#
3031# Remove a file descriptor from an fd set.
3032#
3033# @fdset-id: The ID of the fd set that the file descriptor belongs to.
3034#
3035# @fd: #optional The file descriptor that is to be removed.
3036#
3037# Returns: Nothing on success
3038# If @fdset-id or @fd is not found, FdNotFound
3039#
3040# Since: 1.2.0
3041#
3042# Notes: The list of fd sets is shared by all monitor connections.
3043#
3044# If @fd is not specified, all file descriptors in @fdset-id
3045# will be removed.
3046##
3047{ 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3048
3049##
3050# @FdsetFdInfo:
3051#
3052# Information about a file descriptor that belongs to an fd set.
3053#
3054# @fd: The file descriptor value.
3055#
3056# @opaque: #optional A free-form string that can be used to describe the fd.
3057#
3058# Since: 1.2.0
3059##
3060{ 'type': 'FdsetFdInfo',
3061 'data': {'fd': 'int', '*opaque': 'str'} }
3062
3063##
3064# @FdsetInfo:
3065#
3066# Information about an fd set.
3067#
3068# @fdset-id: The ID of the fd set.
3069#
3070# @fds: A list of file descriptors that belong to this fd set.
3071#
3072# Since: 1.2.0
3073##
3074{ 'type': 'FdsetInfo',
3075 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3076
3077##
3078# @query-fdsets:
3079#
3080# Return information describing all fd sets.
3081#
3082# Returns: A list of @FdsetInfo
3083#
3084# Since: 1.2.0
3085#
3086# Note: The list of fd sets is shared by all monitor connections.
3087#
3088##
3089{ 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
99afc91d 3090
99afc91d
DB
3091##
3092# @TargetInfo:
3093#
3094# Information describing the QEMU target.
3095#
3096# @arch: the target architecture (eg "x86_64", "i386", etc)
3097#
3098# Since: 1.2.0
3099##
3100{ 'type': 'TargetInfo',
c02a9552 3101 'data': { 'arch': 'str' } }
99afc91d
DB
3102
3103##
3104# @query-target:
3105#
3106# Return information about the target for this QEMU
3107#
3108# Returns: TargetInfo
3109#
3110# Since: 1.2.0
3111##
3112{ 'command': 'query-target', 'returns': 'TargetInfo' }
411656f4
AK
3113
3114##
3115# @QKeyCode:
3116#
3117# An enumeration of key name.
3118#
3119# This is used by the send-key command.
3120#
3121# Since: 1.3.0
3122##
3123{ 'enum': 'QKeyCode',
3124 'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3125 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3126 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3127 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3128 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3129 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3130 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3131 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3132 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3133 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3134 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3135 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3136 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3137 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3138 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
e4c8f004 3139
9f328977
LC
3140##
3141# @KeyValue
3142#
3143# Represents a keyboard key.
3144#
3145# Since: 1.3.0
3146##
3147{ 'union': 'KeyValue',
3148 'data': {
3149 'number': 'int',
3150 'qcode': 'QKeyCode' } }
3151
e4c8f004
AK
3152##
3153# @send-key:
3154#
3155# Send keys to guest.
3156#
9f328977
LC
3157# @keys: An array of @KeyValue elements. All @KeyValues in this array are
3158# simultaneously sent to the guest. A @KeyValue.number value is sent
3159# directly to the guest, while @KeyValue.qcode must be a valid
3160# @QKeyCode value
e4c8f004
AK
3161#
3162# @hold-time: #optional time to delay key up events, milliseconds. Defaults
3163# to 100
3164#
3165# Returns: Nothing on success
3166# If key is unknown or redundant, InvalidParameter
3167#
3168# Since: 1.3.0
3169#
3170##
3171{ 'command': 'send-key',
9f328977 3172 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
ad39cf6d
LC
3173
3174##
3175# @screendump:
3176#
3177# Write a PPM of the VGA screen to a file.
3178#
3179# @filename: the path of a new PPM file to store the image
3180#
3181# Returns: Nothing on success
3182#
3183# Since: 0.14.0
3184##
3185{ 'command': 'screendump', 'data': {'filename': 'str'} }
6dd844db
PB
3186
3187##
3188# @nbd-server-start:
3189#
3190# Start an NBD server listening on the given host and port. Block
3191# devices can then be exported using @nbd-server-add. The NBD
3192# server will present them as named exports; for example, another
3193# QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
3194#
3195# @addr: Address on which to listen.
3196#
3197# Returns: error if the server is already running.
3198#
3199# Since: 1.3.0
3200##
3201{ 'command': 'nbd-server-start',
3202 'data': { 'addr': 'SocketAddress' } }
3203
3204##
3205# @nbd-server-add:
3206#
3207# Export a device to QEMU's embedded NBD server.
3208#
3209# @device: Block device to be exported
3210#
3211# @writable: Whether clients should be able to write to the device via the
3212# NBD connection (default false). #optional
3213#
3214# Returns: error if the device is already marked for export.
3215#
3216# Since: 1.3.0
3217##
3218{ 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3219
3220##
3221# @nbd-server-stop:
3222#
3223# Stop QEMU's embedded NBD server, and unregister all devices previously
3224# added via @nbd-server-add.
3225#
3226# Since: 1.3.0
3227##
3228{ 'command': 'nbd-server-stop' }
f1a1a356 3229
ffbdbe59
GH
3230##
3231# @ChardevFile:
3232#
3233# Configuration info for file chardevs.
3234#
3235# @in: #optional The name of the input file
3236# @out: The name of the output file
3237#
3238# Since: 1.4
3239##
3240{ 'type': 'ChardevFile', 'data': { '*in' : 'str',
3241 'out' : 'str' } }
3242
d59044ef 3243##
d36b2b90 3244# @ChardevHostdev:
d59044ef 3245#
548cbb36 3246# Configuration info for device and pipe chardevs.
d59044ef
GH
3247#
3248# @device: The name of the special file for the device,
3249# i.e. /dev/ttyS0 on Unix or COM1: on Windows
3250# @type: What kind of device this is.
3251#
3252# Since: 1.4
3253##
d36b2b90 3254{ 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
d59044ef 3255
f6bd5d6e
GH
3256##
3257# @ChardevSocket:
3258#
3ecc059d 3259# Configuration info for (stream) socket chardevs.
f6bd5d6e
GH
3260#
3261# @addr: socket address to listen on (server=true)
3262# or connect to (server=false)
3263# @server: #optional create server socket (default: true)
ef993ba7
GH
3264# @wait: #optional wait for incoming connection on server
3265# sockets (default: false).
f6bd5d6e 3266# @nodelay: #optional set TCP_NODELAY socket option (default: false)
ef993ba7
GH
3267# @telnet: #optional enable telnet protocol on server
3268# sockets (default: false)
f6bd5d6e
GH
3269#
3270# Since: 1.4
3271##
3272{ 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3273 '*server' : 'bool',
3274 '*wait' : 'bool',
3275 '*nodelay' : 'bool',
3276 '*telnet' : 'bool' } }
3277
3ecc059d 3278##
08d0ab3f 3279# @ChardevUdp:
3ecc059d
GH
3280#
3281# Configuration info for datagram socket chardevs.
3282#
3283# @remote: remote address
3284# @local: #optional local address
3285#
3286# Since: 1.5
3287##
08d0ab3f
LL
3288{ 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3289 '*local' : 'SocketAddress' } }
3ecc059d 3290
edb2fb3c
GH
3291##
3292# @ChardevMux:
3293#
3294# Configuration info for mux chardevs.
3295#
3296# @chardev: name of the base chardev.
3297#
3298# Since: 1.5
3299##
3300{ 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
3301
7c358031
GH
3302##
3303# @ChardevStdio:
3304#
3305# Configuration info for stdio chardevs.
3306#
3307# @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3308# be delivered to qemu. Default: true in -nographic mode,
3309# false otherwise.
3310#
3311# Since: 1.5
3312##
3313{ 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
3314
cd153e2a
GH
3315##
3316# @ChardevSpiceChannel:
3317#
3318# Configuration info for spice vm channel chardevs.
3319#
3320# @type: kind of channel (for example vdagent).
3321#
3322# Since: 1.5
3323##
3324{ 'type': 'ChardevSpiceChannel', 'data': { 'type' : 'str' } }
3325
3326##
3327# @ChardevSpicePort:
3328#
3329# Configuration info for spice port chardevs.
3330#
3331# @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3332#
3333# Since: 1.5
3334##
3335{ 'type': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' } }
3336
702ec69c
GH
3337##
3338# @ChardevVC:
3339#
3340# Configuration info for virtual console chardevs.
3341#
3342# @width: console width, in pixels
3343# @height: console height, in pixels
3344# @cols: console width, in chars
3345# @rows: console height, in chars
3346#
3347# Since: 1.5
3348##
3349{ 'type': 'ChardevVC', 'data': { '*width' : 'int',
3350 '*height' : 'int',
3351 '*cols' : 'int',
3352 '*rows' : 'int' } }
3353
1da48c65 3354##
6a85e60c 3355# @ChardevMemory:
1da48c65
GH
3356#
3357# Configuration info for memory chardevs
3358#
3359# @size: #optional Ringbuffer size, must be power of two, default is 65536
3360#
3361# Since: 1.5
3362##
6a85e60c 3363{ 'type': 'ChardevMemory', 'data': { '*size' : 'int' } }
1da48c65 3364
f1a1a356
GH
3365##
3366# @ChardevBackend:
3367#
3368# Configuration info for the new chardev backend.
3369#
3370# Since: 1.4
3371##
3372{ 'type': 'ChardevDummy', 'data': { } }
3373
f6bd5d6e 3374{ 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
d36b2b90
MA
3375 'serial' : 'ChardevHostdev',
3376 'parallel': 'ChardevHostdev',
548cbb36 3377 'pipe' : 'ChardevHostdev',
f6bd5d6e 3378 'socket' : 'ChardevSocket',
08d0ab3f 3379 'udp' : 'ChardevUdp',
0a1a7fab 3380 'pty' : 'ChardevDummy',
edb2fb3c 3381 'null' : 'ChardevDummy',
f5a51cab 3382 'mux' : 'ChardevMux',
2d57286d 3383 'msmouse': 'ChardevDummy',
7c358031 3384 'braille': 'ChardevDummy',
d9ac374f 3385 'stdio' : 'ChardevStdio',
cd153e2a
GH
3386 'console': 'ChardevDummy',
3387 'spicevmc' : 'ChardevSpiceChannel',
702ec69c 3388 'spiceport' : 'ChardevSpicePort',
1da48c65 3389 'vc' : 'ChardevVC',
6a85e60c 3390 'memory' : 'ChardevMemory' } }
f1a1a356
GH
3391
3392##
3393# @ChardevReturn:
3394#
3395# Return info about the chardev backend just created.
3396#
58fa4325
MA
3397# @pty: #optional name of the slave pseudoterminal device, present if
3398# and only if a chardev of type 'pty' was created
3399#
f1a1a356
GH
3400# Since: 1.4
3401##
0a1a7fab 3402{ 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
f1a1a356
GH
3403
3404##
3405# @chardev-add:
3406#
58fa4325 3407# Add a character device backend
f1a1a356
GH
3408#
3409# @id: the chardev's ID, must be unique
3410# @backend: backend type and parameters
3411#
58fa4325 3412# Returns: ChardevReturn.
f1a1a356
GH
3413#
3414# Since: 1.4
3415##
3416{ 'command': 'chardev-add', 'data': {'id' : 'str',
3417 'backend' : 'ChardevBackend' },
3418 'returns': 'ChardevReturn' }
3419
3420##
3421# @chardev-remove:
3422#
58fa4325 3423# Remove a character device backend
f1a1a356
GH
3424#
3425# @id: the chardev's ID, must exist and not be in use
3426#
3427# Returns: Nothing on success
3428#
3429# Since: 1.4
3430##
3431{ 'command': 'chardev-remove', 'data': {'id': 'str'} }
d1a0cf73
SB
3432
3433##
3434# @TpmModel:
3435#
3436# An enumeration of TPM models
3437#
3438# @tpm-tis: TPM TIS model
3439#
3440# Since: 1.5
3441##
3442{ 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3443
3444##
3445# @query-tpm-models:
3446#
3447# Return a list of supported TPM models
3448#
3449# Returns: a list of TpmModel
3450#
3451# Since: 1.5
3452##
3453{ 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3454
3455##
3456# @TpmType:
3457#
3458# An enumeration of TPM types
3459#
3460# @passthrough: TPM passthrough type
3461#
3462# Since: 1.5
3463##
3464{ 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3465
3466##
3467# @query-tpm-types:
3468#
3469# Return a list of supported TPM types
3470#
3471# Returns: a list of TpmType
3472#
3473# Since: 1.5
3474##
3475{ 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3476
3477##
3478# @TPMPassthroughOptions:
3479#
3480# Information about the TPM passthrough type
3481#
3482# @path: #optional string describing the path used for accessing the TPM device
3483#
3484# @cancel-path: #optional string showing the TPM's sysfs cancel file
3485# for cancellation of TPM commands while they are executing
3486#
3487# Since: 1.5
3488##
3489{ 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3490 '*cancel-path' : 'str'} }
3491
3492##
3493# @TpmTypeOptions:
3494#
3495# A union referencing different TPM backend types' configuration options
3496#
88ca7bcf 3497# @passthrough: The configuration options for the TPM passthrough type
d1a0cf73
SB
3498#
3499# Since: 1.5
3500##
3501{ 'union': 'TpmTypeOptions',
88ca7bcf 3502 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
d1a0cf73
SB
3503
3504##
3505# @TpmInfo:
3506#
3507# Information about the TPM
3508#
3509# @id: The Id of the TPM
3510#
3511# @model: The TPM frontend model
3512#
88ca7bcf 3513# @options: The TPM (backend) type configuration options
d1a0cf73
SB
3514#
3515# Since: 1.5
3516##
3517{ 'type': 'TPMInfo',
3518 'data': {'id': 'str',
3519 'model': 'TpmModel',
88ca7bcf 3520 'options': 'TpmTypeOptions' } }
d1a0cf73
SB
3521
3522##
3523# @query-tpm:
3524#
3525# Return information about the TPM device
3526#
3527# Returns: @TPMInfo on success
3528#
3529# Since: 1.5
3530##
3531{ 'command': 'query-tpm', 'returns': ['TPMInfo'] }
8ccbad5c
LE
3532
3533##
3534# @AcpiTableOptions
3535#
3536# Specify an ACPI table on the command line to load.
3537#
3538# At most one of @file and @data can be specified. The list of files specified
3539# by any one of them is loaded and concatenated in order. If both are omitted,
3540# @data is implied.
3541#
3542# Other fields / optargs can be used to override fields of the generic ACPI
3543# table header; refer to the ACPI specification 5.0, section 5.2.6 System
3544# Description Table Header. If a header field is not overridden, then the
3545# corresponding value from the concatenated blob is used (in case of @file), or
3546# it is filled in with a hard-coded value (in case of @data).
3547#
3548# String fields are copied into the matching ACPI member from lowest address
3549# upwards, and silently truncated / NUL-padded to length.
3550#
3551# @sig: #optional table signature / identifier (4 bytes)
3552#
3553# @rev: #optional table revision number (dependent on signature, 1 byte)
3554#
3555# @oem_id: #optional OEM identifier (6 bytes)
3556#
3557# @oem_table_id: #optional OEM table identifier (8 bytes)
3558#
3559# @oem_rev: #optional OEM-supplied revision number (4 bytes)
3560#
3561# @asl_compiler_id: #optional identifier of the utility that created the table
3562# (4 bytes)
3563#
3564# @asl_compiler_rev: #optional revision number of the utility that created the
3565# table (4 bytes)
3566#
3567# @file: #optional colon (:) separated list of pathnames to load and
3568# concatenate as table data. The resultant binary blob is expected to
3569# have an ACPI table header. At least one file is required. This field
3570# excludes @data.
3571#
3572# @data: #optional colon (:) separated list of pathnames to load and
3573# concatenate as table data. The resultant binary blob must not have an
3574# ACPI table header. At least one file is required. This field excludes
3575# @file.
3576#
3577# Since 1.5
3578##
3579{ 'type': 'AcpiTableOptions',
3580 'data': {
3581 '*sig': 'str',
3582 '*rev': 'uint8',
3583 '*oem_id': 'str',
3584 '*oem_table_id': 'str',
3585 '*oem_rev': 'uint32',
3586 '*asl_compiler_id': 'str',
3587 '*asl_compiler_rev': 'uint32',
3588 '*file': 'str',
3589 '*data': 'str' }}
1f8f987d
AK
3590
3591##
3592# @CommandLineParameterType:
3593#
3594# Possible types for an option parameter.
3595#
3596# @string: accepts a character string
3597#
3598# @boolean: accepts "on" or "off"
3599#
3600# @number: accepts a number
3601#
3602# @size: accepts a number followed by an optional suffix (K)ilo,
3603# (M)ega, (G)iga, (T)era
3604#
3605# Since 1.5
3606##
3607{ 'enum': 'CommandLineParameterType',
3608 'data': ['string', 'boolean', 'number', 'size'] }
3609
3610##
3611# @CommandLineParameterInfo:
3612#
3613# Details about a single parameter of a command line option.
3614#
3615# @name: parameter name
3616#
3617# @type: parameter @CommandLineParameterType
3618#
3619# @help: #optional human readable text string, not suitable for parsing.
3620#
3621# Since 1.5
3622##
3623{ 'type': 'CommandLineParameterInfo',
3624 'data': { 'name': 'str',
3625 'type': 'CommandLineParameterType',
3626 '*help': 'str' } }
3627
3628##
3629# @CommandLineOptionInfo:
3630#
3631# Details about a command line option, including its list of parameter details
3632#
3633# @option: option name
3634#
3635# @parameters: an array of @CommandLineParameterInfo
3636#
3637# Since 1.5
3638##
3639{ 'type': 'CommandLineOptionInfo',
3640 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
3641
3642##
3643# @query-command-line-options:
3644#
3645# Query command line option schema.
3646#
3647# @option: #optional option name
3648#
3649# Returns: list of @CommandLineOptionInfo for all options (or for the given
3650# @option). Returns an error if the given @option doesn't exist.
3651#
3652# Since 1.5
3653##
3654{'command': 'query-command-line-options', 'data': { '*option': 'str' },
3655 'returns': ['CommandLineOptionInfo'] }
8e8aba50
EH
3656
3657##
3658# @X86CPURegister32
3659#
3660# A X86 32-bit register
3661#
3662# Since: 1.5
3663##
3664{ 'enum': 'X86CPURegister32',
3665 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
3666
3667##
3668# @X86CPUFeatureWordInfo
3669#
3670# Information about a X86 CPU feature word
3671#
3672# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
3673#
3674# @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
3675# feature word
3676#
3677# @cpuid-register: Output register containing the feature bits
3678#
3679# @features: value of output register, containing the feature bits
3680#
3681# Since: 1.5
3682##
3683{ 'type': 'X86CPUFeatureWordInfo',
3684 'data': { 'cpuid-input-eax': 'int',
3685 '*cpuid-input-ecx': 'int',
3686 'cpuid-register': 'X86CPURegister32',
3687 'features': 'int' } }
b1be4280
AK
3688
3689##
3690# @RxState:
3691#
3692# Packets receiving state
3693#
3694# @normal: filter assigned packets according to the mac-table
3695#
3696# @none: don't receive any assigned packet
3697#
3698# @all: receive all assigned packets
3699#
3700# Since: 1.6
3701##
3702{ 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
3703
3704##
3705# @RxFilterInfo:
3706#
3707# Rx-filter information for a NIC.
3708#
3709# @name: net client name
3710#
3711# @promiscuous: whether promiscuous mode is enabled
3712#
3713# @multicast: multicast receive state
3714#
3715# @unicast: unicast receive state
3716#
3717# @broadcast-allowed: whether to receive broadcast
3718#
3719# @multicast-overflow: multicast table is overflowed or not
3720#
3721# @unicast-overflow: unicast table is overflowed or not
3722#
3723# @main-mac: the main macaddr string
3724#
3725# @vlan-table: a list of active vlan id
3726#
3727# @unicast-table: a list of unicast macaddr string
3728#
3729# @multicast-table: a list of multicast macaddr string
3730#
3731# Since 1.6
3732##
3733
3734{ 'type': 'RxFilterInfo',
3735 'data': {
3736 'name': 'str',
3737 'promiscuous': 'bool',
3738 'multicast': 'RxState',
3739 'unicast': 'RxState',
3740 'broadcast-allowed': 'bool',
3741 'multicast-overflow': 'bool',
3742 'unicast-overflow': 'bool',
3743 'main-mac': 'str',
3744 'vlan-table': ['int'],
3745 'unicast-table': ['str'],
3746 'multicast-table': ['str'] }}
3747
3748##
3749# @query-rx-filter:
3750#
3751# Return rx-filter information for all NICs (or for the given NIC).
3752#
3753# @name: #optional net client name
3754#
3755# Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
3756# Returns an error if the given @name doesn't exist, or given
3757# NIC doesn't support rx-filter querying, or given net client
3758# isn't a NIC.
3759#
3760# Since: 1.6
3761##
3762{ 'command': 'query-rx-filter', 'data': { '*name': 'str' },
3763 'returns': ['RxFilterInfo'] }