blob: 1088d6450386cc493884ab51266d5d2bd8182416 [file] [log] [blame]
Peter Maydell3c95fde2020-03-06 17:17:44 +00001HXCOMM Use DEFHEADING() to define headings in both help text and rST.
2HXCOMM Text between SRST and ERST is copied to the rST version and
3HXCOMM discarded from C version.
Blue Swirl23130862009-06-06 08:22:04 +00004HXCOMM DEF(command, args, callback, arg_string, help) is used to construct
5HXCOMM monitor commands
Peter Maydell3c95fde2020-03-06 17:17:44 +00006HXCOMM HXCOMM can be used for comments, discarded from both rST and C.
Blue Swirl23130862009-06-06 08:22:04 +00007
Blue Swirl23130862009-06-06 08:22:04 +00008
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03009 {
10 .name = "help|?",
Wenchao Xia129be002013-08-27 20:38:26 +080011 .args_type = "name:S?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030012 .params = "[cmd]",
13 .help = "show the help",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +040014 .cmd = do_help_cmd,
Dr. David Alan Gilbert31785f12018-06-20 16:39:42 +010015 .flags = "p",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030016 },
17
Peter Maydella6b30bc2020-02-28 15:36:06 +000018SRST
19``help`` or ``?`` [*cmd*]
20 Show the help for all commands or just for command *cmd*.
21ERST
Blue Swirl23130862009-06-06 08:22:04 +000022
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030023 {
24 .name = "commit",
25 .args_type = "device:B",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030026 .params = "device|all",
27 .help = "commit changes to the disk images (if -snapshot is used) or backing files",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +040028 .cmd = hmp_commit,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030029 },
30
Peter Maydella6b30bc2020-02-28 15:36:06 +000031SRST
32``commit``
33 Commit changes to the disk images (if -snapshot is used) or backing files.
34 If the backing file is smaller than the snapshot, then the backing file
35 will be resized to be the same size as the snapshot. If the snapshot is
36 smaller than the backing file, the backing file will not be truncated.
37 If you want the backing file to match the size of the smaller snapshot,
38 you can safely truncate it yourself once the commit operation successfully
39 completes.
40ERST
Blue Swirl23130862009-06-06 08:22:04 +000041
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030042 {
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030043 .name = "q|quit",
44 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030045 .params = "",
46 .help = "quit the emulator",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +040047 .cmd = hmp_quit,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030048 },
49
Peter Maydella6b30bc2020-02-28 15:36:06 +000050SRST
51``q`` or ``quit``
52 Quit the emulator.
53ERST
Blue Swirl23130862009-06-06 08:22:04 +000054
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030055 {
Dr. David Alan Gilbert8e8581e2018-06-20 16:39:46 +010056 .name = "exit_preconfig",
57 .args_type = "",
58 .params = "",
59 .help = "exit the preconfig state",
60 .cmd = hmp_exit_preconfig,
61 .flags = "p",
62 },
63
Peter Maydella6b30bc2020-02-28 15:36:06 +000064SRST
65``exit_preconfig``
66 This command makes QEMU exit the preconfig state and proceed with
67 VM initialization using configuration data provided on the command line
68 and via the QMP monitor during the preconfig state. The command is only
69 available during the preconfig state (i.e. when the --preconfig command
70 line option was in use).
71ERST
Dr. David Alan Gilbert8e8581e2018-06-20 16:39:46 +010072
73 {
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +010074 .name = "block_resize",
75 .args_type = "device:B,size:o",
76 .params = "device size",
77 .help = "resize a block image",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +040078 .cmd = hmp_block_resize,
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +010079 },
80
Peter Maydella6b30bc2020-02-28 15:36:06 +000081SRST
82``block_resize``
83 Resize a block image while a guest is running. Usually requires guest
84 action to see the updated size. Resize to a lower size is supported,
85 but should be used with extreme caution. Note that this command only
86 resizes image files, it can not resize block devices like LVM volumes.
87ERST
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +010088
Stefan Hajnoczi12bd4512012-01-18 14:40:46 +000089 {
90 .name = "block_stream",
Stefan Hajnoczic83c66c2012-04-25 16:51:03 +010091 .args_type = "device:B,speed:o?,base:s?",
92 .params = "device [speed [base]]",
Stefan Hajnoczi12bd4512012-01-18 14:40:46 +000093 .help = "copy data from a backing file into a block device",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +040094 .cmd = hmp_block_stream,
Stefan Hajnoczi12bd4512012-01-18 14:40:46 +000095 },
96
Peter Maydella6b30bc2020-02-28 15:36:06 +000097SRST
98``block_stream``
99 Copy data from a backing file into a block device.
100ERST
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +0100101
102 {
Stefan Hajnoczi2d47c6e2012-01-18 14:40:47 +0000103 .name = "block_job_set_speed",
Stefan Hajnoczi882ec7c2012-04-25 16:51:02 +0100104 .args_type = "device:B,speed:o",
105 .params = "device speed",
Stefan Hajnoczi2d47c6e2012-01-18 14:40:47 +0000106 .help = "set maximum speed for a background block operation",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400107 .cmd = hmp_block_job_set_speed,
Stefan Hajnoczi2d47c6e2012-01-18 14:40:47 +0000108 },
109
Peter Maydella6b30bc2020-02-28 15:36:06 +0000110SRST
111``block_job_set_speed``
112 Set maximum speed for a background block operation.
113ERST
Stefan Hajnoczi2d47c6e2012-01-18 14:40:47 +0000114
115 {
Stefan Hajnoczi370521a2012-01-18 14:40:48 +0000116 .name = "block_job_cancel",
Paolo Bonzini6e37fb82012-09-28 17:22:51 +0200117 .args_type = "force:-f,device:B",
118 .params = "[-f] device",
119 .help = "stop an active background block operation (use -f"
Liang Lib76e4452018-03-13 08:12:16 -0400120 "\n\t\t\t if you want to abort the operation immediately"
121 "\n\t\t\t instead of keep running until data is in sync)",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400122 .cmd = hmp_block_job_cancel,
Stefan Hajnoczi370521a2012-01-18 14:40:48 +0000123 },
124
Peter Maydella6b30bc2020-02-28 15:36:06 +0000125SRST
126``block_job_cancel``
127 Stop an active background block operation (streaming, mirroring).
128ERST
Paolo Bonziniaeae8832012-10-18 16:49:21 +0200129
130 {
131 .name = "block_job_complete",
132 .args_type = "device:B",
133 .params = "device",
134 .help = "stop an active background block operation",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400135 .cmd = hmp_block_job_complete,
Paolo Bonziniaeae8832012-10-18 16:49:21 +0200136 },
137
Peter Maydella6b30bc2020-02-28 15:36:06 +0000138SRST
139``block_job_complete``
140 Manually trigger completion of an active background block operation.
141 For mirroring, this will switch the device to the destination path.
142ERST
Stefan Hajnoczi370521a2012-01-18 14:40:48 +0000143
144 {
Paolo Bonzini6e37fb82012-09-28 17:22:51 +0200145 .name = "block_job_pause",
146 .args_type = "device:B",
147 .params = "device",
148 .help = "pause an active background block operation",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400149 .cmd = hmp_block_job_pause,
Paolo Bonzini6e37fb82012-09-28 17:22:51 +0200150 },
151
Peter Maydella6b30bc2020-02-28 15:36:06 +0000152SRST
153``block_job_pause``
154 Pause an active block streaming operation.
155ERST
Paolo Bonzini6e37fb82012-09-28 17:22:51 +0200156
157 {
158 .name = "block_job_resume",
159 .args_type = "device:B",
160 .params = "device",
161 .help = "resume a paused background block operation",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400162 .cmd = hmp_block_job_resume,
Paolo Bonzini6e37fb82012-09-28 17:22:51 +0200163 },
164
Peter Maydella6b30bc2020-02-28 15:36:06 +0000165SRST
166``block_job_resume``
167 Resume a paused block streaming operation.
168ERST
Paolo Bonzini6e37fb82012-09-28 17:22:51 +0200169
170 {
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300171 .name = "eject",
Luiz Capitulino78d714e2009-12-14 18:53:21 -0200172 .args_type = "force:-f,device:B",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300173 .params = "[-f] device",
174 .help = "eject a removable medium (use -f to force it)",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400175 .cmd = hmp_eject,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300176 },
177
Peter Maydella6b30bc2020-02-28 15:36:06 +0000178SRST
179``eject [-f]`` *device*
180 Eject a removable medium (use -f to force it).
181ERST
Blue Swirl23130862009-06-06 08:22:04 +0000182
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300183 {
Ryan Harper9063f812010-11-12 11:07:13 -0600184 .name = "drive_del",
Hani Benhabilesf7bdc412014-04-13 16:25:05 +0100185 .args_type = "id:B",
Ryan Harper9063f812010-11-12 11:07:13 -0600186 .params = "device",
187 .help = "remove host block device",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400188 .cmd = hmp_drive_del,
Ryan Harper9063f812010-11-12 11:07:13 -0600189 },
190
Peter Maydella6b30bc2020-02-28 15:36:06 +0000191SRST
192``drive_del`` *device*
193 Remove host block device. The result is that guest generated IO is no longer
194 submitted against the host device underlying the disk. Once a drive has
195 been deleted, the QEMU Block layer returns -EIO which results in IO
196 errors in the guest for applications that are reading/writing to the device.
197 These errors are always reported to the guest, regardless of the drive's error
198 actions (drive options rerror, werror).
199ERST
Ryan Harper9063f812010-11-12 11:07:13 -0600200
201 {
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300202 .name = "change",
Max Reitzbaead0a2015-10-26 21:39:18 +0100203 .args_type = "device:B,target:F,arg:s?,read-only-mode:s?",
204 .params = "device filename [format [read-only-mode]]",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300205 .help = "change a removable medium, optional format",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400206 .cmd = hmp_change,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300207 },
208
Peter Maydella6b30bc2020-02-28 15:36:06 +0000209SRST
210``change`` *device* *setting*
211 Change the configuration of a device.
212
213 ``change`` *diskdevice* *filename* [*format* [*read-only-mode*]]
214 Change the medium for a removable disk device to point to *filename*. eg::
215
216 (qemu) change ide1-cd0 /path/to/some.iso
217
218 *format* is optional.
219
220 *read-only-mode* may be used to change the read-only status of the device.
221 It accepts the following values:
222
223 retain
224 Retains the current status; this is the default.
225
226 read-only
227 Makes the device read-only.
228
229 read-write
230 Makes the device writable.
231
232 ``change vnc`` *display*,\ *options*
233 Change the configuration of the VNC server. The valid syntax for *display*
234 and *options* are described at :ref:`sec_005finvocation`. eg::
235
236 (qemu) change vnc localhost:1
237
238 ``change vnc password`` [*password*]
239
240 Change the password associated with the VNC server. If the new password
241 is not supplied, the monitor will prompt for it to be entered. VNC
242 passwords are only significant up to 8 letters. eg::
243
244 (qemu) change vnc password
245 Password: ********
246
247ERST
Blue Swirl23130862009-06-06 08:22:04 +0000248
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300249 {
250 .name = "screendump",
Thomas Huthf771c542018-03-05 17:37:48 +0100251 .args_type = "filename:F,device:s?,head:i?",
252 .params = "filename [device [head]]",
253 .help = "save screen from head 'head' of display device 'device' "
254 "into PPM image 'filename'",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400255 .cmd = hmp_screendump,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300256 },
257
Peter Maydella6b30bc2020-02-28 15:36:06 +0000258SRST
259``screendump`` *filename*
260 Save screen into PPM image *filename*.
261ERST
Blue Swirl23130862009-06-06 08:22:04 +0000262
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300263 {
264 .name = "logfile",
265 .args_type = "filename:F",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300266 .params = "filename",
267 .help = "output logs to 'filename'",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400268 .cmd = hmp_logfile,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300269 },
270
Peter Maydella6b30bc2020-02-28 15:36:06 +0000271SRST
272``logfile`` *filename*
273 Output logs to *filename*.
274ERST
Blue Swirl23130862009-06-06 08:22:04 +0000275
Prerna Saxena22890ab2010-06-24 17:04:53 +0530276 {
277 .name = "trace-event",
Lluís Vilanova77e2b172016-07-11 12:53:57 +0200278 .args_type = "name:s,option:b,vcpu:i?",
279 .params = "name on|off [vcpu]",
280 .help = "changes status of a specific trace event "
281 "(vcpu: vCPU to set, default is all)",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400282 .cmd = hmp_trace_event,
Dr. David Alan Gilbert987bd272015-08-14 11:27:43 +0100283 .command_completion = trace_event_completion,
Prerna Saxena22890ab2010-06-24 17:04:53 +0530284 },
285
Peter Maydella6b30bc2020-02-28 15:36:06 +0000286SRST
287``trace-event``
288 changes status of a trace event
289ERST
Stefan Hajnoczic5ceb522010-07-13 09:26:33 +0100290
Michael Rothc45a8162011-10-02 08:44:37 -0500291#if defined(CONFIG_TRACE_SIMPLE)
Stefan Hajnoczic5ceb522010-07-13 09:26:33 +0100292 {
293 .name = "trace-file",
294 .args_type = "op:s?,arg:F?",
295 .params = "on|off|flush|set [arg]",
296 .help = "open, close, or flush trace file, or set a new file name",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400297 .cmd = hmp_trace_file,
Stefan Hajnoczic5ceb522010-07-13 09:26:33 +0100298 },
299
Peter Maydella6b30bc2020-02-28 15:36:06 +0000300SRST
301``trace-file on|off|flush``
302 Open, close, or flush the trace file. If no argument is given, the
303 status of the trace file is displayed.
304ERST
Prerna Saxena22890ab2010-06-24 17:04:53 +0530305#endif
306
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300307 {
308 .name = "log",
309 .args_type = "items:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300310 .params = "item1[,...]",
Peter Maydell989b6972013-02-26 17:52:40 +0000311 .help = "activate logging of the specified items",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400312 .cmd = hmp_log,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300313 },
314
Peter Maydella6b30bc2020-02-28 15:36:06 +0000315SRST
316``log`` *item1*\ [,...]
317 Activate logging of the specified items.
318ERST
Blue Swirl23130862009-06-06 08:22:04 +0000319
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300320 {
321 .name = "savevm",
322 .args_type = "name:s?",
Daniel Henrique Barboza6ca08042018-11-07 11:09:58 -0200323 .params = "tag",
324 .help = "save a VM snapshot. If no tag is provided, a new snapshot is created",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400325 .cmd = hmp_savevm,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300326 },
327
Peter Maydella6b30bc2020-02-28 15:36:06 +0000328SRST
329``savevm`` *tag*
330 Create a snapshot of the whole virtual machine. If *tag* is
331 provided, it is used as human readable identifier. If there is already
332 a snapshot with the same tag, it is replaced. More info at
333 :ref:`vm_005fsnapshots`.
334
335 Since 4.0, savevm stopped allowing the snapshot id to be set, accepting
336 only *tag* as parameter.
337ERST
Blue Swirl23130862009-06-06 08:22:04 +0000338
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300339 {
340 .name = "loadvm",
341 .args_type = "name:s",
Daniel Henrique Barboza6ca08042018-11-07 11:09:58 -0200342 .params = "tag",
343 .help = "restore a VM snapshot from its tag",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400344 .cmd = hmp_loadvm,
Hani Benhabilesb21631f2014-05-27 23:39:37 +0100345 .command_completion = loadvm_completion,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300346 },
347
Peter Maydella6b30bc2020-02-28 15:36:06 +0000348SRST
349``loadvm`` *tag*
350 Set the whole virtual machine to the snapshot identified by the tag
351 *tag*.
352
353 Since 4.0, loadvm stopped accepting snapshot id as parameter.
354ERST
Blue Swirl23130862009-06-06 08:22:04 +0000355
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300356 {
357 .name = "delvm",
358 .args_type = "name:s",
Daniel Henrique Barboza6ca08042018-11-07 11:09:58 -0200359 .params = "tag",
360 .help = "delete a VM snapshot from its tag",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400361 .cmd = hmp_delvm,
Hani Benhabilesb21631f2014-05-27 23:39:37 +0100362 .command_completion = delvm_completion,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300363 },
364
Peter Maydella6b30bc2020-02-28 15:36:06 +0000365SRST
366``delvm`` *tag*
367 Delete the snapshot identified by *tag*.
368
369 Since 4.0, delvm stopped deleting snapshots by snapshot id, accepting
370 only *tag* as parameter.
371ERST
Blue Swirl23130862009-06-06 08:22:04 +0000372
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300373 {
374 .name = "singlestep",
375 .args_type = "option:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300376 .params = "[on|off]",
377 .help = "run emulation in singlestep mode or switch to normal mode",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400378 .cmd = hmp_singlestep,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300379 },
380
Peter Maydella6b30bc2020-02-28 15:36:06 +0000381SRST
382``singlestep [off]``
383 Run the emulation in single step mode.
384 If called with option off, the emulation returns to normal mode.
385ERST
Blue Swirl23130862009-06-06 08:22:04 +0000386
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300387 {
388 .name = "stop",
389 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300390 .params = "",
391 .help = "stop emulation",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400392 .cmd = hmp_stop,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300393 },
394
Peter Maydella6b30bc2020-02-28 15:36:06 +0000395SRST
396``stop``
397 Stop emulation.
398ERST
Blue Swirl23130862009-06-06 08:22:04 +0000399
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300400 {
401 .name = "c|cont",
402 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300403 .params = "",
404 .help = "resume emulation",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400405 .cmd = hmp_cont,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300406 },
407
Peter Maydella6b30bc2020-02-28 15:36:06 +0000408SRST
409``c`` or ``cont``
410 Resume emulation.
411ERST
Blue Swirl23130862009-06-06 08:22:04 +0000412
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300413 {
Gerd Hoffmann9b9df252012-02-23 13:45:21 +0100414 .name = "system_wakeup",
415 .args_type = "",
416 .params = "",
417 .help = "wakeup guest from suspend",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400418 .cmd = hmp_system_wakeup,
Gerd Hoffmann9b9df252012-02-23 13:45:21 +0100419 },
420
Peter Maydella6b30bc2020-02-28 15:36:06 +0000421SRST
422``system_wakeup``
423 Wakeup guest from suspend.
424ERST
Gerd Hoffmann9b9df252012-02-23 13:45:21 +0100425
426 {
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300427 .name = "gdbserver",
428 .args_type = "device:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300429 .params = "[device]",
430 .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400431 .cmd = hmp_gdbserver,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300432 },
433
Peter Maydella6b30bc2020-02-28 15:36:06 +0000434SRST
435``gdbserver`` [*port*]
436 Start gdbserver session (default *port*\=1234)
437ERST
Blue Swirl23130862009-06-06 08:22:04 +0000438
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300439 {
440 .name = "x",
441 .args_type = "fmt:/,addr:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300442 .params = "/fmt addr",
443 .help = "virtual memory dump starting at 'addr'",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400444 .cmd = hmp_memory_dump,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300445 },
446
Peter Maydella6b30bc2020-02-28 15:36:06 +0000447SRST
448``x/``\ *fmt* *addr*
449 Virtual memory dump starting at *addr*.
450ERST
Blue Swirl23130862009-06-06 08:22:04 +0000451
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300452 {
453 .name = "xp",
454 .args_type = "fmt:/,addr:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300455 .params = "/fmt addr",
456 .help = "physical memory dump starting at 'addr'",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400457 .cmd = hmp_physical_memory_dump,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300458 },
459
Peter Maydella6b30bc2020-02-28 15:36:06 +0000460SRST
461``xp /``\ *fmt* *addr*
462 Physical memory dump starting at *addr*.
463
464 *fmt* is a format which tells the command how to format the
465 data. Its syntax is: ``/{count}{format}{size}``
466
467 *count*
468 is the number of items to be dumped.
469 *format*
470 can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
471 c (char) or i (asm instruction).
472 *size*
473 can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
474 ``h`` or ``w`` can be specified with the ``i`` format to
475 respectively select 16 or 32 bit code instruction size.
476
477 Examples:
478
479 Dump 10 instructions at the current instruction pointer::
480
481 (qemu) x/10i $eip
482 0x90107063: ret
483 0x90107064: sti
484 0x90107065: lea 0x0(%esi,1),%esi
485 0x90107069: lea 0x0(%edi,1),%edi
486 0x90107070: ret
487 0x90107071: jmp 0x90107080
488 0x90107073: nop
489 0x90107074: nop
490 0x90107075: nop
491 0x90107076: nop
492
493 Dump 80 16 bit values at the start of the video memory::
494
495 (qemu) xp/80hx 0xb8000
496 0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
497 0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
498 0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
499 0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
500 0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
501 0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
502 0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
503 0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
504 0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
505 0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
506
507ERST
Blue Swirl23130862009-06-06 08:22:04 +0000508
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300509 {
Paolo Bonzinie9628442017-04-20 15:30:58 +0200510 .name = "gpa2hva",
511 .args_type = "addr:l",
512 .params = "addr",
513 .help = "print the host virtual address corresponding to a guest physical address",
514 .cmd = hmp_gpa2hva,
515 },
516
Peter Maydella6b30bc2020-02-28 15:36:06 +0000517SRST
518``gpa2hva`` *addr*
519 Print the host virtual address at which the guest's physical address *addr*
520 is mapped.
521ERST
Paolo Bonzinie9628442017-04-20 15:30:58 +0200522
523#ifdef CONFIG_LINUX
524 {
525 .name = "gpa2hpa",
526 .args_type = "addr:l",
527 .params = "addr",
528 .help = "print the host physical address corresponding to a guest physical address",
529 .cmd = hmp_gpa2hpa,
530 },
531#endif
532
Peter Maydella6b30bc2020-02-28 15:36:06 +0000533SRST
534``gpa2hpa`` *addr*
535 Print the host physical address at which the guest's physical address *addr*
536 is mapped.
537ERST
Paolo Bonzinie9628442017-04-20 15:30:58 +0200538
539 {
Dr. David Alan Gilbert574d9692019-04-12 16:26:52 +0100540 .name = "gva2gpa",
541 .args_type = "addr:l",
542 .params = "addr",
543 .help = "print the guest physical address corresponding to a guest virtual address",
544 .cmd = hmp_gva2gpa,
545 },
546
Peter Maydella6b30bc2020-02-28 15:36:06 +0000547SRST
548``gva2gpa`` *addr*
549 Print the guest physical address at which the guest's virtual address *addr*
550 is mapped based on the mapping for the current CPU.
551ERST
Dr. David Alan Gilbert574d9692019-04-12 16:26:52 +0100552
553 {
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300554 .name = "p|print",
555 .args_type = "fmt:/,val:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300556 .params = "/fmt expr",
557 .help = "print expression value (use $reg for CPU register access)",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400558 .cmd = do_print,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300559 },
560
Peter Maydella6b30bc2020-02-28 15:36:06 +0000561SRST
562``p`` or ``print/``\ *fmt* *expr*
563 Print expression value. Only the *format* part of *fmt* is
564 used.
565ERST
Blue Swirl23130862009-06-06 08:22:04 +0000566
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300567 {
568 .name = "i",
569 .args_type = "fmt:/,addr:i,index:i.",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300570 .params = "/fmt addr",
571 .help = "I/O port read",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400572 .cmd = hmp_ioport_read,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300573 },
574
Peter Maydella6b30bc2020-02-28 15:36:06 +0000575SRST
576``i/``\ *fmt* *addr* [.\ *index*\ ]
577 Read I/O port.
578ERST
Blue Swirl23130862009-06-06 08:22:04 +0000579
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300580 {
581 .name = "o",
582 .args_type = "fmt:/,addr:i,val:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300583 .params = "/fmt addr value",
584 .help = "I/O port write",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400585 .cmd = hmp_ioport_write,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300586 },
587
Peter Maydella6b30bc2020-02-28 15:36:06 +0000588SRST
589``o/``\ *fmt* *addr* *val*
590 Write to I/O port.
591ERST
Blue Swirl23130862009-06-06 08:22:04 +0000592
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300593 {
594 .name = "sendkey",
Amos Kong2ef20c12012-08-31 10:56:22 +0800595 .args_type = "keys:s,hold-time:i?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300596 .params = "keys [hold_ms]",
597 .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400598 .cmd = hmp_sendkey,
Hani Benhabiles29136cd2014-05-07 23:41:27 +0100599 .command_completion = sendkey_completion,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300600 },
601
Peter Maydella6b30bc2020-02-28 15:36:06 +0000602SRST
603``sendkey`` *keys*
604 Send *keys* to the guest. *keys* could be the name of the
605 key or the raw value in hexadecimal format. Use ``-`` to press
606 several keys simultaneously. Example::
607
608 sendkey ctrl-alt-f1
609
610 This command is useful to send keys that your graphical user interface
611 intercepts at low level, such as ``ctrl-alt-f1`` in X Window.
612ERST
Emilio G. Cotadd12e1b2018-08-15 16:00:03 -0400613 {
614 .name = "sync-profile",
615 .args_type = "op:s?",
616 .params = "[on|off|reset]",
617 .help = "enable, disable or reset synchronization profiling. "
618 "With no arguments, prints whether profiling is on or off.",
619 .cmd = hmp_sync_profile,
620 },
621
Peter Maydella6b30bc2020-02-28 15:36:06 +0000622SRST
623``sync-profile [on|off|reset]``
624 Enable, disable or reset synchronization profiling. With no arguments, prints
625 whether profiling is on or off.
626ERST
Blue Swirl23130862009-06-06 08:22:04 +0000627
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300628 {
629 .name = "system_reset",
630 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300631 .params = "",
632 .help = "reset the system",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400633 .cmd = hmp_system_reset,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300634 },
635
Peter Maydella6b30bc2020-02-28 15:36:06 +0000636SRST
637``system_reset``
638 Reset the system.
639ERST
Blue Swirl23130862009-06-06 08:22:04 +0000640
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300641 {
642 .name = "system_powerdown",
643 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300644 .params = "",
645 .help = "send system power down event",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400646 .cmd = hmp_system_powerdown,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300647 },
648
Peter Maydella6b30bc2020-02-28 15:36:06 +0000649SRST
650``system_powerdown``
651 Power down the system (if supported).
652ERST
Blue Swirl23130862009-06-06 08:22:04 +0000653
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300654 {
655 .name = "sum",
656 .args_type = "start:i,size:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300657 .params = "addr size",
658 .help = "compute the checksum of a memory region",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400659 .cmd = hmp_sum,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300660 },
661
Peter Maydella6b30bc2020-02-28 15:36:06 +0000662SRST
663``sum`` *addr* *size*
664 Compute the checksum of a memory region.
665ERST
Blue Swirl23130862009-06-06 08:22:04 +0000666
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300667 {
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300668 .name = "device_add",
Markus Armbrusterc7e4e8c2010-02-10 20:47:28 +0100669 .args_type = "device:O",
670 .params = "driver[,prop=value][,...]",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300671 .help = "add device, like -device on the command line",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400672 .cmd = hmp_device_add,
Hani Benhabiles2da1b3a2014-04-13 16:25:07 +0100673 .command_completion = device_add_completion,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300674 },
675
Peter Maydella6b30bc2020-02-28 15:36:06 +0000676SRST
677``device_add`` *config*
678 Add device.
679ERST
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200680
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300681 {
682 .name = "device_del",
683 .args_type = "id:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300684 .params = "device",
685 .help = "remove device",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400686 .cmd = hmp_device_del,
Hani Benhabiles2da1b3a2014-04-13 16:25:07 +0100687 .command_completion = device_del_completion,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300688 },
689
Peter Maydella6b30bc2020-02-28 15:36:06 +0000690SRST
691``device_del`` *id*
692 Remove device *id*. *id* may be a short ID
693 or a QOM object path.
694ERST
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200695
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300696 {
697 .name = "cpu",
698 .args_type = "index:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300699 .params = "index",
700 .help = "set the default CPU",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400701 .cmd = hmp_cpu,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300702 },
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200703
Peter Maydella6b30bc2020-02-28 15:36:06 +0000704SRST
705``cpu`` *index*
706 Set the default CPU.
707ERST
Blue Swirl23130862009-06-06 08:22:04 +0000708
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300709 {
710 .name = "mouse_move",
711 .args_type = "dx_str:s,dy_str:s,dz_str:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300712 .params = "dx dy [dz]",
713 .help = "send mouse move events",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400714 .cmd = hmp_mouse_move,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300715 },
716
Peter Maydella6b30bc2020-02-28 15:36:06 +0000717SRST
718``mouse_move`` *dx* *dy* [*dz*]
719 Move the active mouse to the specified coordinates *dx* *dy*
720 with optional scroll axis *dz*.
721ERST
Blue Swirl23130862009-06-06 08:22:04 +0000722
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300723 {
724 .name = "mouse_button",
725 .args_type = "button_state:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300726 .params = "state",
727 .help = "change mouse button state (1=L, 2=M, 4=R)",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400728 .cmd = hmp_mouse_button,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300729 },
730
Peter Maydella6b30bc2020-02-28 15:36:06 +0000731SRST
732``mouse_button`` *val*
733 Change the active mouse button state *val* (1=L, 2=M, 4=R).
734ERST
Blue Swirl23130862009-06-06 08:22:04 +0000735
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300736 {
737 .name = "mouse_set",
738 .args_type = "index:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300739 .params = "index",
740 .help = "set which mouse device receives events",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400741 .cmd = hmp_mouse_set,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300742 },
743
Peter Maydella6b30bc2020-02-28 15:36:06 +0000744SRST
745``mouse_set`` *index*
746 Set which mouse device receives events at given *index*, index
747 can be obtained with::
748
749 info mice
750
751ERST
Blue Swirl23130862009-06-06 08:22:04 +0000752
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300753 {
754 .name = "wavcapture",
Kővágó, Zoltánf0b9f362019-08-19 01:06:48 +0200755 .args_type = "path:F,audiodev:s,freq:i?,bits:i?,nchannels:i?",
756 .params = "path audiodev [frequency [bits [channels]]]",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300757 .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400758 .cmd = hmp_wavcapture,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300759 },
Peter Maydella6b30bc2020-02-28 15:36:06 +0000760SRST
761``wavcapture`` *filename* *audiodev* [*frequency* [*bits* [*channels*]]]
762 Capture audio into *filename* from *audiodev*, using sample rate
763 *frequency* bits per sample *bits* and number of channels
764 *channels*.
765
766 Defaults:
767
768 - Sample rate = 44100 Hz - CD quality
769 - Bits = 16
770 - Number of channels = 2 - Stereo
771ERST
Blue Swirl23130862009-06-06 08:22:04 +0000772
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300773 {
774 .name = "stopcapture",
775 .args_type = "n:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300776 .params = "capture index",
777 .help = "stop capture",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400778 .cmd = hmp_stopcapture,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300779 },
Peter Maydella6b30bc2020-02-28 15:36:06 +0000780SRST
781``stopcapture`` *index*
782 Stop capture with a given *index*, index can be obtained with::
783
784 info capture
785
786ERST
Blue Swirl23130862009-06-06 08:22:04 +0000787
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300788 {
789 .name = "memsave",
790 .args_type = "val:l,size:i,filename:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300791 .params = "addr size file",
792 .help = "save to disk virtual memory dump starting at 'addr' of size 'size'",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400793 .cmd = hmp_memsave,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300794 },
795
Peter Maydella6b30bc2020-02-28 15:36:06 +0000796SRST
797``memsave`` *addr* *size* *file*
798 save to disk virtual memory dump starting at *addr* of size *size*.
799ERST
Blue Swirl23130862009-06-06 08:22:04 +0000800
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300801 {
802 .name = "pmemsave",
803 .args_type = "val:l,size:i,filename:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300804 .params = "addr size file",
805 .help = "save to disk physical memory dump starting at 'addr' of size 'size'",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400806 .cmd = hmp_pmemsave,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300807 },
808
Peter Maydella6b30bc2020-02-28 15:36:06 +0000809SRST
810``pmemsave`` *addr* *size* *file*
811 save to disk physical memory dump starting at *addr* of size *size*.
812ERST
Blue Swirl23130862009-06-06 08:22:04 +0000813
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300814 {
815 .name = "boot_set",
816 .args_type = "bootdevice:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300817 .params = "bootdevice",
818 .help = "define new values for the boot device list",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400819 .cmd = hmp_boot_set,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300820 },
821
Peter Maydella6b30bc2020-02-28 15:36:06 +0000822SRST
823``boot_set`` *bootdevicelist*
824 Define new values for the boot device list. Those values will override
825 the values specified on the command line through the ``-boot`` option.
826
827 The values that can be specified here depend on the machine type, but are
828 the same that can be specified in the ``-boot`` command line option.
829ERST
Blue Swirl23130862009-06-06 08:22:04 +0000830
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300831 {
832 .name = "nmi",
Luiz Capitulinoe9b4b432011-04-29 12:11:50 -0300833 .args_type = "",
834 .params = "",
Alexey Kardashevskiy9cb805f2014-08-20 22:16:33 +1000835 .help = "inject an NMI",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400836 .cmd = hmp_nmi,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300837 },
Peter Maydella6b30bc2020-02-28 15:36:06 +0000838SRST
839``nmi`` *cpu*
840 Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
841ERST
Lei Li1f590cf2013-01-25 00:03:20 +0800842
843 {
Markus Armbruster3949e592013-02-06 21:27:24 +0100844 .name = "ringbuf_write",
Lei Li1f590cf2013-01-25 00:03:20 +0800845 .args_type = "device:s,data:s",
846 .params = "device data",
Markus Armbruster3949e592013-02-06 21:27:24 +0100847 .help = "Write to a ring buffer character device",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400848 .cmd = hmp_ringbuf_write,
Hani Benhabiles8e597772014-05-27 23:39:30 +0100849 .command_completion = ringbuf_write_completion,
Lei Li1f590cf2013-01-25 00:03:20 +0800850 },
851
Peter Maydella6b30bc2020-02-28 15:36:06 +0000852SRST
853``ringbuf_write`` *device* *data*
854 Write *data* to ring buffer character device *device*.
855 *data* must be a UTF-8 string.
856ERST
Blue Swirl23130862009-06-06 08:22:04 +0000857
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300858 {
Markus Armbruster3949e592013-02-06 21:27:24 +0100859 .name = "ringbuf_read",
Lei Li49b6d722013-01-25 00:03:21 +0800860 .args_type = "device:s,size:i",
861 .params = "device size",
Markus Armbruster3949e592013-02-06 21:27:24 +0100862 .help = "Read from a ring buffer character device",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400863 .cmd = hmp_ringbuf_read,
Hani Benhabiles8e597772014-05-27 23:39:30 +0100864 .command_completion = ringbuf_write_completion,
Lei Li49b6d722013-01-25 00:03:21 +0800865 },
866
Peter Maydella6b30bc2020-02-28 15:36:06 +0000867SRST
868``ringbuf_read`` *device*
869 Read and print up to *size* bytes from ring buffer character
870 device *device*.
871 Certain non-printable characters are printed ``\uXXXX``, where ``XXXX`` is the
872 character code in hexadecimal. Character ``\`` is printed ``\\``.
873 Bug: can screw up when the buffer contains invalid UTF-8 sequences,
874 NUL characters, after the ring buffer lost data, and when reading
875 stops because the size limit is reached.
876ERST
Lei Li49b6d722013-01-25 00:03:21 +0800877
878 {
Dr. David Alan Gilbert544f6ea2019-02-27 13:24:12 +0000879 .name = "announce_self",
Dr. David Alan Gilbertc6644542019-06-20 19:47:05 +0100880 .args_type = "interfaces:s?,id:s?",
881 .params = "[interfaces] [id]",
Dr. David Alan Gilbert544f6ea2019-02-27 13:24:12 +0000882 .help = "Trigger GARP/RARP announcements",
883 .cmd = hmp_announce_self,
884 },
885
Peter Maydella6b30bc2020-02-28 15:36:06 +0000886SRST
887``announce_self``
888 Trigger a round of GARP/RARP broadcasts; this is useful for explicitly
889 updating the network infrastructure after a reconfiguration or some forms
890 of migration. The timings of the round are set by the migration announce
891 parameters. An optional comma separated *interfaces* list restricts the
892 announce to the named set of interfaces. An optional *id* can be used to
893 start a separate announce timer and to change the parameters of it later.
894ERST
Dr. David Alan Gilbert544f6ea2019-02-27 13:24:12 +0000895
896 {
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300897 .name = "migrate",
Peter Xu7a4da282018-05-02 18:47:23 +0800898 .args_type = "detach:-d,blk:-b,inc:-i,resume:-r,uri:s",
899 .params = "[-d] [-b] [-i] [-r] uri",
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200900 .help = "migrate to URI (using -d to not wait for completion)"
901 "\n\t\t\t -b for migration without shared storage with"
902 " full copy of disk\n\t\t\t -i for migration without "
903 "shared storage with incremental copy of disk "
Peter Xu7a4da282018-05-02 18:47:23 +0800904 "(base image shared between src and destination)"
905 "\n\t\t\t -r to resume a paused migration",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400906 .cmd = hmp_migrate,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300907 },
908
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200909
Peter Maydella6b30bc2020-02-28 15:36:06 +0000910SRST
911``migrate [-d] [-b] [-i]`` *uri*
912 Migrate to *uri* (using -d to not wait for completion).
913
914 ``-b``
915 for migration with full copy of disk
916 ``-i``
917 for migration with incremental copy of disk (base image is shared)
918ERST
Blue Swirl23130862009-06-06 08:22:04 +0000919
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300920 {
921 .name = "migrate_cancel",
922 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300923 .params = "",
924 .help = "cancel the current VM migration",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400925 .cmd = hmp_migrate_cancel,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300926 },
927
Peter Maydella6b30bc2020-02-28 15:36:06 +0000928SRST
929``migrate_cancel``
930 Cancel the current VM migration.
931ERST
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300932
Dr. David Alan Gilbert94ae12c2017-10-20 10:05:54 +0100933 {
934 .name = "migrate_continue",
935 .args_type = "state:s",
936 .params = "state",
937 .help = "Continue migration from the given paused state",
938 .cmd = hmp_migrate_continue,
939 },
Peter Maydella6b30bc2020-02-28 15:36:06 +0000940SRST
941``migrate_continue`` *state*
942 Continue migration from the paused state *state*
943ERST
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300944
945 {
Dr. David Alan Gilbertbf1ae1f2015-02-19 11:40:28 +0000946 .name = "migrate_incoming",
947 .args_type = "uri:s",
948 .params = "uri",
949 .help = "Continue an incoming migration from an -incoming defer",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400950 .cmd = hmp_migrate_incoming,
Dr. David Alan Gilbertbf1ae1f2015-02-19 11:40:28 +0000951 },
952
Peter Maydella6b30bc2020-02-28 15:36:06 +0000953SRST
954``migrate_incoming`` *uri*
955 Continue an incoming migration using the *uri* (that has the same syntax
956 as the ``-incoming`` option).
957ERST
Dr. David Alan Gilbertbf1ae1f2015-02-19 11:40:28 +0000958
Peter Xu3b563c42018-05-02 18:47:37 +0800959 {
960 .name = "migrate_recover",
961 .args_type = "uri:s",
962 .params = "uri",
963 .help = "Continue a paused incoming postcopy migration",
964 .cmd = hmp_migrate_recover,
965 },
966
Peter Maydella6b30bc2020-02-28 15:36:06 +0000967SRST
968``migrate_recover`` *uri*
969 Continue a paused incoming postcopy migration using the *uri*.
970ERST
Dr. David Alan Gilbertbf1ae1f2015-02-19 11:40:28 +0000971
972 {
Peter Xud37297d2018-05-02 18:47:40 +0800973 .name = "migrate_pause",
974 .args_type = "",
975 .params = "",
976 .help = "Pause an ongoing migration (postcopy-only)",
977 .cmd = hmp_migrate_pause,
978 },
979
Peter Maydella6b30bc2020-02-28 15:36:06 +0000980SRST
981``migrate_pause``
982 Pause an ongoing migration. Currently it only supports postcopy.
983ERST
Peter Xud37297d2018-05-02 18:47:40 +0800984
985 {
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300986 .name = "migrate_set_cache_size",
987 .args_type = "value:o",
988 .params = "value",
989 .help = "set cache size (in bytes) for XBZRLE migrations,"
990 "the cache size will be rounded down to the nearest "
991 "power of 2.\n"
992 "The cache size affects the number of cache misses."
993 "In case of a high cache miss ratio you need to increase"
994 " the cache size",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +0400995 .cmd = hmp_migrate_set_cache_size,
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300996 },
997
Peter Maydella6b30bc2020-02-28 15:36:06 +0000998SRST
999``migrate_set_cache_size`` *value*
1000 Set cache size to *value* (in bytes) for xbzrle migrations.
1001ERST
Blue Swirl23130862009-06-06 08:22:04 +00001002
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001003 {
1004 .name = "migrate_set_speed",
Jes Sorensened3d4a82010-10-21 17:15:48 +02001005 .args_type = "value:o",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001006 .params = "value",
Jes Sorensened3d4a82010-10-21 17:15:48 +02001007 .help = "set maximum speed (in bytes) for migrations. "
1008 "Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001009 .cmd = hmp_migrate_set_speed,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001010 },
1011
Peter Maydella6b30bc2020-02-28 15:36:06 +00001012SRST
1013``migrate_set_speed`` *value*
1014 Set maximum speed to *value* (in bytes) for migrations.
1015ERST
Blue Swirl23130862009-06-06 08:22:04 +00001016
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001017 {
1018 .name = "migrate_set_downtime",
Markus Armbrusterb0fbf7d2010-01-25 14:23:07 +01001019 .args_type = "value:T",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001020 .params = "value",
1021 .help = "set maximum tolerated downtime (in seconds) for migrations",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001022 .cmd = hmp_migrate_set_downtime,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001023 },
Glauber Costa2ea42952009-05-28 15:22:58 -04001024
Peter Maydella6b30bc2020-02-28 15:36:06 +00001025SRST
1026``migrate_set_downtime`` *second*
1027 Set maximum tolerated downtime (in seconds) for migration.
1028ERST
Glauber Costa2ea42952009-05-28 15:22:58 -04001029
Jes Sorensenf8882562010-12-16 13:52:16 +01001030 {
Orit Wasserman00458432012-08-06 21:42:48 +03001031 .name = "migrate_set_capability",
1032 .args_type = "capability:s,state:b",
1033 .params = "capability state",
1034 .help = "Enable/Disable the usage of a capability for migration",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001035 .cmd = hmp_migrate_set_capability,
Hani Benhabilesc68a0402014-05-27 23:39:32 +01001036 .command_completion = migrate_set_capability_completion,
Orit Wasserman00458432012-08-06 21:42:48 +03001037 },
1038
Peter Maydella6b30bc2020-02-28 15:36:06 +00001039SRST
1040``migrate_set_capability`` *capability* *state*
1041 Enable/Disable the usage of a capability *capability* for migration.
1042ERST
Orit Wasserman00458432012-08-06 21:42:48 +03001043
1044 {
Liang Li50e9a622015-03-23 16:32:29 +08001045 .name = "migrate_set_parameter",
Daniel P. Berrange69ef1f32016-04-27 11:05:15 +01001046 .args_type = "parameter:s,value:s",
Liang Li50e9a622015-03-23 16:32:29 +08001047 .params = "parameter value",
1048 .help = "Set the parameter for migration",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001049 .cmd = hmp_migrate_set_parameter,
Liang Li50e9a622015-03-23 16:32:29 +08001050 .command_completion = migrate_set_parameter_completion,
1051 },
1052
Peter Maydella6b30bc2020-02-28 15:36:06 +00001053SRST
1054``migrate_set_parameter`` *parameter* *value*
1055 Set the parameter *parameter* for migration.
1056ERST
Liang Li50e9a622015-03-23 16:32:29 +08001057
1058 {
Dr. David Alan Gilbert4886a1b2015-11-05 18:10:56 +00001059 .name = "migrate_start_postcopy",
1060 .args_type = "",
1061 .params = "",
Dr. David Alan Gilberta54d3402015-11-12 11:34:44 +00001062 .help = "Followup to a migration command to switch the migration"
Dr. David Alan Gilbert32c3db52016-03-11 09:53:36 +00001063 " to postcopy mode. The postcopy-ram capability must "
Greg Kurzc2eb7f22018-02-07 16:41:43 +01001064 "be set on both source and destination before the "
1065 "original migration command .",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001066 .cmd = hmp_migrate_start_postcopy,
Dr. David Alan Gilbert4886a1b2015-11-05 18:10:56 +00001067 },
1068
Peter Maydella6b30bc2020-02-28 15:36:06 +00001069SRST
1070``migrate_start_postcopy``
1071 Switch in-progress migration to postcopy mode. Ignored after the end of
1072 migration (or once already in postcopy).
1073ERST
Dr. David Alan Gilbert4886a1b2015-11-05 18:10:56 +00001074
1075 {
zhanghailiangd89e6662016-10-27 14:43:03 +08001076 .name = "x_colo_lost_heartbeat",
1077 .args_type = "",
1078 .params = "",
1079 .help = "Tell COLO that heartbeat is lost,\n\t\t\t"
1080 "a failover or takeover is needed.",
1081 .cmd = hmp_x_colo_lost_heartbeat,
1082 },
1083
Peter Maydella6b30bc2020-02-28 15:36:06 +00001084SRST
1085``x_colo_lost_heartbeat``
1086 Tell COLO that heartbeat is lost, a failover or takeover is needed.
1087ERST
zhanghailiangd89e6662016-10-27 14:43:03 +08001088
1089 {
Jes Sorensen2ea720d2011-03-09 16:54:34 +01001090 .name = "client_migrate_info",
1091 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
1092 .params = "protocol hostname port tls-port cert-subject",
Markus Armbruster13cadef2015-03-05 19:16:58 +01001093 .help = "set migration information for remote display",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001094 .cmd = hmp_client_migrate_info,
Jes Sorensenf8882562010-12-16 13:52:16 +01001095 },
1096
Peter Maydella6b30bc2020-02-28 15:36:06 +00001097SRST
1098``client_migrate_info`` *protocol* *hostname* *port* *tls-port* *cert-subject*
1099 Set migration information for remote display. This makes the server
1100 ask the client to automatically reconnect using the new parameters
1101 once migration finished successfully. Only implemented for SPICE.
1102ERST
Gerd Hoffmanne866e232010-04-23 13:28:21 +02001103
Wen Congyang783e9b42012-05-07 12:10:47 +08001104 {
1105 .name = "dump-guest-memory",
Viktor Prutyanov2da91b52018-05-17 19:23:39 +03001106 .args_type = "paging:-p,detach:-d,windmp:-w,zlib:-z,lzo:-l,snappy:-s,filename:F,begin:l?,length:l?",
1107 .params = "[-p] [-d] [-z|-l|-s|-w] filename [begin length]",
Qiao Nuohanc20499d2014-04-17 16:15:06 +08001108 .help = "dump guest memory into file 'filename'.\n\t\t\t"
1109 "-p: do paging to get guest's memory mapping.\n\t\t\t"
Peter Xu228de9c2016-02-18 13:16:47 +08001110 "-d: return immediately (do not wait for completion).\n\t\t\t"
Qiao Nuohan1b7a0f72014-04-17 16:15:07 +08001111 "-z: dump in kdump-compressed format, with zlib compression.\n\t\t\t"
1112 "-l: dump in kdump-compressed format, with lzo compression.\n\t\t\t"
1113 "-s: dump in kdump-compressed format, with snappy compression.\n\t\t\t"
Viktor Prutyanov2da91b52018-05-17 19:23:39 +03001114 "-w: dump in Windows crashdump format (can be used instead of ELF-dump converting),\n\t\t\t"
1115 " for Windows x64 guests with vmcoreinfo driver only.\n\t\t\t"
Qiao Nuohanc20499d2014-04-17 16:15:06 +08001116 "begin: the starting physical address.\n\t\t\t"
1117 "length: the memory size, in bytes.",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001118 .cmd = hmp_dump_guest_memory,
Wen Congyang783e9b42012-05-07 12:10:47 +08001119 },
1120
Peter Maydella6b30bc2020-02-28 15:36:06 +00001121SRST
1122``dump-guest-memory [-p]`` *filename* *begin* *length*
1123 \
1124``dump-guest-memory [-z|-l|-s|-w]`` *filename*
1125 Dump guest memory to *protocol*. The file can be processed with crash or
1126 gdb. Without ``-z|-l|-s|-w``, the dump format is ELF.
1127
1128 ``-p``
1129 do paging to get guest's memory mapping.
1130 ``-z``
1131 dump in kdump-compressed format, with zlib compression.
1132 ``-l``
1133 dump in kdump-compressed format, with lzo compression.
1134 ``-s``
1135 dump in kdump-compressed format, with snappy compression.
1136 ``-w``
1137 dump in Windows crashdump format (can be used instead of ELF-dump converting),
1138 for Windows x64 guests with vmcoreinfo driver only
1139 *filename*
1140 dump file name.
1141 *begin*
1142 the starting physical address. It's optional, and should be
1143 specified together with *length*.
1144 *length*
1145 the memory size, in bytes. It's optional, and should be specified
1146 together with *begin*.
1147
1148ERST
Wen Congyang783e9b42012-05-07 12:10:47 +08001149
Jason J. Hernea4538a52015-06-26 14:07:21 -04001150#if defined(TARGET_S390X)
1151 {
1152 .name = "dump-skeys",
1153 .args_type = "filename:F",
1154 .params = "",
1155 .help = "Save guest storage keys into file 'filename'.\n",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001156 .cmd = hmp_dump_skeys,
Jason J. Hernea4538a52015-06-26 14:07:21 -04001157 },
1158#endif
1159
Peter Maydella6b30bc2020-02-28 15:36:06 +00001160SRST
1161``dump-skeys`` *filename*
1162 Save guest storage keys to a file.
1163ERST
Jason J. Hernea4538a52015-06-26 14:07:21 -04001164
Claudio Imbrendaf860d492016-08-15 18:44:04 +02001165#if defined(TARGET_S390X)
1166 {
1167 .name = "migration_mode",
1168 .args_type = "mode:i",
1169 .params = "mode",
1170 .help = "Enables or disables migration mode\n",
1171 .cmd = hmp_migrationmode,
1172 },
1173#endif
1174
Peter Maydella6b30bc2020-02-28 15:36:06 +00001175SRST
1176``migration_mode`` *mode*
1177 Enables or disables migration mode.
1178ERST
Claudio Imbrendaf860d492016-08-15 18:44:04 +02001179
Gerd Hoffmanne866e232010-04-23 13:28:21 +02001180 {
Jes Sorensen2ea720d2011-03-09 16:54:34 +01001181 .name = "snapshot_blkdev",
Paolo Bonzini6cc2a412012-03-06 18:55:59 +01001182 .args_type = "reuse:-n,device:B,snapshot-file:s?,format:s?",
1183 .params = "[-n] device [new-image-file] [format]",
Jes Sorensen2ea720d2011-03-09 16:54:34 +01001184 .help = "initiates a live snapshot\n\t\t\t"
1185 "of device. If a new image file is specified, the\n\t\t\t"
1186 "new image file will become the new root image.\n\t\t\t"
1187 "If format is specified, the snapshot file will\n\t\t\t"
Wenchao Xia775ca882013-09-11 14:04:37 +08001188 "be created in that format.\n\t\t\t"
Paolo Bonzini6cc2a412012-03-06 18:55:59 +01001189 "The default format is qcow2. The -n flag requests QEMU\n\t\t\t"
1190 "to reuse the image found in new-image-file, instead of\n\t\t\t"
1191 "recreating it from scratch.",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001192 .cmd = hmp_snapshot_blkdev,
Gerd Hoffmanne866e232010-04-23 13:28:21 +02001193 },
1194
Peter Maydella6b30bc2020-02-28 15:36:06 +00001195SRST
1196``snapshot_blkdev``
1197 Snapshot device, using snapshot file as target if provided
1198ERST
Jes Sorensenf8882562010-12-16 13:52:16 +01001199
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001200 {
Wenchao Xia775ca882013-09-11 14:04:37 +08001201 .name = "snapshot_blkdev_internal",
1202 .args_type = "device:B,name:s",
1203 .params = "device name",
1204 .help = "take an internal snapshot of device.\n\t\t\t"
1205 "The format of the image used by device must\n\t\t\t"
1206 "support it, such as qcow2.\n\t\t\t",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001207 .cmd = hmp_snapshot_blkdev_internal,
Wenchao Xia775ca882013-09-11 14:04:37 +08001208 },
1209
Peter Maydella6b30bc2020-02-28 15:36:06 +00001210SRST
1211``snapshot_blkdev_internal``
1212 Take an internal snapshot on device if it support
1213ERST
Wenchao Xia775ca882013-09-11 14:04:37 +08001214
1215 {
Wenchao Xia7a4ed2e2013-09-11 14:04:38 +08001216 .name = "snapshot_delete_blkdev_internal",
1217 .args_type = "device:B,name:s,id:s?",
1218 .params = "device name [id]",
1219 .help = "delete an internal snapshot of device.\n\t\t\t"
1220 "If id is specified, qemu will try delete\n\t\t\t"
1221 "the snapshot matching both id and name.\n\t\t\t"
1222 "The format of the image used by device must\n\t\t\t"
1223 "support it, such as qcow2.\n\t\t\t",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001224 .cmd = hmp_snapshot_delete_blkdev_internal,
Wenchao Xia7a4ed2e2013-09-11 14:04:38 +08001225 },
1226
Peter Maydella6b30bc2020-02-28 15:36:06 +00001227SRST
1228``snapshot_delete_blkdev_internal``
1229 Delete an internal snapshot on device if it support
1230ERST
Wenchao Xia7a4ed2e2013-09-11 14:04:38 +08001231
1232 {
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001233 .name = "drive_mirror",
1234 .args_type = "reuse:-n,full:-f,device:B,target:s,format:s?",
1235 .params = "[-n] [-f] device target [format]",
1236 .help = "initiates live storage\n\t\t\t"
1237 "migration for a device. The device's contents are\n\t\t\t"
1238 "copied to the new image file, including data that\n\t\t\t"
1239 "is written after the command is started.\n\t\t\t"
1240 "The -n flag requests QEMU to reuse the image found\n\t\t\t"
1241 "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
1242 "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
1243 "so that the result does not need a backing file.\n\t\t\t",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001244 .cmd = hmp_drive_mirror,
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001245 },
Peter Maydella6b30bc2020-02-28 15:36:06 +00001246SRST
1247``drive_mirror``
1248 Start mirroring a block device's writes to a new destination,
1249 using the specified target.
1250ERST
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001251
1252 {
Stefan Hajnoczide909302013-06-26 14:11:58 +02001253 .name = "drive_backup",
Pavel Butsykin13b94142016-07-22 11:17:52 +03001254 .args_type = "reuse:-n,full:-f,compress:-c,device:B,target:s,format:s?",
1255 .params = "[-n] [-f] [-c] device target [format]",
Stefan Hajnoczide909302013-06-26 14:11:58 +02001256 .help = "initiates a point-in-time\n\t\t\t"
1257 "copy for a device. The device's contents are\n\t\t\t"
1258 "copied to the new image file, excluding data that\n\t\t\t"
1259 "is written after the command is started.\n\t\t\t"
1260 "The -n flag requests QEMU to reuse the image found\n\t\t\t"
1261 "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
1262 "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
Pavel Butsykin13b94142016-07-22 11:17:52 +03001263 "so that the result does not need a backing file.\n\t\t\t"
1264 "The -c flag requests QEMU to compress backup data\n\t\t\t"
1265 "(if the target format supports it).\n\t\t\t",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001266 .cmd = hmp_drive_backup,
Stefan Hajnoczide909302013-06-26 14:11:58 +02001267 },
Peter Maydella6b30bc2020-02-28 15:36:06 +00001268SRST
1269``drive_backup``
zhaolichange3a6e0d2020-09-17 15:50:20 +08001270 Start a point-in-time copy of a block device to a specified target.
Peter Maydella6b30bc2020-02-28 15:36:06 +00001271ERST
Stefan Hajnoczide909302013-06-26 14:11:58 +02001272
1273 {
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001274 .name = "drive_add",
Kevin Wolfabb21ac2016-02-23 17:33:24 +01001275 .args_type = "node:-n,pci_addr:s,opts:s",
1276 .params = "[-n] [[<domain>:]<bus>:]<slot>\n"
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001277 "[file=file][,if=type][,bus=n]\n"
Stefan Hajnoczifb0490f2011-11-17 13:40:32 +00001278 "[,unit=m][,media=d][,index=i]\n"
Stefan Hajnoczifb0490f2011-11-17 13:40:32 +00001279 "[,snapshot=on|off][,cache=on|off]\n"
1280 "[,readonly=on|off][,copy-on-read=on|off]",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001281 .help = "add drive to PCI storage controller",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001282 .cmd = hmp_drive_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001283 },
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001284
Peter Maydella6b30bc2020-02-28 15:36:06 +00001285SRST
1286``drive_add``
1287 Add drive to PCI storage controller.
1288ERST
Blue Swirl23130862009-06-06 08:22:04 +00001289
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001290 {
Isaku Yamahata2ae63bd2010-12-24 12:14:14 +09001291 .name = "pcie_aer_inject_error",
1292 .args_type = "advisory_non_fatal:-a,correctable:-c,"
1293 "id:s,error_status:s,"
1294 "header0:i?,header1:i?,header2:i?,header3:i?,"
1295 "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
1296 .params = "[-a] [-c] id "
1297 "<error_status> [<tlp header> [<tlp header prefix>]]",
1298 .help = "inject pcie aer error\n\t\t\t"
1299 " -a for advisory non fatal error\n\t\t\t"
1300 " -c for correctable error\n\t\t\t"
1301 "<id> = qdev device id\n\t\t\t"
1302 "<error_status> = error string or 32bit\n\t\t\t"
1303 "<tlb header> = 32bit x 4\n\t\t\t"
1304 "<tlb header prefix> = 32bit x 4",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001305 .cmd = hmp_pcie_aer_inject_error,
Isaku Yamahata2ae63bd2010-12-24 12:14:14 +09001306 },
1307
Peter Maydella6b30bc2020-02-28 15:36:06 +00001308SRST
1309``pcie_aer_inject_error``
1310 Inject PCIe AER error
1311ERST
Isaku Yamahata2ae63bd2010-12-24 12:14:14 +09001312
1313 {
Markus Armbrusterae82d322010-03-25 17:22:40 +01001314 .name = "netdev_add",
1315 .args_type = "netdev:O",
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +03001316 .params = "[user|tap|socket|vde|bridge|hubport|netmap|vhost-user],id=str[,prop=value][,...]",
Markus Armbrusterae82d322010-03-25 17:22:40 +01001317 .help = "add host network device",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001318 .cmd = hmp_netdev_add,
Hani Benhabilesb162b492014-05-07 23:41:31 +01001319 .command_completion = netdev_add_completion,
Markus Armbrusterae82d322010-03-25 17:22:40 +01001320 },
1321
Peter Maydella6b30bc2020-02-28 15:36:06 +00001322SRST
1323``netdev_add``
1324 Add host network device.
1325ERST
Markus Armbrusterae82d322010-03-25 17:22:40 +01001326
1327 {
1328 .name = "netdev_del",
1329 .args_type = "id:s",
1330 .params = "id",
1331 .help = "remove host network device",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001332 .cmd = hmp_netdev_del,
Hani Benhabiles11b389f2014-05-07 23:41:32 +01001333 .command_completion = netdev_del_completion,
Markus Armbrusterae82d322010-03-25 17:22:40 +01001334 },
1335
Peter Maydella6b30bc2020-02-28 15:36:06 +00001336SRST
1337``netdev_del``
1338 Remove host network device.
1339ERST
Markus Armbrusterae82d322010-03-25 17:22:40 +01001340
Paolo Bonziniab2d0532013-12-20 23:21:09 +01001341 {
Paolo Bonzinicff8b2c2013-12-20 23:21:10 +01001342 .name = "object_add",
1343 .args_type = "object:O",
1344 .params = "[qom-type=]type,id=str[,prop=value][,...]",
1345 .help = "create QOM object",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001346 .cmd = hmp_object_add,
Hani Benhabilesbfa40f72014-04-13 16:25:06 +01001347 .command_completion = object_add_completion,
Paolo Bonzinicff8b2c2013-12-20 23:21:10 +01001348 },
1349
Peter Maydella6b30bc2020-02-28 15:36:06 +00001350SRST
1351``object_add``
1352 Create QOM object.
1353ERST
Paolo Bonzinicff8b2c2013-12-20 23:21:10 +01001354
1355 {
Paolo Bonziniab2d0532013-12-20 23:21:09 +01001356 .name = "object_del",
1357 .args_type = "id:s",
1358 .params = "id",
1359 .help = "destroy QOM object",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001360 .cmd = hmp_object_del,
Hani Benhabilesbfa40f72014-04-13 16:25:06 +01001361 .command_completion = object_del_completion,
Paolo Bonziniab2d0532013-12-20 23:21:09 +01001362 },
1363
Peter Maydella6b30bc2020-02-28 15:36:06 +00001364SRST
1365``object_del``
1366 Destroy QOM object.
1367ERST
Paolo Bonziniab2d0532013-12-20 23:21:09 +01001368
Blue Swirl23130862009-06-06 08:22:04 +00001369#ifdef CONFIG_SLIRP
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001370 {
1371 .name = "hostfwd_add",
Thomas Huthb4983c52019-12-05 11:41:09 +01001372 .args_type = "arg1:s,arg2:s?",
1373 .params = "[netdev_id] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001374 .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001375 .cmd = hmp_hostfwd_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001376 },
Markus Armbruster21413d62010-05-04 13:20:30 +02001377#endif
Peter Maydella6b30bc2020-02-28 15:36:06 +00001378SRST
1379``hostfwd_add``
1380 Redirect TCP or UDP connections from host to guest (requires -net user).
1381ERST
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001382
Markus Armbruster21413d62010-05-04 13:20:30 +02001383#ifdef CONFIG_SLIRP
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001384 {
1385 .name = "hostfwd_remove",
Thomas Huthb4983c52019-12-05 11:41:09 +01001386 .args_type = "arg1:s,arg2:s?",
1387 .params = "[netdev_id] [tcp|udp]:[hostaddr]:hostport",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001388 .help = "remove host-to-guest TCP or UDP redirection",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001389 .cmd = hmp_hostfwd_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001390 },
1391
Blue Swirl23130862009-06-06 08:22:04 +00001392#endif
Peter Maydella6b30bc2020-02-28 15:36:06 +00001393SRST
1394``hostfwd_remove``
1395 Remove host-to-guest TCP or UDP redirection.
1396ERST
Blue Swirl23130862009-06-06 08:22:04 +00001397
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001398 {
1399 .name = "balloon",
Luiz Capitulino3b0bd6e2009-12-18 13:25:05 -02001400 .args_type = "value:M",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001401 .params = "target",
Riccardo Magliocchetti3c056132010-05-19 18:49:28 +02001402 .help = "request VM to change its memory allocation (in MB)",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001403 .cmd = hmp_balloon,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001404 },
1405
Peter Maydella6b30bc2020-02-28 15:36:06 +00001406SRST
1407``balloon`` *value*
1408 Request VM to change its memory allocation to *value* (in MB).
1409ERST
Blue Swirl23130862009-06-06 08:22:04 +00001410
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001411 {
1412 .name = "set_link",
Markus Armbrusterc9b26a42010-03-26 09:07:10 +01001413 .args_type = "name:s,up:b",
1414 .params = "name on|off",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001415 .help = "change the link status of a network adapter",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001416 .cmd = hmp_set_link,
Hani Benhabiles40d19392014-05-07 23:41:30 +01001417 .command_completion = set_link_completion,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001418 },
1419
Peter Maydella6b30bc2020-02-28 15:36:06 +00001420SRST
1421``set_link`` *name* ``[on|off]``
1422 Switch link *name* on (i.e. up) or off (i.e. down).
1423ERST
Blue Swirl23130862009-06-06 08:22:04 +00001424
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001425 {
1426 .name = "watchdog_action",
1427 .args_type = "action:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001428 .params = "[reset|shutdown|poweroff|pause|debug|none]",
1429 .help = "change watchdog action",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001430 .cmd = hmp_watchdog_action,
Hani Benhabilesd0ece342014-05-27 23:39:31 +01001431 .command_completion = watchdog_action_completion,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001432 },
1433
Peter Maydella6b30bc2020-02-28 15:36:06 +00001434SRST
1435``watchdog_action``
1436 Change watchdog action.
1437ERST
Blue Swirl23130862009-06-06 08:22:04 +00001438
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001439 {
1440 .name = "acl_show",
1441 .args_type = "aclname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001442 .params = "aclname",
1443 .help = "list rules in the access control list",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001444 .cmd = hmp_acl_show,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001445 },
1446
Peter Maydella6b30bc2020-02-28 15:36:06 +00001447SRST
1448``acl_show`` *aclname*
1449 List all the matching rules in the access control list, and the default
1450 policy. There are currently two named access control lists,
1451 *vnc.x509dname* and *vnc.username* matching on the x509 client
1452 certificate distinguished name, and SASL username respectively.
1453ERST
Blue Swirl23130862009-06-06 08:22:04 +00001454
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001455 {
1456 .name = "acl_policy",
1457 .args_type = "aclname:s,policy:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001458 .params = "aclname allow|deny",
1459 .help = "set default access control list policy",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001460 .cmd = hmp_acl_policy,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001461 },
1462
Peter Maydella6b30bc2020-02-28 15:36:06 +00001463SRST
1464``acl_policy`` *aclname* ``allow|deny``
1465 Set the default access control list policy, used in the event that
1466 none of the explicit rules match. The default policy at startup is
1467 always ``deny``.
1468ERST
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001469
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001470 {
1471 .name = "acl_add",
1472 .args_type = "aclname:s,match:s,policy:s,index:i?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001473 .params = "aclname match allow|deny [index]",
1474 .help = "add a match rule to the access control list",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001475 .cmd = hmp_acl_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001476 },
1477
Peter Maydella6b30bc2020-02-28 15:36:06 +00001478SRST
1479``acl_add`` *aclname* *match* ``allow|deny`` [*index*]
1480 Add a match rule to the access control list, allowing or denying access.
1481 The match will normally be an exact username or x509 distinguished name,
1482 but can optionally include wildcard globs. eg ``*@EXAMPLE.COM`` to
1483 allow all users in the ``EXAMPLE.COM`` kerberos realm. The match will
1484 normally be appended to the end of the ACL, but can be inserted
1485 earlier in the list if the optional *index* parameter is supplied.
1486ERST
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001487
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001488 {
1489 .name = "acl_remove",
1490 .args_type = "aclname:s,match:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001491 .params = "aclname match",
1492 .help = "remove a match rule from the access control list",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001493 .cmd = hmp_acl_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001494 },
1495
Peter Maydella6b30bc2020-02-28 15:36:06 +00001496SRST
1497``acl_remove`` *aclname* *match*
1498 Remove the specified match rule from the access control list.
1499ERST
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001500
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001501 {
1502 .name = "acl_reset",
1503 .args_type = "aclname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001504 .params = "aclname",
1505 .help = "reset the access control list",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001506 .cmd = hmp_acl_reset,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001507 },
1508
Peter Maydella6b30bc2020-02-28 15:36:06 +00001509SRST
1510``acl_reset`` *aclname*
1511 Remove all matches from the access control list, and set the default
1512 policy back to ``deny``.
1513ERST
Blue Swirl23130862009-06-06 08:22:04 +00001514
Paolo Bonzini40577252012-08-23 11:53:04 +02001515 {
1516 .name = "nbd_server_start",
1517 .args_type = "all:-a,writable:-w,uri:s",
1518 .params = "nbd_server_start [-a] [-w] host:port",
1519 .help = "serve block devices on the given host and port",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001520 .cmd = hmp_nbd_server_start,
Paolo Bonzini40577252012-08-23 11:53:04 +02001521 },
Peter Maydella6b30bc2020-02-28 15:36:06 +00001522SRST
1523``nbd_server_start`` *host*:*port*
1524 Start an NBD server on the given host and/or port. If the ``-a``
1525 option is included, all of the virtual machine's block devices that
1526 have an inserted media on them are automatically exported; in this case,
1527 the ``-w`` option makes the devices writable too.
1528ERST
Paolo Bonzini40577252012-08-23 11:53:04 +02001529
1530 {
1531 .name = "nbd_server_add",
Eric Blakedba49322018-01-09 13:28:02 -06001532 .args_type = "writable:-w,device:B,name:s?",
1533 .params = "nbd_server_add [-w] device [name]",
Paolo Bonzini40577252012-08-23 11:53:04 +02001534 .help = "export a block device via NBD",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001535 .cmd = hmp_nbd_server_add,
Paolo Bonzini40577252012-08-23 11:53:04 +02001536 },
Peter Maydella6b30bc2020-02-28 15:36:06 +00001537SRST
1538``nbd_server_add`` *device* [ *name* ]
1539 Export a block device through QEMU's NBD server, which must be started
1540 beforehand with ``nbd_server_start``. The ``-w`` option makes the
1541 exported device writable too. The export name is controlled by *name*,
1542 defaulting to *device*.
1543ERST
Paolo Bonzini40577252012-08-23 11:53:04 +02001544
1545 {
Eric Blake08fb10a2018-01-25 08:45:57 -06001546 .name = "nbd_server_remove",
1547 .args_type = "force:-f,name:s",
1548 .params = "nbd_server_remove [-f] name",
1549 .help = "remove an export previously exposed via NBD",
1550 .cmd = hmp_nbd_server_remove,
1551 },
Peter Maydella6b30bc2020-02-28 15:36:06 +00001552SRST
1553``nbd_server_remove [-f]`` *name*
1554 Stop exporting a block device through QEMU's NBD server, which was
1555 previously started with ``nbd_server_add``. The ``-f``
1556 option forces the server to drop the export immediately even if
1557 clients are connected; otherwise the command fails unless there are no
1558 clients.
1559ERST
Eric Blake08fb10a2018-01-25 08:45:57 -06001560
1561 {
Paolo Bonzini40577252012-08-23 11:53:04 +02001562 .name = "nbd_server_stop",
1563 .args_type = "",
1564 .params = "nbd_server_stop",
1565 .help = "stop serving block devices using the NBD protocol",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001566 .cmd = hmp_nbd_server_stop,
Paolo Bonzini40577252012-08-23 11:53:04 +02001567 },
Peter Maydella6b30bc2020-02-28 15:36:06 +00001568SRST
1569``nbd_server_stop``
1570 Stop the QEMU embedded NBD server.
1571ERST
Paolo Bonzini40577252012-08-23 11:53:04 +02001572
1573
Huang Ying79c4f6b2009-06-23 10:05:14 +08001574#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001575
1576 {
1577 .name = "mce",
Jin Dongming31ce5e02010-12-10 17:21:02 +09001578 .args_type = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
1579 .params = "[-b] cpu bank status mcgstatus addr misc",
1580 .help = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001581 .cmd = hmp_mce,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001582 },
1583
Huang Ying79c4f6b2009-06-23 10:05:14 +08001584#endif
Peter Maydella6b30bc2020-02-28 15:36:06 +00001585SRST
1586``mce`` *cpu* *bank* *status* *mcgstatus* *addr* *misc*
1587 Inject an MCE on the given CPU (x86 only).
1588ERST
Huang Ying79c4f6b2009-06-23 10:05:14 +08001589
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001590 {
1591 .name = "getfd",
1592 .args_type = "fdname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001593 .params = "getfd name",
1594 .help = "receive a file descriptor via SCM rights and assign it a name",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001595 .cmd = hmp_getfd,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001596 },
1597
Peter Maydella6b30bc2020-02-28 15:36:06 +00001598SRST
1599``getfd`` *fdname*
1600 If a file descriptor is passed alongside this command using the SCM_RIGHTS
1601 mechanism on unix sockets, it is stored using the name *fdname* for
1602 later use by other monitor commands.
1603ERST
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001604
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001605 {
1606 .name = "closefd",
1607 .args_type = "fdname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001608 .params = "closefd name",
1609 .help = "close a file descriptor previously passed via SCM rights",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001610 .cmd = hmp_closefd,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001611 },
1612
Peter Maydella6b30bc2020-02-28 15:36:06 +00001613SRST
1614``closefd`` *fdname*
1615 Close the file descriptor previously assigned to *fdname* using the
1616 ``getfd`` command. This is only needed if the file descriptor was never
1617 used by another monitor command.
1618ERST
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001619
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001620 {
1621 .name = "block_passwd",
1622 .args_type = "device:B,password:s",
1623 .params = "block_passwd device password",
1624 .help = "set the password of encrypted block devices",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001625 .cmd = hmp_block_passwd,
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001626 },
1627
Peter Maydella6b30bc2020-02-28 15:36:06 +00001628SRST
1629``block_passwd`` *device* *password*
1630 Set the encrypted device *device* password to *password*
1631
1632 This command is now obsolete and will always return an error since 2.10
1633ERST
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001634
1635 {
1636 .name = "block_set_io_throttle",
1637 .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
1638 .params = "device bps bps_rd bps_wr iops iops_rd iops_wr",
1639 .help = "change I/O throttle limits for a block drive",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001640 .cmd = hmp_block_set_io_throttle,
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001641 },
1642
Peter Maydella6b30bc2020-02-28 15:36:06 +00001643SRST
1644``block_set_io_throttle`` *device* *bps* *bps_rd* *bps_wr* *iops* *iops_rd* *iops_wr*
1645 Change I/O throttle limits for a block drive to
1646 *bps* *bps_rd* *bps_wr* *iops* *iops_rd* *iops_wr*.
1647 *device* can be a block device name, a qdev ID or a QOM path.
1648ERST
Jan Kiszkab40292e2010-05-31 14:43:31 -03001649
Jan Kiszka33572ec2010-05-31 14:43:30 -03001650 {
Gerd Hoffmann75721502010-10-07 12:22:54 +02001651 .name = "set_password",
1652 .args_type = "protocol:s,password:s,connected:s?",
1653 .params = "protocol password action-if-connected",
1654 .help = "set spice/vnc password",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001655 .cmd = hmp_set_password,
Gerd Hoffmann75721502010-10-07 12:22:54 +02001656 },
1657
Peter Maydella6b30bc2020-02-28 15:36:06 +00001658SRST
1659``set_password [ vnc | spice ] password [ action-if-connected ]``
1660 Change spice/vnc password. Use zero to make the password stay valid
1661 forever. *action-if-connected* specifies what should happen in
1662 case a connection is established: *fail* makes the password change
1663 fail. *disconnect* changes the password and disconnects the
1664 client. *keep* changes the password and keeps the connection up.
1665 *keep* is the default.
1666ERST
Gerd Hoffmann75721502010-10-07 12:22:54 +02001667
1668 {
1669 .name = "expire_password",
1670 .args_type = "protocol:s,time:s",
1671 .params = "protocol time",
1672 .help = "set spice/vnc password expire-time",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001673 .cmd = hmp_expire_password,
Gerd Hoffmann75721502010-10-07 12:22:54 +02001674 },
1675
Peter Maydella6b30bc2020-02-28 15:36:06 +00001676SRST
1677``expire_password [ vnc | spice ]`` *expire-time*
1678 Specify when a password for spice/vnc becomes
1679 invalid. *expire-time* accepts:
1680
1681 ``now``
1682 Invalidate password instantly.
1683 ``never``
1684 Password stays valid forever.
1685 ``+``\ *nsec*
1686 Password stays valid for *nsec* seconds starting now.
1687 *nsec*
1688 Password is invalidated at the given time. *nsec* are the seconds
1689 passed since 1970, i.e. unix epoch.
1690
1691ERST
Gerd Hoffmann75721502010-10-07 12:22:54 +02001692
Gerd Hoffmann46920822013-02-28 08:46:10 +01001693 {
1694 .name = "chardev-add",
1695 .args_type = "args:s",
1696 .params = "args",
1697 .help = "add chardev",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001698 .cmd = hmp_chardev_add,
Hani Benhabiles13e315d2014-05-07 23:41:29 +01001699 .command_completion = chardev_add_completion,
Gerd Hoffmann46920822013-02-28 08:46:10 +01001700 },
1701
Peter Maydella6b30bc2020-02-28 15:36:06 +00001702SRST
1703``chardev-add`` *args*
1704 chardev-add accepts the same parameters as the -chardev command line switch.
1705ERST
Anton Nefedov75b60162017-07-06 15:08:57 +03001706
1707 {
1708 .name = "chardev-change",
1709 .args_type = "id:s,args:s",
1710 .params = "id args",
1711 .help = "change chardev",
1712 .cmd = hmp_chardev_change,
1713 },
1714
Peter Maydella6b30bc2020-02-28 15:36:06 +00001715SRST
1716``chardev-change`` *args*
1717 chardev-change accepts existing chardev *id* and then the same arguments
1718 as the -chardev command line switch (except for "id").
1719ERST
Gerd Hoffmann46920822013-02-28 08:46:10 +01001720
1721 {
1722 .name = "chardev-remove",
1723 .args_type = "id:s",
1724 .params = "id",
1725 .help = "remove chardev",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001726 .cmd = hmp_chardev_remove,
Hani Benhabiles6297d9a2014-05-07 23:41:28 +01001727 .command_completion = chardev_remove_completion,
Gerd Hoffmann46920822013-02-28 08:46:10 +01001728 },
1729
Peter Maydella6b30bc2020-02-28 15:36:06 +00001730SRST
1731``chardev-remove`` *id*
1732 Removes the chardev *id*.
1733ERST
Gerd Hoffmannf1088902012-12-19 10:33:40 +01001734
1735 {
Stefan Fritschbd1d5ad2017-06-11 09:48:17 +02001736 .name = "chardev-send-break",
1737 .args_type = "id:s",
1738 .params = "id",
1739 .help = "send a break on chardev",
1740 .cmd = hmp_chardev_send_break,
1741 .command_completion = chardev_remove_completion,
1742 },
1743
Peter Maydella6b30bc2020-02-28 15:36:06 +00001744SRST
1745``chardev-send-break`` *id*
1746 Send a break on the chardev *id*.
1747ERST
Stefan Fritschbd1d5ad2017-06-11 09:48:17 +02001748
1749 {
Kevin Wolf587da2c2013-06-05 14:19:41 +02001750 .name = "qemu-io",
Kevin Wolf89b6fc42019-12-17 15:13:34 +01001751 .args_type = "qdev:-d,device:B,command:s",
1752 .params = "[-d] [device] \"[command]\"",
1753 .help = "run a qemu-io command on a block device\n\t\t\t"
1754 "-d: [device] is a device ID rather than a "
1755 "drive ID or node name",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001756 .cmd = hmp_qemu_io,
Kevin Wolf587da2c2013-06-05 14:19:41 +02001757 },
1758
Peter Maydella6b30bc2020-02-28 15:36:06 +00001759SRST
1760``qemu-io`` *device* *command*
1761 Executes a qemu-io command on the given block device.
1762ERST
Kevin Wolf587da2c2013-06-05 14:19:41 +02001763
1764 {
Andreas Färber89d7fa92014-05-07 18:08:29 +02001765 .name = "qom-list",
1766 .args_type = "path:s?",
1767 .params = "path",
1768 .help = "list QOM properties",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001769 .cmd = hmp_qom_list,
Dr. David Alan Gilbert8c7c7ec2018-06-20 16:39:45 +01001770 .flags = "p",
Andreas Färber89d7fa92014-05-07 18:08:29 +02001771 },
1772
Peter Maydella6b30bc2020-02-28 15:36:06 +00001773SRST
1774``qom-list`` [*path*]
1775 Print QOM properties of object at location *path*
1776ERST
Andreas Färber89d7fa92014-05-07 18:08:29 +02001777
1778 {
Dr. David Alan Gilbert89cf4fe2020-05-20 16:11:07 +01001779 .name = "qom-get",
1780 .args_type = "path:s,property:s",
1781 .params = "path property",
1782 .help = "print QOM property",
1783 .cmd = hmp_qom_get,
1784 .flags = "p",
1785 },
1786
1787SRST
1788``qom-get`` *path* *property*
1789 Print QOM property *property* of object at location *path*
1790ERST
1791
1792 {
Andreas Färberc0e6ee92014-05-07 19:48:15 +02001793 .name = "qom-set",
David Hildenbrand2d9e3dd2020-06-10 09:51:53 +02001794 .args_type = "json:-j,path:s,property:s,value:S",
1795 .params = "[-j] path property value",
1796 .help = "set QOM property.\n\t\t\t"
1797 "-j: the value is specified in json format.",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001798 .cmd = hmp_qom_set,
Dr. David Alan Gilbert8c7c7ec2018-06-20 16:39:45 +01001799 .flags = "p",
Andreas Färberc0e6ee92014-05-07 19:48:15 +02001800 },
1801
Peter Maydella6b30bc2020-02-28 15:36:06 +00001802SRST
1803``qom-set`` *path* *property* *value*
1804 Set QOM property *property* of object at location *path* to value *value*
1805ERST
Andreas Färberc0e6ee92014-05-07 19:48:15 +02001806
1807 {
Jan Kiszka33572ec2010-05-31 14:43:30 -03001808 .name = "info",
1809 .args_type = "item:s?",
1810 .params = "[subcommand]",
1811 .help = "show various information about the system state",
Marc-André Lureau2b9e3572016-09-12 13:19:06 +04001812 .cmd = hmp_info_help,
Kevin Wolfa0cd5e12019-06-13 17:33:56 +02001813 .sub_table = hmp_info_cmds,
Dr. David Alan Gilbert8c7c7ec2018-06-20 16:39:45 +01001814 .flags = "p",
Jan Kiszka33572ec2010-05-31 14:43:30 -03001815 },
1816