blob: 27d90a24af7a49c3189508f9c64987d946b9c486 [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 Capitulino7a7f3252011-09-15 14:20:28 -030046 .mhandler.cmd = hmp_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 {
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +010056 .name = "block_resize",
57 .args_type = "device:B,size:o",
58 .params = "device size",
59 .help = "resize a block image",
Luiz Capitulino5e7caac2011-11-25 14:57:10 -020060 .mhandler.cmd = hmp_block_resize,
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +010061 },
62
63STEXI
64@item block_resize
65@findex block_resize
66Resize a block image while a guest is running. Usually requires guest
67action to see the updated size. Resize to a lower size is supported,
68but should be used with extreme caution. Note that this command only
69resizes image files, it can not resize block devices like LVM volumes.
70ETEXI
71
Stefan Hajnoczi12bd4512012-01-18 14:40:46 +000072 {
73 .name = "block_stream",
Stefan Hajnoczic83c66c2012-04-25 16:51:03 +010074 .args_type = "device:B,speed:o?,base:s?",
75 .params = "device [speed [base]]",
Stefan Hajnoczi12bd4512012-01-18 14:40:46 +000076 .help = "copy data from a backing file into a block device",
77 .mhandler.cmd = hmp_block_stream,
78 },
79
80STEXI
81@item block_stream
82@findex block_stream
83Copy data from a backing file into a block device.
84ETEXI
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +010085
86 {
Stefan Hajnoczi2d47c6e2012-01-18 14:40:47 +000087 .name = "block_job_set_speed",
Stefan Hajnoczi882ec7c2012-04-25 16:51:02 +010088 .args_type = "device:B,speed:o",
89 .params = "device speed",
Stefan Hajnoczi2d47c6e2012-01-18 14:40:47 +000090 .help = "set maximum speed for a background block operation",
91 .mhandler.cmd = hmp_block_job_set_speed,
92 },
93
94STEXI
Paolo Bonzini4451b792012-04-13 12:03:46 +020095@item block_job_set_speed
96@findex block_job_set_speed
Stefan Hajnoczi2d47c6e2012-01-18 14:40:47 +000097Set maximum speed for a background block operation.
98ETEXI
99
100 {
Stefan Hajnoczi370521a2012-01-18 14:40:48 +0000101 .name = "block_job_cancel",
Paolo Bonzini6e37fb82012-09-28 17:22:51 +0200102 .args_type = "force:-f,device:B",
103 .params = "[-f] device",
104 .help = "stop an active background block operation (use -f"
105 "\n\t\t\t if the operation is currently paused)",
Stefan Hajnoczi370521a2012-01-18 14:40:48 +0000106 .mhandler.cmd = hmp_block_job_cancel,
107 },
108
109STEXI
110@item block_job_cancel
111@findex block_job_cancel
112Stop an active block streaming operation.
113ETEXI
114
115 {
Paolo Bonzini6e37fb82012-09-28 17:22:51 +0200116 .name = "block_job_pause",
117 .args_type = "device:B",
118 .params = "device",
119 .help = "pause an active background block operation",
120 .mhandler.cmd = hmp_block_job_pause,
121 },
122
123STEXI
124@item block_job_pause
125@findex block_job_pause
126Pause an active block streaming operation.
127ETEXI
128
129 {
130 .name = "block_job_resume",
131 .args_type = "device:B",
132 .params = "device",
133 .help = "resume a paused background block operation",
134 .mhandler.cmd = hmp_block_job_resume,
135 },
136
137STEXI
138@item block_job_resume
139@findex block_job_resume
140Resume a paused block streaming operation.
141ETEXI
142
143 {
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300144 .name = "eject",
Luiz Capitulino78d714e2009-12-14 18:53:21 -0200145 .args_type = "force:-f,device:B",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300146 .params = "[-f] device",
147 .help = "eject a removable medium (use -f to force it)",
Luiz Capitulinoc245b6a2011-12-07 16:02:36 -0200148 .mhandler.cmd = hmp_eject,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300149 },
150
Blue Swirl23130862009-06-06 08:22:04 +0000151STEXI
152@item eject [-f] @var{device}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100153@findex eject
Blue Swirl23130862009-06-06 08:22:04 +0000154Eject a removable medium (use -f to force it).
155ETEXI
156
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300157 {
Ryan Harper9063f812010-11-12 11:07:13 -0600158 .name = "drive_del",
159 .args_type = "id:s",
160 .params = "device",
161 .help = "remove host block device",
162 .user_print = monitor_user_noop,
163 .mhandler.cmd_new = do_drive_del,
164 },
165
166STEXI
167@item drive_del @var{device}
168@findex drive_del
169Remove host block device. The result is that guest generated IO is no longer
170submitted against the host device underlying the disk. Once a drive has
171been deleted, the QEMU Block layer returns -EIO which results in IO
172errors in the guest for applications that are reading/writing to the device.
173ETEXI
174
175 {
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300176 .name = "change",
177 .args_type = "device:B,target:F,arg:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300178 .params = "device filename [format]",
179 .help = "change a removable medium, optional format",
Luiz Capitulino333a96e2011-12-08 11:13:50 -0200180 .mhandler.cmd = hmp_change,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300181 },
182
Blue Swirl23130862009-06-06 08:22:04 +0000183STEXI
184@item change @var{device} @var{setting}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100185@findex change
Blue Swirl23130862009-06-06 08:22:04 +0000186
187Change the configuration of a device.
188
189@table @option
190@item change @var{diskdevice} @var{filename} [@var{format}]
191Change the medium for a removable disk device to point to @var{filename}. eg
192
193@example
194(qemu) change ide1-cd0 /path/to/some.iso
195@end example
196
197@var{format} is optional.
198
199@item change vnc @var{display},@var{options}
200Change the configuration of the VNC server. The valid syntax for @var{display}
201and @var{options} are described at @ref{sec_invocation}. eg
202
203@example
204(qemu) change vnc localhost:1
205@end example
206
207@item change vnc password [@var{password}]
208
209Change the password associated with the VNC server. If the new password is not
210supplied, the monitor will prompt for it to be entered. VNC passwords are only
211significant up to 8 letters. eg
212
213@example
214(qemu) change vnc password
215Password: ********
216@end example
217
218@end table
219ETEXI
220
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300221 {
222 .name = "screendump",
223 .args_type = "filename:F",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300224 .params = "filename",
225 .help = "save screen into PPM image 'filename'",
Luiz Capitulinoad39cf62012-05-24 13:48:23 -0300226 .mhandler.cmd = hmp_screen_dump,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300227 },
228
Blue Swirl23130862009-06-06 08:22:04 +0000229STEXI
230@item screendump @var{filename}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100231@findex screendump
Blue Swirl23130862009-06-06 08:22:04 +0000232Save screen into PPM image @var{filename}.
233ETEXI
234
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300235 {
236 .name = "logfile",
237 .args_type = "filename:F",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300238 .params = "filename",
239 .help = "output logs to 'filename'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300240 .mhandler.cmd = do_logfile,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300241 },
242
Blue Swirl23130862009-06-06 08:22:04 +0000243STEXI
244@item logfile @var{filename}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100245@findex logfile
Blue Swirl23130862009-06-06 08:22:04 +0000246Output logs to @var{filename}.
247ETEXI
248
Prerna Saxena22890ab2010-06-24 17:04:53 +0530249 {
250 .name = "trace-event",
251 .args_type = "name:s,option:b",
252 .params = "name on|off",
253 .help = "changes status of a specific trace event",
Lluísfc764102011-08-31 20:31:18 +0200254 .mhandler.cmd = do_trace_event_set_state,
Prerna Saxena22890ab2010-06-24 17:04:53 +0530255 },
256
257STEXI
258@item trace-event
259@findex trace-event
260changes status of a trace event
261ETEXI
Stefan Hajnoczic5ceb522010-07-13 09:26:33 +0100262
Michael Rothc45a8162011-10-02 08:44:37 -0500263#if defined(CONFIG_TRACE_SIMPLE)
Stefan Hajnoczic5ceb522010-07-13 09:26:33 +0100264 {
265 .name = "trace-file",
266 .args_type = "op:s?,arg:F?",
267 .params = "on|off|flush|set [arg]",
268 .help = "open, close, or flush trace file, or set a new file name",
269 .mhandler.cmd = do_trace_file,
270 },
271
272STEXI
273@item trace-file on|off|flush
274@findex trace-file
275Open, close, or flush the trace file. If no argument is given, the status of the trace file is displayed.
276ETEXI
Prerna Saxena22890ab2010-06-24 17:04:53 +0530277#endif
278
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300279 {
280 .name = "log",
281 .args_type = "items:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300282 .params = "item1[,...]",
283 .help = "activate logging of the specified items to '/tmp/qemu.log'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300284 .mhandler.cmd = do_log,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300285 },
286
Blue Swirl23130862009-06-06 08:22:04 +0000287STEXI
288@item log @var{item1}[,...]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100289@findex log
Blue Swirl23130862009-06-06 08:22:04 +0000290Activate logging of the specified items to @file{/tmp/qemu.log}.
291ETEXI
292
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300293 {
294 .name = "savevm",
295 .args_type = "name:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300296 .params = "[tag|id]",
297 .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300298 .mhandler.cmd = do_savevm,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300299 },
300
Blue Swirl23130862009-06-06 08:22:04 +0000301STEXI
302@item savevm [@var{tag}|@var{id}]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100303@findex savevm
Blue Swirl23130862009-06-06 08:22:04 +0000304Create a snapshot of the whole virtual machine. If @var{tag} is
305provided, it is used as human readable identifier. If there is already
306a snapshot with the same tag or ID, it is replaced. More info at
307@ref{vm_snapshots}.
308ETEXI
309
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300310 {
311 .name = "loadvm",
312 .args_type = "name:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300313 .params = "tag|id",
314 .help = "restore a VM snapshot from its tag or id",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300315 .mhandler.cmd = do_loadvm,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300316 },
317
Blue Swirl23130862009-06-06 08:22:04 +0000318STEXI
319@item loadvm @var{tag}|@var{id}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100320@findex loadvm
Blue Swirl23130862009-06-06 08:22:04 +0000321Set the whole virtual machine to the snapshot identified by the tag
322@var{tag} or the unique snapshot ID @var{id}.
323ETEXI
324
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300325 {
326 .name = "delvm",
327 .args_type = "name:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300328 .params = "tag|id",
329 .help = "delete a VM snapshot from its tag or id",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300330 .mhandler.cmd = do_delvm,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300331 },
332
Blue Swirl23130862009-06-06 08:22:04 +0000333STEXI
334@item delvm @var{tag}|@var{id}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100335@findex delvm
Blue Swirl23130862009-06-06 08:22:04 +0000336Delete the snapshot identified by @var{tag} or @var{id}.
337ETEXI
338
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300339 {
340 .name = "singlestep",
341 .args_type = "option:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300342 .params = "[on|off]",
343 .help = "run emulation in singlestep mode or switch to normal mode",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300344 .mhandler.cmd = do_singlestep,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300345 },
346
Blue Swirl23130862009-06-06 08:22:04 +0000347STEXI
348@item singlestep [off]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100349@findex singlestep
Blue Swirl23130862009-06-06 08:22:04 +0000350Run the emulation in single step mode.
351If called with option off, the emulation returns to normal mode.
352ETEXI
353
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300354 {
355 .name = "stop",
356 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300357 .params = "",
358 .help = "stop emulation",
Luiz Capitulino5f158f22011-09-15 14:34:39 -0300359 .mhandler.cmd = hmp_stop,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300360 },
361
Blue Swirl23130862009-06-06 08:22:04 +0000362STEXI
363@item stop
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100364@findex stop
Blue Swirl23130862009-06-06 08:22:04 +0000365Stop emulation.
366ETEXI
367
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300368 {
369 .name = "c|cont",
370 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300371 .params = "",
372 .help = "resume emulation",
Luiz Capitulinoe42e8182011-11-22 17:58:31 -0200373 .mhandler.cmd = hmp_cont,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300374 },
375
Blue Swirl23130862009-06-06 08:22:04 +0000376STEXI
377@item c or cont
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100378@findex cont
Blue Swirl23130862009-06-06 08:22:04 +0000379Resume emulation.
380ETEXI
381
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300382 {
Gerd Hoffmann9b9df252012-02-23 13:45:21 +0100383 .name = "system_wakeup",
384 .args_type = "",
385 .params = "",
386 .help = "wakeup guest from suspend",
387 .mhandler.cmd = hmp_system_wakeup,
388 },
389
390STEXI
391@item system_wakeup
392@findex system_wakeup
393Wakeup guest from suspend.
394ETEXI
395
396 {
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300397 .name = "gdbserver",
398 .args_type = "device:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300399 .params = "[device]",
400 .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300401 .mhandler.cmd = do_gdbserver,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300402 },
403
Blue Swirl23130862009-06-06 08:22:04 +0000404STEXI
405@item gdbserver [@var{port}]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100406@findex gdbserver
Blue Swirl23130862009-06-06 08:22:04 +0000407Start gdbserver session (default @var{port}=1234)
408ETEXI
409
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300410 {
411 .name = "x",
412 .args_type = "fmt:/,addr:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300413 .params = "/fmt addr",
414 .help = "virtual memory dump starting at 'addr'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300415 .mhandler.cmd = do_memory_dump,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300416 },
417
Blue Swirl23130862009-06-06 08:22:04 +0000418STEXI
419@item x/fmt @var{addr}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100420@findex x
Blue Swirl23130862009-06-06 08:22:04 +0000421Virtual memory dump starting at @var{addr}.
422ETEXI
423
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300424 {
425 .name = "xp",
426 .args_type = "fmt:/,addr:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300427 .params = "/fmt addr",
428 .help = "physical memory dump starting at 'addr'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300429 .mhandler.cmd = do_physical_memory_dump,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300430 },
431
Blue Swirl23130862009-06-06 08:22:04 +0000432STEXI
433@item xp /@var{fmt} @var{addr}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100434@findex xp
Blue Swirl23130862009-06-06 08:22:04 +0000435Physical memory dump starting at @var{addr}.
436
437@var{fmt} is a format which tells the command how to format the
438data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
439
440@table @var
441@item count
442is the number of items to be dumped.
443
444@item format
445can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
446c (char) or i (asm instruction).
447
448@item size
449can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
450@code{h} or @code{w} can be specified with the @code{i} format to
451respectively select 16 or 32 bit code instruction size.
452
453@end table
454
455Examples:
456@itemize
457@item
458Dump 10 instructions at the current instruction pointer:
459@example
460(qemu) x/10i $eip
4610x90107063: ret
4620x90107064: sti
4630x90107065: lea 0x0(%esi,1),%esi
4640x90107069: lea 0x0(%edi,1),%edi
4650x90107070: ret
4660x90107071: jmp 0x90107080
4670x90107073: nop
4680x90107074: nop
4690x90107075: nop
4700x90107076: nop
471@end example
472
473@item
474Dump 80 16 bit values at the start of the video memory.
475@smallexample
476(qemu) xp/80hx 0xb8000
4770x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
4780x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
4790x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
4800x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
4810x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
4820x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
4830x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4840x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4850x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4860x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
487@end smallexample
488@end itemize
489ETEXI
490
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300491 {
492 .name = "p|print",
493 .args_type = "fmt:/,val:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300494 .params = "/fmt expr",
495 .help = "print expression value (use $reg for CPU register access)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300496 .mhandler.cmd = do_print,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300497 },
498
Blue Swirl23130862009-06-06 08:22:04 +0000499STEXI
500@item p or print/@var{fmt} @var{expr}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100501@findex print
Blue Swirl23130862009-06-06 08:22:04 +0000502
503Print expression value. Only the @var{format} part of @var{fmt} is
504used.
505ETEXI
506
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300507 {
508 .name = "i",
509 .args_type = "fmt:/,addr:i,index:i.",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300510 .params = "/fmt addr",
511 .help = "I/O port read",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300512 .mhandler.cmd = do_ioport_read,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300513 },
514
Blue Swirl23130862009-06-06 08:22:04 +0000515STEXI
516Read I/O port.
517ETEXI
518
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300519 {
520 .name = "o",
521 .args_type = "fmt:/,addr:i,val:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300522 .params = "/fmt addr value",
523 .help = "I/O port write",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300524 .mhandler.cmd = do_ioport_write,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300525 },
526
Jan Kiszkaf1147842009-07-14 10:20:11 +0200527STEXI
528Write to I/O port.
529ETEXI
Blue Swirl23130862009-06-06 08:22:04 +0000530
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300531 {
532 .name = "sendkey",
Amos Kong2ef20c12012-08-31 10:56:22 +0800533 .args_type = "keys:s,hold-time:i?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300534 .params = "keys [hold_ms]",
535 .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
Amos Konge4c8f002012-08-31 10:56:26 +0800536 .mhandler.cmd = hmp_send_key,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300537 },
538
Blue Swirl23130862009-06-06 08:22:04 +0000539STEXI
540@item sendkey @var{keys}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100541@findex sendkey
Blue Swirl23130862009-06-06 08:22:04 +0000542
Amos Kong886cc702012-08-31 10:56:20 +0800543Send @var{keys} to the guest. @var{keys} could be the name of the
544key or the raw value in hexadecimal format. Use @code{-} to press
545several keys simultaneously. Example:
Blue Swirl23130862009-06-06 08:22:04 +0000546@example
547sendkey ctrl-alt-f1
548@end example
549
550This command is useful to send keys that your graphical user interface
551intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
552ETEXI
553
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300554 {
555 .name = "system_reset",
556 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300557 .params = "",
558 .help = "reset the system",
Luiz Capitulino38d22652011-09-15 14:41:46 -0300559 .mhandler.cmd = hmp_system_reset,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300560 },
561
Blue Swirl23130862009-06-06 08:22:04 +0000562STEXI
563@item system_reset
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100564@findex system_reset
Blue Swirl23130862009-06-06 08:22:04 +0000565
566Reset the system.
567ETEXI
568
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300569 {
570 .name = "system_powerdown",
571 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300572 .params = "",
573 .help = "send system power down event",
Luiz Capitulino5bc465e2011-09-28 11:06:15 -0300574 .mhandler.cmd = hmp_system_powerdown,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300575 },
576
Blue Swirl23130862009-06-06 08:22:04 +0000577STEXI
578@item system_powerdown
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100579@findex system_powerdown
Blue Swirl23130862009-06-06 08:22:04 +0000580
581Power down the system (if supported).
582ETEXI
583
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300584 {
585 .name = "sum",
586 .args_type = "start:i,size:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300587 .params = "addr size",
588 .help = "compute the checksum of a memory region",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300589 .mhandler.cmd = do_sum,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300590 },
591
Blue Swirl23130862009-06-06 08:22:04 +0000592STEXI
593@item sum @var{addr} @var{size}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100594@findex sum
Blue Swirl23130862009-06-06 08:22:04 +0000595
596Compute the checksum of a memory region.
597ETEXI
598
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300599 {
600 .name = "usb_add",
601 .args_type = "devname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300602 .params = "device",
603 .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300604 .mhandler.cmd = do_usb_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300605 },
606
Blue Swirl23130862009-06-06 08:22:04 +0000607STEXI
608@item usb_add @var{devname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100609@findex usb_add
Blue Swirl23130862009-06-06 08:22:04 +0000610
611Add the USB device @var{devname}. For details of available devices see
612@ref{usb_devices}
613ETEXI
614
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300615 {
616 .name = "usb_del",
617 .args_type = "devname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300618 .params = "device",
619 .help = "remove USB device 'bus.addr'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300620 .mhandler.cmd = do_usb_del,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300621 },
622
Blue Swirl23130862009-06-06 08:22:04 +0000623STEXI
624@item usb_del @var{devname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100625@findex usb_del
Blue Swirl23130862009-06-06 08:22:04 +0000626
627Remove the USB device @var{devname} from the QEMU virtual USB
628hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
629command @code{info usb} to see the devices you can remove.
630ETEXI
631
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300632 {
633 .name = "device_add",
Markus Armbrusterc7e4e8c2010-02-10 20:47:28 +0100634 .args_type = "device:O",
635 .params = "driver[,prop=value][,...]",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300636 .help = "add device, like -device on the command line",
Markus Armbruster8bc27242010-02-10 20:52:01 +0100637 .user_print = monitor_user_noop,
638 .mhandler.cmd_new = do_device_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300639 },
640
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200641STEXI
642@item device_add @var{config}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100643@findex device_add
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200644
645Add device.
646ETEXI
647
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300648 {
649 .name = "device_del",
650 .args_type = "id:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300651 .params = "device",
652 .help = "remove device",
Luiz Capitulinoa15fef22012-03-29 12:38:50 -0300653 .mhandler.cmd = hmp_device_del,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300654 },
655
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200656STEXI
657@item device_del @var{id}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100658@findex device_del
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200659
660Remove device @var{id}.
661ETEXI
662
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300663 {
664 .name = "cpu",
665 .args_type = "index:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300666 .params = "index",
667 .help = "set the default CPU",
Luiz Capitulino755f1962011-10-06 14:31:39 -0300668 .mhandler.cmd = hmp_cpu,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300669 },
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200670
Blue Swirl23130862009-06-06 08:22:04 +0000671STEXI
Markus Armbrusterc427ea92010-05-04 13:20:32 +0200672@item cpu @var{index}
673@findex cpu
Blue Swirl23130862009-06-06 08:22:04 +0000674Set the default CPU.
675ETEXI
676
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300677 {
678 .name = "mouse_move",
679 .args_type = "dx_str:s,dy_str:s,dz_str:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300680 .params = "dx dy [dz]",
681 .help = "send mouse move events",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300682 .mhandler.cmd = do_mouse_move,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300683 },
684
Blue Swirl23130862009-06-06 08:22:04 +0000685STEXI
686@item mouse_move @var{dx} @var{dy} [@var{dz}]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100687@findex mouse_move
Blue Swirl23130862009-06-06 08:22:04 +0000688Move the active mouse to the specified coordinates @var{dx} @var{dy}
689with optional scroll axis @var{dz}.
690ETEXI
691
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300692 {
693 .name = "mouse_button",
694 .args_type = "button_state:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300695 .params = "state",
696 .help = "change mouse button state (1=L, 2=M, 4=R)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300697 .mhandler.cmd = do_mouse_button,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300698 },
699
Blue Swirl23130862009-06-06 08:22:04 +0000700STEXI
701@item mouse_button @var{val}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100702@findex mouse_button
Blue Swirl23130862009-06-06 08:22:04 +0000703Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
704ETEXI
705
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300706 {
707 .name = "mouse_set",
708 .args_type = "index:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300709 .params = "index",
710 .help = "set which mouse device receives events",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300711 .mhandler.cmd = do_mouse_set,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300712 },
713
Blue Swirl23130862009-06-06 08:22:04 +0000714STEXI
715@item mouse_set @var{index}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100716@findex mouse_set
Blue Swirl23130862009-06-06 08:22:04 +0000717Set which mouse device receives events at given @var{index}, index
718can be obtained with
719@example
720info mice
721@end example
722ETEXI
723
724#ifdef HAS_AUDIO
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300725 {
726 .name = "wavcapture",
727 .args_type = "path:F,freq:i?,bits:i?,nchannels:i?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300728 .params = "path [frequency [bits [channels]]]",
729 .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300730 .mhandler.cmd = do_wav_capture,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300731 },
Blue Swirl23130862009-06-06 08:22:04 +0000732#endif
733STEXI
734@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100735@findex wavcapture
Blue Swirl23130862009-06-06 08:22:04 +0000736Capture audio into @var{filename}. Using sample rate @var{frequency}
737bits per sample @var{bits} and number of channels @var{channels}.
738
739Defaults:
740@itemize @minus
741@item Sample rate = 44100 Hz - CD quality
742@item Bits = 16
743@item Number of channels = 2 - Stereo
744@end itemize
745ETEXI
746
747#ifdef HAS_AUDIO
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300748 {
749 .name = "stopcapture",
750 .args_type = "n:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300751 .params = "capture index",
752 .help = "stop capture",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300753 .mhandler.cmd = do_stop_capture,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300754 },
Blue Swirl23130862009-06-06 08:22:04 +0000755#endif
756STEXI
757@item stopcapture @var{index}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100758@findex stopcapture
Blue Swirl23130862009-06-06 08:22:04 +0000759Stop capture with a given @var{index}, index can be obtained with
760@example
761info capture
762@end example
763ETEXI
764
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300765 {
766 .name = "memsave",
767 .args_type = "val:l,size:i,filename:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300768 .params = "addr size file",
769 .help = "save to disk virtual memory dump starting at 'addr' of size 'size'",
Luiz Capitulino0cfd6a92011-11-22 16:32:37 -0200770 .mhandler.cmd = hmp_memsave,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300771 },
772
Blue Swirl23130862009-06-06 08:22:04 +0000773STEXI
774@item memsave @var{addr} @var{size} @var{file}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100775@findex memsave
Blue Swirl23130862009-06-06 08:22:04 +0000776save to disk virtual memory dump starting at @var{addr} of size @var{size}.
777ETEXI
778
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300779 {
780 .name = "pmemsave",
781 .args_type = "val:l,size:i,filename:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300782 .params = "addr size file",
783 .help = "save to disk physical memory dump starting at 'addr' of size 'size'",
Luiz Capitulino6d3962b2011-11-22 17:26:46 -0200784 .mhandler.cmd = hmp_pmemsave,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300785 },
786
Blue Swirl23130862009-06-06 08:22:04 +0000787STEXI
788@item pmemsave @var{addr} @var{size} @var{file}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100789@findex pmemsave
Blue Swirl23130862009-06-06 08:22:04 +0000790save to disk physical memory dump starting at @var{addr} of size @var{size}.
791ETEXI
792
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300793 {
794 .name = "boot_set",
795 .args_type = "bootdevice:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300796 .params = "bootdevice",
797 .help = "define new values for the boot device list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300798 .mhandler.cmd = do_boot_set,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300799 },
800
Blue Swirl23130862009-06-06 08:22:04 +0000801STEXI
802@item boot_set @var{bootdevicelist}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100803@findex boot_set
Blue Swirl23130862009-06-06 08:22:04 +0000804
805Define new values for the boot device list. Those values will override
806the values specified on the command line through the @code{-boot} option.
807
808The values that can be specified here depend on the machine type, but are
809the same that can be specified in the @code{-boot} command line option.
810ETEXI
811
812#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300813 {
814 .name = "nmi",
Luiz Capitulinoe9b4b432011-04-29 12:11:50 -0300815 .args_type = "",
816 .params = "",
817 .help = "inject an NMI on all guest's CPUs",
Luiz Capitulinoab49ab52011-11-23 12:55:53 -0200818 .mhandler.cmd = hmp_inject_nmi,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300819 },
Blue Swirl23130862009-06-06 08:22:04 +0000820#endif
821STEXI
822@item nmi @var{cpu}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100823@findex nmi
Blue Swirl23130862009-06-06 08:22:04 +0000824Inject an NMI on the given CPU (x86 only).
825ETEXI
826
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300827 {
828 .name = "migrate",
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200829 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
830 .params = "[-d] [-b] [-i] uri",
831 .help = "migrate to URI (using -d to not wait for completion)"
832 "\n\t\t\t -b for migration without shared storage with"
833 " full copy of disk\n\t\t\t -i for migration without "
834 "shared storage with incremental copy of disk "
835 "(base image shared between src and destination)",
Luiz Capitulinoe1c37d02011-12-05 14:48:01 -0200836 .mhandler.cmd = hmp_migrate,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300837 },
838
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200839
Blue Swirl23130862009-06-06 08:22:04 +0000840STEXI
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200841@item migrate [-d] [-b] [-i] @var{uri}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100842@findex migrate
Blue Swirl23130862009-06-06 08:22:04 +0000843Migrate to @var{uri} (using -d to not wait for completion).
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200844 -b for migration with full copy of disk
845 -i for migration with incremental copy of disk (base image is shared)
Blue Swirl23130862009-06-06 08:22:04 +0000846ETEXI
847
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300848 {
849 .name = "migrate_cancel",
850 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300851 .params = "",
852 .help = "cancel the current VM migration",
Luiz Capitulino6cdedb02011-11-27 22:54:09 -0200853 .mhandler.cmd = hmp_migrate_cancel,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300854 },
855
Blue Swirl23130862009-06-06 08:22:04 +0000856STEXI
857@item migrate_cancel
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100858@findex migrate_cancel
Blue Swirl23130862009-06-06 08:22:04 +0000859Cancel the current VM migration.
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300860
861ETEXI
862
863 {
864 .name = "migrate_set_cache_size",
865 .args_type = "value:o",
866 .params = "value",
867 .help = "set cache size (in bytes) for XBZRLE migrations,"
868 "the cache size will be rounded down to the nearest "
869 "power of 2.\n"
870 "The cache size affects the number of cache misses."
871 "In case of a high cache miss ratio you need to increase"
872 " the cache size",
873 .mhandler.cmd = hmp_migrate_set_cache_size,
874 },
875
876STEXI
877@item migrate_set_cache_size @var{value}
878@findex migrate_set_cache_size
879Set cache size to @var{value} (in bytes) for xbzrle migrations.
Blue Swirl23130862009-06-06 08:22:04 +0000880ETEXI
881
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300882 {
883 .name = "migrate_set_speed",
Jes Sorensened3d4a82010-10-21 17:15:48 +0200884 .args_type = "value:o",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300885 .params = "value",
Jes Sorensened3d4a82010-10-21 17:15:48 +0200886 .help = "set maximum speed (in bytes) for migrations. "
887 "Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
Luiz Capitulino3dc85382011-11-28 11:59:37 -0200888 .mhandler.cmd = hmp_migrate_set_speed,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300889 },
890
Blue Swirl23130862009-06-06 08:22:04 +0000891STEXI
892@item migrate_set_speed @var{value}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100893@findex migrate_set_speed
Blue Swirl23130862009-06-06 08:22:04 +0000894Set maximum speed to @var{value} (in bytes) for migrations.
895ETEXI
896
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300897 {
898 .name = "migrate_set_downtime",
Markus Armbrusterb0fbf7d2010-01-25 14:23:07 +0100899 .args_type = "value:T",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300900 .params = "value",
901 .help = "set maximum tolerated downtime (in seconds) for migrations",
Luiz Capitulino4f0a9932011-11-27 23:18:01 -0200902 .mhandler.cmd = hmp_migrate_set_downtime,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300903 },
Glauber Costa2ea42952009-05-28 15:22:58 -0400904
905STEXI
906@item migrate_set_downtime @var{second}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100907@findex migrate_set_downtime
Glauber Costa2ea42952009-05-28 15:22:58 -0400908Set maximum tolerated downtime (in seconds) for migration.
909ETEXI
910
Jes Sorensenf8882562010-12-16 13:52:16 +0100911 {
Orit Wasserman00458432012-08-06 21:42:48 +0300912 .name = "migrate_set_capability",
913 .args_type = "capability:s,state:b",
914 .params = "capability state",
915 .help = "Enable/Disable the usage of a capability for migration",
916 .mhandler.cmd = hmp_migrate_set_capability,
917 },
918
919STEXI
920@item migrate_set_capability @var{capability} @var{state}
921@findex migrate_set_capability
922Enable/Disable the usage of a capability @var{capability} for migration.
923ETEXI
924
925 {
Jes Sorensen2ea720d2011-03-09 16:54:34 +0100926 .name = "client_migrate_info",
927 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
928 .params = "protocol hostname port tls-port cert-subject",
929 .help = "send migration info to spice/vnc client",
930 .user_print = monitor_user_noop,
Yonit Halperinedc5cb12011-10-17 10:03:18 +0200931 .mhandler.cmd_async = client_migrate_info,
932 .flags = MONITOR_CMD_ASYNC,
Jes Sorensenf8882562010-12-16 13:52:16 +0100933 },
934
935STEXI
Gerd Hoffmanne866e232010-04-23 13:28:21 +0200936@item client_migrate_info @var{protocol} @var{hostname} @var{port} @var{tls-port} @var{cert-subject}
937@findex client_migrate_info
938Set the spice/vnc connection info for the migration target. The spice/vnc
939server will ask the spice/vnc client to automatically reconnect using the
940new parameters (if specified) once the vm migration finished successfully.
941ETEXI
942
Wen Congyang783e9b42012-05-07 12:10:47 +0800943#if defined(CONFIG_HAVE_CORE_DUMP)
944 {
945 .name = "dump-guest-memory",
946 .args_type = "paging:-p,protocol:s,begin:i?,length:i?",
947 .params = "[-p] protocol [begin] [length]",
948 .help = "dump guest memory to file"
949 "\n\t\t\t begin(optional): the starting physical address"
950 "\n\t\t\t length(optional): the memory size, in bytes",
951 .user_print = monitor_user_noop,
952 .mhandler.cmd = hmp_dump_guest_memory,
953 },
954
955
956STEXI
957@item dump-guest-memory [-p] @var{protocol} @var{begin} @var{length}
958@findex dump-guest-memory
959Dump guest memory to @var{protocol}. The file can be processed with crash or
960gdb.
961 protocol: destination file(started with "file:") or destination file
962 descriptor (started with "fd:")
963 paging: do paging to get guest's memory mapping
964 begin: the starting physical address. It's optional, and should be
965 specified with length together.
966 length: the memory size, in bytes. It's optional, and should be specified
967 with begin together.
968ETEXI
969#endif
970
Gerd Hoffmanne866e232010-04-23 13:28:21 +0200971 {
Jes Sorensen2ea720d2011-03-09 16:54:34 +0100972 .name = "snapshot_blkdev",
Paolo Bonzini6cc2a412012-03-06 18:55:59 +0100973 .args_type = "reuse:-n,device:B,snapshot-file:s?,format:s?",
974 .params = "[-n] device [new-image-file] [format]",
Jes Sorensen2ea720d2011-03-09 16:54:34 +0100975 .help = "initiates a live snapshot\n\t\t\t"
976 "of device. If a new image file is specified, the\n\t\t\t"
977 "new image file will become the new root image.\n\t\t\t"
978 "If format is specified, the snapshot file will\n\t\t\t"
979 "be created in that format. Otherwise the\n\t\t\t"
Paolo Bonzini6cc2a412012-03-06 18:55:59 +0100980 "snapshot will be internal! (currently unsupported).\n\t\t\t"
981 "The default format is qcow2. The -n flag requests QEMU\n\t\t\t"
982 "to reuse the image found in new-image-file, instead of\n\t\t\t"
983 "recreating it from scratch.",
Luiz Capitulino6106e242011-11-25 16:15:19 -0200984 .mhandler.cmd = hmp_snapshot_blkdev,
Gerd Hoffmanne866e232010-04-23 13:28:21 +0200985 },
986
987STEXI
Jes Sorensenf8882562010-12-16 13:52:16 +0100988@item snapshot_blkdev
989@findex snapshot_blkdev
990Snapshot device, using snapshot file as target if provided
991ETEXI
992
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300993 {
994 .name = "drive_add",
995 .args_type = "pci_addr:s,opts:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300996 .params = "[[<domain>:]<bus>:]<slot>\n"
997 "[file=file][,if=type][,bus=n]\n"
Stefan Hajnoczifb0490f2011-11-17 13:40:32 +0000998 "[,unit=m][,media=d][,index=i]\n"
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300999 "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
Stefan Hajnoczifb0490f2011-11-17 13:40:32 +00001000 "[,snapshot=on|off][,cache=on|off]\n"
1001 "[,readonly=on|off][,copy-on-read=on|off]",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001002 .help = "add drive to PCI storage controller",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001003 .mhandler.cmd = drive_hot_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001004 },
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001005
Blue Swirl23130862009-06-06 08:22:04 +00001006STEXI
1007@item drive_add
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001008@findex drive_add
Blue Swirl23130862009-06-06 08:22:04 +00001009Add drive to PCI storage controller.
1010ETEXI
1011
1012#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001013 {
1014 .name = "pci_add",
1015 .args_type = "pci_addr:s,type:s,opts:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001016 .params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
1017 .help = "hot-add PCI device",
Markus Armbruster6c6a58a2010-05-12 10:53:00 +02001018 .mhandler.cmd = pci_device_hot_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001019 },
Blue Swirl23130862009-06-06 08:22:04 +00001020#endif
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001021
Blue Swirl23130862009-06-06 08:22:04 +00001022STEXI
1023@item pci_add
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001024@findex pci_add
Blue Swirl23130862009-06-06 08:22:04 +00001025Hot-add PCI device.
1026ETEXI
1027
1028#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001029 {
1030 .name = "pci_del",
1031 .args_type = "pci_addr:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001032 .params = "[[<domain>:]<bus>:]<slot>",
1033 .help = "hot remove PCI device",
Markus Armbrusterb752daf2010-05-12 10:53:01 +02001034 .mhandler.cmd = do_pci_device_hot_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001035 },
Blue Swirl23130862009-06-06 08:22:04 +00001036#endif
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001037
Blue Swirl23130862009-06-06 08:22:04 +00001038STEXI
1039@item pci_del
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001040@findex pci_del
Blue Swirl23130862009-06-06 08:22:04 +00001041Hot remove PCI device.
1042ETEXI
1043
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001044 {
Isaku Yamahata2ae63bd2010-12-24 12:14:14 +09001045 .name = "pcie_aer_inject_error",
1046 .args_type = "advisory_non_fatal:-a,correctable:-c,"
1047 "id:s,error_status:s,"
1048 "header0:i?,header1:i?,header2:i?,header3:i?,"
1049 "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
1050 .params = "[-a] [-c] id "
1051 "<error_status> [<tlp header> [<tlp header prefix>]]",
1052 .help = "inject pcie aer error\n\t\t\t"
1053 " -a for advisory non fatal error\n\t\t\t"
1054 " -c for correctable error\n\t\t\t"
1055 "<id> = qdev device id\n\t\t\t"
1056 "<error_status> = error string or 32bit\n\t\t\t"
1057 "<tlb header> = 32bit x 4\n\t\t\t"
1058 "<tlb header prefix> = 32bit x 4",
1059 .user_print = pcie_aer_inject_error_print,
Zhi Yong Wu1f3392b2011-11-30 12:39:47 +08001060 .mhandler.cmd_new = do_pcie_aer_inject_error,
Isaku Yamahata2ae63bd2010-12-24 12:14:14 +09001061 },
1062
1063STEXI
1064@item pcie_aer_inject_error
1065@findex pcie_aer_inject_error
1066Inject PCIe AER error
1067ETEXI
1068
1069 {
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001070 .name = "host_net_add",
1071 .args_type = "device:s,opts:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001072 .params = "tap|user|socket|vde|dump [options]",
1073 .help = "add host VLAN client",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001074 .mhandler.cmd = net_host_device_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001075 },
1076
Blue Swirl23130862009-06-06 08:22:04 +00001077STEXI
1078@item host_net_add
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001079@findex host_net_add
Blue Swirl23130862009-06-06 08:22:04 +00001080Add host VLAN client.
1081ETEXI
1082
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001083 {
1084 .name = "host_net_remove",
1085 .args_type = "vlan_id:i,device:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001086 .params = "vlan_id name",
1087 .help = "remove host VLAN client",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001088 .mhandler.cmd = net_host_device_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001089 },
1090
Blue Swirl23130862009-06-06 08:22:04 +00001091STEXI
1092@item host_net_remove
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001093@findex host_net_remove
Blue Swirl23130862009-06-06 08:22:04 +00001094Remove host VLAN client.
1095ETEXI
1096
Markus Armbrusterae82d322010-03-25 17:22:40 +01001097 {
1098 .name = "netdev_add",
1099 .args_type = "netdev:O",
1100 .params = "[user|tap|socket],id=str[,prop=value][,...]",
1101 .help = "add host network device",
Luiz Capitulino928059a2012-04-18 17:34:15 -03001102 .mhandler.cmd = hmp_netdev_add,
Markus Armbrusterae82d322010-03-25 17:22:40 +01001103 },
1104
1105STEXI
1106@item netdev_add
1107@findex netdev_add
1108Add host network device.
1109ETEXI
1110
1111 {
1112 .name = "netdev_del",
1113 .args_type = "id:s",
1114 .params = "id",
1115 .help = "remove host network device",
Luiz Capitulino5f964152012-04-16 14:36:32 -03001116 .mhandler.cmd = hmp_netdev_del,
Markus Armbrusterae82d322010-03-25 17:22:40 +01001117 },
1118
1119STEXI
1120@item netdev_del
1121@findex netdev_del
1122Remove host network device.
1123ETEXI
1124
Blue Swirl23130862009-06-06 08:22:04 +00001125#ifdef CONFIG_SLIRP
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001126 {
1127 .name = "hostfwd_add",
1128 .args_type = "arg1:s,arg2:s?,arg3:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001129 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
1130 .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001131 .mhandler.cmd = net_slirp_hostfwd_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001132 },
Markus Armbruster21413d62010-05-04 13:20:30 +02001133#endif
1134STEXI
1135@item hostfwd_add
1136@findex hostfwd_add
1137Redirect TCP or UDP connections from host to guest (requires -net user).
1138ETEXI
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001139
Markus Armbruster21413d62010-05-04 13:20:30 +02001140#ifdef CONFIG_SLIRP
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001141 {
1142 .name = "hostfwd_remove",
1143 .args_type = "arg1:s,arg2:s?,arg3:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001144 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
1145 .help = "remove host-to-guest TCP or UDP redirection",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001146 .mhandler.cmd = net_slirp_hostfwd_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001147 },
1148
Blue Swirl23130862009-06-06 08:22:04 +00001149#endif
1150STEXI
Markus Armbruster21413d62010-05-04 13:20:30 +02001151@item hostfwd_remove
1152@findex hostfwd_remove
1153Remove host-to-guest TCP or UDP redirection.
Blue Swirl23130862009-06-06 08:22:04 +00001154ETEXI
1155
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001156 {
1157 .name = "balloon",
Luiz Capitulino3b0bd6e2009-12-18 13:25:05 -02001158 .args_type = "value:M",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001159 .params = "target",
Riccardo Magliocchetti3c056132010-05-19 18:49:28 +02001160 .help = "request VM to change its memory allocation (in MB)",
Luiz Capitulinod72f3262011-11-25 14:38:09 -02001161 .mhandler.cmd = hmp_balloon,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001162 },
1163
Blue Swirl23130862009-06-06 08:22:04 +00001164STEXI
1165@item balloon @var{value}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001166@findex balloon
Blue Swirl23130862009-06-06 08:22:04 +00001167Request VM to change its memory allocation to @var{value} (in MB).
1168ETEXI
1169
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001170 {
1171 .name = "set_link",
Markus Armbrusterc9b26a42010-03-26 09:07:10 +01001172 .args_type = "name:s,up:b",
1173 .params = "name on|off",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001174 .help = "change the link status of a network adapter",
Luiz Capitulino4b371562011-11-23 13:11:55 -02001175 .mhandler.cmd = hmp_set_link,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001176 },
1177
Blue Swirl23130862009-06-06 08:22:04 +00001178STEXI
Markus Armbrusterc9b26a42010-03-26 09:07:10 +01001179@item set_link @var{name} [on|off]
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001180@findex set_link
Markus Armbrusterc9b26a42010-03-26 09:07:10 +01001181Switch link @var{name} on (i.e. up) or off (i.e. down).
Blue Swirl23130862009-06-06 08:22:04 +00001182ETEXI
1183
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001184 {
1185 .name = "watchdog_action",
1186 .args_type = "action:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001187 .params = "[reset|shutdown|poweroff|pause|debug|none]",
1188 .help = "change watchdog action",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001189 .mhandler.cmd = do_watchdog_action,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001190 },
1191
Blue Swirl23130862009-06-06 08:22:04 +00001192STEXI
1193@item watchdog_action
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001194@findex watchdog_action
Blue Swirl23130862009-06-06 08:22:04 +00001195Change watchdog action.
1196ETEXI
1197
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001198 {
1199 .name = "acl_show",
1200 .args_type = "aclname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001201 .params = "aclname",
1202 .help = "list rules in the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001203 .mhandler.cmd = do_acl_show,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001204 },
1205
Blue Swirl23130862009-06-06 08:22:04 +00001206STEXI
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001207@item acl_show @var{aclname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001208@findex acl_show
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001209List all the matching rules in the access control list, and the default
1210policy. There are currently two named access control lists,
1211@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
1212certificate distinguished name, and SASL username respectively.
1213ETEXI
Blue Swirl23130862009-06-06 08:22:04 +00001214
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001215 {
1216 .name = "acl_policy",
1217 .args_type = "aclname:s,policy:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001218 .params = "aclname allow|deny",
1219 .help = "set default access control list policy",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001220 .mhandler.cmd = do_acl_policy,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001221 },
1222
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001223STEXI
Jan Kiszkacbbfacc2009-07-03 08:46:05 +02001224@item acl_policy @var{aclname} @code{allow|deny}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001225@findex acl_policy
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001226Set the default access control list policy, used in the event that
Blue Swirl23130862009-06-06 08:22:04 +00001227none of the explicit rules match. The default policy at startup is
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001228always @code{deny}.
1229ETEXI
1230
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001231 {
1232 .name = "acl_add",
1233 .args_type = "aclname:s,match:s,policy:s,index:i?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001234 .params = "aclname match allow|deny [index]",
1235 .help = "add a match rule to the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001236 .mhandler.cmd = do_acl_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001237 },
1238
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001239STEXI
Markus Armbruster0e4aec92010-05-04 13:20:31 +02001240@item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
1241@findex acl_add
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001242Add a match rule to the access control list, allowing or denying access.
1243The match will normally be an exact username or x509 distinguished name,
1244but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
1245allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
Blue Swirl23130862009-06-06 08:22:04 +00001246normally be appended to the end of the ACL, but can be inserted
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001247earlier in the list if the optional @var{index} parameter is supplied.
1248ETEXI
1249
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001250 {
1251 .name = "acl_remove",
1252 .args_type = "aclname:s,match:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001253 .params = "aclname match",
1254 .help = "remove a match rule from the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001255 .mhandler.cmd = do_acl_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001256 },
1257
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001258STEXI
1259@item acl_remove @var{aclname} @var{match}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001260@findex acl_remove
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001261Remove the specified match rule from the access control list.
1262ETEXI
1263
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001264 {
1265 .name = "acl_reset",
1266 .args_type = "aclname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001267 .params = "aclname",
1268 .help = "reset the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001269 .mhandler.cmd = do_acl_reset,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001270 },
1271
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001272STEXI
Markus Armbruster0e4aec92010-05-04 13:20:31 +02001273@item acl_reset @var{aclname}
1274@findex acl_reset
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001275Remove all matches from the access control list, and set the default
Blue Swirl23130862009-06-06 08:22:04 +00001276policy back to @code{deny}.
Blue Swirl23130862009-06-06 08:22:04 +00001277ETEXI
1278
Huang Ying79c4f6b2009-06-23 10:05:14 +08001279#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001280
1281 {
1282 .name = "mce",
Jin Dongming31ce5e02010-12-10 17:21:02 +09001283 .args_type = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
1284 .params = "[-b] cpu bank status mcgstatus addr misc",
1285 .help = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001286 .mhandler.cmd = do_inject_mce,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001287 },
1288
Huang Ying79c4f6b2009-06-23 10:05:14 +08001289#endif
1290STEXI
1291@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001292@findex mce (x86)
Huang Ying79c4f6b2009-06-23 10:05:14 +08001293Inject an MCE on the given CPU (x86 only).
1294ETEXI
1295
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001296 {
1297 .name = "getfd",
1298 .args_type = "fdname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001299 .params = "getfd name",
1300 .help = "receive a file descriptor via SCM rights and assign it a name",
Corey Bryant208c9d12012-06-22 14:36:09 -04001301 .mhandler.cmd = hmp_getfd,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001302 },
1303
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001304STEXI
1305@item getfd @var{fdname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001306@findex getfd
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001307If a file descriptor is passed alongside this command using the SCM_RIGHTS
1308mechanism on unix sockets, it is stored using the name @var{fdname} for
1309later use by other monitor commands.
1310ETEXI
1311
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001312 {
1313 .name = "closefd",
1314 .args_type = "fdname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001315 .params = "closefd name",
1316 .help = "close a file descriptor previously passed via SCM rights",
Corey Bryant208c9d12012-06-22 14:36:09 -04001317 .mhandler.cmd = hmp_closefd,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001318 },
1319
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001320STEXI
1321@item closefd @var{fdname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001322@findex closefd
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001323Close the file descriptor previously assigned to @var{fdname} using the
1324@code{getfd} command. This is only needed if the file descriptor was never
1325used by another monitor command.
1326ETEXI
1327
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001328 {
1329 .name = "block_passwd",
1330 .args_type = "device:B,password:s",
1331 .params = "block_passwd device password",
1332 .help = "set the password of encrypted block devices",
Luiz Capitulinoa4dea8a2011-11-23 13:28:21 -02001333 .mhandler.cmd = hmp_block_passwd,
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001334 },
1335
1336STEXI
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001337@item block_set_io_throttle @var{device} @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}
1338@findex block_set_io_throttle
1339Change I/O throttle limits for a block drive to @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}
1340ETEXI
1341
1342 {
1343 .name = "block_set_io_throttle",
1344 .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
1345 .params = "device bps bps_rd bps_wr iops iops_rd iops_wr",
1346 .help = "change I/O throttle limits for a block drive",
Luiz Capitulino80047da2011-12-14 16:49:14 -02001347 .mhandler.cmd = hmp_block_set_io_throttle,
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001348 },
1349
1350STEXI
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001351@item block_passwd @var{device} @var{password}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001352@findex block_passwd
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001353Set the encrypted device @var{device} password to @var{password}
1354ETEXI
Jan Kiszkab40292e2010-05-31 14:43:31 -03001355
Jan Kiszka33572ec2010-05-31 14:43:30 -03001356 {
Gerd Hoffmann75721502010-10-07 12:22:54 +02001357 .name = "set_password",
1358 .args_type = "protocol:s,password:s,connected:s?",
1359 .params = "protocol password action-if-connected",
1360 .help = "set spice/vnc password",
Luiz Capitulinofbf796f2011-12-07 11:17:51 -02001361 .mhandler.cmd = hmp_set_password,
Gerd Hoffmann75721502010-10-07 12:22:54 +02001362 },
1363
1364STEXI
1365@item set_password [ vnc | spice ] password [ action-if-connected ]
1366@findex set_password
1367
1368Change spice/vnc password. Use zero to make the password stay valid
1369forever. @var{action-if-connected} specifies what should happen in
1370case a connection is established: @var{fail} makes the password change
1371fail. @var{disconnect} changes the password and disconnects the
1372client. @var{keep} changes the password and keeps the connection up.
1373@var{keep} is the default.
1374ETEXI
1375
1376 {
1377 .name = "expire_password",
1378 .args_type = "protocol:s,time:s",
1379 .params = "protocol time",
1380 .help = "set spice/vnc password expire-time",
Luiz Capitulino9ad53722011-12-07 11:47:57 -02001381 .mhandler.cmd = hmp_expire_password,
Gerd Hoffmann75721502010-10-07 12:22:54 +02001382 },
1383
1384STEXI
1385@item expire_password [ vnc | spice ] expire-time
1386@findex expire_password
1387
1388Specify when a password for spice/vnc becomes
1389invalid. @var{expire-time} accepts:
1390
1391@table @var
1392@item now
1393Invalidate password instantly.
1394
1395@item never
1396Password stays valid forever.
1397
1398@item +nsec
1399Password stays valid for @var{nsec} seconds starting now.
1400
1401@item nsec
1402Password is invalidated at the given time. @var{nsec} are the seconds
1403passed since 1970, i.e. unix epoch.
1404
1405@end table
1406ETEXI
1407
1408 {
Jan Kiszka33572ec2010-05-31 14:43:30 -03001409 .name = "info",
1410 .args_type = "item:s?",
1411 .params = "[subcommand]",
1412 .help = "show various information about the system state",
Luiz Capitulino1162daa2010-09-13 12:15:26 -03001413 .mhandler.cmd = do_info,
Jan Kiszka33572ec2010-05-31 14:43:30 -03001414 },
1415
1416STEXI
1417@item info @var{subcommand}
1418@findex info
1419Show various information about the system state.
1420
1421@table @option
1422@item info version
1423show the version of QEMU
Jan Kiszka33572ec2010-05-31 14:43:30 -03001424@item info network
1425show the various VLANs and the associated devices
1426@item info chardev
1427show the character devices
1428@item info block
1429show the block devices
1430@item info blockstats
1431show block device statistics
1432@item info registers
1433show the cpu registers
1434@item info cpus
1435show infos for each CPU
1436@item info history
1437show the command line history
1438@item info irq
1439show the interrupts statistics (if available)
1440@item info pic
1441show i8259 (PIC) state
1442@item info pci
1443show emulated PCI device info
1444@item info tlb
Max Filippov692f7372012-01-07 20:02:40 +04001445show virtual to physical memory mappings (i386, SH4, SPARC, PPC, and Xtensa only)
Jan Kiszka33572ec2010-05-31 14:43:30 -03001446@item info mem
1447show the active virtual memory mappings (i386 only)
Jan Kiszka33572ec2010-05-31 14:43:30 -03001448@item info jit
1449show dynamic compiler info
Jan Kiszka33572ec2010-05-31 14:43:30 -03001450@item info numa
1451show NUMA information
Jan Kiszkab40292e2010-05-31 14:43:31 -03001452@item info kvm
1453show KVM information
Jan Kiszka33572ec2010-05-31 14:43:30 -03001454@item info usb
1455show USB devices plugged on the virtual USB hub
1456@item info usbhost
1457show all USB host devices
1458@item info profile
1459show profiling information
1460@item info capture
1461show information about active capturing
1462@item info snapshots
1463show list of VM snapshots
1464@item info status
1465show the current VM status (running|paused)
1466@item info pcmcia
1467show guest PCMCIA status
1468@item info mice
1469show which guest mouse is receiving events
1470@item info vnc
1471show the vnc server status
1472@item info name
1473show the current VM name
1474@item info uuid
1475show the current VM UUID
1476@item info cpustats
1477show CPU statistics
1478@item info usernet
1479show user network stack connection states
1480@item info migrate
1481show migration status
Orit Wassermanbbf6da32012-08-06 21:42:47 +03001482@item info migrate_capabilities
1483show current migration capabilities
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +03001484@item info migrate_cache_size
1485show current migration XBZRLE cache size
Jan Kiszka33572ec2010-05-31 14:43:30 -03001486@item info balloon
1487show balloon information
1488@item info qtree
1489show device tree
1490@item info qdm
1491show qdev device model list
1492@item info roms
1493show roms
1494@end table
1495ETEXI
1496
Lluís6d8a7642011-08-31 20:30:43 +02001497#ifdef CONFIG_TRACE_SIMPLE
Prerna Saxena22890ab2010-06-24 17:04:53 +05301498STEXI
1499@item info trace
1500show contents of trace buffer
Lluís31965ae2011-08-31 20:31:24 +02001501ETEXI
1502#endif
1503
1504STEXI
Prerna Saxena22890ab2010-06-24 17:04:53 +05301505@item info trace-events
1506show available trace events and their state
1507ETEXI
Prerna Saxena22890ab2010-06-24 17:04:53 +05301508
Blue Swirl23130862009-06-06 08:22:04 +00001509STEXI
1510@end table
1511ETEXI