]>
Commit | Line | Data |
---|---|---|
e3193601 | 1 | # -*- Mode: Python -*- |
4d8bb958 MAL |
2 | ## |
3 | # = Introduction | |
4 | # | |
5 | # This document describes all commands currently supported by QMP. | |
6 | # | |
7 | # Most of the time their usage is exactly the same as in the user Monitor, this | |
8 | # means that any other document which also describe commands (the manpage, | |
9 | # QEMU's manual, etc) can and should be consulted. | |
10 | # | |
11 | # QMP has two types of commands: regular and query commands. Regular commands | |
12 | # usually change the Virtual Machine's state someway, while query commands just | |
13 | # return information. The sections below are divided accordingly. | |
14 | # | |
15 | # It's important to observe that all communication examples are formatted in | |
16 | # a reader-friendly way, so that they're easier to understand. However, in real | |
17 | # protocol usage, they're emitted as a single line. | |
18 | # | |
19 | # Also, the following notation is used to denote data flow: | |
20 | # | |
21 | # Example: | |
22 | # | |
23 | # | -> data issued by the Client | |
24 | # | <- Server data response | |
e3193601 | 25 | # |
cfb41b88 | 26 | # Please, refer to the QMP specification (docs/interop/qmp-spec.txt) for |
4d8bb958 MAL |
27 | # detailed information on the Server command and response formats. |
28 | # | |
29 | # = Stability Considerations | |
30 | # | |
31 | # The current QMP command set (described in this file) may be useful for a | |
32 | # number of use cases, however it's limited and several commands have bad | |
33 | # defined semantics, specially with regard to command completion. | |
34 | # | |
35 | # These problems are going to be solved incrementally in the next QEMU releases | |
36 | # and we're going to establish a deprecation policy for badly defined commands. | |
37 | # | |
38 | # If you're planning to adopt QMP, please observe the following: | |
39 | # | |
40 | # 1. The deprecation policy will take effect and be documented soon, please | |
41 | # check the documentation of each used command as soon as a new release of | |
42 | # QEMU is available | |
43 | # | |
44 | # 2. DO NOT rely on anything which is not explicit documented | |
45 | # | |
46 | # 3. Errors, in special, are not documented. Applications should NOT check | |
47 | # for specific errors classes or data (it's strongly recommended to only | |
48 | # check for the "error" key) | |
49 | # | |
50 | ## | |
48a32bed | 51 | |
bc52d03f MA |
52 | { 'pragma': { 'doc-required': true } } |
53 | ||
1554a8fa MA |
54 | # Whitelists to permit QAPI rule violations; think twice before you |
55 | # add to them! | |
56 | { 'pragma': { | |
57 | # Commands allowed to return a non-dictionary: | |
58 | 'returns-whitelist': [ | |
59 | 'human-monitor-command', | |
60 | 'qom-get', | |
61 | 'query-migrate-cache-size', | |
62 | 'query-tpm-models', | |
63 | 'query-tpm-types', | |
2cfbae3c MA |
64 | 'ringbuf-read' ], |
65 | 'name-case-whitelist': [ | |
66 | 'ACPISlotType', # DIMM, visible through query-acpi-ospm-status | |
67 | 'CpuInfoMIPS', # PC, visible through query-cpu | |
68 | 'CpuInfoTricore', # PC, visible through query-cpu | |
69 | 'QapiErrorClass', # all members, visible through errors | |
70 | 'UuidInfo', # UUID, visible through query-uuid | |
71 | 'X86CPURegister32', # all members, visible indirectly through qom-get | |
72 | 'q_obj_CpuInfo-base' # CPU, visible through query-cpu | |
73 | ] } } | |
1554a8fa | 74 | |
211e5063 MA |
75 | # Documentation generated with qapi2texi.py is in source order, with |
76 | # included sub-schemas inserted at the first include directive | |
77 | # (subsequent include directives have no effect). To get a sane and | |
78 | # stable order, it's best to include each sub-schema just once, or | |
79 | # include it first in qapi-schema.json. | |
104059da | 80 | |
211e5063 | 81 | { 'include': 'qapi/common.json' } |
a2ff5a48 | 82 | { 'include': 'qapi/sockets.json' } |
a090187d | 83 | { 'include': 'qapi/crypto.json' } |
5db15096 | 84 | { 'include': 'qapi/block.json' } |
c7a4e0c4 | 85 | { 'include': 'qapi/rocker.json' } |
82d72d9d | 86 | { 'include': 'qapi/event.json' } |
1dde0f48 | 87 | { 'include': 'qapi/trace.json' } |
39a18158 MA |
88 | { 'include': 'qapi/introspect.json' } |
89 | ||
d3a48372 MAL |
90 | ## |
91 | # = QMP commands | |
92 | ## | |
93 | ||
119ebac1 MAL |
94 | ## |
95 | # @qmp_capabilities: | |
96 | # | |
97 | # Enable QMP capabilities. | |
98 | # | |
99 | # Arguments: None. | |
100 | # | |
101 | # Example: | |
102 | # | |
103 | # -> { "execute": "qmp_capabilities" } | |
104 | # <- { "return": {} } | |
105 | # | |
106 | # Notes: This command is valid exactly when first connecting: it must be | |
107 | # issued before any other command will be accepted, and will fail once the | |
cfb41b88 | 108 | # monitor is accepting other commands. (see qemu docs/interop/qmp-spec.txt) |
119ebac1 MAL |
109 | # |
110 | # Since: 0.13 | |
111 | # | |
112 | ## | |
113 | { 'command': 'qmp_capabilities' } | |
114 | ||
01fa5598 MA |
115 | ## |
116 | # @StrOrNull: | |
117 | # | |
118 | # This is a string value or the explicit lack of a string (null | |
119 | # pointer in C). Intended for cases when 'optional absent' already | |
120 | # has a different meaning. | |
121 | # | |
122 | # @s: the string value | |
123 | # @n: no string value | |
124 | # | |
125 | # Since: 2.10 | |
126 | ## | |
127 | { 'alternate': 'StrOrNull', | |
128 | 'data': { 's': 'str', | |
129 | 'n': 'null' } } | |
130 | ||
104059da | 131 | ## |
801db5ec | 132 | # @LostTickPolicy: |
104059da PB |
133 | # |
134 | # Policy for handling lost ticks in timer devices. | |
135 | # | |
136 | # @discard: throw away the missed tick(s) and continue with future injection | |
137 | # normally. Guest time may be delayed, unless the OS has explicit | |
138 | # handling of lost ticks | |
139 | # | |
140 | # @delay: continue to deliver ticks at the normal rate. Guest time will be | |
141 | # delayed due to the late tick | |
142 | # | |
143 | # @merge: merge the missed tick(s) into one tick and inject. Guest time | |
144 | # may be delayed, depending on how the OS reacts to the merging | |
145 | # of ticks | |
146 | # | |
147 | # @slew: deliver ticks at a higher rate to catch up with the missed tick. The | |
148 | # guest time should not be delayed once catchup is complete. | |
149 | # | |
150 | # Since: 2.0 | |
151 | ## | |
152 | { 'enum': 'LostTickPolicy', | |
153 | 'data': ['discard', 'delay', 'merge', 'slew' ] } | |
154 | ||
49687ace | 155 | ## |
5072f7b3 | 156 | # @add_client: |
b224e5e2 LC |
157 | # |
158 | # Allow client connections for VNC, Spice and socket based | |
159 | # character devices to be passed in to QEMU via SCM_RIGHTS. | |
160 | # | |
161 | # @protocol: protocol name. Valid names are "vnc", "spice" or the | |
162 | # name of a character device (eg. from -chardev id=XXXX) | |
163 | # | |
164 | # @fdname: file descriptor name previously passed via 'getfd' command | |
165 | # | |
1d8bda12 | 166 | # @skipauth: whether to skip authentication. Only applies |
b224e5e2 LC |
167 | # to "vnc" and "spice" protocols |
168 | # | |
1d8bda12 | 169 | # @tls: whether to perform TLS. Only applies to the "spice" |
b224e5e2 LC |
170 | # protocol |
171 | # | |
172 | # Returns: nothing on success. | |
173 | # | |
174 | # Since: 0.14.0 | |
65ce54f5 MAL |
175 | # |
176 | # Example: | |
177 | # | |
178 | # -> { "execute": "add_client", "arguments": { "protocol": "vnc", | |
179 | # "fdname": "myclient" } } | |
180 | # <- { "return": {} } | |
181 | # | |
b224e5e2 LC |
182 | ## |
183 | { 'command': 'add_client', | |
184 | 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool', | |
185 | '*tls': 'bool' } } | |
186 | ||
48a32bed AL |
187 | ## |
188 | # @NameInfo: | |
189 | # | |
190 | # Guest name information. | |
191 | # | |
1d8bda12 | 192 | # @name: The name of the guest |
48a32bed | 193 | # |
5072f7b3 | 194 | # Since: 0.14.0 |
48a32bed | 195 | ## |
895a2a80 | 196 | { 'struct': 'NameInfo', 'data': {'*name': 'str'} } |
48a32bed AL |
197 | |
198 | ## | |
199 | # @query-name: | |
200 | # | |
201 | # Return the name information of a guest. | |
202 | # | |
203 | # Returns: @NameInfo of the guest | |
204 | # | |
5072f7b3 | 205 | # Since: 0.14.0 |
3aa4c6cd MAL |
206 | # |
207 | # Example: | |
208 | # | |
209 | # -> { "execute": "query-name" } | |
210 | # <- { "return": { "name": "qemu-name" } } | |
211 | # | |
48a32bed AL |
212 | ## |
213 | { 'command': 'query-name', 'returns': 'NameInfo' } | |
b9c15f16 | 214 | |
292a2602 LC |
215 | ## |
216 | # @KvmInfo: | |
217 | # | |
218 | # Information about support for KVM acceleration | |
219 | # | |
220 | # @enabled: true if KVM acceleration is active | |
221 | # | |
222 | # @present: true if KVM acceleration is built into this executable | |
223 | # | |
224 | # Since: 0.14.0 | |
225 | ## | |
895a2a80 | 226 | { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} } |
292a2602 LC |
227 | |
228 | ## | |
229 | # @query-kvm: | |
230 | # | |
231 | # Returns information about KVM acceleration | |
232 | # | |
233 | # Returns: @KvmInfo | |
234 | # | |
235 | # Since: 0.14.0 | |
b4f65cd2 MAL |
236 | # |
237 | # Example: | |
238 | # | |
239 | # -> { "execute": "query-kvm" } | |
240 | # <- { "return": { "enabled": true, "present": true } } | |
241 | # | |
292a2602 LC |
242 | ## |
243 | { 'command': 'query-kvm', 'returns': 'KvmInfo' } | |
244 | ||
1fa9a5e4 | 245 | ## |
5072f7b3 | 246 | # @RunState: |
1fa9a5e4 | 247 | # |
6932a69b | 248 | # An enumeration of VM run states. |
1fa9a5e4 LC |
249 | # |
250 | # @debug: QEMU is running on a debugger | |
251 | # | |
0a24c7b1 LC |
252 | # @finish-migrate: guest is paused to finish the migration process |
253 | # | |
1e998146 PB |
254 | # @inmigrate: guest is paused waiting for an incoming migration. Note |
255 | # that this state does not tell whether the machine will start at the | |
256 | # end of the migration. This depends on the command-line -S option and | |
257 | # any invocation of 'stop' or 'cont' that has happened since QEMU was | |
258 | # started. | |
1fa9a5e4 LC |
259 | # |
260 | # @internal-error: An internal error that prevents further guest execution | |
261 | # has occurred | |
262 | # | |
263 | # @io-error: the last IOP has failed and the device is configured to pause | |
264 | # on I/O errors | |
265 | # | |
266 | # @paused: guest has been paused via the 'stop' command | |
267 | # | |
268 | # @postmigrate: guest is paused following a successful 'migrate' | |
269 | # | |
270 | # @prelaunch: QEMU was started with -S and guest has not started | |
271 | # | |
1fa9a5e4 LC |
272 | # @restore-vm: guest is paused to restore VM state |
273 | # | |
274 | # @running: guest is actively running | |
275 | # | |
276 | # @save-vm: guest is paused to save the VM state | |
277 | # | |
278 | # @shutdown: guest is shut down (and -no-shutdown is in use) | |
279 | # | |
ad02b96a LC |
280 | # @suspended: guest is suspended (ACPI S3) |
281 | # | |
1fa9a5e4 | 282 | # @watchdog: the watchdog action is configured to pause and has been triggered |
ede085b3 HT |
283 | # |
284 | # @guest-panicked: guest has been panicked as a result of guest OS panic | |
21142ba7 | 285 | # |
252093a7 HZ |
286 | # @colo: guest is paused to save/restore VM state under colo checkpoint, |
287 | # VM can not get into this state unless colo capability is enabled | |
288 | # for migration. (since 2.8) | |
1fa9a5e4 LC |
289 | ## |
290 | { 'enum': 'RunState', | |
291 | 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused', | |
292 | 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm', | |
ede085b3 | 293 | 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog', |
21142ba7 | 294 | 'guest-panicked', 'colo' ] } |
1fa9a5e4 LC |
295 | |
296 | ## | |
297 | # @StatusInfo: | |
298 | # | |
299 | # Information about VCPU run state | |
300 | # | |
301 | # @running: true if all VCPUs are runnable, false if not runnable | |
302 | # | |
303 | # @singlestep: true if VCPUs are in single-step mode | |
304 | # | |
305 | # @status: the virtual machine @RunState | |
306 | # | |
307 | # Since: 0.14.0 | |
308 | # | |
309 | # Notes: @singlestep is enabled through the GDB stub | |
310 | ## | |
895a2a80 | 311 | { 'struct': 'StatusInfo', |
1fa9a5e4 LC |
312 | 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} } |
313 | ||
314 | ## | |
315 | # @query-status: | |
316 | # | |
317 | # Query the run status of all VCPUs | |
318 | # | |
319 | # Returns: @StatusInfo reflecting all VCPUs | |
320 | # | |
321 | # Since: 0.14.0 | |
477bc1e4 MAL |
322 | # |
323 | # Example: | |
324 | # | |
325 | # -> { "execute": "query-status" } | |
326 | # <- { "return": { "running": true, | |
327 | # "singlestep": false, | |
328 | # "status": "running" } } | |
329 | # | |
1fa9a5e4 LC |
330 | ## |
331 | { 'command': 'query-status', 'returns': 'StatusInfo' } | |
332 | ||
efab767e LC |
333 | ## |
334 | # @UuidInfo: | |
335 | # | |
0ed90f77 | 336 | # Guest UUID information (Universally Unique Identifier). |
efab767e LC |
337 | # |
338 | # @UUID: the UUID of the guest | |
339 | # | |
340 | # Since: 0.14.0 | |
341 | # | |
342 | # Notes: If no UUID was specified for the guest, a null UUID is returned. | |
343 | ## | |
895a2a80 | 344 | { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} } |
efab767e LC |
345 | |
346 | ## | |
347 | # @query-uuid: | |
348 | # | |
349 | # Query the guest UUID information. | |
350 | # | |
351 | # Returns: The @UuidInfo for the guest | |
352 | # | |
5072f7b3 | 353 | # Since: 0.14.0 |
0ed90f77 MAL |
354 | # |
355 | # Example: | |
356 | # | |
357 | # -> { "execute": "query-uuid" } | |
358 | # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } } | |
359 | # | |
efab767e LC |
360 | ## |
361 | { 'command': 'query-uuid', 'returns': 'UuidInfo' } | |
362 | ||
c5a415a0 LC |
363 | ## |
364 | # @ChardevInfo: | |
365 | # | |
366 | # Information about a character device. | |
367 | # | |
368 | # @label: the label of the character device | |
369 | # | |
370 | # @filename: the filename of the character device | |
371 | # | |
32a97ea1 LE |
372 | # @frontend-open: shows whether the frontend device attached to this backend |
373 | # (eg. with the chardev=... option) is in open or closed state | |
374 | # (since 2.1) | |
375 | # | |
c5a415a0 LC |
376 | # Notes: @filename is encoded using the QEMU command line character device |
377 | # encoding. See the QEMU man page for details. | |
378 | # | |
379 | # Since: 0.14.0 | |
380 | ## | |
895a2a80 | 381 | { 'struct': 'ChardevInfo', 'data': {'label': 'str', |
32a97ea1 LE |
382 | 'filename': 'str', |
383 | 'frontend-open': 'bool'} } | |
c5a415a0 LC |
384 | |
385 | ## | |
386 | # @query-chardev: | |
387 | # | |
388 | # Returns information about current character devices. | |
389 | # | |
390 | # Returns: a list of @ChardevInfo | |
391 | # | |
392 | # Since: 0.14.0 | |
4055aa8d MAL |
393 | # |
394 | # Example: | |
395 | # | |
396 | # -> { "execute": "query-chardev" } | |
397 | # <- { | |
398 | # "return": [ | |
399 | # { | |
400 | # "label": "charchannel0", | |
401 | # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server", | |
402 | # "frontend-open": false | |
403 | # }, | |
404 | # { | |
405 | # "label": "charmonitor", | |
406 | # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server", | |
407 | # "frontend-open": true | |
408 | # }, | |
409 | # { | |
410 | # "label": "charserial0", | |
411 | # "filename": "pty:/dev/pts/2", | |
412 | # "frontend-open": true | |
413 | # } | |
414 | # ] | |
415 | # } | |
416 | # | |
c5a415a0 LC |
417 | ## |
418 | { 'command': 'query-chardev', 'returns': ['ChardevInfo'] } | |
aa9b79bc | 419 | |
77d1c3c6 MK |
420 | ## |
421 | # @ChardevBackendInfo: | |
422 | # | |
423 | # Information about a character device backend | |
424 | # | |
425 | # @name: The backend name | |
426 | # | |
427 | # Since: 2.0 | |
428 | ## | |
895a2a80 | 429 | { 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} } |
77d1c3c6 MK |
430 | |
431 | ## | |
432 | # @query-chardev-backends: | |
433 | # | |
434 | # Returns information about character device backends. | |
435 | # | |
436 | # Returns: a list of @ChardevBackendInfo | |
437 | # | |
438 | # Since: 2.0 | |
90e365c0 MAL |
439 | # |
440 | # Example: | |
441 | # | |
442 | # -> { "execute": "query-chardev-backends" } | |
443 | # <- { | |
444 | # "return":[ | |
445 | # { | |
446 | # "name":"udp" | |
447 | # }, | |
448 | # { | |
449 | # "name":"tcp" | |
450 | # }, | |
451 | # { | |
452 | # "name":"unix" | |
453 | # }, | |
454 | # { | |
455 | # "name":"spiceport" | |
456 | # } | |
457 | # ] | |
458 | # } | |
459 | # | |
77d1c3c6 MK |
460 | ## |
461 | { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] } | |
462 | ||
1f590cf9 LL |
463 | ## |
464 | # @DataFormat: | |
465 | # | |
466 | # An enumeration of data format. | |
467 | # | |
3949e594 | 468 | # @utf8: Data is a UTF-8 string (RFC 3629) |
1f590cf9 | 469 | # |
3949e594 | 470 | # @base64: Data is Base64 encoded binary (RFC 3548) |
1f590cf9 LL |
471 | # |
472 | # Since: 1.4 | |
473 | ## | |
ad0f171e | 474 | { 'enum': 'DataFormat', |
1f590cf9 LL |
475 | 'data': [ 'utf8', 'base64' ] } |
476 | ||
477 | ## | |
3949e594 | 478 | # @ringbuf-write: |
1f590cf9 | 479 | # |
3949e594 | 480 | # Write to a ring buffer character device. |
1f590cf9 | 481 | # |
3949e594 | 482 | # @device: the ring buffer character device name |
1f590cf9 | 483 | # |
3949e594 | 484 | # @data: data to write |
1f590cf9 | 485 | # |
1d8bda12 | 486 | # @format: data encoding (default 'utf8'). |
3949e594 MA |
487 | # - base64: data must be base64 encoded text. Its binary |
488 | # decoding gets written. | |
3949e594 MA |
489 | # - utf8: data's UTF-8 encoding is written |
490 | # - data itself is always Unicode regardless of format, like | |
491 | # any other string. | |
1f590cf9 LL |
492 | # |
493 | # Returns: Nothing on success | |
1f590cf9 LL |
494 | # |
495 | # Since: 1.4 | |
a4143a84 MAL |
496 | # |
497 | # Example: | |
498 | # | |
499 | # -> { "execute": "ringbuf-write", | |
500 | # "arguments": { "device": "foo", | |
501 | # "data": "abcdefgh", | |
502 | # "format": "utf8" } } | |
503 | # <- { "return": {} } | |
504 | # | |
1f590cf9 | 505 | ## |
3949e594 | 506 | { 'command': 'ringbuf-write', |
82e59a67 | 507 | 'data': {'device': 'str', 'data': 'str', |
1f590cf9 LL |
508 | '*format': 'DataFormat'} } |
509 | ||
49b6d722 | 510 | ## |
3949e594 | 511 | # @ringbuf-read: |
49b6d722 | 512 | # |
3949e594 | 513 | # Read from a ring buffer character device. |
49b6d722 | 514 | # |
3949e594 | 515 | # @device: the ring buffer character device name |
49b6d722 | 516 | # |
3949e594 | 517 | # @size: how many bytes to read at most |
49b6d722 | 518 | # |
1d8bda12 | 519 | # @format: data encoding (default 'utf8'). |
3949e594 MA |
520 | # - base64: the data read is returned in base64 encoding. |
521 | # - utf8: the data read is interpreted as UTF-8. | |
522 | # Bug: can screw up when the buffer contains invalid UTF-8 | |
523 | # sequences, NUL characters, after the ring buffer lost | |
524 | # data, and when reading stops because the size limit is | |
525 | # reached. | |
526 | # - The return value is always Unicode regardless of format, | |
527 | # like any other string. | |
49b6d722 | 528 | # |
3ab651fc | 529 | # Returns: data read from the device |
49b6d722 LL |
530 | # |
531 | # Since: 1.4 | |
4f19a01b MAL |
532 | # |
533 | # Example: | |
534 | # | |
535 | # -> { "execute": "ringbuf-read", | |
536 | # "arguments": { "device": "foo", | |
537 | # "size": 1000, | |
538 | # "format": "utf8" } } | |
539 | # <- { "return": "abcdefgh" } | |
540 | # | |
49b6d722 | 541 | ## |
3949e594 | 542 | { 'command': 'ringbuf-read', |
49b6d722 | 543 | 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'}, |
3ab651fc | 544 | 'returns': 'str' } |
49b6d722 | 545 | |
4860853d DB |
546 | ## |
547 | # @EventInfo: | |
548 | # | |
549 | # Information about a QMP event | |
550 | # | |
551 | # @name: The event name | |
552 | # | |
553 | # Since: 1.2.0 | |
554 | ## | |
895a2a80 | 555 | { 'struct': 'EventInfo', 'data': {'name': 'str'} } |
4860853d DB |
556 | |
557 | ## | |
558 | # @query-events: | |
559 | # | |
560 | # Return a list of supported QMP events by this server | |
561 | # | |
562 | # Returns: A list of @EventInfo for all supported events | |
563 | # | |
564 | # Since: 1.2.0 | |
66c2f5a5 MAL |
565 | # |
566 | # Example: | |
567 | # | |
568 | # -> { "execute": "query-events" } | |
569 | # <- { | |
570 | # "return": [ | |
571 | # { | |
572 | # "name":"SHUTDOWN" | |
573 | # }, | |
574 | # { | |
575 | # "name":"RESET" | |
576 | # } | |
577 | # ] | |
578 | # } | |
579 | # | |
580 | # Note: This example has been shortened as the real response is too long. | |
581 | # | |
4860853d DB |
582 | ## |
583 | { 'command': 'query-events', 'returns': ['EventInfo'] } | |
584 | ||
791e7c82 | 585 | ## |
5072f7b3 | 586 | # @MigrationStats: |
791e7c82 LC |
587 | # |
588 | # Detailed migration status. | |
589 | # | |
590 | # @transferred: amount of bytes already transferred to the target VM | |
591 | # | |
592 | # @remaining: amount of bytes remaining to be transferred to the target VM | |
593 | # | |
594 | # @total: total amount of bytes involved in the migration process | |
595 | # | |
f1c72795 PL |
596 | # @duplicate: number of duplicate (zero) pages (since 1.2) |
597 | # | |
598 | # @skipped: number of skipped zero pages (since 1.5) | |
004d4c10 | 599 | # |
5072f7b3 | 600 | # @normal: number of normal pages (since 1.2) |
004d4c10 | 601 | # |
8d017193 JQ |
602 | # @normal-bytes: number of normal bytes sent (since 1.2) |
603 | # | |
604 | # @dirty-pages-rate: number of pages dirtied by second by the | |
605 | # guest (since 1.3) | |
004d4c10 | 606 | # |
7e114f8c MH |
607 | # @mbps: throughput in megabits/sec. (since 1.6) |
608 | # | |
58570ed8 C |
609 | # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1) |
610 | # | |
d3bf5418 DDAG |
611 | # @postcopy-requests: The number of page requests received from the destination |
612 | # (since 2.7) | |
613 | # | |
030ce1f8 CF |
614 | # @page-size: The number of bytes per page for the various page-based |
615 | # statistics (since 2.10) | |
616 | # | |
004d4c10 | 617 | # Since: 0.14.0 |
791e7c82 | 618 | ## |
895a2a80 | 619 | { 'struct': 'MigrationStats', |
d5f8a570 | 620 | 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' , |
f1c72795 | 621 | 'duplicate': 'int', 'skipped': 'int', 'normal': 'int', |
7e114f8c | 622 | 'normal-bytes': 'int', 'dirty-pages-rate' : 'int', |
d3bf5418 | 623 | 'mbps' : 'number', 'dirty-sync-count' : 'int', |
030ce1f8 | 624 | 'postcopy-requests' : 'int', 'page-size' : 'int' } } |
791e7c82 | 625 | |
f36d55af | 626 | ## |
5072f7b3 | 627 | # @XBZRLECacheStats: |
f36d55af OW |
628 | # |
629 | # Detailed XBZRLE migration cache statistics | |
630 | # | |
631 | # @cache-size: XBZRLE cache size | |
632 | # | |
633 | # @bytes: amount of bytes already transferred to the target VM | |
634 | # | |
635 | # @pages: amount of pages transferred to the target VM | |
636 | # | |
637 | # @cache-miss: number of cache miss | |
638 | # | |
8bc39233 C |
639 | # @cache-miss-rate: rate of cache miss (since 2.1) |
640 | # | |
f36d55af OW |
641 | # @overflow: number of overflows |
642 | # | |
643 | # Since: 1.2 | |
644 | ## | |
895a2a80 | 645 | { 'struct': 'XBZRLECacheStats', |
f36d55af | 646 | 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int', |
8bc39233 C |
647 | 'cache-miss': 'int', 'cache-miss-rate': 'number', |
648 | 'overflow': 'int' } } | |
f36d55af | 649 | |
49687ace | 650 | ## |
24b8c39b HZ |
651 | # @MigrationStatus: |
652 | # | |
653 | # An enumeration of migration status. | |
654 | # | |
655 | # @none: no migration has ever happened. | |
656 | # | |
657 | # @setup: migration process has been initiated. | |
658 | # | |
659 | # @cancelling: in the process of cancelling migration. | |
660 | # | |
661 | # @cancelled: cancelling migration is finished. | |
662 | # | |
663 | # @active: in the process of doing migration. | |
664 | # | |
9ec055ae DDAG |
665 | # @postcopy-active: like active, but now in postcopy mode. (since 2.5) |
666 | # | |
24b8c39b HZ |
667 | # @completed: migration is finished. |
668 | # | |
669 | # @failed: some error occurred during migration process. | |
670 | # | |
252093a7 HZ |
671 | # @colo: VM is in the process of fault tolerance, VM can not get into this |
672 | # state unless colo capability is enabled for migration. (since 2.8) | |
0b827d5e | 673 | # |
24b8c39b HZ |
674 | # Since: 2.3 |
675 | # | |
676 | ## | |
677 | { 'enum': 'MigrationStatus', | |
678 | 'data': [ 'none', 'setup', 'cancelling', 'cancelled', | |
0b827d5e | 679 | 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] } |
24b8c39b | 680 | |
791e7c82 | 681 | ## |
5072f7b3 | 682 | # @MigrationInfo: |
791e7c82 LC |
683 | # |
684 | # Information about current migration process. | |
685 | # | |
1d8bda12 | 686 | # @status: @MigrationStatus describing the current migration status. |
24b8c39b | 687 | # If this field is not returned, no migration process |
791e7c82 LC |
688 | # has been initiated |
689 | # | |
1d8bda12 | 690 | # @ram: @MigrationStats containing detailed migration |
d5f8a570 | 691 | # status, only returned if status is 'active' or |
24b8c39b | 692 | # 'completed'(since 1.2) |
791e7c82 | 693 | # |
1d8bda12 | 694 | # @disk: @MigrationStats containing detailed disk migration |
791e7c82 LC |
695 | # status, only returned if status is 'active' and it is a block |
696 | # migration | |
697 | # | |
1d8bda12 | 698 | # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE |
f36d55af OW |
699 | # migration statistics, only returned if XBZRLE feature is on and |
700 | # status is 'active' or 'completed' (since 1.2) | |
701 | # | |
1d8bda12 | 702 | # @total-time: total amount of milliseconds since migration started. |
7aa939af JQ |
703 | # If migration has ended, it returns the total migration |
704 | # time. (since 1.2) | |
705 | # | |
1d8bda12 | 706 | # @downtime: only present when migration finishes correctly |
9c5a9fcf JQ |
707 | # total downtime in milliseconds for the guest. |
708 | # (since 1.3) | |
709 | # | |
1d8bda12 | 710 | # @expected-downtime: only present while migration is active |
2c52ddf1 JQ |
711 | # expected downtime in milliseconds for the guest in last walk |
712 | # of the dirty bitmap. (since 1.3) | |
713 | # | |
1d8bda12 | 714 | # @setup-time: amount of setup time in milliseconds _before_ the |
ed4fbd10 MH |
715 | # iterations begin but _after_ the QMP command is issued. This is designed |
716 | # to provide an accounting of any activities (such as RDMA pinning) which | |
717 | # may be expensive, but do not actually occur during the iterative | |
718 | # migration rounds themselves. (since 1.6) | |
719 | # | |
1d8bda12 | 720 | # @cpu-throttle-percentage: percentage of time guest cpus are being |
d85a31d1 JH |
721 | # throttled during auto-converge. This is only present when auto-converge |
722 | # has started throttling guest cpus. (Since 2.7) | |
4782893e | 723 | # |
1d8bda12 | 724 | # @error-desc: the human readable error description string, when |
d59ce6f3 | 725 | # @status is 'failed'. Clients should not attempt to parse the |
bdbba12b | 726 | # error strings. (Since 2.7) |
d59ce6f3 | 727 | # |
791e7c82 LC |
728 | # Since: 0.14.0 |
729 | ## | |
895a2a80 | 730 | { 'struct': 'MigrationInfo', |
24b8c39b | 731 | 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats', |
f36d55af | 732 | '*disk': 'MigrationStats', |
7aa939af | 733 | '*xbzrle-cache': 'XBZRLECacheStats', |
9c5a9fcf | 734 | '*total-time': 'int', |
2c52ddf1 | 735 | '*expected-downtime': 'int', |
ed4fbd10 | 736 | '*downtime': 'int', |
4782893e | 737 | '*setup-time': 'int', |
d59ce6f3 DB |
738 | '*cpu-throttle-percentage': 'int', |
739 | '*error-desc': 'str'} } | |
791e7c82 LC |
740 | |
741 | ## | |
5072f7b3 | 742 | # @query-migrate: |
791e7c82 | 743 | # |
104b1caf MAL |
744 | # Returns information about current migration process. If migration |
745 | # is active there will be another json-object with RAM migration | |
746 | # status and if block migration is active another one with block | |
747 | # migration status. | |
791e7c82 LC |
748 | # |
749 | # Returns: @MigrationInfo | |
750 | # | |
751 | # Since: 0.14.0 | |
104b1caf MAL |
752 | # |
753 | # Example: | |
754 | # | |
755 | # 1. Before the first migration | |
756 | # | |
757 | # -> { "execute": "query-migrate" } | |
758 | # <- { "return": {} } | |
759 | # | |
760 | # 2. Migration is done and has succeeded | |
761 | # | |
762 | # -> { "execute": "query-migrate" } | |
763 | # <- { "return": { | |
764 | # "status": "completed", | |
765 | # "ram":{ | |
766 | # "transferred":123, | |
767 | # "remaining":123, | |
768 | # "total":246, | |
769 | # "total-time":12345, | |
770 | # "setup-time":12345, | |
771 | # "downtime":12345, | |
772 | # "duplicate":123, | |
773 | # "normal":123, | |
774 | # "normal-bytes":123456, | |
775 | # "dirty-sync-count":15 | |
776 | # } | |
777 | # } | |
778 | # } | |
779 | # | |
780 | # 3. Migration is done and has failed | |
781 | # | |
782 | # -> { "execute": "query-migrate" } | |
783 | # <- { "return": { "status": "failed" } } | |
784 | # | |
785 | # 4. Migration is being performed and is not a block migration: | |
786 | # | |
787 | # -> { "execute": "query-migrate" } | |
788 | # <- { | |
789 | # "return":{ | |
790 | # "status":"active", | |
791 | # "ram":{ | |
792 | # "transferred":123, | |
793 | # "remaining":123, | |
794 | # "total":246, | |
795 | # "total-time":12345, | |
796 | # "setup-time":12345, | |
797 | # "expected-downtime":12345, | |
798 | # "duplicate":123, | |
799 | # "normal":123, | |
800 | # "normal-bytes":123456, | |
801 | # "dirty-sync-count":15 | |
802 | # } | |
803 | # } | |
804 | # } | |
805 | # | |
806 | # 5. Migration is being performed and is a block migration: | |
807 | # | |
808 | # -> { "execute": "query-migrate" } | |
809 | # <- { | |
810 | # "return":{ | |
811 | # "status":"active", | |
812 | # "ram":{ | |
813 | # "total":1057024, | |
814 | # "remaining":1053304, | |
815 | # "transferred":3720, | |
816 | # "total-time":12345, | |
817 | # "setup-time":12345, | |
818 | # "expected-downtime":12345, | |
819 | # "duplicate":123, | |
820 | # "normal":123, | |
821 | # "normal-bytes":123456, | |
822 | # "dirty-sync-count":15 | |
823 | # }, | |
824 | # "disk":{ | |
825 | # "total":20971520, | |
826 | # "remaining":20880384, | |
827 | # "transferred":91136 | |
828 | # } | |
829 | # } | |
830 | # } | |
831 | # | |
832 | # 6. Migration is being performed and XBZRLE is active: | |
833 | # | |
834 | # -> { "execute": "query-migrate" } | |
835 | # <- { | |
836 | # "return":{ | |
837 | # "status":"active", | |
838 | # "capabilities" : [ { "capability": "xbzrle", "state" : true } ], | |
839 | # "ram":{ | |
840 | # "total":1057024, | |
841 | # "remaining":1053304, | |
842 | # "transferred":3720, | |
843 | # "total-time":12345, | |
844 | # "setup-time":12345, | |
845 | # "expected-downtime":12345, | |
846 | # "duplicate":10, | |
847 | # "normal":3333, | |
848 | # "normal-bytes":3412992, | |
849 | # "dirty-sync-count":15 | |
850 | # }, | |
851 | # "xbzrle-cache":{ | |
852 | # "cache-size":67108864, | |
853 | # "bytes":20971520, | |
854 | # "pages":2444343, | |
855 | # "cache-miss":2244, | |
856 | # "cache-miss-rate":0.123, | |
857 | # "overflow":34434 | |
858 | # } | |
859 | # } | |
860 | # } | |
861 | # | |
791e7c82 LC |
862 | ## |
863 | { 'command': 'query-migrate', 'returns': 'MigrationInfo' } | |
864 | ||
bbf6da32 | 865 | ## |
5072f7b3 | 866 | # @MigrationCapability: |
bbf6da32 OW |
867 | # |
868 | # Migration capabilities enumeration | |
869 | # | |
870 | # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding). | |
871 | # This feature allows us to minimize migration traffic for certain work | |
872 | # loads, by sending compressed difference of the pages | |
873 | # | |
41310c68 | 874 | # @rdma-pin-all: Controls whether or not the entire VM memory footprint is |
60d9222c | 875 | # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage. |
41310c68 | 876 | # Disabled by default. (since 2.0) |
60d9222c | 877 | # |
323004a3 PL |
878 | # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This |
879 | # essentially saves 1MB of zeroes per block on the wire. Enabling requires | |
880 | # source and target VM to support this feature. To enable it is sufficient | |
881 | # to enable the capability on the source VM. The feature is disabled by | |
882 | # default. (since 1.6) | |
883 | # | |
dde4e694 LL |
884 | # @compress: Use multiple compression threads to accelerate live migration. |
885 | # This feature can help to reduce the migration traffic, by sending | |
886 | # compressed pages. Please note that if compress and xbzrle are both | |
887 | # on, compress only takes effect in the ram bulk stage, after that, | |
888 | # it will be disabled and only xbzrle takes effect, this can help to | |
889 | # minimize migration traffic. The feature is disabled by default. | |
890 | # (since 2.4 ) | |
891 | # | |
b05dc723 JQ |
892 | # @events: generate events for each migration state change |
893 | # (since 2.4 ) | |
894 | # | |
9781c371 JQ |
895 | # @auto-converge: If enabled, QEMU will automatically throttle down the guest |
896 | # to speed up convergence of RAM migration. (since 1.6) | |
897 | # | |
32c3db5b | 898 | # @postcopy-ram: Start executing on the migration target before all of RAM has |
53dd370c | 899 | # been migrated, pulling the remaining pages along as needed. NOTE: If |
32c3db5b | 900 | # the migration fails during postcopy the VM will fail. (since 2.6) |
53dd370c | 901 | # |
35a6ed4f HZ |
902 | # @x-colo: If enabled, migration will never end, and the state of the VM on the |
903 | # primary side will be migrated continuously to the VM on secondary | |
904 | # side, this process is called COarse-Grain LOck Stepping (COLO) for | |
905 | # Non-stop Service. (since 2.8) | |
906 | # | |
53f09a10 PB |
907 | # @release-ram: if enabled, qemu will free the migrated ram pages on the source |
908 | # during postcopy-ram migration. (since 2.9) | |
909 | # | |
2833c59b JQ |
910 | # @block: If enabled, QEMU will also migrate the contents of all block |
911 | # devices. Default is disabled. A possible alternative uses | |
912 | # mirror jobs to a builtin NBD server on the destination, which | |
913 | # offers more flexibility. | |
914 | # (Since 2.10) | |
915 | # | |
c788ada8 PX |
916 | # @return-path: If enabled, migration will use the return path even |
917 | # for precopy. (since 2.10) | |
918 | # | |
bbf6da32 OW |
919 | # Since: 1.2 |
920 | ## | |
921 | { 'enum': 'MigrationCapability', | |
dde4e694 | 922 | 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', |
2833c59b | 923 | 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram', |
c788ada8 | 924 | 'block', 'return-path' ] } |
bbf6da32 OW |
925 | |
926 | ## | |
5072f7b3 | 927 | # @MigrationCapabilityStatus: |
bbf6da32 OW |
928 | # |
929 | # Migration capability information | |
930 | # | |
931 | # @capability: capability enum | |
932 | # | |
933 | # @state: capability state bool | |
934 | # | |
935 | # Since: 1.2 | |
936 | ## | |
895a2a80 | 937 | { 'struct': 'MigrationCapabilityStatus', |
bbf6da32 OW |
938 | 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } } |
939 | ||
940 | ## | |
5072f7b3 | 941 | # @migrate-set-capabilities: |
00458433 OW |
942 | # |
943 | # Enable/Disable the following migration capabilities (like xbzrle) | |
944 | # | |
945 | # @capabilities: json array of capability modifications to make | |
946 | # | |
947 | # Since: 1.2 | |
0a0bb964 MAL |
948 | # |
949 | # Example: | |
950 | # | |
951 | # -> { "execute": "migrate-set-capabilities" , "arguments": | |
952 | # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } } | |
953 | # | |
00458433 OW |
954 | ## |
955 | { 'command': 'migrate-set-capabilities', | |
956 | 'data': { 'capabilities': ['MigrationCapabilityStatus'] } } | |
957 | ||
958 | ## | |
5072f7b3 | 959 | # @query-migrate-capabilities: |
bbf6da32 OW |
960 | # |
961 | # Returns information about the current migration capabilities status | |
962 | # | |
963 | # Returns: @MigrationCapabilitiesStatus | |
964 | # | |
965 | # Since: 1.2 | |
135b238e MAL |
966 | # |
967 | # Example: | |
968 | # | |
969 | # -> { "execute": "query-migrate-capabilities" } | |
970 | # <- { "return": [ | |
971 | # {"state": false, "capability": "xbzrle"}, | |
972 | # {"state": false, "capability": "rdma-pin-all"}, | |
973 | # {"state": false, "capability": "auto-converge"}, | |
974 | # {"state": false, "capability": "zero-blocks"}, | |
975 | # {"state": false, "capability": "compress"}, | |
976 | # {"state": true, "capability": "events"}, | |
977 | # {"state": false, "capability": "postcopy-ram"}, | |
978 | # {"state": false, "capability": "x-colo"} | |
979 | # ]} | |
980 | # | |
bbf6da32 OW |
981 | ## |
982 | { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']} | |
983 | ||
49687ace | 984 | ## |
5072f7b3 | 985 | # @MigrationParameter: |
43c60a81 LL |
986 | # |
987 | # Migration parameters enumeration | |
988 | # | |
989 | # @compress-level: Set the compression level to be used in live migration, | |
990 | # the compression level is an integer between 0 and 9, where 0 means | |
991 | # no compression, 1 means the best compression speed, and 9 means best | |
992 | # compression ratio which will consume more CPU. | |
993 | # | |
994 | # @compress-threads: Set compression thread count to be used in live migration, | |
995 | # the compression thread count is an integer between 1 and 255. | |
996 | # | |
997 | # @decompress-threads: Set decompression thread count to be used in live | |
998 | # migration, the decompression thread count is an integer between 1 | |
999 | # and 255. Usually, decompression is at least 4 times as fast as | |
1000 | # compression, so set the decompress-threads to the number about 1/4 | |
1001 | # of compress-threads is adequate. | |
1002 | # | |
d85a31d1 JH |
1003 | # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled |
1004 | # when migration auto-converge is activated. The | |
1005 | # default value is 20. (Since 2.7) | |
1626fee3 | 1006 | # |
d85a31d1 JH |
1007 | # @cpu-throttle-increment: throttle percentage increase each time |
1008 | # auto-converge detects that migration is not making | |
1009 | # progress. The default value is 10. (Since 2.7) | |
69ef1f36 DB |
1010 | # |
1011 | # @tls-creds: ID of the 'tls-creds' object that provides credentials for | |
1012 | # establishing a TLS connection over the migration data channel. | |
1013 | # On the outgoing side of the migration, the credentials must | |
1014 | # be for a 'client' endpoint, while for the incoming side the | |
1015 | # credentials must be for a 'server' endpoint. Setting this | |
1016 | # will enable TLS for all migrations. The default is unset, | |
1017 | # resulting in unsecured migration at the QEMU level. (Since 2.7) | |
1018 | # | |
1019 | # @tls-hostname: hostname of the target host for the migration. This is | |
1020 | # required when using x509 based TLS credentials and the | |
1021 | # migration URI does not already include a hostname. For | |
1022 | # example if using fd: or exec: based migration, the | |
1023 | # hostname must be provided so that the server's x509 | |
bdbba12b | 1024 | # certificate identity can be validated. (Since 2.7) |
69ef1f36 | 1025 | # |
2ff30257 AA |
1026 | # @max-bandwidth: to set maximum speed for migration. maximum speed in |
1027 | # bytes per second. (Since 2.8) | |
1028 | # | |
1029 | # @downtime-limit: set maximum tolerated downtime for migration. maximum | |
1030 | # downtime in milliseconds (Since 2.8) | |
1031 | # | |
68b53591 HZ |
1032 | # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in |
1033 | # periodic mode. (Since 2.8) | |
1034 | # | |
2833c59b JQ |
1035 | # @block-incremental: Affects how much storage is migrated when the |
1036 | # block migration capability is enabled. When false, the entire | |
1037 | # storage backing chain is migrated into a flattened image at | |
1038 | # the destination; when true, only the active qcow2 layer is | |
1039 | # migrated and the destination must already have access to the | |
1040 | # same backing chain as was used on the source. (since 2.10) | |
1041 | # | |
43c60a81 LL |
1042 | # Since: 2.4 |
1043 | ## | |
1044 | { 'enum': 'MigrationParameter', | |
1626fee3 | 1045 | 'data': ['compress-level', 'compress-threads', 'decompress-threads', |
69ef1f36 | 1046 | 'cpu-throttle-initial', 'cpu-throttle-increment', |
2ff30257 | 1047 | 'tls-creds', 'tls-hostname', 'max-bandwidth', |
2833c59b | 1048 | 'downtime-limit', 'x-checkpoint-delay', 'block-incremental' ] } |
43c60a81 | 1049 | |
1bda8b3c MA |
1050 | ## |
1051 | # @MigrateSetParameters: | |
1052 | # | |
1053 | # @compress-level: compression level | |
1054 | # | |
1055 | # @compress-threads: compression thread count | |
1056 | # | |
1057 | # @decompress-threads: decompression thread count | |
1058 | # | |
1059 | # @cpu-throttle-initial: Initial percentage of time guest cpus are | |
1060 | # throttled when migration auto-converge is activated. | |
1061 | # The default value is 20. (Since 2.7) | |
1062 | # | |
1063 | # @cpu-throttle-increment: throttle percentage increase each time | |
1064 | # auto-converge detects that migration is not making | |
1065 | # progress. The default value is 10. (Since 2.7) | |
1066 | # | |
1067 | # @tls-creds: ID of the 'tls-creds' object that provides credentials | |
1068 | # for establishing a TLS connection over the migration data | |
1069 | # channel. On the outgoing side of the migration, the credentials | |
1070 | # must be for a 'client' endpoint, while for the incoming side the | |
1071 | # credentials must be for a 'server' endpoint. Setting this | |
1072 | # to a non-empty string enables TLS for all migrations. | |
1073 | # An empty string means that QEMU will use plain text mode for | |
1074 | # migration, rather than TLS (Since 2.9) | |
1075 | # Previously (since 2.7), this was reported by omitting | |
1076 | # tls-creds instead. | |
1077 | # | |
1078 | # @tls-hostname: hostname of the target host for the migration. This | |
1079 | # is required when using x509 based TLS credentials and the | |
1080 | # migration URI does not already include a hostname. For | |
1081 | # example if using fd: or exec: based migration, the | |
1082 | # hostname must be provided so that the server's x509 | |
1083 | # certificate identity can be validated. (Since 2.7) | |
1084 | # An empty string means that QEMU will use the hostname | |
1085 | # associated with the migration URI, if any. (Since 2.9) | |
1086 | # Previously (since 2.7), this was reported by omitting | |
1087 | # tls-hostname instead. | |
1088 | # | |
1089 | # @max-bandwidth: to set maximum speed for migration. maximum speed in | |
1090 | # bytes per second. (Since 2.8) | |
1091 | # | |
1092 | # @downtime-limit: set maximum tolerated downtime for migration. maximum | |
1093 | # downtime in milliseconds (Since 2.8) | |
1094 | # | |
1095 | # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8) | |
1096 | # | |
1097 | # @block-incremental: Affects how much storage is migrated when the | |
1098 | # block migration capability is enabled. When false, the entire | |
1099 | # storage backing chain is migrated into a flattened image at | |
1100 | # the destination; when true, only the active qcow2 layer is | |
1101 | # migrated and the destination must already have access to the | |
1102 | # same backing chain as was used on the source. (since 2.10) | |
1103 | # | |
1104 | # Since: 2.4 | |
1105 | ## | |
1106 | # TODO either fuse back into MigrationParameters, or make | |
1107 | # MigrationParameters members mandatory | |
1108 | { 'struct': 'MigrateSetParameters', | |
1109 | 'data': { '*compress-level': 'int', | |
1110 | '*compress-threads': 'int', | |
1111 | '*decompress-threads': 'int', | |
1112 | '*cpu-throttle-initial': 'int', | |
1113 | '*cpu-throttle-increment': 'int', | |
01fa5598 MA |
1114 | '*tls-creds': 'StrOrNull', |
1115 | '*tls-hostname': 'StrOrNull', | |
1bda8b3c MA |
1116 | '*max-bandwidth': 'int', |
1117 | '*downtime-limit': 'int', | |
1118 | '*x-checkpoint-delay': 'int', | |
1119 | '*block-incremental': 'bool' } } | |
1120 | ||
49687ace | 1121 | ## |
5072f7b3 | 1122 | # @migrate-set-parameters: |
85de8323 | 1123 | # |
c2dd311c | 1124 | # Set various migration parameters. |
69ef1f36 | 1125 | # |
85de8323 | 1126 | # Since: 2.4 |
35db41e5 MAL |
1127 | # |
1128 | # Example: | |
1129 | # | |
1130 | # -> { "execute": "migrate-set-parameters" , | |
1131 | # "arguments": { "compress-level": 1 } } | |
1132 | # | |
85de8323 | 1133 | ## |
7f375e04 | 1134 | { 'command': 'migrate-set-parameters', 'boxed': true, |
1bda8b3c | 1135 | 'data': 'MigrateSetParameters' } |
85de8323 | 1136 | |
49687ace | 1137 | ## |
5072f7b3 | 1138 | # @MigrationParameters: |
85de8323 | 1139 | # |
1bda8b3c | 1140 | # The optional members aren't actually optional. |
85de8323 | 1141 | # |
1d8bda12 | 1142 | # @compress-level: compression level |
85de8323 | 1143 | # |
1d8bda12 | 1144 | # @compress-threads: compression thread count |
85de8323 | 1145 | # |
1d8bda12 | 1146 | # @decompress-threads: decompression thread count |
1626fee3 | 1147 | # |
1d8bda12 | 1148 | # @cpu-throttle-initial: Initial percentage of time guest cpus are |
1bda8b3c MA |
1149 | # throttled when migration auto-converge is activated. |
1150 | # (Since 2.7) | |
de63ab61 | 1151 | # |
1d8bda12 | 1152 | # @cpu-throttle-increment: throttle percentage increase each time |
d85a31d1 | 1153 | # auto-converge detects that migration is not making |
1bda8b3c | 1154 | # progress. (Since 2.7) |
1626fee3 | 1155 | # |
1d8bda12 | 1156 | # @tls-creds: ID of the 'tls-creds' object that provides credentials |
de63ab61 EB |
1157 | # for establishing a TLS connection over the migration data |
1158 | # channel. On the outgoing side of the migration, the credentials | |
1159 | # must be for a 'client' endpoint, while for the incoming side the | |
1bda8b3c | 1160 | # credentials must be for a 'server' endpoint. |
4af245dc | 1161 | # An empty string means that QEMU will use plain text mode for |
8cc99dcd MA |
1162 | # migration, rather than TLS (Since 2.7) |
1163 | # Note: 2.8 reports this by omitting tls-creds instead. | |
69ef1f36 | 1164 | # |
1d8bda12 | 1165 | # @tls-hostname: hostname of the target host for the migration. This |
de63ab61 | 1166 | # is required when using x509 based TLS credentials and the |
69ef1f36 DB |
1167 | # migration URI does not already include a hostname. For |
1168 | # example if using fd: or exec: based migration, the | |
1169 | # hostname must be provided so that the server's x509 | |
bdbba12b | 1170 | # certificate identity can be validated. (Since 2.7) |
4af245dc DB |
1171 | # An empty string means that QEMU will use the hostname |
1172 | # associated with the migration URI, if any. (Since 2.9) | |
8cc99dcd | 1173 | # Note: 2.8 reports this by omitting tls-hostname instead. |
69ef1f36 | 1174 | # |
2ff30257 AA |
1175 | # @max-bandwidth: to set maximum speed for migration. maximum speed in |
1176 | # bytes per second. (Since 2.8) | |
1177 | # | |
1178 | # @downtime-limit: set maximum tolerated downtime for migration. maximum | |
1179 | # downtime in milliseconds (Since 2.8) | |
1180 | # | |
68b53591 HZ |
1181 | # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8) |
1182 | # | |
2833c59b JQ |
1183 | # @block-incremental: Affects how much storage is migrated when the |
1184 | # block migration capability is enabled. When false, the entire | |
1185 | # storage backing chain is migrated into a flattened image at | |
1186 | # the destination; when true, only the active qcow2 layer is | |
1187 | # migrated and the destination must already have access to the | |
1188 | # same backing chain as was used on the source. (since 2.10) | |
1189 | # | |
85de8323 LL |
1190 | # Since: 2.4 |
1191 | ## | |
1192 | { 'struct': 'MigrationParameters', | |
de63ab61 EB |
1193 | 'data': { '*compress-level': 'int', |
1194 | '*compress-threads': 'int', | |
1195 | '*decompress-threads': 'int', | |
1196 | '*cpu-throttle-initial': 'int', | |
1197 | '*cpu-throttle-increment': 'int', | |
1198 | '*tls-creds': 'str', | |
2ff30257 AA |
1199 | '*tls-hostname': 'str', |
1200 | '*max-bandwidth': 'int', | |
68b53591 | 1201 | '*downtime-limit': 'int', |
2833c59b JQ |
1202 | '*x-checkpoint-delay': 'int', |
1203 | '*block-incremental': 'bool' } } | |
6235b9cd | 1204 | |
85de8323 | 1205 | ## |
5072f7b3 | 1206 | # @query-migrate-parameters: |
85de8323 LL |
1207 | # |
1208 | # Returns information about the current migration parameters | |
1209 | # | |
1210 | # Returns: @MigrationParameters | |
1211 | # | |
1212 | # Since: 2.4 | |
cf56cfad MAL |
1213 | # |
1214 | # Example: | |
1215 | # | |
1216 | # -> { "execute": "query-migrate-parameters" } | |
1217 | # <- { "return": { | |
1218 | # "decompress-threads": 2, | |
1219 | # "cpu-throttle-increment": 10, | |
1220 | # "compress-threads": 8, | |
1221 | # "compress-level": 1, | |
1222 | # "cpu-throttle-initial": 20, | |
1223 | # "max-bandwidth": 33554432, | |
1224 | # "downtime-limit": 300 | |
1225 | # } | |
1226 | # } | |
1227 | # | |
85de8323 LL |
1228 | ## |
1229 | { 'command': 'query-migrate-parameters', | |
1230 | 'returns': 'MigrationParameters' } | |
1231 | ||
b8a185bc | 1232 | ## |
5072f7b3 | 1233 | # @client_migrate_info: |
b8a185bc MA |
1234 | # |
1235 | # Set migration information for remote display. This makes the server | |
1236 | # ask the client to automatically reconnect using the new parameters | |
1237 | # once migration finished successfully. Only implemented for SPICE. | |
1238 | # | |
1239 | # @protocol: must be "spice" | |
1240 | # @hostname: migration target hostname | |
1d8bda12 MA |
1241 | # @port: spice tcp port for plaintext channels |
1242 | # @tls-port: spice tcp port for tls-secured channels | |
1243 | # @cert-subject: server certificate subject | |
b8a185bc MA |
1244 | # |
1245 | # Since: 0.14.0 | |
d0d3fc7f MAL |
1246 | # |
1247 | # Example: | |
1248 | # | |
1249 | # -> { "execute": "client_migrate_info", | |
1250 | # "arguments": { "protocol": "spice", | |
1251 | # "hostname": "virt42.lab.kraxel.org", | |
1252 | # "port": 1234 } } | |
1253 | # <- { "return": {} } | |
1254 | # | |
b8a185bc MA |
1255 | ## |
1256 | { 'command': 'client_migrate_info', | |
1257 | 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int', | |
1258 | '*tls-port': 'int', '*cert-subject': 'str' } } | |
1259 | ||
4886a1bc | 1260 | ## |
5072f7b3 | 1261 | # @migrate-start-postcopy: |
4886a1bc | 1262 | # |
a54d340b | 1263 | # Followup to a migration command to switch the migration to postcopy mode. |
32c3db5b | 1264 | # The postcopy-ram capability must be set before the original migration |
a54d340b | 1265 | # command. |
4886a1bc DDAG |
1266 | # |
1267 | # Since: 2.5 | |
3c3ea00a MAL |
1268 | # |
1269 | # Example: | |
1270 | # | |
1271 | # -> { "execute": "migrate-start-postcopy" } | |
1272 | # <- { "return": {} } | |
1273 | # | |
49687ace | 1274 | ## |
4886a1bc DDAG |
1275 | { 'command': 'migrate-start-postcopy' } |
1276 | ||
e235cec3 | 1277 | ## |
5072f7b3 | 1278 | # @COLOMessage: |
4f97558e HZ |
1279 | # |
1280 | # The message transmission between Primary side and Secondary side. | |
1281 | # | |
1282 | # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing | |
1283 | # | |
1284 | # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing | |
1285 | # | |
1286 | # @checkpoint-reply: SVM gets PVM's checkpoint request | |
1287 | # | |
1288 | # @vmstate-send: VM's state will be sent by PVM. | |
1289 | # | |
1290 | # @vmstate-size: The total size of VMstate. | |
1291 | # | |
1292 | # @vmstate-received: VM's state has been received by SVM. | |
1293 | # | |
1294 | # @vmstate-loaded: VM's state has been loaded by SVM. | |
1295 | # | |
1296 | # Since: 2.8 | |
1297 | ## | |
1298 | { 'enum': 'COLOMessage', | |
1299 | 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply', | |
1300 | 'vmstate-send', 'vmstate-size', 'vmstate-received', | |
1301 | 'vmstate-loaded' ] } | |
1302 | ||
d89e666e | 1303 | ## |
5072f7b3 | 1304 | # @COLOMode: |
d89e666e HZ |
1305 | # |
1306 | # The colo mode | |
1307 | # | |
1308 | # @unknown: unknown mode | |
1309 | # | |
1310 | # @primary: master side | |
1311 | # | |
1312 | # @secondary: slave side | |
1313 | # | |
1314 | # Since: 2.8 | |
1315 | ## | |
1316 | { 'enum': 'COLOMode', | |
1317 | 'data': [ 'unknown', 'primary', 'secondary'] } | |
1318 | ||
aef06085 | 1319 | ## |
5072f7b3 | 1320 | # @FailoverStatus: |
aef06085 HZ |
1321 | # |
1322 | # An enumeration of COLO failover status | |
1323 | # | |
1324 | # @none: no failover has ever happened | |
1325 | # | |
1326 | # @require: got failover requirement but not handled | |
1327 | # | |
1328 | # @active: in the process of doing failover | |
1329 | # | |
1330 | # @completed: finish the process of failover | |
1331 | # | |
a8664ba5 HZ |
1332 | # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9) |
1333 | # | |
aef06085 HZ |
1334 | # Since: 2.8 |
1335 | ## | |
1336 | { 'enum': 'FailoverStatus', | |
a8664ba5 | 1337 | 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] } |
aef06085 | 1338 | |
d89e666e | 1339 | ## |
5072f7b3 | 1340 | # @x-colo-lost-heartbeat: |
d89e666e HZ |
1341 | # |
1342 | # Tell qemu that heartbeat is lost, request it to do takeover procedures. | |
1343 | # If this command is sent to the PVM, the Primary side will exit COLO mode. | |
1344 | # If sent to the Secondary, the Secondary side will run failover work, | |
1345 | # then takes over server operation to become the service VM. | |
1346 | # | |
1347 | # Since: 2.8 | |
c08d6443 MAL |
1348 | # |
1349 | # Example: | |
1350 | # | |
1351 | # -> { "execute": "x-colo-lost-heartbeat" } | |
1352 | # <- { "return": {} } | |
1353 | # | |
d89e666e HZ |
1354 | ## |
1355 | { 'command': 'x-colo-lost-heartbeat' } | |
1356 | ||
1357 | ## | |
e235cec3 LC |
1358 | # @MouseInfo: |
1359 | # | |
1360 | # Information about a mouse device. | |
1361 | # | |
1362 | # @name: the name of the mouse device | |
1363 | # | |
1364 | # @index: the index of the mouse device | |
1365 | # | |
1366 | # @current: true if this device is currently receiving mouse events | |
1367 | # | |
1368 | # @absolute: true if this device supports absolute coordinates as input | |
1369 | # | |
1370 | # Since: 0.14.0 | |
1371 | ## | |
895a2a80 | 1372 | { 'struct': 'MouseInfo', |
e235cec3 LC |
1373 | 'data': {'name': 'str', 'index': 'int', 'current': 'bool', |
1374 | 'absolute': 'bool'} } | |
1375 | ||
1376 | ## | |
1377 | # @query-mice: | |
1378 | # | |
1379 | # Returns information about each active mouse device | |
1380 | # | |
1381 | # Returns: a list of @MouseInfo for each device | |
1382 | # | |
1383 | # Since: 0.14.0 | |
60639df5 MAL |
1384 | # |
1385 | # Example: | |
1386 | # | |
1387 | # -> { "execute": "query-mice" } | |
1388 | # <- { "return": [ | |
1389 | # { | |
1390 | # "name":"QEMU Microsoft Mouse", | |
1391 | # "index":0, | |
1392 | # "current":false, | |
1393 | # "absolute":false | |
1394 | # }, | |
1395 | # { | |
1396 | # "name":"QEMU PS/2 Mouse", | |
1397 | # "index":1, | |
1398 | # "current":true, | |
1399 | # "absolute":true | |
1400 | # } | |
1401 | # ] | |
1402 | # } | |
1403 | # | |
e235cec3 LC |
1404 | ## |
1405 | { 'command': 'query-mice', 'returns': ['MouseInfo'] } | |
1406 | ||
de0b36b6 | 1407 | ## |
86f4b687 | 1408 | # @CpuInfoArch: |
de0b36b6 | 1409 | # |
86f4b687 EB |
1410 | # An enumeration of cpu types that enable additional information during |
1411 | # @query-cpus. | |
1412 | # | |
1413 | # Since: 2.6 | |
1414 | ## | |
1415 | { 'enum': 'CpuInfoArch', | |
1416 | 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] } | |
1417 | ||
1418 | ## | |
3666a97f | 1419 | # @CpuInfo: |
86f4b687 | 1420 | # |
3666a97f | 1421 | # Information about a virtual CPU |
de0b36b6 LC |
1422 | # |
1423 | # @CPU: the index of the virtual CPU | |
1424 | # | |
86f4b687 | 1425 | # @current: this only exists for backwards compatibility and should be ignored |
b80e560b | 1426 | # |
de0b36b6 LC |
1427 | # @halted: true if the virtual CPU is in the halt state. Halt usually refers |
1428 | # to a processor specific low power mode. | |
1429 | # | |
58f88d4b EH |
1430 | # @qom_path: path to the CPU object in the QOM tree (since 2.4) |
1431 | # | |
de0b36b6 LC |
1432 | # @thread_id: ID of the underlying host thread |
1433 | # | |
afed5a5a IM |
1434 | # @props: properties describing to which node/socket/core/thread |
1435 | # virtual CPU belongs to, provided if supported by board (since 2.10) | |
1436 | # | |
86f4b687 EB |
1437 | # @arch: architecture of the cpu, which determines which additional fields |
1438 | # will be listed (since 2.6) | |
1439 | # | |
de0b36b6 LC |
1440 | # Since: 0.14.0 |
1441 | # | |
1442 | # Notes: @halted is a transient state that changes frequently. By the time the | |
1443 | # data is sent to the client, the guest may no longer be halted. | |
1444 | ## | |
3666a97f EB |
1445 | { 'union': 'CpuInfo', |
1446 | 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', | |
afed5a5a IM |
1447 | 'qom_path': 'str', 'thread_id': 'int', |
1448 | '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' }, | |
3666a97f | 1449 | 'discriminator': 'arch', |
86f4b687 EB |
1450 | 'data': { 'x86': 'CpuInfoX86', |
1451 | 'sparc': 'CpuInfoSPARC', | |
1452 | 'ppc': 'CpuInfoPPC', | |
1453 | 'mips': 'CpuInfoMIPS', | |
1454 | 'tricore': 'CpuInfoTricore', | |
1455 | 'other': 'CpuInfoOther' } } | |
1456 | ||
1457 | ## | |
1458 | # @CpuInfoX86: | |
1459 | # | |
1460 | # Additional information about a virtual i386 or x86_64 CPU | |
1461 | # | |
1462 | # @pc: the 64-bit instruction pointer | |
1463 | # | |
5072f7b3 | 1464 | # Since: 2.6 |
86f4b687 EB |
1465 | ## |
1466 | { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } } | |
1467 | ||
1468 | ## | |
1469 | # @CpuInfoSPARC: | |
1470 | # | |
1471 | # Additional information about a virtual SPARC CPU | |
1472 | # | |
1473 | # @pc: the PC component of the instruction pointer | |
1474 | # | |
1475 | # @npc: the NPC component of the instruction pointer | |
1476 | # | |
5072f7b3 | 1477 | # Since: 2.6 |
86f4b687 EB |
1478 | ## |
1479 | { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } } | |
1480 | ||
1481 | ## | |
1482 | # @CpuInfoPPC: | |
1483 | # | |
1484 | # Additional information about a virtual PPC CPU | |
1485 | # | |
1486 | # @nip: the instruction pointer | |
1487 | # | |
5072f7b3 | 1488 | # Since: 2.6 |
86f4b687 EB |
1489 | ## |
1490 | { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } } | |
1491 | ||
1492 | ## | |
1493 | # @CpuInfoMIPS: | |
1494 | # | |
1495 | # Additional information about a virtual MIPS CPU | |
1496 | # | |
1497 | # @PC: the instruction pointer | |
1498 | # | |
5072f7b3 | 1499 | # Since: 2.6 |
86f4b687 EB |
1500 | ## |
1501 | { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } } | |
1502 | ||
1503 | ## | |
1504 | # @CpuInfoTricore: | |
1505 | # | |
1506 | # Additional information about a virtual Tricore CPU | |
1507 | # | |
1508 | # @PC: the instruction pointer | |
1509 | # | |
5072f7b3 | 1510 | # Since: 2.6 |
86f4b687 EB |
1511 | ## |
1512 | { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } } | |
1513 | ||
1514 | ## | |
1515 | # @CpuInfoOther: | |
1516 | # | |
1517 | # No additional information is available about the virtual CPU | |
1518 | # | |
5072f7b3 | 1519 | # Since: 2.6 |
86f4b687 EB |
1520 | # |
1521 | ## | |
1522 | { 'struct': 'CpuInfoOther', 'data': { } } | |
de0b36b6 LC |
1523 | |
1524 | ## | |
1525 | # @query-cpus: | |
1526 | # | |
1527 | # Returns a list of information about each virtual CPU. | |
1528 | # | |
1529 | # Returns: a list of @CpuInfo for each virtual CPU | |
1530 | # | |
1531 | # Since: 0.14.0 | |
5c5bee64 MAL |
1532 | # |
1533 | # Example: | |
1534 | # | |
1535 | # -> { "execute": "query-cpus" } | |
1536 | # <- { "return": [ | |
1537 | # { | |
1538 | # "CPU":0, | |
1539 | # "current":true, | |
1540 | # "halted":false, | |
1541 | # "qom_path":"/machine/unattached/device[0]", | |
1542 | # "arch":"x86", | |
1543 | # "pc":3227107138, | |
1544 | # "thread_id":3134 | |
1545 | # }, | |
1546 | # { | |
1547 | # "CPU":1, | |
1548 | # "current":false, | |
1549 | # "halted":true, | |
1550 | # "qom_path":"/machine/unattached/device[2]", | |
1551 | # "arch":"x86", | |
1552 | # "pc":7108165, | |
1553 | # "thread_id":3135 | |
1554 | # } | |
1555 | # ] | |
1556 | # } | |
1557 | # | |
de0b36b6 LC |
1558 | ## |
1559 | { 'command': 'query-cpus', 'returns': ['CpuInfo'] } | |
1560 | ||
dc3dd0d2 SH |
1561 | ## |
1562 | # @IOThreadInfo: | |
1563 | # | |
1564 | # Information about an iothread | |
1565 | # | |
1566 | # @id: the identifier of the iothread | |
1567 | # | |
1568 | # @thread-id: ID of the underlying host thread | |
1569 | # | |
5fc00480 PH |
1570 | # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled |
1571 | # (since 2.9) | |
1572 | # | |
1573 | # @poll-grow: how many ns will be added to polling time, 0 means that it's not | |
1574 | # configured (since 2.9) | |
1575 | # | |
1576 | # @poll-shrink: how many ns will be removed from polling time, 0 means that | |
1577 | # it's not configured (since 2.9) | |
1578 | # | |
dc3dd0d2 SH |
1579 | # Since: 2.0 |
1580 | ## | |
895a2a80 | 1581 | { 'struct': 'IOThreadInfo', |
5fc00480 PH |
1582 | 'data': {'id': 'str', |
1583 | 'thread-id': 'int', | |
1584 | 'poll-max-ns': 'int', | |
1585 | 'poll-grow': 'int', | |
1586 | 'poll-shrink': 'int' } } | |
dc3dd0d2 SH |
1587 | |
1588 | ## | |
1589 | # @query-iothreads: | |
1590 | # | |
1591 | # Returns a list of information about each iothread. | |
1592 | # | |
5072f7b3 | 1593 | # Note: this list excludes the QEMU main loop thread, which is not declared |
dc3dd0d2 SH |
1594 | # using the -object iothread command-line option. It is always the main thread |
1595 | # of the process. | |
1596 | # | |
1597 | # Returns: a list of @IOThreadInfo for each iothread | |
1598 | # | |
1599 | # Since: 2.0 | |
fdf4d34f MAL |
1600 | # |
1601 | # Example: | |
1602 | # | |
1603 | # -> { "execute": "query-iothreads" } | |
1604 | # <- { "return": [ | |
1605 | # { | |
1606 | # "id":"iothread0", | |
1607 | # "thread-id":3134 | |
1608 | # }, | |
1609 | # { | |
1610 | # "id":"iothread1", | |
1611 | # "thread-id":3135 | |
1612 | # } | |
1613 | # ] | |
1614 | # } | |
1615 | # | |
dc3dd0d2 SH |
1616 | ## |
1617 | { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] } | |
1618 | ||
a589569f | 1619 | ## |
5072f7b3 | 1620 | # @VncBasicInfo: |
2b54aa87 | 1621 | # |
a589569f | 1622 | # The basic information for vnc network connection |
2b54aa87 | 1623 | # |
a589569f | 1624 | # @host: IP address |
2b54aa87 | 1625 | # |
2f44a08b WX |
1626 | # @service: The service name of the vnc port. This may depend on the host |
1627 | # system's service database so symbolic names should not be relied | |
1628 | # on. | |
a589569f WX |
1629 | # |
1630 | # @family: address family | |
1631 | # | |
4478aa76 GH |
1632 | # @websocket: true in case the socket is a websocket (since 2.3). |
1633 | # | |
a589569f WX |
1634 | # Since: 2.1 |
1635 | ## | |
895a2a80 | 1636 | { 'struct': 'VncBasicInfo', |
a589569f WX |
1637 | 'data': { 'host': 'str', |
1638 | 'service': 'str', | |
4478aa76 GH |
1639 | 'family': 'NetworkAddressFamily', |
1640 | 'websocket': 'bool' } } | |
a589569f WX |
1641 | |
1642 | ## | |
5072f7b3 | 1643 | # @VncServerInfo: |
2b54aa87 | 1644 | # |
a589569f | 1645 | # The network connection information for server |
2b54aa87 | 1646 | # |
1d8bda12 | 1647 | # @auth: authentication method used for |
2a7e6857 | 1648 | # the plain (non-websocket) VNC server |
2b54aa87 | 1649 | # |
a589569f WX |
1650 | # Since: 2.1 |
1651 | ## | |
895a2a80 | 1652 | { 'struct': 'VncServerInfo', |
a589569f WX |
1653 | 'base': 'VncBasicInfo', |
1654 | 'data': { '*auth': 'str' } } | |
1655 | ||
1656 | ## | |
1657 | # @VncClientInfo: | |
1658 | # | |
1659 | # Information about a connected VNC client. | |
2b54aa87 | 1660 | # |
1d8bda12 | 1661 | # @x509_dname: If x509 authentication is in use, the Distinguished |
2b54aa87 LC |
1662 | # Name of the client. |
1663 | # | |
1d8bda12 | 1664 | # @sasl_username: If SASL authentication is in use, the SASL username |
2b54aa87 LC |
1665 | # used for authentication. |
1666 | # | |
1667 | # Since: 0.14.0 | |
1668 | ## | |
895a2a80 | 1669 | { 'struct': 'VncClientInfo', |
a589569f | 1670 | 'base': 'VncBasicInfo', |
2f44a08b | 1671 | 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } } |
2b54aa87 LC |
1672 | |
1673 | ## | |
1674 | # @VncInfo: | |
1675 | # | |
1676 | # Information about the VNC session. | |
1677 | # | |
1678 | # @enabled: true if the VNC server is enabled, false otherwise | |
1679 | # | |
1d8bda12 | 1680 | # @host: The hostname the VNC server is bound to. This depends on |
2b54aa87 LC |
1681 | # the name resolution on the host and may be an IP address. |
1682 | # | |
1d8bda12 | 1683 | # @family: 'ipv6' if the host is listening for IPv6 connections |
2b54aa87 LC |
1684 | # 'ipv4' if the host is listening for IPv4 connections |
1685 | # 'unix' if the host is listening on a unix domain socket | |
1686 | # 'unknown' otherwise | |
1687 | # | |
1d8bda12 | 1688 | # @service: The service name of the server's port. This may depends |
2b54aa87 LC |
1689 | # on the host system's service database so symbolic names should not |
1690 | # be relied on. | |
1691 | # | |
1d8bda12 | 1692 | # @auth: the current authentication type used by the server |
2b54aa87 LC |
1693 | # 'none' if no authentication is being used |
1694 | # 'vnc' if VNC authentication is being used | |
1695 | # 'vencrypt+plain' if VEncrypt is used with plain text authentication | |
1696 | # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication | |
1697 | # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication | |
1698 | # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth | |
1699 | # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth | |
1700 | # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth | |
1701 | # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth | |
1702 | # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth | |
1703 | # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth | |
1704 | # | |
1705 | # @clients: a list of @VncClientInfo of all currently connected clients | |
1706 | # | |
1707 | # Since: 0.14.0 | |
1708 | ## | |
895a2a80 | 1709 | { 'struct': 'VncInfo', |
a589569f WX |
1710 | 'data': {'enabled': 'bool', '*host': 'str', |
1711 | '*family': 'NetworkAddressFamily', | |
2b54aa87 LC |
1712 | '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} } |
1713 | ||
df887684 | 1714 | ## |
4d5c8bc4 | 1715 | # @VncPrimaryAuth: |
df887684 GH |
1716 | # |
1717 | # vnc primary authentication method. | |
1718 | # | |
1719 | # Since: 2.3 | |
1720 | ## | |
1721 | { 'enum': 'VncPrimaryAuth', | |
1722 | 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra', | |
1723 | 'tls', 'vencrypt', 'sasl' ] } | |
1724 | ||
1725 | ## | |
1726 | # @VncVencryptSubAuth: | |
1727 | # | |
1728 | # vnc sub authentication method with vencrypt. | |
1729 | # | |
1730 | # Since: 2.3 | |
1731 | ## | |
1732 | { 'enum': 'VncVencryptSubAuth', | |
1733 | 'data': [ 'plain', | |
1734 | 'tls-none', 'x509-none', | |
1735 | 'tls-vnc', 'x509-vnc', | |
1736 | 'tls-plain', 'x509-plain', | |
1737 | 'tls-sasl', 'x509-sasl' ] } | |
1738 | ||
2a7e6857 DB |
1739 | |
1740 | ## | |
1741 | # @VncServerInfo2: | |
1742 | # | |
1743 | # The network connection information for server | |
1744 | # | |
1745 | # @auth: The current authentication type used by the servers | |
1746 | # | |
1d8bda12 | 1747 | # @vencrypt: The vencrypt sub authentication type used by the |
2a7e6857 DB |
1748 | # servers, only specified in case auth == vencrypt. |
1749 | # | |
1750 | # Since: 2.9 | |
1751 | ## | |
1752 | { 'struct': 'VncServerInfo2', | |
1753 | 'base': 'VncBasicInfo', | |
1754 | 'data': { 'auth' : 'VncPrimaryAuth', | |
1755 | '*vencrypt' : 'VncVencryptSubAuth' } } | |
1756 | ||
1757 | ||
df887684 GH |
1758 | ## |
1759 | # @VncInfo2: | |
1760 | # | |
1761 | # Information about a vnc server | |
1762 | # | |
1763 | # @id: vnc server name. | |
1764 | # | |
1765 | # @server: A list of @VncBasincInfo describing all listening sockets. | |
1766 | # The list can be empty (in case the vnc server is disabled). | |
1767 | # It also may have multiple entries: normal + websocket, | |
1768 | # possibly also ipv4 + ipv6 in the future. | |
1769 | # | |
1770 | # @clients: A list of @VncClientInfo of all currently connected clients. | |
1771 | # The list can be empty, for obvious reasons. | |
1772 | # | |
2a7e6857 | 1773 | # @auth: The current authentication type used by the non-websockets servers |
df887684 | 1774 | # |
1d8bda12 | 1775 | # @vencrypt: The vencrypt authentication type used by the servers, |
df887684 GH |
1776 | # only specified in case auth == vencrypt. |
1777 | # | |
1d8bda12 | 1778 | # @display: The display device the vnc server is linked to. |
df887684 GH |
1779 | # |
1780 | # Since: 2.3 | |
1781 | ## | |
895a2a80 | 1782 | { 'struct': 'VncInfo2', |
df887684 | 1783 | 'data': { 'id' : 'str', |
2a7e6857 | 1784 | 'server' : ['VncServerInfo2'], |
df887684 GH |
1785 | 'clients' : ['VncClientInfo'], |
1786 | 'auth' : 'VncPrimaryAuth', | |
1787 | '*vencrypt' : 'VncVencryptSubAuth', | |
1788 | '*display' : 'str' } } | |
1789 | ||
2b54aa87 LC |
1790 | ## |
1791 | # @query-vnc: | |
1792 | # | |
1793 | # Returns information about the current VNC server | |
1794 | # | |
1795 | # Returns: @VncInfo | |
2b54aa87 LC |
1796 | # |
1797 | # Since: 0.14.0 | |
85f96549 MAL |
1798 | # |
1799 | # Example: | |
1800 | # | |
1801 | # -> { "execute": "query-vnc" } | |
1802 | # <- { "return": { | |
1803 | # "enabled":true, | |
1804 | # "host":"0.0.0.0", | |
1805 | # "service":"50402", | |
1806 | # "auth":"vnc", | |
1807 | # "family":"ipv4", | |
1808 | # "clients":[ | |
1809 | # { | |
1810 | # "host":"127.0.0.1", | |
1811 | # "service":"50401", | |
1812 | # "family":"ipv4" | |
1813 | # } | |
1814 | # ] | |
1815 | # } | |
1816 | # } | |
1817 | # | |
2b54aa87 LC |
1818 | ## |
1819 | { 'command': 'query-vnc', 'returns': 'VncInfo' } | |
1820 | ||
df887684 GH |
1821 | ## |
1822 | # @query-vnc-servers: | |
1823 | # | |
1824 | # Returns a list of vnc servers. The list can be empty. | |
1825 | # | |
1826 | # Returns: a list of @VncInfo2 | |
1827 | # | |
1828 | # Since: 2.3 | |
1829 | ## | |
1830 | { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] } | |
1831 | ||
d1f29646 | 1832 | ## |
5072f7b3 | 1833 | # @SpiceBasicInfo: |
d1f29646 | 1834 | # |
a589569f WX |
1835 | # The basic information for SPICE network connection |
1836 | # | |
1837 | # @host: IP address | |
d1f29646 | 1838 | # |
a589569f | 1839 | # @port: port number |
d1f29646 | 1840 | # |
a589569f | 1841 | # @family: address family |
d1f29646 | 1842 | # |
a589569f WX |
1843 | # Since: 2.1 |
1844 | ## | |
895a2a80 | 1845 | { 'struct': 'SpiceBasicInfo', |
a589569f WX |
1846 | 'data': { 'host': 'str', |
1847 | 'port': 'str', | |
1848 | 'family': 'NetworkAddressFamily' } } | |
1849 | ||
1850 | ## | |
5072f7b3 | 1851 | # @SpiceServerInfo: |
d1f29646 | 1852 | # |
a589569f | 1853 | # Information about a SPICE server |
d1f29646 | 1854 | # |
1d8bda12 | 1855 | # @auth: authentication method |
d1f29646 | 1856 | # |
a589569f WX |
1857 | # Since: 2.1 |
1858 | ## | |
895a2a80 | 1859 | { 'struct': 'SpiceServerInfo', |
a589569f WX |
1860 | 'base': 'SpiceBasicInfo', |
1861 | 'data': { '*auth': 'str' } } | |
1862 | ||
1863 | ## | |
5072f7b3 | 1864 | # @SpiceChannel: |
a589569f WX |
1865 | # |
1866 | # Information about a SPICE client channel. | |
d1f29646 LC |
1867 | # |
1868 | # @connection-id: SPICE connection id number. All channels with the same id | |
1869 | # belong to the same SPICE session. | |
1870 | # | |
7e781c79 CR |
1871 | # @channel-type: SPICE channel type number. "1" is the main control |
1872 | # channel, filter for this one if you want to track spice | |
1873 | # sessions only | |
d1f29646 | 1874 | # |
419e1bdf AL |
1875 | # @channel-id: SPICE channel ID number. Usually "0", might be different when |
1876 | # multiple channels of the same type exist, such as multiple | |
d1f29646 LC |
1877 | # display channels in a multihead setup |
1878 | # | |
1879 | # @tls: true if the channel is encrypted, false otherwise. | |
1880 | # | |
1881 | # Since: 0.14.0 | |
1882 | ## | |
895a2a80 | 1883 | { 'struct': 'SpiceChannel', |
a589569f WX |
1884 | 'base': 'SpiceBasicInfo', |
1885 | 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int', | |
d1f29646 LC |
1886 | 'tls': 'bool'} } |
1887 | ||
4efee029 | 1888 | ## |
5072f7b3 | 1889 | # @SpiceQueryMouseMode: |
4efee029 | 1890 | # |
6932a69b | 1891 | # An enumeration of Spice mouse states. |
4efee029 AL |
1892 | # |
1893 | # @client: Mouse cursor position is determined by the client. | |
1894 | # | |
1895 | # @server: Mouse cursor position is determined by the server. | |
1896 | # | |
1897 | # @unknown: No information is available about mouse mode used by | |
1898 | # the spice server. | |
1899 | # | |
1900 | # Note: spice/enums.h has a SpiceMouseMode already, hence the name. | |
1901 | # | |
1902 | # Since: 1.1 | |
1903 | ## | |
1904 | { 'enum': 'SpiceQueryMouseMode', | |
1905 | 'data': [ 'client', 'server', 'unknown' ] } | |
1906 | ||
d1f29646 | 1907 | ## |
5072f7b3 | 1908 | # @SpiceInfo: |
d1f29646 LC |
1909 | # |
1910 | # Information about the SPICE session. | |
b80e560b | 1911 | # |
d1f29646 LC |
1912 | # @enabled: true if the SPICE server is enabled, false otherwise |
1913 | # | |
61c4efe2 | 1914 | # @migrated: true if the last guest migration completed and spice |
bc7e2602 | 1915 | # migration had completed as well. false otherwise. (since 1.4) |
61c4efe2 | 1916 | # |
1d8bda12 | 1917 | # @host: The hostname the SPICE server is bound to. This depends on |
d1f29646 LC |
1918 | # the name resolution on the host and may be an IP address. |
1919 | # | |
1d8bda12 | 1920 | # @port: The SPICE server's port number. |
d1f29646 | 1921 | # |
1d8bda12 | 1922 | # @compiled-version: SPICE server version. |
d1f29646 | 1923 | # |
1d8bda12 | 1924 | # @tls-port: The SPICE server's TLS port number. |
d1f29646 | 1925 | # |
1d8bda12 | 1926 | # @auth: the current authentication type used by the server |
419e1bdf AL |
1927 | # 'none' if no authentication is being used |
1928 | # 'spice' uses SASL or direct TLS authentication, depending on command | |
1929 | # line options | |
d1f29646 | 1930 | # |
4efee029 AL |
1931 | # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can |
1932 | # be determined by the client or the server, or unknown if spice | |
bc7e2602 | 1933 | # server doesn't provide this information. (since: 1.1) |
4efee029 | 1934 | # |
d1f29646 LC |
1935 | # @channels: a list of @SpiceChannel for each active spice channel |
1936 | # | |
1937 | # Since: 0.14.0 | |
1938 | ## | |
895a2a80 | 1939 | { 'struct': 'SpiceInfo', |
61c4efe2 | 1940 | 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int', |
d1f29646 | 1941 | '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str', |
4efee029 | 1942 | 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} } |
d1f29646 LC |
1943 | |
1944 | ## | |
5072f7b3 | 1945 | # @query-spice: |
d1f29646 LC |
1946 | # |
1947 | # Returns information about the current SPICE server | |
1948 | # | |
1949 | # Returns: @SpiceInfo | |
1950 | # | |
1951 | # Since: 0.14.0 | |
bc7e2602 MAL |
1952 | # |
1953 | # Example: | |
1954 | # | |
1955 | # -> { "execute": "query-spice" } | |
1956 | # <- { "return": { | |
1957 | # "enabled": true, | |
1958 | # "auth": "spice", | |
1959 | # "port": 5920, | |
1960 | # "tls-port": 5921, | |
1961 | # "host": "0.0.0.0", | |
1962 | # "channels": [ | |
1963 | # { | |
1964 | # "port": "54924", | |
1965 | # "family": "ipv4", | |
1966 | # "channel-type": 1, | |
1967 | # "connection-id": 1804289383, | |
1968 | # "host": "127.0.0.1", | |
1969 | # "channel-id": 0, | |
1970 | # "tls": true | |
1971 | # }, | |
1972 | # { | |
1973 | # "port": "36710", | |
1974 | # "family": "ipv4", | |
1975 | # "channel-type": 4, | |
1976 | # "connection-id": 1804289383, | |
1977 | # "host": "127.0.0.1", | |
1978 | # "channel-id": 0, | |
1979 | # "tls": false | |
1980 | # }, | |
1981 | # [ ... more channels follow ... ] | |
1982 | # ] | |
1983 | # } | |
1984 | # } | |
1985 | # | |
d1f29646 LC |
1986 | ## |
1987 | { 'command': 'query-spice', 'returns': 'SpiceInfo' } | |
1988 | ||
96637bcd LC |
1989 | ## |
1990 | # @BalloonInfo: | |
1991 | # | |
1992 | # Information about the guest balloon device. | |
1993 | # | |
1994 | # @actual: the number of bytes the balloon currently contains | |
1995 | # | |
96637bcd LC |
1996 | # Since: 0.14.0 |
1997 | # | |
96637bcd | 1998 | ## |
895a2a80 | 1999 | { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } } |
96637bcd LC |
2000 | |
2001 | ## | |
2002 | # @query-balloon: | |
2003 | # | |
2004 | # Return information about the balloon device. | |
2005 | # | |
2006 | # Returns: @BalloonInfo on success | |
f504e3dc | 2007 | # |
96637bcd LC |
2008 | # If the balloon driver is enabled but not functional because the KVM |
2009 | # kernel module cannot support it, KvmMissingCap | |
f504e3dc | 2010 | # |
96637bcd LC |
2011 | # If no balloon device is present, DeviceNotActive |
2012 | # | |
2013 | # Since: 0.14.0 | |
f504e3dc MAL |
2014 | # |
2015 | # Example: | |
2016 | # | |
2017 | # -> { "execute": "query-balloon" } | |
2018 | # <- { "return": { | |
2019 | # "actual": 1073741824, | |
2020 | # } | |
2021 | # } | |
2022 | # | |
96637bcd LC |
2023 | ## |
2024 | { 'command': 'query-balloon', 'returns': 'BalloonInfo' } | |
2025 | ||
79627472 LC |
2026 | ## |
2027 | # @PciMemoryRange: | |
2028 | # | |
2029 | # A PCI device memory region | |
2030 | # | |
2031 | # @base: the starting address (guest physical) | |
2032 | # | |
2033 | # @limit: the ending address (guest physical) | |
2034 | # | |
2035 | # Since: 0.14.0 | |
2036 | ## | |
895a2a80 | 2037 | { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} } |
79627472 LC |
2038 | |
2039 | ## | |
5072f7b3 | 2040 | # @PciMemoryRegion: |
79627472 LC |
2041 | # |
2042 | # Information about a PCI device I/O region. | |
2043 | # | |
2044 | # @bar: the index of the Base Address Register for this region | |
2045 | # | |
2046 | # @type: 'io' if the region is a PIO region | |
2047 | # 'memory' if the region is a MMIO region | |
2048 | # | |
3fc3aa6d MAL |
2049 | # @size: memory size |
2050 | # | |
1d8bda12 | 2051 | # @prefetch: if @type is 'memory', true if the memory is prefetchable |
79627472 | 2052 | # |
1d8bda12 | 2053 | # @mem_type_64: if @type is 'memory', true if the BAR is 64-bit |
79627472 LC |
2054 | # |
2055 | # Since: 0.14.0 | |
2056 | ## | |
895a2a80 | 2057 | { 'struct': 'PciMemoryRegion', |
79627472 LC |
2058 | 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int', |
2059 | '*prefetch': 'bool', '*mem_type_64': 'bool' } } | |
2060 | ||
2061 | ## | |
9fa02cd1 | 2062 | # @PciBusInfo: |
79627472 | 2063 | # |
9fa02cd1 | 2064 | # Information about a bus of a PCI Bridge device |
79627472 | 2065 | # |
9fa02cd1 EB |
2066 | # @number: primary bus interface number. This should be the number of the |
2067 | # bus the device resides on. | |
79627472 | 2068 | # |
9fa02cd1 EB |
2069 | # @secondary: secondary bus interface number. This is the number of the |
2070 | # main bus for the bridge | |
79627472 | 2071 | # |
9fa02cd1 EB |
2072 | # @subordinate: This is the highest number bus that resides below the |
2073 | # bridge. | |
79627472 | 2074 | # |
9fa02cd1 | 2075 | # @io_range: The PIO range for all devices on this bridge |
79627472 | 2076 | # |
9fa02cd1 | 2077 | # @memory_range: The MMIO range for all devices on this bridge |
79627472 | 2078 | # |
9fa02cd1 EB |
2079 | # @prefetchable_range: The range of prefetchable MMIO for all devices on |
2080 | # this bridge | |
2081 | # | |
2082 | # Since: 2.4 | |
2083 | ## | |
2084 | { 'struct': 'PciBusInfo', | |
2085 | 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int', | |
2086 | 'io_range': 'PciMemoryRange', | |
2087 | 'memory_range': 'PciMemoryRange', | |
2088 | 'prefetchable_range': 'PciMemoryRange' } } | |
2089 | ||
2090 | ## | |
2091 | # @PciBridgeInfo: | |
2092 | # | |
2093 | # Information about a PCI Bridge device | |
2094 | # | |
2095 | # @bus: information about the bus the device resides on | |
79627472 LC |
2096 | # |
2097 | # @devices: a list of @PciDeviceInfo for each device on this bridge | |
2098 | # | |
2099 | # Since: 0.14.0 | |
2100 | ## | |
895a2a80 | 2101 | { 'struct': 'PciBridgeInfo', |
9fa02cd1 EB |
2102 | 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} } |
2103 | ||
2104 | ## | |
2105 | # @PciDeviceClass: | |
2106 | # | |
2107 | # Information about the Class of a PCI device | |
2108 | # | |
1d8bda12 | 2109 | # @desc: a string description of the device's class |
9fa02cd1 EB |
2110 | # |
2111 | # @class: the class code of the device | |
2112 | # | |
2113 | # Since: 2.4 | |
2114 | ## | |
2115 | { 'struct': 'PciDeviceClass', | |
2116 | 'data': {'*desc': 'str', 'class': 'int'} } | |
2117 | ||
2118 | ## | |
2119 | # @PciDeviceId: | |
2120 | # | |
2121 | # Information about the Id of a PCI device | |
2122 | # | |
2123 | # @device: the PCI device id | |
2124 | # | |
2125 | # @vendor: the PCI vendor id | |
2126 | # | |
2127 | # Since: 2.4 | |
2128 | ## | |
2129 | { 'struct': 'PciDeviceId', | |
2130 | 'data': {'device': 'int', 'vendor': 'int'} } | |
79627472 LC |
2131 | |
2132 | ## | |
2133 | # @PciDeviceInfo: | |
2134 | # | |
2135 | # Information about a PCI device | |
2136 | # | |
2137 | # @bus: the bus number of the device | |
2138 | # | |
2139 | # @slot: the slot the device is located in | |
2140 | # | |
2141 | # @function: the function of the slot used by the device | |
2142 | # | |
9fa02cd1 | 2143 | # @class_info: the class of the device |
79627472 | 2144 | # |
9fa02cd1 | 2145 | # @id: the PCI device id |
79627472 | 2146 | # |
1d8bda12 | 2147 | # @irq: if an IRQ is assigned to the device, the IRQ number |
79627472 LC |
2148 | # |
2149 | # @qdev_id: the device name of the PCI device | |
2150 | # | |
2151 | # @pci_bridge: if the device is a PCI bridge, the bridge information | |
2152 | # | |
2153 | # @regions: a list of the PCI I/O regions associated with the device | |
2154 | # | |
2155 | # Notes: the contents of @class_info.desc are not stable and should only be | |
2156 | # treated as informational. | |
2157 | # | |
2158 | # Since: 0.14.0 | |
2159 | ## | |
895a2a80 | 2160 | { 'struct': 'PciDeviceInfo', |
79627472 | 2161 | 'data': {'bus': 'int', 'slot': 'int', 'function': 'int', |
9fa02cd1 | 2162 | 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId', |
79627472 LC |
2163 | '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo', |
2164 | 'regions': ['PciMemoryRegion']} } | |
2165 | ||
2166 | ## | |
2167 | # @PciInfo: | |
2168 | # | |
2169 | # Information about a PCI bus | |
2170 | # | |
2171 | # @bus: the bus index | |
2172 | # | |
2173 | # @devices: a list of devices on this bus | |
2174 | # | |
2175 | # Since: 0.14.0 | |
2176 | ## | |
895a2a80 | 2177 | { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} } |
79627472 LC |
2178 | |
2179 | ## | |
2180 | # @query-pci: | |
2181 | # | |
2182 | # Return information about the PCI bus topology of the guest. | |
2183 | # | |
3fc3aa6d MAL |
2184 | # Returns: a list of @PciInfo for each PCI bus. Each bus is |
2185 | # represented by a json-object, which has a key with a json-array of | |
2186 | # all PCI devices attached to it. Each device is represented by a | |
2187 | # json-object. | |
79627472 LC |
2188 | # |
2189 | # Since: 0.14.0 | |
3fc3aa6d MAL |
2190 | # |
2191 | # Example: | |
2192 | # | |
2193 | # -> { "execute": "query-pci" } | |
2194 | # <- { "return": [ | |
2195 | # { | |
2196 | # "bus": 0, | |
2197 | # "devices": [ | |
2198 | # { | |
2199 | # "bus": 0, | |
2200 | # "qdev_id": "", | |
2201 | # "slot": 0, | |
2202 | # "class_info": { | |
2203 | # "class": 1536, | |
2204 | # "desc": "Host bridge" | |
2205 | # }, | |
2206 | # "id": { | |
2207 | # "device": 32902, | |
2208 | # "vendor": 4663 | |
2209 | # }, | |
2210 | # "function": 0, | |
2211 | # "regions": [ | |
2212 | # ] | |
2213 | # }, | |
2214 | # { | |
2215 | # "bus": 0, | |
2216 | # "qdev_id": "", | |
2217 | # "slot": 1, | |
2218 | # "class_info": { | |
2219 | # "class": 1537, | |
2220 | # "desc": "ISA bridge" | |
2221 | # }, | |
2222 | # "id": { | |
2223 | # "device": 32902, | |
2224 | # "vendor": 28672 | |
2225 | # }, | |
2226 | # "function": 0, | |
2227 | # "regions": [ | |
2228 | # ] | |
2229 | # }, | |
2230 | # { | |
2231 | # "bus": 0, | |
2232 | # "qdev_id": "", | |
2233 | # "slot": 1, | |
2234 | # "class_info": { | |
2235 | # "class": 257, | |
2236 | # "desc": "IDE controller" | |
2237 | # }, | |
2238 | # "id": { | |
2239 | # "device": 32902, | |
2240 | # "vendor": 28688 | |
2241 | # }, | |
2242 | # "function": 1, | |
2243 | # "regions": [ | |
2244 | # { | |
2245 | # "bar": 4, | |
2246 | # "size": 16, | |
2247 | # "address": 49152, | |
2248 | # "type": "io" | |
2249 | # } | |
2250 | # ] | |
2251 | # }, | |
2252 | # { | |
2253 | # "bus": 0, | |
2254 | # "qdev_id": "", | |
2255 | # "slot": 2, | |
2256 | # "class_info": { | |
2257 | # "class": 768, | |
2258 | # "desc": "VGA controller" | |
2259 | # }, | |
2260 | # "id": { | |
2261 | # "device": 4115, | |
2262 | # "vendor": 184 | |
2263 | # }, | |
2264 | # "function": 0, | |
2265 | # "regions": [ | |
2266 | # { | |
2267 | # "prefetch": true, | |
2268 | # "mem_type_64": false, | |
2269 | # "bar": 0, | |
2270 | # "size": 33554432, | |
2271 | # "address": 4026531840, | |
2272 | # "type": "memory" | |
2273 | # }, | |
2274 | # { | |
2275 | # "prefetch": false, | |
2276 | # "mem_type_64": false, | |
2277 | # "bar": 1, | |
2278 | # "size": 4096, | |
2279 | # "address": 4060086272, | |
2280 | # "type": "memory" | |
2281 | # }, | |
2282 | # { | |
2283 | # "prefetch": false, | |
2284 | # "mem_type_64": false, | |
2285 | # "bar": 6, | |
2286 | # "size": 65536, | |
2287 | # "address": -1, | |
2288 | # "type": "memory" | |
2289 | # } | |
2290 | # ] | |
2291 | # }, | |
2292 | # { | |
2293 | # "bus": 0, | |
2294 | # "qdev_id": "", | |
2295 | # "irq": 11, | |
2296 | # "slot": 4, | |
2297 | # "class_info": { | |
2298 | # "class": 1280, | |
2299 | # "desc": "RAM controller" | |
2300 | # }, | |
2301 | # "id": { | |
2302 | # "device": 6900, | |
2303 | # "vendor": 4098 | |
2304 | # }, | |
2305 | # "function": 0, | |
2306 | # "regions": [ | |
2307 | # { | |
2308 | # "bar": 0, | |
2309 | # "size": 32, | |
2310 | # "address": 49280, | |
2311 | # "type": "io" | |
2312 | # } | |
2313 | # ] | |
2314 | # } | |
2315 | # ] | |
2316 | # } | |
2317 | # ] | |
2318 | # } | |
2319 | # | |
2320 | # Note: This example has been shortened as the real response is too long. | |
2321 | # | |
79627472 LC |
2322 | ## |
2323 | { 'command': 'query-pci', 'returns': ['PciInfo'] } | |
2324 | ||
7a7f325e LC |
2325 | ## |
2326 | # @quit: | |
2327 | # | |
2328 | # This command will cause the QEMU process to exit gracefully. While every | |
2329 | # attempt is made to send the QMP response before terminating, this is not | |
2330 | # guaranteed. When using this interface, a premature EOF would not be | |
2331 | # unexpected. | |
2332 | # | |
2333 | # Since: 0.14.0 | |
8046bf53 MAL |
2334 | # |
2335 | # Example: | |
2336 | # | |
2337 | # -> { "execute": "quit" } | |
2338 | # <- { "return": {} } | |
7a7f325e LC |
2339 | ## |
2340 | { 'command': 'quit' } | |
5f158f21 LC |
2341 | |
2342 | ## | |
2343 | # @stop: | |
2344 | # | |
2345 | # Stop all guest VCPU execution. | |
2346 | # | |
2347 | # Since: 0.14.0 | |
2348 | # | |
2349 | # Notes: This function will succeed even if the guest is already in the stopped | |
1e998146 PB |
2350 | # state. In "inmigrate" state, it will ensure that the guest |
2351 | # remains paused once migration finishes, as if the -S option was | |
2352 | # passed on the command line. | |
9787339e MAL |
2353 | # |
2354 | # Example: | |
2355 | # | |
2356 | # -> { "execute": "stop" } | |
2357 | # <- { "return": {} } | |
2358 | # | |
5f158f21 LC |
2359 | ## |
2360 | { 'command': 'stop' } | |
38d22653 LC |
2361 | |
2362 | ## | |
2363 | # @system_reset: | |
2364 | # | |
2365 | # Performs a hard reset of a guest. | |
2366 | # | |
2367 | # Since: 0.14.0 | |
cd98e00b MAL |
2368 | # |
2369 | # Example: | |
2370 | # | |
2371 | # -> { "execute": "system_reset" } | |
2372 | # <- { "return": {} } | |
2373 | # | |
38d22653 LC |
2374 | ## |
2375 | { 'command': 'system_reset' } | |
5bc465e4 LC |
2376 | |
2377 | ## | |
2378 | # @system_powerdown: | |
2379 | # | |
2380 | # Requests that a guest perform a powerdown operation. | |
2381 | # | |
2382 | # Since: 0.14.0 | |
2383 | # | |
2384 | # Notes: A guest may or may not respond to this command. This command | |
2385 | # returning does not indicate that a guest has accepted the request or | |
2386 | # that it has shut down. Many guests will respond to this command by | |
2387 | # prompting the user in some way. | |
04fcbabc MAL |
2388 | # Example: |
2389 | # | |
2390 | # -> { "execute": "system_powerdown" } | |
2391 | # <- { "return": {} } | |
2392 | # | |
5bc465e4 LC |
2393 | ## |
2394 | { 'command': 'system_powerdown' } | |
755f1968 LC |
2395 | |
2396 | ## | |
2397 | # @cpu: | |
2398 | # | |
2399 | # This command is a nop that is only provided for the purposes of compatibility. | |
2400 | # | |
2401 | # Since: 0.14.0 | |
2402 | # | |
2403 | # Notes: Do not use this command. | |
2404 | ## | |
2405 | { 'command': 'cpu', 'data': {'index': 'int'} } | |
0cfd6a9a | 2406 | |
69ca3ea5 | 2407 | ## |
5072f7b3 | 2408 | # @cpu-add: |
69ca3ea5 IM |
2409 | # |
2410 | # Adds CPU with specified ID | |
2411 | # | |
2412 | # @id: ID of CPU to be created, valid values [0..max_cpus) | |
2413 | # | |
2414 | # Returns: Nothing on success | |
2415 | # | |
5072f7b3 | 2416 | # Since: 1.5 |
a7b83754 MAL |
2417 | # |
2418 | # Example: | |
2419 | # | |
2420 | # -> { "execute": "cpu-add", "arguments": { "id": 2 } } | |
2421 | # <- { "return": {} } | |
2422 | # | |
69ca3ea5 IM |
2423 | ## |
2424 | { 'command': 'cpu-add', 'data': {'id': 'int'} } | |
2425 | ||
0cfd6a9a LC |
2426 | ## |
2427 | # @memsave: | |
2428 | # | |
2429 | # Save a portion of guest memory to a file. | |
2430 | # | |
2431 | # @val: the virtual address of the guest to start from | |
2432 | # | |
2433 | # @size: the size of memory region to save | |
2434 | # | |
2435 | # @filename: the file to save the memory to as binary data | |
2436 | # | |
1d8bda12 | 2437 | # @cpu-index: the index of the virtual CPU to use for translating the |
0cfd6a9a LC |
2438 | # virtual address (defaults to CPU 0) |
2439 | # | |
2440 | # Returns: Nothing on success | |
0cfd6a9a LC |
2441 | # |
2442 | # Since: 0.14.0 | |
2443 | # | |
2444 | # Notes: Errors were not reliably returned until 1.1 | |
30831b63 MAL |
2445 | # |
2446 | # Example: | |
2447 | # | |
2448 | # -> { "execute": "memsave", | |
2449 | # "arguments": { "val": 10, | |
2450 | # "size": 100, | |
2451 | # "filename": "/tmp/virtual-mem-dump" } } | |
2452 | # <- { "return": {} } | |
2453 | # | |
0cfd6a9a LC |
2454 | ## |
2455 | { 'command': 'memsave', | |
2456 | 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} } | |
6d3962bf LC |
2457 | |
2458 | ## | |
2459 | # @pmemsave: | |
2460 | # | |
2461 | # Save a portion of guest physical memory to a file. | |
2462 | # | |
2463 | # @val: the physical address of the guest to start from | |
2464 | # | |
2465 | # @size: the size of memory region to save | |
2466 | # | |
2467 | # @filename: the file to save the memory to as binary data | |
2468 | # | |
2469 | # Returns: Nothing on success | |
6d3962bf LC |
2470 | # |
2471 | # Since: 0.14.0 | |
2472 | # | |
2473 | # Notes: Errors were not reliably returned until 1.1 | |
978d4d97 MAL |
2474 | # |
2475 | # Example: | |
2476 | # | |
2477 | # -> { "execute": "pmemsave", | |
2478 | # "arguments": { "val": 10, | |
2479 | # "size": 100, | |
2480 | # "filename": "/tmp/physical-mem-dump" } } | |
2481 | # <- { "return": {} } | |
2482 | # | |
6d3962bf LC |
2483 | ## |
2484 | { 'command': 'pmemsave', | |
2485 | 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} } | |
e42e818b LC |
2486 | |
2487 | ## | |
2488 | # @cont: | |
2489 | # | |
2490 | # Resume guest VCPU execution. | |
2491 | # | |
2492 | # Since: 0.14.0 | |
2493 | # | |
2494 | # Returns: If successful, nothing | |
e42e818b | 2495 | # |
1e998146 PB |
2496 | # Notes: This command will succeed if the guest is currently running. It |
2497 | # will also succeed if the guest is in the "inmigrate" state; in | |
2498 | # this case, the effect of the command is to make sure the guest | |
2499 | # starts once migration finishes, removing the effect of the -S | |
2500 | # command line option if it was passed. | |
3815d0de MAL |
2501 | # |
2502 | # Example: | |
2503 | # | |
2504 | # -> { "execute": "cont" } | |
2505 | # <- { "return": {} } | |
2506 | # | |
e42e818b LC |
2507 | ## |
2508 | { 'command': 'cont' } | |
2509 | ||
9b9df25a GH |
2510 | ## |
2511 | # @system_wakeup: | |
2512 | # | |
2513 | # Wakeup guest from suspend. Does nothing in case the guest isn't suspended. | |
2514 | # | |
2515 | # Since: 1.1 | |
2516 | # | |
2517 | # Returns: nothing. | |
253cdee1 MAL |
2518 | # |
2519 | # Example: | |
2520 | # | |
2521 | # -> { "execute": "system_wakeup" } | |
2522 | # <- { "return": {} } | |
2523 | # | |
9b9df25a GH |
2524 | ## |
2525 | { 'command': 'system_wakeup' } | |
2526 | ||
ab49ab5c LC |
2527 | ## |
2528 | # @inject-nmi: | |
2529 | # | |
9cb805fd | 2530 | # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64). |
149ea099 | 2531 | # The command fails when the guest doesn't support injecting. |
ab49ab5c LC |
2532 | # |
2533 | # Returns: If successful, nothing | |
ab49ab5c LC |
2534 | # |
2535 | # Since: 0.14.0 | |
2536 | # | |
9cb805fd | 2537 | # Note: prior to 2.1, this command was only supported for x86 and s390 VMs |
149ea099 MAL |
2538 | # |
2539 | # Example: | |
2540 | # | |
2541 | # -> { "execute": "inject-nmi" } | |
2542 | # <- { "return": {} } | |
2543 | # | |
ab49ab5c LC |
2544 | ## |
2545 | { 'command': 'inject-nmi' } | |
4b37156c LC |
2546 | |
2547 | ## | |
2548 | # @set_link: | |
2549 | # | |
2550 | # Sets the link status of a virtual network adapter. | |
2551 | # | |
2552 | # @name: the device name of the virtual network adapter | |
2553 | # | |
2554 | # @up: true to set the link status to be up | |
2555 | # | |
2556 | # Returns: Nothing on success | |
2557 | # If @name is not a valid network device, DeviceNotFound | |
2558 | # | |
2559 | # Since: 0.14.0 | |
2560 | # | |
2561 | # Notes: Not all network adapters support setting link status. This command | |
2562 | # will succeed even if the network adapter does not support link status | |
2563 | # notification. | |
f9cfb8f7 MAL |
2564 | # |
2565 | # Example: | |
2566 | # | |
2567 | # -> { "execute": "set_link", | |
2568 | # "arguments": { "name": "e1000.0", "up": false } } | |
2569 | # <- { "return": {} } | |
2570 | # | |
4b37156c LC |
2571 | ## |
2572 | { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} } | |
a4dea8a9 | 2573 | |
d72f3264 LC |
2574 | ## |
2575 | # @balloon: | |
2576 | # | |
2577 | # Request the balloon driver to change its balloon size. | |
2578 | # | |
2579 | # @value: the target size of the balloon in bytes | |
2580 | # | |
2581 | # Returns: Nothing on success | |
2582 | # If the balloon driver is enabled but not functional because the KVM | |
2583 | # kernel module cannot support it, KvmMissingCap | |
2584 | # If no balloon device is present, DeviceNotActive | |
2585 | # | |
2586 | # Notes: This command just issues a request to the guest. When it returns, | |
2587 | # the balloon size may not have changed. A guest can change the balloon | |
2588 | # size independent of this command. | |
2589 | # | |
2590 | # Since: 0.14.0 | |
7b338db7 MAL |
2591 | # |
2592 | # Example: | |
2593 | # | |
2594 | # -> { "execute": "balloon", "arguments": { "value": 536870912 } } | |
2595 | # <- { "return": {} } | |
2596 | # | |
d72f3264 LC |
2597 | ## |
2598 | { 'command': 'balloon', 'data': {'value': 'int'} } | |
5e7caacb | 2599 | |
78b18b78 | 2600 | ## |
5072f7b3 | 2601 | # @Abort: |
78b18b78 SH |
2602 | # |
2603 | # This action can be used to test transaction failure. | |
2604 | # | |
2605 | # Since: 1.6 | |
5072f7b3 | 2606 | ## |
895a2a80 | 2607 | { 'struct': 'Abort', |
78b18b78 SH |
2608 | 'data': { } } |
2609 | ||
94d16a64 | 2610 | ## |
5072f7b3 | 2611 | # @ActionCompletionMode: |
94d16a64 JS |
2612 | # |
2613 | # An enumeration of Transactional completion modes. | |
2614 | # | |
2615 | # @individual: Do not attempt to cancel any other Actions if any Actions fail | |
2616 | # after the Transaction request succeeds. All Actions that | |
2617 | # can complete successfully will do so without waiting on others. | |
2618 | # This is the default. | |
2619 | # | |
2620 | # @grouped: If any Action fails after the Transaction succeeds, cancel all | |
2621 | # Actions. Actions do not complete until all Actions are ready to | |
2622 | # complete. May be rejected by Actions that do not support this | |
2623 | # completion mode. | |
2624 | # | |
2625 | # Since: 2.5 | |
2626 | ## | |
2627 | { 'enum': 'ActionCompletionMode', | |
2628 | 'data': [ 'individual', 'grouped' ] } | |
2629 | ||
8802d1fd | 2630 | ## |
5072f7b3 | 2631 | # @TransactionAction: |
8802d1fd | 2632 | # |
52e7c241 | 2633 | # A discriminated record of operations that can be performed with |
41dc1dc0 | 2634 | # @transaction. Action @type can be: |
b7b9d39a | 2635 | # |
41dc1dc0 MAL |
2636 | # - @abort: since 1.6 |
2637 | # - @block-dirty-bitmap-add: since 2.5 | |
2638 | # - @block-dirty-bitmap-clear: since 2.5 | |
2639 | # - @blockdev-backup: since 2.3 | |
2640 | # - @blockdev-snapshot: since 2.5 | |
2641 | # - @blockdev-snapshot-internal-sync: since 1.7 | |
2642 | # - @blockdev-snapshot-sync: since 1.1 | |
2643 | # - @drive-backup: since 1.6 | |
b7b9d39a | 2644 | # |
41dc1dc0 | 2645 | # Since: 1.1 |
8802d1fd | 2646 | ## |
c8a83e85 | 2647 | { 'union': 'TransactionAction', |
52e7c241 | 2648 | 'data': { |
bbe86010 | 2649 | 'abort': 'Abort', |
df9a681d | 2650 | 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd', |
41dc1dc0 MAL |
2651 | 'block-dirty-bitmap-clear': 'BlockDirtyBitmap', |
2652 | 'blockdev-backup': 'BlockdevBackup', | |
2653 | 'blockdev-snapshot': 'BlockdevSnapshot', | |
2654 | 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal', | |
2655 | 'blockdev-snapshot-sync': 'BlockdevSnapshotSync', | |
2656 | 'drive-backup': 'DriveBackup' | |
52e7c241 | 2657 | } } |
8802d1fd | 2658 | |
94d16a64 | 2659 | ## |
5072f7b3 | 2660 | # @TransactionProperties: |
94d16a64 JS |
2661 | # |
2662 | # Optional arguments to modify the behavior of a Transaction. | |
2663 | # | |
1d8bda12 | 2664 | # @completion-mode: Controls how jobs launched asynchronously by |
94d16a64 JS |
2665 | # Actions will complete or fail as a group. |
2666 | # See @ActionCompletionMode for details. | |
2667 | # | |
2668 | # Since: 2.5 | |
2669 | ## | |
2670 | { 'struct': 'TransactionProperties', | |
2671 | 'data': { | |
2672 | '*completion-mode': 'ActionCompletionMode' | |
2673 | } | |
2674 | } | |
2675 | ||
8802d1fd | 2676 | ## |
5072f7b3 | 2677 | # @transaction: |
8802d1fd | 2678 | # |
c8a83e85 KW |
2679 | # Executes a number of transactionable QMP commands atomically. If any |
2680 | # operation fails, then the entire set of actions will be abandoned and the | |
2681 | # appropriate error returned. | |
8802d1fd | 2682 | # |
5c82b0f1 MAL |
2683 | # For external snapshots, the dictionary contains the device, the file to use for |
2684 | # the new snapshot, and the format. The default format, if not specified, is | |
2685 | # qcow2. | |
2686 | # | |
2687 | # Each new snapshot defaults to being created by QEMU (wiping any | |
2688 | # contents if the file already exists), but it is also possible to reuse | |
2689 | # an externally-created file. In the latter case, you should ensure that | |
2690 | # the new image file has the same contents as the current one; QEMU cannot | |
2691 | # perform any meaningful check. Typically this is achieved by using the | |
2692 | # current image file as the backing file for the new image. | |
2693 | # | |
2694 | # On failure, the original disks pre-snapshot attempt will be used. | |
2695 | # | |
2696 | # For internal snapshots, the dictionary contains the device and the snapshot's | |
2697 | # name. If an internal snapshot matching name already exists, the request will | |
2698 | # be rejected. Only some image formats support it, for example, qcow2, rbd, | |
2699 | # and sheepdog. | |
2700 | # | |
2701 | # On failure, qemu will try delete the newly created internal snapshot in the | |
2702 | # transaction. When an I/O error occurs during deletion, the user needs to fix | |
2703 | # it later with qemu-img or other command. | |
2704 | # | |
94d16a64 JS |
2705 | # @actions: List of @TransactionAction; |
2706 | # information needed for the respective operations. | |
2707 | # | |
1d8bda12 | 2708 | # @properties: structure of additional options to control the |
94d16a64 JS |
2709 | # execution of the transaction. See @TransactionProperties |
2710 | # for additional detail. | |
8802d1fd JC |
2711 | # |
2712 | # Returns: nothing on success | |
5c82b0f1 | 2713 | # |
c8a83e85 | 2714 | # Errors depend on the operations of the transaction |
8802d1fd | 2715 | # |
c8a83e85 KW |
2716 | # Note: The transaction aborts on the first failure. Therefore, there will be |
2717 | # information on only one failed operation returned in an error condition, and | |
52e7c241 PB |
2718 | # subsequent actions will not have been attempted. |
2719 | # | |
5072f7b3 | 2720 | # Since: 1.1 |
5c82b0f1 MAL |
2721 | # |
2722 | # Example: | |
2723 | # | |
2724 | # -> { "execute": "transaction", | |
2725 | # "arguments": { "actions": [ | |
2726 | # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0", | |
2727 | # "snapshot-file": "/some/place/my-image", | |
2728 | # "format": "qcow2" } }, | |
2729 | # { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile", | |
2730 | # "snapshot-file": "/some/place/my-image2", | |
2731 | # "snapshot-node-name": "node3432", | |
2732 | # "mode": "existing", | |
2733 | # "format": "qcow2" } }, | |
2734 | # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1", | |
2735 | # "snapshot-file": "/some/place/my-image2", | |
2736 | # "mode": "existing", | |
2737 | # "format": "qcow2" } }, | |
2738 | # { "type": "blockdev-snapshot-internal-sync", "data" : { | |
2739 | # "device": "ide-hd2", | |
2740 | # "name": "snapshot0" } } ] } } | |
2741 | # <- { "return": {} } | |
2742 | # | |
8802d1fd | 2743 | ## |
52e7c241 | 2744 | { 'command': 'transaction', |
94d16a64 JS |
2745 | 'data': { 'actions': [ 'TransactionAction' ], |
2746 | '*properties': 'TransactionProperties' | |
2747 | } | |
2748 | } | |
8802d1fd | 2749 | |
d51a67b4 LC |
2750 | ## |
2751 | # @human-monitor-command: | |
2752 | # | |
2753 | # Execute a command on the human monitor and return the output. | |
2754 | # | |
2755 | # @command-line: the command to execute in the human monitor | |
2756 | # | |
1d8bda12 | 2757 | # @cpu-index: The CPU to use for commands that require an implicit CPU |
d51a67b4 LC |
2758 | # |
2759 | # Returns: the output of the command as a string | |
2760 | # | |
1ad166b6 | 2761 | # Since: 0.14.0 |
08e4ed6c | 2762 | # |
1ad166b6 | 2763 | # Notes: This command only exists as a stop-gap. Its use is highly |
e9ac76ac MAL |
2764 | # discouraged. The semantics of this command are not |
2765 | # guaranteed: this means that command names, arguments and | |
2766 | # responses can change or be removed at ANY time. Applications | |
2767 | # that rely on long term stability guarantees should NOT | |
2768 | # use this command. | |
b952b558 | 2769 | # |
1ad166b6 | 2770 | # Known limitations: |
b952b558 | 2771 | # |
3df58d41 | 2772 | # * This command is stateless, this means that commands that depend |
1ad166b6 | 2773 | # on state information (such as getfd) might not work |
d9b902db | 2774 | # |
788cf9f8 | 2775 | # * Commands that prompt the user for data don't currently work |
e9ac76ac MAL |
2776 | # |
2777 | # Example: | |
2778 | # | |
2779 | # -> { "execute": "human-monitor-command", | |
2780 | # "arguments": { "command-line": "info kvm" } } | |
2781 | # <- { "return": "kvm support: enabled\r\n" } | |
2782 | # | |
d9b902db | 2783 | ## |
1ad166b6 BC |
2784 | { 'command': 'human-monitor-command', |
2785 | 'data': {'command-line': 'str', '*cpu-index': 'int'}, | |
2786 | 'returns': 'str' } | |
d9b902db PB |
2787 | |
2788 | ## | |
5072f7b3 | 2789 | # @migrate_cancel: |
6cdedb07 LC |
2790 | # |
2791 | # Cancel the current executing migration process. | |
2792 | # | |
2793 | # Returns: nothing on success | |
2794 | # | |
2795 | # Notes: This command succeeds even if there is no migration process running. | |
2796 | # | |
2797 | # Since: 0.14.0 | |
92dcfb43 MAL |
2798 | # |
2799 | # Example: | |
2800 | # | |
2801 | # -> { "execute": "migrate_cancel" } | |
2802 | # <- { "return": {} } | |
2803 | # | |
6cdedb07 LC |
2804 | ## |
2805 | { 'command': 'migrate_cancel' } | |
4f0a993b LC |
2806 | |
2807 | ## | |
5072f7b3 | 2808 | # @migrate_set_downtime: |
4f0a993b LC |
2809 | # |
2810 | # Set maximum tolerated downtime for migration. | |
2811 | # | |
2812 | # @value: maximum downtime in seconds | |
2813 | # | |
2814 | # Returns: nothing on success | |
2815 | # | |
2ff30257 AA |
2816 | # Notes: This command is deprecated in favor of 'migrate-set-parameters' |
2817 | # | |
4f0a993b | 2818 | # Since: 0.14.0 |
de0b45ea MAL |
2819 | # |
2820 | # Example: | |
2821 | # | |
2822 | # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } } | |
2823 | # <- { "return": {} } | |
2824 | # | |
4f0a993b LC |
2825 | ## |
2826 | { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} } | |
3dc85383 LC |
2827 | |
2828 | ## | |
5072f7b3 | 2829 | # @migrate_set_speed: |
3dc85383 LC |
2830 | # |
2831 | # Set maximum speed for migration. | |
2832 | # | |
ab989533 | 2833 | # @value: maximum speed in bytes per second. |
3dc85383 LC |
2834 | # |
2835 | # Returns: nothing on success | |
2836 | # | |
2ff30257 | 2837 | # Notes: This command is deprecated in favor of 'migrate-set-parameters' |
3dc85383 LC |
2838 | # |
2839 | # Since: 0.14.0 | |
ab989533 MAL |
2840 | # |
2841 | # Example: | |
2842 | # | |
2843 | # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } } | |
2844 | # <- { "return": {} } | |
2845 | # | |
3dc85383 LC |
2846 | ## |
2847 | { 'command': 'migrate_set_speed', 'data': {'value': 'int'} } | |
b4b12c62 | 2848 | |
9e1ba4cc | 2849 | ## |
5072f7b3 | 2850 | # @migrate-set-cache-size: |
9e1ba4cc | 2851 | # |
8f457b67 | 2852 | # Set cache size to be used by XBZRLE migration |
9e1ba4cc OW |
2853 | # |
2854 | # @value: cache size in bytes | |
2855 | # | |
2856 | # The size will be rounded down to the nearest power of 2. | |
2857 | # The cache size can be modified before and during ongoing migration | |
2858 | # | |
2859 | # Returns: nothing on success | |
2860 | # | |
2861 | # Since: 1.2 | |
8f457b67 MAL |
2862 | # |
2863 | # Example: | |
2864 | # | |
2865 | # -> { "execute": "migrate-set-cache-size", | |
2866 | # "arguments": { "value": 536870912 } } | |
2867 | # <- { "return": {} } | |
2868 | # | |
9e1ba4cc OW |
2869 | ## |
2870 | { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} } | |
2871 | ||
2872 | ## | |
5072f7b3 | 2873 | # @query-migrate-cache-size: |
9e1ba4cc | 2874 | # |
b953601b | 2875 | # Query migration XBZRLE cache size |
9e1ba4cc OW |
2876 | # |
2877 | # Returns: XBZRLE cache size in bytes | |
2878 | # | |
2879 | # Since: 1.2 | |
b953601b MAL |
2880 | # |
2881 | # Example: | |
2882 | # | |
2883 | # -> { "execute": "query-migrate-cache-size" } | |
2884 | # <- { "return": 67108864 } | |
2885 | # | |
9e1ba4cc OW |
2886 | ## |
2887 | { 'command': 'query-migrate-cache-size', 'returns': 'int' } | |
2888 | ||
b4b12c62 | 2889 | ## |
d03ee401 | 2890 | # @ObjectPropertyInfo: |
b4b12c62 AL |
2891 | # |
2892 | # @name: the name of the property | |
2893 | # | |
2894 | # @type: the type of the property. This will typically come in one of four | |
2895 | # forms: | |
2896 | # | |
2897 | # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'. | |
2898 | # These types are mapped to the appropriate JSON type. | |
2899 | # | |
33b23b4b | 2900 | # 2) A child type in the form 'child<subtype>' where subtype is a qdev |
b4b12c62 AL |
2901 | # device type name. Child properties create the composition tree. |
2902 | # | |
33b23b4b | 2903 | # 3) A link type in the form 'link<subtype>' where subtype is a qdev |
b4b12c62 AL |
2904 | # device type name. Link properties form the device model graph. |
2905 | # | |
51920820 | 2906 | # Since: 1.2 |
b4b12c62 | 2907 | ## |
895a2a80 | 2908 | { 'struct': 'ObjectPropertyInfo', |
b4b12c62 AL |
2909 | 'data': { 'name': 'str', 'type': 'str' } } |
2910 | ||
2911 | ## | |
2912 | # @qom-list: | |
2913 | # | |
57c9fafe | 2914 | # This command will list any properties of a object given a path in the object |
b4b12c62 AL |
2915 | # model. |
2916 | # | |
57c9fafe | 2917 | # @path: the path within the object model. See @qom-get for a description of |
b4b12c62 AL |
2918 | # this parameter. |
2919 | # | |
57c9fafe AL |
2920 | # Returns: a list of @ObjectPropertyInfo that describe the properties of the |
2921 | # object. | |
b4b12c62 | 2922 | # |
51920820 | 2923 | # Since: 1.2 |
b4b12c62 AL |
2924 | ## |
2925 | { 'command': 'qom-list', | |
2926 | 'data': { 'path': 'str' }, | |
57c9fafe | 2927 | 'returns': [ 'ObjectPropertyInfo' ] } |
eb6e8ea5 AL |
2928 | |
2929 | ## | |
2930 | # @qom-get: | |
2931 | # | |
57c9fafe | 2932 | # This command will get a property from a object model path and return the |
eb6e8ea5 AL |
2933 | # value. |
2934 | # | |
57c9fafe | 2935 | # @path: The path within the object model. There are two forms of supported |
eb6e8ea5 AL |
2936 | # paths--absolute and partial paths. |
2937 | # | |
57c9fafe | 2938 | # Absolute paths are derived from the root object and can follow child<> |
eb6e8ea5 AL |
2939 | # or link<> properties. Since they can follow link<> properties, they |
2940 | # can be arbitrarily long. Absolute paths look like absolute filenames | |
2941 | # and are prefixed with a leading slash. | |
2942 | # | |
2943 | # Partial paths look like relative filenames. They do not begin | |
2944 | # with a prefix. The matching rules for partial paths are subtle but | |
57c9fafe | 2945 | # designed to make specifying objects easy. At each level of the |
eb6e8ea5 AL |
2946 | # composition tree, the partial path is matched as an absolute path. |
2947 | # The first match is not returned. At least two matches are searched | |
2948 | # for. A successful result is only returned if only one match is | |
2949 | # found. If more than one match is found, a flag is return to | |
2950 | # indicate that the match was ambiguous. | |
2951 | # | |
2952 | # @property: The property name to read | |
2953 | # | |
33b23b4b MAL |
2954 | # Returns: The property value. The type depends on the property |
2955 | # type. child<> and link<> properties are returned as #str | |
2956 | # pathnames. All integer property types (u8, u16, etc) are | |
2957 | # returned as #int. | |
eb6e8ea5 | 2958 | # |
51920820 | 2959 | # Since: 1.2 |
eb6e8ea5 AL |
2960 | ## |
2961 | { 'command': 'qom-get', | |
2962 | 'data': { 'path': 'str', 'property': 'str' }, | |
6eb3937e | 2963 | 'returns': 'any' } |
eb6e8ea5 AL |
2964 | |
2965 | ## | |
2966 | # @qom-set: | |
2967 | # | |
57c9fafe | 2968 | # This command will set a property from a object model path. |
eb6e8ea5 AL |
2969 | # |
2970 | # @path: see @qom-get for a description of this parameter | |
2971 | # | |
2972 | # @property: the property name to set | |
2973 | # | |
2974 | # @value: a value who's type is appropriate for the property type. See @qom-get | |
2975 | # for a description of type mapping. | |
2976 | # | |
51920820 | 2977 | # Since: 1.2 |
eb6e8ea5 AL |
2978 | ## |
2979 | { 'command': 'qom-set', | |
6eb3937e | 2980 | 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } } |
fbf796fd LC |
2981 | |
2982 | ## | |
2983 | # @set_password: | |
2984 | # | |
2985 | # Sets the password of a remote display session. | |
2986 | # | |
2987 | # @protocol: `vnc' to modify the VNC server password | |
2988 | # `spice' to modify the Spice server password | |
2989 | # | |
2990 | # @password: the new password | |
2991 | # | |
1d8bda12 | 2992 | # @connected: how to handle existing clients when changing the |
b80e560b | 2993 | # password. If nothing is specified, defaults to `keep' |
fbf796fd LC |
2994 | # `fail' to fail the command if clients are connected |
2995 | # `disconnect' to disconnect existing clients | |
2996 | # `keep' to maintain existing clients | |
2997 | # | |
2998 | # Returns: Nothing on success | |
2999 | # If Spice is not enabled, DeviceNotFound | |
fbf796fd LC |
3000 | # |
3001 | # Since: 0.14.0 | |
4d8a374e MAL |
3002 | # |
3003 | # Example: | |
3004 | # | |
3005 | # -> { "execute": "set_password", "arguments": { "protocol": "vnc", | |
3006 | # "password": "secret" } } | |
3007 | # <- { "return": {} } | |
3008 | # | |
fbf796fd LC |
3009 | ## |
3010 | { 'command': 'set_password', | |
3011 | 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} } | |
9ad5372d LC |
3012 | |
3013 | ## | |
3014 | # @expire_password: | |
3015 | # | |
3016 | # Expire the password of a remote display server. | |
3017 | # | |
3018 | # @protocol: the name of the remote display protocol `vnc' or `spice' | |
3019 | # | |
3020 | # @time: when to expire the password. | |
3021 | # `now' to expire the password immediately | |
3022 | # `never' to cancel password expiration | |
3023 | # `+INT' where INT is the number of seconds from now (integer) | |
3024 | # `INT' where INT is the absolute time in seconds | |
3025 | # | |
3026 | # Returns: Nothing on success | |
3027 | # If @protocol is `spice' and Spice is not active, DeviceNotFound | |
9ad5372d LC |
3028 | # |
3029 | # Since: 0.14.0 | |
3030 | # | |
3031 | # Notes: Time is relative to the server and currently there is no way to | |
3032 | # coordinate server time with client time. It is not recommended to | |
3033 | # use the absolute time version of the @time parameter unless you're | |
3034 | # sure you are on the same machine as the QEMU instance. | |
342816b9 MAL |
3035 | # |
3036 | # Example: | |
3037 | # | |
3038 | # -> { "execute": "expire_password", "arguments": { "protocol": "vnc", | |
3039 | # "time": "+60" } } | |
3040 | # <- { "return": {} } | |
3041 | # | |
9ad5372d LC |
3042 | ## |
3043 | { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} } | |
c245b6a3 | 3044 | |
270b243f LC |
3045 | ## |
3046 | # @change-vnc-password: | |
3047 | # | |
3048 | # Change the VNC server password. | |
3049 | # | |
1c854067 | 3050 | # @password: the new password to use with VNC authentication |
270b243f LC |
3051 | # |
3052 | # Since: 1.1 | |
3053 | # | |
3054 | # Notes: An empty password in this command will set the password to the empty | |
3055 | # string. Existing clients are unaffected by executing this command. | |
3056 | ## | |
3057 | { 'command': 'change-vnc-password', 'data': {'password': 'str'} } | |
333a96ec LC |
3058 | |
3059 | ## | |
3060 | # @change: | |
3061 | # | |
3062 | # This command is multiple commands multiplexed together. | |
3063 | # | |
3064 | # @device: This is normally the name of a block device but it may also be 'vnc'. | |
3065 | # when it's 'vnc', then sub command depends on @target | |
3066 | # | |
3067 | # @target: If @device is a block device, then this is the new filename. | |
3068 | # If @device is 'vnc', then if the value 'password' selects the vnc | |
3069 | # change password command. Otherwise, this specifies a new server URI | |
3070 | # address to listen to for VNC connections. | |
3071 | # | |
3072 | # @arg: If @device is a block device, then this is an optional format to open | |
3073 | # the device with. | |
3074 | # If @device is 'vnc' and @target is 'password', this is the new VNC | |
6dfe8eab | 3075 | # password to set. See change-vnc-password for additional notes. |
333a96ec LC |
3076 | # |
3077 | # Returns: Nothing on success. | |
3078 | # If @device is not a valid block device, DeviceNotFound | |
333a96ec | 3079 | # |
24fb4133 HR |
3080 | # Notes: This interface is deprecated, and it is strongly recommended that you |
3081 | # avoid using it. For changing block devices, use | |
3082 | # blockdev-change-medium; for changing VNC parameters, use | |
3083 | # change-vnc-password. | |
333a96ec LC |
3084 | # |
3085 | # Since: 0.14.0 | |
01387ae5 MAL |
3086 | # |
3087 | # Example: | |
3088 | # | |
3089 | # 1. Change a removable medium | |
3090 | # | |
3091 | # -> { "execute": "change", | |
3092 | # "arguments": { "device": "ide1-cd0", | |
3093 | # "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } } | |
3094 | # <- { "return": {} } | |
3095 | # | |
3096 | # 2. Change VNC password | |
3097 | # | |
3098 | # -> { "execute": "change", | |
3099 | # "arguments": { "device": "vnc", "target": "password", | |
3100 | # "arg": "foobar1" } } | |
3101 | # <- { "return": {} } | |
3102 | # | |
333a96ec LC |
3103 | ## |
3104 | { 'command': 'change', | |
3105 | 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} } | |
80047da5 | 3106 | |
5eeee3fa AL |
3107 | ## |
3108 | # @ObjectTypeInfo: | |
3109 | # | |
3110 | # This structure describes a search result from @qom-list-types | |
3111 | # | |
3112 | # @name: the type name found in the search | |
3113 | # | |
87467eae EH |
3114 | # @abstract: the type is abstract and can't be directly instantiated. |
3115 | # Omitted if false. (since 2.10) | |
3116 | # | |
f86285c5 EH |
3117 | # @parent: Name of parent type, if any (since 2.10) |
3118 | # | |
5eeee3fa | 3119 | # Since: 1.1 |
5eeee3fa | 3120 | ## |
895a2a80 | 3121 | { 'struct': 'ObjectTypeInfo', |
f86285c5 | 3122 | 'data': { 'name': 'str', '*abstract': 'bool', '*parent': 'str' } } |
5eeee3fa AL |
3123 | |
3124 | ## | |
3125 | # @qom-list-types: | |
3126 | # | |
3127 | # This command will return a list of types given search parameters | |
3128 | # | |
3129 | # @implements: if specified, only return types that implement this type name | |
3130 | # | |
3131 | # @abstract: if true, include abstract types in the results | |
3132 | # | |
3133 | # Returns: a list of @ObjectTypeInfo or an empty list if no results are found | |
3134 | # | |
3135 | # Since: 1.1 | |
5eeee3fa AL |
3136 | ## |
3137 | { 'command': 'qom-list-types', | |
3138 | 'data': { '*implements': 'str', '*abstract': 'bool' }, | |
3139 | 'returns': [ 'ObjectTypeInfo' ] } | |
e1c37d0e | 3140 | |
1daa31b9 AL |
3141 | ## |
3142 | # @DevicePropertyInfo: | |
3143 | # | |
3144 | # Information about device properties. | |
3145 | # | |
3146 | # @name: the name of the property | |
3147 | # @type: the typename of the property | |
1d8bda12 | 3148 | # @description: if specified, the description of the property. |
07d09c58 | 3149 | # (since 2.2) |
1daa31b9 AL |
3150 | # |
3151 | # Since: 1.2 | |
3152 | ## | |
895a2a80 | 3153 | { 'struct': 'DevicePropertyInfo', |
07d09c58 | 3154 | 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } } |
1daa31b9 AL |
3155 | |
3156 | ## | |
3157 | # @device-list-properties: | |
3158 | # | |
3159 | # List properties associated with a device. | |
3160 | # | |
3161 | # @typename: the type name of a device | |
3162 | # | |
3163 | # Returns: a list of DevicePropertyInfo describing a devices properties | |
3164 | # | |
3165 | # Since: 1.2 | |
3166 | ## | |
3167 | { 'command': 'device-list-properties', | |
3168 | 'data': { 'typename': 'str'}, | |
3169 | 'returns': [ 'DevicePropertyInfo' ] } | |
3170 | ||
e1c37d0e | 3171 | ## |
5072f7b3 | 3172 | # @migrate: |
e1c37d0e LC |
3173 | # |
3174 | # Migrates the current running guest to another Virtual Machine. | |
3175 | # | |
3176 | # @uri: the Uniform Resource Identifier of the destination VM | |
3177 | # | |
1d8bda12 | 3178 | # @blk: do block migration (full disk copy) |
e1c37d0e | 3179 | # |
1d8bda12 | 3180 | # @inc: incremental disk copy migration |
e1c37d0e LC |
3181 | # |
3182 | # @detach: this argument exists only for compatibility reasons and | |
3183 | # is ignored by QEMU | |
3184 | # | |
3185 | # Returns: nothing on success | |
3186 | # | |
3187 | # Since: 0.14.0 | |
b3ac5a0d MAL |
3188 | # |
3189 | # Notes: | |
3190 | # | |
3191 | # 1. The 'query-migrate' command should be used to check migration's progress | |
3192 | # and final result (this information is provided by the 'status' member) | |
3193 | # | |
3194 | # 2. All boolean arguments default to false | |
3195 | # | |
3196 | # 3. The user Monitor's "detach" argument is invalid in QMP and should not | |
3197 | # be used | |
3198 | # | |
3199 | # Example: | |
3200 | # | |
3201 | # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } } | |
3202 | # <- { "return": {} } | |
3203 | # | |
e1c37d0e LC |
3204 | ## |
3205 | { 'command': 'migrate', | |
3206 | 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } } | |
33cf629a | 3207 | |
bf1ae1f4 | 3208 | ## |
5072f7b3 | 3209 | # @migrate-incoming: |
bf1ae1f4 DDAG |
3210 | # |
3211 | # Start an incoming migration, the qemu must have been started | |
3212 | # with -incoming defer | |
3213 | # | |
3214 | # @uri: The Uniform Resource Identifier identifying the source or | |
3215 | # address to listen on | |
3216 | # | |
3217 | # Returns: nothing on success | |
3218 | # | |
3219 | # Since: 2.3 | |
dbdbddb9 MAL |
3220 | # |
3221 | # Notes: | |
3222 | # | |
3223 | # 1. It's a bad idea to use a string for the uri, but it needs to stay | |
3224 | # compatible with -incoming and the format of the uri is already exposed | |
3225 | # above libvirt. | |
3226 | # | |
3227 | # 2. QEMU must be started with -incoming defer to allow migrate-incoming to | |
3228 | # be used. | |
3229 | # | |
3230 | # 3. The uri format is the same as for -incoming | |
3231 | # | |
3232 | # Example: | |
3233 | # | |
3234 | # -> { "execute": "migrate-incoming", | |
3235 | # "arguments": { "uri": "tcp::4446" } } | |
3236 | # <- { "return": {} } | |
3237 | # | |
bf1ae1f4 DDAG |
3238 | ## |
3239 | { 'command': 'migrate-incoming', 'data': {'uri': 'str' } } | |
3240 | ||
49687ace | 3241 | ## |
a7ae8355 SS |
3242 | # @xen-save-devices-state: |
3243 | # | |
3244 | # Save the state of all devices to file. The RAM and the block devices | |
3245 | # of the VM are not saved by this command. | |
3246 | # | |
3247 | # @filename: the file to save the state of the devices to as binary | |
3248 | # data. See xen-save-devices-state.txt for a description of the binary | |
3249 | # format. | |
3250 | # | |
3251 | # Returns: Nothing on success | |
a7ae8355 SS |
3252 | # |
3253 | # Since: 1.1 | |
2ea72beb MAL |
3254 | # |
3255 | # Example: | |
3256 | # | |
3257 | # -> { "execute": "xen-save-devices-state", | |
3258 | # "arguments": { "filename": "/tmp/save" } } | |
3259 | # <- { "return": {} } | |
3260 | # | |
a7ae8355 SS |
3261 | ## |
3262 | { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} } | |
a15fef21 | 3263 | |
39f42439 | 3264 | ## |
5072f7b3 | 3265 | # @xen-set-global-dirty-log: |
39f42439 AP |
3266 | # |
3267 | # Enable or disable the global dirty log mode. | |
3268 | # | |
3269 | # @enable: true to enable, false to disable. | |
3270 | # | |
3271 | # Returns: nothing | |
3272 | # | |
3273 | # Since: 1.3 | |
a4df6eff MAL |
3274 | # |
3275 | # Example: | |
3276 | # | |
3277 | # -> { "execute": "xen-set-global-dirty-log", | |
3278 | # "arguments": { "enable": true } } | |
3279 | # <- { "return": {} } | |
3280 | # | |
39f42439 AP |
3281 | ## |
3282 | { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } } | |
3283 | ||
94cfd07f MAL |
3284 | ## |
3285 | # @device_add: | |
3286 | # | |
3287 | # @driver: the name of the new device's driver | |
3288 | # | |
1d8bda12 | 3289 | # @bus: the device's parent bus (device tree path) |
94cfd07f | 3290 | # |
1d8bda12 | 3291 | # @id: the device's ID, must be unique |
94cfd07f MAL |
3292 | # |
3293 | # Additional arguments depend on the type. | |
3294 | # | |
3295 | # Add a device. | |
3296 | # | |
3297 | # Notes: | |
3298 | # 1. For detailed information about this command, please refer to the | |
3299 | # 'docs/qdev-device-use.txt' file. | |
3300 | # | |
3301 | # 2. It's possible to list device properties by running QEMU with the | |
3302 | # "-device DEVICE,help" command-line argument, where DEVICE is the | |
3303 | # device's name | |
3304 | # | |
3305 | # Example: | |
3306 | # | |
3307 | # -> { "execute": "device_add", | |
3308 | # "arguments": { "driver": "e1000", "id": "net1", | |
3309 | # "bus": "pci.0", | |
3310 | # "mac": "52:54:00:12:34:56" } } | |
3311 | # <- { "return": {} } | |
3312 | # | |
e22da431 | 3313 | # TODO: This command effectively bypasses QAPI completely due to its |
94cfd07f MAL |
3314 | # "additional arguments" business. It shouldn't have been added to |
3315 | # the schema in this form. It should be qapified properly, or | |
3316 | # replaced by a properly qapified command. | |
3317 | # | |
3318 | # Since: 0.13 | |
3319 | ## | |
3320 | { 'command': 'device_add', | |
b780e9c3 | 3321 | 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'}, |
94cfd07f MAL |
3322 | 'gen': false } # so we can get the additional arguments |
3323 | ||
a15fef21 LC |
3324 | ## |
3325 | # @device_del: | |
3326 | # | |
3327 | # Remove a device from a guest | |
3328 | # | |
e389c004 | 3329 | # @id: the device's ID or QOM path |
a15fef21 LC |
3330 | # |
3331 | # Returns: Nothing on success | |
3332 | # If @id is not a valid device, DeviceNotFound | |
a15fef21 LC |
3333 | # |
3334 | # Notes: When this command completes, the device may not be removed from the | |
3335 | # guest. Hot removal is an operation that requires guest cooperation. | |
3336 | # This command merely requests that the guest begin the hot removal | |
0402a5d6 MT |
3337 | # process. Completion of the device removal process is signaled with a |
3338 | # DEVICE_DELETED event. Guest reset will automatically complete removal | |
3339 | # for all devices. | |
a15fef21 LC |
3340 | # |
3341 | # Since: 0.14.0 | |
e389c004 MAL |
3342 | # |
3343 | # Example: | |
3344 | # | |
3345 | # -> { "execute": "device_del", | |
3346 | # "arguments": { "id": "net1" } } | |
3347 | # <- { "return": {} } | |
3348 | # | |
3349 | # -> { "execute": "device_del", | |
3350 | # "arguments": { "id": "/machine/peripheral-anon/device[0]" } } | |
3351 | # <- { "return": {} } | |
3352 | # | |
a15fef21 LC |
3353 | ## |
3354 | { 'command': 'device_del', 'data': {'id': 'str'} } | |
783e9b48 | 3355 | |
b53ccc30 QN |
3356 | ## |
3357 | # @DumpGuestMemoryFormat: | |
3358 | # | |
3359 | # An enumeration of guest-memory-dump's format. | |
3360 | # | |
3361 | # @elf: elf format | |
3362 | # | |
3363 | # @kdump-zlib: kdump-compressed format with zlib-compressed | |
3364 | # | |
3365 | # @kdump-lzo: kdump-compressed format with lzo-compressed | |
3366 | # | |
3367 | # @kdump-snappy: kdump-compressed format with snappy-compressed | |
3368 | # | |
3369 | # Since: 2.0 | |
3370 | ## | |
3371 | { 'enum': 'DumpGuestMemoryFormat', | |
3372 | 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] } | |
3373 | ||
783e9b48 | 3374 | ## |
5072f7b3 | 3375 | # @dump-guest-memory: |
783e9b48 WC |
3376 | # |
3377 | # Dump guest's memory to vmcore. It is a synchronous operation that can take | |
f1cd4830 | 3378 | # very long depending on the amount of guest memory. |
f5b0d93b LC |
3379 | # |
3380 | # @paging: if true, do paging to get guest's memory mapping. This allows | |
d691180e | 3381 | # using gdb to process the core file. |
f5b0d93b | 3382 | # |
d691180e LC |
3383 | # IMPORTANT: this option can make QEMU allocate several gigabytes |
3384 | # of RAM. This can happen for a large guest, or a | |
3385 | # malicious guest pretending to be large. | |
3386 | # | |
3387 | # Also, paging=true has the following limitations: | |
3388 | # | |
3389 | # 1. The guest may be in a catastrophic state or can have corrupted | |
3390 | # memory, which cannot be trusted | |
3391 | # 2. The guest can be in real-mode even if paging is enabled. For | |
3392 | # example, the guest uses ACPI to sleep, and ACPI sleep state | |
3393 | # goes in real-mode | |
f1cd4830 | 3394 | # 3. Currently only supported on i386 and x86_64. |
f5b0d93b | 3395 | # |
783e9b48 | 3396 | # @protocol: the filename or file descriptor of the vmcore. The supported |
d691180e | 3397 | # protocols are: |
f5b0d93b | 3398 | # |
d691180e LC |
3399 | # 1. file: the protocol starts with "file:", and the following |
3400 | # string is the file's path. | |
3401 | # 2. fd: the protocol starts with "fd:", and the following string | |
3402 | # is the fd's name. | |
f5b0d93b | 3403 | # |
1d8bda12 | 3404 | # @detach: if true, QMP will return immediately rather than |
39ba2ea6 PX |
3405 | # waiting for the dump to finish. The user can track progress |
3406 | # using "query-dump". (since 2.6). | |
228de9cf | 3407 | # |
1d8bda12 | 3408 | # @begin: if specified, the starting physical address. |
f5b0d93b | 3409 | # |
1d8bda12 | 3410 | # @length: if specified, the memory size, in bytes. If you don't |
d691180e LC |
3411 | # want to dump all guest's memory, please specify the start @begin |
3412 | # and @length | |
783e9b48 | 3413 | # |
1d8bda12 | 3414 | # @format: if specified, the format of guest memory dump. But non-elf |
b53ccc30 QN |
3415 | # format is conflict with paging and filter, ie. @paging, @begin and |
3416 | # @length is not allowed to be specified with non-elf @format at the | |
3417 | # same time (since 2.0) | |
3418 | # | |
58e4300a MAL |
3419 | # Note: All boolean arguments default to false |
3420 | # | |
783e9b48 | 3421 | # Returns: nothing on success |
783e9b48 WC |
3422 | # |
3423 | # Since: 1.2 | |
58e4300a MAL |
3424 | # |
3425 | # Example: | |
3426 | # | |
3427 | # -> { "execute": "dump-guest-memory", | |
3428 | # "arguments": { "protocol": "fd:dump" } } | |
3429 | # <- { "return": {} } | |
3430 | # | |
783e9b48 WC |
3431 | ## |
3432 | { 'command': 'dump-guest-memory', | |
228de9cf PX |
3433 | 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool', |
3434 | '*begin': 'int', '*length': 'int', | |
3435 | '*format': 'DumpGuestMemoryFormat'} } | |
d691180e | 3436 | |
baf28f57 | 3437 | ## |
5072f7b3 | 3438 | # @DumpStatus: |
baf28f57 PX |
3439 | # |
3440 | # Describe the status of a long-running background guest memory dump. | |
3441 | # | |
3442 | # @none: no dump-guest-memory has started yet. | |
3443 | # | |
3444 | # @active: there is one dump running in background. | |
3445 | # | |
3446 | # @completed: the last dump has finished successfully. | |
3447 | # | |
3448 | # @failed: the last dump has failed. | |
3449 | # | |
5072f7b3 | 3450 | # Since: 2.6 |
baf28f57 PX |
3451 | ## |
3452 | { 'enum': 'DumpStatus', | |
3453 | 'data': [ 'none', 'active', 'completed', 'failed' ] } | |
3454 | ||
39ba2ea6 | 3455 | ## |
5072f7b3 | 3456 | # @DumpQueryResult: |
39ba2ea6 PX |
3457 | # |
3458 | # The result format for 'query-dump'. | |
3459 | # | |
3460 | # @status: enum of @DumpStatus, which shows current dump status | |
3461 | # | |
3462 | # @completed: bytes written in latest dump (uncompressed) | |
3463 | # | |
3464 | # @total: total bytes to be written in latest dump (uncompressed) | |
3465 | # | |
5072f7b3 | 3466 | # Since: 2.6 |
39ba2ea6 PX |
3467 | ## |
3468 | { 'struct': 'DumpQueryResult', | |
3469 | 'data': { 'status': 'DumpStatus', | |
3470 | 'completed': 'int', | |
3471 | 'total': 'int' } } | |
3472 | ||
3473 | ## | |
5072f7b3 | 3474 | # @query-dump: |
39ba2ea6 PX |
3475 | # |
3476 | # Query latest dump status. | |
3477 | # | |
3478 | # Returns: A @DumpStatus object showing the dump status. | |
3479 | # | |
3480 | # Since: 2.6 | |
926dce5c MAL |
3481 | # |
3482 | # Example: | |
3483 | # | |
3484 | # -> { "execute": "query-dump" } | |
3485 | # <- { "return": { "status": "active", "completed": 1024000, | |
3486 | # "total": 2048000 } } | |
3487 | # | |
39ba2ea6 PX |
3488 | ## |
3489 | { 'command': 'query-dump', 'returns': 'DumpQueryResult' } | |
3490 | ||
7d6dc7f3 QN |
3491 | ## |
3492 | # @DumpGuestMemoryCapability: | |
3493 | # | |
3494 | # A list of the available formats for dump-guest-memory | |
3495 | # | |
3496 | # Since: 2.0 | |
3497 | ## | |
895a2a80 | 3498 | { 'struct': 'DumpGuestMemoryCapability', |
7d6dc7f3 QN |
3499 | 'data': { |
3500 | 'formats': ['DumpGuestMemoryFormat'] } } | |
3501 | ||
3502 | ## | |
3503 | # @query-dump-guest-memory-capability: | |
3504 | # | |
3505 | # Returns the available formats for dump-guest-memory | |
3506 | # | |
3507 | # Returns: A @DumpGuestMemoryCapability object listing available formats for | |
3508 | # dump-guest-memory | |
3509 | # | |
3510 | # Since: 2.0 | |
2ccb9803 MAL |
3511 | # |
3512 | # Example: | |
3513 | # | |
3514 | # -> { "execute": "query-dump-guest-memory-capability" } | |
3515 | # <- { "return": { "formats": | |
3516 | # ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] } | |
3517 | # | |
7d6dc7f3 QN |
3518 | ## |
3519 | { 'command': 'query-dump-guest-memory-capability', | |
3520 | 'returns': 'DumpGuestMemoryCapability' } | |
d691180e | 3521 | |
7ee0c3e3 | 3522 | ## |
5072f7b3 | 3523 | # @dump-skeys: |
7ee0c3e3 JH |
3524 | # |
3525 | # Dump guest's storage keys | |
3526 | # | |
3527 | # @filename: the path to the file to dump to | |
3528 | # | |
3529 | # This command is only supported on s390 architecture. | |
3530 | # | |
3531 | # Since: 2.5 | |
ee332b51 MAL |
3532 | # |
3533 | # Example: | |
3534 | # | |
3535 | # -> { "execute": "dump-skeys", | |
3536 | # "arguments": { "filename": "/tmp/skeys" } } | |
3537 | # <- { "return": {} } | |
3538 | # | |
7ee0c3e3 JH |
3539 | ## |
3540 | { 'command': 'dump-skeys', | |
3541 | 'data': { 'filename': 'str' } } | |
3542 | ||
928059a3 LC |
3543 | ## |
3544 | # @netdev_add: | |
3545 | # | |
3546 | # Add a network backend. | |
3547 | # | |
3548 | # @type: the type of network backend. Current valid values are 'user', 'tap', | |
3549 | # 'vde', 'socket', 'dump' and 'bridge' | |
3550 | # | |
3551 | # @id: the name of the new network backend | |
3552 | # | |
b8a98326 | 3553 | # Additional arguments depend on the type. |
928059a3 | 3554 | # |
e22da431 | 3555 | # TODO: This command effectively bypasses QAPI completely due to its |
b8a98326 MA |
3556 | # "additional arguments" business. It shouldn't have been added to |
3557 | # the schema in this form. It should be qapified properly, or | |
3558 | # replaced by a properly qapified command. | |
928059a3 LC |
3559 | # |
3560 | # Since: 0.14.0 | |
3561 | # | |
3562 | # Returns: Nothing on success | |
3563 | # If @type is not a valid network backend, DeviceNotFound | |
aa72941b MAL |
3564 | # |
3565 | # Example: | |
3566 | # | |
3567 | # -> { "execute": "netdev_add", | |
3568 | # "arguments": { "type": "user", "id": "netdev1", | |
3569 | # "dnssearch": "example.org" } } | |
3570 | # <- { "return": {} } | |
3571 | # | |
928059a3 LC |
3572 | ## |
3573 | { 'command': 'netdev_add', | |
b8a98326 MA |
3574 | 'data': {'type': 'str', 'id': 'str'}, |
3575 | 'gen': false } # so we can get the additional arguments | |
5f964155 LC |
3576 | |
3577 | ## | |
3578 | # @netdev_del: | |
3579 | # | |
3580 | # Remove a network backend. | |
3581 | # | |
3582 | # @id: the name of the network backend to remove | |
3583 | # | |
3584 | # Returns: Nothing on success | |
3585 | # If @id is not a valid network backend, DeviceNotFound | |
3586 | # | |
3587 | # Since: 0.14.0 | |
d071f6be MAL |
3588 | # |
3589 | # Example: | |
3590 | # | |
3591 | # -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } } | |
3592 | # <- { "return": {} } | |
3593 | # | |
5f964155 LC |
3594 | ## |
3595 | { 'command': 'netdev_del', 'data': {'id': 'str'} } | |
208c9d1b | 3596 | |
cff8b2c6 PB |
3597 | ## |
3598 | # @object-add: | |
3599 | # | |
3600 | # Create a QOM object. | |
3601 | # | |
3602 | # @qom-type: the class name for the object to be created | |
3603 | # | |
3604 | # @id: the name of the new object | |
3605 | # | |
1d8bda12 | 3606 | # @props: a dictionary of properties to be passed to the backend |
cff8b2c6 PB |
3607 | # |
3608 | # Returns: Nothing on success | |
3609 | # Error if @qom-type is not a valid class name | |
3610 | # | |
3611 | # Since: 2.0 | |
6517192b MAL |
3612 | # |
3613 | # Example: | |
3614 | # | |
3615 | # -> { "execute": "object-add", | |
3616 | # "arguments": { "qom-type": "rng-random", "id": "rng1", | |
3617 | # "props": { "filename": "/dev/hwrng" } } } | |
3618 | # <- { "return": {} } | |
3619 | # | |
cff8b2c6 PB |
3620 | ## |
3621 | { 'command': 'object-add', | |
6eb3937e | 3622 | 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} } |
cff8b2c6 | 3623 | |
ab2d0531 PB |
3624 | ## |
3625 | # @object-del: | |
3626 | # | |
3627 | # Remove a QOM object. | |
3628 | # | |
3629 | # @id: the name of the QOM object to remove | |
3630 | # | |
3631 | # Returns: Nothing on success | |
3632 | # Error if @id is not a valid id for a QOM object | |
3633 | # | |
3634 | # Since: 2.0 | |
de0ba662 MAL |
3635 | # |
3636 | # Example: | |
3637 | # | |
3638 | # -> { "execute": "object-del", "arguments": { "id": "rng1" } } | |
3639 | # <- { "return": {} } | |
3640 | # | |
ab2d0531 PB |
3641 | ## |
3642 | { 'command': 'object-del', 'data': {'id': 'str'} } | |
3643 | ||
14aa0c2d | 3644 | ## |
5072f7b3 | 3645 | # @NetdevNoneOptions: |
14aa0c2d LE |
3646 | # |
3647 | # Use it alone to have zero network devices. | |
3648 | # | |
5072f7b3 | 3649 | # Since: 1.2 |
14aa0c2d | 3650 | ## |
895a2a80 | 3651 | { 'struct': 'NetdevNoneOptions', |
14aa0c2d LE |
3652 | 'data': { } } |
3653 | ||
3654 | ## | |
5072f7b3 | 3655 | # @NetLegacyNicOptions: |
14aa0c2d LE |
3656 | # |
3657 | # Create a new Network Interface Card. | |
3658 | # | |
1d8bda12 | 3659 | # @netdev: id of -netdev to connect to |
14aa0c2d | 3660 | # |
1d8bda12 | 3661 | # @macaddr: MAC address |
14aa0c2d | 3662 | # |
1d8bda12 | 3663 | # @model: device model (e1000, rtl8139, virtio etc.) |
14aa0c2d | 3664 | # |
1d8bda12 | 3665 | # @addr: PCI device address |
14aa0c2d | 3666 | # |
1d8bda12 | 3667 | # @vectors: number of MSI-x vectors, 0 to disable MSI-X |
14aa0c2d | 3668 | # |
5072f7b3 | 3669 | # Since: 1.2 |
14aa0c2d | 3670 | ## |
895a2a80 | 3671 | { 'struct': 'NetLegacyNicOptions', |
14aa0c2d LE |
3672 | 'data': { |
3673 | '*netdev': 'str', | |
3674 | '*macaddr': 'str', | |
3675 | '*model': 'str', | |
3676 | '*addr': 'str', | |
3677 | '*vectors': 'uint32' } } | |
3678 | ||
14aa0c2d | 3679 | ## |
5072f7b3 | 3680 | # @NetdevUserOptions: |
14aa0c2d LE |
3681 | # |
3682 | # Use the user mode network stack which requires no administrator privilege to | |
3683 | # run. | |
3684 | # | |
1d8bda12 | 3685 | # @hostname: client hostname reported by the builtin DHCP server |
14aa0c2d | 3686 | # |
1d8bda12 | 3687 | # @restrict: isolate the guest from the host |
14aa0c2d | 3688 | # |
1d8bda12 | 3689 | # @ipv4: whether to support IPv4, default true for enabled |
0b11c036 ST |
3690 | # (since 2.6) |
3691 | # | |
1d8bda12 | 3692 | # @ipv6: whether to support IPv6, default true for enabled |
0b11c036 ST |
3693 | # (since 2.6) |
3694 | # | |
1d8bda12 | 3695 | # @ip: legacy parameter, use net= instead |
14aa0c2d | 3696 | # |
1d8bda12 | 3697 | # @net: IP network address that the guest will see, in the |
d8eb3864 ST |
3698 | # form addr[/netmask] The netmask is optional, and can be |
3699 | # either in the form a.b.c.d or as a number of valid top-most | |
3700 | # bits. Default is 10.0.2.0/24. | |
14aa0c2d | 3701 | # |
1d8bda12 | 3702 | # @host: guest-visible address of the host |
14aa0c2d | 3703 | # |
1d8bda12 | 3704 | # @tftp: root directory of the built-in TFTP server |
14aa0c2d | 3705 | # |
1d8bda12 | 3706 | # @bootfile: BOOTP filename, for use with tftp= |
14aa0c2d | 3707 | # |
1d8bda12 | 3708 | # @dhcpstart: the first of the 16 IPs the built-in DHCP server can |
14aa0c2d LE |
3709 | # assign |
3710 | # | |
1d8bda12 | 3711 | # @dns: guest-visible address of the virtual nameserver |
14aa0c2d | 3712 | # |
1d8bda12 | 3713 | # @dnssearch: list of DNS suffixes to search, passed as DHCP option |
63d2960b KS |
3714 | # to the guest |
3715 | # | |
1d8bda12 | 3716 | # @ipv6-prefix: IPv6 network prefix (default is fec0::) (since |
d8eb3864 ST |
3717 | # 2.6). The network prefix is given in the usual |
3718 | # hexadecimal IPv6 address notation. | |
7aac531e | 3719 | # |
1d8bda12 | 3720 | # @ipv6-prefixlen: IPv6 network prefix length (default is 64) |
d8eb3864 | 3721 | # (since 2.6) |
7aac531e | 3722 | # |
1d8bda12 | 3723 | # @ipv6-host: guest-visible IPv6 address of the host (since 2.6) |
7aac531e | 3724 | # |
1d8bda12 | 3725 | # @ipv6-dns: guest-visible IPv6 address of the virtual |
d8eb3864 | 3726 | # nameserver (since 2.6) |
7aac531e | 3727 | # |
1d8bda12 | 3728 | # @smb: root directory of the built-in SMB server |
14aa0c2d | 3729 | # |
1d8bda12 | 3730 | # @smbserver: IP address of the built-in SMB server |
14aa0c2d | 3731 | # |
1d8bda12 | 3732 | # @hostfwd: redirect incoming TCP or UDP host connections to guest |
14aa0c2d LE |
3733 | # endpoints |
3734 | # | |
1d8bda12 | 3735 | # @guestfwd: forward guest TCP connections |
14aa0c2d | 3736 | # |
5072f7b3 | 3737 | # Since: 1.2 |
14aa0c2d | 3738 | ## |
895a2a80 | 3739 | { 'struct': 'NetdevUserOptions', |
14aa0c2d LE |
3740 | 'data': { |
3741 | '*hostname': 'str', | |
3742 | '*restrict': 'bool', | |
0b11c036 ST |
3743 | '*ipv4': 'bool', |
3744 | '*ipv6': 'bool', | |
14aa0c2d LE |
3745 | '*ip': 'str', |
3746 | '*net': 'str', | |
3747 | '*host': 'str', | |
3748 | '*tftp': 'str', | |
3749 | '*bootfile': 'str', | |
3750 | '*dhcpstart': 'str', | |
3751 | '*dns': 'str', | |
63d2960b | 3752 | '*dnssearch': ['String'], |
d8eb3864 ST |
3753 | '*ipv6-prefix': 'str', |
3754 | '*ipv6-prefixlen': 'int', | |
3755 | '*ipv6-host': 'str', | |
3756 | '*ipv6-dns': 'str', | |
14aa0c2d LE |
3757 | '*smb': 'str', |
3758 | '*smbserver': 'str', | |
3759 | '*hostfwd': ['String'], | |
3760 | '*guestfwd': ['String'] } } | |
3761 | ||
3762 | ## | |
5072f7b3 | 3763 | # @NetdevTapOptions: |
14aa0c2d LE |
3764 | # |
3765 | # Connect the host TAP network interface name to the VLAN. | |
3766 | # | |
1d8bda12 | 3767 | # @ifname: interface name |
14aa0c2d | 3768 | # |
1d8bda12 | 3769 | # @fd: file descriptor of an already opened tap |
14aa0c2d | 3770 | # |
1d8bda12 | 3771 | # @fds: multiple file descriptors of already opened multiqueue capable |
2ca81baa JW |
3772 | # tap |
3773 | # | |
1d8bda12 | 3774 | # @script: script to initialize the interface |
14aa0c2d | 3775 | # |
1d8bda12 | 3776 | # @downscript: script to shut down the interface |
14aa0c2d | 3777 | # |
1d8bda12 | 3778 | # @br: bridge name (since 2.8) |
584613ea | 3779 | # |
1d8bda12 | 3780 | # @helper: command to execute to configure bridge |
14aa0c2d | 3781 | # |
1d8bda12 | 3782 | # @sndbuf: send buffer limit. Understands [TGMKkb] suffixes. |
14aa0c2d | 3783 | # |
1d8bda12 | 3784 | # @vnet_hdr: enable the IFF_VNET_HDR flag on the tap interface |
14aa0c2d | 3785 | # |
1d8bda12 | 3786 | # @vhost: enable vhost-net network accelerator |
14aa0c2d | 3787 | # |
1d8bda12 | 3788 | # @vhostfd: file descriptor of an already opened vhost net device |
14aa0c2d | 3789 | # |
1d8bda12 | 3790 | # @vhostfds: file descriptors of multiple already opened vhost net |
2ca81baa JW |
3791 | # devices |
3792 | # | |
1d8bda12 | 3793 | # @vhostforce: vhost on for non-MSIX virtio guests |
14aa0c2d | 3794 | # |
1d8bda12 | 3795 | # @queues: number of queues to be created for multiqueue capable tap |
ec396014 | 3796 | # |
1d8bda12 | 3797 | # @poll-us: maximum number of microseconds that could |
69e87b32 JW |
3798 | # be spent on busy polling for tap (since 2.7) |
3799 | # | |
5072f7b3 | 3800 | # Since: 1.2 |
14aa0c2d | 3801 | ## |
895a2a80 | 3802 | { 'struct': 'NetdevTapOptions', |
14aa0c2d LE |
3803 | 'data': { |
3804 | '*ifname': 'str', | |
3805 | '*fd': 'str', | |
264986e2 | 3806 | '*fds': 'str', |
14aa0c2d LE |
3807 | '*script': 'str', |
3808 | '*downscript': 'str', | |
584613ea | 3809 | '*br': 'str', |
14aa0c2d LE |
3810 | '*helper': 'str', |
3811 | '*sndbuf': 'size', | |
3812 | '*vnet_hdr': 'bool', | |
3813 | '*vhost': 'bool', | |
3814 | '*vhostfd': 'str', | |
264986e2 JW |
3815 | '*vhostfds': 'str', |
3816 | '*vhostforce': 'bool', | |
69e87b32 JW |
3817 | '*queues': 'uint32', |
3818 | '*poll-us': 'uint32'} } | |
14aa0c2d LE |
3819 | |
3820 | ## | |
5072f7b3 | 3821 | # @NetdevSocketOptions: |
14aa0c2d LE |
3822 | # |
3823 | # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP | |
3824 | # socket connection. | |
3825 | # | |
1d8bda12 | 3826 | # @fd: file descriptor of an already opened socket |
14aa0c2d | 3827 | # |
1d8bda12 | 3828 | # @listen: port number, and optional hostname, to listen on |
14aa0c2d | 3829 | # |
1d8bda12 | 3830 | # @connect: port number, and optional hostname, to connect to |
14aa0c2d | 3831 | # |
1d8bda12 | 3832 | # @mcast: UDP multicast address and port number |
14aa0c2d | 3833 | # |
1d8bda12 | 3834 | # @localaddr: source address and port for multicast and udp packets |
14aa0c2d | 3835 | # |
1d8bda12 | 3836 | # @udp: UDP unicast address and port number |
14aa0c2d | 3837 | # |
5072f7b3 | 3838 | # Since: 1.2 |
14aa0c2d | 3839 | ## |
895a2a80 | 3840 | { 'struct': 'NetdevSocketOptions', |
14aa0c2d LE |
3841 | 'data': { |
3842 | '*fd': 'str', | |
3843 | '*listen': 'str', | |
3844 | '*connect': 'str', | |
3845 | '*mcast': 'str', | |
3846 | '*localaddr': 'str', | |
3847 | '*udp': 'str' } } | |
3848 | ||
3fb69aa1 | 3849 | ## |
5072f7b3 | 3850 | # @NetdevL2TPv3Options: |
3fb69aa1 AI |
3851 | # |
3852 | # Connect the VLAN to Ethernet over L2TPv3 Static tunnel | |
3853 | # | |
3854 | # @src: source address | |
3855 | # | |
3856 | # @dst: destination address | |
3857 | # | |
1d8bda12 | 3858 | # @srcport: source port - mandatory for udp, optional for ip |
3fb69aa1 | 3859 | # |
1d8bda12 | 3860 | # @dstport: destination port - mandatory for udp, optional for ip |
3fb69aa1 | 3861 | # |
1d8bda12 | 3862 | # @ipv6: force the use of ipv6 |
3fb69aa1 | 3863 | # |
1d8bda12 | 3864 | # @udp: use the udp version of l2tpv3 encapsulation |
3fb69aa1 | 3865 | # |
1d8bda12 | 3866 | # @cookie64: use 64 bit coookies |
3fb69aa1 | 3867 | # |
1d8bda12 | 3868 | # @counter: have sequence counter |
3fb69aa1 | 3869 | # |
1d8bda12 | 3870 | # @pincounter: pin sequence counter to zero - |
3fb69aa1 AI |
3871 | # workaround for buggy implementations or |
3872 | # networks with packet reorder | |
3873 | # | |
1d8bda12 | 3874 | # @txcookie: 32 or 64 bit transmit cookie |
3fb69aa1 | 3875 | # |
1d8bda12 | 3876 | # @rxcookie: 32 or 64 bit receive cookie |
3fb69aa1 AI |
3877 | # |
3878 | # @txsession: 32 bit transmit session | |
3879 | # | |
1d8bda12 | 3880 | # @rxsession: 32 bit receive session - if not specified |
3fb69aa1 AI |
3881 | # set to the same value as transmit |
3882 | # | |
1d8bda12 | 3883 | # @offset: additional offset - allows the insertion of |
3fb69aa1 AI |
3884 | # additional application-specific data before the packet payload |
3885 | # | |
5072f7b3 | 3886 | # Since: 2.1 |
3fb69aa1 | 3887 | ## |
895a2a80 | 3888 | { 'struct': 'NetdevL2TPv3Options', |
3fb69aa1 AI |
3889 | 'data': { |
3890 | 'src': 'str', | |
3891 | 'dst': 'str', | |
3892 | '*srcport': 'str', | |
3893 | '*dstport': 'str', | |
3894 | '*ipv6': 'bool', | |
3895 | '*udp': 'bool', | |
3896 | '*cookie64': 'bool', | |
3897 | '*counter': 'bool', | |
3898 | '*pincounter': 'bool', | |
3899 | '*txcookie': 'uint64', | |
3900 | '*rxcookie': 'uint64', | |
3901 | 'txsession': 'uint32', | |
3902 | '*rxsession': 'uint32', | |
3903 | '*offset': 'uint32' } } | |
3904 | ||
14aa0c2d | 3905 | ## |
5072f7b3 | 3906 | # @NetdevVdeOptions: |
14aa0c2d LE |
3907 | # |
3908 | # Connect the VLAN to a vde switch running on the host. | |
3909 | # | |
1d8bda12 | 3910 | # @sock: socket path |
14aa0c2d | 3911 | # |
1d8bda12 | 3912 | # @port: port number |
14aa0c2d | 3913 | # |
1d8bda12 | 3914 | # @group: group owner of socket |
14aa0c2d | 3915 | # |
1d8bda12 | 3916 | # @mode: permissions for socket |
14aa0c2d | 3917 | # |
5072f7b3 | 3918 | # Since: 1.2 |
14aa0c2d | 3919 | ## |
895a2a80 | 3920 | { 'struct': 'NetdevVdeOptions', |
14aa0c2d LE |
3921 | 'data': { |
3922 | '*sock': 'str', | |
3923 | '*port': 'uint16', | |
3924 | '*group': 'str', | |
3925 | '*mode': 'uint16' } } | |
3926 | ||
3927 | ## | |
5072f7b3 | 3928 | # @NetdevDumpOptions: |
14aa0c2d LE |
3929 | # |
3930 | # Dump VLAN network traffic to a file. | |
3931 | # | |
1d8bda12 | 3932 | # @len: per-packet size limit (64k default). Understands [TGMKkb] |
14aa0c2d LE |
3933 | # suffixes. |
3934 | # | |
1d8bda12 | 3935 | # @file: dump file path (default is qemu-vlan0.pcap) |
14aa0c2d | 3936 | # |
5072f7b3 | 3937 | # Since: 1.2 |
14aa0c2d | 3938 | ## |
895a2a80 | 3939 | { 'struct': 'NetdevDumpOptions', |
14aa0c2d LE |
3940 | 'data': { |
3941 | '*len': 'size', | |
3942 | '*file': 'str' } } | |
3943 | ||
3944 | ## | |
5072f7b3 | 3945 | # @NetdevBridgeOptions: |
14aa0c2d LE |
3946 | # |
3947 | # Connect a host TAP network interface to a host bridge device. | |
3948 | # | |
1d8bda12 | 3949 | # @br: bridge name |
14aa0c2d | 3950 | # |
1d8bda12 | 3951 | # @helper: command to execute to configure bridge |
14aa0c2d | 3952 | # |
5072f7b3 | 3953 | # Since: 1.2 |
14aa0c2d | 3954 | ## |
895a2a80 | 3955 | { 'struct': 'NetdevBridgeOptions', |
14aa0c2d LE |
3956 | 'data': { |
3957 | '*br': 'str', | |
3958 | '*helper': 'str' } } | |
3959 | ||
f6c874e3 | 3960 | ## |
5072f7b3 | 3961 | # @NetdevHubPortOptions: |
f6c874e3 SH |
3962 | # |
3963 | # Connect two or more net clients through a software hub. | |
3964 | # | |
3965 | # @hubid: hub identifier number | |
3966 | # | |
5072f7b3 | 3967 | # Since: 1.2 |
f6c874e3 | 3968 | ## |
895a2a80 | 3969 | { 'struct': 'NetdevHubPortOptions', |
f6c874e3 SH |
3970 | 'data': { |
3971 | 'hubid': 'int32' } } | |
3972 | ||
58952137 | 3973 | ## |
5072f7b3 | 3974 | # @NetdevNetmapOptions: |
58952137 VM |
3975 | # |
3976 | # Connect a client to a netmap-enabled NIC or to a VALE switch port | |
3977 | # | |
3978 | # @ifname: Either the name of an existing network interface supported by | |
3979 | # netmap, or the name of a VALE port (created on the fly). | |
3980 | # A VALE port name is in the form 'valeXXX:YYY', where XXX and | |
3981 | # YYY are non-negative integers. XXX identifies a switch and | |
3982 | # YYY identifies a port of the switch. VALE ports having the | |
3983 | # same XXX are therefore connected to the same switch. | |
3984 | # | |
1d8bda12 | 3985 | # @devname: path of the netmap device (default: '/dev/netmap'). |
58952137 | 3986 | # |
5072f7b3 | 3987 | # Since: 2.0 |
58952137 | 3988 | ## |
895a2a80 | 3989 | { 'struct': 'NetdevNetmapOptions', |
58952137 VM |
3990 | 'data': { |
3991 | 'ifname': 'str', | |
3992 | '*devname': 'str' } } | |
3993 | ||
03ce5744 | 3994 | ## |
5072f7b3 | 3995 | # @NetdevVhostUserOptions: |
03ce5744 NN |
3996 | # |
3997 | # Vhost-user network backend | |
3998 | # | |
3999 | # @chardev: name of a unix socket chardev | |
4000 | # | |
1d8bda12 | 4001 | # @vhostforce: vhost on for non-MSIX virtio guests (default: false). |
03ce5744 | 4002 | # |
1d8bda12 | 4003 | # @queues: number of queues to be created for multiqueue vhost-user |
b931bfbf CO |
4004 | # (default: 1) (Since 2.5) |
4005 | # | |
5072f7b3 | 4006 | # Since: 2.1 |
03ce5744 | 4007 | ## |
895a2a80 | 4008 | { 'struct': 'NetdevVhostUserOptions', |
03ce5744 NN |
4009 | 'data': { |
4010 | 'chardev': 'str', | |
b931bfbf CO |
4011 | '*vhostforce': 'bool', |
4012 | '*queues': 'int' } } | |
03ce5744 | 4013 | |
14aa0c2d | 4014 | ## |
5072f7b3 | 4015 | # @NetClientDriver: |
14aa0c2d | 4016 | # |
f394b2e2 EB |
4017 | # Available netdev drivers. |
4018 | # | |
5072f7b3 | 4019 | # Since: 2.7 |
f394b2e2 EB |
4020 | ## |
4021 | { 'enum': 'NetClientDriver', | |
4022 | 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump', | |
4023 | 'bridge', 'hubport', 'netmap', 'vhost-user' ] } | |
4024 | ||
4025 | ## | |
5072f7b3 | 4026 | # @Netdev: |
f394b2e2 EB |
4027 | # |
4028 | # Captures the configuration of a network device. | |
4029 | # | |
4030 | # @id: identifier for monitor commands. | |
4031 | # | |
4032 | # @type: Specify the driver used for interpreting remaining arguments. | |
14aa0c2d | 4033 | # |
5072f7b3 | 4034 | # Since: 1.2 |
3fb69aa1 AI |
4035 | # |
4036 | # 'l2tpv3' - since 2.1 | |
14aa0c2d | 4037 | ## |
f394b2e2 EB |
4038 | { 'union': 'Netdev', |
4039 | 'base': { 'id': 'str', 'type': 'NetClientDriver' }, | |
4040 | 'discriminator': 'type', | |
14aa0c2d | 4041 | 'data': { |
f6c874e3 SH |
4042 | 'none': 'NetdevNoneOptions', |
4043 | 'nic': 'NetLegacyNicOptions', | |
4044 | 'user': 'NetdevUserOptions', | |
4045 | 'tap': 'NetdevTapOptions', | |
3fb69aa1 | 4046 | 'l2tpv3': 'NetdevL2TPv3Options', |
f6c874e3 SH |
4047 | 'socket': 'NetdevSocketOptions', |
4048 | 'vde': 'NetdevVdeOptions', | |
4049 | 'dump': 'NetdevDumpOptions', | |
4050 | 'bridge': 'NetdevBridgeOptions', | |
58952137 | 4051 | 'hubport': 'NetdevHubPortOptions', |
03ce5744 NN |
4052 | 'netmap': 'NetdevNetmapOptions', |
4053 | 'vhost-user': 'NetdevVhostUserOptions' } } | |
14aa0c2d LE |
4054 | |
4055 | ## | |
5072f7b3 | 4056 | # @NetLegacy: |
14aa0c2d LE |
4057 | # |
4058 | # Captures the configuration of a network device; legacy. | |
4059 | # | |
1d8bda12 | 4060 | # @vlan: vlan number |
14aa0c2d | 4061 | # |
1d8bda12 | 4062 | # @id: identifier for monitor commands |
14aa0c2d | 4063 | # |
1d8bda12 | 4064 | # @name: identifier for monitor commands, ignored if @id is present |
14aa0c2d LE |
4065 | # |
4066 | # @opts: device type specific properties (legacy) | |
4067 | # | |
5072f7b3 | 4068 | # Since: 1.2 |
14aa0c2d | 4069 | ## |
895a2a80 | 4070 | { 'struct': 'NetLegacy', |
14aa0c2d LE |
4071 | 'data': { |
4072 | '*vlan': 'int32', | |
4073 | '*id': 'str', | |
4074 | '*name': 'str', | |
f394b2e2 | 4075 | 'opts': 'NetLegacyOptions' } } |
14aa0c2d | 4076 | |
d3be4b57 MA |
4077 | ## |
4078 | # @NetLegacyOptionsType: | |
4079 | # | |
4080 | # Since: 1.2 | |
4081 | ## | |
4082 | { 'enum': 'NetLegacyOptionsType', | |
4083 | 'data': ['none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', | |
4084 | 'dump', 'bridge', 'netmap', 'vhost-user'] } | |
4085 | ||
14aa0c2d | 4086 | ## |
5072f7b3 | 4087 | # @NetLegacyOptions: |
14aa0c2d | 4088 | # |
f394b2e2 | 4089 | # Like Netdev, but for use only by the legacy command line options |
14aa0c2d | 4090 | # |
5072f7b3 | 4091 | # Since: 1.2 |
14aa0c2d | 4092 | ## |
f394b2e2 | 4093 | { 'union': 'NetLegacyOptions', |
d3be4b57 MA |
4094 | 'base': { 'type': 'NetLegacyOptionsType' }, |
4095 | 'discriminator': 'type', | |
14aa0c2d | 4096 | 'data': { |
f394b2e2 EB |
4097 | 'none': 'NetdevNoneOptions', |
4098 | 'nic': 'NetLegacyNicOptions', | |
4099 | 'user': 'NetdevUserOptions', | |
4100 | 'tap': 'NetdevTapOptions', | |
4101 | 'l2tpv3': 'NetdevL2TPv3Options', | |
4102 | 'socket': 'NetdevSocketOptions', | |
4103 | 'vde': 'NetdevVdeOptions', | |
4104 | 'dump': 'NetdevDumpOptions', | |
4105 | 'bridge': 'NetdevBridgeOptions', | |
4106 | 'netmap': 'NetdevNetmapOptions', | |
4107 | 'vhost-user': 'NetdevVhostUserOptions' } } | |
14aa0c2d | 4108 | |
fdccce45 | 4109 | ## |
5072f7b3 | 4110 | # @NetFilterDirection: |
fdccce45 YH |
4111 | # |
4112 | # Indicates whether a netfilter is attached to a netdev's transmit queue or | |
4113 | # receive queue or both. | |
4114 | # | |
4115 | # @all: the filter is attached both to the receive and the transmit | |
4116 | # queue of the netdev (default). | |
4117 | # | |
4118 | # @rx: the filter is attached to the receive queue of the netdev, | |
4119 | # where it will receive packets sent to the netdev. | |
4120 | # | |
4121 | # @tx: the filter is attached to the transmit queue of the netdev, | |
4122 | # where it will receive packets sent by the netdev. | |
4123 | # | |
5072f7b3 | 4124 | # Since: 2.5 |
fdccce45 YH |
4125 | ## |
4126 | { 'enum': 'NetFilterDirection', | |
4127 | 'data': [ 'all', 'rx', 'tx' ] } | |
4128 | ||
208c9d1b CB |
4129 | ## |
4130 | # @getfd: | |
4131 | # | |
4132 | # Receive a file descriptor via SCM rights and assign it a name | |
4133 | # | |
4134 | # @fdname: file descriptor name | |
4135 | # | |
4136 | # Returns: Nothing on success | |
208c9d1b CB |
4137 | # |
4138 | # Since: 0.14.0 | |
4139 | # | |
4140 | # Notes: If @fdname already exists, the file descriptor assigned to | |
4141 | # it will be closed and replaced by the received file | |
4142 | # descriptor. | |
179bf59a | 4143 | # |
208c9d1b CB |
4144 | # The 'closefd' command can be used to explicitly close the |
4145 | # file descriptor when it is no longer needed. | |
179bf59a MAL |
4146 | # |
4147 | # Example: | |
4148 | # | |
4149 | # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } } | |
4150 | # <- { "return": {} } | |
4151 | # | |
208c9d1b CB |
4152 | ## |
4153 | { 'command': 'getfd', 'data': {'fdname': 'str'} } | |
4154 | ||
4155 | ## | |
4156 | # @closefd: | |
4157 | # | |
4158 | # Close a file descriptor previously passed via SCM rights | |
4159 | # | |
4160 | # @fdname: file descriptor name | |
4161 | # | |
4162 | # Returns: Nothing on success | |
208c9d1b CB |
4163 | # |
4164 | # Since: 0.14.0 | |
f5ad8e87 MAL |
4165 | # |
4166 | # Example: | |
4167 | # | |
4168 | # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } } | |
4169 | # <- { "return": {} } | |
4170 | # | |
208c9d1b CB |
4171 | ## |
4172 | { 'command': 'closefd', 'data': {'fdname': 'str'} } | |
01d3c80d AL |
4173 | |
4174 | ## | |
4175 | # @MachineInfo: | |
4176 | # | |
4177 | # Information describing a machine. | |
4178 | # | |
4179 | # @name: the name of the machine | |
4180 | # | |
1d8bda12 | 4181 | # @alias: an alias for the machine name |
01d3c80d | 4182 | # |
1d8bda12 | 4183 | # @is-default: whether the machine is default |
01d3c80d | 4184 | # |
c72e7688 MN |
4185 | # @cpu-max: maximum number of CPUs supported by the machine type |
4186 | # (since 1.5.0) | |
4187 | # | |
62c9467d PK |
4188 | # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0) |
4189 | # | |
01d3c80d AL |
4190 | # Since: 1.2.0 |
4191 | ## | |
895a2a80 | 4192 | { 'struct': 'MachineInfo', |
01d3c80d | 4193 | 'data': { 'name': 'str', '*alias': 'str', |
62c9467d PK |
4194 | '*is-default': 'bool', 'cpu-max': 'int', |
4195 | 'hotpluggable-cpus': 'bool'} } | |
01d3c80d AL |
4196 | |
4197 | ## | |
4198 | # @query-machines: | |
4199 | # | |
4200 | # Return a list of supported machines | |
4201 | # | |
4202 | # Returns: a list of MachineInfo | |
4203 | # | |
4204 | # Since: 1.2.0 | |
4205 | ## | |
4206 | { 'command': 'query-machines', 'returns': ['MachineInfo'] } | |
e4e31c63 AL |
4207 | |
4208 | ## | |
4209 | # @CpuDefinitionInfo: | |
4210 | # | |
4211 | # Virtual CPU definition. | |
4212 | # | |
4213 | # @name: the name of the CPU definition | |
4214 | # | |
1d8bda12 | 4215 | # @migration-safe: whether a CPU definition can be safely used for |
fc4b84b1 DH |
4216 | # migration in combination with a QEMU compatibility machine |
4217 | # when migrating between different QMU versions and between | |
4218 | # hosts with different sets of (hardware or software) | |
4219 | # capabilities. If not provided, information is not available | |
4220 | # and callers should not assume the CPU definition to be | |
4221 | # migration-safe. (since 2.8) | |
4222 | # | |
4223 | # @static: whether a CPU definition is static and will not change depending on | |
4224 | # QEMU version, machine type, machine options and accelerator options. | |
4225 | # A static model is always migration-safe. (since 2.8) | |
4226 | # | |
1d8bda12 | 4227 | # @unavailable-features: List of properties that prevent |
9504e710 EH |
4228 | # the CPU model from running in the current |
4229 | # host. (since 2.8) | |
8ed877b7 EH |
4230 | # @typename: Type name that can be used as argument to @device-list-properties, |
4231 | # to introspect properties configurable using -cpu or -global. | |
4232 | # (since 2.9) | |
9504e710 EH |
4233 | # |
4234 | # @unavailable-features is a list of QOM property names that | |
4235 | # represent CPU model attributes that prevent the CPU from running. | |
4236 | # If the QOM property is read-only, that means there's no known | |
4237 | # way to make the CPU model run in the current host. Implementations | |
4238 | # that choose not to provide specific information return the | |
4239 | # property name "type". | |
4240 | # If the property is read-write, it means that it MAY be possible | |
4241 | # to run the CPU model in the current host if that property is | |
4242 | # changed. Management software can use it as hints to suggest or | |
4243 | # choose an alternative for the user, or just to generate meaningful | |
4244 | # error messages explaining why the CPU model can't be used. | |
4245 | # If @unavailable-features is an empty list, the CPU model is | |
4246 | # runnable using the current host and machine-type. | |
4247 | # If @unavailable-features is not present, runnability | |
4248 | # information for the CPU is not available. | |
4249 | # | |
e4e31c63 AL |
4250 | # Since: 1.2.0 |
4251 | ## | |
895a2a80 | 4252 | { 'struct': 'CpuDefinitionInfo', |
9504e710 | 4253 | 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool', |
8ed877b7 | 4254 | '*unavailable-features': [ 'str' ], 'typename': 'str' } } |
e4e31c63 AL |
4255 | |
4256 | ## | |
4257 | # @query-cpu-definitions: | |
4258 | # | |
4259 | # Return a list of supported virtual CPU definitions | |
4260 | # | |
4261 | # Returns: a list of CpuDefInfo | |
4262 | # | |
4263 | # Since: 1.2.0 | |
4264 | ## | |
4265 | { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] } | |
ba1c048a | 4266 | |
e09484ef DH |
4267 | ## |
4268 | # @CpuModelInfo: | |
4269 | # | |
4270 | # Virtual CPU model. | |
4271 | # | |
4272 | # A CPU model consists of the name of a CPU definition, to which | |
4273 | # delta changes are applied (e.g. features added/removed). Most magic values | |
4274 | # that an architecture might require should be hidden behind the name. | |
4275 | # However, if required, architectures can expose relevant properties. | |
4276 | # | |
4277 | # @name: the name of the CPU definition the model is based on | |
1d8bda12 | 4278 | # @props: a dictionary of QOM properties to be applied |
e09484ef DH |
4279 | # |
4280 | # Since: 2.8.0 | |
4281 | ## | |
4282 | { 'struct': 'CpuModelInfo', | |
4283 | 'data': { 'name': 'str', | |
4284 | '*props': 'any' } } | |
4285 | ||
4286 | ## | |
5072f7b3 | 4287 | # @CpuModelExpansionType: |
e09484ef DH |
4288 | # |
4289 | # An enumeration of CPU model expansion types. | |
4290 | # | |
4291 | # @static: Expand to a static CPU model, a combination of a static base | |
4292 | # model name and property delta changes. As the static base model will | |
4293 | # never change, the expanded CPU model will be the same, independant of | |
4294 | # independent of QEMU version, machine type, machine options, and | |
4295 | # accelerator options. Therefore, the resulting model can be used by | |
4296 | # tooling without having to specify a compatibility machine - e.g. when | |
4297 | # displaying the "host" model. static CPU models are migration-safe. | |
4298 | # | |
4299 | # @full: Expand all properties. The produced model is not guaranteed to be | |
4300 | # migration-safe, but allows tooling to get an insight and work with | |
4301 | # model details. | |
4302 | # | |
a357a65b EH |
4303 | # Note: When a non-migration-safe CPU model is expanded in static mode, some |
4304 | # features enabled by the CPU model may be omitted, because they can't be | |
4305 | # implemented by a static CPU model definition (e.g. cache info passthrough and | |
4306 | # PMU passthrough in x86). If you need an accurate representation of the | |
4307 | # features enabled by a non-migration-safe CPU model, use @full. If you need a | |
4308 | # static representation that will keep ABI compatibility even when changing QEMU | |
4309 | # version or machine-type, use @static (but keep in mind that some features may | |
4310 | # be omitted). | |
4311 | # | |
e09484ef DH |
4312 | # Since: 2.8.0 |
4313 | ## | |
4314 | { 'enum': 'CpuModelExpansionType', | |
4315 | 'data': [ 'static', 'full' ] } | |
4316 | ||
4317 | ||
4318 | ## | |
5072f7b3 | 4319 | # @CpuModelExpansionInfo: |
e09484ef DH |
4320 | # |
4321 | # The result of a cpu model expansion. | |
4322 | # | |
4323 | # @model: the expanded CpuModelInfo. | |
4324 | # | |
4325 | # Since: 2.8.0 | |
4326 | ## | |
4327 | { 'struct': 'CpuModelExpansionInfo', | |
4328 | 'data': { 'model': 'CpuModelInfo' } } | |
4329 | ||
4330 | ||
4331 | ## | |
4332 | # @query-cpu-model-expansion: | |
4333 | # | |
4334 | # Expands a given CPU model (or a combination of CPU model + additional options) | |
4335 | # to different granularities, allowing tooling to get an understanding what a | |
4336 | # specific CPU model looks like in QEMU under a certain configuration. | |
4337 | # | |
4338 | # This interface can be used to query the "host" CPU model. | |
4339 | # | |
4340 | # The data returned by this command may be affected by: | |
4341 | # | |
4342 | # * QEMU version: CPU models may look different depending on the QEMU version. | |
4343 | # (Except for CPU models reported as "static" in query-cpu-definitions.) | |
4344 | # * machine-type: CPU model may look different depending on the machine-type. | |
4345 | # (Except for CPU models reported as "static" in query-cpu-definitions.) | |
4346 | # * machine options (including accelerator): in some architectures, CPU models | |
4347 | # may look different depending on machine and accelerator options. (Except for | |
4348 | # CPU models reported as "static" in query-cpu-definitions.) | |
4349 | # * "-cpu" arguments and global properties: arguments to the -cpu option and | |
4350 | # global properties may affect expansion of CPU models. Using | |
4351 | # query-cpu-model-expansion while using these is not advised. | |
4352 | # | |
137974ce DH |
4353 | # Some architectures may not support all expansion types. s390x supports |
4354 | # "full" and "static". | |
e09484ef DH |
4355 | # |
4356 | # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is | |
4357 | # not supported, if the model cannot be expanded, if the model contains | |
4358 | # an unknown CPU definition name, unknown properties or properties | |
4359 | # with a wrong type. Also returns an error if an expansion type is | |
4360 | # not supported. | |
4361 | # | |
4362 | # Since: 2.8.0 | |
4363 | ## | |
4364 | { 'command': 'query-cpu-model-expansion', | |
4365 | 'data': { 'type': 'CpuModelExpansionType', | |
4366 | 'model': 'CpuModelInfo' }, | |
4367 | 'returns': 'CpuModelExpansionInfo' } | |
4368 | ||
0031e0d6 DH |
4369 | ## |
4370 | # @CpuModelCompareResult: | |
4371 | # | |
4372 | # An enumeration of CPU model comparation results. The result is usually | |
4d4ccabd | 4373 | # calculated using e.g. CPU features or CPU generations. |
0031e0d6 DH |
4374 | # |
4375 | # @incompatible: If model A is incompatible to model B, model A is not | |
4376 | # guaranteed to run where model B runs and the other way around. | |
4377 | # | |
4378 | # @identical: If model A is identical to model B, model A is guaranteed to run | |
4379 | # where model B runs and the other way around. | |
4380 | # | |
4381 | # @superset: If model A is a superset of model B, model B is guaranteed to run | |
4382 | # where model A runs. There are no guarantees about the other way. | |
4383 | # | |
4384 | # @subset: If model A is a subset of model B, model A is guaranteed to run | |
4385 | # where model B runs. There are no guarantees about the other way. | |
4386 | # | |
4387 | # Since: 2.8.0 | |
4388 | ## | |
4389 | { 'enum': 'CpuModelCompareResult', | |
4390 | 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] } | |
4391 | ||
4392 | ## | |
5072f7b3 | 4393 | # @CpuModelCompareInfo: |
0031e0d6 DH |
4394 | # |
4395 | # The result of a CPU model comparison. | |
4396 | # | |
4397 | # @result: The result of the compare operation. | |
4398 | # @responsible-properties: List of properties that led to the comparison result | |
4399 | # not being identical. | |
4400 | # | |
4401 | # @responsible-properties is a list of QOM property names that led to | |
4402 | # both CPUs not being detected as identical. For identical models, this | |
4403 | # list is empty. | |
4404 | # If a QOM property is read-only, that means there's no known way to make the | |
4405 | # CPU models identical. If the special property name "type" is included, the | |
4406 | # models are by definition not identical and cannot be made identical. | |
4407 | # | |
4408 | # Since: 2.8.0 | |
4409 | ## | |
4410 | { 'struct': 'CpuModelCompareInfo', | |
4411 | 'data': {'result': 'CpuModelCompareResult', | |
4412 | 'responsible-properties': ['str'] | |
4413 | } | |
4414 | } | |
4415 | ||
4416 | ## | |
4417 | # @query-cpu-model-comparison: | |
4418 | # | |
4419 | # Compares two CPU models, returning how they compare in a specific | |
4420 | # configuration. The results indicates how both models compare regarding | |
4421 | # runnability. This result can be used by tooling to make decisions if a | |
4422 | # certain CPU model will run in a certain configuration or if a compatible | |
4423 | # CPU model has to be created by baselining. | |
4424 | # | |
4425 | # Usually, a CPU model is compared against the maximum possible CPU model | |
4d4ccabd | 4426 | # of a certain configuration (e.g. the "host" model for KVM). If that CPU |
0031e0d6 DH |
4427 | # model is identical or a subset, it will run in that configuration. |
4428 | # | |
4429 | # The result returned by this command may be affected by: | |
4430 | # | |
4431 | # * QEMU version: CPU models may look different depending on the QEMU version. | |
4432 | # (Except for CPU models reported as "static" in query-cpu-definitions.) | |
4d4ccabd | 4433 | # * machine-type: CPU model may look different depending on the machine-type. |
0031e0d6 DH |
4434 | # (Except for CPU models reported as "static" in query-cpu-definitions.) |
4435 | # * machine options (including accelerator): in some architectures, CPU models | |
4436 | # may look different depending on machine and accelerator options. (Except for | |
4437 | # CPU models reported as "static" in query-cpu-definitions.) | |
4438 | # * "-cpu" arguments and global properties: arguments to the -cpu option and | |
4439 | # global properties may affect expansion of CPU models. Using | |
4440 | # query-cpu-model-expansion while using these is not advised. | |
4441 | # | |
4e82ef05 DH |
4442 | # Some architectures may not support comparing CPU models. s390x supports |
4443 | # comparing CPU models. | |
0031e0d6 DH |
4444 | # |
4445 | # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is | |
4446 | # not supported, if a model cannot be used, if a model contains | |
4447 | # an unknown cpu definition name, unknown properties or properties | |
4448 | # with wrong types. | |
4449 | # | |
4450 | # Since: 2.8.0 | |
4451 | ## | |
4452 | { 'command': 'query-cpu-model-comparison', | |
4453 | 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' }, | |
4454 | 'returns': 'CpuModelCompareInfo' } | |
4455 | ||
b18b6043 | 4456 | ## |
5072f7b3 | 4457 | # @CpuModelBaselineInfo: |
b18b6043 DH |
4458 | # |
4459 | # The result of a CPU model baseline. | |
4460 | # | |
4461 | # @model: the baselined CpuModelInfo. | |
4462 | # | |
4463 | # Since: 2.8.0 | |
4464 | ## | |
4465 | { 'struct': 'CpuModelBaselineInfo', | |
4466 | 'data': { 'model': 'CpuModelInfo' } } | |
4467 | ||
4468 | ## | |
4469 | # @query-cpu-model-baseline: | |
4470 | # | |
4471 | # Baseline two CPU models, creating a compatible third model. The created | |
4472 | # model will always be a static, migration-safe CPU model (see "static" | |
4473 | # CPU model expansion for details). | |
4474 | # | |
4475 | # This interface can be used by tooling to create a compatible CPU model out | |
4476 | # two CPU models. The created CPU model will be identical to or a subset of | |
4477 | # both CPU models when comparing them. Therefore, the created CPU model is | |
4478 | # guaranteed to run where the given CPU models run. | |
4479 | # | |
4480 | # The result returned by this command may be affected by: | |
4481 | # | |
4482 | # * QEMU version: CPU models may look different depending on the QEMU version. | |
4483 | # (Except for CPU models reported as "static" in query-cpu-definitions.) | |
4d4ccabd | 4484 | # * machine-type: CPU model may look different depending on the machine-type. |
b18b6043 DH |
4485 | # (Except for CPU models reported as "static" in query-cpu-definitions.) |
4486 | # * machine options (including accelerator): in some architectures, CPU models | |
4487 | # may look different depending on machine and accelerator options. (Except for | |
4488 | # CPU models reported as "static" in query-cpu-definitions.) | |
4489 | # * "-cpu" arguments and global properties: arguments to the -cpu option and | |
4490 | # global properties may affect expansion of CPU models. Using | |
4491 | # query-cpu-model-expansion while using these is not advised. | |
4492 | # | |
f1a47d08 DH |
4493 | # Some architectures may not support baselining CPU models. s390x supports |
4494 | # baselining CPU models. | |
b18b6043 DH |
4495 | # |
4496 | # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is | |
4497 | # not supported, if a model cannot be used, if a model contains | |
4498 | # an unknown cpu definition name, unknown properties or properties | |
4499 | # with wrong types. | |
4500 | # | |
4501 | # Since: 2.8.0 | |
4502 | ## | |
4503 | { 'command': 'query-cpu-model-baseline', | |
4504 | 'data': { 'modela': 'CpuModelInfo', | |
4505 | 'modelb': 'CpuModelInfo' }, | |
4506 | 'returns': 'CpuModelBaselineInfo' } | |
4507 | ||
49687ace | 4508 | ## |
ba1c048a CB |
4509 | # @AddfdInfo: |
4510 | # | |
4511 | # Information about a file descriptor that was added to an fd set. | |
4512 | # | |
4513 | # @fdset-id: The ID of the fd set that @fd was added to. | |
4514 | # | |
4515 | # @fd: The file descriptor that was received via SCM rights and | |
4516 | # added to the fd set. | |
4517 | # | |
4518 | # Since: 1.2.0 | |
4519 | ## | |
895a2a80 | 4520 | { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} } |
ba1c048a CB |
4521 | |
4522 | ## | |
4523 | # @add-fd: | |
4524 | # | |
4525 | # Add a file descriptor, that was passed via SCM rights, to an fd set. | |
4526 | # | |
1d8bda12 | 4527 | # @fdset-id: The ID of the fd set to add the file descriptor to. |
ba1c048a | 4528 | # |
1d8bda12 | 4529 | # @opaque: A free-form string that can be used to describe the fd. |
ba1c048a CB |
4530 | # |
4531 | # Returns: @AddfdInfo on success | |
43fef34a | 4532 | # |
ba1c048a | 4533 | # If file descriptor was not received, FdNotSupplied |
43fef34a | 4534 | # |
9ac54af0 | 4535 | # If @fdset-id is a negative value, InvalidParameterValue |
ba1c048a CB |
4536 | # |
4537 | # Notes: The list of fd sets is shared by all monitor connections. | |
4538 | # | |
4539 | # If @fdset-id is not specified, a new fd set will be created. | |
4540 | # | |
4541 | # Since: 1.2.0 | |
43fef34a MAL |
4542 | # |
4543 | # Example: | |
4544 | # | |
4545 | # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } } | |
4546 | # <- { "return": { "fdset-id": 1, "fd": 3 } } | |
4547 | # | |
ba1c048a CB |
4548 | ## |
4549 | { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'}, | |
4550 | 'returns': 'AddfdInfo' } | |
4551 | ||
4552 | ## | |
4553 | # @remove-fd: | |
4554 | # | |
4555 | # Remove a file descriptor from an fd set. | |
4556 | # | |
4557 | # @fdset-id: The ID of the fd set that the file descriptor belongs to. | |
4558 | # | |
1d8bda12 | 4559 | # @fd: The file descriptor that is to be removed. |
ba1c048a CB |
4560 | # |
4561 | # Returns: Nothing on success | |
4562 | # If @fdset-id or @fd is not found, FdNotFound | |
4563 | # | |
4564 | # Since: 1.2.0 | |
4565 | # | |
4566 | # Notes: The list of fd sets is shared by all monitor connections. | |
4567 | # | |
4568 | # If @fd is not specified, all file descriptors in @fdset-id | |
4569 | # will be removed. | |
4503e4b3 MAL |
4570 | # |
4571 | # Example: | |
4572 | # | |
4573 | # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } } | |
4574 | # <- { "return": {} } | |
4575 | # | |
ba1c048a CB |
4576 | ## |
4577 | { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} } | |
4578 | ||
4579 | ## | |
4580 | # @FdsetFdInfo: | |
4581 | # | |
4582 | # Information about a file descriptor that belongs to an fd set. | |
4583 | # | |
4584 | # @fd: The file descriptor value. | |
4585 | # | |
1d8bda12 | 4586 | # @opaque: A free-form string that can be used to describe the fd. |
ba1c048a CB |
4587 | # |
4588 | # Since: 1.2.0 | |
4589 | ## | |
895a2a80 | 4590 | { 'struct': 'FdsetFdInfo', |
ba1c048a CB |
4591 | 'data': {'fd': 'int', '*opaque': 'str'} } |
4592 | ||
4593 | ## | |
4594 | # @FdsetInfo: | |
4595 | # | |
4596 | # Information about an fd set. | |
4597 | # | |
4598 | # @fdset-id: The ID of the fd set. | |
4599 | # | |
4600 | # @fds: A list of file descriptors that belong to this fd set. | |
4601 | # | |
4602 | # Since: 1.2.0 | |
4603 | ## | |
895a2a80 | 4604 | { 'struct': 'FdsetInfo', |
ba1c048a CB |
4605 | 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} } |
4606 | ||
4607 | ## | |
4608 | # @query-fdsets: | |
4609 | # | |
4610 | # Return information describing all fd sets. | |
4611 | # | |
4612 | # Returns: A list of @FdsetInfo | |
4613 | # | |
4614 | # Since: 1.2.0 | |
4615 | # | |
4616 | # Note: The list of fd sets is shared by all monitor connections. | |
4617 | # | |
d71ca35d MAL |
4618 | # Example: |
4619 | # | |
4620 | # -> { "execute": "query-fdsets" } | |
4621 | # <- { "return": [ | |
4622 | # { | |
4623 | # "fds": [ | |
4624 | # { | |
4625 | # "fd": 30, | |
4626 | # "opaque": "rdonly:/path/to/file" | |
4627 | # }, | |
4628 | # { | |
4629 | # "fd": 24, | |
4630 | # "opaque": "rdwr:/path/to/file" | |
4631 | # } | |
4632 | # ], | |
4633 | # "fdset-id": 1 | |
4634 | # }, | |
4635 | # { | |
4636 | # "fds": [ | |
4637 | # { | |
4638 | # "fd": 28 | |
4639 | # }, | |
4640 | # { | |
4641 | # "fd": 29 | |
4642 | # } | |
4643 | # ], | |
4644 | # "fdset-id": 0 | |
4645 | # } | |
4646 | # ] | |
4647 | # } | |
4648 | # | |
ba1c048a CB |
4649 | ## |
4650 | { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] } | |
99afc91d | 4651 | |
99afc91d DB |
4652 | ## |
4653 | # @TargetInfo: | |
4654 | # | |
4655 | # Information describing the QEMU target. | |
4656 | # | |
4657 | # @arch: the target architecture (eg "x86_64", "i386", etc) | |
4658 | # | |
4659 | # Since: 1.2.0 | |
4660 | ## | |
895a2a80 | 4661 | { 'struct': 'TargetInfo', |
c02a9552 | 4662 | 'data': { 'arch': 'str' } } |
99afc91d DB |
4663 | |
4664 | ## | |
4665 | # @query-target: | |
4666 | # | |
4667 | # Return information about the target for this QEMU | |
4668 | # | |
4669 | # Returns: TargetInfo | |
4670 | # | |
4671 | # Since: 1.2.0 | |
4672 | ## | |
4673 | { 'command': 'query-target', 'returns': 'TargetInfo' } | |
411656f4 AK |
4674 | |
4675 | ## | |
4676 | # @QKeyCode: | |
4677 | # | |
515b17c2 MAL |
4678 | # An enumeration of key name. |
4679 | # | |
4680 | # This is used by the @send-key command. | |
4681 | # | |
9f2a70e4 MAL |
4682 | # @unmapped: since 2.0 |
4683 | # @pause: since 2.0 | |
4684 | # @ro: since 2.4 | |
4685 | # @kp_comma: since 2.4 | |
4686 | # @kp_equals: since 2.6 | |
4687 | # @power: since 2.6 | |
e9346441 OH |
4688 | # @hiragana: since 2.9 |
4689 | # @henkan: since 2.9 | |
4690 | # @yen: since 2.9 | |
9f2a70e4 | 4691 | # |
37810e80 GH |
4692 | # @sleep: since 2.10 |
4693 | # @wake: since 2.10 | |
4694 | # @audionext: since 2.10 | |
4695 | # @audioprev: since 2.10 | |
4696 | # @audiostop: since 2.10 | |
4697 | # @audioplay: since 2.10 | |
4698 | # @audiomute: since 2.10 | |
4699 | # @volumeup: since 2.10 | |
4700 | # @volumedown: since 2.10 | |
4701 | # @mediaselect: since 2.10 | |
4702 | # @mail: since 2.10 | |
4703 | # @calculator: since 2.10 | |
4704 | # @computer: since 2.10 | |
37810e80 GH |
4705 | # @ac_home: since 2.10 |
4706 | # @ac_back: since 2.10 | |
4707 | # @ac_forward: since 2.10 | |
37810e80 GH |
4708 | # @ac_refresh: since 2.10 |
4709 | # @ac_bookmarks: since 2.10 | |
912092b8 | 4710 | # altgr, altgr_r: dropped in 2.10 |
37810e80 | 4711 | # |
411656f4 | 4712 | # Since: 1.3.0 |
bbd1b1cc | 4713 | # |
411656f4 AK |
4714 | ## |
4715 | { 'enum': 'QKeyCode', | |
bbd1b1cc | 4716 | 'data': [ 'unmapped', |
912092b8 | 4717 | 'shift', 'shift_r', 'alt', 'alt_r', 'ctrl', |
411656f4 AK |
4718 | 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8', |
4719 | '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e', | |
4720 | 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right', | |
4721 | 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon', | |
4722 | 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b', | |
4723 | 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock', | |
4724 | 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10', | |
4725 | 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply', | |
4726 | 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0', | |
4727 | 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8', | |
4728 | 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end', | |
4729 | 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again', | |
4730 | 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut', | |
e9346441 OH |
4731 | 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', |
4732 | 'ro', 'hiragana', 'henkan', 'yen', | |
37810e80 GH |
4733 | 'kp_comma', 'kp_equals', 'power', 'sleep', 'wake', |
4734 | 'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute', | |
4735 | 'volumeup', 'volumedown', 'mediaselect', | |
4736 | 'mail', 'calculator', 'computer', | |
103dce8f | 4737 | 'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks' ] } |
e4c8f004 | 4738 | |
9f328977 | 4739 | ## |
5072f7b3 | 4740 | # @KeyValue: |
9f328977 LC |
4741 | # |
4742 | # Represents a keyboard key. | |
4743 | # | |
4744 | # Since: 1.3.0 | |
4745 | ## | |
4746 | { 'union': 'KeyValue', | |
4747 | 'data': { | |
4748 | 'number': 'int', | |
4749 | 'qcode': 'QKeyCode' } } | |
4750 | ||
e4c8f004 AK |
4751 | ## |
4752 | # @send-key: | |
4753 | # | |
4754 | # Send keys to guest. | |
4755 | # | |
9f328977 LC |
4756 | # @keys: An array of @KeyValue elements. All @KeyValues in this array are |
4757 | # simultaneously sent to the guest. A @KeyValue.number value is sent | |
4758 | # directly to the guest, while @KeyValue.qcode must be a valid | |
4759 | # @QKeyCode value | |
e4c8f004 | 4760 | # |
1d8bda12 | 4761 | # @hold-time: time to delay key up events, milliseconds. Defaults |
e4c8f004 AK |
4762 | # to 100 |
4763 | # | |
4764 | # Returns: Nothing on success | |
4765 | # If key is unknown or redundant, InvalidParameter | |
4766 | # | |
4767 | # Since: 1.3.0 | |
4768 | # | |
f45fd52c MAL |
4769 | # Example: |
4770 | # | |
4771 | # -> { "execute": "send-key", | |
4772 | # "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" }, | |
4773 | # { "type": "qcode", "data": "alt" }, | |
4774 | # { "type": "qcode", "data": "delete" } ] } } | |
4775 | # <- { "return": {} } | |
4776 | # | |
e4c8f004 AK |
4777 | ## |
4778 | { 'command': 'send-key', | |
9f328977 | 4779 | 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } } |
ad39cf6d LC |
4780 | |
4781 | ## | |
4782 | # @screendump: | |
4783 | # | |
4784 | # Write a PPM of the VGA screen to a file. | |
4785 | # | |
4786 | # @filename: the path of a new PPM file to store the image | |
4787 | # | |
4788 | # Returns: Nothing on success | |
4789 | # | |
4790 | # Since: 0.14.0 | |
77b6681e MAL |
4791 | # |
4792 | # Example: | |
4793 | # | |
4794 | # -> { "execute": "screendump", | |
4795 | # "arguments": { "filename": "/tmp/image" } } | |
4796 | # <- { "return": {} } | |
4797 | # | |
ad39cf6d LC |
4798 | ## |
4799 | { 'command': 'screendump', 'data': {'filename': 'str'} } | |
6dd844db | 4800 | |
d0d7708b DB |
4801 | |
4802 | ## | |
4803 | # @ChardevCommon: | |
4804 | # | |
4805 | # Configuration shared across all chardev backends | |
4806 | # | |
1d8bda12 MA |
4807 | # @logfile: The name of a logfile to save output |
4808 | # @logappend: true to append instead of truncate | |
d0d7708b DB |
4809 | # (default to false to truncate) |
4810 | # | |
4811 | # Since: 2.6 | |
4812 | ## | |
4813 | { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str', | |
4814 | '*logappend': 'bool' } } | |
4815 | ||
ffbdbe59 GH |
4816 | ## |
4817 | # @ChardevFile: | |
4818 | # | |
4819 | # Configuration info for file chardevs. | |
4820 | # | |
1d8bda12 | 4821 | # @in: The name of the input file |
ffbdbe59 | 4822 | # @out: The name of the output file |
1d8bda12 | 4823 | # @append: Open the file in append mode (default false to |
31e38a22 | 4824 | # truncate) (Since 2.6) |
ffbdbe59 GH |
4825 | # |
4826 | # Since: 1.4 | |
4827 | ## | |
895a2a80 | 4828 | { 'struct': 'ChardevFile', 'data': { '*in' : 'str', |
31e38a22 | 4829 | 'out' : 'str', |
d0d7708b DB |
4830 | '*append': 'bool' }, |
4831 | 'base': 'ChardevCommon' } | |
ffbdbe59 | 4832 | |
d59044ef | 4833 | ## |
d36b2b90 | 4834 | # @ChardevHostdev: |
d59044ef | 4835 | # |
548cbb36 | 4836 | # Configuration info for device and pipe chardevs. |
d59044ef GH |
4837 | # |
4838 | # @device: The name of the special file for the device, | |
4839 | # i.e. /dev/ttyS0 on Unix or COM1: on Windows | |
d59044ef GH |
4840 | # |
4841 | # Since: 1.4 | |
4842 | ## | |
d0d7708b DB |
4843 | { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' }, |
4844 | 'base': 'ChardevCommon' } | |
d59044ef | 4845 | |
f6bd5d6e GH |
4846 | ## |
4847 | # @ChardevSocket: | |
4848 | # | |
3ecc059d | 4849 | # Configuration info for (stream) socket chardevs. |
f6bd5d6e GH |
4850 | # |
4851 | # @addr: socket address to listen on (server=true) | |
4852 | # or connect to (server=false) | |
1d8bda12 MA |
4853 | # @tls-creds: the ID of the TLS credentials object (since 2.6) |
4854 | # @server: create server socket (default: true) | |
4855 | # @wait: wait for incoming connection on server | |
ef993ba7 | 4856 | # sockets (default: false). |
1d8bda12 MA |
4857 | # @nodelay: set TCP_NODELAY socket option (default: false) |
4858 | # @telnet: enable telnet protocol on server | |
ef993ba7 | 4859 | # sockets (default: false) |
ae92cbd5 JL |
4860 | # @tn3270: enable tn3270 protocol on server |
4861 | # sockets (default: false) (Since: 2.10) | |
1d8bda12 | 4862 | # @reconnect: For a client socket, if a socket is disconnected, |
5dd1f02b CM |
4863 | # then attempt a reconnect after the given number of seconds. |
4864 | # Setting this to zero disables this function. (default: 0) | |
4865 | # (Since: 2.2) | |
f6bd5d6e GH |
4866 | # |
4867 | # Since: 1.4 | |
4868 | ## | |
dfd100f2 | 4869 | { 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddressLegacy', |
a8fb5427 | 4870 | '*tls-creds' : 'str', |
5dd1f02b CM |
4871 | '*server' : 'bool', |
4872 | '*wait' : 'bool', | |
4873 | '*nodelay' : 'bool', | |
4874 | '*telnet' : 'bool', | |
ae92cbd5 | 4875 | '*tn3270' : 'bool', |
d0d7708b DB |
4876 | '*reconnect' : 'int' }, |
4877 | 'base': 'ChardevCommon' } | |
f6bd5d6e | 4878 | |
3ecc059d | 4879 | ## |
08d0ab3f | 4880 | # @ChardevUdp: |
3ecc059d GH |
4881 | # |
4882 | # Configuration info for datagram socket chardevs. | |
4883 | # | |
4884 | # @remote: remote address | |
1d8bda12 | 4885 | # @local: local address |
3ecc059d GH |
4886 | # |
4887 | # Since: 1.5 | |
4888 | ## | |
dfd100f2 MA |
4889 | { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddressLegacy', |
4890 | '*local' : 'SocketAddressLegacy' }, | |
d0d7708b | 4891 | 'base': 'ChardevCommon' } |
3ecc059d | 4892 | |
edb2fb3c GH |
4893 | ## |
4894 | # @ChardevMux: | |
4895 | # | |
4896 | # Configuration info for mux chardevs. | |
4897 | # | |
4898 | # @chardev: name of the base chardev. | |
4899 | # | |
4900 | # Since: 1.5 | |
4901 | ## | |
d0d7708b DB |
4902 | { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' }, |
4903 | 'base': 'ChardevCommon' } | |
edb2fb3c | 4904 | |
7c358031 GH |
4905 | ## |
4906 | # @ChardevStdio: | |
4907 | # | |
4908 | # Configuration info for stdio chardevs. | |
4909 | # | |
1d8bda12 | 4910 | # @signal: Allow signals (such as SIGINT triggered by ^C) |
7c358031 GH |
4911 | # be delivered to qemu. Default: true in -nographic mode, |
4912 | # false otherwise. | |
4913 | # | |
4914 | # Since: 1.5 | |
4915 | ## | |
d0d7708b DB |
4916 | { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' }, |
4917 | 'base': 'ChardevCommon' } | |
4918 | ||
7c358031 | 4919 | |
cd153e2a GH |
4920 | ## |
4921 | # @ChardevSpiceChannel: | |
4922 | # | |
4923 | # Configuration info for spice vm channel chardevs. | |
4924 | # | |
4925 | # @type: kind of channel (for example vdagent). | |
4926 | # | |
4927 | # Since: 1.5 | |
4928 | ## | |
d0d7708b DB |
4929 | { 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' }, |
4930 | 'base': 'ChardevCommon' } | |
cd153e2a GH |
4931 | |
4932 | ## | |
4933 | # @ChardevSpicePort: | |
4934 | # | |
4935 | # Configuration info for spice port chardevs. | |
4936 | # | |
4937 | # @fqdn: name of the channel (see docs/spice-port-fqdn.txt) | |
4938 | # | |
4939 | # Since: 1.5 | |
4940 | ## | |
d0d7708b DB |
4941 | { 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' }, |
4942 | 'base': 'ChardevCommon' } | |
cd153e2a | 4943 | |
702ec69c GH |
4944 | ## |
4945 | # @ChardevVC: | |
4946 | # | |
4947 | # Configuration info for virtual console chardevs. | |
4948 | # | |
4949 | # @width: console width, in pixels | |
4950 | # @height: console height, in pixels | |
4951 | # @cols: console width, in chars | |
4952 | # @rows: console height, in chars | |
4953 | # | |
4954 | # Since: 1.5 | |
4955 | ## | |
895a2a80 | 4956 | { 'struct': 'ChardevVC', 'data': { '*width' : 'int', |
702ec69c GH |
4957 | '*height' : 'int', |
4958 | '*cols' : 'int', | |
d0d7708b DB |
4959 | '*rows' : 'int' }, |
4960 | 'base': 'ChardevCommon' } | |
702ec69c | 4961 | |
1da48c65 | 4962 | ## |
4f57378f | 4963 | # @ChardevRingbuf: |
1da48c65 | 4964 | # |
3a1da42e | 4965 | # Configuration info for ring buffer chardevs. |
1da48c65 | 4966 | # |
1d8bda12 | 4967 | # @size: ring buffer size, must be power of two, default is 65536 |
1da48c65 GH |
4968 | # |
4969 | # Since: 1.5 | |
4970 | ## | |
d0d7708b DB |
4971 | { 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' }, |
4972 | 'base': 'ChardevCommon' } | |
1da48c65 | 4973 | |
f1a1a356 GH |
4974 | ## |
4975 | # @ChardevBackend: | |
4976 | # | |
4977 | # Configuration info for the new chardev backend. | |
4978 | # | |
378af961 | 4979 | # Since: 1.4 (testdev since 2.2, wctablet since 2.9) |
f1a1a356 | 4980 | ## |
f6bd5d6e | 4981 | { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile', |
d36b2b90 MA |
4982 | 'serial' : 'ChardevHostdev', |
4983 | 'parallel': 'ChardevHostdev', | |
548cbb36 | 4984 | 'pipe' : 'ChardevHostdev', |
f6bd5d6e | 4985 | 'socket' : 'ChardevSocket', |
08d0ab3f | 4986 | 'udp' : 'ChardevUdp', |
b1918fbb EB |
4987 | 'pty' : 'ChardevCommon', |
4988 | 'null' : 'ChardevCommon', | |
f5a51cab | 4989 | 'mux' : 'ChardevMux', |
b1918fbb | 4990 | 'msmouse': 'ChardevCommon', |
378af961 | 4991 | 'wctablet' : 'ChardevCommon', |
b1918fbb EB |
4992 | 'braille': 'ChardevCommon', |
4993 | 'testdev': 'ChardevCommon', | |
d9ac374f | 4994 | 'stdio' : 'ChardevStdio', |
b1918fbb | 4995 | 'console': 'ChardevCommon', |
cd153e2a | 4996 | 'spicevmc' : 'ChardevSpiceChannel', |
702ec69c | 4997 | 'spiceport' : 'ChardevSpicePort', |
1da48c65 | 4998 | 'vc' : 'ChardevVC', |
3a1da42e MA |
4999 | 'ringbuf': 'ChardevRingbuf', |
5000 | # next one is just for compatibility | |
4f57378f | 5001 | 'memory' : 'ChardevRingbuf' } } |
f1a1a356 GH |
5002 | |
5003 | ## | |
5004 | # @ChardevReturn: | |
5005 | # | |
5006 | # Return info about the chardev backend just created. | |
5007 | # | |
1d8bda12 | 5008 | # @pty: name of the slave pseudoterminal device, present if |
58fa4325 MA |
5009 | # and only if a chardev of type 'pty' was created |
5010 | # | |
f1a1a356 GH |
5011 | # Since: 1.4 |
5012 | ## | |
895a2a80 | 5013 | { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } } |
f1a1a356 GH |
5014 | |
5015 | ## | |
5016 | # @chardev-add: | |
5017 | # | |
58fa4325 | 5018 | # Add a character device backend |
f1a1a356 GH |
5019 | # |
5020 | # @id: the chardev's ID, must be unique | |
5021 | # @backend: backend type and parameters | |
5022 | # | |
58fa4325 | 5023 | # Returns: ChardevReturn. |
f1a1a356 GH |
5024 | # |
5025 | # Since: 1.4 | |
2212092e MAL |
5026 | # |
5027 | # Example: | |
5028 | # | |
5029 | # -> { "execute" : "chardev-add", | |
5030 | # "arguments" : { "id" : "foo", | |
5031 | # "backend" : { "type" : "null", "data" : {} } } } | |
5032 | # <- { "return": {} } | |
5033 | # | |
5034 | # -> { "execute" : "chardev-add", | |
5035 | # "arguments" : { "id" : "bar", | |
5036 | # "backend" : { "type" : "file", | |
5037 | # "data" : { "out" : "/tmp/bar.log" } } } } | |
5038 | # <- { "return": {} } | |
5039 | # | |
5040 | # -> { "execute" : "chardev-add", | |
5041 | # "arguments" : { "id" : "baz", | |
5042 | # "backend" : { "type" : "pty", "data" : {} } } } | |
5043 | # <- { "return": { "pty" : "/dev/pty/42" } } | |
5044 | # | |
f1a1a356 GH |
5045 | ## |
5046 | { 'command': 'chardev-add', 'data': {'id' : 'str', | |
5047 | 'backend' : 'ChardevBackend' }, | |
5048 | 'returns': 'ChardevReturn' } | |
5049 | ||
7bb86085 AN |
5050 | ## |
5051 | # @chardev-change: | |
5052 | # | |
5053 | # Change a character device backend | |
5054 | # | |
5055 | # @id: the chardev's ID, must exist | |
5056 | # @backend: new backend type and parameters | |
5057 | # | |
5058 | # Returns: ChardevReturn. | |
5059 | # | |
5060 | # Since: 2.10 | |
5061 | # | |
5062 | # Example: | |
5063 | # | |
5064 | # -> { "execute" : "chardev-change", | |
5065 | # "arguments" : { "id" : "baz", | |
5066 | # "backend" : { "type" : "pty", "data" : {} } } } | |
5067 | # <- { "return": { "pty" : "/dev/pty/42" } } | |
5068 | # | |
5069 | # -> {"execute" : "chardev-change", | |
5070 | # "arguments" : { | |
5071 | # "id" : "charchannel2", | |
5072 | # "backend" : { | |
5073 | # "type" : "socket", | |
5074 | # "data" : { | |
5075 | # "addr" : { | |
5076 | # "type" : "unix" , | |
5077 | # "data" : { | |
5078 | # "path" : "/tmp/charchannel2.socket" | |
5079 | # } | |
5080 | # }, | |
5081 | # "server" : true, | |
5082 | # "wait" : false }}}} | |
5083 | # <- {"return": {}} | |
5084 | # | |
5085 | ## | |
5086 | { 'command': 'chardev-change', 'data': {'id' : 'str', | |
5087 | 'backend' : 'ChardevBackend' }, | |
5088 | 'returns': 'ChardevReturn' } | |
5089 | ||
f1a1a356 GH |
5090 | ## |
5091 | # @chardev-remove: | |
5092 | # | |
58fa4325 | 5093 | # Remove a character device backend |
f1a1a356 GH |
5094 | # |
5095 | # @id: the chardev's ID, must exist and not be in use | |
5096 | # | |
5097 | # Returns: Nothing on success | |
5098 | # | |
5099 | # Since: 1.4 | |
7cfee8d9 MAL |
5100 | # |
5101 | # Example: | |
5102 | # | |
5103 | # -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } } | |
5104 | # <- { "return": {} } | |
5105 | # | |
f1a1a356 GH |
5106 | ## |
5107 | { 'command': 'chardev-remove', 'data': {'id': 'str'} } | |
d1a0cf73 | 5108 | |
bd1d5ad9 SF |
5109 | ## |
5110 | # @chardev-send-break: | |
5111 | # | |
5112 | # Send a break to a character device | |
5113 | # | |
5114 | # @id: the chardev's ID, must exist | |
5115 | # | |
5116 | # Returns: Nothing on success | |
5117 | # | |
5118 | # Since: 2.10 | |
5119 | # | |
5120 | # Example: | |
5121 | # | |
5122 | # -> { "execute": "chardev-send-break", "arguments": { "id" : "foo" } } | |
5123 | # <- { "return": {} } | |
5124 | # | |
5125 | ## | |
5126 | { 'command': 'chardev-send-break', 'data': {'id': 'str'} } | |
5127 | ||
5128 | ||
d1a0cf73 SB |
5129 | ## |
5130 | # @TpmModel: | |
5131 | # | |
5132 | # An enumeration of TPM models | |
5133 | # | |
5134 | # @tpm-tis: TPM TIS model | |
5135 | # | |
5136 | # Since: 1.5 | |
5137 | ## | |
5138 | { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] } | |
5139 | ||
5140 | ## | |
5141 | # @query-tpm-models: | |
5142 | # | |
5143 | # Return a list of supported TPM models | |
5144 | # | |
5145 | # Returns: a list of TpmModel | |
5146 | # | |
5147 | # Since: 1.5 | |
b7c7941b MAL |
5148 | # |
5149 | # Example: | |
5150 | # | |
5151 | # -> { "execute": "query-tpm-models" } | |
5152 | # <- { "return": [ "tpm-tis" ] } | |
5153 | # | |
d1a0cf73 SB |
5154 | ## |
5155 | { 'command': 'query-tpm-models', 'returns': ['TpmModel'] } | |
5156 | ||
5157 | ## | |
5158 | # @TpmType: | |
5159 | # | |
5160 | # An enumeration of TPM types | |
5161 | # | |
5162 | # @passthrough: TPM passthrough type | |
5163 | # | |
5164 | # Since: 1.5 | |
5165 | ## | |
5166 | { 'enum': 'TpmType', 'data': [ 'passthrough' ] } | |
5167 | ||
5168 | ## | |
5169 | # @query-tpm-types: | |
5170 | # | |
5171 | # Return a list of supported TPM types | |
5172 | # | |
5173 | # Returns: a list of TpmType | |
5174 | # | |
5175 | # Since: 1.5 | |
5a4c0316 MAL |
5176 | # |
5177 | # Example: | |
5178 | # | |
5179 | # -> { "execute": "query-tpm-types" } | |
5180 | # <- { "return": [ "passthrough" ] } | |
5181 | # | |
d1a0cf73 SB |
5182 | ## |
5183 | { 'command': 'query-tpm-types', 'returns': ['TpmType'] } | |
5184 | ||
5185 | ## | |
5186 | # @TPMPassthroughOptions: | |
5187 | # | |
5188 | # Information about the TPM passthrough type | |
5189 | # | |
1d8bda12 | 5190 | # @path: string describing the path used for accessing the TPM device |
d1a0cf73 | 5191 | # |
1d8bda12 | 5192 | # @cancel-path: string showing the TPM's sysfs cancel file |
d1a0cf73 SB |
5193 | # for cancellation of TPM commands while they are executing |
5194 | # | |
5195 | # Since: 1.5 | |
5196 | ## | |
895a2a80 | 5197 | { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str', |
d1a0cf73 SB |
5198 | '*cancel-path' : 'str'} } |
5199 | ||
5200 | ## | |
5201 | # @TpmTypeOptions: | |
5202 | # | |
5203 | # A union referencing different TPM backend types' configuration options | |
5204 | # | |
4d5c8bc4 | 5205 | # @type: 'passthrough' The configuration options for the TPM passthrough type |
d1a0cf73 SB |
5206 | # |
5207 | # Since: 1.5 | |
5208 | ## | |
5209 | { 'union': 'TpmTypeOptions', | |
88ca7bcf | 5210 | 'data': { 'passthrough' : 'TPMPassthroughOptions' } } |
d1a0cf73 SB |
5211 | |
5212 | ## | |
4d5c8bc4 | 5213 | # @TPMInfo: |
d1a0cf73 SB |
5214 | # |
5215 | # Information about the TPM | |
5216 | # | |
5217 | # @id: The Id of the TPM | |
5218 | # | |
5219 | # @model: The TPM frontend model | |
5220 | # | |
88ca7bcf | 5221 | # @options: The TPM (backend) type configuration options |
d1a0cf73 SB |
5222 | # |
5223 | # Since: 1.5 | |
5224 | ## | |
895a2a80 | 5225 | { 'struct': 'TPMInfo', |
d1a0cf73 SB |
5226 | 'data': {'id': 'str', |
5227 | 'model': 'TpmModel', | |
88ca7bcf | 5228 | 'options': 'TpmTypeOptions' } } |
d1a0cf73 SB |
5229 | |
5230 | ## | |
5231 | # @query-tpm: | |
5232 | # | |
5233 | # Return information about the TPM device | |
5234 | # | |
5235 | # Returns: @TPMInfo on success | |
5236 | # | |
5237 | # Since: 1.5 | |
4e022d01 MAL |
5238 | # |
5239 | # Example: | |
5240 | # | |
5241 | # -> { "execute": "query-tpm" } | |
5242 | # <- { "return": | |
5243 | # [ | |
5244 | # { "model": "tpm-tis", | |
5245 | # "options": | |
5246 | # { "type": "passthrough", | |
5247 | # "data": | |
5248 | # { "cancel-path": "/sys/class/misc/tpm0/device/cancel", | |
5249 | # "path": "/dev/tpm0" | |
5250 | # } | |
5251 | # }, | |
5252 | # "id": "tpm0" | |
5253 | # } | |
5254 | # ] | |
5255 | # } | |
5256 | # | |
d1a0cf73 SB |
5257 | ## |
5258 | { 'command': 'query-tpm', 'returns': ['TPMInfo'] } | |
8ccbad5c LE |
5259 | |
5260 | ## | |
5072f7b3 | 5261 | # @AcpiTableOptions: |
8ccbad5c LE |
5262 | # |
5263 | # Specify an ACPI table on the command line to load. | |
5264 | # | |
5265 | # At most one of @file and @data can be specified. The list of files specified | |
5266 | # by any one of them is loaded and concatenated in order. If both are omitted, | |
5267 | # @data is implied. | |
5268 | # | |
5269 | # Other fields / optargs can be used to override fields of the generic ACPI | |
5270 | # table header; refer to the ACPI specification 5.0, section 5.2.6 System | |
5271 | # Description Table Header. If a header field is not overridden, then the | |
5272 | # corresponding value from the concatenated blob is used (in case of @file), or | |
5273 | # it is filled in with a hard-coded value (in case of @data). | |
5274 | # | |
5275 | # String fields are copied into the matching ACPI member from lowest address | |
5276 | # upwards, and silently truncated / NUL-padded to length. | |
5277 | # | |
1d8bda12 | 5278 | # @sig: table signature / identifier (4 bytes) |
8ccbad5c | 5279 | # |
1d8bda12 | 5280 | # @rev: table revision number (dependent on signature, 1 byte) |
8ccbad5c | 5281 | # |
1d8bda12 | 5282 | # @oem_id: OEM identifier (6 bytes) |
8ccbad5c | 5283 | # |
1d8bda12 | 5284 | # @oem_table_id: OEM table identifier (8 bytes) |
8ccbad5c | 5285 | # |
1d8bda12 | 5286 | # @oem_rev: OEM-supplied revision number (4 bytes) |
8ccbad5c | 5287 | # |
1d8bda12 | 5288 | # @asl_compiler_id: identifier of the utility that created the table |
8ccbad5c LE |
5289 | # (4 bytes) |
5290 | # | |
1d8bda12 | 5291 | # @asl_compiler_rev: revision number of the utility that created the |
8ccbad5c LE |
5292 | # table (4 bytes) |
5293 | # | |
1d8bda12 | 5294 | # @file: colon (:) separated list of pathnames to load and |
8ccbad5c LE |
5295 | # concatenate as table data. The resultant binary blob is expected to |
5296 | # have an ACPI table header. At least one file is required. This field | |
5297 | # excludes @data. | |
5298 | # | |
1d8bda12 | 5299 | # @data: colon (:) separated list of pathnames to load and |
8ccbad5c LE |
5300 | # concatenate as table data. The resultant binary blob must not have an |
5301 | # ACPI table header. At least one file is required. This field excludes | |
5302 | # @file. | |
5303 | # | |
5072f7b3 | 5304 | # Since: 1.5 |
8ccbad5c | 5305 | ## |
895a2a80 | 5306 | { 'struct': 'AcpiTableOptions', |
8ccbad5c LE |
5307 | 'data': { |
5308 | '*sig': 'str', | |
5309 | '*rev': 'uint8', | |
5310 | '*oem_id': 'str', | |
5311 | '*oem_table_id': 'str', | |
5312 | '*oem_rev': 'uint32', | |
5313 | '*asl_compiler_id': 'str', | |
5314 | '*asl_compiler_rev': 'uint32', | |
5315 | '*file': 'str', | |
5316 | '*data': 'str' }} | |
1f8f987d AK |
5317 | |
5318 | ## | |
5319 | # @CommandLineParameterType: | |
5320 | # | |
5321 | # Possible types for an option parameter. | |
5322 | # | |
5323 | # @string: accepts a character string | |
5324 | # | |
5325 | # @boolean: accepts "on" or "off" | |
5326 | # | |
5327 | # @number: accepts a number | |
5328 | # | |
5329 | # @size: accepts a number followed by an optional suffix (K)ilo, | |
5330 | # (M)ega, (G)iga, (T)era | |
5331 | # | |
5072f7b3 | 5332 | # Since: 1.5 |
1f8f987d AK |
5333 | ## |
5334 | { 'enum': 'CommandLineParameterType', | |
5335 | 'data': ['string', 'boolean', 'number', 'size'] } | |
5336 | ||
5337 | ## | |
5338 | # @CommandLineParameterInfo: | |
5339 | # | |
5340 | # Details about a single parameter of a command line option. | |
5341 | # | |
5342 | # @name: parameter name | |
5343 | # | |
5344 | # @type: parameter @CommandLineParameterType | |
5345 | # | |
1d8bda12 | 5346 | # @help: human readable text string, not suitable for parsing. |
1f8f987d | 5347 | # |
1d8bda12 | 5348 | # @default: default value string (since 2.1) |
e36af94f | 5349 | # |
5072f7b3 | 5350 | # Since: 1.5 |
1f8f987d | 5351 | ## |
895a2a80 | 5352 | { 'struct': 'CommandLineParameterInfo', |
1f8f987d AK |
5353 | 'data': { 'name': 'str', |
5354 | 'type': 'CommandLineParameterType', | |
e36af94f CL |
5355 | '*help': 'str', |
5356 | '*default': 'str' } } | |
1f8f987d AK |
5357 | |
5358 | ## | |
5359 | # @CommandLineOptionInfo: | |
5360 | # | |
5361 | # Details about a command line option, including its list of parameter details | |
5362 | # | |
5363 | # @option: option name | |
5364 | # | |
5365 | # @parameters: an array of @CommandLineParameterInfo | |
5366 | # | |
5072f7b3 | 5367 | # Since: 1.5 |
1f8f987d | 5368 | ## |
895a2a80 | 5369 | { 'struct': 'CommandLineOptionInfo', |
1f8f987d AK |
5370 | 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } } |
5371 | ||
5372 | ## | |
5373 | # @query-command-line-options: | |
5374 | # | |
5375 | # Query command line option schema. | |
5376 | # | |
1d8bda12 | 5377 | # @option: option name |
1f8f987d AK |
5378 | # |
5379 | # Returns: list of @CommandLineOptionInfo for all options (or for the given | |
5380 | # @option). Returns an error if the given @option doesn't exist. | |
5381 | # | |
5072f7b3 | 5382 | # Since: 1.5 |
e26a0d00 MAL |
5383 | # |
5384 | # Example: | |
5385 | # | |
5386 | # -> { "execute": "query-command-line-options", | |
5387 | # "arguments": { "option": "option-rom" } } | |
5388 | # <- { "return": [ | |
5389 | # { | |
5390 | # "parameters": [ | |
5391 | # { | |
5392 | # "name": "romfile", | |
5393 | # "type": "string" | |
5394 | # }, | |
5395 | # { | |
5396 | # "name": "bootindex", | |
5397 | # "type": "number" | |
5398 | # } | |
5399 | # ], | |
5400 | # "option": "option-rom" | |
5401 | # } | |
5402 | # ] | |
5403 | # } | |
5404 | # | |
1f8f987d AK |
5405 | ## |
5406 | {'command': 'query-command-line-options', 'data': { '*option': 'str' }, | |
5407 | 'returns': ['CommandLineOptionInfo'] } | |
8e8aba50 EH |
5408 | |
5409 | ## | |
5072f7b3 | 5410 | # @X86CPURegister32: |
8e8aba50 EH |
5411 | # |
5412 | # A X86 32-bit register | |
5413 | # | |
5414 | # Since: 1.5 | |
5415 | ## | |
5416 | { 'enum': 'X86CPURegister32', | |
5417 | 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] } | |
5418 | ||
5419 | ## | |
5072f7b3 | 5420 | # @X86CPUFeatureWordInfo: |
8e8aba50 EH |
5421 | # |
5422 | # Information about a X86 CPU feature word | |
5423 | # | |
5424 | # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word | |
5425 | # | |
1d8bda12 | 5426 | # @cpuid-input-ecx: Input ECX value for CPUID instruction for that |
8e8aba50 EH |
5427 | # feature word |
5428 | # | |
5429 | # @cpuid-register: Output register containing the feature bits | |
5430 | # | |
5431 | # @features: value of output register, containing the feature bits | |
5432 | # | |
5433 | # Since: 1.5 | |
5434 | ## | |
895a2a80 | 5435 | { 'struct': 'X86CPUFeatureWordInfo', |
8e8aba50 EH |
5436 | 'data': { 'cpuid-input-eax': 'int', |
5437 | '*cpuid-input-ecx': 'int', | |
5438 | 'cpuid-register': 'X86CPURegister32', | |
5439 | 'features': 'int' } } | |
b1be4280 | 5440 | |
9f08c8ec | 5441 | ## |
5072f7b3 | 5442 | # @DummyForceArrays: |
9f08c8ec EB |
5443 | # |
5444 | # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally | |
5445 | # | |
5072f7b3 | 5446 | # Since: 2.5 |
9f08c8ec EB |
5447 | ## |
5448 | { 'struct': 'DummyForceArrays', | |
5449 | 'data': { 'unused': ['X86CPUFeatureWordInfo'] } } | |
5450 | ||
5451 | ||
b1be4280 AK |
5452 | ## |
5453 | # @RxState: | |
5454 | # | |
5455 | # Packets receiving state | |
5456 | # | |
5457 | # @normal: filter assigned packets according to the mac-table | |
5458 | # | |
5459 | # @none: don't receive any assigned packet | |
5460 | # | |
5461 | # @all: receive all assigned packets | |
5462 | # | |
5463 | # Since: 1.6 | |
5464 | ## | |
5465 | { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] } | |
5466 | ||
5467 | ## | |
5468 | # @RxFilterInfo: | |
5469 | # | |
5470 | # Rx-filter information for a NIC. | |
5471 | # | |
5472 | # @name: net client name | |
5473 | # | |
5474 | # @promiscuous: whether promiscuous mode is enabled | |
5475 | # | |
5476 | # @multicast: multicast receive state | |
5477 | # | |
5478 | # @unicast: unicast receive state | |
5479 | # | |
f7bc8ef8 AK |
5480 | # @vlan: vlan receive state (Since 2.0) |
5481 | # | |
b1be4280 AK |
5482 | # @broadcast-allowed: whether to receive broadcast |
5483 | # | |
5484 | # @multicast-overflow: multicast table is overflowed or not | |
5485 | # | |
5486 | # @unicast-overflow: unicast table is overflowed or not | |
5487 | # | |
5488 | # @main-mac: the main macaddr string | |
5489 | # | |
5490 | # @vlan-table: a list of active vlan id | |
5491 | # | |
5492 | # @unicast-table: a list of unicast macaddr string | |
5493 | # | |
5494 | # @multicast-table: a list of multicast macaddr string | |
5495 | # | |
5072f7b3 | 5496 | # Since: 1.6 |
b1be4280 | 5497 | ## |
895a2a80 | 5498 | { 'struct': 'RxFilterInfo', |
b1be4280 AK |
5499 | 'data': { |
5500 | 'name': 'str', | |
5501 | 'promiscuous': 'bool', | |
5502 | 'multicast': 'RxState', | |
5503 | 'unicast': 'RxState', | |
f7bc8ef8 | 5504 | 'vlan': 'RxState', |
b1be4280 AK |
5505 | 'broadcast-allowed': 'bool', |
5506 | 'multicast-overflow': 'bool', | |
5507 | 'unicast-overflow': 'bool', | |
5508 | 'main-mac': 'str', | |
5509 | 'vlan-table': ['int'], | |
5510 | 'unicast-table': ['str'], | |
5511 | 'multicast-table': ['str'] }} | |
5512 | ||
5513 | ## | |
5514 | # @query-rx-filter: | |
5515 | # | |
5516 | # Return rx-filter information for all NICs (or for the given NIC). | |
5517 | # | |
1d8bda12 | 5518 | # @name: net client name |
b1be4280 AK |
5519 | # |
5520 | # Returns: list of @RxFilterInfo for all NICs (or for the given NIC). | |
5521 | # Returns an error if the given @name doesn't exist, or given | |
5522 | # NIC doesn't support rx-filter querying, or given net client | |
5523 | # isn't a NIC. | |
5524 | # | |
5525 | # Since: 1.6 | |
043ea312 MAL |
5526 | # |
5527 | # Example: | |
5528 | # | |
5529 | # -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } } | |
5530 | # <- { "return": [ | |
5531 | # { | |
5532 | # "promiscuous": true, | |
5533 | # "name": "vnet0", | |
5534 | # "main-mac": "52:54:00:12:34:56", | |
5535 | # "unicast": "normal", | |
5536 | # "vlan": "normal", | |
5537 | # "vlan-table": [ | |
5538 | # 4, | |
5539 | # 0 | |
5540 | # ], | |
5541 | # "unicast-table": [ | |
5542 | # ], | |
5543 | # "multicast": "normal", | |
5544 | # "multicast-overflow": false, | |
5545 | # "unicast-overflow": false, | |
5546 | # "multicast-table": [ | |
5547 | # "01:00:5e:00:00:01", | |
5548 | # "33:33:00:00:00:01", | |
5549 | # "33:33:ff:12:34:56" | |
5550 | # ], | |
5551 | # "broadcast-allowed": false | |
5552 | # } | |
5553 | # ] | |
5554 | # } | |
5555 | # | |
b1be4280 AK |
5556 | ## |
5557 | { 'command': 'query-rx-filter', 'data': { '*name': 'str' }, | |
5558 | 'returns': ['RxFilterInfo'] } | |
d26c9a15 | 5559 | |
031fa964 | 5560 | ## |
5072f7b3 | 5561 | # @InputButton: |
031fa964 GH |
5562 | # |
5563 | # Button of a pointer input device (mouse, tablet). | |
5564 | # | |
0095cc62 FL |
5565 | # @side: front side button of a 5-button mouse (since 2.9) |
5566 | # | |
5567 | # @extra: rear side button of a 5-button mouse (since 2.9) | |
5568 | # | |
031fa964 GH |
5569 | # Since: 2.0 |
5570 | ## | |
5571 | { 'enum' : 'InputButton', | |
0095cc62 FL |
5572 | 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side', |
5573 | 'extra' ] } | |
031fa964 GH |
5574 | |
5575 | ## | |
5072f7b3 | 5576 | # @InputAxis: |
031fa964 GH |
5577 | # |
5578 | # Position axis of a pointer input device (mouse, tablet). | |
5579 | # | |
5580 | # Since: 2.0 | |
5581 | ## | |
5582 | { 'enum' : 'InputAxis', | |
01df5143 | 5583 | 'data' : [ 'x', 'y' ] } |
031fa964 GH |
5584 | |
5585 | ## | |
5072f7b3 | 5586 | # @InputKeyEvent: |
031fa964 GH |
5587 | # |
5588 | # Keyboard input event. | |
5589 | # | |
5590 | # @key: Which key this event is for. | |
5591 | # @down: True for key-down and false for key-up events. | |
5592 | # | |
5593 | # Since: 2.0 | |
5594 | ## | |
895a2a80 | 5595 | { 'struct' : 'InputKeyEvent', |
031fa964 GH |
5596 | 'data' : { 'key' : 'KeyValue', |
5597 | 'down' : 'bool' } } | |
5598 | ||
5599 | ## | |
5072f7b3 | 5600 | # @InputBtnEvent: |
031fa964 GH |
5601 | # |
5602 | # Pointer button input event. | |
5603 | # | |
5604 | # @button: Which button this event is for. | |
5605 | # @down: True for key-down and false for key-up events. | |
5606 | # | |
5607 | # Since: 2.0 | |
5608 | ## | |
895a2a80 | 5609 | { 'struct' : 'InputBtnEvent', |
031fa964 GH |
5610 | 'data' : { 'button' : 'InputButton', |
5611 | 'down' : 'bool' } } | |
5612 | ||
5613 | ## | |
5072f7b3 | 5614 | # @InputMoveEvent: |
031fa964 GH |
5615 | # |
5616 | # Pointer motion input event. | |
5617 | # | |
5618 | # @axis: Which axis is referenced by @value. | |
5619 | # @value: Pointer position. For absolute coordinates the | |
5620 | # valid range is 0 -> 0x7ffff | |
5621 | # | |
5622 | # Since: 2.0 | |
5623 | ## | |
895a2a80 | 5624 | { 'struct' : 'InputMoveEvent', |
031fa964 GH |
5625 | 'data' : { 'axis' : 'InputAxis', |
5626 | 'value' : 'int' } } | |
5627 | ||
5628 | ## | |
5072f7b3 | 5629 | # @InputEvent: |
031fa964 GH |
5630 | # |
5631 | # Input event union. | |
5632 | # | |
4d5c8bc4 MAL |
5633 | # @type: the input type, one of: |
5634 | # - 'key': Input event of Keyboard | |
5635 | # - 'btn': Input event of pointer buttons | |
5636 | # - 'rel': Input event of relative pointer motion | |
5637 | # - 'abs': Input event of absolute pointer motion | |
935fb915 | 5638 | # |
031fa964 GH |
5639 | # Since: 2.0 |
5640 | ## | |
5641 | { 'union' : 'InputEvent', | |
5642 | 'data' : { 'key' : 'InputKeyEvent', | |
5643 | 'btn' : 'InputBtnEvent', | |
5644 | 'rel' : 'InputMoveEvent', | |
5645 | 'abs' : 'InputMoveEvent' } } | |
0042109a | 5646 | |
50c6617f | 5647 | ## |
5072f7b3 | 5648 | # @input-send-event: |
50c6617f MT |
5649 | # |
5650 | # Send input event(s) to guest. | |
5651 | # | |
1d8bda12 MA |
5652 | # @device: display device to send event(s) to. |
5653 | # @head: head to send event(s) to, in case the | |
b98d26e3 | 5654 | # display device supports multiple scanouts. |
50c6617f MT |
5655 | # @events: List of InputEvent union. |
5656 | # | |
5657 | # Returns: Nothing on success. | |
5658 | # | |
70d5b0c2 MAL |
5659 | # The @device and @head parameters can be used to send the input event |
5660 | # to specific input devices in case (a) multiple input devices of the | |
5661 | # same kind are added to the virtual machine and (b) you have | |
b98d26e3 GH |
5662 | # configured input routing (see docs/multiseat.txt) for those input |
5663 | # devices. The parameters work exactly like the device and head | |
5664 | # properties of input devices. If @device is missing, only devices | |
5665 | # that have no input routing config are admissible. If @device is | |
5666 | # specified, both input devices with and without input routing config | |
5667 | # are admissible, but devices with input routing config take | |
5668 | # precedence. | |
df5b2adb | 5669 | # |
6575ccdd | 5670 | # Since: 2.6 |
70d5b0c2 MAL |
5671 | # |
5672 | # Note: The consoles are visible in the qom tree, under | |
5673 | # /backend/console[$index]. They have a device link and head property, | |
5674 | # so it is possible to map which console belongs to which device and | |
5675 | # display. | |
5676 | # | |
5677 | # Example: | |
5678 | # | |
5679 | # 1. Press left mouse button. | |
5680 | # | |
5681 | # -> { "execute": "input-send-event", | |
5682 | # "arguments": { "device": "video0", | |
5683 | # "events": [ { "type": "btn", | |
5684 | # "data" : { "down": true, "button": "left" } } ] } } | |
5685 | # <- { "return": {} } | |
5686 | # | |
5687 | # -> { "execute": "input-send-event", | |
5688 | # "arguments": { "device": "video0", | |
5689 | # "events": [ { "type": "btn", | |
5690 | # "data" : { "down": false, "button": "left" } } ] } } | |
5691 | # <- { "return": {} } | |
5692 | # | |
5693 | # 2. Press ctrl-alt-del. | |
5694 | # | |
5695 | # -> { "execute": "input-send-event", | |
5696 | # "arguments": { "events": [ | |
5697 | # { "type": "key", "data" : { "down": true, | |
5698 | # "key": {"type": "qcode", "data": "ctrl" } } }, | |
5699 | # { "type": "key", "data" : { "down": true, | |
5700 | # "key": {"type": "qcode", "data": "alt" } } }, | |
5701 | # { "type": "key", "data" : { "down": true, | |
5702 | # "key": {"type": "qcode", "data": "delete" } } } ] } } | |
5703 | # <- { "return": {} } | |
5704 | # | |
5705 | # 3. Move mouse pointer to absolute coordinates (20000, 400). | |
5706 | # | |
5707 | # -> { "execute": "input-send-event" , | |
5708 | # "arguments": { "events": [ | |
5709 | # { "type": "abs", "data" : { "axis": "x", "value" : 20000 } }, | |
5710 | # { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } } | |
5711 | # <- { "return": {} } | |
5712 | # | |
50c6617f | 5713 | ## |
6575ccdd | 5714 | { 'command': 'input-send-event', |
b98d26e3 GH |
5715 | 'data': { '*device': 'str', |
5716 | '*head' : 'int', | |
5717 | 'events' : [ 'InputEvent' ] } } | |
50c6617f | 5718 | |
d081a49a MA |
5719 | ## |
5720 | # @NumaOptionsType: | |
5721 | # | |
0f203430 HC |
5722 | # @node: NUMA nodes configuration |
5723 | # | |
5724 | # @dist: NUMA distance configuration (since 2.10) | |
5725 | # | |
419fcdec IM |
5726 | # @cpu: property based CPU(s) to node mapping (Since: 2.10) |
5727 | # | |
d081a49a MA |
5728 | # Since: 2.1 |
5729 | ## | |
5730 | { 'enum': 'NumaOptionsType', | |
419fcdec | 5731 | 'data': [ 'node', 'dist', 'cpu' ] } |
d081a49a | 5732 | |
0042109a | 5733 | ## |
5072f7b3 | 5734 | # @NumaOptions: |
0042109a WG |
5735 | # |
5736 | # A discriminated record of NUMA options. (for OptsVisitor) | |
5737 | # | |
5072f7b3 | 5738 | # Since: 2.1 |
0042109a WG |
5739 | ## |
5740 | { 'union': 'NumaOptions', | |
d081a49a MA |
5741 | 'base': { 'type': 'NumaOptionsType' }, |
5742 | 'discriminator': 'type', | |
0042109a | 5743 | 'data': { |
0f203430 | 5744 | 'node': 'NumaNodeOptions', |
419fcdec IM |
5745 | 'dist': 'NumaDistOptions', |
5746 | 'cpu': 'NumaCpuOptions' }} | |
0042109a WG |
5747 | |
5748 | ## | |
5072f7b3 | 5749 | # @NumaNodeOptions: |
0042109a WG |
5750 | # |
5751 | # Create a guest NUMA node. (for OptsVisitor) | |
5752 | # | |
1d8bda12 | 5753 | # @nodeid: NUMA node ID (increase by 1 from 0 if omitted) |
0042109a | 5754 | # |
1d8bda12 | 5755 | # @cpus: VCPUs belonging to this node (assign VCPUS round-robin |
0042109a WG |
5756 | # if omitted) |
5757 | # | |
1d8bda12 | 5758 | # @mem: memory size of this node; mutually exclusive with @memdev. |
7febe36f PB |
5759 | # Equally divide total memory among nodes if both @mem and @memdev are |
5760 | # omitted. | |
5761 | # | |
1d8bda12 | 5762 | # @memdev: memory backend object. If specified for one node, |
7febe36f | 5763 | # it must be specified for all nodes. |
0042109a WG |
5764 | # |
5765 | # Since: 2.1 | |
5766 | ## | |
895a2a80 | 5767 | { 'struct': 'NumaNodeOptions', |
0042109a WG |
5768 | 'data': { |
5769 | '*nodeid': 'uint16', | |
5770 | '*cpus': ['uint16'], | |
7febe36f PB |
5771 | '*mem': 'size', |
5772 | '*memdev': 'str' }} | |
4cf1b76b | 5773 | |
0f203430 HC |
5774 | ## |
5775 | # @NumaDistOptions: | |
5776 | # | |
5777 | # Set the distance between 2 NUMA nodes. | |
5778 | # | |
5779 | # @src: source NUMA node. | |
5780 | # | |
5781 | # @dst: destination NUMA node. | |
5782 | # | |
5783 | # @val: NUMA distance from source node to destination node. | |
5784 | # When a node is unreachable from another node, set the distance | |
5785 | # between them to 255. | |
5786 | # | |
5787 | # Since: 2.10 | |
5788 | ## | |
5789 | { 'struct': 'NumaDistOptions', | |
5790 | 'data': { | |
5791 | 'src': 'uint16', | |
5792 | 'dst': 'uint16', | |
5793 | 'val': 'uint8' }} | |
5794 | ||
419fcdec IM |
5795 | ## |
5796 | # @NumaCpuOptions: | |
5797 | # | |
5798 | # Option "-numa cpu" overrides default cpu to node mapping. | |
5799 | # It accepts the same set of cpu properties as returned by | |
5800 | # query-hotpluggable-cpus[].props, where node-id could be used to | |
5801 | # override default node mapping. | |
5802 | # | |
5803 | # Since: 2.10 | |
5804 | ## | |
5805 | { 'struct': 'NumaCpuOptions', | |
5806 | 'base': 'CpuInstanceProperties', | |
5807 | 'data' : {} } | |
5808 | ||
4cf1b76b | 5809 | ## |
5072f7b3 | 5810 | # @HostMemPolicy: |
4cf1b76b HT |
5811 | # |
5812 | # Host memory policy types | |
5813 | # | |
5814 | # @default: restore default policy, remove any nondefault policy | |
5815 | # | |
5816 | # @preferred: set the preferred host nodes for allocation | |
5817 | # | |
5818 | # @bind: a strict policy that restricts memory allocation to the | |
5819 | # host nodes specified | |
5820 | # | |
5821 | # @interleave: memory allocations are interleaved across the set | |
5822 | # of host nodes specified | |
5823 | # | |
5072f7b3 | 5824 | # Since: 2.1 |
4cf1b76b HT |
5825 | ## |
5826 | { 'enum': 'HostMemPolicy', | |
5827 | 'data': [ 'default', 'preferred', 'bind', 'interleave' ] } | |
76b5d850 HT |
5828 | |
5829 | ## | |
5830 | # @Memdev: | |
5831 | # | |
8f4e5ac3 | 5832 | # Information about memory backend |
76b5d850 | 5833 | # |
1d8bda12 | 5834 | # @id: backend's ID if backend has 'id' property (since 2.9) |
e1ff3c67 | 5835 | # |
8f4e5ac3 | 5836 | # @size: memory backend size |
76b5d850 HT |
5837 | # |
5838 | # @merge: enables or disables memory merge support | |
5839 | # | |
8f4e5ac3 | 5840 | # @dump: includes memory backend's memory in a core dump or not |
76b5d850 HT |
5841 | # |
5842 | # @prealloc: enables or disables memory preallocation | |
5843 | # | |
5844 | # @host-nodes: host nodes for its memory policy | |
5845 | # | |
8f4e5ac3 | 5846 | # @policy: memory policy of memory backend |
76b5d850 HT |
5847 | # |
5848 | # Since: 2.1 | |
5849 | ## | |
895a2a80 | 5850 | { 'struct': 'Memdev', |
76b5d850 | 5851 | 'data': { |
e1ff3c67 | 5852 | '*id': 'str', |
76b5d850 HT |
5853 | 'size': 'size', |
5854 | 'merge': 'bool', | |
5855 | 'dump': 'bool', | |
5856 | 'prealloc': 'bool', | |
5857 | 'host-nodes': ['uint16'], | |
5858 | 'policy': 'HostMemPolicy' }} | |
5859 | ||
5860 | ## | |
5861 | # @query-memdev: | |
5862 | # | |
8f4e5ac3 | 5863 | # Returns information for all memory backends. |
76b5d850 HT |
5864 | # |
5865 | # Returns: a list of @Memdev. | |
5866 | # | |
5867 | # Since: 2.1 | |
cfc84c8b MAL |
5868 | # |
5869 | # Example: | |
5870 | # | |
5871 | # -> { "execute": "query-memdev" } | |
5872 | # <- { "return": [ | |
5873 | # { | |
5874 | # "id": "mem1", | |
5875 | # "size": 536870912, | |
5876 | # "merge": false, | |
5877 | # "dump": true, | |
5878 | # "prealloc": false, | |
5879 | # "host-nodes": [0, 1], | |
5880 | # "policy": "bind" | |
5881 | # }, | |
5882 | # { | |
5883 | # "size": 536870912, | |
5884 | # "merge": false, | |
5885 | # "dump": true, | |
5886 | # "prealloc": true, | |
5887 | # "host-nodes": [2, 3], | |
5888 | # "policy": "preferred" | |
5889 | # } | |
5890 | # ] | |
5891 | # } | |
5892 | # | |
76b5d850 HT |
5893 | ## |
5894 | { 'command': 'query-memdev', 'returns': ['Memdev'] } | |
8f4e5ac3 IM |
5895 | |
5896 | ## | |
6f2e2730 IM |
5897 | # @PCDIMMDeviceInfo: |
5898 | # | |
5899 | # PCDIMMDevice state information | |
5900 | # | |
1d8bda12 | 5901 | # @id: device's ID |
6f2e2730 IM |
5902 | # |
5903 | # @addr: physical address, where device is mapped | |
5904 | # | |
5905 | # @size: size of memory that the device provides | |
5906 | # | |
5907 | # @slot: slot number at which device is plugged in | |
5908 | # | |
5909 | # @node: NUMA node number where device is plugged in | |
5910 | # | |
5911 | # @memdev: memory backend linked with device | |
5912 | # | |
5913 | # @hotplugged: true if device was hotplugged | |
5914 | # | |
5915 | # @hotpluggable: true if device if could be added/removed while machine is running | |
5916 | # | |
5917 | # Since: 2.1 | |
5918 | ## | |
895a2a80 | 5919 | { 'struct': 'PCDIMMDeviceInfo', |
6f2e2730 IM |
5920 | 'data': { '*id': 'str', |
5921 | 'addr': 'int', | |
5922 | 'size': 'int', | |
5923 | 'slot': 'int', | |
5924 | 'node': 'int', | |
5925 | 'memdev': 'str', | |
5926 | 'hotplugged': 'bool', | |
5927 | 'hotpluggable': 'bool' | |
5928 | } | |
5929 | } | |
5930 | ||
5931 | ## | |
5932 | # @MemoryDeviceInfo: | |
5933 | # | |
5934 | # Union containing information about a memory device | |
5935 | # | |
5936 | # Since: 2.1 | |
5937 | ## | |
5938 | { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} } | |
5939 | ||
5940 | ## | |
5072f7b3 | 5941 | # @query-memory-devices: |
6f2e2730 IM |
5942 | # |
5943 | # Lists available memory devices and their state | |
5944 | # | |
5945 | # Since: 2.1 | |
22f9a094 MAL |
5946 | # |
5947 | # Example: | |
5948 | # | |
5949 | # -> { "execute": "query-memory-devices" } | |
5950 | # <- { "return": [ { "data": | |
5951 | # { "addr": 5368709120, | |
5952 | # "hotpluggable": true, | |
5953 | # "hotplugged": true, | |
5954 | # "id": "d1", | |
5955 | # "memdev": "/objects/memX", | |
5956 | # "node": 0, | |
5957 | # "size": 1073741824, | |
5958 | # "slot": 0}, | |
5959 | # "type": "dimm" | |
5960 | # } ] } | |
5961 | # | |
6f2e2730 IM |
5962 | ## |
5963 | { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] } | |
521b3673 | 5964 | |
49687ace | 5965 | ## |
5072f7b3 | 5966 | # @ACPISlotType: |
521b3673 IM |
5967 | # |
5968 | # @DIMM: memory slot | |
76623d00 | 5969 | # @CPU: logical CPU slot (since 2.7) |
49687ace | 5970 | ## |
76623d00 | 5971 | { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] } |
521b3673 | 5972 | |
49687ace | 5973 | ## |
5072f7b3 | 5974 | # @ACPIOSTInfo: |
521b3673 IM |
5975 | # |
5976 | # OSPM Status Indication for a device | |
5977 | # For description of possible values of @source and @status fields | |
5978 | # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec. | |
5979 | # | |
1d8bda12 | 5980 | # @device: device ID associated with slot |
521b3673 IM |
5981 | # |
5982 | # @slot: slot ID, unique per slot of a given @slot-type | |
5983 | # | |
5984 | # @slot-type: type of the slot | |
5985 | # | |
5986 | # @source: an integer containing the source event | |
5987 | # | |
5988 | # @status: an integer containing the status code | |
5989 | # | |
5990 | # Since: 2.1 | |
5991 | ## | |
895a2a80 | 5992 | { 'struct': 'ACPIOSTInfo', |
521b3673 IM |
5993 | 'data' : { '*device': 'str', |
5994 | 'slot': 'str', | |
5995 | 'slot-type': 'ACPISlotType', | |
5996 | 'source': 'int', | |
5997 | 'status': 'int' } } | |
02419bcb IM |
5998 | |
5999 | ## | |
5072f7b3 | 6000 | # @query-acpi-ospm-status: |
02419bcb | 6001 | # |
18b43003 MAL |
6002 | # Return a list of ACPIOSTInfo for devices that support status |
6003 | # reporting via ACPI _OST method. | |
02419bcb IM |
6004 | # |
6005 | # Since: 2.1 | |
18b43003 MAL |
6006 | # |
6007 | # Example: | |
6008 | # | |
6009 | # -> { "execute": "query-acpi-ospm-status" } | |
6010 | # <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0}, | |
6011 | # { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0}, | |
6012 | # { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0}, | |
6013 | # { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0} | |
6014 | # ]} | |
6015 | # | |
02419bcb IM |
6016 | ## |
6017 | { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] } | |
f668470f | 6018 | |
99eaf09c | 6019 | ## |
5072f7b3 | 6020 | # @WatchdogExpirationAction: |
99eaf09c WX |
6021 | # |
6022 | # An enumeration of the actions taken when the watchdog device's timer is | |
6023 | # expired | |
6024 | # | |
6025 | # @reset: system resets | |
6026 | # | |
6027 | # @shutdown: system shutdown, note that it is similar to @powerdown, which | |
6028 | # tries to set to system status and notify guest | |
6029 | # | |
6030 | # @poweroff: system poweroff, the emulator program exits | |
6031 | # | |
6032 | # @pause: system pauses, similar to @stop | |
6033 | # | |
6034 | # @debug: system enters debug state | |
6035 | # | |
6036 | # @none: nothing is done | |
6037 | # | |
795dc6e4 MCL |
6038 | # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all |
6039 | # VCPUS on x86) (since 2.4) | |
6040 | # | |
99eaf09c WX |
6041 | # Since: 2.1 |
6042 | ## | |
6043 | { 'enum': 'WatchdogExpirationAction', | |
795dc6e4 MCL |
6044 | 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none', |
6045 | 'inject-nmi' ] } | |
99eaf09c | 6046 | |
5a2d2cbd | 6047 | ## |
5072f7b3 | 6048 | # @IoOperationType: |
5a2d2cbd WX |
6049 | # |
6050 | # An enumeration of the I/O operation types | |
6051 | # | |
6052 | # @read: read operation | |
6053 | # | |
6054 | # @write: write operation | |
6055 | # | |
6056 | # Since: 2.1 | |
6057 | ## | |
6058 | { 'enum': 'IoOperationType', | |
6059 | 'data': [ 'read', 'write' ] } | |
6060 | ||
3a449690 | 6061 | ## |
5072f7b3 | 6062 | # @GuestPanicAction: |
3a449690 WX |
6063 | # |
6064 | # An enumeration of the actions taken when guest OS panic is detected | |
6065 | # | |
6066 | # @pause: system pauses | |
6067 | # | |
864111f4 | 6068 | # Since: 2.1 (poweroff since 2.8) |
3a449690 WX |
6069 | ## |
6070 | { 'enum': 'GuestPanicAction', | |
864111f4 | 6071 | 'data': [ 'pause', 'poweroff' ] } |
f2ae8abf | 6072 | |
e8ed97a6 AN |
6073 | ## |
6074 | # @GuestPanicInformationType: | |
6075 | # | |
6076 | # An enumeration of the guest panic information types | |
6077 | # | |
6078 | # Since: 2.9 | |
6079 | ## | |
6080 | { 'enum': 'GuestPanicInformationType', | |
6081 | 'data': [ 'hyper-v'] } | |
6082 | ||
d187e08d AN |
6083 | ## |
6084 | # @GuestPanicInformation: | |
6085 | # | |
6086 | # Information about a guest panic | |
6087 | # | |
6088 | # Since: 2.9 | |
6089 | ## | |
6090 | {'union': 'GuestPanicInformation', | |
e8ed97a6 AN |
6091 | 'base': {'type': 'GuestPanicInformationType'}, |
6092 | 'discriminator': 'type', | |
d187e08d AN |
6093 | 'data': { 'hyper-v': 'GuestPanicInformationHyperV' } } |
6094 | ||
6095 | ## | |
6096 | # @GuestPanicInformationHyperV: | |
6097 | # | |
6098 | # Hyper-V specific guest panic information (HV crash MSRs) | |
6099 | # | |
6100 | # Since: 2.9 | |
6101 | ## | |
6102 | {'struct': 'GuestPanicInformationHyperV', | |
6103 | 'data': { 'arg1': 'uint64', | |
6104 | 'arg2': 'uint64', | |
6105 | 'arg3': 'uint64', | |
6106 | 'arg4': 'uint64', | |
6107 | 'arg5': 'uint64' } } | |
6108 | ||
f2ae8abf | 6109 | ## |
5072f7b3 | 6110 | # @rtc-reset-reinjection: |
f2ae8abf MT |
6111 | # |
6112 | # This command will reset the RTC interrupt reinjection backlog. | |
6113 | # Can be used if another mechanism to synchronize guest time | |
6114 | # is in effect, for example QEMU guest agent's guest-set-time | |
6115 | # command. | |
6116 | # | |
6117 | # Since: 2.1 | |
5c32b4cc MAL |
6118 | # |
6119 | # Example: | |
6120 | # | |
6121 | # -> { "execute": "rtc-reset-reinjection" } | |
6122 | # <- { "return": {} } | |
6123 | # | |
f2ae8abf MT |
6124 | ## |
6125 | { 'command': 'rtc-reset-reinjection' } | |
fafa4d50 | 6126 | |
d73abd6d | 6127 | ## |
c5927e7a | 6128 | # @ReplayMode: |
d73abd6d PD |
6129 | # |
6130 | # Mode of the replay subsystem. | |
6131 | # | |
6132 | # @none: normal execution mode. Replay or record are not enabled. | |
6133 | # | |
6134 | # @record: record mode. All non-deterministic data is written into the | |
6135 | # replay log. | |
6136 | # | |
6137 | # @play: replay mode. Non-deterministic data required for system execution | |
6138 | # is read from the log. | |
6139 | # | |
6140 | # Since: 2.5 | |
6141 | ## | |
6142 | { 'enum': 'ReplayMode', | |
6143 | 'data': [ 'none', 'record', 'play' ] } | |
ae50a770 | 6144 | |
88c16567 WC |
6145 | ## |
6146 | # @xen-load-devices-state: | |
6147 | # | |
6148 | # Load the state of all devices from file. The RAM and the block devices | |
6149 | # of the VM are not loaded by this command. | |
6150 | # | |
6151 | # @filename: the file to load the state of the devices from as binary | |
6152 | # data. See xen-save-devices-state.txt for a description of the binary | |
6153 | # format. | |
6154 | # | |
6155 | # Since: 2.7 | |
7d1182d9 MAL |
6156 | # |
6157 | # Example: | |
6158 | # | |
6159 | # -> { "execute": "xen-load-devices-state", | |
6160 | # "arguments": { "filename": "/tmp/resume" } } | |
6161 | # <- { "return": {} } | |
6162 | # | |
88c16567 WC |
6163 | ## |
6164 | { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} } | |
6165 | ||
2c9639ec ZC |
6166 | ## |
6167 | # @xen-set-replication: | |
6168 | # | |
6169 | # Enable or disable replication. | |
6170 | # | |
6171 | # @enable: true to enable, false to disable. | |
6172 | # | |
6173 | # @primary: true for primary or false for secondary. | |
6174 | # | |
1d8bda12 | 6175 | # @failover: true to do failover, false to stop. but cannot be |
2c9639ec ZC |
6176 | # specified if 'enable' is true. default value is false. |
6177 | # | |
6178 | # Returns: nothing. | |
6179 | # | |
6180 | # Example: | |
6181 | # | |
6182 | # -> { "execute": "xen-set-replication", | |
6183 | # "arguments": {"enable": true, "primary": false} } | |
6184 | # <- { "return": {} } | |
6185 | # | |
6186 | # Since: 2.9 | |
6187 | ## | |
6188 | { 'command': 'xen-set-replication', | |
6189 | 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } } | |
6190 | ||
daa33c52 ZC |
6191 | ## |
6192 | # @ReplicationStatus: | |
6193 | # | |
6194 | # The result format for 'query-xen-replication-status'. | |
6195 | # | |
6196 | # @error: true if an error happened, false if replication is normal. | |
6197 | # | |
1d8bda12 | 6198 | # @desc: the human readable error description string, when |
daa33c52 ZC |
6199 | # @error is 'true'. |
6200 | # | |
6201 | # Since: 2.9 | |
6202 | ## | |
6203 | { 'struct': 'ReplicationStatus', | |
6204 | 'data': { 'error': 'bool', '*desc': 'str' } } | |
6205 | ||
6206 | ## | |
6207 | # @query-xen-replication-status: | |
6208 | # | |
6209 | # Query replication status while the vm is running. | |
6210 | # | |
6211 | # Returns: A @ReplicationResult object showing the status. | |
6212 | # | |
6213 | # Example: | |
6214 | # | |
6215 | # -> { "execute": "query-xen-replication-status" } | |
6216 | # <- { "return": { "error": false } } | |
6217 | # | |
6218 | # Since: 2.9 | |
6219 | ## | |
6220 | { 'command': 'query-xen-replication-status', | |
6221 | 'returns': 'ReplicationStatus' } | |
6222 | ||
6223 | ## | |
6224 | # @xen-colo-do-checkpoint: | |
6225 | # | |
6226 | # Xen uses this command to notify replication to trigger a checkpoint. | |
6227 | # | |
6228 | # Returns: nothing. | |
6229 | # | |
6230 | # Example: | |
6231 | # | |
6232 | # -> { "execute": "xen-colo-do-checkpoint" } | |
6233 | # <- { "return": {} } | |
6234 | # | |
6235 | # Since: 2.9 | |
6236 | ## | |
6237 | { 'command': 'xen-colo-do-checkpoint' } | |
6238 | ||
ae50a770 PX |
6239 | ## |
6240 | # @GICCapability: | |
6241 | # | |
6242 | # The struct describes capability for a specific GIC (Generic | |
6243 | # Interrupt Controller) version. These bits are not only decided by | |
6244 | # QEMU/KVM software version, but also decided by the hardware that | |
6245 | # the program is running upon. | |
6246 | # | |
6247 | # @version: version of GIC to be described. Currently, only 2 and 3 | |
6248 | # are supported. | |
6249 | # | |
6250 | # @emulated: whether current QEMU/hardware supports emulated GIC | |
6251 | # device in user space. | |
6252 | # | |
6253 | # @kernel: whether current QEMU/hardware supports hardware | |
6254 | # accelerated GIC device in kernel. | |
6255 | # | |
6256 | # Since: 2.6 | |
6257 | ## | |
6258 | { 'struct': 'GICCapability', | |
6259 | 'data': { 'version': 'int', | |
6260 | 'emulated': 'bool', | |
6261 | 'kernel': 'bool' } } | |
6262 | ||
6263 | ## | |
6264 | # @query-gic-capabilities: | |
6265 | # | |
6266 | # This command is ARM-only. It will return a list of GICCapability | |
6267 | # objects that describe its capability bits. | |
6268 | # | |
6269 | # Returns: a list of GICCapability objects. | |
6270 | # | |
6271 | # Since: 2.6 | |
1965e98d MAL |
6272 | # |
6273 | # Example: | |
6274 | # | |
6275 | # -> { "execute": "query-gic-capabilities" } | |
6276 | # <- { "return": [{ "version": 2, "emulated": true, "kernel": false }, | |
6277 | # { "version": 3, "emulated": false, "kernel": true } ] } | |
6278 | # | |
ae50a770 PX |
6279 | ## |
6280 | { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] } | |
d4633541 IM |
6281 | |
6282 | ## | |
5072f7b3 | 6283 | # @CpuInstanceProperties: |
d4633541 IM |
6284 | # |
6285 | # List of properties to be used for hotplugging a CPU instance, | |
6286 | # it should be passed by management with device_add command when | |
6287 | # a CPU is being hotplugged. | |
6288 | # | |
1d8bda12 MA |
6289 | # @node-id: NUMA node ID the CPU belongs to |
6290 | # @socket-id: socket number within node/board the CPU belongs to | |
6291 | # @core-id: core number within socket the CPU belongs to | |
6292 | # @thread-id: thread number within core the CPU belongs to | |
5807ff88 | 6293 | # |
d4633541 IM |
6294 | # Note: currently there are 4 properties that could be present |
6295 | # but management should be prepared to pass through other | |
6296 | # properties with device_add command to allow for future | |
27393c33 PK |
6297 | # interface extension. This also requires the filed names to be kept in |
6298 | # sync with the properties passed to -device/device_add. | |
d4633541 | 6299 | # |
d4633541 IM |
6300 | # Since: 2.7 |
6301 | ## | |
6302 | { 'struct': 'CpuInstanceProperties', | |
27393c33 PK |
6303 | 'data': { '*node-id': 'int', |
6304 | '*socket-id': 'int', | |
6305 | '*core-id': 'int', | |
6306 | '*thread-id': 'int' | |
d4633541 IM |
6307 | } |
6308 | } | |
6309 | ||
6310 | ## | |
5072f7b3 | 6311 | # @HotpluggableCPU: |
d4633541 IM |
6312 | # |
6313 | # @type: CPU object type for usage with device_add command | |
6314 | # @props: list of properties to be used for hotplugging CPU | |
6315 | # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides | |
1d8bda12 | 6316 | # @qom-path: link to existing CPU object if CPU is present or |
d4633541 IM |
6317 | # omitted if CPU is not present. |
6318 | # | |
6319 | # Since: 2.7 | |
6320 | ## | |
6321 | { 'struct': 'HotpluggableCPU', | |
6322 | 'data': { 'type': 'str', | |
6323 | 'vcpus-count': 'int', | |
6324 | 'props': 'CpuInstanceProperties', | |
6325 | '*qom-path': 'str' | |
6326 | } | |
6327 | } | |
6328 | ||
6329 | ## | |
5072f7b3 | 6330 | # @query-hotpluggable-cpus: |
d4633541 IM |
6331 | # |
6332 | # Returns: a list of HotpluggableCPU objects. | |
6333 | # | |
6334 | # Since: 2.7 | |
7e31d1ae MAL |
6335 | # |
6336 | # Example: | |
6337 | # | |
6338 | # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8: | |
6339 | # | |
6340 | # -> { "execute": "query-hotpluggable-cpus" } | |
6341 | # <- {"return": [ | |
6342 | # { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core", | |
6343 | # "vcpus-count": 1 }, | |
6344 | # { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core", | |
6345 | # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"} | |
6346 | # ]}' | |
6347 | # | |
6348 | # For pc machine type started with -smp 1,maxcpus=2: | |
6349 | # | |
6350 | # -> { "execute": "query-hotpluggable-cpus" } | |
6351 | # <- {"return": [ | |
6352 | # { | |
6353 | # "type": "qemu64-x86_64-cpu", "vcpus-count": 1, | |
6354 | # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0} | |
6355 | # }, | |
6356 | # { | |
6357 | # "qom-path": "/machine/unattached/device[0]", | |
6358 | # "type": "qemu64-x86_64-cpu", "vcpus-count": 1, | |
6359 | # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0} | |
6360 | # } | |
6361 | # ]} | |
6362 | # | |
d4633541 IM |
6363 | ## |
6364 | { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] } | |
39164c13 IM |
6365 | |
6366 | ## | |
6367 | # @GuidInfo: | |
6368 | # | |
6369 | # GUID information. | |
6370 | # | |
6371 | # @guid: the globally unique identifier | |
6372 | # | |
6373 | # Since: 2.9 | |
6374 | ## | |
6375 | { 'struct': 'GuidInfo', 'data': {'guid': 'str'} } | |
6376 | ||
6377 | ## | |
6378 | # @query-vm-generation-id: | |
6379 | # | |
6380 | # Show Virtual Machine Generation ID | |
6381 | # | |
6382 | # Since 2.9 | |
6383 | ## | |
6384 | { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' } |