blob: e5585ba0e9c859e25b1b19371add4c460d240723 [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
Prerna Saxena22890ab2010-06-24 17:04:53 +0530146#ifdef CONFIG_SIMPLE_TRACE
147 {
148 .name = "trace-event",
149 .args_type = "name:s,option:b",
150 .params = "name on|off",
151 .help = "changes status of a specific trace event",
152 .mhandler.cmd = do_change_trace_event_state,
153 },
154
155STEXI
156@item trace-event
157@findex trace-event
158changes status of a trace event
159ETEXI
Stefan Hajnoczic5ceb522010-07-13 09:26:33 +0100160
161 {
162 .name = "trace-file",
163 .args_type = "op:s?,arg:F?",
164 .params = "on|off|flush|set [arg]",
165 .help = "open, close, or flush trace file, or set a new file name",
166 .mhandler.cmd = do_trace_file,
167 },
168
169STEXI
170@item trace-file on|off|flush
171@findex trace-file
172Open, close, or flush the trace file. If no argument is given, the status of the trace file is displayed.
173ETEXI
Prerna Saxena22890ab2010-06-24 17:04:53 +0530174#endif
175
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300176 {
177 .name = "log",
178 .args_type = "items:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300179 .params = "item1[,...]",
180 .help = "activate logging of the specified items to '/tmp/qemu.log'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300181 .mhandler.cmd = do_log,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300182 },
183
Blue Swirl23130862009-06-06 08:22:04 +0000184STEXI
185@item log @var{item1}[,...]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100186@findex log
Blue Swirl23130862009-06-06 08:22:04 +0000187Activate logging of the specified items to @file{/tmp/qemu.log}.
188ETEXI
189
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300190 {
191 .name = "savevm",
192 .args_type = "name:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300193 .params = "[tag|id]",
194 .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300195 .mhandler.cmd = do_savevm,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300196 },
197
Blue Swirl23130862009-06-06 08:22:04 +0000198STEXI
199@item savevm [@var{tag}|@var{id}]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100200@findex savevm
Blue Swirl23130862009-06-06 08:22:04 +0000201Create a snapshot of the whole virtual machine. If @var{tag} is
202provided, it is used as human readable identifier. If there is already
203a snapshot with the same tag or ID, it is replaced. More info at
204@ref{vm_snapshots}.
205ETEXI
206
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300207 {
208 .name = "loadvm",
209 .args_type = "name:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300210 .params = "tag|id",
211 .help = "restore a VM snapshot from its tag or id",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300212 .mhandler.cmd = do_loadvm,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300213 },
214
Blue Swirl23130862009-06-06 08:22:04 +0000215STEXI
216@item loadvm @var{tag}|@var{id}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100217@findex loadvm
Blue Swirl23130862009-06-06 08:22:04 +0000218Set the whole virtual machine to the snapshot identified by the tag
219@var{tag} or the unique snapshot ID @var{id}.
220ETEXI
221
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300222 {
223 .name = "delvm",
224 .args_type = "name:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300225 .params = "tag|id",
226 .help = "delete a VM snapshot from its tag or id",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300227 .mhandler.cmd = do_delvm,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300228 },
229
Blue Swirl23130862009-06-06 08:22:04 +0000230STEXI
231@item delvm @var{tag}|@var{id}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100232@findex delvm
Blue Swirl23130862009-06-06 08:22:04 +0000233Delete the snapshot identified by @var{tag} or @var{id}.
234ETEXI
235
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300236 {
237 .name = "singlestep",
238 .args_type = "option:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300239 .params = "[on|off]",
240 .help = "run emulation in singlestep mode or switch to normal mode",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300241 .mhandler.cmd = do_singlestep,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300242 },
243
Blue Swirl23130862009-06-06 08:22:04 +0000244STEXI
245@item singlestep [off]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100246@findex singlestep
Blue Swirl23130862009-06-06 08:22:04 +0000247Run the emulation in single step mode.
248If called with option off, the emulation returns to normal mode.
249ETEXI
250
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300251 {
252 .name = "stop",
253 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300254 .params = "",
255 .help = "stop emulation",
Luiz Capitulinoe0c97bd2009-10-07 13:41:57 -0300256 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200257 .mhandler.cmd_new = do_stop,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300258 },
259
Blue Swirl23130862009-06-06 08:22:04 +0000260STEXI
261@item stop
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100262@findex stop
Blue Swirl23130862009-06-06 08:22:04 +0000263Stop emulation.
264ETEXI
265
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300266 {
267 .name = "c|cont",
268 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300269 .params = "",
270 .help = "resume emulation",
Luiz Capitulinoa1f896a2009-10-07 13:42:00 -0300271 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200272 .mhandler.cmd_new = do_cont,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300273 },
274
Blue Swirl23130862009-06-06 08:22:04 +0000275STEXI
276@item c or cont
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100277@findex cont
Blue Swirl23130862009-06-06 08:22:04 +0000278Resume emulation.
279ETEXI
280
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300281 {
282 .name = "gdbserver",
283 .args_type = "device:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300284 .params = "[device]",
285 .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300286 .mhandler.cmd = do_gdbserver,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300287 },
288
Blue Swirl23130862009-06-06 08:22:04 +0000289STEXI
290@item gdbserver [@var{port}]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100291@findex gdbserver
Blue Swirl23130862009-06-06 08:22:04 +0000292Start gdbserver session (default @var{port}=1234)
293ETEXI
294
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300295 {
296 .name = "x",
297 .args_type = "fmt:/,addr:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300298 .params = "/fmt addr",
299 .help = "virtual memory dump starting at 'addr'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300300 .mhandler.cmd = do_memory_dump,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300301 },
302
Blue Swirl23130862009-06-06 08:22:04 +0000303STEXI
304@item x/fmt @var{addr}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100305@findex x
Blue Swirl23130862009-06-06 08:22:04 +0000306Virtual memory dump starting at @var{addr}.
307ETEXI
308
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300309 {
310 .name = "xp",
311 .args_type = "fmt:/,addr:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300312 .params = "/fmt addr",
313 .help = "physical memory dump starting at 'addr'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300314 .mhandler.cmd = do_physical_memory_dump,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300315 },
316
Blue Swirl23130862009-06-06 08:22:04 +0000317STEXI
318@item xp /@var{fmt} @var{addr}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100319@findex xp
Blue Swirl23130862009-06-06 08:22:04 +0000320Physical memory dump starting at @var{addr}.
321
322@var{fmt} is a format which tells the command how to format the
323data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
324
325@table @var
326@item count
327is the number of items to be dumped.
328
329@item format
330can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
331c (char) or i (asm instruction).
332
333@item size
334can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
335@code{h} or @code{w} can be specified with the @code{i} format to
336respectively select 16 or 32 bit code instruction size.
337
338@end table
339
340Examples:
341@itemize
342@item
343Dump 10 instructions at the current instruction pointer:
344@example
345(qemu) x/10i $eip
3460x90107063: ret
3470x90107064: sti
3480x90107065: lea 0x0(%esi,1),%esi
3490x90107069: lea 0x0(%edi,1),%edi
3500x90107070: ret
3510x90107071: jmp 0x90107080
3520x90107073: nop
3530x90107074: nop
3540x90107075: nop
3550x90107076: nop
356@end example
357
358@item
359Dump 80 16 bit values at the start of the video memory.
360@smallexample
361(qemu) xp/80hx 0xb8000
3620x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
3630x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
3640x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
3650x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
3660x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
3670x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
3680x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
3690x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
3700x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
3710x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
372@end smallexample
373@end itemize
374ETEXI
375
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300376 {
377 .name = "p|print",
378 .args_type = "fmt:/,val:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300379 .params = "/fmt expr",
380 .help = "print expression value (use $reg for CPU register access)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300381 .mhandler.cmd = do_print,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300382 },
383
Blue Swirl23130862009-06-06 08:22:04 +0000384STEXI
385@item p or print/@var{fmt} @var{expr}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100386@findex print
Blue Swirl23130862009-06-06 08:22:04 +0000387
388Print expression value. Only the @var{format} part of @var{fmt} is
389used.
390ETEXI
391
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300392 {
393 .name = "i",
394 .args_type = "fmt:/,addr:i,index:i.",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300395 .params = "/fmt addr",
396 .help = "I/O port read",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300397 .mhandler.cmd = do_ioport_read,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300398 },
399
Blue Swirl23130862009-06-06 08:22:04 +0000400STEXI
401Read I/O port.
402ETEXI
403
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300404 {
405 .name = "o",
406 .args_type = "fmt:/,addr:i,val:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300407 .params = "/fmt addr value",
408 .help = "I/O port write",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300409 .mhandler.cmd = do_ioport_write,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300410 },
411
Jan Kiszkaf1147842009-07-14 10:20:11 +0200412STEXI
413Write to I/O port.
414ETEXI
Blue Swirl23130862009-06-06 08:22:04 +0000415
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300416 {
417 .name = "sendkey",
418 .args_type = "string:s,hold_time:i?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300419 .params = "keys [hold_ms]",
420 .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300421 .mhandler.cmd = do_sendkey,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300422 },
423
Blue Swirl23130862009-06-06 08:22:04 +0000424STEXI
425@item sendkey @var{keys}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100426@findex sendkey
Blue Swirl23130862009-06-06 08:22:04 +0000427
428Send @var{keys} to the emulator. @var{keys} could be the name of the
429key or @code{#} followed by the raw value in either decimal or hexadecimal
430format. Use @code{-} to press several keys simultaneously. Example:
431@example
432sendkey ctrl-alt-f1
433@end example
434
435This command is useful to send keys that your graphical user interface
436intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
437ETEXI
438
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300439 {
440 .name = "system_reset",
441 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300442 .params = "",
443 .help = "reset the system",
Luiz Capitulinoc80d2592009-10-07 13:41:58 -0300444 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200445 .mhandler.cmd_new = do_system_reset,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300446 },
447
Blue Swirl23130862009-06-06 08:22:04 +0000448STEXI
449@item system_reset
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100450@findex system_reset
Blue Swirl23130862009-06-06 08:22:04 +0000451
452Reset the system.
453ETEXI
454
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300455 {
456 .name = "system_powerdown",
457 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300458 .params = "",
459 .help = "send system power down event",
Luiz Capitulino43076662009-10-07 13:41:59 -0300460 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200461 .mhandler.cmd_new = do_system_powerdown,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300462 },
463
Blue Swirl23130862009-06-06 08:22:04 +0000464STEXI
465@item system_powerdown
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100466@findex system_powerdown
Blue Swirl23130862009-06-06 08:22:04 +0000467
468Power down the system (if supported).
469ETEXI
470
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300471 {
472 .name = "sum",
473 .args_type = "start:i,size:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300474 .params = "addr size",
475 .help = "compute the checksum of a memory region",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300476 .mhandler.cmd = do_sum,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300477 },
478
Blue Swirl23130862009-06-06 08:22:04 +0000479STEXI
480@item sum @var{addr} @var{size}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100481@findex sum
Blue Swirl23130862009-06-06 08:22:04 +0000482
483Compute the checksum of a memory region.
484ETEXI
485
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300486 {
487 .name = "usb_add",
488 .args_type = "devname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300489 .params = "device",
490 .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300491 .mhandler.cmd = do_usb_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300492 },
493
Blue Swirl23130862009-06-06 08:22:04 +0000494STEXI
495@item usb_add @var{devname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100496@findex usb_add
Blue Swirl23130862009-06-06 08:22:04 +0000497
498Add the USB device @var{devname}. For details of available devices see
499@ref{usb_devices}
500ETEXI
501
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300502 {
503 .name = "usb_del",
504 .args_type = "devname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300505 .params = "device",
506 .help = "remove USB device 'bus.addr'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300507 .mhandler.cmd = do_usb_del,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300508 },
509
Blue Swirl23130862009-06-06 08:22:04 +0000510STEXI
511@item usb_del @var{devname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100512@findex usb_del
Blue Swirl23130862009-06-06 08:22:04 +0000513
514Remove the USB device @var{devname} from the QEMU virtual USB
515hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
516command @code{info usb} to see the devices you can remove.
517ETEXI
518
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300519 {
520 .name = "device_add",
Markus Armbrusterc7e4e8c2010-02-10 20:47:28 +0100521 .args_type = "device:O",
522 .params = "driver[,prop=value][,...]",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300523 .help = "add device, like -device on the command line",
Markus Armbruster8bc27242010-02-10 20:52:01 +0100524 .user_print = monitor_user_noop,
525 .mhandler.cmd_new = do_device_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300526 },
527
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200528STEXI
529@item device_add @var{config}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100530@findex device_add
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200531
532Add device.
533ETEXI
534
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300535 {
536 .name = "device_del",
537 .args_type = "id:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300538 .params = "device",
539 .help = "remove device",
Markus Armbruster17a38ea2010-03-22 11:38:14 +0100540 .user_print = monitor_user_noop,
541 .mhandler.cmd_new = do_device_del,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300542 },
543
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200544STEXI
545@item device_del @var{id}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100546@findex device_del
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200547
548Remove device @var{id}.
549ETEXI
550
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300551 {
552 .name = "cpu",
553 .args_type = "index:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300554 .params = "index",
555 .help = "set the default CPU",
Markus Armbruster81a1b452010-01-20 13:07:35 +0100556 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200557 .mhandler.cmd_new = do_cpu_set,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300558 },
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200559
Blue Swirl23130862009-06-06 08:22:04 +0000560STEXI
Markus Armbrusterc427ea92010-05-04 13:20:32 +0200561@item cpu @var{index}
562@findex cpu
Blue Swirl23130862009-06-06 08:22:04 +0000563Set the default CPU.
564ETEXI
565
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300566 {
567 .name = "mouse_move",
568 .args_type = "dx_str:s,dy_str:s,dz_str:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300569 .params = "dx dy [dz]",
570 .help = "send mouse move events",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300571 .mhandler.cmd = do_mouse_move,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300572 },
573
Blue Swirl23130862009-06-06 08:22:04 +0000574STEXI
575@item mouse_move @var{dx} @var{dy} [@var{dz}]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100576@findex mouse_move
Blue Swirl23130862009-06-06 08:22:04 +0000577Move the active mouse to the specified coordinates @var{dx} @var{dy}
578with optional scroll axis @var{dz}.
579ETEXI
580
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300581 {
582 .name = "mouse_button",
583 .args_type = "button_state:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300584 .params = "state",
585 .help = "change mouse button state (1=L, 2=M, 4=R)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300586 .mhandler.cmd = do_mouse_button,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300587 },
588
Blue Swirl23130862009-06-06 08:22:04 +0000589STEXI
590@item mouse_button @var{val}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100591@findex mouse_button
Blue Swirl23130862009-06-06 08:22:04 +0000592Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
593ETEXI
594
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300595 {
596 .name = "mouse_set",
597 .args_type = "index:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300598 .params = "index",
599 .help = "set which mouse device receives events",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300600 .mhandler.cmd = do_mouse_set,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300601 },
602
Blue Swirl23130862009-06-06 08:22:04 +0000603STEXI
604@item mouse_set @var{index}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100605@findex mouse_set
Blue Swirl23130862009-06-06 08:22:04 +0000606Set which mouse device receives events at given @var{index}, index
607can be obtained with
608@example
609info mice
610@end example
611ETEXI
612
613#ifdef HAS_AUDIO
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300614 {
615 .name = "wavcapture",
616 .args_type = "path:F,freq:i?,bits:i?,nchannels:i?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300617 .params = "path [frequency [bits [channels]]]",
618 .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300619 .mhandler.cmd = do_wav_capture,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300620 },
Blue Swirl23130862009-06-06 08:22:04 +0000621#endif
622STEXI
623@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100624@findex wavcapture
Blue Swirl23130862009-06-06 08:22:04 +0000625Capture audio into @var{filename}. Using sample rate @var{frequency}
626bits per sample @var{bits} and number of channels @var{channels}.
627
628Defaults:
629@itemize @minus
630@item Sample rate = 44100 Hz - CD quality
631@item Bits = 16
632@item Number of channels = 2 - Stereo
633@end itemize
634ETEXI
635
636#ifdef HAS_AUDIO
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300637 {
638 .name = "stopcapture",
639 .args_type = "n:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300640 .params = "capture index",
641 .help = "stop capture",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300642 .mhandler.cmd = do_stop_capture,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300643 },
Blue Swirl23130862009-06-06 08:22:04 +0000644#endif
645STEXI
646@item stopcapture @var{index}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100647@findex stopcapture
Blue Swirl23130862009-06-06 08:22:04 +0000648Stop capture with a given @var{index}, index can be obtained with
649@example
650info capture
651@end example
652ETEXI
653
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300654 {
655 .name = "memsave",
656 .args_type = "val:l,size:i,filename:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300657 .params = "addr size file",
658 .help = "save to disk virtual memory dump starting at 'addr' of size 'size'",
Luiz Capitulino57e09452009-10-16 12:23:43 -0300659 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200660 .mhandler.cmd_new = do_memory_save,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300661 },
662
Blue Swirl23130862009-06-06 08:22:04 +0000663STEXI
664@item memsave @var{addr} @var{size} @var{file}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100665@findex memsave
Blue Swirl23130862009-06-06 08:22:04 +0000666save to disk virtual memory dump starting at @var{addr} of size @var{size}.
667ETEXI
668
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300669 {
670 .name = "pmemsave",
671 .args_type = "val:l,size:i,filename:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300672 .params = "addr size file",
673 .help = "save to disk physical memory dump starting at 'addr' of size 'size'",
Luiz Capitulino18f5a8b2009-10-16 12:23:44 -0300674 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200675 .mhandler.cmd_new = do_physical_memory_save,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300676 },
677
Blue Swirl23130862009-06-06 08:22:04 +0000678STEXI
679@item pmemsave @var{addr} @var{size} @var{file}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100680@findex pmemsave
Blue Swirl23130862009-06-06 08:22:04 +0000681save to disk physical memory dump starting at @var{addr} of size @var{size}.
682ETEXI
683
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300684 {
685 .name = "boot_set",
686 .args_type = "bootdevice:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300687 .params = "bootdevice",
688 .help = "define new values for the boot device list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300689 .mhandler.cmd = do_boot_set,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300690 },
691
Blue Swirl23130862009-06-06 08:22:04 +0000692STEXI
693@item boot_set @var{bootdevicelist}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100694@findex boot_set
Blue Swirl23130862009-06-06 08:22:04 +0000695
696Define new values for the boot device list. Those values will override
697the values specified on the command line through the @code{-boot} option.
698
699The values that can be specified here depend on the machine type, but are
700the same that can be specified in the @code{-boot} command line option.
701ETEXI
702
703#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300704 {
705 .name = "nmi",
706 .args_type = "cpu_index:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300707 .params = "cpu",
708 .help = "inject an NMI on the given CPU",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300709 .mhandler.cmd = do_inject_nmi,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300710 },
Blue Swirl23130862009-06-06 08:22:04 +0000711#endif
712STEXI
713@item nmi @var{cpu}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100714@findex nmi
Blue Swirl23130862009-06-06 08:22:04 +0000715Inject an NMI on the given CPU (x86 only).
716ETEXI
717
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300718 {
719 .name = "migrate",
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200720 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
721 .params = "[-d] [-b] [-i] uri",
722 .help = "migrate to URI (using -d to not wait for completion)"
723 "\n\t\t\t -b for migration without shared storage with"
724 " full copy of disk\n\t\t\t -i for migration without "
725 "shared storage with incremental copy of disk "
726 "(base image shared between src and destination)",
727 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200728 .mhandler.cmd_new = do_migrate,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300729 },
730
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200731
Blue Swirl23130862009-06-06 08:22:04 +0000732STEXI
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200733@item migrate [-d] [-b] [-i] @var{uri}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100734@findex migrate
Blue Swirl23130862009-06-06 08:22:04 +0000735Migrate to @var{uri} (using -d to not wait for completion).
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200736 -b for migration with full copy of disk
737 -i for migration with incremental copy of disk (base image is shared)
Blue Swirl23130862009-06-06 08:22:04 +0000738ETEXI
739
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300740 {
741 .name = "migrate_cancel",
742 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300743 .params = "",
744 .help = "cancel the current VM migration",
Luiz Capitulino911d2962009-10-16 12:23:47 -0300745 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200746 .mhandler.cmd_new = do_migrate_cancel,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300747 },
748
Blue Swirl23130862009-06-06 08:22:04 +0000749STEXI
750@item migrate_cancel
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100751@findex migrate_cancel
Blue Swirl23130862009-06-06 08:22:04 +0000752Cancel the current VM migration.
753ETEXI
754
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300755 {
756 .name = "migrate_set_speed",
Jes Sorensened3d4a82010-10-21 17:15:48 +0200757 .args_type = "value:o",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300758 .params = "value",
Jes Sorensened3d4a82010-10-21 17:15:48 +0200759 .help = "set maximum speed (in bytes) for migrations. "
760 "Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
Markus Armbruster5fd90832010-01-25 14:23:05 +0100761 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200762 .mhandler.cmd_new = do_migrate_set_speed,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300763 },
764
Blue Swirl23130862009-06-06 08:22:04 +0000765STEXI
766@item migrate_set_speed @var{value}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100767@findex migrate_set_speed
Blue Swirl23130862009-06-06 08:22:04 +0000768Set maximum speed to @var{value} (in bytes) for migrations.
769ETEXI
770
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300771 {
772 .name = "migrate_set_downtime",
Markus Armbrusterb0fbf7d2010-01-25 14:23:07 +0100773 .args_type = "value:T",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300774 .params = "value",
775 .help = "set maximum tolerated downtime (in seconds) for migrations",
Markus Armbrusterc6027f52010-01-25 14:23:08 +0100776 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200777 .mhandler.cmd_new = do_migrate_set_downtime,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300778 },
Glauber Costa2ea42952009-05-28 15:22:58 -0400779
780STEXI
781@item migrate_set_downtime @var{second}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100782@findex migrate_set_downtime
Glauber Costa2ea42952009-05-28 15:22:58 -0400783Set maximum tolerated downtime (in seconds) for migration.
784ETEXI
785
Blue Swirl23130862009-06-06 08:22:04 +0000786#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300787 {
788 .name = "drive_add",
789 .args_type = "pci_addr:s,opts:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300790 .params = "[[<domain>:]<bus>:]<slot>\n"
791 "[file=file][,if=type][,bus=n]\n"
792 "[,unit=m][,media=d][index=i]\n"
793 "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
794 "[snapshot=on|off][,cache=on|off]",
795 .help = "add drive to PCI storage controller",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300796 .mhandler.cmd = drive_hot_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300797 },
Blue Swirl23130862009-06-06 08:22:04 +0000798#endif
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300799
Blue Swirl23130862009-06-06 08:22:04 +0000800STEXI
801@item drive_add
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100802@findex drive_add
Blue Swirl23130862009-06-06 08:22:04 +0000803Add drive to PCI storage controller.
804ETEXI
805
806#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300807 {
808 .name = "pci_add",
809 .args_type = "pci_addr:s,type:s,opts:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300810 .params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
811 .help = "hot-add PCI device",
Markus Armbruster6c6a58a2010-05-12 10:53:00 +0200812 .mhandler.cmd = pci_device_hot_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300813 },
Blue Swirl23130862009-06-06 08:22:04 +0000814#endif
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300815
Blue Swirl23130862009-06-06 08:22:04 +0000816STEXI
817@item pci_add
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100818@findex pci_add
Blue Swirl23130862009-06-06 08:22:04 +0000819Hot-add PCI device.
820ETEXI
821
822#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300823 {
824 .name = "pci_del",
825 .args_type = "pci_addr:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300826 .params = "[[<domain>:]<bus>:]<slot>",
827 .help = "hot remove PCI device",
Markus Armbrusterb752daf2010-05-12 10:53:01 +0200828 .mhandler.cmd = do_pci_device_hot_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300829 },
Blue Swirl23130862009-06-06 08:22:04 +0000830#endif
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300831
Blue Swirl23130862009-06-06 08:22:04 +0000832STEXI
833@item pci_del
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100834@findex pci_del
Blue Swirl23130862009-06-06 08:22:04 +0000835Hot remove PCI device.
836ETEXI
837
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300838 {
839 .name = "host_net_add",
840 .args_type = "device:s,opts:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300841 .params = "tap|user|socket|vde|dump [options]",
842 .help = "add host VLAN client",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300843 .mhandler.cmd = net_host_device_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300844 },
845
Blue Swirl23130862009-06-06 08:22:04 +0000846STEXI
847@item host_net_add
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100848@findex host_net_add
Blue Swirl23130862009-06-06 08:22:04 +0000849Add host VLAN client.
850ETEXI
851
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300852 {
853 .name = "host_net_remove",
854 .args_type = "vlan_id:i,device:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300855 .params = "vlan_id name",
856 .help = "remove host VLAN client",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300857 .mhandler.cmd = net_host_device_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300858 },
859
Blue Swirl23130862009-06-06 08:22:04 +0000860STEXI
861@item host_net_remove
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100862@findex host_net_remove
Blue Swirl23130862009-06-06 08:22:04 +0000863Remove host VLAN client.
864ETEXI
865
Markus Armbrusterae82d322010-03-25 17:22:40 +0100866 {
867 .name = "netdev_add",
868 .args_type = "netdev:O",
869 .params = "[user|tap|socket],id=str[,prop=value][,...]",
870 .help = "add host network device",
871 .user_print = monitor_user_noop,
872 .mhandler.cmd_new = do_netdev_add,
873 },
874
875STEXI
876@item netdev_add
877@findex netdev_add
878Add host network device.
879ETEXI
880
881 {
882 .name = "netdev_del",
883 .args_type = "id:s",
884 .params = "id",
885 .help = "remove host network device",
886 .user_print = monitor_user_noop,
887 .mhandler.cmd_new = do_netdev_del,
888 },
889
890STEXI
891@item netdev_del
892@findex netdev_del
893Remove host network device.
894ETEXI
895
Blue Swirl23130862009-06-06 08:22:04 +0000896#ifdef CONFIG_SLIRP
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300897 {
898 .name = "hostfwd_add",
899 .args_type = "arg1:s,arg2:s?,arg3:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300900 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
901 .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300902 .mhandler.cmd = net_slirp_hostfwd_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300903 },
Markus Armbruster21413d62010-05-04 13:20:30 +0200904#endif
905STEXI
906@item hostfwd_add
907@findex hostfwd_add
908Redirect TCP or UDP connections from host to guest (requires -net user).
909ETEXI
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300910
Markus Armbruster21413d62010-05-04 13:20:30 +0200911#ifdef CONFIG_SLIRP
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300912 {
913 .name = "hostfwd_remove",
914 .args_type = "arg1:s,arg2:s?,arg3:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300915 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
916 .help = "remove host-to-guest TCP or UDP redirection",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300917 .mhandler.cmd = net_slirp_hostfwd_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300918 },
919
Blue Swirl23130862009-06-06 08:22:04 +0000920#endif
921STEXI
Markus Armbruster21413d62010-05-04 13:20:30 +0200922@item hostfwd_remove
923@findex hostfwd_remove
924Remove host-to-guest TCP or UDP redirection.
Blue Swirl23130862009-06-06 08:22:04 +0000925ETEXI
926
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300927 {
928 .name = "balloon",
Luiz Capitulino3b0bd6e2009-12-18 13:25:05 -0200929 .args_type = "value:M",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300930 .params = "target",
Riccardo Magliocchetti3c056132010-05-19 18:49:28 +0200931 .help = "request VM to change its memory allocation (in MB)",
Luiz Capitulino83fb1de2009-10-07 13:42:01 -0300932 .user_print = monitor_user_noop,
Adam Litke625a5be2010-01-26 14:17:35 -0600933 .mhandler.cmd_async = do_balloon,
Jan Kiszka8ac470c2010-06-16 00:38:39 +0200934 .flags = MONITOR_CMD_ASYNC,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300935 },
936
Blue Swirl23130862009-06-06 08:22:04 +0000937STEXI
938@item balloon @var{value}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100939@findex balloon
Blue Swirl23130862009-06-06 08:22:04 +0000940Request VM to change its memory allocation to @var{value} (in MB).
941ETEXI
942
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300943 {
944 .name = "set_link",
Markus Armbrusterc9b26a42010-03-26 09:07:10 +0100945 .args_type = "name:s,up:b",
946 .params = "name on|off",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300947 .help = "change the link status of a network adapter",
Markus Armbruster5369e3c2010-03-26 09:07:11 +0100948 .user_print = monitor_user_noop,
949 .mhandler.cmd_new = do_set_link,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300950 },
951
Blue Swirl23130862009-06-06 08:22:04 +0000952STEXI
Markus Armbrusterc9b26a42010-03-26 09:07:10 +0100953@item set_link @var{name} [on|off]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100954@findex set_link
Markus Armbrusterc9b26a42010-03-26 09:07:10 +0100955Switch link @var{name} on (i.e. up) or off (i.e. down).
Blue Swirl23130862009-06-06 08:22:04 +0000956ETEXI
957
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300958 {
959 .name = "watchdog_action",
960 .args_type = "action:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300961 .params = "[reset|shutdown|poweroff|pause|debug|none]",
962 .help = "change watchdog action",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300963 .mhandler.cmd = do_watchdog_action,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300964 },
965
Blue Swirl23130862009-06-06 08:22:04 +0000966STEXI
967@item watchdog_action
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100968@findex watchdog_action
Blue Swirl23130862009-06-06 08:22:04 +0000969Change watchdog action.
970ETEXI
971
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300972 {
973 .name = "acl_show",
974 .args_type = "aclname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300975 .params = "aclname",
976 .help = "list rules in the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300977 .mhandler.cmd = do_acl_show,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300978 },
979
Blue Swirl23130862009-06-06 08:22:04 +0000980STEXI
Jan Kiszka15dfcd42009-06-25 08:22:08 +0200981@item acl_show @var{aclname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100982@findex acl_show
Jan Kiszka15dfcd42009-06-25 08:22:08 +0200983List all the matching rules in the access control list, and the default
984policy. There are currently two named access control lists,
985@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
986certificate distinguished name, and SASL username respectively.
987ETEXI
Blue Swirl23130862009-06-06 08:22:04 +0000988
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300989 {
990 .name = "acl_policy",
991 .args_type = "aclname:s,policy:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300992 .params = "aclname allow|deny",
993 .help = "set default access control list policy",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300994 .mhandler.cmd = do_acl_policy,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300995 },
996
Jan Kiszka15dfcd42009-06-25 08:22:08 +0200997STEXI
Jan Kiszkacbbfacc2009-07-03 08:46:05 +0200998@item acl_policy @var{aclname} @code{allow|deny}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100999@findex acl_policy
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001000Set the default access control list policy, used in the event that
Blue Swirl23130862009-06-06 08:22:04 +00001001none of the explicit rules match. The default policy at startup is
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001002always @code{deny}.
1003ETEXI
1004
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001005 {
1006 .name = "acl_add",
1007 .args_type = "aclname:s,match:s,policy:s,index:i?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001008 .params = "aclname match allow|deny [index]",
1009 .help = "add a match rule to the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001010 .mhandler.cmd = do_acl_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001011 },
1012
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001013STEXI
Markus Armbruster0e4aec92010-05-04 13:20:31 +02001014@item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
1015@findex acl_add
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001016Add a match rule to the access control list, allowing or denying access.
1017The match will normally be an exact username or x509 distinguished name,
1018but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
1019allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
Blue Swirl23130862009-06-06 08:22:04 +00001020normally be appended to the end of the ACL, but can be inserted
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001021earlier in the list if the optional @var{index} parameter is supplied.
1022ETEXI
1023
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001024 {
1025 .name = "acl_remove",
1026 .args_type = "aclname:s,match:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001027 .params = "aclname match",
1028 .help = "remove a match rule from the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001029 .mhandler.cmd = do_acl_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001030 },
1031
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001032STEXI
1033@item acl_remove @var{aclname} @var{match}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001034@findex acl_remove
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001035Remove the specified match rule from the access control list.
1036ETEXI
1037
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001038 {
1039 .name = "acl_reset",
1040 .args_type = "aclname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001041 .params = "aclname",
1042 .help = "reset the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001043 .mhandler.cmd = do_acl_reset,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001044 },
1045
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001046STEXI
Markus Armbruster0e4aec92010-05-04 13:20:31 +02001047@item acl_reset @var{aclname}
1048@findex acl_reset
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001049Remove all matches from the access control list, and set the default
Blue Swirl23130862009-06-06 08:22:04 +00001050policy back to @code{deny}.
Blue Swirl23130862009-06-06 08:22:04 +00001051ETEXI
1052
Huang Ying79c4f6b2009-06-23 10:05:14 +08001053#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001054
1055 {
1056 .name = "mce",
1057 .args_type = "cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001058 .params = "cpu bank status mcgstatus addr misc",
1059 .help = "inject a MCE on the given CPU",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001060 .mhandler.cmd = do_inject_mce,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001061 },
1062
Huang Ying79c4f6b2009-06-23 10:05:14 +08001063#endif
1064STEXI
1065@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001066@findex mce (x86)
Huang Ying79c4f6b2009-06-23 10:05:14 +08001067Inject an MCE on the given CPU (x86 only).
1068ETEXI
1069
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001070 {
1071 .name = "getfd",
1072 .args_type = "fdname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001073 .params = "getfd name",
1074 .help = "receive a file descriptor via SCM rights and assign it a name",
Luiz Capitulinof0d60002009-10-16 12:23:50 -03001075 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -02001076 .mhandler.cmd_new = do_getfd,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001077 },
1078
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001079STEXI
1080@item getfd @var{fdname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001081@findex getfd
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001082If a file descriptor is passed alongside this command using the SCM_RIGHTS
1083mechanism on unix sockets, it is stored using the name @var{fdname} for
1084later use by other monitor commands.
1085ETEXI
1086
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001087 {
1088 .name = "closefd",
1089 .args_type = "fdname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001090 .params = "closefd name",
1091 .help = "close a file descriptor previously passed via SCM rights",
Luiz Capitulino18f3a512009-10-16 12:23:51 -03001092 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -02001093 .mhandler.cmd_new = do_closefd,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001094 },
1095
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001096STEXI
1097@item closefd @var{fdname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001098@findex closefd
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001099Close the file descriptor previously assigned to @var{fdname} using the
1100@code{getfd} command. This is only needed if the file descriptor was never
1101used by another monitor command.
1102ETEXI
1103
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001104 {
1105 .name = "block_passwd",
1106 .args_type = "device:B,password:s",
1107 .params = "block_passwd device password",
1108 .help = "set the password of encrypted block devices",
1109 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -02001110 .mhandler.cmd_new = do_block_set_passwd,
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001111 },
1112
1113STEXI
1114@item block_passwd @var{device} @var{password}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001115@findex block_passwd
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001116Set the encrypted device @var{device} password to @var{password}
1117ETEXI
Jan Kiszkab40292e2010-05-31 14:43:31 -03001118
Jan Kiszka33572ec2010-05-31 14:43:30 -03001119 {
1120 .name = "info",
1121 .args_type = "item:s?",
1122 .params = "[subcommand]",
1123 .help = "show various information about the system state",
Luiz Capitulino1162daa2010-09-13 12:15:26 -03001124 .mhandler.cmd = do_info,
Jan Kiszka33572ec2010-05-31 14:43:30 -03001125 },
1126
1127STEXI
1128@item info @var{subcommand}
1129@findex info
1130Show various information about the system state.
1131
1132@table @option
1133@item info version
1134show the version of QEMU
Jan Kiszka33572ec2010-05-31 14:43:30 -03001135@item info network
1136show the various VLANs and the associated devices
1137@item info chardev
1138show the character devices
1139@item info block
1140show the block devices
1141@item info blockstats
1142show block device statistics
1143@item info registers
1144show the cpu registers
1145@item info cpus
1146show infos for each CPU
1147@item info history
1148show the command line history
1149@item info irq
1150show the interrupts statistics (if available)
1151@item info pic
1152show i8259 (PIC) state
1153@item info pci
1154show emulated PCI device info
1155@item info tlb
1156show virtual to physical memory mappings (i386 only)
1157@item info mem
1158show the active virtual memory mappings (i386 only)
Jan Kiszka33572ec2010-05-31 14:43:30 -03001159@item info jit
1160show dynamic compiler info
1161@item info kvm
1162show KVM information
1163@item info numa
1164show NUMA information
Jan Kiszkab40292e2010-05-31 14:43:31 -03001165@item info kvm
1166show KVM information
Jan Kiszka33572ec2010-05-31 14:43:30 -03001167@item info usb
1168show USB devices plugged on the virtual USB hub
1169@item info usbhost
1170show all USB host devices
1171@item info profile
1172show profiling information
1173@item info capture
1174show information about active capturing
1175@item info snapshots
1176show list of VM snapshots
1177@item info status
1178show the current VM status (running|paused)
1179@item info pcmcia
1180show guest PCMCIA status
1181@item info mice
1182show which guest mouse is receiving events
1183@item info vnc
1184show the vnc server status
1185@item info name
1186show the current VM name
1187@item info uuid
1188show the current VM UUID
1189@item info cpustats
1190show CPU statistics
1191@item info usernet
1192show user network stack connection states
1193@item info migrate
1194show migration status
1195@item info balloon
1196show balloon information
1197@item info qtree
1198show device tree
1199@item info qdm
1200show qdev device model list
1201@item info roms
1202show roms
1203@end table
1204ETEXI
1205
Prerna Saxena22890ab2010-06-24 17:04:53 +05301206#ifdef CONFIG_SIMPLE_TRACE
1207STEXI
1208@item info trace
1209show contents of trace buffer
1210@item info trace-events
1211show available trace events and their state
1212ETEXI
1213#endif
1214
Blue Swirl23130862009-06-06 08:22:04 +00001215STEXI
1216@end table
1217ETEXI