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