]>
Commit | Line | Data |
---|---|---|
2313086a BS |
1 | HXCOMM Use DEFHEADING() to define headings in both help text and texi |
2 | HXCOMM Text between STEXI and ETEXI are copied to texi version and | |
3 | HXCOMM discarded from C version | |
4 | HXCOMM DEF(command, args, callback, arg_string, help) is used to construct | |
5 | HXCOMM monitor commands | |
6 | HXCOMM HXCOMM can be used for comments, discarded from both texi and C | |
7 | ||
8 | STEXI | |
9 | @table @option | |
10 | ETEXI | |
11 | ||
d7f9b689 LC |
12 | { |
13 | .name = "help|?", | |
14 | .args_type = "name:s?", | |
d7f9b689 LC |
15 | .params = "[cmd]", |
16 | .help = "show the help", | |
af4ce882 | 17 | .mhandler.cmd = do_help_cmd, |
d7f9b689 LC |
18 | }, |
19 | ||
2313086a BS |
20 | STEXI |
21 | @item help or ? [@var{cmd}] | |
70fcbbe7 | 22 | @findex help |
2313086a BS |
23 | Show the help for all commands or just for command @var{cmd}. |
24 | ETEXI | |
25 | ||
d7f9b689 LC |
26 | { |
27 | .name = "commit", | |
28 | .args_type = "device:B", | |
d7f9b689 LC |
29 | .params = "device|all", |
30 | .help = "commit changes to the disk images (if -snapshot is used) or backing files", | |
af4ce882 | 31 | .mhandler.cmd = do_commit, |
d7f9b689 LC |
32 | }, |
33 | ||
2313086a BS |
34 | STEXI |
35 | @item commit | |
70fcbbe7 | 36 | @findex commit |
2313086a | 37 | Commit changes to the disk images (if -snapshot is used) or backing files. |
2313086a BS |
38 | ETEXI |
39 | ||
d7f9b689 LC |
40 | { |
41 | .name = "q|quit", | |
42 | .args_type = "", | |
d7f9b689 LC |
43 | .params = "", |
44 | .help = "quit the emulator", | |
b223f35f | 45 | .user_print = monitor_user_noop, |
7a7f325e | 46 | .mhandler.cmd = hmp_quit, |
d7f9b689 LC |
47 | }, |
48 | ||
2313086a BS |
49 | STEXI |
50 | @item q or quit | |
70fcbbe7 | 51 | @findex quit |
2313086a BS |
52 | Quit the emulator. |
53 | ETEXI | |
54 | ||
6d4a2b3a CH |
55 | { |
56 | .name = "block_resize", | |
57 | .args_type = "device:B,size:o", | |
58 | .params = "device size", | |
59 | .help = "resize a block image", | |
5e7caacb | 60 | .mhandler.cmd = hmp_block_resize, |
6d4a2b3a CH |
61 | }, |
62 | ||
63 | STEXI | |
64 | @item block_resize | |
65 | @findex block_resize | |
66 | Resize a block image while a guest is running. Usually requires guest | |
67 | action to see the updated size. Resize to a lower size is supported, | |
68 | but should be used with extreme caution. Note that this command only | |
69 | resizes image files, it can not resize block devices like LVM volumes. | |
70 | ETEXI | |
71 | ||
12bd451f SH |
72 | { |
73 | .name = "block_stream", | |
c83c66c3 SH |
74 | .args_type = "device:B,speed:o?,base:s?", |
75 | .params = "device [speed [base]]", | |
12bd451f SH |
76 | .help = "copy data from a backing file into a block device", |
77 | .mhandler.cmd = hmp_block_stream, | |
78 | }, | |
79 | ||
80 | STEXI | |
81 | @item block_stream | |
82 | @findex block_stream | |
83 | Copy data from a backing file into a block device. | |
2d47c6e9 SH |
84 | ETEXI |
85 | ||
86 | { | |
87 | .name = "block_job_set_speed", | |
882ec7ce SH |
88 | .args_type = "device:B,speed:o", |
89 | .params = "device speed", | |
2d47c6e9 SH |
90 | .help = "set maximum speed for a background block operation", |
91 | .mhandler.cmd = hmp_block_job_set_speed, | |
92 | }, | |
93 | ||
94 | STEXI | |
4451b799 PB |
95 | @item block_job_set_speed |
96 | @findex block_job_set_speed | |
2d47c6e9 | 97 | Set maximum speed for a background block operation. |
370521a1 SH |
98 | ETEXI |
99 | ||
100 | { | |
101 | .name = "block_job_cancel", | |
102 | .args_type = "device:B", | |
103 | .params = "device", | |
05290d80 | 104 | .help = "stop an active background block operation", |
370521a1 SH |
105 | .mhandler.cmd = hmp_block_job_cancel, |
106 | }, | |
107 | ||
108 | STEXI | |
109 | @item block_job_cancel | |
110 | @findex block_job_cancel | |
111 | Stop an active block streaming operation. | |
12bd451f | 112 | ETEXI |
6d4a2b3a | 113 | |
d7f9b689 LC |
114 | { |
115 | .name = "eject", | |
78d714e0 | 116 | .args_type = "force:-f,device:B", |
d7f9b689 LC |
117 | .params = "[-f] device", |
118 | .help = "eject a removable medium (use -f to force it)", | |
c245b6a3 | 119 | .mhandler.cmd = hmp_eject, |
d7f9b689 LC |
120 | }, |
121 | ||
2313086a BS |
122 | STEXI |
123 | @item eject [-f] @var{device} | |
70fcbbe7 | 124 | @findex eject |
2313086a | 125 | Eject a removable medium (use -f to force it). |
9063f814 RH |
126 | ETEXI |
127 | ||
128 | { | |
129 | .name = "drive_del", | |
130 | .args_type = "id:s", | |
131 | .params = "device", | |
132 | .help = "remove host block device", | |
133 | .user_print = monitor_user_noop, | |
134 | .mhandler.cmd_new = do_drive_del, | |
135 | }, | |
136 | ||
137 | STEXI | |
138 | @item drive_del @var{device} | |
139 | @findex drive_del | |
140 | Remove host block device. The result is that guest generated IO is no longer | |
141 | submitted against the host device underlying the disk. Once a drive has | |
142 | been deleted, the QEMU Block layer returns -EIO which results in IO | |
143 | errors in the guest for applications that are reading/writing to the device. | |
2313086a BS |
144 | ETEXI |
145 | ||
d7f9b689 LC |
146 | { |
147 | .name = "change", | |
148 | .args_type = "device:B,target:F,arg:s?", | |
d7f9b689 LC |
149 | .params = "device filename [format]", |
150 | .help = "change a removable medium, optional format", | |
333a96ec | 151 | .mhandler.cmd = hmp_change, |
d7f9b689 LC |
152 | }, |
153 | ||
2313086a BS |
154 | STEXI |
155 | @item change @var{device} @var{setting} | |
70fcbbe7 | 156 | @findex change |
2313086a BS |
157 | |
158 | Change the configuration of a device. | |
159 | ||
160 | @table @option | |
161 | @item change @var{diskdevice} @var{filename} [@var{format}] | |
162 | Change the medium for a removable disk device to point to @var{filename}. eg | |
163 | ||
164 | @example | |
165 | (qemu) change ide1-cd0 /path/to/some.iso | |
166 | @end example | |
167 | ||
168 | @var{format} is optional. | |
169 | ||
170 | @item change vnc @var{display},@var{options} | |
171 | Change the configuration of the VNC server. The valid syntax for @var{display} | |
172 | and @var{options} are described at @ref{sec_invocation}. eg | |
173 | ||
174 | @example | |
175 | (qemu) change vnc localhost:1 | |
176 | @end example | |
177 | ||
178 | @item change vnc password [@var{password}] | |
179 | ||
180 | Change the password associated with the VNC server. If the new password is not | |
181 | supplied, the monitor will prompt for it to be entered. VNC passwords are only | |
182 | significant up to 8 letters. eg | |
183 | ||
184 | @example | |
185 | (qemu) change vnc password | |
186 | Password: ******** | |
187 | @end example | |
188 | ||
189 | @end table | |
190 | ETEXI | |
191 | ||
d7f9b689 LC |
192 | { |
193 | .name = "screendump", | |
194 | .args_type = "filename:F", | |
d7f9b689 LC |
195 | .params = "filename", |
196 | .help = "save screen into PPM image 'filename'", | |
ad39cf6d | 197 | .mhandler.cmd = hmp_screen_dump, |
d7f9b689 LC |
198 | }, |
199 | ||
2313086a BS |
200 | STEXI |
201 | @item screendump @var{filename} | |
70fcbbe7 | 202 | @findex screendump |
2313086a BS |
203 | Save screen into PPM image @var{filename}. |
204 | ETEXI | |
205 | ||
d7f9b689 LC |
206 | { |
207 | .name = "logfile", | |
208 | .args_type = "filename:F", | |
d7f9b689 LC |
209 | .params = "filename", |
210 | .help = "output logs to 'filename'", | |
af4ce882 | 211 | .mhandler.cmd = do_logfile, |
d7f9b689 LC |
212 | }, |
213 | ||
2313086a BS |
214 | STEXI |
215 | @item logfile @var{filename} | |
70fcbbe7 | 216 | @findex logfile |
2313086a BS |
217 | Output logs to @var{filename}. |
218 | ETEXI | |
219 | ||
22890ab5 PS |
220 | { |
221 | .name = "trace-event", | |
222 | .args_type = "name:s,option:b", | |
223 | .params = "name on|off", | |
224 | .help = "changes status of a specific trace event", | |
fc764105 | 225 | .mhandler.cmd = do_trace_event_set_state, |
22890ab5 PS |
226 | }, |
227 | ||
228 | STEXI | |
229 | @item trace-event | |
230 | @findex trace-event | |
231 | changes status of a trace event | |
c5ceb523 SH |
232 | ETEXI |
233 | ||
c45a8168 | 234 | #if defined(CONFIG_TRACE_SIMPLE) |
c5ceb523 SH |
235 | { |
236 | .name = "trace-file", | |
237 | .args_type = "op:s?,arg:F?", | |
238 | .params = "on|off|flush|set [arg]", | |
239 | .help = "open, close, or flush trace file, or set a new file name", | |
240 | .mhandler.cmd = do_trace_file, | |
241 | }, | |
242 | ||
243 | STEXI | |
244 | @item trace-file on|off|flush | |
245 | @findex trace-file | |
246 | Open, close, or flush the trace file. If no argument is given, the status of the trace file is displayed. | |
22890ab5 PS |
247 | ETEXI |
248 | #endif | |
249 | ||
d7f9b689 LC |
250 | { |
251 | .name = "log", | |
252 | .args_type = "items:s", | |
d7f9b689 LC |
253 | .params = "item1[,...]", |
254 | .help = "activate logging of the specified items to '/tmp/qemu.log'", | |
af4ce882 | 255 | .mhandler.cmd = do_log, |
d7f9b689 LC |
256 | }, |
257 | ||
2313086a BS |
258 | STEXI |
259 | @item log @var{item1}[,...] | |
70fcbbe7 | 260 | @findex log |
2313086a BS |
261 | Activate logging of the specified items to @file{/tmp/qemu.log}. |
262 | ETEXI | |
263 | ||
d7f9b689 LC |
264 | { |
265 | .name = "savevm", | |
266 | .args_type = "name:s?", | |
d7f9b689 LC |
267 | .params = "[tag|id]", |
268 | .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created", | |
af4ce882 | 269 | .mhandler.cmd = do_savevm, |
d7f9b689 LC |
270 | }, |
271 | ||
2313086a BS |
272 | STEXI |
273 | @item savevm [@var{tag}|@var{id}] | |
70fcbbe7 | 274 | @findex savevm |
2313086a BS |
275 | Create a snapshot of the whole virtual machine. If @var{tag} is |
276 | provided, it is used as human readable identifier. If there is already | |
277 | a snapshot with the same tag or ID, it is replaced. More info at | |
278 | @ref{vm_snapshots}. | |
279 | ETEXI | |
280 | ||
d7f9b689 LC |
281 | { |
282 | .name = "loadvm", | |
283 | .args_type = "name:s", | |
d7f9b689 LC |
284 | .params = "tag|id", |
285 | .help = "restore a VM snapshot from its tag or id", | |
af4ce882 | 286 | .mhandler.cmd = do_loadvm, |
d7f9b689 LC |
287 | }, |
288 | ||
2313086a BS |
289 | STEXI |
290 | @item loadvm @var{tag}|@var{id} | |
70fcbbe7 | 291 | @findex loadvm |
2313086a BS |
292 | Set the whole virtual machine to the snapshot identified by the tag |
293 | @var{tag} or the unique snapshot ID @var{id}. | |
294 | ETEXI | |
295 | ||
d7f9b689 LC |
296 | { |
297 | .name = "delvm", | |
298 | .args_type = "name:s", | |
d7f9b689 LC |
299 | .params = "tag|id", |
300 | .help = "delete a VM snapshot from its tag or id", | |
af4ce882 | 301 | .mhandler.cmd = do_delvm, |
d7f9b689 LC |
302 | }, |
303 | ||
2313086a BS |
304 | STEXI |
305 | @item delvm @var{tag}|@var{id} | |
70fcbbe7 | 306 | @findex delvm |
2313086a BS |
307 | Delete the snapshot identified by @var{tag} or @var{id}. |
308 | ETEXI | |
309 | ||
d7f9b689 LC |
310 | { |
311 | .name = "singlestep", | |
312 | .args_type = "option:s?", | |
d7f9b689 LC |
313 | .params = "[on|off]", |
314 | .help = "run emulation in singlestep mode or switch to normal mode", | |
af4ce882 | 315 | .mhandler.cmd = do_singlestep, |
d7f9b689 LC |
316 | }, |
317 | ||
2313086a BS |
318 | STEXI |
319 | @item singlestep [off] | |
70fcbbe7 | 320 | @findex singlestep |
2313086a BS |
321 | Run the emulation in single step mode. |
322 | If called with option off, the emulation returns to normal mode. | |
323 | ETEXI | |
324 | ||
d7f9b689 LC |
325 | { |
326 | .name = "stop", | |
327 | .args_type = "", | |
d7f9b689 LC |
328 | .params = "", |
329 | .help = "stop emulation", | |
5f158f21 | 330 | .mhandler.cmd = hmp_stop, |
d7f9b689 LC |
331 | }, |
332 | ||
2313086a BS |
333 | STEXI |
334 | @item stop | |
70fcbbe7 | 335 | @findex stop |
2313086a BS |
336 | Stop emulation. |
337 | ETEXI | |
338 | ||
d7f9b689 LC |
339 | { |
340 | .name = "c|cont", | |
341 | .args_type = "", | |
d7f9b689 LC |
342 | .params = "", |
343 | .help = "resume emulation", | |
e42e818b | 344 | .mhandler.cmd = hmp_cont, |
d7f9b689 LC |
345 | }, |
346 | ||
2313086a BS |
347 | STEXI |
348 | @item c or cont | |
70fcbbe7 | 349 | @findex cont |
2313086a | 350 | Resume emulation. |
9b9df25a GH |
351 | ETEXI |
352 | ||
353 | { | |
354 | .name = "system_wakeup", | |
355 | .args_type = "", | |
356 | .params = "", | |
357 | .help = "wakeup guest from suspend", | |
358 | .mhandler.cmd = hmp_system_wakeup, | |
359 | }, | |
360 | ||
361 | STEXI | |
362 | @item system_wakeup | |
363 | @findex system_wakeup | |
364 | Wakeup guest from suspend. | |
2313086a BS |
365 | ETEXI |
366 | ||
d7f9b689 LC |
367 | { |
368 | .name = "gdbserver", | |
369 | .args_type = "device:s?", | |
d7f9b689 LC |
370 | .params = "[device]", |
371 | .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'", | |
af4ce882 | 372 | .mhandler.cmd = do_gdbserver, |
d7f9b689 LC |
373 | }, |
374 | ||
2313086a BS |
375 | STEXI |
376 | @item gdbserver [@var{port}] | |
70fcbbe7 | 377 | @findex gdbserver |
2313086a BS |
378 | Start gdbserver session (default @var{port}=1234) |
379 | ETEXI | |
380 | ||
d7f9b689 LC |
381 | { |
382 | .name = "x", | |
383 | .args_type = "fmt:/,addr:l", | |
d7f9b689 LC |
384 | .params = "/fmt addr", |
385 | .help = "virtual memory dump starting at 'addr'", | |
af4ce882 | 386 | .mhandler.cmd = do_memory_dump, |
d7f9b689 LC |
387 | }, |
388 | ||
2313086a BS |
389 | STEXI |
390 | @item x/fmt @var{addr} | |
70fcbbe7 | 391 | @findex x |
2313086a BS |
392 | Virtual memory dump starting at @var{addr}. |
393 | ETEXI | |
394 | ||
d7f9b689 LC |
395 | { |
396 | .name = "xp", | |
397 | .args_type = "fmt:/,addr:l", | |
d7f9b689 LC |
398 | .params = "/fmt addr", |
399 | .help = "physical memory dump starting at 'addr'", | |
af4ce882 | 400 | .mhandler.cmd = do_physical_memory_dump, |
d7f9b689 LC |
401 | }, |
402 | ||
2313086a BS |
403 | STEXI |
404 | @item xp /@var{fmt} @var{addr} | |
70fcbbe7 | 405 | @findex xp |
2313086a BS |
406 | Physical memory dump starting at @var{addr}. |
407 | ||
408 | @var{fmt} is a format which tells the command how to format the | |
409 | data. Its syntax is: @option{/@{count@}@{format@}@{size@}} | |
410 | ||
411 | @table @var | |
412 | @item count | |
413 | is the number of items to be dumped. | |
414 | ||
415 | @item format | |
416 | can be x (hex), d (signed decimal), u (unsigned decimal), o (octal), | |
417 | c (char) or i (asm instruction). | |
418 | ||
419 | @item size | |
420 | can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86, | |
421 | @code{h} or @code{w} can be specified with the @code{i} format to | |
422 | respectively select 16 or 32 bit code instruction size. | |
423 | ||
424 | @end table | |
425 | ||
426 | Examples: | |
427 | @itemize | |
428 | @item | |
429 | Dump 10 instructions at the current instruction pointer: | |
430 | @example | |
431 | (qemu) x/10i $eip | |
432 | 0x90107063: ret | |
433 | 0x90107064: sti | |
434 | 0x90107065: lea 0x0(%esi,1),%esi | |
435 | 0x90107069: lea 0x0(%edi,1),%edi | |
436 | 0x90107070: ret | |
437 | 0x90107071: jmp 0x90107080 | |
438 | 0x90107073: nop | |
439 | 0x90107074: nop | |
440 | 0x90107075: nop | |
441 | 0x90107076: nop | |
442 | @end example | |
443 | ||
444 | @item | |
445 | Dump 80 16 bit values at the start of the video memory. | |
446 | @smallexample | |
447 | (qemu) xp/80hx 0xb8000 | |
448 | 0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42 | |
449 | 0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41 | |
450 | 0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72 | |
451 | 0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73 | |
452 | 0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20 | |
453 | 0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720 | |
454 | 0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 | |
455 | 0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 | |
456 | 0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 | |
457 | 0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 | |
458 | @end smallexample | |
459 | @end itemize | |
460 | ETEXI | |
461 | ||
d7f9b689 LC |
462 | { |
463 | .name = "p|print", | |
464 | .args_type = "fmt:/,val:l", | |
d7f9b689 LC |
465 | .params = "/fmt expr", |
466 | .help = "print expression value (use $reg for CPU register access)", | |
af4ce882 | 467 | .mhandler.cmd = do_print, |
d7f9b689 LC |
468 | }, |
469 | ||
2313086a BS |
470 | STEXI |
471 | @item p or print/@var{fmt} @var{expr} | |
70fcbbe7 | 472 | @findex print |
2313086a BS |
473 | |
474 | Print expression value. Only the @var{format} part of @var{fmt} is | |
475 | used. | |
476 | ETEXI | |
477 | ||
d7f9b689 LC |
478 | { |
479 | .name = "i", | |
480 | .args_type = "fmt:/,addr:i,index:i.", | |
d7f9b689 LC |
481 | .params = "/fmt addr", |
482 | .help = "I/O port read", | |
af4ce882 | 483 | .mhandler.cmd = do_ioport_read, |
d7f9b689 LC |
484 | }, |
485 | ||
2313086a BS |
486 | STEXI |
487 | Read I/O port. | |
488 | ETEXI | |
489 | ||
d7f9b689 LC |
490 | { |
491 | .name = "o", | |
492 | .args_type = "fmt:/,addr:i,val:i", | |
d7f9b689 LC |
493 | .params = "/fmt addr value", |
494 | .help = "I/O port write", | |
af4ce882 | 495 | .mhandler.cmd = do_ioport_write, |
d7f9b689 LC |
496 | }, |
497 | ||
f114784f JK |
498 | STEXI |
499 | Write to I/O port. | |
500 | ETEXI | |
2313086a | 501 | |
d7f9b689 LC |
502 | { |
503 | .name = "sendkey", | |
2ef20c15 | 504 | .args_type = "keys:s,hold-time:i?", |
d7f9b689 LC |
505 | .params = "keys [hold_ms]", |
506 | .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)", | |
e4c8f004 | 507 | .mhandler.cmd = hmp_send_key, |
d7f9b689 LC |
508 | }, |
509 | ||
2313086a BS |
510 | STEXI |
511 | @item sendkey @var{keys} | |
70fcbbe7 | 512 | @findex sendkey |
2313086a | 513 | |
886cc706 AK |
514 | Send @var{keys} to the guest. @var{keys} could be the name of the |
515 | key or the raw value in hexadecimal format. Use @code{-} to press | |
516 | several keys simultaneously. Example: | |
2313086a BS |
517 | @example |
518 | sendkey ctrl-alt-f1 | |
519 | @end example | |
520 | ||
521 | This command is useful to send keys that your graphical user interface | |
522 | intercepts at low level, such as @code{ctrl-alt-f1} in X Window. | |
523 | ETEXI | |
524 | ||
d7f9b689 LC |
525 | { |
526 | .name = "system_reset", | |
527 | .args_type = "", | |
d7f9b689 LC |
528 | .params = "", |
529 | .help = "reset the system", | |
38d22653 | 530 | .mhandler.cmd = hmp_system_reset, |
d7f9b689 LC |
531 | }, |
532 | ||
2313086a BS |
533 | STEXI |
534 | @item system_reset | |
70fcbbe7 | 535 | @findex system_reset |
2313086a BS |
536 | |
537 | Reset the system. | |
538 | ETEXI | |
539 | ||
d7f9b689 LC |
540 | { |
541 | .name = "system_powerdown", | |
542 | .args_type = "", | |
d7f9b689 LC |
543 | .params = "", |
544 | .help = "send system power down event", | |
5bc465e4 | 545 | .mhandler.cmd = hmp_system_powerdown, |
d7f9b689 LC |
546 | }, |
547 | ||
2313086a BS |
548 | STEXI |
549 | @item system_powerdown | |
70fcbbe7 | 550 | @findex system_powerdown |
2313086a BS |
551 | |
552 | Power down the system (if supported). | |
553 | ETEXI | |
554 | ||
d7f9b689 LC |
555 | { |
556 | .name = "sum", | |
557 | .args_type = "start:i,size:i", | |
d7f9b689 LC |
558 | .params = "addr size", |
559 | .help = "compute the checksum of a memory region", | |
af4ce882 | 560 | .mhandler.cmd = do_sum, |
d7f9b689 LC |
561 | }, |
562 | ||
2313086a BS |
563 | STEXI |
564 | @item sum @var{addr} @var{size} | |
70fcbbe7 | 565 | @findex sum |
2313086a BS |
566 | |
567 | Compute the checksum of a memory region. | |
568 | ETEXI | |
569 | ||
d7f9b689 LC |
570 | { |
571 | .name = "usb_add", | |
572 | .args_type = "devname:s", | |
d7f9b689 LC |
573 | .params = "device", |
574 | .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')", | |
af4ce882 | 575 | .mhandler.cmd = do_usb_add, |
d7f9b689 LC |
576 | }, |
577 | ||
2313086a BS |
578 | STEXI |
579 | @item usb_add @var{devname} | |
70fcbbe7 | 580 | @findex usb_add |
2313086a BS |
581 | |
582 | Add the USB device @var{devname}. For details of available devices see | |
583 | @ref{usb_devices} | |
584 | ETEXI | |
585 | ||
d7f9b689 LC |
586 | { |
587 | .name = "usb_del", | |
588 | .args_type = "devname:s", | |
d7f9b689 LC |
589 | .params = "device", |
590 | .help = "remove USB device 'bus.addr'", | |
af4ce882 | 591 | .mhandler.cmd = do_usb_del, |
d7f9b689 LC |
592 | }, |
593 | ||
2313086a BS |
594 | STEXI |
595 | @item usb_del @var{devname} | |
70fcbbe7 | 596 | @findex usb_del |
2313086a BS |
597 | |
598 | Remove the USB device @var{devname} from the QEMU virtual USB | |
599 | hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor | |
600 | command @code{info usb} to see the devices you can remove. | |
601 | ETEXI | |
602 | ||
d7f9b689 LC |
603 | { |
604 | .name = "device_add", | |
c7e4e8ce MA |
605 | .args_type = "device:O", |
606 | .params = "driver[,prop=value][,...]", | |
d7f9b689 | 607 | .help = "add device, like -device on the command line", |
8bc27249 MA |
608 | .user_print = monitor_user_noop, |
609 | .mhandler.cmd_new = do_device_add, | |
d7f9b689 LC |
610 | }, |
611 | ||
3418bd25 GH |
612 | STEXI |
613 | @item device_add @var{config} | |
70fcbbe7 | 614 | @findex device_add |
3418bd25 GH |
615 | |
616 | Add device. | |
617 | ETEXI | |
618 | ||
d7f9b689 LC |
619 | { |
620 | .name = "device_del", | |
621 | .args_type = "id:s", | |
d7f9b689 LC |
622 | .params = "device", |
623 | .help = "remove device", | |
a15fef21 | 624 | .mhandler.cmd = hmp_device_del, |
d7f9b689 LC |
625 | }, |
626 | ||
3418bd25 GH |
627 | STEXI |
628 | @item device_del @var{id} | |
70fcbbe7 | 629 | @findex device_del |
3418bd25 GH |
630 | |
631 | Remove device @var{id}. | |
632 | ETEXI | |
633 | ||
d7f9b689 LC |
634 | { |
635 | .name = "cpu", | |
636 | .args_type = "index:i", | |
d7f9b689 LC |
637 | .params = "index", |
638 | .help = "set the default CPU", | |
755f1968 | 639 | .mhandler.cmd = hmp_cpu, |
d7f9b689 | 640 | }, |
3418bd25 | 641 | |
2313086a | 642 | STEXI |
c427ea9c MA |
643 | @item cpu @var{index} |
644 | @findex cpu | |
2313086a BS |
645 | Set the default CPU. |
646 | ETEXI | |
647 | ||
d7f9b689 LC |
648 | { |
649 | .name = "mouse_move", | |
650 | .args_type = "dx_str:s,dy_str:s,dz_str:s?", | |
d7f9b689 LC |
651 | .params = "dx dy [dz]", |
652 | .help = "send mouse move events", | |
af4ce882 | 653 | .mhandler.cmd = do_mouse_move, |
d7f9b689 LC |
654 | }, |
655 | ||
2313086a BS |
656 | STEXI |
657 | @item mouse_move @var{dx} @var{dy} [@var{dz}] | |
70fcbbe7 | 658 | @findex mouse_move |
2313086a BS |
659 | Move the active mouse to the specified coordinates @var{dx} @var{dy} |
660 | with optional scroll axis @var{dz}. | |
661 | ETEXI | |
662 | ||
d7f9b689 LC |
663 | { |
664 | .name = "mouse_button", | |
665 | .args_type = "button_state:i", | |
d7f9b689 LC |
666 | .params = "state", |
667 | .help = "change mouse button state (1=L, 2=M, 4=R)", | |
af4ce882 | 668 | .mhandler.cmd = do_mouse_button, |
d7f9b689 LC |
669 | }, |
670 | ||
2313086a BS |
671 | STEXI |
672 | @item mouse_button @var{val} | |
70fcbbe7 | 673 | @findex mouse_button |
2313086a BS |
674 | Change the active mouse button state @var{val} (1=L, 2=M, 4=R). |
675 | ETEXI | |
676 | ||
d7f9b689 LC |
677 | { |
678 | .name = "mouse_set", | |
679 | .args_type = "index:i", | |
d7f9b689 LC |
680 | .params = "index", |
681 | .help = "set which mouse device receives events", | |
af4ce882 | 682 | .mhandler.cmd = do_mouse_set, |
d7f9b689 LC |
683 | }, |
684 | ||
2313086a BS |
685 | STEXI |
686 | @item mouse_set @var{index} | |
70fcbbe7 | 687 | @findex mouse_set |
2313086a BS |
688 | Set which mouse device receives events at given @var{index}, index |
689 | can be obtained with | |
690 | @example | |
691 | info mice | |
692 | @end example | |
693 | ETEXI | |
694 | ||
695 | #ifdef HAS_AUDIO | |
d7f9b689 LC |
696 | { |
697 | .name = "wavcapture", | |
698 | .args_type = "path:F,freq:i?,bits:i?,nchannels:i?", | |
d7f9b689 LC |
699 | .params = "path [frequency [bits [channels]]]", |
700 | .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)", | |
af4ce882 | 701 | .mhandler.cmd = do_wav_capture, |
d7f9b689 | 702 | }, |
2313086a BS |
703 | #endif |
704 | STEXI | |
705 | @item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]] | |
70fcbbe7 | 706 | @findex wavcapture |
2313086a BS |
707 | Capture audio into @var{filename}. Using sample rate @var{frequency} |
708 | bits per sample @var{bits} and number of channels @var{channels}. | |
709 | ||
710 | Defaults: | |
711 | @itemize @minus | |
712 | @item Sample rate = 44100 Hz - CD quality | |
713 | @item Bits = 16 | |
714 | @item Number of channels = 2 - Stereo | |
715 | @end itemize | |
716 | ETEXI | |
717 | ||
718 | #ifdef HAS_AUDIO | |
d7f9b689 LC |
719 | { |
720 | .name = "stopcapture", | |
721 | .args_type = "n:i", | |
d7f9b689 LC |
722 | .params = "capture index", |
723 | .help = "stop capture", | |
af4ce882 | 724 | .mhandler.cmd = do_stop_capture, |
d7f9b689 | 725 | }, |
2313086a BS |
726 | #endif |
727 | STEXI | |
728 | @item stopcapture @var{index} | |
70fcbbe7 | 729 | @findex stopcapture |
2313086a BS |
730 | Stop capture with a given @var{index}, index can be obtained with |
731 | @example | |
732 | info capture | |
733 | @end example | |
734 | ETEXI | |
735 | ||
d7f9b689 LC |
736 | { |
737 | .name = "memsave", | |
738 | .args_type = "val:l,size:i,filename:s", | |
d7f9b689 LC |
739 | .params = "addr size file", |
740 | .help = "save to disk virtual memory dump starting at 'addr' of size 'size'", | |
0cfd6a9a | 741 | .mhandler.cmd = hmp_memsave, |
d7f9b689 LC |
742 | }, |
743 | ||
2313086a BS |
744 | STEXI |
745 | @item memsave @var{addr} @var{size} @var{file} | |
70fcbbe7 | 746 | @findex memsave |
2313086a BS |
747 | save to disk virtual memory dump starting at @var{addr} of size @var{size}. |
748 | ETEXI | |
749 | ||
d7f9b689 LC |
750 | { |
751 | .name = "pmemsave", | |
752 | .args_type = "val:l,size:i,filename:s", | |
d7f9b689 LC |
753 | .params = "addr size file", |
754 | .help = "save to disk physical memory dump starting at 'addr' of size 'size'", | |
6d3962bf | 755 | .mhandler.cmd = hmp_pmemsave, |
d7f9b689 LC |
756 | }, |
757 | ||
2313086a BS |
758 | STEXI |
759 | @item pmemsave @var{addr} @var{size} @var{file} | |
70fcbbe7 | 760 | @findex pmemsave |
2313086a BS |
761 | save to disk physical memory dump starting at @var{addr} of size @var{size}. |
762 | ETEXI | |
763 | ||
d7f9b689 LC |
764 | { |
765 | .name = "boot_set", | |
766 | .args_type = "bootdevice:s", | |
d7f9b689 LC |
767 | .params = "bootdevice", |
768 | .help = "define new values for the boot device list", | |
af4ce882 | 769 | .mhandler.cmd = do_boot_set, |
d7f9b689 LC |
770 | }, |
771 | ||
2313086a BS |
772 | STEXI |
773 | @item boot_set @var{bootdevicelist} | |
70fcbbe7 | 774 | @findex boot_set |
2313086a BS |
775 | |
776 | Define new values for the boot device list. Those values will override | |
777 | the values specified on the command line through the @code{-boot} option. | |
778 | ||
779 | The values that can be specified here depend on the machine type, but are | |
780 | the same that can be specified in the @code{-boot} command line option. | |
781 | ETEXI | |
782 | ||
783 | #if defined(TARGET_I386) | |
d7f9b689 LC |
784 | { |
785 | .name = "nmi", | |
e9b4b432 LC |
786 | .args_type = "", |
787 | .params = "", | |
788 | .help = "inject an NMI on all guest's CPUs", | |
ab49ab5c | 789 | .mhandler.cmd = hmp_inject_nmi, |
d7f9b689 | 790 | }, |
2313086a BS |
791 | #endif |
792 | STEXI | |
793 | @item nmi @var{cpu} | |
70fcbbe7 | 794 | @findex nmi |
2313086a BS |
795 | Inject an NMI on the given CPU (x86 only). |
796 | ETEXI | |
797 | ||
d7f9b689 LC |
798 | { |
799 | .name = "migrate", | |
fbc3d96c LS |
800 | .args_type = "detach:-d,blk:-b,inc:-i,uri:s", |
801 | .params = "[-d] [-b] [-i] uri", | |
802 | .help = "migrate to URI (using -d to not wait for completion)" | |
803 | "\n\t\t\t -b for migration without shared storage with" | |
804 | " full copy of disk\n\t\t\t -i for migration without " | |
805 | "shared storage with incremental copy of disk " | |
806 | "(base image shared between src and destination)", | |
e1c37d0e | 807 | .mhandler.cmd = hmp_migrate, |
d7f9b689 LC |
808 | }, |
809 | ||
fbc3d96c | 810 | |
2313086a | 811 | STEXI |
fbc3d96c | 812 | @item migrate [-d] [-b] [-i] @var{uri} |
70fcbbe7 | 813 | @findex migrate |
2313086a | 814 | Migrate to @var{uri} (using -d to not wait for completion). |
fbc3d96c LS |
815 | -b for migration with full copy of disk |
816 | -i for migration with incremental copy of disk (base image is shared) | |
2313086a BS |
817 | ETEXI |
818 | ||
d7f9b689 LC |
819 | { |
820 | .name = "migrate_cancel", | |
821 | .args_type = "", | |
d7f9b689 LC |
822 | .params = "", |
823 | .help = "cancel the current VM migration", | |
6cdedb07 | 824 | .mhandler.cmd = hmp_migrate_cancel, |
d7f9b689 LC |
825 | }, |
826 | ||
2313086a BS |
827 | STEXI |
828 | @item migrate_cancel | |
70fcbbe7 | 829 | @findex migrate_cancel |
2313086a | 830 | Cancel the current VM migration. |
9e1ba4cc OW |
831 | |
832 | ETEXI | |
833 | ||
834 | { | |
835 | .name = "migrate_set_cache_size", | |
836 | .args_type = "value:o", | |
837 | .params = "value", | |
838 | .help = "set cache size (in bytes) for XBZRLE migrations," | |
839 | "the cache size will be rounded down to the nearest " | |
840 | "power of 2.\n" | |
841 | "The cache size affects the number of cache misses." | |
842 | "In case of a high cache miss ratio you need to increase" | |
843 | " the cache size", | |
844 | .mhandler.cmd = hmp_migrate_set_cache_size, | |
845 | }, | |
846 | ||
847 | STEXI | |
848 | @item migrate_set_cache_size @var{value} | |
849 | @findex migrate_set_cache_size | |
850 | Set cache size to @var{value} (in bytes) for xbzrle migrations. | |
2313086a BS |
851 | ETEXI |
852 | ||
d7f9b689 LC |
853 | { |
854 | .name = "migrate_set_speed", | |
ed3d4a80 | 855 | .args_type = "value:o", |
d7f9b689 | 856 | .params = "value", |
ed3d4a80 JS |
857 | .help = "set maximum speed (in bytes) for migrations. " |
858 | "Defaults to MB if no size suffix is specified, ie. B/K/M/G/T", | |
3dc85383 | 859 | .mhandler.cmd = hmp_migrate_set_speed, |
d7f9b689 LC |
860 | }, |
861 | ||
2313086a BS |
862 | STEXI |
863 | @item migrate_set_speed @var{value} | |
70fcbbe7 | 864 | @findex migrate_set_speed |
2313086a | 865 | Set maximum speed to @var{value} (in bytes) for migrations. |
2ea42952 GC |
866 | ETEXI |
867 | ||
d7f9b689 LC |
868 | { |
869 | .name = "migrate_set_downtime", | |
b0fbf7d3 | 870 | .args_type = "value:T", |
d7f9b689 LC |
871 | .params = "value", |
872 | .help = "set maximum tolerated downtime (in seconds) for migrations", | |
4f0a993b | 873 | .mhandler.cmd = hmp_migrate_set_downtime, |
d7f9b689 | 874 | }, |
2ea42952 GC |
875 | |
876 | STEXI | |
877 | @item migrate_set_downtime @var{second} | |
70fcbbe7 | 878 | @findex migrate_set_downtime |
2ea42952 | 879 | Set maximum tolerated downtime (in seconds) for migration. |
00458433 OW |
880 | ETEXI |
881 | ||
882 | { | |
883 | .name = "migrate_set_capability", | |
884 | .args_type = "capability:s,state:b", | |
885 | .params = "capability state", | |
886 | .help = "Enable/Disable the usage of a capability for migration", | |
887 | .mhandler.cmd = hmp_migrate_set_capability, | |
888 | }, | |
889 | ||
890 | STEXI | |
891 | @item migrate_set_capability @var{capability} @var{state} | |
892 | @findex migrate_set_capability | |
893 | Enable/Disable the usage of a capability @var{capability} for migration. | |
f8882568 JS |
894 | ETEXI |
895 | ||
896 | { | |
2ea720db JS |
897 | .name = "client_migrate_info", |
898 | .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?", | |
899 | .params = "protocol hostname port tls-port cert-subject", | |
900 | .help = "send migration info to spice/vnc client", | |
901 | .user_print = monitor_user_noop, | |
edc5cb1a YH |
902 | .mhandler.cmd_async = client_migrate_info, |
903 | .flags = MONITOR_CMD_ASYNC, | |
f8882568 JS |
904 | }, |
905 | ||
e866e239 GH |
906 | STEXI |
907 | @item client_migrate_info @var{protocol} @var{hostname} @var{port} @var{tls-port} @var{cert-subject} | |
908 | @findex client_migrate_info | |
909 | Set the spice/vnc connection info for the migration target. The spice/vnc | |
910 | server will ask the spice/vnc client to automatically reconnect using the | |
911 | new parameters (if specified) once the vm migration finished successfully. | |
912 | ETEXI | |
913 | ||
783e9b48 WC |
914 | #if defined(CONFIG_HAVE_CORE_DUMP) |
915 | { | |
916 | .name = "dump-guest-memory", | |
917 | .args_type = "paging:-p,protocol:s,begin:i?,length:i?", | |
918 | .params = "[-p] protocol [begin] [length]", | |
919 | .help = "dump guest memory to file" | |
920 | "\n\t\t\t begin(optional): the starting physical address" | |
921 | "\n\t\t\t length(optional): the memory size, in bytes", | |
922 | .user_print = monitor_user_noop, | |
923 | .mhandler.cmd = hmp_dump_guest_memory, | |
924 | }, | |
925 | ||
926 | ||
927 | STEXI | |
928 | @item dump-guest-memory [-p] @var{protocol} @var{begin} @var{length} | |
929 | @findex dump-guest-memory | |
930 | Dump guest memory to @var{protocol}. The file can be processed with crash or | |
931 | gdb. | |
932 | protocol: destination file(started with "file:") or destination file | |
933 | descriptor (started with "fd:") | |
934 | paging: do paging to get guest's memory mapping | |
935 | begin: the starting physical address. It's optional, and should be | |
936 | specified with length together. | |
937 | length: the memory size, in bytes. It's optional, and should be specified | |
938 | with begin together. | |
939 | ETEXI | |
940 | #endif | |
941 | ||
e866e239 | 942 | { |
2ea720db | 943 | .name = "snapshot_blkdev", |
6cc2a415 PB |
944 | .args_type = "reuse:-n,device:B,snapshot-file:s?,format:s?", |
945 | .params = "[-n] device [new-image-file] [format]", | |
2ea720db JS |
946 | .help = "initiates a live snapshot\n\t\t\t" |
947 | "of device. If a new image file is specified, the\n\t\t\t" | |
948 | "new image file will become the new root image.\n\t\t\t" | |
949 | "If format is specified, the snapshot file will\n\t\t\t" | |
950 | "be created in that format. Otherwise the\n\t\t\t" | |
6cc2a415 PB |
951 | "snapshot will be internal! (currently unsupported).\n\t\t\t" |
952 | "The default format is qcow2. The -n flag requests QEMU\n\t\t\t" | |
953 | "to reuse the image found in new-image-file, instead of\n\t\t\t" | |
954 | "recreating it from scratch.", | |
6106e249 | 955 | .mhandler.cmd = hmp_snapshot_blkdev, |
e866e239 GH |
956 | }, |
957 | ||
f8882568 JS |
958 | STEXI |
959 | @item snapshot_blkdev | |
960 | @findex snapshot_blkdev | |
961 | Snapshot device, using snapshot file as target if provided | |
2313086a BS |
962 | ETEXI |
963 | ||
d7f9b689 LC |
964 | { |
965 | .name = "drive_add", | |
966 | .args_type = "pci_addr:s,opts:s", | |
d7f9b689 LC |
967 | .params = "[[<domain>:]<bus>:]<slot>\n" |
968 | "[file=file][,if=type][,bus=n]\n" | |
fb0490f6 | 969 | "[,unit=m][,media=d][,index=i]\n" |
d7f9b689 | 970 | "[,cyls=c,heads=h,secs=s[,trans=t]]\n" |
fb0490f6 SH |
971 | "[,snapshot=on|off][,cache=on|off]\n" |
972 | "[,readonly=on|off][,copy-on-read=on|off]", | |
d7f9b689 | 973 | .help = "add drive to PCI storage controller", |
af4ce882 | 974 | .mhandler.cmd = drive_hot_add, |
d7f9b689 | 975 | }, |
d7f9b689 | 976 | |
2313086a BS |
977 | STEXI |
978 | @item drive_add | |
70fcbbe7 | 979 | @findex drive_add |
2313086a BS |
980 | Add drive to PCI storage controller. |
981 | ETEXI | |
982 | ||
983 | #if defined(TARGET_I386) | |
d7f9b689 LC |
984 | { |
985 | .name = "pci_add", | |
986 | .args_type = "pci_addr:s,type:s,opts:s?", | |
d7f9b689 LC |
987 | .params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...", |
988 | .help = "hot-add PCI device", | |
6c6a58ae | 989 | .mhandler.cmd = pci_device_hot_add, |
d7f9b689 | 990 | }, |
2313086a | 991 | #endif |
d7f9b689 | 992 | |
2313086a BS |
993 | STEXI |
994 | @item pci_add | |
70fcbbe7 | 995 | @findex pci_add |
2313086a BS |
996 | Hot-add PCI device. |
997 | ETEXI | |
998 | ||
999 | #if defined(TARGET_I386) | |
d7f9b689 LC |
1000 | { |
1001 | .name = "pci_del", | |
1002 | .args_type = "pci_addr:s", | |
d7f9b689 LC |
1003 | .params = "[[<domain>:]<bus>:]<slot>", |
1004 | .help = "hot remove PCI device", | |
b752daf0 | 1005 | .mhandler.cmd = do_pci_device_hot_remove, |
d7f9b689 | 1006 | }, |
2313086a | 1007 | #endif |
d7f9b689 | 1008 | |
2313086a BS |
1009 | STEXI |
1010 | @item pci_del | |
70fcbbe7 | 1011 | @findex pci_del |
2313086a | 1012 | Hot remove PCI device. |
2ae63bda IY |
1013 | ETEXI |
1014 | ||
1015 | { | |
1016 | .name = "pcie_aer_inject_error", | |
1017 | .args_type = "advisory_non_fatal:-a,correctable:-c," | |
1018 | "id:s,error_status:s," | |
1019 | "header0:i?,header1:i?,header2:i?,header3:i?," | |
1020 | "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?", | |
1021 | .params = "[-a] [-c] id " | |
1022 | "<error_status> [<tlp header> [<tlp header prefix>]]", | |
1023 | .help = "inject pcie aer error\n\t\t\t" | |
1024 | " -a for advisory non fatal error\n\t\t\t" | |
1025 | " -c for correctable error\n\t\t\t" | |
1026 | "<id> = qdev device id\n\t\t\t" | |
1027 | "<error_status> = error string or 32bit\n\t\t\t" | |
1028 | "<tlb header> = 32bit x 4\n\t\t\t" | |
1029 | "<tlb header prefix> = 32bit x 4", | |
1030 | .user_print = pcie_aer_inject_error_print, | |
1f3392b7 | 1031 | .mhandler.cmd_new = do_pcie_aer_inject_error, |
2ae63bda IY |
1032 | }, |
1033 | ||
1034 | STEXI | |
1035 | @item pcie_aer_inject_error | |
1036 | @findex pcie_aer_inject_error | |
1037 | Inject PCIe AER error | |
2313086a BS |
1038 | ETEXI |
1039 | ||
d7f9b689 LC |
1040 | { |
1041 | .name = "host_net_add", | |
1042 | .args_type = "device:s,opts:s?", | |
d7f9b689 LC |
1043 | .params = "tap|user|socket|vde|dump [options]", |
1044 | .help = "add host VLAN client", | |
af4ce882 | 1045 | .mhandler.cmd = net_host_device_add, |
d7f9b689 LC |
1046 | }, |
1047 | ||
2313086a BS |
1048 | STEXI |
1049 | @item host_net_add | |
70fcbbe7 | 1050 | @findex host_net_add |
2313086a BS |
1051 | Add host VLAN client. |
1052 | ETEXI | |
1053 | ||
d7f9b689 LC |
1054 | { |
1055 | .name = "host_net_remove", | |
1056 | .args_type = "vlan_id:i,device:s", | |
d7f9b689 LC |
1057 | .params = "vlan_id name", |
1058 | .help = "remove host VLAN client", | |
af4ce882 | 1059 | .mhandler.cmd = net_host_device_remove, |
d7f9b689 LC |
1060 | }, |
1061 | ||
2313086a BS |
1062 | STEXI |
1063 | @item host_net_remove | |
70fcbbe7 | 1064 | @findex host_net_remove |
2313086a | 1065 | Remove host VLAN client. |
ae82d324 MA |
1066 | ETEXI |
1067 | ||
1068 | { | |
1069 | .name = "netdev_add", | |
1070 | .args_type = "netdev:O", | |
1071 | .params = "[user|tap|socket],id=str[,prop=value][,...]", | |
1072 | .help = "add host network device", | |
928059a3 | 1073 | .mhandler.cmd = hmp_netdev_add, |
ae82d324 MA |
1074 | }, |
1075 | ||
1076 | STEXI | |
1077 | @item netdev_add | |
1078 | @findex netdev_add | |
1079 | Add host network device. | |
1080 | ETEXI | |
1081 | ||
1082 | { | |
1083 | .name = "netdev_del", | |
1084 | .args_type = "id:s", | |
1085 | .params = "id", | |
1086 | .help = "remove host network device", | |
5f964155 | 1087 | .mhandler.cmd = hmp_netdev_del, |
ae82d324 MA |
1088 | }, |
1089 | ||
1090 | STEXI | |
1091 | @item netdev_del | |
1092 | @findex netdev_del | |
1093 | Remove host network device. | |
2313086a BS |
1094 | ETEXI |
1095 | ||
1096 | #ifdef CONFIG_SLIRP | |
d7f9b689 LC |
1097 | { |
1098 | .name = "hostfwd_add", | |
1099 | .args_type = "arg1:s,arg2:s?,arg3:s?", | |
d7f9b689 LC |
1100 | .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport", |
1101 | .help = "redirect TCP or UDP connections from host to guest (requires -net user)", | |
af4ce882 | 1102 | .mhandler.cmd = net_slirp_hostfwd_add, |
d7f9b689 | 1103 | }, |
21413d68 MA |
1104 | #endif |
1105 | STEXI | |
1106 | @item hostfwd_add | |
1107 | @findex hostfwd_add | |
1108 | Redirect TCP or UDP connections from host to guest (requires -net user). | |
1109 | ETEXI | |
d7f9b689 | 1110 | |
21413d68 | 1111 | #ifdef CONFIG_SLIRP |
d7f9b689 LC |
1112 | { |
1113 | .name = "hostfwd_remove", | |
1114 | .args_type = "arg1:s,arg2:s?,arg3:s?", | |
d7f9b689 LC |
1115 | .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport", |
1116 | .help = "remove host-to-guest TCP or UDP redirection", | |
af4ce882 | 1117 | .mhandler.cmd = net_slirp_hostfwd_remove, |
d7f9b689 LC |
1118 | }, |
1119 | ||
2313086a BS |
1120 | #endif |
1121 | STEXI | |
21413d68 MA |
1122 | @item hostfwd_remove |
1123 | @findex hostfwd_remove | |
1124 | Remove host-to-guest TCP or UDP redirection. | |
2313086a BS |
1125 | ETEXI |
1126 | ||
d7f9b689 LC |
1127 | { |
1128 | .name = "balloon", | |
3b0bd6ec | 1129 | .args_type = "value:M", |
d7f9b689 | 1130 | .params = "target", |
3c05613a | 1131 | .help = "request VM to change its memory allocation (in MB)", |
d72f3264 | 1132 | .mhandler.cmd = hmp_balloon, |
d7f9b689 LC |
1133 | }, |
1134 | ||
2313086a BS |
1135 | STEXI |
1136 | @item balloon @var{value} | |
70fcbbe7 | 1137 | @findex balloon |
2313086a BS |
1138 | Request VM to change its memory allocation to @var{value} (in MB). |
1139 | ETEXI | |
1140 | ||
d7f9b689 LC |
1141 | { |
1142 | .name = "set_link", | |
c9b26a4c MA |
1143 | .args_type = "name:s,up:b", |
1144 | .params = "name on|off", | |
d7f9b689 | 1145 | .help = "change the link status of a network adapter", |
4b37156c | 1146 | .mhandler.cmd = hmp_set_link, |
d7f9b689 LC |
1147 | }, |
1148 | ||
2313086a | 1149 | STEXI |
c9b26a4c | 1150 | @item set_link @var{name} [on|off] |
70fcbbe7 | 1151 | @findex set_link |
c9b26a4c | 1152 | Switch link @var{name} on (i.e. up) or off (i.e. down). |
2313086a BS |
1153 | ETEXI |
1154 | ||
d7f9b689 LC |
1155 | { |
1156 | .name = "watchdog_action", | |
1157 | .args_type = "action:s", | |
d7f9b689 LC |
1158 | .params = "[reset|shutdown|poweroff|pause|debug|none]", |
1159 | .help = "change watchdog action", | |
af4ce882 | 1160 | .mhandler.cmd = do_watchdog_action, |
d7f9b689 LC |
1161 | }, |
1162 | ||
2313086a BS |
1163 | STEXI |
1164 | @item watchdog_action | |
70fcbbe7 | 1165 | @findex watchdog_action |
2313086a BS |
1166 | Change watchdog action. |
1167 | ETEXI | |
1168 | ||
d7f9b689 LC |
1169 | { |
1170 | .name = "acl_show", | |
1171 | .args_type = "aclname:s", | |
d7f9b689 LC |
1172 | .params = "aclname", |
1173 | .help = "list rules in the access control list", | |
af4ce882 | 1174 | .mhandler.cmd = do_acl_show, |
d7f9b689 LC |
1175 | }, |
1176 | ||
2313086a | 1177 | STEXI |
15dfcd45 | 1178 | @item acl_show @var{aclname} |
70fcbbe7 | 1179 | @findex acl_show |
15dfcd45 JK |
1180 | List all the matching rules in the access control list, and the default |
1181 | policy. There are currently two named access control lists, | |
1182 | @var{vnc.x509dname} and @var{vnc.username} matching on the x509 client | |
1183 | certificate distinguished name, and SASL username respectively. | |
1184 | ETEXI | |
2313086a | 1185 | |
d7f9b689 LC |
1186 | { |
1187 | .name = "acl_policy", | |
1188 | .args_type = "aclname:s,policy:s", | |
d7f9b689 LC |
1189 | .params = "aclname allow|deny", |
1190 | .help = "set default access control list policy", | |
af4ce882 | 1191 | .mhandler.cmd = do_acl_policy, |
d7f9b689 LC |
1192 | }, |
1193 | ||
15dfcd45 | 1194 | STEXI |
cbbfacc6 | 1195 | @item acl_policy @var{aclname} @code{allow|deny} |
70fcbbe7 | 1196 | @findex acl_policy |
15dfcd45 | 1197 | Set the default access control list policy, used in the event that |
2313086a | 1198 | none of the explicit rules match. The default policy at startup is |
15dfcd45 JK |
1199 | always @code{deny}. |
1200 | ETEXI | |
1201 | ||
d7f9b689 LC |
1202 | { |
1203 | .name = "acl_add", | |
1204 | .args_type = "aclname:s,match:s,policy:s,index:i?", | |
d7f9b689 LC |
1205 | .params = "aclname match allow|deny [index]", |
1206 | .help = "add a match rule to the access control list", | |
af4ce882 | 1207 | .mhandler.cmd = do_acl_add, |
d7f9b689 LC |
1208 | }, |
1209 | ||
15dfcd45 | 1210 | STEXI |
0e4aec98 MA |
1211 | @item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}] |
1212 | @findex acl_add | |
15dfcd45 JK |
1213 | Add a match rule to the access control list, allowing or denying access. |
1214 | The match will normally be an exact username or x509 distinguished name, | |
1215 | but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to | |
1216 | allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will | |
2313086a | 1217 | normally be appended to the end of the ACL, but can be inserted |
15dfcd45 JK |
1218 | earlier in the list if the optional @var{index} parameter is supplied. |
1219 | ETEXI | |
1220 | ||
d7f9b689 LC |
1221 | { |
1222 | .name = "acl_remove", | |
1223 | .args_type = "aclname:s,match:s", | |
d7f9b689 LC |
1224 | .params = "aclname match", |
1225 | .help = "remove a match rule from the access control list", | |
af4ce882 | 1226 | .mhandler.cmd = do_acl_remove, |
d7f9b689 LC |
1227 | }, |
1228 | ||
15dfcd45 JK |
1229 | STEXI |
1230 | @item acl_remove @var{aclname} @var{match} | |
70fcbbe7 | 1231 | @findex acl_remove |
15dfcd45 JK |
1232 | Remove the specified match rule from the access control list. |
1233 | ETEXI | |
1234 | ||
d7f9b689 LC |
1235 | { |
1236 | .name = "acl_reset", | |
1237 | .args_type = "aclname:s", | |
d7f9b689 LC |
1238 | .params = "aclname", |
1239 | .help = "reset the access control list", | |
af4ce882 | 1240 | .mhandler.cmd = do_acl_reset, |
d7f9b689 LC |
1241 | }, |
1242 | ||
15dfcd45 | 1243 | STEXI |
0e4aec98 MA |
1244 | @item acl_reset @var{aclname} |
1245 | @findex acl_reset | |
15dfcd45 | 1246 | Remove all matches from the access control list, and set the default |
2313086a | 1247 | policy back to @code{deny}. |
2313086a BS |
1248 | ETEXI |
1249 | ||
79c4f6b0 | 1250 | #if defined(TARGET_I386) |
d7f9b689 LC |
1251 | |
1252 | { | |
1253 | .name = "mce", | |
31ce5e0c JD |
1254 | .args_type = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l", |
1255 | .params = "[-b] cpu bank status mcgstatus addr misc", | |
1256 | .help = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]", | |
af4ce882 | 1257 | .mhandler.cmd = do_inject_mce, |
d7f9b689 LC |
1258 | }, |
1259 | ||
79c4f6b0 HY |
1260 | #endif |
1261 | STEXI | |
1262 | @item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc} | |
70fcbbe7 | 1263 | @findex mce (x86) |
79c4f6b0 | 1264 | Inject an MCE on the given CPU (x86 only). |
f07918fd MM |
1265 | ETEXI |
1266 | ||
d7f9b689 LC |
1267 | { |
1268 | .name = "getfd", | |
1269 | .args_type = "fdname:s", | |
d7f9b689 LC |
1270 | .params = "getfd name", |
1271 | .help = "receive a file descriptor via SCM rights and assign it a name", | |
208c9d1b | 1272 | .mhandler.cmd = hmp_getfd, |
d7f9b689 LC |
1273 | }, |
1274 | ||
f07918fd MM |
1275 | STEXI |
1276 | @item getfd @var{fdname} | |
70fcbbe7 | 1277 | @findex getfd |
f07918fd MM |
1278 | If a file descriptor is passed alongside this command using the SCM_RIGHTS |
1279 | mechanism on unix sockets, it is stored using the name @var{fdname} for | |
1280 | later use by other monitor commands. | |
1281 | ETEXI | |
1282 | ||
d7f9b689 LC |
1283 | { |
1284 | .name = "closefd", | |
1285 | .args_type = "fdname:s", | |
d7f9b689 LC |
1286 | .params = "closefd name", |
1287 | .help = "close a file descriptor previously passed via SCM rights", | |
208c9d1b | 1288 | .mhandler.cmd = hmp_closefd, |
d7f9b689 LC |
1289 | }, |
1290 | ||
f07918fd MM |
1291 | STEXI |
1292 | @item closefd @var{fdname} | |
70fcbbe7 | 1293 | @findex closefd |
f07918fd MM |
1294 | Close the file descriptor previously assigned to @var{fdname} using the |
1295 | @code{getfd} command. This is only needed if the file descriptor was never | |
1296 | used by another monitor command. | |
a3a55a2e LC |
1297 | ETEXI |
1298 | ||
1299 | { | |
1300 | .name = "block_passwd", | |
1301 | .args_type = "device:B,password:s", | |
1302 | .params = "block_passwd device password", | |
1303 | .help = "set the password of encrypted block devices", | |
a4dea8a9 | 1304 | .mhandler.cmd = hmp_block_passwd, |
a3a55a2e LC |
1305 | }, |
1306 | ||
727f005e ZYW |
1307 | STEXI |
1308 | @item block_set_io_throttle @var{device} @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr} | |
1309 | @findex block_set_io_throttle | |
1310 | Change I/O throttle limits for a block drive to @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr} | |
1311 | ETEXI | |
1312 | ||
1313 | { | |
1314 | .name = "block_set_io_throttle", | |
1315 | .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l", | |
1316 | .params = "device bps bps_rd bps_wr iops iops_rd iops_wr", | |
1317 | .help = "change I/O throttle limits for a block drive", | |
80047da5 | 1318 | .mhandler.cmd = hmp_block_set_io_throttle, |
727f005e ZYW |
1319 | }, |
1320 | ||
a3a55a2e LC |
1321 | STEXI |
1322 | @item block_passwd @var{device} @var{password} | |
70fcbbe7 | 1323 | @findex block_passwd |
a3a55a2e | 1324 | Set the encrypted device @var{device} password to @var{password} |
7572150c GH |
1325 | ETEXI |
1326 | ||
1327 | { | |
1328 | .name = "set_password", | |
1329 | .args_type = "protocol:s,password:s,connected:s?", | |
1330 | .params = "protocol password action-if-connected", | |
1331 | .help = "set spice/vnc password", | |
fbf796fd | 1332 | .mhandler.cmd = hmp_set_password, |
7572150c GH |
1333 | }, |
1334 | ||
1335 | STEXI | |
1336 | @item set_password [ vnc | spice ] password [ action-if-connected ] | |
1337 | @findex set_password | |
1338 | ||
1339 | Change spice/vnc password. Use zero to make the password stay valid | |
1340 | forever. @var{action-if-connected} specifies what should happen in | |
1341 | case a connection is established: @var{fail} makes the password change | |
1342 | fail. @var{disconnect} changes the password and disconnects the | |
1343 | client. @var{keep} changes the password and keeps the connection up. | |
1344 | @var{keep} is the default. | |
1345 | ETEXI | |
1346 | ||
1347 | { | |
1348 | .name = "expire_password", | |
1349 | .args_type = "protocol:s,time:s", | |
1350 | .params = "protocol time", | |
1351 | .help = "set spice/vnc password expire-time", | |
9ad5372d | 1352 | .mhandler.cmd = hmp_expire_password, |
7572150c GH |
1353 | }, |
1354 | ||
1355 | STEXI | |
1356 | @item expire_password [ vnc | spice ] expire-time | |
1357 | @findex expire_password | |
1358 | ||
1359 | Specify when a password for spice/vnc becomes | |
1360 | invalid. @var{expire-time} accepts: | |
1361 | ||
1362 | @table @var | |
1363 | @item now | |
1364 | Invalidate password instantly. | |
1365 | ||
1366 | @item never | |
1367 | Password stays valid forever. | |
1368 | ||
1369 | @item +nsec | |
1370 | Password stays valid for @var{nsec} seconds starting now. | |
1371 | ||
1372 | @item nsec | |
1373 | Password is invalidated at the given time. @var{nsec} are the seconds | |
1374 | passed since 1970, i.e. unix epoch. | |
1375 | ||
1376 | @end table | |
4a7e1190 | 1377 | ETEXI |
b40292e7 | 1378 | |
33572ece JK |
1379 | { |
1380 | .name = "info", | |
1381 | .args_type = "item:s?", | |
1382 | .params = "[subcommand]", | |
1383 | .help = "show various information about the system state", | |
1162daa6 | 1384 | .mhandler.cmd = do_info, |
33572ece JK |
1385 | }, |
1386 | ||
1387 | STEXI | |
1388 | @item info @var{subcommand} | |
1389 | @findex info | |
1390 | Show various information about the system state. | |
1391 | ||
1392 | @table @option | |
1393 | @item info version | |
1394 | show the version of QEMU | |
33572ece JK |
1395 | @item info network |
1396 | show the various VLANs and the associated devices | |
1397 | @item info chardev | |
1398 | show the character devices | |
1399 | @item info block | |
1400 | show the block devices | |
1401 | @item info blockstats | |
1402 | show block device statistics | |
1403 | @item info registers | |
1404 | show the cpu registers | |
1405 | @item info cpus | |
1406 | show infos for each CPU | |
1407 | @item info history | |
1408 | show the command line history | |
1409 | @item info irq | |
1410 | show the interrupts statistics (if available) | |
1411 | @item info pic | |
1412 | show i8259 (PIC) state | |
1413 | @item info pci | |
1414 | show emulated PCI device info | |
1415 | @item info tlb | |
692f737c | 1416 | show virtual to physical memory mappings (i386, SH4, SPARC, PPC, and Xtensa only) |
33572ece JK |
1417 | @item info mem |
1418 | show the active virtual memory mappings (i386 only) | |
33572ece JK |
1419 | @item info jit |
1420 | show dynamic compiler info | |
33572ece JK |
1421 | @item info numa |
1422 | show NUMA information | |
b40292e7 JK |
1423 | @item info kvm |
1424 | show KVM information | |
33572ece JK |
1425 | @item info usb |
1426 | show USB devices plugged on the virtual USB hub | |
1427 | @item info usbhost | |
1428 | show all USB host devices | |
1429 | @item info profile | |
1430 | show profiling information | |
1431 | @item info capture | |
1432 | show information about active capturing | |
1433 | @item info snapshots | |
1434 | show list of VM snapshots | |
1435 | @item info status | |
1436 | show the current VM status (running|paused) | |
1437 | @item info pcmcia | |
1438 | show guest PCMCIA status | |
1439 | @item info mice | |
1440 | show which guest mouse is receiving events | |
1441 | @item info vnc | |
1442 | show the vnc server status | |
1443 | @item info name | |
1444 | show the current VM name | |
1445 | @item info uuid | |
1446 | show the current VM UUID | |
1447 | @item info cpustats | |
1448 | show CPU statistics | |
1449 | @item info usernet | |
1450 | show user network stack connection states | |
1451 | @item info migrate | |
1452 | show migration status | |
bbf6da32 OW |
1453 | @item info migrate_capabilities |
1454 | show current migration capabilities | |
9e1ba4cc OW |
1455 | @item info migrate_cache_size |
1456 | show current migration XBZRLE cache size | |
33572ece JK |
1457 | @item info balloon |
1458 | show balloon information | |
1459 | @item info qtree | |
1460 | show device tree | |
1461 | @item info qdm | |
1462 | show qdev device model list | |
1463 | @item info roms | |
1464 | show roms | |
1465 | @end table | |
1466 | ETEXI | |
1467 | ||
6d8a764e | 1468 | #ifdef CONFIG_TRACE_SIMPLE |
22890ab5 PS |
1469 | STEXI |
1470 | @item info trace | |
1471 | show contents of trace buffer | |
31965ae2 LV |
1472 | ETEXI |
1473 | #endif | |
1474 | ||
1475 | STEXI | |
22890ab5 PS |
1476 | @item info trace-events |
1477 | show available trace events and their state | |
1478 | ETEXI | |
22890ab5 | 1479 | |
2313086a BS |
1480 | STEXI |
1481 | @end table | |
1482 | ETEXI |