Statistics
| Branch: | Revision:

root / qapi-schema.json @ feature-archipelago

History | View | Annotate | Download (124.4 kB)

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