Statistics
| Branch: | Revision:

root / hmp-commands.hx @ feature-archipelago

History | View | Annotate | Download (48.2 kB)

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