blob: 81999aa1a9a5d6ac71cb5249a68866e815ab820b [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",
Markus Armbrusteree9545d2010-03-26 09:07:08 +0100757 .args_type = "value:f",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300758 .params = "value",
759 .help = "set maximum speed (in bytes) for migrations",
Markus Armbruster5fd90832010-01-25 14:23:05 +0100760 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200761 .mhandler.cmd_new = do_migrate_set_speed,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300762 },
763
Blue Swirl23130862009-06-06 08:22:04 +0000764STEXI
765@item migrate_set_speed @var{value}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100766@findex migrate_set_speed
Blue Swirl23130862009-06-06 08:22:04 +0000767Set maximum speed to @var{value} (in bytes) for migrations.
768ETEXI
769
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300770 {
771 .name = "migrate_set_downtime",
Markus Armbrusterb0fbf7d2010-01-25 14:23:07 +0100772 .args_type = "value:T",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300773 .params = "value",
774 .help = "set maximum tolerated downtime (in seconds) for migrations",
Markus Armbrusterc6027f52010-01-25 14:23:08 +0100775 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200776 .mhandler.cmd_new = do_migrate_set_downtime,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300777 },
Glauber Costa2ea42952009-05-28 15:22:58 -0400778
779STEXI
780@item migrate_set_downtime @var{second}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100781@findex migrate_set_downtime
Glauber Costa2ea42952009-05-28 15:22:58 -0400782Set maximum tolerated downtime (in seconds) for migration.
783ETEXI
784
Blue Swirl23130862009-06-06 08:22:04 +0000785#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300786 {
787 .name = "drive_add",
788 .args_type = "pci_addr:s,opts:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300789 .params = "[[<domain>:]<bus>:]<slot>\n"
790 "[file=file][,if=type][,bus=n]\n"
791 "[,unit=m][,media=d][index=i]\n"
792 "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
793 "[snapshot=on|off][,cache=on|off]",
794 .help = "add drive to PCI storage controller",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300795 .mhandler.cmd = drive_hot_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300796 },
Blue Swirl23130862009-06-06 08:22:04 +0000797#endif
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300798
Blue Swirl23130862009-06-06 08:22:04 +0000799STEXI
800@item drive_add
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100801@findex drive_add
Blue Swirl23130862009-06-06 08:22:04 +0000802Add drive to PCI storage controller.
803ETEXI
804
805#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300806 {
807 .name = "pci_add",
808 .args_type = "pci_addr:s,type:s,opts:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300809 .params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
810 .help = "hot-add PCI device",
Markus Armbruster6c6a58a2010-05-12 10:53:00 +0200811 .mhandler.cmd = pci_device_hot_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300812 },
Blue Swirl23130862009-06-06 08:22:04 +0000813#endif
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300814
Blue Swirl23130862009-06-06 08:22:04 +0000815STEXI
816@item pci_add
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100817@findex pci_add
Blue Swirl23130862009-06-06 08:22:04 +0000818Hot-add PCI device.
819ETEXI
820
821#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300822 {
823 .name = "pci_del",
824 .args_type = "pci_addr:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300825 .params = "[[<domain>:]<bus>:]<slot>",
826 .help = "hot remove PCI device",
Markus Armbrusterb752daf2010-05-12 10:53:01 +0200827 .mhandler.cmd = do_pci_device_hot_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300828 },
Blue Swirl23130862009-06-06 08:22:04 +0000829#endif
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300830
Blue Swirl23130862009-06-06 08:22:04 +0000831STEXI
832@item pci_del
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100833@findex pci_del
Blue Swirl23130862009-06-06 08:22:04 +0000834Hot remove PCI device.
835ETEXI
836
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300837 {
838 .name = "host_net_add",
839 .args_type = "device:s,opts:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300840 .params = "tap|user|socket|vde|dump [options]",
841 .help = "add host VLAN client",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300842 .mhandler.cmd = net_host_device_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300843 },
844
Blue Swirl23130862009-06-06 08:22:04 +0000845STEXI
846@item host_net_add
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100847@findex host_net_add
Blue Swirl23130862009-06-06 08:22:04 +0000848Add host VLAN client.
849ETEXI
850
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300851 {
852 .name = "host_net_remove",
853 .args_type = "vlan_id:i,device:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300854 .params = "vlan_id name",
855 .help = "remove host VLAN client",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300856 .mhandler.cmd = net_host_device_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300857 },
858
Blue Swirl23130862009-06-06 08:22:04 +0000859STEXI
860@item host_net_remove
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100861@findex host_net_remove
Blue Swirl23130862009-06-06 08:22:04 +0000862Remove host VLAN client.
863ETEXI
864
Markus Armbrusterae82d322010-03-25 17:22:40 +0100865 {
866 .name = "netdev_add",
867 .args_type = "netdev:O",
868 .params = "[user|tap|socket],id=str[,prop=value][,...]",
869 .help = "add host network device",
870 .user_print = monitor_user_noop,
871 .mhandler.cmd_new = do_netdev_add,
872 },
873
874STEXI
875@item netdev_add
876@findex netdev_add
877Add host network device.
878ETEXI
879
880 {
881 .name = "netdev_del",
882 .args_type = "id:s",
883 .params = "id",
884 .help = "remove host network device",
885 .user_print = monitor_user_noop,
886 .mhandler.cmd_new = do_netdev_del,
887 },
888
889STEXI
890@item netdev_del
891@findex netdev_del
892Remove host network device.
893ETEXI
894
Blue Swirl23130862009-06-06 08:22:04 +0000895#ifdef CONFIG_SLIRP
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300896 {
897 .name = "hostfwd_add",
898 .args_type = "arg1:s,arg2:s?,arg3:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300899 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
900 .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300901 .mhandler.cmd = net_slirp_hostfwd_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300902 },
Markus Armbruster21413d62010-05-04 13:20:30 +0200903#endif
904STEXI
905@item hostfwd_add
906@findex hostfwd_add
907Redirect TCP or UDP connections from host to guest (requires -net user).
908ETEXI
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300909
Markus Armbruster21413d62010-05-04 13:20:30 +0200910#ifdef CONFIG_SLIRP
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300911 {
912 .name = "hostfwd_remove",
913 .args_type = "arg1:s,arg2:s?,arg3:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300914 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
915 .help = "remove host-to-guest TCP or UDP redirection",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300916 .mhandler.cmd = net_slirp_hostfwd_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300917 },
918
Blue Swirl23130862009-06-06 08:22:04 +0000919#endif
920STEXI
Markus Armbruster21413d62010-05-04 13:20:30 +0200921@item hostfwd_remove
922@findex hostfwd_remove
923Remove host-to-guest TCP or UDP redirection.
Blue Swirl23130862009-06-06 08:22:04 +0000924ETEXI
925
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300926 {
927 .name = "balloon",
Luiz Capitulino3b0bd6e2009-12-18 13:25:05 -0200928 .args_type = "value:M",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300929 .params = "target",
Riccardo Magliocchetti3c056132010-05-19 18:49:28 +0200930 .help = "request VM to change its memory allocation (in MB)",
Luiz Capitulino83fb1de2009-10-07 13:42:01 -0300931 .user_print = monitor_user_noop,
Adam Litke625a5be2010-01-26 14:17:35 -0600932 .mhandler.cmd_async = do_balloon,
Jan Kiszka8ac470c2010-06-16 00:38:39 +0200933 .flags = MONITOR_CMD_ASYNC,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300934 },
935
Blue Swirl23130862009-06-06 08:22:04 +0000936STEXI
937@item balloon @var{value}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100938@findex balloon
Blue Swirl23130862009-06-06 08:22:04 +0000939Request VM to change its memory allocation to @var{value} (in MB).
940ETEXI
941
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300942 {
943 .name = "set_link",
Markus Armbrusterc9b26a42010-03-26 09:07:10 +0100944 .args_type = "name:s,up:b",
945 .params = "name on|off",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300946 .help = "change the link status of a network adapter",
Markus Armbruster5369e3c2010-03-26 09:07:11 +0100947 .user_print = monitor_user_noop,
948 .mhandler.cmd_new = do_set_link,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300949 },
950
Blue Swirl23130862009-06-06 08:22:04 +0000951STEXI
Markus Armbrusterc9b26a42010-03-26 09:07:10 +0100952@item set_link @var{name} [on|off]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100953@findex set_link
Markus Armbrusterc9b26a42010-03-26 09:07:10 +0100954Switch link @var{name} on (i.e. up) or off (i.e. down).
Blue Swirl23130862009-06-06 08:22:04 +0000955ETEXI
956
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300957 {
958 .name = "watchdog_action",
959 .args_type = "action:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300960 .params = "[reset|shutdown|poweroff|pause|debug|none]",
961 .help = "change watchdog action",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300962 .mhandler.cmd = do_watchdog_action,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300963 },
964
Blue Swirl23130862009-06-06 08:22:04 +0000965STEXI
966@item watchdog_action
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100967@findex watchdog_action
Blue Swirl23130862009-06-06 08:22:04 +0000968Change watchdog action.
969ETEXI
970
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300971 {
972 .name = "acl_show",
973 .args_type = "aclname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300974 .params = "aclname",
975 .help = "list rules in the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300976 .mhandler.cmd = do_acl_show,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300977 },
978
Blue Swirl23130862009-06-06 08:22:04 +0000979STEXI
Jan Kiszka15dfcd42009-06-25 08:22:08 +0200980@item acl_show @var{aclname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100981@findex acl_show
Jan Kiszka15dfcd42009-06-25 08:22:08 +0200982List all the matching rules in the access control list, and the default
983policy. There are currently two named access control lists,
984@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
985certificate distinguished name, and SASL username respectively.
986ETEXI
Blue Swirl23130862009-06-06 08:22:04 +0000987
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300988 {
989 .name = "acl_policy",
990 .args_type = "aclname:s,policy:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300991 .params = "aclname allow|deny",
992 .help = "set default access control list policy",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300993 .mhandler.cmd = do_acl_policy,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300994 },
995
Jan Kiszka15dfcd42009-06-25 08:22:08 +0200996STEXI
Jan Kiszkacbbfacc2009-07-03 08:46:05 +0200997@item acl_policy @var{aclname} @code{allow|deny}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100998@findex acl_policy
Jan Kiszka15dfcd42009-06-25 08:22:08 +0200999Set the default access control list policy, used in the event that
Blue Swirl23130862009-06-06 08:22:04 +00001000none of the explicit rules match. The default policy at startup is
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001001always @code{deny}.
1002ETEXI
1003
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001004 {
1005 .name = "acl_add",
1006 .args_type = "aclname:s,match:s,policy:s,index:i?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001007 .params = "aclname match allow|deny [index]",
1008 .help = "add a match rule to the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001009 .mhandler.cmd = do_acl_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001010 },
1011
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001012STEXI
Markus Armbruster0e4aec92010-05-04 13:20:31 +02001013@item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
1014@findex acl_add
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001015Add a match rule to the access control list, allowing or denying access.
1016The match will normally be an exact username or x509 distinguished name,
1017but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
1018allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
Blue Swirl23130862009-06-06 08:22:04 +00001019normally be appended to the end of the ACL, but can be inserted
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001020earlier in the list if the optional @var{index} parameter is supplied.
1021ETEXI
1022
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001023 {
1024 .name = "acl_remove",
1025 .args_type = "aclname:s,match:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001026 .params = "aclname match",
1027 .help = "remove a match rule from the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001028 .mhandler.cmd = do_acl_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001029 },
1030
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001031STEXI
1032@item acl_remove @var{aclname} @var{match}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001033@findex acl_remove
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001034Remove the specified match rule from the access control list.
1035ETEXI
1036
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001037 {
1038 .name = "acl_reset",
1039 .args_type = "aclname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001040 .params = "aclname",
1041 .help = "reset the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001042 .mhandler.cmd = do_acl_reset,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001043 },
1044
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001045STEXI
Markus Armbruster0e4aec92010-05-04 13:20:31 +02001046@item acl_reset @var{aclname}
1047@findex acl_reset
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001048Remove all matches from the access control list, and set the default
Blue Swirl23130862009-06-06 08:22:04 +00001049policy back to @code{deny}.
Blue Swirl23130862009-06-06 08:22:04 +00001050ETEXI
1051
Huang Ying79c4f6b2009-06-23 10:05:14 +08001052#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001053
1054 {
1055 .name = "mce",
1056 .args_type = "cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001057 .params = "cpu bank status mcgstatus addr misc",
1058 .help = "inject a MCE on the given CPU",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001059 .mhandler.cmd = do_inject_mce,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001060 },
1061
Huang Ying79c4f6b2009-06-23 10:05:14 +08001062#endif
1063STEXI
1064@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001065@findex mce (x86)
Huang Ying79c4f6b2009-06-23 10:05:14 +08001066Inject an MCE on the given CPU (x86 only).
1067ETEXI
1068
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001069 {
1070 .name = "getfd",
1071 .args_type = "fdname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001072 .params = "getfd name",
1073 .help = "receive a file descriptor via SCM rights and assign it a name",
Luiz Capitulinof0d60002009-10-16 12:23:50 -03001074 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -02001075 .mhandler.cmd_new = do_getfd,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001076 },
1077
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001078STEXI
1079@item getfd @var{fdname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001080@findex getfd
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001081If a file descriptor is passed alongside this command using the SCM_RIGHTS
1082mechanism on unix sockets, it is stored using the name @var{fdname} for
1083later use by other monitor commands.
1084ETEXI
1085
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001086 {
1087 .name = "closefd",
1088 .args_type = "fdname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001089 .params = "closefd name",
1090 .help = "close a file descriptor previously passed via SCM rights",
Luiz Capitulino18f3a512009-10-16 12:23:51 -03001091 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -02001092 .mhandler.cmd_new = do_closefd,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001093 },
1094
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001095STEXI
1096@item closefd @var{fdname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001097@findex closefd
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001098Close the file descriptor previously assigned to @var{fdname} using the
1099@code{getfd} command. This is only needed if the file descriptor was never
1100used by another monitor command.
1101ETEXI
1102
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001103 {
1104 .name = "block_passwd",
1105 .args_type = "device:B,password:s",
1106 .params = "block_passwd device password",
1107 .help = "set the password of encrypted block devices",
1108 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -02001109 .mhandler.cmd_new = do_block_set_passwd,
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001110 },
1111
1112STEXI
1113@item block_passwd @var{device} @var{password}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001114@findex block_passwd
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001115Set the encrypted device @var{device} password to @var{password}
1116ETEXI
Jan Kiszkab40292e2010-05-31 14:43:31 -03001117
Jan Kiszka33572ec2010-05-31 14:43:30 -03001118 {
1119 .name = "info",
1120 .args_type = "item:s?",
1121 .params = "[subcommand]",
1122 .help = "show various information about the system state",
Luiz Capitulino1162daa2010-09-13 12:15:26 -03001123 .mhandler.cmd = do_info,
Jan Kiszka33572ec2010-05-31 14:43:30 -03001124 },
1125
1126STEXI
1127@item info @var{subcommand}
1128@findex info
1129Show various information about the system state.
1130
1131@table @option
1132@item info version
1133show the version of QEMU
Jan Kiszka33572ec2010-05-31 14:43:30 -03001134@item info network
1135show the various VLANs and the associated devices
1136@item info chardev
1137show the character devices
1138@item info block
1139show the block devices
1140@item info blockstats
1141show block device statistics
1142@item info registers
1143show the cpu registers
1144@item info cpus
1145show infos for each CPU
1146@item info history
1147show the command line history
1148@item info irq
1149show the interrupts statistics (if available)
1150@item info pic
1151show i8259 (PIC) state
1152@item info pci
1153show emulated PCI device info
1154@item info tlb
1155show virtual to physical memory mappings (i386 only)
1156@item info mem
1157show the active virtual memory mappings (i386 only)
Jan Kiszka33572ec2010-05-31 14:43:30 -03001158@item info jit
1159show dynamic compiler info
1160@item info kvm
1161show KVM information
1162@item info numa
1163show NUMA information
Jan Kiszkab40292e2010-05-31 14:43:31 -03001164@item info kvm
1165show KVM information
Jan Kiszka33572ec2010-05-31 14:43:30 -03001166@item info usb
1167show USB devices plugged on the virtual USB hub
1168@item info usbhost
1169show all USB host devices
1170@item info profile
1171show profiling information
1172@item info capture
1173show information about active capturing
1174@item info snapshots
1175show list of VM snapshots
1176@item info status
1177show the current VM status (running|paused)
1178@item info pcmcia
1179show guest PCMCIA status
1180@item info mice
1181show which guest mouse is receiving events
1182@item info vnc
1183show the vnc server status
1184@item info name
1185show the current VM name
1186@item info uuid
1187show the current VM UUID
1188@item info cpustats
1189show CPU statistics
1190@item info usernet
1191show user network stack connection states
1192@item info migrate
1193show migration status
1194@item info balloon
1195show balloon information
1196@item info qtree
1197show device tree
1198@item info qdm
1199show qdev device model list
1200@item info roms
1201show roms
1202@end table
1203ETEXI
1204
Prerna Saxena22890ab2010-06-24 17:04:53 +05301205#ifdef CONFIG_SIMPLE_TRACE
1206STEXI
1207@item info trace
1208show contents of trace buffer
1209@item info trace-events
1210show available trace events and their state
1211ETEXI
1212#endif
1213
Blue Swirl23130862009-06-06 08:22:04 +00001214STEXI
1215@end table
1216ETEXI