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