blob: b8c765b7b0d5195d135f1d8d8cb4674bb4501e85 [file] [log] [blame]
Blue Swirl23130862009-06-06 08:22:04 +00001HXCOMM Use DEFHEADING() to define headings in both help text and texi
2HXCOMM Text between STEXI and ETEXI are copied to texi version and
3HXCOMM discarded from C version
4HXCOMM DEF(command, args, callback, arg_string, help) is used to construct
5HXCOMM monitor commands
6HXCOMM HXCOMM can be used for comments, discarded from both texi and C
7
8STEXI
9@table @option
10ETEXI
11
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030012 {
13 .name = "help|?",
14 .args_type = "name:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030015 .params = "[cmd]",
16 .help = "show the help",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -030017 .mhandler.cmd = do_help_cmd,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030018 },
19
Blue Swirl23130862009-06-06 08:22:04 +000020STEXI
21@item help or ? [@var{cmd}]
Stefan Weil70fcbbe2010-02-05 23:52:04 +010022@findex help
Blue Swirl23130862009-06-06 08:22:04 +000023Show the help for all commands or just for command @var{cmd}.
24ETEXI
25
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030026 {
27 .name = "commit",
28 .args_type = "device:B",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030029 .params = "device|all",
30 .help = "commit changes to the disk images (if -snapshot is used) or backing files",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -030031 .mhandler.cmd = do_commit,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030032 },
33
Blue Swirl23130862009-06-06 08:22:04 +000034STEXI
35@item commit
Stefan Weil70fcbbe2010-02-05 23:52:04 +010036@findex commit
Blue Swirl23130862009-06-06 08:22:04 +000037Commit changes to the disk images (if -snapshot is used) or backing files.
38ETEXI
39
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030040 {
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030041 .name = "q|quit",
42 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030043 .params = "",
44 .help = "quit the emulator",
Luiz Capitulinob223f352009-10-07 13:41:56 -030045 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -020046 .mhandler.cmd_new = do_quit,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030047 },
48
Blue Swirl23130862009-06-06 08:22:04 +000049STEXI
50@item q or quit
Stefan Weil70fcbbe2010-02-05 23:52:04 +010051@findex quit
Blue Swirl23130862009-06-06 08:22:04 +000052Quit the emulator.
53ETEXI
54
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030055 {
56 .name = "eject",
Luiz Capitulino78d714e2009-12-14 18:53:21 -020057 .args_type = "force:-f,device:B",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030058 .params = "[-f] device",
59 .help = "eject a removable medium (use -f to force it)",
Luiz Capitulinoe1c923a2009-10-16 12:23:49 -030060 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -020061 .mhandler.cmd_new = do_eject,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030062 },
63
Blue Swirl23130862009-06-06 08:22:04 +000064STEXI
65@item eject [-f] @var{device}
Stefan Weil70fcbbe2010-02-05 23:52:04 +010066@findex eject
Blue Swirl23130862009-06-06 08:22:04 +000067Eject a removable medium (use -f to force it).
68ETEXI
69
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030070 {
71 .name = "change",
72 .args_type = "device:B,target:F,arg:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030073 .params = "device filename [format]",
74 .help = "change a removable medium, optional format",
Markus Armbrusterec3b82a2009-12-07 21:37:09 +010075 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -020076 .mhandler.cmd_new = do_change,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030077 },
78
Blue Swirl23130862009-06-06 08:22:04 +000079STEXI
80@item change @var{device} @var{setting}
Stefan Weil70fcbbe2010-02-05 23:52:04 +010081@findex change
Blue Swirl23130862009-06-06 08:22:04 +000082
83Change the configuration of a device.
84
85@table @option
86@item change @var{diskdevice} @var{filename} [@var{format}]
87Change the medium for a removable disk device to point to @var{filename}. eg
88
89@example
90(qemu) change ide1-cd0 /path/to/some.iso
91@end example
92
93@var{format} is optional.
94
95@item change vnc @var{display},@var{options}
96Change the configuration of the VNC server. The valid syntax for @var{display}
97and @var{options} are described at @ref{sec_invocation}. eg
98
99@example
100(qemu) change vnc localhost:1
101@end example
102
103@item change vnc password [@var{password}]
104
105Change the password associated with the VNC server. If the new password is not
106supplied, the monitor will prompt for it to be entered. VNC passwords are only
107significant up to 8 letters. eg
108
109@example
110(qemu) change vnc password
111Password: ********
112@end example
113
114@end table
115ETEXI
116
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300117 {
118 .name = "screendump",
119 .args_type = "filename:F",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300120 .params = "filename",
121 .help = "save screen into PPM image 'filename'",
Luiz Capitulinof1dc58e2010-03-31 15:21:49 -0300122 .user_print = monitor_user_noop,
123 .mhandler.cmd_new = do_screen_dump,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300124 },
125
Blue Swirl23130862009-06-06 08:22:04 +0000126STEXI
127@item screendump @var{filename}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100128@findex screendump
Blue Swirl23130862009-06-06 08:22:04 +0000129Save screen into PPM image @var{filename}.
130ETEXI
131
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300132 {
133 .name = "logfile",
134 .args_type = "filename:F",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300135 .params = "filename",
136 .help = "output logs to 'filename'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300137 .mhandler.cmd = do_logfile,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300138 },
139
Blue Swirl23130862009-06-06 08:22:04 +0000140STEXI
141@item logfile @var{filename}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100142@findex logfile
Blue Swirl23130862009-06-06 08:22:04 +0000143Output logs to @var{filename}.
144ETEXI
145
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300146 {
147 .name = "log",
148 .args_type = "items:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300149 .params = "item1[,...]",
150 .help = "activate logging of the specified items to '/tmp/qemu.log'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300151 .mhandler.cmd = do_log,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300152 },
153
Blue Swirl23130862009-06-06 08:22:04 +0000154STEXI
155@item log @var{item1}[,...]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100156@findex log
Blue Swirl23130862009-06-06 08:22:04 +0000157Activate logging of the specified items to @file{/tmp/qemu.log}.
158ETEXI
159
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300160 {
161 .name = "savevm",
162 .args_type = "name:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300163 .params = "[tag|id]",
164 .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300165 .mhandler.cmd = do_savevm,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300166 },
167
Blue Swirl23130862009-06-06 08:22:04 +0000168STEXI
169@item savevm [@var{tag}|@var{id}]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100170@findex savevm
Blue Swirl23130862009-06-06 08:22:04 +0000171Create a snapshot of the whole virtual machine. If @var{tag} is
172provided, it is used as human readable identifier. If there is already
173a snapshot with the same tag or ID, it is replaced. More info at
174@ref{vm_snapshots}.
175ETEXI
176
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300177 {
178 .name = "loadvm",
179 .args_type = "name:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300180 .params = "tag|id",
181 .help = "restore a VM snapshot from its tag or id",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300182 .mhandler.cmd = do_loadvm,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300183 },
184
Blue Swirl23130862009-06-06 08:22:04 +0000185STEXI
186@item loadvm @var{tag}|@var{id}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100187@findex loadvm
Blue Swirl23130862009-06-06 08:22:04 +0000188Set the whole virtual machine to the snapshot identified by the tag
189@var{tag} or the unique snapshot ID @var{id}.
190ETEXI
191
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300192 {
193 .name = "delvm",
194 .args_type = "name:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300195 .params = "tag|id",
196 .help = "delete a VM snapshot from its tag or id",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300197 .mhandler.cmd = do_delvm,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300198 },
199
Blue Swirl23130862009-06-06 08:22:04 +0000200STEXI
201@item delvm @var{tag}|@var{id}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100202@findex delvm
Blue Swirl23130862009-06-06 08:22:04 +0000203Delete the snapshot identified by @var{tag} or @var{id}.
204ETEXI
205
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300206 {
207 .name = "singlestep",
208 .args_type = "option:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300209 .params = "[on|off]",
210 .help = "run emulation in singlestep mode or switch to normal mode",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300211 .mhandler.cmd = do_singlestep,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300212 },
213
Blue Swirl23130862009-06-06 08:22:04 +0000214STEXI
215@item singlestep [off]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100216@findex singlestep
Blue Swirl23130862009-06-06 08:22:04 +0000217Run the emulation in single step mode.
218If called with option off, the emulation returns to normal mode.
219ETEXI
220
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300221 {
222 .name = "stop",
223 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300224 .params = "",
225 .help = "stop emulation",
Luiz Capitulinoe0c97bd2009-10-07 13:41:57 -0300226 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200227 .mhandler.cmd_new = do_stop,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300228 },
229
Blue Swirl23130862009-06-06 08:22:04 +0000230STEXI
231@item stop
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100232@findex stop
Blue Swirl23130862009-06-06 08:22:04 +0000233Stop emulation.
234ETEXI
235
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300236 {
237 .name = "c|cont",
238 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300239 .params = "",
240 .help = "resume emulation",
Luiz Capitulinoa1f896a2009-10-07 13:42:00 -0300241 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200242 .mhandler.cmd_new = do_cont,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300243 },
244
Blue Swirl23130862009-06-06 08:22:04 +0000245STEXI
246@item c or cont
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100247@findex cont
Blue Swirl23130862009-06-06 08:22:04 +0000248Resume emulation.
249ETEXI
250
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300251 {
252 .name = "gdbserver",
253 .args_type = "device:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300254 .params = "[device]",
255 .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300256 .mhandler.cmd = do_gdbserver,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300257 },
258
Blue Swirl23130862009-06-06 08:22:04 +0000259STEXI
260@item gdbserver [@var{port}]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100261@findex gdbserver
Blue Swirl23130862009-06-06 08:22:04 +0000262Start gdbserver session (default @var{port}=1234)
263ETEXI
264
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300265 {
266 .name = "x",
267 .args_type = "fmt:/,addr:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300268 .params = "/fmt addr",
269 .help = "virtual memory dump starting at 'addr'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300270 .mhandler.cmd = do_memory_dump,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300271 },
272
Blue Swirl23130862009-06-06 08:22:04 +0000273STEXI
274@item x/fmt @var{addr}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100275@findex x
Blue Swirl23130862009-06-06 08:22:04 +0000276Virtual memory dump starting at @var{addr}.
277ETEXI
278
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300279 {
280 .name = "xp",
281 .args_type = "fmt:/,addr:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300282 .params = "/fmt addr",
283 .help = "physical memory dump starting at 'addr'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300284 .mhandler.cmd = do_physical_memory_dump,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300285 },
286
Blue Swirl23130862009-06-06 08:22:04 +0000287STEXI
288@item xp /@var{fmt} @var{addr}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100289@findex xp
Blue Swirl23130862009-06-06 08:22:04 +0000290Physical memory dump starting at @var{addr}.
291
292@var{fmt} is a format which tells the command how to format the
293data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
294
295@table @var
296@item count
297is the number of items to be dumped.
298
299@item format
300can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
301c (char) or i (asm instruction).
302
303@item size
304can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
305@code{h} or @code{w} can be specified with the @code{i} format to
306respectively select 16 or 32 bit code instruction size.
307
308@end table
309
310Examples:
311@itemize
312@item
313Dump 10 instructions at the current instruction pointer:
314@example
315(qemu) x/10i $eip
3160x90107063: ret
3170x90107064: sti
3180x90107065: lea 0x0(%esi,1),%esi
3190x90107069: lea 0x0(%edi,1),%edi
3200x90107070: ret
3210x90107071: jmp 0x90107080
3220x90107073: nop
3230x90107074: nop
3240x90107075: nop
3250x90107076: nop
326@end example
327
328@item
329Dump 80 16 bit values at the start of the video memory.
330@smallexample
331(qemu) xp/80hx 0xb8000
3320x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
3330x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
3340x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
3350x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
3360x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
3370x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
3380x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
3390x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
3400x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
3410x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
342@end smallexample
343@end itemize
344ETEXI
345
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300346 {
347 .name = "p|print",
348 .args_type = "fmt:/,val:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300349 .params = "/fmt expr",
350 .help = "print expression value (use $reg for CPU register access)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300351 .mhandler.cmd = do_print,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300352 },
353
Blue Swirl23130862009-06-06 08:22:04 +0000354STEXI
355@item p or print/@var{fmt} @var{expr}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100356@findex print
Blue Swirl23130862009-06-06 08:22:04 +0000357
358Print expression value. Only the @var{format} part of @var{fmt} is
359used.
360ETEXI
361
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300362 {
363 .name = "i",
364 .args_type = "fmt:/,addr:i,index:i.",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300365 .params = "/fmt addr",
366 .help = "I/O port read",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300367 .mhandler.cmd = do_ioport_read,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300368 },
369
Blue Swirl23130862009-06-06 08:22:04 +0000370STEXI
371Read I/O port.
372ETEXI
373
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300374 {
375 .name = "o",
376 .args_type = "fmt:/,addr:i,val:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300377 .params = "/fmt addr value",
378 .help = "I/O port write",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300379 .mhandler.cmd = do_ioport_write,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300380 },
381
Jan Kiszkaf1147842009-07-14 10:20:11 +0200382STEXI
383Write to I/O port.
384ETEXI
Blue Swirl23130862009-06-06 08:22:04 +0000385
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300386 {
387 .name = "sendkey",
388 .args_type = "string:s,hold_time:i?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300389 .params = "keys [hold_ms]",
390 .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300391 .mhandler.cmd = do_sendkey,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300392 },
393
Blue Swirl23130862009-06-06 08:22:04 +0000394STEXI
395@item sendkey @var{keys}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100396@findex sendkey
Blue Swirl23130862009-06-06 08:22:04 +0000397
398Send @var{keys} to the emulator. @var{keys} could be the name of the
399key or @code{#} followed by the raw value in either decimal or hexadecimal
400format. Use @code{-} to press several keys simultaneously. Example:
401@example
402sendkey ctrl-alt-f1
403@end example
404
405This command is useful to send keys that your graphical user interface
406intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
407ETEXI
408
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300409 {
410 .name = "system_reset",
411 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300412 .params = "",
413 .help = "reset the system",
Luiz Capitulinoc80d2592009-10-07 13:41:58 -0300414 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200415 .mhandler.cmd_new = do_system_reset,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300416 },
417
Blue Swirl23130862009-06-06 08:22:04 +0000418STEXI
419@item system_reset
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100420@findex system_reset
Blue Swirl23130862009-06-06 08:22:04 +0000421
422Reset the system.
423ETEXI
424
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300425 {
426 .name = "system_powerdown",
427 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300428 .params = "",
429 .help = "send system power down event",
Luiz Capitulino43076662009-10-07 13:41:59 -0300430 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200431 .mhandler.cmd_new = do_system_powerdown,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300432 },
433
Blue Swirl23130862009-06-06 08:22:04 +0000434STEXI
435@item system_powerdown
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100436@findex system_powerdown
Blue Swirl23130862009-06-06 08:22:04 +0000437
438Power down the system (if supported).
439ETEXI
440
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300441 {
442 .name = "sum",
443 .args_type = "start:i,size:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300444 .params = "addr size",
445 .help = "compute the checksum of a memory region",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300446 .mhandler.cmd = do_sum,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300447 },
448
Blue Swirl23130862009-06-06 08:22:04 +0000449STEXI
450@item sum @var{addr} @var{size}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100451@findex sum
Blue Swirl23130862009-06-06 08:22:04 +0000452
453Compute the checksum of a memory region.
454ETEXI
455
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300456 {
457 .name = "usb_add",
458 .args_type = "devname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300459 .params = "device",
460 .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300461 .mhandler.cmd = do_usb_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300462 },
463
Blue Swirl23130862009-06-06 08:22:04 +0000464STEXI
465@item usb_add @var{devname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100466@findex usb_add
Blue Swirl23130862009-06-06 08:22:04 +0000467
468Add the USB device @var{devname}. For details of available devices see
469@ref{usb_devices}
470ETEXI
471
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300472 {
473 .name = "usb_del",
474 .args_type = "devname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300475 .params = "device",
476 .help = "remove USB device 'bus.addr'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300477 .mhandler.cmd = do_usb_del,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300478 },
479
Blue Swirl23130862009-06-06 08:22:04 +0000480STEXI
481@item usb_del @var{devname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100482@findex usb_del
Blue Swirl23130862009-06-06 08:22:04 +0000483
484Remove the USB device @var{devname} from the QEMU virtual USB
485hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
486command @code{info usb} to see the devices you can remove.
487ETEXI
488
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300489 {
490 .name = "device_add",
Markus Armbrusterc7e4e8c2010-02-10 20:47:28 +0100491 .args_type = "device:O",
492 .params = "driver[,prop=value][,...]",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300493 .help = "add device, like -device on the command line",
Markus Armbruster8bc27242010-02-10 20:52:01 +0100494 .user_print = monitor_user_noop,
495 .mhandler.cmd_new = do_device_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300496 },
497
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200498STEXI
499@item device_add @var{config}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100500@findex device_add
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200501
502Add device.
503ETEXI
504
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300505 {
506 .name = "device_del",
507 .args_type = "id:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300508 .params = "device",
509 .help = "remove device",
Markus Armbruster17a38ea2010-03-22 11:38:14 +0100510 .user_print = monitor_user_noop,
511 .mhandler.cmd_new = do_device_del,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300512 },
513
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200514STEXI
515@item device_del @var{id}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100516@findex device_del
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200517
518Remove device @var{id}.
519ETEXI
520
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300521 {
522 .name = "cpu",
523 .args_type = "index:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300524 .params = "index",
525 .help = "set the default CPU",
Markus Armbruster81a1b452010-01-20 13:07:35 +0100526 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200527 .mhandler.cmd_new = do_cpu_set,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300528 },
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200529
Blue Swirl23130862009-06-06 08:22:04 +0000530STEXI
Markus Armbrusterc427ea92010-05-04 13:20:32 +0200531@item cpu @var{index}
532@findex cpu
Blue Swirl23130862009-06-06 08:22:04 +0000533Set the default CPU.
534ETEXI
535
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300536 {
537 .name = "mouse_move",
538 .args_type = "dx_str:s,dy_str:s,dz_str:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300539 .params = "dx dy [dz]",
540 .help = "send mouse move events",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300541 .mhandler.cmd = do_mouse_move,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300542 },
543
Blue Swirl23130862009-06-06 08:22:04 +0000544STEXI
545@item mouse_move @var{dx} @var{dy} [@var{dz}]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100546@findex mouse_move
Blue Swirl23130862009-06-06 08:22:04 +0000547Move the active mouse to the specified coordinates @var{dx} @var{dy}
548with optional scroll axis @var{dz}.
549ETEXI
550
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300551 {
552 .name = "mouse_button",
553 .args_type = "button_state:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300554 .params = "state",
555 .help = "change mouse button state (1=L, 2=M, 4=R)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300556 .mhandler.cmd = do_mouse_button,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300557 },
558
Blue Swirl23130862009-06-06 08:22:04 +0000559STEXI
560@item mouse_button @var{val}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100561@findex mouse_button
Blue Swirl23130862009-06-06 08:22:04 +0000562Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
563ETEXI
564
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300565 {
566 .name = "mouse_set",
567 .args_type = "index:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300568 .params = "index",
569 .help = "set which mouse device receives events",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300570 .mhandler.cmd = do_mouse_set,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300571 },
572
Blue Swirl23130862009-06-06 08:22:04 +0000573STEXI
574@item mouse_set @var{index}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100575@findex mouse_set
Blue Swirl23130862009-06-06 08:22:04 +0000576Set which mouse device receives events at given @var{index}, index
577can be obtained with
578@example
579info mice
580@end example
581ETEXI
582
583#ifdef HAS_AUDIO
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300584 {
585 .name = "wavcapture",
586 .args_type = "path:F,freq:i?,bits:i?,nchannels:i?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300587 .params = "path [frequency [bits [channels]]]",
588 .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300589 .mhandler.cmd = do_wav_capture,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300590 },
Blue Swirl23130862009-06-06 08:22:04 +0000591#endif
592STEXI
593@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100594@findex wavcapture
Blue Swirl23130862009-06-06 08:22:04 +0000595Capture audio into @var{filename}. Using sample rate @var{frequency}
596bits per sample @var{bits} and number of channels @var{channels}.
597
598Defaults:
599@itemize @minus
600@item Sample rate = 44100 Hz - CD quality
601@item Bits = 16
602@item Number of channels = 2 - Stereo
603@end itemize
604ETEXI
605
606#ifdef HAS_AUDIO
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300607 {
608 .name = "stopcapture",
609 .args_type = "n:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300610 .params = "capture index",
611 .help = "stop capture",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300612 .mhandler.cmd = do_stop_capture,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300613 },
Blue Swirl23130862009-06-06 08:22:04 +0000614#endif
615STEXI
616@item stopcapture @var{index}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100617@findex stopcapture
Blue Swirl23130862009-06-06 08:22:04 +0000618Stop capture with a given @var{index}, index can be obtained with
619@example
620info capture
621@end example
622ETEXI
623
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300624 {
625 .name = "memsave",
626 .args_type = "val:l,size:i,filename:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300627 .params = "addr size file",
628 .help = "save to disk virtual memory dump starting at 'addr' of size 'size'",
Luiz Capitulino57e09452009-10-16 12:23:43 -0300629 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200630 .mhandler.cmd_new = do_memory_save,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300631 },
632
Blue Swirl23130862009-06-06 08:22:04 +0000633STEXI
634@item memsave @var{addr} @var{size} @var{file}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100635@findex memsave
Blue Swirl23130862009-06-06 08:22:04 +0000636save to disk virtual memory dump starting at @var{addr} of size @var{size}.
637ETEXI
638
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300639 {
640 .name = "pmemsave",
641 .args_type = "val:l,size:i,filename:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300642 .params = "addr size file",
643 .help = "save to disk physical memory dump starting at 'addr' of size 'size'",
Luiz Capitulino18f5a8b2009-10-16 12:23:44 -0300644 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200645 .mhandler.cmd_new = do_physical_memory_save,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300646 },
647
Blue Swirl23130862009-06-06 08:22:04 +0000648STEXI
649@item pmemsave @var{addr} @var{size} @var{file}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100650@findex pmemsave
Blue Swirl23130862009-06-06 08:22:04 +0000651save to disk physical memory dump starting at @var{addr} of size @var{size}.
652ETEXI
653
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300654 {
655 .name = "boot_set",
656 .args_type = "bootdevice:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300657 .params = "bootdevice",
658 .help = "define new values for the boot device list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300659 .mhandler.cmd = do_boot_set,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300660 },
661
Blue Swirl23130862009-06-06 08:22:04 +0000662STEXI
663@item boot_set @var{bootdevicelist}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100664@findex boot_set
Blue Swirl23130862009-06-06 08:22:04 +0000665
666Define new values for the boot device list. Those values will override
667the values specified on the command line through the @code{-boot} option.
668
669The values that can be specified here depend on the machine type, but are
670the same that can be specified in the @code{-boot} command line option.
671ETEXI
672
673#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300674 {
675 .name = "nmi",
676 .args_type = "cpu_index:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300677 .params = "cpu",
678 .help = "inject an NMI on the given CPU",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300679 .mhandler.cmd = do_inject_nmi,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300680 },
Blue Swirl23130862009-06-06 08:22:04 +0000681#endif
682STEXI
683@item nmi @var{cpu}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100684@findex nmi
Blue Swirl23130862009-06-06 08:22:04 +0000685Inject an NMI on the given CPU (x86 only).
686ETEXI
687
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300688 {
689 .name = "migrate",
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200690 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
691 .params = "[-d] [-b] [-i] uri",
692 .help = "migrate to URI (using -d to not wait for completion)"
693 "\n\t\t\t -b for migration without shared storage with"
694 " full copy of disk\n\t\t\t -i for migration without "
695 "shared storage with incremental copy of disk "
696 "(base image shared between src and destination)",
697 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200698 .mhandler.cmd_new = do_migrate,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300699 },
700
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200701
Blue Swirl23130862009-06-06 08:22:04 +0000702STEXI
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200703@item migrate [-d] [-b] [-i] @var{uri}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100704@findex migrate
Blue Swirl23130862009-06-06 08:22:04 +0000705Migrate to @var{uri} (using -d to not wait for completion).
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200706 -b for migration with full copy of disk
707 -i for migration with incremental copy of disk (base image is shared)
Blue Swirl23130862009-06-06 08:22:04 +0000708ETEXI
709
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300710 {
711 .name = "migrate_cancel",
712 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300713 .params = "",
714 .help = "cancel the current VM migration",
Luiz Capitulino911d2962009-10-16 12:23:47 -0300715 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200716 .mhandler.cmd_new = do_migrate_cancel,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300717 },
718
Blue Swirl23130862009-06-06 08:22:04 +0000719STEXI
720@item migrate_cancel
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100721@findex migrate_cancel
Blue Swirl23130862009-06-06 08:22:04 +0000722Cancel the current VM migration.
723ETEXI
724
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300725 {
726 .name = "migrate_set_speed",
Markus Armbrusteree9545d2010-03-26 09:07:08 +0100727 .args_type = "value:f",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300728 .params = "value",
729 .help = "set maximum speed (in bytes) for migrations",
Markus Armbruster5fd90832010-01-25 14:23:05 +0100730 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200731 .mhandler.cmd_new = do_migrate_set_speed,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300732 },
733
Blue Swirl23130862009-06-06 08:22:04 +0000734STEXI
735@item migrate_set_speed @var{value}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100736@findex migrate_set_speed
Blue Swirl23130862009-06-06 08:22:04 +0000737Set maximum speed to @var{value} (in bytes) for migrations.
738ETEXI
739
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300740 {
741 .name = "migrate_set_downtime",
Markus Armbrusterb0fbf7d2010-01-25 14:23:07 +0100742 .args_type = "value:T",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300743 .params = "value",
744 .help = "set maximum tolerated downtime (in seconds) for migrations",
Markus Armbrusterc6027f52010-01-25 14:23:08 +0100745 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200746 .mhandler.cmd_new = do_migrate_set_downtime,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300747 },
Glauber Costa2ea42952009-05-28 15:22:58 -0400748
749STEXI
750@item migrate_set_downtime @var{second}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100751@findex migrate_set_downtime
Glauber Costa2ea42952009-05-28 15:22:58 -0400752Set maximum tolerated downtime (in seconds) for migration.
753ETEXI
754
Blue Swirl23130862009-06-06 08:22:04 +0000755#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300756 {
757 .name = "drive_add",
758 .args_type = "pci_addr:s,opts:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300759 .params = "[[<domain>:]<bus>:]<slot>\n"
760 "[file=file][,if=type][,bus=n]\n"
761 "[,unit=m][,media=d][index=i]\n"
762 "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
763 "[snapshot=on|off][,cache=on|off]",
764 .help = "add drive to PCI storage controller",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300765 .mhandler.cmd = drive_hot_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300766 },
Blue Swirl23130862009-06-06 08:22:04 +0000767#endif
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300768
Blue Swirl23130862009-06-06 08:22:04 +0000769STEXI
770@item drive_add
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100771@findex drive_add
Blue Swirl23130862009-06-06 08:22:04 +0000772Add drive to PCI storage controller.
773ETEXI
774
775#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300776 {
777 .name = "pci_add",
778 .args_type = "pci_addr:s,type:s,opts:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300779 .params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
780 .help = "hot-add PCI device",
Markus Armbruster6c6a58a2010-05-12 10:53:00 +0200781 .mhandler.cmd = pci_device_hot_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300782 },
Blue Swirl23130862009-06-06 08:22:04 +0000783#endif
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300784
Blue Swirl23130862009-06-06 08:22:04 +0000785STEXI
786@item pci_add
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100787@findex pci_add
Blue Swirl23130862009-06-06 08:22:04 +0000788Hot-add PCI device.
789ETEXI
790
791#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300792 {
793 .name = "pci_del",
794 .args_type = "pci_addr:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300795 .params = "[[<domain>:]<bus>:]<slot>",
796 .help = "hot remove PCI device",
Markus Armbrusterb752daf2010-05-12 10:53:01 +0200797 .mhandler.cmd = do_pci_device_hot_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300798 },
Blue Swirl23130862009-06-06 08:22:04 +0000799#endif
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300800
Blue Swirl23130862009-06-06 08:22:04 +0000801STEXI
802@item pci_del
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100803@findex pci_del
Blue Swirl23130862009-06-06 08:22:04 +0000804Hot remove PCI device.
805ETEXI
806
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300807 {
808 .name = "host_net_add",
809 .args_type = "device:s,opts:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300810 .params = "tap|user|socket|vde|dump [options]",
811 .help = "add host VLAN client",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300812 .mhandler.cmd = net_host_device_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300813 },
814
Blue Swirl23130862009-06-06 08:22:04 +0000815STEXI
816@item host_net_add
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100817@findex host_net_add
Blue Swirl23130862009-06-06 08:22:04 +0000818Add host VLAN client.
819ETEXI
820
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300821 {
822 .name = "host_net_remove",
823 .args_type = "vlan_id:i,device:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300824 .params = "vlan_id name",
825 .help = "remove host VLAN client",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300826 .mhandler.cmd = net_host_device_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300827 },
828
Blue Swirl23130862009-06-06 08:22:04 +0000829STEXI
830@item host_net_remove
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100831@findex host_net_remove
Blue Swirl23130862009-06-06 08:22:04 +0000832Remove host VLAN client.
833ETEXI
834
Markus Armbrusterae82d322010-03-25 17:22:40 +0100835 {
836 .name = "netdev_add",
837 .args_type = "netdev:O",
838 .params = "[user|tap|socket],id=str[,prop=value][,...]",
839 .help = "add host network device",
840 .user_print = monitor_user_noop,
841 .mhandler.cmd_new = do_netdev_add,
842 },
843
844STEXI
845@item netdev_add
846@findex netdev_add
847Add host network device.
848ETEXI
849
850 {
851 .name = "netdev_del",
852 .args_type = "id:s",
853 .params = "id",
854 .help = "remove host network device",
855 .user_print = monitor_user_noop,
856 .mhandler.cmd_new = do_netdev_del,
857 },
858
859STEXI
860@item netdev_del
861@findex netdev_del
862Remove host network device.
863ETEXI
864
Blue Swirl23130862009-06-06 08:22:04 +0000865#ifdef CONFIG_SLIRP
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300866 {
867 .name = "hostfwd_add",
868 .args_type = "arg1:s,arg2:s?,arg3:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300869 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
870 .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300871 .mhandler.cmd = net_slirp_hostfwd_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300872 },
Markus Armbruster21413d62010-05-04 13:20:30 +0200873#endif
874STEXI
875@item hostfwd_add
876@findex hostfwd_add
877Redirect TCP or UDP connections from host to guest (requires -net user).
878ETEXI
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300879
Markus Armbruster21413d62010-05-04 13:20:30 +0200880#ifdef CONFIG_SLIRP
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300881 {
882 .name = "hostfwd_remove",
883 .args_type = "arg1:s,arg2:s?,arg3:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300884 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
885 .help = "remove host-to-guest TCP or UDP redirection",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300886 .mhandler.cmd = net_slirp_hostfwd_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300887 },
888
Blue Swirl23130862009-06-06 08:22:04 +0000889#endif
890STEXI
Markus Armbruster21413d62010-05-04 13:20:30 +0200891@item hostfwd_remove
892@findex hostfwd_remove
893Remove host-to-guest TCP or UDP redirection.
Blue Swirl23130862009-06-06 08:22:04 +0000894ETEXI
895
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300896 {
897 .name = "balloon",
Luiz Capitulino3b0bd6e2009-12-18 13:25:05 -0200898 .args_type = "value:M",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300899 .params = "target",
Riccardo Magliocchetti3c056132010-05-19 18:49:28 +0200900 .help = "request VM to change its memory allocation (in MB)",
Luiz Capitulino83fb1de2009-10-07 13:42:01 -0300901 .user_print = monitor_user_noop,
Adam Litke625a5be2010-01-26 14:17:35 -0600902 .mhandler.cmd_async = do_balloon,
903 .async = 1,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300904 },
905
Blue Swirl23130862009-06-06 08:22:04 +0000906STEXI
907@item balloon @var{value}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100908@findex balloon
Blue Swirl23130862009-06-06 08:22:04 +0000909Request VM to change its memory allocation to @var{value} (in MB).
910ETEXI
911
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300912 {
913 .name = "set_link",
Markus Armbrusterc9b26a42010-03-26 09:07:10 +0100914 .args_type = "name:s,up:b",
915 .params = "name on|off",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300916 .help = "change the link status of a network adapter",
Markus Armbruster5369e3c2010-03-26 09:07:11 +0100917 .user_print = monitor_user_noop,
918 .mhandler.cmd_new = do_set_link,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300919 },
920
Blue Swirl23130862009-06-06 08:22:04 +0000921STEXI
Markus Armbrusterc9b26a42010-03-26 09:07:10 +0100922@item set_link @var{name} [on|off]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100923@findex set_link
Markus Armbrusterc9b26a42010-03-26 09:07:10 +0100924Switch link @var{name} on (i.e. up) or off (i.e. down).
Blue Swirl23130862009-06-06 08:22:04 +0000925ETEXI
926
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300927 {
928 .name = "watchdog_action",
929 .args_type = "action:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300930 .params = "[reset|shutdown|poweroff|pause|debug|none]",
931 .help = "change watchdog action",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300932 .mhandler.cmd = do_watchdog_action,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300933 },
934
Blue Swirl23130862009-06-06 08:22:04 +0000935STEXI
936@item watchdog_action
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100937@findex watchdog_action
Blue Swirl23130862009-06-06 08:22:04 +0000938Change watchdog action.
939ETEXI
940
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300941 {
942 .name = "acl_show",
943 .args_type = "aclname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300944 .params = "aclname",
945 .help = "list rules in the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300946 .mhandler.cmd = do_acl_show,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300947 },
948
Blue Swirl23130862009-06-06 08:22:04 +0000949STEXI
Jan Kiszka15dfcd42009-06-25 08:22:08 +0200950@item acl_show @var{aclname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100951@findex acl_show
Jan Kiszka15dfcd42009-06-25 08:22:08 +0200952List all the matching rules in the access control list, and the default
953policy. There are currently two named access control lists,
954@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
955certificate distinguished name, and SASL username respectively.
956ETEXI
Blue Swirl23130862009-06-06 08:22:04 +0000957
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300958 {
959 .name = "acl_policy",
960 .args_type = "aclname:s,policy:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300961 .params = "aclname allow|deny",
962 .help = "set default access control list policy",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300963 .mhandler.cmd = do_acl_policy,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300964 },
965
Jan Kiszka15dfcd42009-06-25 08:22:08 +0200966STEXI
Jan Kiszkacbbfacc2009-07-03 08:46:05 +0200967@item acl_policy @var{aclname} @code{allow|deny}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100968@findex acl_policy
Jan Kiszka15dfcd42009-06-25 08:22:08 +0200969Set the default access control list policy, used in the event that
Blue Swirl23130862009-06-06 08:22:04 +0000970none of the explicit rules match. The default policy at startup is
Jan Kiszka15dfcd42009-06-25 08:22:08 +0200971always @code{deny}.
972ETEXI
973
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300974 {
975 .name = "acl_add",
976 .args_type = "aclname:s,match:s,policy:s,index:i?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300977 .params = "aclname match allow|deny [index]",
978 .help = "add a match rule to the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300979 .mhandler.cmd = do_acl_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300980 },
981
Jan Kiszka15dfcd42009-06-25 08:22:08 +0200982STEXI
Markus Armbruster0e4aec92010-05-04 13:20:31 +0200983@item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
984@findex acl_add
Jan Kiszka15dfcd42009-06-25 08:22:08 +0200985Add a match rule to the access control list, allowing or denying access.
986The match will normally be an exact username or x509 distinguished name,
987but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
988allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
Blue Swirl23130862009-06-06 08:22:04 +0000989normally be appended to the end of the ACL, but can be inserted
Jan Kiszka15dfcd42009-06-25 08:22:08 +0200990earlier in the list if the optional @var{index} parameter is supplied.
991ETEXI
992
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300993 {
994 .name = "acl_remove",
995 .args_type = "aclname:s,match:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300996 .params = "aclname match",
997 .help = "remove a match rule from the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300998 .mhandler.cmd = do_acl_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300999 },
1000
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001001STEXI
1002@item acl_remove @var{aclname} @var{match}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001003@findex acl_remove
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001004Remove the specified match rule from the access control list.
1005ETEXI
1006
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001007 {
1008 .name = "acl_reset",
1009 .args_type = "aclname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001010 .params = "aclname",
1011 .help = "reset the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001012 .mhandler.cmd = do_acl_reset,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001013 },
1014
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001015STEXI
Markus Armbruster0e4aec92010-05-04 13:20:31 +02001016@item acl_reset @var{aclname}
1017@findex acl_reset
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001018Remove all matches from the access control list, and set the default
Blue Swirl23130862009-06-06 08:22:04 +00001019policy back to @code{deny}.
Blue Swirl23130862009-06-06 08:22:04 +00001020ETEXI
1021
Huang Ying79c4f6b2009-06-23 10:05:14 +08001022#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001023
1024 {
1025 .name = "mce",
1026 .args_type = "cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001027 .params = "cpu bank status mcgstatus addr misc",
1028 .help = "inject a MCE on the given CPU",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001029 .mhandler.cmd = do_inject_mce,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001030 },
1031
Huang Ying79c4f6b2009-06-23 10:05:14 +08001032#endif
1033STEXI
1034@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001035@findex mce (x86)
Huang Ying79c4f6b2009-06-23 10:05:14 +08001036Inject an MCE on the given CPU (x86 only).
1037ETEXI
1038
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001039 {
1040 .name = "getfd",
1041 .args_type = "fdname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001042 .params = "getfd name",
1043 .help = "receive a file descriptor via SCM rights and assign it a name",
Luiz Capitulinof0d60002009-10-16 12:23:50 -03001044 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -02001045 .mhandler.cmd_new = do_getfd,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001046 },
1047
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001048STEXI
1049@item getfd @var{fdname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001050@findex getfd
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001051If a file descriptor is passed alongside this command using the SCM_RIGHTS
1052mechanism on unix sockets, it is stored using the name @var{fdname} for
1053later use by other monitor commands.
1054ETEXI
1055
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001056 {
1057 .name = "closefd",
1058 .args_type = "fdname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001059 .params = "closefd name",
1060 .help = "close a file descriptor previously passed via SCM rights",
Luiz Capitulino18f3a512009-10-16 12:23:51 -03001061 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -02001062 .mhandler.cmd_new = do_closefd,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001063 },
1064
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001065STEXI
1066@item closefd @var{fdname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001067@findex closefd
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001068Close the file descriptor previously assigned to @var{fdname} using the
1069@code{getfd} command. This is only needed if the file descriptor was never
1070used by another monitor command.
1071ETEXI
1072
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001073 {
1074 .name = "block_passwd",
1075 .args_type = "device:B,password:s",
1076 .params = "block_passwd device password",
1077 .help = "set the password of encrypted block devices",
1078 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -02001079 .mhandler.cmd_new = do_block_set_passwd,
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001080 },
1081
1082STEXI
1083@item block_passwd @var{device} @var{password}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001084@findex block_passwd
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001085Set the encrypted device @var{device} password to @var{password}
1086ETEXI
1087
Luiz Capitulino4a7e1192010-02-04 18:10:05 -02001088 {
1089 .name = "qmp_capabilities",
1090 .args_type = "",
1091 .params = "",
1092 .help = "enable QMP capabilities",
1093 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -02001094 .mhandler.cmd_new = do_qmp_capabilities,
Luiz Capitulino4a7e1192010-02-04 18:10:05 -02001095 },
1096
1097STEXI
1098@item qmp_capabilities
Markus Armbruster54d7cf12010-05-04 13:20:33 +02001099@findex qmp_capabilities
Luiz Capitulino4a7e1192010-02-04 18:10:05 -02001100Enable the specified QMP capabilities
1101ETEXI
1102
Jan Kiszka33572ec2010-05-31 14:43:30 -03001103
1104HXCOMM Keep the 'info' command at the end!
1105HXCOMM This is required for the QMP documentation layout.
1106
1107 {
1108 .name = "info",
1109 .args_type = "item:s?",
1110 .params = "[subcommand]",
1111 .help = "show various information about the system state",
1112 .user_print = monitor_user_noop,
1113 .mhandler.cmd_new = do_info,
1114 },
1115
1116STEXI
1117@item info @var{subcommand}
1118@findex info
1119Show various information about the system state.
1120
1121@table @option
1122@item info version
1123show the version of QEMU
1124@item info commands
1125list QMP available commands
1126@item info network
1127show the various VLANs and the associated devices
1128@item info chardev
1129show the character devices
1130@item info block
1131show the block devices
1132@item info blockstats
1133show block device statistics
1134@item info registers
1135show the cpu registers
1136@item info cpus
1137show infos for each CPU
1138@item info history
1139show the command line history
1140@item info irq
1141show the interrupts statistics (if available)
1142@item info pic
1143show i8259 (PIC) state
1144@item info pci
1145show emulated PCI device info
1146@item info tlb
1147show virtual to physical memory mappings (i386 only)
1148@item info mem
1149show the active virtual memory mappings (i386 only)
1150@item info hpet
1151show state of HPET (i386 only)
1152@item info jit
1153show dynamic compiler info
1154@item info kvm
1155show KVM information
1156@item info numa
1157show NUMA information
1158@item info usb
1159show USB devices plugged on the virtual USB hub
1160@item info usbhost
1161show all USB host devices
1162@item info profile
1163show profiling information
1164@item info capture
1165show information about active capturing
1166@item info snapshots
1167show list of VM snapshots
1168@item info status
1169show the current VM status (running|paused)
1170@item info pcmcia
1171show guest PCMCIA status
1172@item info mice
1173show which guest mouse is receiving events
1174@item info vnc
1175show the vnc server status
1176@item info name
1177show the current VM name
1178@item info uuid
1179show the current VM UUID
1180@item info cpustats
1181show CPU statistics
1182@item info usernet
1183show user network stack connection states
1184@item info migrate
1185show migration status
1186@item info balloon
1187show balloon information
1188@item info qtree
1189show device tree
1190@item info qdm
1191show qdev device model list
1192@item info roms
1193show roms
1194@end table
1195ETEXI
1196
1197HXCOMM DO NOT add new commands after 'info', move your addition before it!
1198
Blue Swirl23130862009-06-06 08:22:04 +00001199STEXI
1200@end table
1201ETEXI