xref: /qemu/hmp-commands.hx (revision e751067179e18178d0f0ab5955b95d59e2a081de)
13c95fdefSPeter MaydellHXCOMM Use DEFHEADING() to define headings in both help text and rST.
23c95fdefSPeter MaydellHXCOMM Text between SRST and ERST is copied to the rST version and
33c95fdefSPeter MaydellHXCOMM discarded from C version.
42313086aSBlue SwirlHXCOMM DEF(command, args, callback, arg_string, help) is used to construct
52313086aSBlue SwirlHXCOMM monitor commands
63c95fdefSPeter MaydellHXCOMM HXCOMM can be used for comments, discarded from both rST and C.
72313086aSBlue Swirl
82313086aSBlue Swirl
9d7f9b689SLuiz Capitulino    {
10d7f9b689SLuiz Capitulino        .name       = "help|?",
11129be006SWenchao Xia        .args_type  = "name:S?",
12d7f9b689SLuiz Capitulino        .params     = "[cmd]",
13d7f9b689SLuiz Capitulino        .help       = "show the help",
142b9e3576SMarc-André Lureau        .cmd        = do_help_cmd,
1531785f1bSDr. David Alan Gilbert        .flags      = "p",
16d7f9b689SLuiz Capitulino    },
17d7f9b689SLuiz Capitulino
18a6b30bcaSPeter MaydellSRST
19a6b30bcaSPeter Maydell``help`` or ``?`` [*cmd*]
20a6b30bcaSPeter Maydell  Show the help for all commands or just for command *cmd*.
21a6b30bcaSPeter MaydellERST
222313086aSBlue Swirl
23d7f9b689SLuiz Capitulino    {
24d7f9b689SLuiz Capitulino        .name       = "commit",
25d7f9b689SLuiz Capitulino        .args_type  = "device:B",
26d7f9b689SLuiz Capitulino        .params     = "device|all",
27d7f9b689SLuiz Capitulino        .help       = "commit changes to the disk images (if -snapshot is used) or backing files",
282b9e3576SMarc-André Lureau        .cmd        = hmp_commit,
29d7f9b689SLuiz Capitulino    },
30d7f9b689SLuiz Capitulino
31a6b30bcaSPeter MaydellSRST
32a6b30bcaSPeter Maydell``commit``
33a6b30bcaSPeter Maydell  Commit changes to the disk images (if -snapshot is used) or backing files.
34a6b30bcaSPeter Maydell  If the backing file is smaller than the snapshot, then the backing file
35a6b30bcaSPeter Maydell  will be resized to be the same size as the snapshot.  If the snapshot is
36a6b30bcaSPeter Maydell  smaller than the backing file, the backing file will not be truncated.
37a6b30bcaSPeter Maydell  If you want the backing file to match the size of the smaller snapshot,
38a6b30bcaSPeter Maydell  you can safely truncate it yourself once the commit operation successfully
39a6b30bcaSPeter Maydell  completes.
40a6b30bcaSPeter MaydellERST
412313086aSBlue Swirl
42d7f9b689SLuiz Capitulino    {
43d7f9b689SLuiz Capitulino        .name       = "q|quit",
44d7f9b689SLuiz Capitulino        .args_type  = "",
45d7f9b689SLuiz Capitulino        .params     = "",
46d7f9b689SLuiz Capitulino        .help       = "quit the emulator",
472b9e3576SMarc-André Lureau        .cmd        = hmp_quit,
48d7f9b689SLuiz Capitulino    },
49d7f9b689SLuiz Capitulino
50a6b30bcaSPeter MaydellSRST
51a6b30bcaSPeter Maydell``q`` or ``quit``
52a6b30bcaSPeter Maydell  Quit the emulator.
53a6b30bcaSPeter MaydellERST
542313086aSBlue Swirl
55d7f9b689SLuiz Capitulino    {
568e8581e6SDr. David Alan Gilbert        .name       = "exit_preconfig",
578e8581e6SDr. David Alan Gilbert        .args_type  = "",
588e8581e6SDr. David Alan Gilbert        .params     = "",
598e8581e6SDr. David Alan Gilbert        .help       = "exit the preconfig state",
608e8581e6SDr. David Alan Gilbert        .cmd        = hmp_exit_preconfig,
618e8581e6SDr. David Alan Gilbert        .flags      = "p",
628e8581e6SDr. David Alan Gilbert    },
638e8581e6SDr. David Alan Gilbert
64a6b30bcaSPeter MaydellSRST
65a6b30bcaSPeter Maydell``exit_preconfig``
66a6b30bcaSPeter Maydell  This command makes QEMU exit the preconfig state and proceed with
67a6b30bcaSPeter Maydell  VM initialization using configuration data provided on the command line
68a6b30bcaSPeter Maydell  and via the QMP monitor during the preconfig state. The command is only
69a6b30bcaSPeter Maydell  available during the preconfig state (i.e. when the --preconfig command
70a6b30bcaSPeter Maydell  line option was in use).
71a6b30bcaSPeter MaydellERST
728e8581e6SDr. David Alan Gilbert
738e8581e6SDr. David Alan Gilbert    {
746d4a2b3aSChristoph Hellwig        .name       = "block_resize",
756d4a2b3aSChristoph Hellwig        .args_type  = "device:B,size:o",
766d4a2b3aSChristoph Hellwig        .params     = "device size",
776d4a2b3aSChristoph Hellwig        .help       = "resize a block image",
782b9e3576SMarc-André Lureau        .cmd        = hmp_block_resize,
796d4a2b3aSChristoph Hellwig    },
806d4a2b3aSChristoph Hellwig
81a6b30bcaSPeter MaydellSRST
82a6b30bcaSPeter Maydell``block_resize``
83a6b30bcaSPeter Maydell  Resize a block image while a guest is running.  Usually requires guest
84a6b30bcaSPeter Maydell  action to see the updated size.  Resize to a lower size is supported,
85a6b30bcaSPeter Maydell  but should be used with extreme caution.  Note that this command only
86a6b30bcaSPeter Maydell  resizes image files, it can not resize block devices like LVM volumes.
87a6b30bcaSPeter MaydellERST
886d4a2b3aSChristoph Hellwig
8912bd451fSStefan Hajnoczi    {
9012bd451fSStefan Hajnoczi        .name       = "block_stream",
91c83c66c3SStefan Hajnoczi        .args_type  = "device:B,speed:o?,base:s?",
92c83c66c3SStefan Hajnoczi        .params     = "device [speed [base]]",
9312bd451fSStefan Hajnoczi        .help       = "copy data from a backing file into a block device",
942b9e3576SMarc-André Lureau        .cmd        = hmp_block_stream,
9512bd451fSStefan Hajnoczi    },
9612bd451fSStefan Hajnoczi
97a6b30bcaSPeter MaydellSRST
98a6b30bcaSPeter Maydell``block_stream``
99a6b30bcaSPeter Maydell  Copy data from a backing file into a block device.
100a6b30bcaSPeter MaydellERST
1016d4a2b3aSChristoph Hellwig
1026d4a2b3aSChristoph Hellwig    {
1032d47c6e9SStefan Hajnoczi        .name       = "block_job_set_speed",
104882ec7ceSStefan Hajnoczi        .args_type  = "device:B,speed:o",
105882ec7ceSStefan Hajnoczi        .params     = "device speed",
1062d47c6e9SStefan Hajnoczi        .help       = "set maximum speed for a background block operation",
1072b9e3576SMarc-André Lureau        .cmd        = hmp_block_job_set_speed,
1082d47c6e9SStefan Hajnoczi    },
1092d47c6e9SStefan Hajnoczi
110a6b30bcaSPeter MaydellSRST
111a6b30bcaSPeter Maydell``block_job_set_speed``
112a6b30bcaSPeter Maydell  Set maximum speed for a background block operation.
113a6b30bcaSPeter MaydellERST
1142d47c6e9SStefan Hajnoczi
1152d47c6e9SStefan Hajnoczi    {
116370521a1SStefan Hajnoczi        .name       = "block_job_cancel",
1176e37fb81SPaolo Bonzini        .args_type  = "force:-f,device:B",
1186e37fb81SPaolo Bonzini        .params     = "[-f] device",
1196e37fb81SPaolo Bonzini        .help       = "stop an active background block operation (use -f"
120b76e4458SLiang Li                      "\n\t\t\t if you want to abort the operation immediately"
121b76e4458SLiang Li                      "\n\t\t\t instead of keep running until data is in sync)",
1222b9e3576SMarc-André Lureau        .cmd        = hmp_block_job_cancel,
123370521a1SStefan Hajnoczi    },
124370521a1SStefan Hajnoczi
125a6b30bcaSPeter MaydellSRST
126a6b30bcaSPeter Maydell``block_job_cancel``
127a6b30bcaSPeter Maydell  Stop an active background block operation (streaming, mirroring).
128a6b30bcaSPeter MaydellERST
129aeae883bSPaolo Bonzini
130aeae883bSPaolo Bonzini    {
131aeae883bSPaolo Bonzini        .name       = "block_job_complete",
132aeae883bSPaolo Bonzini        .args_type  = "device:B",
133aeae883bSPaolo Bonzini        .params     = "device",
134aeae883bSPaolo Bonzini        .help       = "stop an active background block operation",
1352b9e3576SMarc-André Lureau        .cmd        = hmp_block_job_complete,
136aeae883bSPaolo Bonzini    },
137aeae883bSPaolo Bonzini
138a6b30bcaSPeter MaydellSRST
139a6b30bcaSPeter Maydell``block_job_complete``
140a6b30bcaSPeter Maydell  Manually trigger completion of an active background block operation.
141a6b30bcaSPeter Maydell  For mirroring, this will switch the device to the destination path.
142a6b30bcaSPeter MaydellERST
143370521a1SStefan Hajnoczi
144370521a1SStefan Hajnoczi    {
1456e37fb81SPaolo Bonzini        .name       = "block_job_pause",
1466e37fb81SPaolo Bonzini        .args_type  = "device:B",
1476e37fb81SPaolo Bonzini        .params     = "device",
1486e37fb81SPaolo Bonzini        .help       = "pause an active background block operation",
1492b9e3576SMarc-André Lureau        .cmd        = hmp_block_job_pause,
1506e37fb81SPaolo Bonzini    },
1516e37fb81SPaolo Bonzini
152a6b30bcaSPeter MaydellSRST
153a6b30bcaSPeter Maydell``block_job_pause``
154a6b30bcaSPeter Maydell  Pause an active block streaming operation.
155a6b30bcaSPeter MaydellERST
1566e37fb81SPaolo Bonzini
1576e37fb81SPaolo Bonzini    {
1586e37fb81SPaolo Bonzini        .name       = "block_job_resume",
1596e37fb81SPaolo Bonzini        .args_type  = "device:B",
1606e37fb81SPaolo Bonzini        .params     = "device",
1616e37fb81SPaolo Bonzini        .help       = "resume a paused background block operation",
1622b9e3576SMarc-André Lureau        .cmd        = hmp_block_job_resume,
1636e37fb81SPaolo Bonzini    },
1646e37fb81SPaolo Bonzini
165a6b30bcaSPeter MaydellSRST
166a6b30bcaSPeter Maydell``block_job_resume``
167a6b30bcaSPeter Maydell  Resume a paused block streaming operation.
168a6b30bcaSPeter MaydellERST
1696e37fb81SPaolo Bonzini
1706e37fb81SPaolo Bonzini    {
171d7f9b689SLuiz Capitulino        .name       = "eject",
17278d714e0SLuiz Capitulino        .args_type  = "force:-f,device:B",
173d7f9b689SLuiz Capitulino        .params     = "[-f] device",
174d7f9b689SLuiz Capitulino        .help       = "eject a removable medium (use -f to force it)",
1752b9e3576SMarc-André Lureau        .cmd        = hmp_eject,
176d7f9b689SLuiz Capitulino    },
177d7f9b689SLuiz Capitulino
178a6b30bcaSPeter MaydellSRST
179a6b30bcaSPeter Maydell``eject [-f]`` *device*
180a6b30bcaSPeter Maydell  Eject a removable medium (use -f to force it).
181a6b30bcaSPeter MaydellERST
1822313086aSBlue Swirl
183d7f9b689SLuiz Capitulino    {
1849063f814SRyan Harper        .name       = "drive_del",
185f7bdc41aSHani Benhabiles        .args_type  = "id:B",
1869063f814SRyan Harper        .params     = "device",
1879063f814SRyan Harper        .help       = "remove host block device",
1882b9e3576SMarc-André Lureau        .cmd        = hmp_drive_del,
1899063f814SRyan Harper    },
1909063f814SRyan Harper
191a6b30bcaSPeter MaydellSRST
192a6b30bcaSPeter Maydell``drive_del`` *device*
193a6b30bcaSPeter Maydell  Remove host block device.  The result is that guest generated IO is no longer
194a6b30bcaSPeter Maydell  submitted against the host device underlying the disk.  Once a drive has
195a6b30bcaSPeter Maydell  been deleted, the QEMU Block layer returns -EIO which results in IO
196a6b30bcaSPeter Maydell  errors in the guest for applications that are reading/writing to the device.
197a6b30bcaSPeter Maydell  These errors are always reported to the guest, regardless of the drive's error
198a6b30bcaSPeter Maydell  actions (drive options rerror, werror).
199a6b30bcaSPeter MaydellERST
2009063f814SRyan Harper
2019063f814SRyan Harper    {
202d7f9b689SLuiz Capitulino        .name       = "change",
203baead0abSMax Reitz        .args_type  = "device:B,target:F,arg:s?,read-only-mode:s?",
204baead0abSMax Reitz        .params     = "device filename [format [read-only-mode]]",
205d7f9b689SLuiz Capitulino        .help       = "change a removable medium, optional format",
2062b9e3576SMarc-André Lureau        .cmd        = hmp_change,
207d7f9b689SLuiz Capitulino    },
208d7f9b689SLuiz Capitulino
209a6b30bcaSPeter MaydellSRST
210a6b30bcaSPeter Maydell``change`` *device* *setting*
211a6b30bcaSPeter Maydell  Change the configuration of a device.
212a6b30bcaSPeter Maydell
213a6b30bcaSPeter Maydell  ``change`` *diskdevice* *filename* [*format* [*read-only-mode*]]
214a6b30bcaSPeter Maydell    Change the medium for a removable disk device to point to *filename*. eg::
215a6b30bcaSPeter Maydell
216a6b30bcaSPeter Maydell      (qemu) change ide1-cd0 /path/to/some.iso
217a6b30bcaSPeter Maydell
218a6b30bcaSPeter Maydell    *format* is optional.
219a6b30bcaSPeter Maydell
220a6b30bcaSPeter Maydell    *read-only-mode* may be used to change the read-only status of the device.
221a6b30bcaSPeter Maydell    It accepts the following values:
222a6b30bcaSPeter Maydell
223a6b30bcaSPeter Maydell    retain
224a6b30bcaSPeter Maydell      Retains the current status; this is the default.
225a6b30bcaSPeter Maydell
226a6b30bcaSPeter Maydell    read-only
227a6b30bcaSPeter Maydell      Makes the device read-only.
228a6b30bcaSPeter Maydell
229a6b30bcaSPeter Maydell    read-write
230a6b30bcaSPeter Maydell      Makes the device writable.
231a6b30bcaSPeter Maydell
232a6b30bcaSPeter Maydell  ``change vnc`` *display*,\ *options*
233a6b30bcaSPeter Maydell    Change the configuration of the VNC server. The valid syntax for *display*
234a6b30bcaSPeter Maydell    and *options* are described at :ref:`sec_005finvocation`. eg::
235a6b30bcaSPeter Maydell
236a6b30bcaSPeter Maydell      (qemu) change vnc localhost:1
237a6b30bcaSPeter Maydell
238a6b30bcaSPeter Maydell  ``change vnc password`` [*password*]
239a6b30bcaSPeter Maydell
240a6b30bcaSPeter Maydell    Change the password associated with the VNC server. If the new password
241a6b30bcaSPeter Maydell    is not supplied, the monitor will prompt for it to be entered. VNC
242a6b30bcaSPeter Maydell    passwords are only significant up to 8 letters. eg::
243a6b30bcaSPeter Maydell
244a6b30bcaSPeter Maydell      (qemu) change vnc password
245a6b30bcaSPeter Maydell      Password: ********
246a6b30bcaSPeter Maydell
247a6b30bcaSPeter MaydellERST
2482313086aSBlue Swirl
249d7f9b689SLuiz Capitulino    {
250d7f9b689SLuiz Capitulino        .name       = "screendump",
251f771c544SThomas Huth        .args_type  = "filename:F,device:s?,head:i?",
252f771c544SThomas Huth        .params     = "filename [device [head]]",
253f771c544SThomas Huth        .help       = "save screen from head 'head' of display device 'device' "
254f771c544SThomas Huth                      "into PPM image 'filename'",
2552b9e3576SMarc-André Lureau        .cmd        = hmp_screendump,
256d7f9b689SLuiz Capitulino    },
257d7f9b689SLuiz Capitulino
258a6b30bcaSPeter MaydellSRST
259a6b30bcaSPeter Maydell``screendump`` *filename*
260a6b30bcaSPeter Maydell  Save screen into PPM image *filename*.
261a6b30bcaSPeter MaydellERST
2622313086aSBlue Swirl
263d7f9b689SLuiz Capitulino    {
264d7f9b689SLuiz Capitulino        .name       = "logfile",
265d7f9b689SLuiz Capitulino        .args_type  = "filename:F",
266d7f9b689SLuiz Capitulino        .params     = "filename",
267d7f9b689SLuiz Capitulino        .help       = "output logs to 'filename'",
2682b9e3576SMarc-André Lureau        .cmd        = hmp_logfile,
269d7f9b689SLuiz Capitulino    },
270d7f9b689SLuiz Capitulino
271a6b30bcaSPeter MaydellSRST
272a6b30bcaSPeter Maydell``logfile`` *filename*
273a6b30bcaSPeter Maydell  Output logs to *filename*.
274a6b30bcaSPeter MaydellERST
2752313086aSBlue Swirl
27622890ab5SPrerna Saxena    {
27722890ab5SPrerna Saxena        .name       = "trace-event",
27877e2b172SLluís Vilanova        .args_type  = "name:s,option:b,vcpu:i?",
27977e2b172SLluís Vilanova        .params     = "name on|off [vcpu]",
28077e2b172SLluís Vilanova        .help       = "changes status of a specific trace event "
28177e2b172SLluís Vilanova                      "(vcpu: vCPU to set, default is all)",
2822b9e3576SMarc-André Lureau        .cmd = hmp_trace_event,
283987bd270SDr. David Alan Gilbert        .command_completion = trace_event_completion,
28422890ab5SPrerna Saxena    },
28522890ab5SPrerna Saxena
286a6b30bcaSPeter MaydellSRST
287a6b30bcaSPeter Maydell``trace-event``
288a6b30bcaSPeter Maydell  changes status of a trace event
289a6b30bcaSPeter MaydellERST
290c5ceb523SStefan Hajnoczi
291c45a8168SMichael Roth#if defined(CONFIG_TRACE_SIMPLE)
292c5ceb523SStefan Hajnoczi    {
293c5ceb523SStefan Hajnoczi        .name       = "trace-file",
294c5ceb523SStefan Hajnoczi        .args_type  = "op:s?,arg:F?",
295c5ceb523SStefan Hajnoczi        .params     = "on|off|flush|set [arg]",
296c5ceb523SStefan Hajnoczi        .help       = "open, close, or flush trace file, or set a new file name",
2972b9e3576SMarc-André Lureau        .cmd        = hmp_trace_file,
298c5ceb523SStefan Hajnoczi    },
299c5ceb523SStefan Hajnoczi
300a6b30bcaSPeter MaydellSRST
301a6b30bcaSPeter Maydell``trace-file on|off|flush``
302a6b30bcaSPeter Maydell  Open, close, or flush the trace file.  If no argument is given, the
303a6b30bcaSPeter Maydell  status of the trace file is displayed.
304a6b30bcaSPeter MaydellERST
30522890ab5SPrerna Saxena#endif
30622890ab5SPrerna Saxena
307d7f9b689SLuiz Capitulino    {
308d7f9b689SLuiz Capitulino        .name       = "log",
309d7f9b689SLuiz Capitulino        .args_type  = "items:s",
310d7f9b689SLuiz Capitulino        .params     = "item1[,...]",
311989b697dSPeter Maydell        .help       = "activate logging of the specified items",
3122b9e3576SMarc-André Lureau        .cmd        = hmp_log,
313d7f9b689SLuiz Capitulino    },
314d7f9b689SLuiz Capitulino
315a6b30bcaSPeter MaydellSRST
316a6b30bcaSPeter Maydell``log`` *item1*\ [,...]
317a6b30bcaSPeter Maydell  Activate logging of the specified items.
318a6b30bcaSPeter MaydellERST
3192313086aSBlue Swirl
320d7f9b689SLuiz Capitulino    {
321d7f9b689SLuiz Capitulino        .name       = "savevm",
322d7f9b689SLuiz Capitulino        .args_type  = "name:s?",
3236ca08045SDaniel Henrique Barboza        .params     = "tag",
3246ca08045SDaniel Henrique Barboza        .help       = "save a VM snapshot. If no tag is provided, a new snapshot is created",
3252b9e3576SMarc-André Lureau        .cmd        = hmp_savevm,
326d7f9b689SLuiz Capitulino    },
327d7f9b689SLuiz Capitulino
328a6b30bcaSPeter MaydellSRST
329a6b30bcaSPeter Maydell``savevm`` *tag*
330a6b30bcaSPeter Maydell  Create a snapshot of the whole virtual machine. If *tag* is
331a6b30bcaSPeter Maydell  provided, it is used as human readable identifier. If there is already
332a6b30bcaSPeter Maydell  a snapshot with the same tag, it is replaced. More info at
333a6b30bcaSPeter Maydell  :ref:`vm_005fsnapshots`.
334a6b30bcaSPeter Maydell
335a6b30bcaSPeter Maydell  Since 4.0, savevm stopped allowing the snapshot id to be set, accepting
336a6b30bcaSPeter Maydell  only *tag* as parameter.
337a6b30bcaSPeter MaydellERST
3382313086aSBlue Swirl
339d7f9b689SLuiz Capitulino    {
340d7f9b689SLuiz Capitulino        .name       = "loadvm",
341d7f9b689SLuiz Capitulino        .args_type  = "name:s",
3426ca08045SDaniel Henrique Barboza        .params     = "tag",
3436ca08045SDaniel Henrique Barboza        .help       = "restore a VM snapshot from its tag",
3442b9e3576SMarc-André Lureau        .cmd        = hmp_loadvm,
345b21631f3SHani Benhabiles        .command_completion = loadvm_completion,
346d7f9b689SLuiz Capitulino    },
347d7f9b689SLuiz Capitulino
348a6b30bcaSPeter MaydellSRST
349a6b30bcaSPeter Maydell``loadvm`` *tag*
350a6b30bcaSPeter Maydell  Set the whole virtual machine to the snapshot identified by the tag
351a6b30bcaSPeter Maydell  *tag*.
352a6b30bcaSPeter Maydell
353a6b30bcaSPeter Maydell  Since 4.0, loadvm stopped accepting snapshot id as parameter.
354a6b30bcaSPeter MaydellERST
3552313086aSBlue Swirl
356d7f9b689SLuiz Capitulino    {
357d7f9b689SLuiz Capitulino        .name       = "delvm",
358d7f9b689SLuiz Capitulino        .args_type  = "name:s",
3596ca08045SDaniel Henrique Barboza        .params     = "tag",
3606ca08045SDaniel Henrique Barboza        .help       = "delete a VM snapshot from its tag",
3612b9e3576SMarc-André Lureau        .cmd        = hmp_delvm,
362b21631f3SHani Benhabiles        .command_completion = delvm_completion,
363d7f9b689SLuiz Capitulino    },
364d7f9b689SLuiz Capitulino
365a6b30bcaSPeter MaydellSRST
366a6b30bcaSPeter Maydell``delvm`` *tag*
367a6b30bcaSPeter Maydell  Delete the snapshot identified by *tag*.
368a6b30bcaSPeter Maydell
369a6b30bcaSPeter Maydell  Since 4.0, delvm stopped deleting snapshots by snapshot id, accepting
370a6b30bcaSPeter Maydell  only *tag* as parameter.
371a6b30bcaSPeter MaydellERST
3722313086aSBlue Swirl
373d7f9b689SLuiz Capitulino    {
374d7f9b689SLuiz Capitulino        .name       = "singlestep",
375d7f9b689SLuiz Capitulino        .args_type  = "option:s?",
376d7f9b689SLuiz Capitulino        .params     = "[on|off]",
377d7f9b689SLuiz Capitulino        .help       = "run emulation in singlestep mode or switch to normal mode",
3782b9e3576SMarc-André Lureau        .cmd        = hmp_singlestep,
379d7f9b689SLuiz Capitulino    },
380d7f9b689SLuiz Capitulino
381a6b30bcaSPeter MaydellSRST
382a6b30bcaSPeter Maydell``singlestep [off]``
383a6b30bcaSPeter Maydell  Run the emulation in single step mode.
384a6b30bcaSPeter Maydell  If called with option off, the emulation returns to normal mode.
385a6b30bcaSPeter MaydellERST
3862313086aSBlue Swirl
387d7f9b689SLuiz Capitulino    {
388d7f9b689SLuiz Capitulino        .name       = "stop",
389d7f9b689SLuiz Capitulino        .args_type  = "",
390d7f9b689SLuiz Capitulino        .params     = "",
391d7f9b689SLuiz Capitulino        .help       = "stop emulation",
3922b9e3576SMarc-André Lureau        .cmd        = hmp_stop,
393d7f9b689SLuiz Capitulino    },
394d7f9b689SLuiz Capitulino
395a6b30bcaSPeter MaydellSRST
396a6b30bcaSPeter Maydell``stop``
397a6b30bcaSPeter Maydell  Stop emulation.
398a6b30bcaSPeter MaydellERST
3992313086aSBlue Swirl
400d7f9b689SLuiz Capitulino    {
401d7f9b689SLuiz Capitulino        .name       = "c|cont",
402d7f9b689SLuiz Capitulino        .args_type  = "",
403d7f9b689SLuiz Capitulino        .params     = "",
404d7f9b689SLuiz Capitulino        .help       = "resume emulation",
4052b9e3576SMarc-André Lureau        .cmd        = hmp_cont,
406d7f9b689SLuiz Capitulino    },
407d7f9b689SLuiz Capitulino
408a6b30bcaSPeter MaydellSRST
409a6b30bcaSPeter Maydell``c`` or ``cont``
410a6b30bcaSPeter Maydell  Resume emulation.
411a6b30bcaSPeter MaydellERST
4122313086aSBlue Swirl
413d7f9b689SLuiz Capitulino    {
4149b9df25aSGerd Hoffmann        .name       = "system_wakeup",
4159b9df25aSGerd Hoffmann        .args_type  = "",
4169b9df25aSGerd Hoffmann        .params     = "",
4179b9df25aSGerd Hoffmann        .help       = "wakeup guest from suspend",
4182b9e3576SMarc-André Lureau        .cmd        = hmp_system_wakeup,
4199b9df25aSGerd Hoffmann    },
4209b9df25aSGerd Hoffmann
421a6b30bcaSPeter MaydellSRST
422a6b30bcaSPeter Maydell``system_wakeup``
423a6b30bcaSPeter Maydell  Wakeup guest from suspend.
424a6b30bcaSPeter MaydellERST
4259b9df25aSGerd Hoffmann
4269b9df25aSGerd Hoffmann    {
427d7f9b689SLuiz Capitulino        .name       = "gdbserver",
428d7f9b689SLuiz Capitulino        .args_type  = "device:s?",
429d7f9b689SLuiz Capitulino        .params     = "[device]",
430d7f9b689SLuiz Capitulino        .help       = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
4312b9e3576SMarc-André Lureau        .cmd        = hmp_gdbserver,
432d7f9b689SLuiz Capitulino    },
433d7f9b689SLuiz Capitulino
434a6b30bcaSPeter MaydellSRST
435a6b30bcaSPeter Maydell``gdbserver`` [*port*]
436a6b30bcaSPeter Maydell  Start gdbserver session (default *port*\=1234)
437a6b30bcaSPeter MaydellERST
4382313086aSBlue Swirl
439d7f9b689SLuiz Capitulino    {
440d7f9b689SLuiz Capitulino        .name       = "x",
441d7f9b689SLuiz Capitulino        .args_type  = "fmt:/,addr:l",
442d7f9b689SLuiz Capitulino        .params     = "/fmt addr",
443d7f9b689SLuiz Capitulino        .help       = "virtual memory dump starting at 'addr'",
4442b9e3576SMarc-André Lureau        .cmd        = hmp_memory_dump,
445d7f9b689SLuiz Capitulino    },
446d7f9b689SLuiz Capitulino
447a6b30bcaSPeter MaydellSRST
448a6b30bcaSPeter Maydell``x/``\ *fmt* *addr*
449a6b30bcaSPeter Maydell  Virtual memory dump starting at *addr*.
450a6b30bcaSPeter MaydellERST
4512313086aSBlue Swirl
452d7f9b689SLuiz Capitulino    {
453d7f9b689SLuiz Capitulino        .name       = "xp",
454d7f9b689SLuiz Capitulino        .args_type  = "fmt:/,addr:l",
455d7f9b689SLuiz Capitulino        .params     = "/fmt addr",
456d7f9b689SLuiz Capitulino        .help       = "physical memory dump starting at 'addr'",
4572b9e3576SMarc-André Lureau        .cmd        = hmp_physical_memory_dump,
458d7f9b689SLuiz Capitulino    },
459d7f9b689SLuiz Capitulino
460a6b30bcaSPeter MaydellSRST
461a6b30bcaSPeter Maydell``xp /``\ *fmt* *addr*
462a6b30bcaSPeter Maydell  Physical memory dump starting at *addr*.
463a6b30bcaSPeter Maydell
464a6b30bcaSPeter Maydell  *fmt* is a format which tells the command how to format the
465a6b30bcaSPeter Maydell  data. Its syntax is: ``/{count}{format}{size}``
466a6b30bcaSPeter Maydell
467a6b30bcaSPeter Maydell  *count*
468a6b30bcaSPeter Maydell    is the number of items to be dumped.
469a6b30bcaSPeter Maydell  *format*
470a6b30bcaSPeter Maydell    can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
471a6b30bcaSPeter Maydell    c (char) or i (asm instruction).
472a6b30bcaSPeter Maydell  *size*
473a6b30bcaSPeter Maydell    can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
474a6b30bcaSPeter Maydell    ``h`` or ``w`` can be specified with the ``i`` format to
475a6b30bcaSPeter Maydell    respectively select 16 or 32 bit code instruction size.
476a6b30bcaSPeter Maydell
477a6b30bcaSPeter Maydell  Examples:
478a6b30bcaSPeter Maydell
479a6b30bcaSPeter Maydell  Dump 10 instructions at the current instruction pointer::
480a6b30bcaSPeter Maydell
481a6b30bcaSPeter Maydell    (qemu) x/10i $eip
482a6b30bcaSPeter Maydell    0x90107063:  ret
483a6b30bcaSPeter Maydell    0x90107064:  sti
484a6b30bcaSPeter Maydell    0x90107065:  lea    0x0(%esi,1),%esi
485a6b30bcaSPeter Maydell    0x90107069:  lea    0x0(%edi,1),%edi
486a6b30bcaSPeter Maydell    0x90107070:  ret
487a6b30bcaSPeter Maydell    0x90107071:  jmp    0x90107080
488a6b30bcaSPeter Maydell    0x90107073:  nop
489a6b30bcaSPeter Maydell    0x90107074:  nop
490a6b30bcaSPeter Maydell    0x90107075:  nop
491a6b30bcaSPeter Maydell    0x90107076:  nop
492a6b30bcaSPeter Maydell
493a6b30bcaSPeter Maydell  Dump 80 16 bit values at the start of the video memory::
494a6b30bcaSPeter Maydell
495a6b30bcaSPeter Maydell    (qemu) xp/80hx 0xb8000
496a6b30bcaSPeter Maydell    0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
497a6b30bcaSPeter Maydell    0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
498a6b30bcaSPeter Maydell    0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
499a6b30bcaSPeter Maydell    0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
500a6b30bcaSPeter Maydell    0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
501a6b30bcaSPeter Maydell    0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
502a6b30bcaSPeter Maydell    0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
503a6b30bcaSPeter Maydell    0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
504a6b30bcaSPeter Maydell    0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
505a6b30bcaSPeter Maydell    0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
506a6b30bcaSPeter Maydell
507a6b30bcaSPeter MaydellERST
5082313086aSBlue Swirl
509d7f9b689SLuiz Capitulino    {
510e9628441SPaolo Bonzini        .name       = "gpa2hva",
511e9628441SPaolo Bonzini        .args_type  = "addr:l",
512e9628441SPaolo Bonzini        .params     = "addr",
513e9628441SPaolo Bonzini        .help       = "print the host virtual address corresponding to a guest physical address",
514e9628441SPaolo Bonzini        .cmd        = hmp_gpa2hva,
515e9628441SPaolo Bonzini    },
516e9628441SPaolo Bonzini
517a6b30bcaSPeter MaydellSRST
518a6b30bcaSPeter Maydell``gpa2hva`` *addr*
519a6b30bcaSPeter Maydell  Print the host virtual address at which the guest's physical address *addr*
520a6b30bcaSPeter Maydell  is mapped.
521a6b30bcaSPeter MaydellERST
522e9628441SPaolo Bonzini
523e9628441SPaolo Bonzini#ifdef CONFIG_LINUX
524e9628441SPaolo Bonzini    {
525e9628441SPaolo Bonzini        .name       = "gpa2hpa",
526e9628441SPaolo Bonzini        .args_type  = "addr:l",
527e9628441SPaolo Bonzini        .params     = "addr",
528e9628441SPaolo Bonzini        .help       = "print the host physical address corresponding to a guest physical address",
529e9628441SPaolo Bonzini        .cmd        = hmp_gpa2hpa,
530e9628441SPaolo Bonzini    },
531e9628441SPaolo Bonzini#endif
532e9628441SPaolo Bonzini
533a6b30bcaSPeter MaydellSRST
534a6b30bcaSPeter Maydell``gpa2hpa`` *addr*
535a6b30bcaSPeter Maydell  Print the host physical address at which the guest's physical address *addr*
536a6b30bcaSPeter Maydell  is mapped.
537a6b30bcaSPeter MaydellERST
538e9628441SPaolo Bonzini
539e9628441SPaolo Bonzini    {
540574d9693SDr. David Alan Gilbert        .name       = "gva2gpa",
541574d9693SDr. David Alan Gilbert        .args_type  = "addr:l",
542574d9693SDr. David Alan Gilbert        .params     = "addr",
543574d9693SDr. David Alan Gilbert        .help       = "print the guest physical address corresponding to a guest virtual address",
544574d9693SDr. David Alan Gilbert        .cmd        = hmp_gva2gpa,
545574d9693SDr. David Alan Gilbert    },
546574d9693SDr. David Alan Gilbert
547a6b30bcaSPeter MaydellSRST
548a6b30bcaSPeter Maydell``gva2gpa`` *addr*
549a6b30bcaSPeter Maydell  Print the guest physical address at which the guest's virtual address *addr*
550a6b30bcaSPeter Maydell  is mapped based on the mapping for the current CPU.
551a6b30bcaSPeter MaydellERST
552574d9693SDr. David Alan Gilbert
553574d9693SDr. David Alan Gilbert    {
554d7f9b689SLuiz Capitulino        .name       = "p|print",
555d7f9b689SLuiz Capitulino        .args_type  = "fmt:/,val:l",
556d7f9b689SLuiz Capitulino        .params     = "/fmt expr",
557d7f9b689SLuiz Capitulino        .help       = "print expression value (use $reg for CPU register access)",
5582b9e3576SMarc-André Lureau        .cmd        = do_print,
559d7f9b689SLuiz Capitulino    },
560d7f9b689SLuiz Capitulino
561a6b30bcaSPeter MaydellSRST
562a6b30bcaSPeter Maydell``p`` or ``print/``\ *fmt* *expr*
563a6b30bcaSPeter Maydell  Print expression value. Only the *format* part of *fmt* is
564a6b30bcaSPeter Maydell  used.
565a6b30bcaSPeter MaydellERST
5662313086aSBlue Swirl
567d7f9b689SLuiz Capitulino    {
568d7f9b689SLuiz Capitulino        .name       = "i",
569d7f9b689SLuiz Capitulino        .args_type  = "fmt:/,addr:i,index:i.",
570d7f9b689SLuiz Capitulino        .params     = "/fmt addr",
571d7f9b689SLuiz Capitulino        .help       = "I/O port read",
5722b9e3576SMarc-André Lureau        .cmd        = hmp_ioport_read,
573d7f9b689SLuiz Capitulino    },
574d7f9b689SLuiz Capitulino
575a6b30bcaSPeter MaydellSRST
576a6b30bcaSPeter Maydell``i/``\ *fmt* *addr* [.\ *index*\ ]
577a6b30bcaSPeter Maydell  Read I/O port.
578a6b30bcaSPeter MaydellERST
5792313086aSBlue Swirl
580d7f9b689SLuiz Capitulino    {
581d7f9b689SLuiz Capitulino        .name       = "o",
582d7f9b689SLuiz Capitulino        .args_type  = "fmt:/,addr:i,val:i",
583d7f9b689SLuiz Capitulino        .params     = "/fmt addr value",
584d7f9b689SLuiz Capitulino        .help       = "I/O port write",
5852b9e3576SMarc-André Lureau        .cmd        = hmp_ioport_write,
586d7f9b689SLuiz Capitulino    },
587d7f9b689SLuiz Capitulino
588a6b30bcaSPeter MaydellSRST
589a6b30bcaSPeter Maydell``o/``\ *fmt* *addr* *val*
590a6b30bcaSPeter Maydell  Write to I/O port.
591a6b30bcaSPeter MaydellERST
5922313086aSBlue Swirl
593d7f9b689SLuiz Capitulino    {
594d7f9b689SLuiz Capitulino        .name       = "sendkey",
5952ef20c15SAmos Kong        .args_type  = "keys:s,hold-time:i?",
596d7f9b689SLuiz Capitulino        .params     = "keys [hold_ms]",
597d7f9b689SLuiz Capitulino        .help       = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
5982b9e3576SMarc-André Lureau        .cmd        = hmp_sendkey,
59929136cd8SHani Benhabiles        .command_completion = sendkey_completion,
600d7f9b689SLuiz Capitulino    },
601d7f9b689SLuiz Capitulino
602a6b30bcaSPeter MaydellSRST
603a6b30bcaSPeter Maydell``sendkey`` *keys*
604a6b30bcaSPeter Maydell  Send *keys* to the guest. *keys* could be the name of the
605a6b30bcaSPeter Maydell  key or the raw value in hexadecimal format. Use ``-`` to press
606a6b30bcaSPeter Maydell  several keys simultaneously. Example::
607a6b30bcaSPeter Maydell
608a6b30bcaSPeter Maydell    sendkey ctrl-alt-f1
609a6b30bcaSPeter Maydell
610a6b30bcaSPeter Maydell  This command is useful to send keys that your graphical user interface
611a6b30bcaSPeter Maydell  intercepts at low level, such as ``ctrl-alt-f1`` in X Window.
612a6b30bcaSPeter MaydellERST
613dd12e1bbSEmilio G. Cota    {
614dd12e1bbSEmilio G. Cota        .name       = "sync-profile",
615dd12e1bbSEmilio G. Cota        .args_type  = "op:s?",
616dd12e1bbSEmilio G. Cota        .params     = "[on|off|reset]",
617dd12e1bbSEmilio G. Cota        .help       = "enable, disable or reset synchronization profiling. "
618dd12e1bbSEmilio G. Cota                      "With no arguments, prints whether profiling is on or off.",
619dd12e1bbSEmilio G. Cota        .cmd        = hmp_sync_profile,
620dd12e1bbSEmilio G. Cota    },
621dd12e1bbSEmilio G. Cota
622a6b30bcaSPeter MaydellSRST
623a6b30bcaSPeter Maydell``sync-profile [on|off|reset]``
624a6b30bcaSPeter Maydell  Enable, disable or reset synchronization profiling. With no arguments, prints
625a6b30bcaSPeter Maydell  whether profiling is on or off.
626a6b30bcaSPeter MaydellERST
6272313086aSBlue Swirl
628d7f9b689SLuiz Capitulino    {
629d7f9b689SLuiz Capitulino        .name       = "system_reset",
630d7f9b689SLuiz Capitulino        .args_type  = "",
631d7f9b689SLuiz Capitulino        .params     = "",
632d7f9b689SLuiz Capitulino        .help       = "reset the system",
6332b9e3576SMarc-André Lureau        .cmd        = hmp_system_reset,
634d7f9b689SLuiz Capitulino    },
635d7f9b689SLuiz Capitulino
636a6b30bcaSPeter MaydellSRST
637a6b30bcaSPeter Maydell``system_reset``
638a6b30bcaSPeter Maydell  Reset the system.
639a6b30bcaSPeter MaydellERST
6402313086aSBlue Swirl
641d7f9b689SLuiz Capitulino    {
642d7f9b689SLuiz Capitulino        .name       = "system_powerdown",
643d7f9b689SLuiz Capitulino        .args_type  = "",
644d7f9b689SLuiz Capitulino        .params     = "",
645d7f9b689SLuiz Capitulino        .help       = "send system power down event",
6462b9e3576SMarc-André Lureau        .cmd        = hmp_system_powerdown,
647d7f9b689SLuiz Capitulino    },
648d7f9b689SLuiz Capitulino
649a6b30bcaSPeter MaydellSRST
650a6b30bcaSPeter Maydell``system_powerdown``
651a6b30bcaSPeter Maydell  Power down the system (if supported).
652a6b30bcaSPeter MaydellERST
6532313086aSBlue Swirl
654d7f9b689SLuiz Capitulino    {
655d7f9b689SLuiz Capitulino        .name       = "sum",
656d7f9b689SLuiz Capitulino        .args_type  = "start:i,size:i",
657d7f9b689SLuiz Capitulino        .params     = "addr size",
658d7f9b689SLuiz Capitulino        .help       = "compute the checksum of a memory region",
6592b9e3576SMarc-André Lureau        .cmd        = hmp_sum,
660d7f9b689SLuiz Capitulino    },
661d7f9b689SLuiz Capitulino
662a6b30bcaSPeter MaydellSRST
663a6b30bcaSPeter Maydell``sum`` *addr* *size*
664a6b30bcaSPeter Maydell  Compute the checksum of a memory region.
665a6b30bcaSPeter MaydellERST
6662313086aSBlue Swirl
667d7f9b689SLuiz Capitulino    {
668d7f9b689SLuiz Capitulino        .name       = "device_add",
669c7e4e8ceSMarkus Armbruster        .args_type  = "device:O",
670c7e4e8ceSMarkus Armbruster        .params     = "driver[,prop=value][,...]",
671d7f9b689SLuiz Capitulino        .help       = "add device, like -device on the command line",
6722b9e3576SMarc-André Lureau        .cmd        = hmp_device_add,
6732da1b3abSHani Benhabiles        .command_completion = device_add_completion,
674d7f9b689SLuiz Capitulino    },
675d7f9b689SLuiz Capitulino
676a6b30bcaSPeter MaydellSRST
677a6b30bcaSPeter Maydell``device_add`` *config*
678a6b30bcaSPeter Maydell  Add device.
679a6b30bcaSPeter MaydellERST
6803418bd25SGerd Hoffmann
681d7f9b689SLuiz Capitulino    {
682d7f9b689SLuiz Capitulino        .name       = "device_del",
683d7f9b689SLuiz Capitulino        .args_type  = "id:s",
684d7f9b689SLuiz Capitulino        .params     = "device",
685d7f9b689SLuiz Capitulino        .help       = "remove device",
6862b9e3576SMarc-André Lureau        .cmd        = hmp_device_del,
6872da1b3abSHani Benhabiles        .command_completion = device_del_completion,
688d7f9b689SLuiz Capitulino    },
689d7f9b689SLuiz Capitulino
690a6b30bcaSPeter MaydellSRST
691a6b30bcaSPeter Maydell``device_del`` *id*
692a6b30bcaSPeter Maydell  Remove device *id*. *id* may be a short ID
693a6b30bcaSPeter Maydell  or a QOM object path.
694a6b30bcaSPeter MaydellERST
6953418bd25SGerd Hoffmann
696d7f9b689SLuiz Capitulino    {
697d7f9b689SLuiz Capitulino        .name       = "cpu",
698d7f9b689SLuiz Capitulino        .args_type  = "index:i",
699d7f9b689SLuiz Capitulino        .params     = "index",
700d7f9b689SLuiz Capitulino        .help       = "set the default CPU",
7012b9e3576SMarc-André Lureau        .cmd        = hmp_cpu,
702d7f9b689SLuiz Capitulino    },
7033418bd25SGerd Hoffmann
704a6b30bcaSPeter MaydellSRST
705a6b30bcaSPeter Maydell``cpu`` *index*
706a6b30bcaSPeter Maydell  Set the default CPU.
707a6b30bcaSPeter MaydellERST
7082313086aSBlue Swirl
709d7f9b689SLuiz Capitulino    {
710d7f9b689SLuiz Capitulino        .name       = "mouse_move",
711d7f9b689SLuiz Capitulino        .args_type  = "dx_str:s,dy_str:s,dz_str:s?",
712d7f9b689SLuiz Capitulino        .params     = "dx dy [dz]",
713d7f9b689SLuiz Capitulino        .help       = "send mouse move events",
7142b9e3576SMarc-André Lureau        .cmd        = hmp_mouse_move,
715d7f9b689SLuiz Capitulino    },
716d7f9b689SLuiz Capitulino
717a6b30bcaSPeter MaydellSRST
718a6b30bcaSPeter Maydell``mouse_move`` *dx* *dy* [*dz*]
719a6b30bcaSPeter Maydell  Move the active mouse to the specified coordinates *dx* *dy*
720a6b30bcaSPeter Maydell  with optional scroll axis *dz*.
721a6b30bcaSPeter MaydellERST
7222313086aSBlue Swirl
723d7f9b689SLuiz Capitulino    {
724d7f9b689SLuiz Capitulino        .name       = "mouse_button",
725d7f9b689SLuiz Capitulino        .args_type  = "button_state:i",
726d7f9b689SLuiz Capitulino        .params     = "state",
727d7f9b689SLuiz Capitulino        .help       = "change mouse button state (1=L, 2=M, 4=R)",
7282b9e3576SMarc-André Lureau        .cmd        = hmp_mouse_button,
729d7f9b689SLuiz Capitulino    },
730d7f9b689SLuiz Capitulino
731a6b30bcaSPeter MaydellSRST
732a6b30bcaSPeter Maydell``mouse_button`` *val*
733a6b30bcaSPeter Maydell  Change the active mouse button state *val* (1=L, 2=M, 4=R).
734a6b30bcaSPeter MaydellERST
7352313086aSBlue Swirl
736d7f9b689SLuiz Capitulino    {
737d7f9b689SLuiz Capitulino        .name       = "mouse_set",
738d7f9b689SLuiz Capitulino        .args_type  = "index:i",
739d7f9b689SLuiz Capitulino        .params     = "index",
740d7f9b689SLuiz Capitulino        .help       = "set which mouse device receives events",
7412b9e3576SMarc-André Lureau        .cmd        = hmp_mouse_set,
742d7f9b689SLuiz Capitulino    },
743d7f9b689SLuiz Capitulino
744a6b30bcaSPeter MaydellSRST
745a6b30bcaSPeter Maydell``mouse_set`` *index*
746a6b30bcaSPeter Maydell  Set which mouse device receives events at given *index*, index
747a6b30bcaSPeter Maydell  can be obtained with::
748a6b30bcaSPeter Maydell
749a6b30bcaSPeter Maydell    info mice
750a6b30bcaSPeter Maydell
751a6b30bcaSPeter MaydellERST
7522313086aSBlue Swirl
753d7f9b689SLuiz Capitulino    {
754d7f9b689SLuiz Capitulino        .name       = "wavcapture",
755f0b9f36dSKővágó, Zoltán        .args_type  = "path:F,audiodev:s,freq:i?,bits:i?,nchannels:i?",
756f0b9f36dSKővágó, Zoltán        .params     = "path audiodev [frequency [bits [channels]]]",
757d7f9b689SLuiz Capitulino        .help       = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
7582b9e3576SMarc-André Lureau        .cmd        = hmp_wavcapture,
759d7f9b689SLuiz Capitulino    },
760a6b30bcaSPeter MaydellSRST
761a6b30bcaSPeter Maydell``wavcapture`` *filename* *audiodev* [*frequency* [*bits* [*channels*]]]
762a6b30bcaSPeter Maydell  Capture audio into *filename* from *audiodev*, using sample rate
763a6b30bcaSPeter Maydell  *frequency* bits per sample *bits* and number of channels
764a6b30bcaSPeter Maydell  *channels*.
765a6b30bcaSPeter Maydell
766a6b30bcaSPeter Maydell  Defaults:
767a6b30bcaSPeter Maydell
768a6b30bcaSPeter Maydell  - Sample rate = 44100 Hz - CD quality
769a6b30bcaSPeter Maydell  - Bits = 16
770a6b30bcaSPeter Maydell  - Number of channels = 2 - Stereo
771a6b30bcaSPeter MaydellERST
7722313086aSBlue Swirl
773d7f9b689SLuiz Capitulino    {
774d7f9b689SLuiz Capitulino        .name       = "stopcapture",
775d7f9b689SLuiz Capitulino        .args_type  = "n:i",
776d7f9b689SLuiz Capitulino        .params     = "capture index",
777d7f9b689SLuiz Capitulino        .help       = "stop capture",
7782b9e3576SMarc-André Lureau        .cmd        = hmp_stopcapture,
779d7f9b689SLuiz Capitulino    },
780a6b30bcaSPeter MaydellSRST
781a6b30bcaSPeter Maydell``stopcapture`` *index*
782a6b30bcaSPeter Maydell  Stop capture with a given *index*, index can be obtained with::
783a6b30bcaSPeter Maydell
784a6b30bcaSPeter Maydell    info capture
785a6b30bcaSPeter Maydell
786a6b30bcaSPeter MaydellERST
7872313086aSBlue Swirl
788d7f9b689SLuiz Capitulino    {
789d7f9b689SLuiz Capitulino        .name       = "memsave",
790d7f9b689SLuiz Capitulino        .args_type  = "val:l,size:i,filename:s",
791d7f9b689SLuiz Capitulino        .params     = "addr size file",
792d7f9b689SLuiz Capitulino        .help       = "save to disk virtual memory dump starting at 'addr' of size 'size'",
7932b9e3576SMarc-André Lureau        .cmd        = hmp_memsave,
794d7f9b689SLuiz Capitulino    },
795d7f9b689SLuiz Capitulino
796a6b30bcaSPeter MaydellSRST
797a6b30bcaSPeter Maydell``memsave`` *addr* *size* *file*
798a6b30bcaSPeter Maydell  save to disk virtual memory dump starting at *addr* of size *size*.
799a6b30bcaSPeter MaydellERST
8002313086aSBlue Swirl
801d7f9b689SLuiz Capitulino    {
802d7f9b689SLuiz Capitulino        .name       = "pmemsave",
803d7f9b689SLuiz Capitulino        .args_type  = "val:l,size:i,filename:s",
804d7f9b689SLuiz Capitulino        .params     = "addr size file",
805d7f9b689SLuiz Capitulino        .help       = "save to disk physical memory dump starting at 'addr' of size 'size'",
8062b9e3576SMarc-André Lureau        .cmd        = hmp_pmemsave,
807d7f9b689SLuiz Capitulino    },
808d7f9b689SLuiz Capitulino
809a6b30bcaSPeter MaydellSRST
810a6b30bcaSPeter Maydell``pmemsave`` *addr* *size* *file*
811a6b30bcaSPeter Maydell  save to disk physical memory dump starting at *addr* of size *size*.
812a6b30bcaSPeter MaydellERST
8132313086aSBlue Swirl
814d7f9b689SLuiz Capitulino    {
815d7f9b689SLuiz Capitulino        .name       = "boot_set",
816d7f9b689SLuiz Capitulino        .args_type  = "bootdevice:s",
817d7f9b689SLuiz Capitulino        .params     = "bootdevice",
818d7f9b689SLuiz Capitulino        .help       = "define new values for the boot device list",
8192b9e3576SMarc-André Lureau        .cmd        = hmp_boot_set,
820d7f9b689SLuiz Capitulino    },
821d7f9b689SLuiz Capitulino
822a6b30bcaSPeter MaydellSRST
823a6b30bcaSPeter Maydell``boot_set`` *bootdevicelist*
824a6b30bcaSPeter Maydell  Define new values for the boot device list. Those values will override
825a6b30bcaSPeter Maydell  the values specified on the command line through the ``-boot`` option.
826a6b30bcaSPeter Maydell
827a6b30bcaSPeter Maydell  The values that can be specified here depend on the machine type, but are
828a6b30bcaSPeter Maydell  the same that can be specified in the ``-boot`` command line option.
829a6b30bcaSPeter MaydellERST
8302313086aSBlue Swirl
831d7f9b689SLuiz Capitulino    {
832d7f9b689SLuiz Capitulino        .name       = "nmi",
833e9b4b432SLuiz Capitulino        .args_type  = "",
834e9b4b432SLuiz Capitulino        .params     = "",
8359cb805fdSAlexey Kardashevskiy        .help       = "inject an NMI",
8362b9e3576SMarc-André Lureau        .cmd        = hmp_nmi,
837d7f9b689SLuiz Capitulino    },
838a6b30bcaSPeter MaydellSRST
839a6b30bcaSPeter Maydell``nmi`` *cpu*
840a6b30bcaSPeter Maydell  Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
841a6b30bcaSPeter MaydellERST
8421f590cf9SLei Li
8431f590cf9SLei Li    {
8443949e594SMarkus Armbruster        .name       = "ringbuf_write",
8451f590cf9SLei Li        .args_type  = "device:s,data:s",
8461f590cf9SLei Li        .params     = "device data",
8473949e594SMarkus Armbruster        .help       = "Write to a ring buffer character device",
8482b9e3576SMarc-André Lureau        .cmd        = hmp_ringbuf_write,
8498e597779SHani Benhabiles        .command_completion = ringbuf_write_completion,
8501f590cf9SLei Li    },
8511f590cf9SLei Li
852a6b30bcaSPeter MaydellSRST
853a6b30bcaSPeter Maydell``ringbuf_write`` *device* *data*
854a6b30bcaSPeter Maydell  Write *data* to ring buffer character device *device*.
855a6b30bcaSPeter Maydell  *data* must be a UTF-8 string.
856a6b30bcaSPeter MaydellERST
8572313086aSBlue Swirl
858d7f9b689SLuiz Capitulino    {
8593949e594SMarkus Armbruster        .name       = "ringbuf_read",
86049b6d722SLei Li        .args_type  = "device:s,size:i",
86149b6d722SLei Li        .params     = "device size",
8623949e594SMarkus Armbruster        .help       = "Read from a ring buffer character device",
8632b9e3576SMarc-André Lureau        .cmd        = hmp_ringbuf_read,
8648e597779SHani Benhabiles        .command_completion = ringbuf_write_completion,
86549b6d722SLei Li    },
86649b6d722SLei Li
867a6b30bcaSPeter MaydellSRST
868a6b30bcaSPeter Maydell``ringbuf_read`` *device*
869a6b30bcaSPeter Maydell  Read and print up to *size* bytes from ring buffer character
870a6b30bcaSPeter Maydell  device *device*.
871a6b30bcaSPeter Maydell  Certain non-printable characters are printed ``\uXXXX``, where ``XXXX`` is the
872a6b30bcaSPeter Maydell  character code in hexadecimal.  Character ``\`` is printed ``\\``.
873a6b30bcaSPeter Maydell  Bug: can screw up when the buffer contains invalid UTF-8 sequences,
874a6b30bcaSPeter Maydell  NUL characters, after the ring buffer lost data, and when reading
875a6b30bcaSPeter Maydell  stops because the size limit is reached.
876a6b30bcaSPeter MaydellERST
87749b6d722SLei Li
87849b6d722SLei Li    {
879544f6ea3SDr. David Alan Gilbert        .name       = "announce_self",
880c6644548SDr. David Alan Gilbert        .args_type  = "interfaces:s?,id:s?",
881c6644548SDr. David Alan Gilbert        .params     = "[interfaces] [id]",
882544f6ea3SDr. David Alan Gilbert        .help       = "Trigger GARP/RARP announcements",
883544f6ea3SDr. David Alan Gilbert        .cmd        = hmp_announce_self,
884544f6ea3SDr. David Alan Gilbert    },
885544f6ea3SDr. David Alan Gilbert
886a6b30bcaSPeter MaydellSRST
887a6b30bcaSPeter Maydell``announce_self``
888a6b30bcaSPeter Maydell  Trigger a round of GARP/RARP broadcasts; this is useful for explicitly
889a6b30bcaSPeter Maydell  updating the network infrastructure after a reconfiguration or some forms
890a6b30bcaSPeter Maydell  of migration. The timings of the round are set by the migration announce
891a6b30bcaSPeter Maydell  parameters. An optional comma separated *interfaces* list restricts the
892a6b30bcaSPeter Maydell  announce to the named set of interfaces. An optional *id* can be used to
893a6b30bcaSPeter Maydell  start a separate announce timer and to change the parameters of it later.
894a6b30bcaSPeter MaydellERST
895544f6ea3SDr. David Alan Gilbert
896544f6ea3SDr. David Alan Gilbert    {
897d7f9b689SLuiz Capitulino        .name       = "migrate",
8987a4da28bSPeter Xu        .args_type  = "detach:-d,blk:-b,inc:-i,resume:-r,uri:s",
8997a4da28bSPeter Xu        .params     = "[-d] [-b] [-i] [-r] uri",
900fbc3d96cSlirans@il.ibm.com        .help       = "migrate to URI (using -d to not wait for completion)"
901fbc3d96cSlirans@il.ibm.com		      "\n\t\t\t -b for migration without shared storage with"
902fbc3d96cSlirans@il.ibm.com		      " full copy of disk\n\t\t\t -i for migration without "
903fbc3d96cSlirans@il.ibm.com		      "shared storage with incremental copy of disk "
9047a4da28bSPeter Xu		      "(base image shared between src and destination)"
9057a4da28bSPeter Xu                      "\n\t\t\t -r to resume a paused migration",
9062b9e3576SMarc-André Lureau        .cmd        = hmp_migrate,
907d7f9b689SLuiz Capitulino    },
908d7f9b689SLuiz Capitulino
909fbc3d96cSlirans@il.ibm.com
910a6b30bcaSPeter MaydellSRST
911a6b30bcaSPeter Maydell``migrate [-d] [-b] [-i]`` *uri*
912a6b30bcaSPeter Maydell  Migrate to *uri* (using -d to not wait for completion).
913a6b30bcaSPeter Maydell
914a6b30bcaSPeter Maydell  ``-b``
915a6b30bcaSPeter Maydell    for migration with full copy of disk
916a6b30bcaSPeter Maydell  ``-i``
917a6b30bcaSPeter Maydell    for migration with incremental copy of disk (base image is shared)
918a6b30bcaSPeter MaydellERST
9192313086aSBlue Swirl
920d7f9b689SLuiz Capitulino    {
921d7f9b689SLuiz Capitulino        .name       = "migrate_cancel",
922d7f9b689SLuiz Capitulino        .args_type  = "",
923d7f9b689SLuiz Capitulino        .params     = "",
924d7f9b689SLuiz Capitulino        .help       = "cancel the current VM migration",
9252b9e3576SMarc-André Lureau        .cmd        = hmp_migrate_cancel,
926d7f9b689SLuiz Capitulino    },
927d7f9b689SLuiz Capitulino
928a6b30bcaSPeter MaydellSRST
929a6b30bcaSPeter Maydell``migrate_cancel``
930a6b30bcaSPeter Maydell  Cancel the current VM migration.
931a6b30bcaSPeter MaydellERST
9329e1ba4ccSOrit Wasserman
93394ae12cbSDr. David Alan Gilbert    {
93494ae12cbSDr. David Alan Gilbert        .name       = "migrate_continue",
93594ae12cbSDr. David Alan Gilbert        .args_type  = "state:s",
93694ae12cbSDr. David Alan Gilbert        .params     = "state",
93794ae12cbSDr. David Alan Gilbert        .help       = "Continue migration from the given paused state",
93894ae12cbSDr. David Alan Gilbert        .cmd        = hmp_migrate_continue,
93994ae12cbSDr. David Alan Gilbert    },
940a6b30bcaSPeter MaydellSRST
941a6b30bcaSPeter Maydell``migrate_continue`` *state*
942a6b30bcaSPeter Maydell  Continue migration from the paused state *state*
943a6b30bcaSPeter MaydellERST
9449e1ba4ccSOrit Wasserman
9459e1ba4ccSOrit Wasserman    {
946bf1ae1f4SDr. David Alan Gilbert        .name       = "migrate_incoming",
947bf1ae1f4SDr. David Alan Gilbert        .args_type  = "uri:s",
948bf1ae1f4SDr. David Alan Gilbert        .params     = "uri",
949bf1ae1f4SDr. David Alan Gilbert        .help       = "Continue an incoming migration from an -incoming defer",
9502b9e3576SMarc-André Lureau        .cmd        = hmp_migrate_incoming,
951bf1ae1f4SDr. David Alan Gilbert    },
952bf1ae1f4SDr. David Alan Gilbert
953a6b30bcaSPeter MaydellSRST
954a6b30bcaSPeter Maydell``migrate_incoming`` *uri*
955a6b30bcaSPeter Maydell  Continue an incoming migration using the *uri* (that has the same syntax
956a6b30bcaSPeter Maydell  as the ``-incoming`` option).
957a6b30bcaSPeter MaydellERST
958bf1ae1f4SDr. David Alan Gilbert
9593b563c4bSPeter Xu    {
9603b563c4bSPeter Xu        .name       = "migrate_recover",
9613b563c4bSPeter Xu        .args_type  = "uri:s",
9623b563c4bSPeter Xu        .params     = "uri",
9633b563c4bSPeter Xu        .help       = "Continue a paused incoming postcopy migration",
9643b563c4bSPeter Xu        .cmd        = hmp_migrate_recover,
9653b563c4bSPeter Xu    },
9663b563c4bSPeter Xu
967a6b30bcaSPeter MaydellSRST
968a6b30bcaSPeter Maydell``migrate_recover`` *uri*
969a6b30bcaSPeter Maydell  Continue a paused incoming postcopy migration using the *uri*.
970a6b30bcaSPeter MaydellERST
971bf1ae1f4SDr. David Alan Gilbert
972bf1ae1f4SDr. David Alan Gilbert    {
973d37297dcSPeter Xu        .name       = "migrate_pause",
974d37297dcSPeter Xu        .args_type  = "",
975d37297dcSPeter Xu        .params     = "",
976d37297dcSPeter Xu        .help       = "Pause an ongoing migration (postcopy-only)",
977d37297dcSPeter Xu        .cmd        = hmp_migrate_pause,
978d37297dcSPeter Xu    },
979d37297dcSPeter Xu
980a6b30bcaSPeter MaydellSRST
981a6b30bcaSPeter Maydell``migrate_pause``
982a6b30bcaSPeter Maydell  Pause an ongoing migration.  Currently it only supports postcopy.
983a6b30bcaSPeter MaydellERST
984d37297dcSPeter Xu
985d37297dcSPeter Xu    {
9869e1ba4ccSOrit Wasserman        .name       = "migrate_set_cache_size",
9879e1ba4ccSOrit Wasserman        .args_type  = "value:o",
9889e1ba4ccSOrit Wasserman        .params     = "value",
9899e1ba4ccSOrit Wasserman        .help       = "set cache size (in bytes) for XBZRLE migrations,"
9909e1ba4ccSOrit Wasserman                      "the cache size will be rounded down to the nearest "
9919e1ba4ccSOrit Wasserman                      "power of 2.\n"
9929e1ba4ccSOrit Wasserman                      "The cache size affects the number of cache misses."
9939e1ba4ccSOrit Wasserman                      "In case of a high cache miss ratio you need to increase"
9949e1ba4ccSOrit Wasserman                      " the cache size",
9952b9e3576SMarc-André Lureau        .cmd        = hmp_migrate_set_cache_size,
9969e1ba4ccSOrit Wasserman    },
9979e1ba4ccSOrit Wasserman
998a6b30bcaSPeter MaydellSRST
999a6b30bcaSPeter Maydell``migrate_set_cache_size`` *value*
1000a6b30bcaSPeter Maydell  Set cache size to *value* (in bytes) for xbzrle migrations.
1001a6b30bcaSPeter MaydellERST
10022313086aSBlue Swirl
1003d7f9b689SLuiz Capitulino    {
1004d7f9b689SLuiz Capitulino        .name       = "migrate_set_speed",
1005ed3d4a80SJes Sorensen        .args_type  = "value:o",
1006d7f9b689SLuiz Capitulino        .params     = "value",
1007ed3d4a80SJes Sorensen        .help       = "set maximum speed (in bytes) for migrations. "
1008ed3d4a80SJes Sorensen	"Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
10092b9e3576SMarc-André Lureau        .cmd        = hmp_migrate_set_speed,
1010d7f9b689SLuiz Capitulino    },
1011d7f9b689SLuiz Capitulino
1012a6b30bcaSPeter MaydellSRST
1013a6b30bcaSPeter Maydell``migrate_set_speed`` *value*
1014a6b30bcaSPeter Maydell  Set maximum speed to *value* (in bytes) for migrations.
1015a6b30bcaSPeter MaydellERST
10162313086aSBlue Swirl
1017d7f9b689SLuiz Capitulino    {
1018d7f9b689SLuiz Capitulino        .name       = "migrate_set_downtime",
1019b0fbf7d3SMarkus Armbruster        .args_type  = "value:T",
1020d7f9b689SLuiz Capitulino        .params     = "value",
1021d7f9b689SLuiz Capitulino        .help       = "set maximum tolerated downtime (in seconds) for migrations",
10222b9e3576SMarc-André Lureau        .cmd        = hmp_migrate_set_downtime,
1023d7f9b689SLuiz Capitulino    },
10242ea42952SGlauber Costa
1025a6b30bcaSPeter MaydellSRST
1026a6b30bcaSPeter Maydell``migrate_set_downtime`` *second*
1027a6b30bcaSPeter Maydell  Set maximum tolerated downtime (in seconds) for migration.
1028a6b30bcaSPeter MaydellERST
10292ea42952SGlauber Costa
1030f8882568SJes Sorensen    {
103100458433SOrit Wasserman        .name       = "migrate_set_capability",
103200458433SOrit Wasserman        .args_type  = "capability:s,state:b",
103300458433SOrit Wasserman        .params     = "capability state",
103400458433SOrit Wasserman        .help       = "Enable/Disable the usage of a capability for migration",
10352b9e3576SMarc-André Lureau        .cmd        = hmp_migrate_set_capability,
1036c68a0409SHani Benhabiles        .command_completion = migrate_set_capability_completion,
103700458433SOrit Wasserman    },
103800458433SOrit Wasserman
1039a6b30bcaSPeter MaydellSRST
1040a6b30bcaSPeter Maydell``migrate_set_capability`` *capability* *state*
1041a6b30bcaSPeter Maydell  Enable/Disable the usage of a capability *capability* for migration.
1042a6b30bcaSPeter MaydellERST
104300458433SOrit Wasserman
104400458433SOrit Wasserman    {
104550e9a629SLiang Li        .name       = "migrate_set_parameter",
104669ef1f36SDaniel P. Berrange        .args_type  = "parameter:s,value:s",
104750e9a629SLiang Li        .params     = "parameter value",
104850e9a629SLiang Li        .help       = "Set the parameter for migration",
10492b9e3576SMarc-André Lureau        .cmd        = hmp_migrate_set_parameter,
105050e9a629SLiang Li        .command_completion = migrate_set_parameter_completion,
105150e9a629SLiang Li    },
105250e9a629SLiang Li
1053a6b30bcaSPeter MaydellSRST
1054a6b30bcaSPeter Maydell``migrate_set_parameter`` *parameter* *value*
1055a6b30bcaSPeter Maydell  Set the parameter *parameter* for migration.
1056a6b30bcaSPeter MaydellERST
105750e9a629SLiang Li
105850e9a629SLiang Li    {
10594886a1bcSDr. David Alan Gilbert        .name       = "migrate_start_postcopy",
10604886a1bcSDr. David Alan Gilbert        .args_type  = "",
10614886a1bcSDr. David Alan Gilbert        .params     = "",
1062a54d340bSDr. David Alan Gilbert        .help       = "Followup to a migration command to switch the migration"
106332c3db5bSDr. David Alan Gilbert                      " to postcopy mode. The postcopy-ram capability must "
1064c2eb7f21SGreg Kurz                      "be set on both source and destination before the "
1065c2eb7f21SGreg Kurz                      "original migration command .",
10662b9e3576SMarc-André Lureau        .cmd        = hmp_migrate_start_postcopy,
10674886a1bcSDr. David Alan Gilbert    },
10684886a1bcSDr. David Alan Gilbert
1069a6b30bcaSPeter MaydellSRST
1070a6b30bcaSPeter Maydell``migrate_start_postcopy``
1071a6b30bcaSPeter Maydell  Switch in-progress migration to postcopy mode. Ignored after the end of
1072a6b30bcaSPeter Maydell  migration (or once already in postcopy).
1073a6b30bcaSPeter MaydellERST
10744886a1bcSDr. David Alan Gilbert
10754886a1bcSDr. David Alan Gilbert    {
1076d89e666eSzhanghailiang        .name       = "x_colo_lost_heartbeat",
1077d89e666eSzhanghailiang        .args_type  = "",
1078d89e666eSzhanghailiang        .params     = "",
1079d89e666eSzhanghailiang        .help       = "Tell COLO that heartbeat is lost,\n\t\t\t"
1080d89e666eSzhanghailiang                      "a failover or takeover is needed.",
1081d89e666eSzhanghailiang        .cmd = hmp_x_colo_lost_heartbeat,
1082d89e666eSzhanghailiang    },
1083d89e666eSzhanghailiang
1084a6b30bcaSPeter MaydellSRST
1085a6b30bcaSPeter Maydell``x_colo_lost_heartbeat``
1086a6b30bcaSPeter Maydell  Tell COLO that heartbeat is lost, a failover or takeover is needed.
1087a6b30bcaSPeter MaydellERST
1088d89e666eSzhanghailiang
1089d89e666eSzhanghailiang    {
10902ea720dbSJes Sorensen        .name       = "client_migrate_info",
10912ea720dbSJes Sorensen        .args_type  = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
10922ea720dbSJes Sorensen        .params     = "protocol hostname port tls-port cert-subject",
109313cadefbSMarkus Armbruster        .help       = "set migration information for remote display",
10942b9e3576SMarc-André Lureau        .cmd        = hmp_client_migrate_info,
1095f8882568SJes Sorensen    },
1096f8882568SJes Sorensen
1097a6b30bcaSPeter MaydellSRST
1098a6b30bcaSPeter Maydell``client_migrate_info`` *protocol* *hostname* *port* *tls-port* *cert-subject*
1099a6b30bcaSPeter Maydell  Set migration information for remote display.  This makes the server
1100a6b30bcaSPeter Maydell  ask the client to automatically reconnect using the new parameters
1101a6b30bcaSPeter Maydell  once migration finished successfully.  Only implemented for SPICE.
1102a6b30bcaSPeter MaydellERST
1103e866e239SGerd Hoffmann
1104783e9b48SWen Congyang    {
1105783e9b48SWen Congyang        .name       = "dump-guest-memory",
11062da91b54SViktor Prutyanov        .args_type  = "paging:-p,detach:-d,windmp:-w,zlib:-z,lzo:-l,snappy:-s,filename:F,begin:l?,length:l?",
11072da91b54SViktor Prutyanov        .params     = "[-p] [-d] [-z|-l|-s|-w] filename [begin length]",
1108c20499d9SQiao Nuohan        .help       = "dump guest memory into file 'filename'.\n\t\t\t"
1109c20499d9SQiao Nuohan                      "-p: do paging to get guest's memory mapping.\n\t\t\t"
1110228de9cfSPeter Xu                      "-d: return immediately (do not wait for completion).\n\t\t\t"
11111b7a0f75SQiao Nuohan                      "-z: dump in kdump-compressed format, with zlib compression.\n\t\t\t"
11121b7a0f75SQiao Nuohan                      "-l: dump in kdump-compressed format, with lzo compression.\n\t\t\t"
11131b7a0f75SQiao Nuohan                      "-s: dump in kdump-compressed format, with snappy compression.\n\t\t\t"
11142da91b54SViktor Prutyanov                      "-w: dump in Windows crashdump format (can be used instead of ELF-dump converting),\n\t\t\t"
11152da91b54SViktor Prutyanov                      "    for Windows x64 guests with vmcoreinfo driver only.\n\t\t\t"
1116c20499d9SQiao Nuohan                      "begin: the starting physical address.\n\t\t\t"
1117c20499d9SQiao Nuohan                      "length: the memory size, in bytes.",
11182b9e3576SMarc-André Lureau        .cmd        = hmp_dump_guest_memory,
1119783e9b48SWen Congyang    },
1120783e9b48SWen Congyang
1121a6b30bcaSPeter MaydellSRST
1122a6b30bcaSPeter Maydell``dump-guest-memory [-p]`` *filename* *begin* *length*
1123a6b30bcaSPeter Maydell  \
1124a6b30bcaSPeter Maydell``dump-guest-memory [-z|-l|-s|-w]`` *filename*
1125a6b30bcaSPeter Maydell  Dump guest memory to *protocol*. The file can be processed with crash or
1126a6b30bcaSPeter Maydell  gdb. Without ``-z|-l|-s|-w``, the dump format is ELF.
1127a6b30bcaSPeter Maydell
1128a6b30bcaSPeter Maydell  ``-p``
1129a6b30bcaSPeter Maydell    do paging to get guest's memory mapping.
1130a6b30bcaSPeter Maydell  ``-z``
1131a6b30bcaSPeter Maydell    dump in kdump-compressed format, with zlib compression.
1132a6b30bcaSPeter Maydell  ``-l``
1133a6b30bcaSPeter Maydell    dump in kdump-compressed format, with lzo compression.
1134a6b30bcaSPeter Maydell  ``-s``
1135a6b30bcaSPeter Maydell    dump in kdump-compressed format, with snappy compression.
1136a6b30bcaSPeter Maydell  ``-w``
1137a6b30bcaSPeter Maydell    dump in Windows crashdump format (can be used instead of ELF-dump converting),
1138a6b30bcaSPeter Maydell    for Windows x64 guests with vmcoreinfo driver only
1139a6b30bcaSPeter Maydell  *filename*
1140a6b30bcaSPeter Maydell    dump file name.
1141a6b30bcaSPeter Maydell  *begin*
1142a6b30bcaSPeter Maydell    the starting physical address. It's optional, and should be
1143a6b30bcaSPeter Maydell    specified together with *length*.
1144a6b30bcaSPeter Maydell  *length*
1145a6b30bcaSPeter Maydell    the memory size, in bytes. It's optional, and should be specified
1146a6b30bcaSPeter Maydell    together with *begin*.
1147a6b30bcaSPeter Maydell
1148a6b30bcaSPeter MaydellERST
1149783e9b48SWen Congyang
1150a4538a5cSJason J. Herne#if defined(TARGET_S390X)
1151a4538a5cSJason J. Herne    {
1152a4538a5cSJason J. Herne        .name       = "dump-skeys",
1153a4538a5cSJason J. Herne        .args_type  = "filename:F",
1154a4538a5cSJason J. Herne        .params     = "",
1155a4538a5cSJason J. Herne        .help       = "Save guest storage keys into file 'filename'.\n",
11562b9e3576SMarc-André Lureau        .cmd        = hmp_dump_skeys,
1157a4538a5cSJason J. Herne    },
1158a4538a5cSJason J. Herne#endif
1159a4538a5cSJason J. Herne
1160a6b30bcaSPeter MaydellSRST
1161a6b30bcaSPeter Maydell``dump-skeys`` *filename*
1162a6b30bcaSPeter Maydell  Save guest storage keys to a file.
1163a6b30bcaSPeter MaydellERST
1164a4538a5cSJason J. Herne
1165f860d497SClaudio Imbrenda#if defined(TARGET_S390X)
1166f860d497SClaudio Imbrenda    {
1167f860d497SClaudio Imbrenda        .name       = "migration_mode",
1168f860d497SClaudio Imbrenda        .args_type  = "mode:i",
1169f860d497SClaudio Imbrenda        .params     = "mode",
1170f860d497SClaudio Imbrenda        .help       = "Enables or disables migration mode\n",
1171f860d497SClaudio Imbrenda        .cmd        = hmp_migrationmode,
1172f860d497SClaudio Imbrenda    },
1173f860d497SClaudio Imbrenda#endif
1174f860d497SClaudio Imbrenda
1175a6b30bcaSPeter MaydellSRST
1176a6b30bcaSPeter Maydell``migration_mode`` *mode*
1177a6b30bcaSPeter Maydell  Enables or disables migration mode.
1178a6b30bcaSPeter MaydellERST
1179f860d497SClaudio Imbrenda
1180e866e239SGerd Hoffmann    {
11812ea720dbSJes Sorensen        .name       = "snapshot_blkdev",
11826cc2a415SPaolo Bonzini        .args_type  = "reuse:-n,device:B,snapshot-file:s?,format:s?",
11836cc2a415SPaolo Bonzini        .params     = "[-n] device [new-image-file] [format]",
11842ea720dbSJes Sorensen        .help       = "initiates a live snapshot\n\t\t\t"
11852ea720dbSJes Sorensen                      "of device. If a new image file is specified, the\n\t\t\t"
11862ea720dbSJes Sorensen                      "new image file will become the new root image.\n\t\t\t"
11872ea720dbSJes Sorensen                      "If format is specified, the snapshot file will\n\t\t\t"
1188775ca88eSWenchao Xia                      "be created in that format.\n\t\t\t"
11896cc2a415SPaolo Bonzini                      "The default format is qcow2.  The -n flag requests QEMU\n\t\t\t"
11906cc2a415SPaolo Bonzini                      "to reuse the image found in new-image-file, instead of\n\t\t\t"
11916cc2a415SPaolo Bonzini                      "recreating it from scratch.",
11922b9e3576SMarc-André Lureau        .cmd        = hmp_snapshot_blkdev,
1193e866e239SGerd Hoffmann    },
1194e866e239SGerd Hoffmann
1195a6b30bcaSPeter MaydellSRST
1196a6b30bcaSPeter Maydell``snapshot_blkdev``
1197a6b30bcaSPeter Maydell  Snapshot device, using snapshot file as target if provided
1198a6b30bcaSPeter MaydellERST
1199f8882568SJes Sorensen
1200d7f9b689SLuiz Capitulino    {
1201775ca88eSWenchao Xia        .name       = "snapshot_blkdev_internal",
1202775ca88eSWenchao Xia        .args_type  = "device:B,name:s",
1203775ca88eSWenchao Xia        .params     = "device name",
1204775ca88eSWenchao Xia        .help       = "take an internal snapshot of device.\n\t\t\t"
1205775ca88eSWenchao Xia                      "The format of the image used by device must\n\t\t\t"
1206775ca88eSWenchao Xia                      "support it, such as qcow2.\n\t\t\t",
12072b9e3576SMarc-André Lureau        .cmd        = hmp_snapshot_blkdev_internal,
1208775ca88eSWenchao Xia    },
1209775ca88eSWenchao Xia
1210a6b30bcaSPeter MaydellSRST
1211a6b30bcaSPeter Maydell``snapshot_blkdev_internal``
1212a6b30bcaSPeter Maydell  Take an internal snapshot on device if it support
1213a6b30bcaSPeter MaydellERST
1214775ca88eSWenchao Xia
1215775ca88eSWenchao Xia    {
12167a4ed2eeSWenchao Xia        .name       = "snapshot_delete_blkdev_internal",
12177a4ed2eeSWenchao Xia        .args_type  = "device:B,name:s,id:s?",
12187a4ed2eeSWenchao Xia        .params     = "device name [id]",
12197a4ed2eeSWenchao Xia        .help       = "delete an internal snapshot of device.\n\t\t\t"
12207a4ed2eeSWenchao Xia                      "If id is specified, qemu will try delete\n\t\t\t"
12217a4ed2eeSWenchao Xia                      "the snapshot matching both id and name.\n\t\t\t"
12227a4ed2eeSWenchao Xia                      "The format of the image used by device must\n\t\t\t"
12237a4ed2eeSWenchao Xia                      "support it, such as qcow2.\n\t\t\t",
12242b9e3576SMarc-André Lureau        .cmd        = hmp_snapshot_delete_blkdev_internal,
12257a4ed2eeSWenchao Xia    },
12267a4ed2eeSWenchao Xia
1227a6b30bcaSPeter MaydellSRST
1228a6b30bcaSPeter Maydell``snapshot_delete_blkdev_internal``
1229a6b30bcaSPeter Maydell  Delete an internal snapshot on device if it support
1230a6b30bcaSPeter MaydellERST
12317a4ed2eeSWenchao Xia
12327a4ed2eeSWenchao Xia    {
1233d9b902dbSPaolo Bonzini        .name       = "drive_mirror",
1234d9b902dbSPaolo Bonzini        .args_type  = "reuse:-n,full:-f,device:B,target:s,format:s?",
1235d9b902dbSPaolo Bonzini        .params     = "[-n] [-f] device target [format]",
1236d9b902dbSPaolo Bonzini        .help       = "initiates live storage\n\t\t\t"
1237d9b902dbSPaolo Bonzini                      "migration for a device. The device's contents are\n\t\t\t"
1238d9b902dbSPaolo Bonzini                      "copied to the new image file, including data that\n\t\t\t"
1239d9b902dbSPaolo Bonzini                      "is written after the command is started.\n\t\t\t"
1240d9b902dbSPaolo Bonzini                      "The -n flag requests QEMU to reuse the image found\n\t\t\t"
1241d9b902dbSPaolo Bonzini                      "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
1242d9b902dbSPaolo Bonzini                      "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
1243d9b902dbSPaolo Bonzini                      "so that the result does not need a backing file.\n\t\t\t",
12442b9e3576SMarc-André Lureau        .cmd        = hmp_drive_mirror,
1245d9b902dbSPaolo Bonzini    },
1246a6b30bcaSPeter MaydellSRST
1247a6b30bcaSPeter Maydell``drive_mirror``
1248a6b30bcaSPeter Maydell  Start mirroring a block device's writes to a new destination,
1249a6b30bcaSPeter Maydell  using the specified target.
1250a6b30bcaSPeter MaydellERST
1251d9b902dbSPaolo Bonzini
1252d9b902dbSPaolo Bonzini    {
1253de90930aSStefan Hajnoczi        .name       = "drive_backup",
125413b9414bSPavel Butsykin        .args_type  = "reuse:-n,full:-f,compress:-c,device:B,target:s,format:s?",
125513b9414bSPavel Butsykin        .params     = "[-n] [-f] [-c] device target [format]",
1256de90930aSStefan Hajnoczi        .help       = "initiates a point-in-time\n\t\t\t"
1257de90930aSStefan Hajnoczi                      "copy for a device. The device's contents are\n\t\t\t"
1258de90930aSStefan Hajnoczi                      "copied to the new image file, excluding data that\n\t\t\t"
1259de90930aSStefan Hajnoczi                      "is written after the command is started.\n\t\t\t"
1260de90930aSStefan Hajnoczi                      "The -n flag requests QEMU to reuse the image found\n\t\t\t"
1261de90930aSStefan Hajnoczi                      "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
1262de90930aSStefan Hajnoczi                      "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
126313b9414bSPavel Butsykin                      "so that the result does not need a backing file.\n\t\t\t"
126413b9414bSPavel Butsykin                      "The -c flag requests QEMU to compress backup data\n\t\t\t"
126513b9414bSPavel Butsykin                      "(if the target format supports it).\n\t\t\t",
12662b9e3576SMarc-André Lureau        .cmd        = hmp_drive_backup,
1267de90930aSStefan Hajnoczi    },
1268a6b30bcaSPeter MaydellSRST
1269a6b30bcaSPeter Maydell``drive_backup``
1270e3a6e0daSzhaolichang  Start a point-in-time copy of a block device to a specified target.
1271a6b30bcaSPeter MaydellERST
1272de90930aSStefan Hajnoczi
1273de90930aSStefan Hajnoczi    {
1274d7f9b689SLuiz Capitulino        .name       = "drive_add",
1275abb21ac3SKevin Wolf        .args_type  = "node:-n,pci_addr:s,opts:s",
1276abb21ac3SKevin Wolf        .params     = "[-n] [[<domain>:]<bus>:]<slot>\n"
12772313086aSBlue Swirl                      "[file=file][,if=type][,bus=n]\n"
1278fb0490f6SStefan Hajnoczi                      "[,unit=m][,media=d][,index=i]\n"
1279fb0490f6SStefan Hajnoczi                      "[,snapshot=on|off][,cache=on|off]\n"
1280fb0490f6SStefan Hajnoczi                      "[,readonly=on|off][,copy-on-read=on|off]",
1281d7f9b689SLuiz Capitulino        .help       = "add drive to PCI storage controller",
12822b9e3576SMarc-André Lureau        .cmd        = hmp_drive_add,
1283d7f9b689SLuiz Capitulino    },
1284d7f9b689SLuiz Capitulino
1285a6b30bcaSPeter MaydellSRST
1286a6b30bcaSPeter Maydell``drive_add``
1287a6b30bcaSPeter Maydell  Add drive to PCI storage controller.
1288a6b30bcaSPeter MaydellERST
12892313086aSBlue Swirl
1290d7f9b689SLuiz Capitulino    {
12912ae63bdaSIsaku Yamahata        .name       = "pcie_aer_inject_error",
12922ae63bdaSIsaku Yamahata        .args_type  = "advisory_non_fatal:-a,correctable:-c,"
12932ae63bdaSIsaku Yamahata	              "id:s,error_status:s,"
12942ae63bdaSIsaku Yamahata	              "header0:i?,header1:i?,header2:i?,header3:i?,"
12952ae63bdaSIsaku Yamahata	              "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
12962ae63bdaSIsaku Yamahata        .params     = "[-a] [-c] id "
12972ae63bdaSIsaku Yamahata                      "<error_status> [<tlp header> [<tlp header prefix>]]",
12982ae63bdaSIsaku Yamahata        .help       = "inject pcie aer error\n\t\t\t"
12992ae63bdaSIsaku Yamahata	              " -a for advisory non fatal error\n\t\t\t"
13002ae63bdaSIsaku Yamahata	              " -c for correctable error\n\t\t\t"
13012ae63bdaSIsaku Yamahata                      "<id> = qdev device id\n\t\t\t"
13022ae63bdaSIsaku Yamahata                      "<error_status> = error string or 32bit\n\t\t\t"
13032ae63bdaSIsaku Yamahata                      "<tlb header> = 32bit x 4\n\t\t\t"
13042ae63bdaSIsaku Yamahata                      "<tlb header prefix> = 32bit x 4",
13052b9e3576SMarc-André Lureau        .cmd        = hmp_pcie_aer_inject_error,
13062ae63bdaSIsaku Yamahata    },
13072ae63bdaSIsaku Yamahata
1308a6b30bcaSPeter MaydellSRST
1309a6b30bcaSPeter Maydell``pcie_aer_inject_error``
1310a6b30bcaSPeter Maydell  Inject PCIe AER error
1311a6b30bcaSPeter MaydellERST
13122ae63bdaSIsaku Yamahata
13132ae63bdaSIsaku Yamahata    {
1314ae82d324SMarkus Armbruster        .name       = "netdev_add",
1315ae82d324SMarkus Armbruster        .args_type  = "netdev:O",
131603ce5744SNikolay Nikolaev        .params     = "[user|tap|socket|vde|bridge|hubport|netmap|vhost-user],id=str[,prop=value][,...]",
1317ae82d324SMarkus Armbruster        .help       = "add host network device",
13182b9e3576SMarc-André Lureau        .cmd        = hmp_netdev_add,
1319b162b49aSHani Benhabiles        .command_completion = netdev_add_completion,
1320ae82d324SMarkus Armbruster    },
1321ae82d324SMarkus Armbruster
1322a6b30bcaSPeter MaydellSRST
1323a6b30bcaSPeter Maydell``netdev_add``
1324a6b30bcaSPeter Maydell  Add host network device.
1325a6b30bcaSPeter MaydellERST
1326ae82d324SMarkus Armbruster
1327ae82d324SMarkus Armbruster    {
1328ae82d324SMarkus Armbruster        .name       = "netdev_del",
1329ae82d324SMarkus Armbruster        .args_type  = "id:s",
1330ae82d324SMarkus Armbruster        .params     = "id",
1331ae82d324SMarkus Armbruster        .help       = "remove host network device",
13322b9e3576SMarc-André Lureau        .cmd        = hmp_netdev_del,
133311b389f2SHani Benhabiles        .command_completion = netdev_del_completion,
1334ae82d324SMarkus Armbruster    },
1335ae82d324SMarkus Armbruster
1336a6b30bcaSPeter MaydellSRST
1337a6b30bcaSPeter Maydell``netdev_del``
1338a6b30bcaSPeter Maydell  Remove host network device.
1339a6b30bcaSPeter MaydellERST
1340ae82d324SMarkus Armbruster
1341ab2d0531SPaolo Bonzini    {
1342cff8b2c6SPaolo Bonzini        .name       = "object_add",
1343cff8b2c6SPaolo Bonzini        .args_type  = "object:O",
1344cff8b2c6SPaolo Bonzini        .params     = "[qom-type=]type,id=str[,prop=value][,...]",
1345cff8b2c6SPaolo Bonzini        .help       = "create QOM object",
13462b9e3576SMarc-André Lureau        .cmd        = hmp_object_add,
1347bfa40f77SHani Benhabiles        .command_completion = object_add_completion,
1348cff8b2c6SPaolo Bonzini    },
1349cff8b2c6SPaolo Bonzini
1350a6b30bcaSPeter MaydellSRST
1351a6b30bcaSPeter Maydell``object_add``
1352a6b30bcaSPeter Maydell  Create QOM object.
1353a6b30bcaSPeter MaydellERST
1354cff8b2c6SPaolo Bonzini
1355cff8b2c6SPaolo Bonzini    {
1356ab2d0531SPaolo Bonzini        .name       = "object_del",
1357ab2d0531SPaolo Bonzini        .args_type  = "id:s",
1358ab2d0531SPaolo Bonzini        .params     = "id",
1359ab2d0531SPaolo Bonzini        .help       = "destroy QOM object",
13602b9e3576SMarc-André Lureau        .cmd        = hmp_object_del,
1361bfa40f77SHani Benhabiles        .command_completion = object_del_completion,
1362ab2d0531SPaolo Bonzini    },
1363ab2d0531SPaolo Bonzini
1364a6b30bcaSPeter MaydellSRST
1365a6b30bcaSPeter Maydell``object_del``
1366a6b30bcaSPeter Maydell  Destroy QOM object.
1367a6b30bcaSPeter MaydellERST
1368ab2d0531SPaolo Bonzini
13692313086aSBlue Swirl#ifdef CONFIG_SLIRP
1370d7f9b689SLuiz Capitulino    {
1371d7f9b689SLuiz Capitulino        .name       = "hostfwd_add",
1372b4983c57SThomas Huth        .args_type  = "arg1:s,arg2:s?",
1373b4983c57SThomas Huth        .params     = "[netdev_id] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
1374d7f9b689SLuiz Capitulino        .help       = "redirect TCP or UDP connections from host to guest (requires -net user)",
13752b9e3576SMarc-André Lureau        .cmd        = hmp_hostfwd_add,
1376d7f9b689SLuiz Capitulino    },
137721413d68SMarkus Armbruster#endif
1378a6b30bcaSPeter MaydellSRST
1379a6b30bcaSPeter Maydell``hostfwd_add``
1380a6b30bcaSPeter Maydell  Redirect TCP or UDP connections from host to guest (requires -net user).
1381a6b30bcaSPeter MaydellERST
1382d7f9b689SLuiz Capitulino
138321413d68SMarkus Armbruster#ifdef CONFIG_SLIRP
1384d7f9b689SLuiz Capitulino    {
1385d7f9b689SLuiz Capitulino        .name       = "hostfwd_remove",
1386b4983c57SThomas Huth        .args_type  = "arg1:s,arg2:s?",
1387b4983c57SThomas Huth        .params     = "[netdev_id] [tcp|udp]:[hostaddr]:hostport",
1388d7f9b689SLuiz Capitulino        .help       = "remove host-to-guest TCP or UDP redirection",
13892b9e3576SMarc-André Lureau        .cmd        = hmp_hostfwd_remove,
1390d7f9b689SLuiz Capitulino    },
1391d7f9b689SLuiz Capitulino
13922313086aSBlue Swirl#endif
1393a6b30bcaSPeter MaydellSRST
1394a6b30bcaSPeter Maydell``hostfwd_remove``
1395a6b30bcaSPeter Maydell  Remove host-to-guest TCP or UDP redirection.
1396a6b30bcaSPeter MaydellERST
13972313086aSBlue Swirl
1398d7f9b689SLuiz Capitulino    {
1399d7f9b689SLuiz Capitulino        .name       = "balloon",
14003b0bd6ecSLuiz Capitulino        .args_type  = "value:M",
1401d7f9b689SLuiz Capitulino        .params     = "target",
14023c05613aSRiccardo Magliocchetti        .help       = "request VM to change its memory allocation (in MB)",
14032b9e3576SMarc-André Lureau        .cmd        = hmp_balloon,
1404d7f9b689SLuiz Capitulino    },
1405d7f9b689SLuiz Capitulino
1406a6b30bcaSPeter MaydellSRST
1407a6b30bcaSPeter Maydell``balloon`` *value*
1408a6b30bcaSPeter Maydell  Request VM to change its memory allocation to *value* (in MB).
1409a6b30bcaSPeter MaydellERST
14102313086aSBlue Swirl
1411d7f9b689SLuiz Capitulino    {
1412d7f9b689SLuiz Capitulino        .name       = "set_link",
1413c9b26a4cSMarkus Armbruster        .args_type  = "name:s,up:b",
1414c9b26a4cSMarkus Armbruster        .params     = "name on|off",
1415d7f9b689SLuiz Capitulino        .help       = "change the link status of a network adapter",
14162b9e3576SMarc-André Lureau        .cmd        = hmp_set_link,
141740d19394SHani Benhabiles        .command_completion = set_link_completion,
1418d7f9b689SLuiz Capitulino    },
1419d7f9b689SLuiz Capitulino
1420a6b30bcaSPeter MaydellSRST
1421a6b30bcaSPeter Maydell``set_link`` *name* ``[on|off]``
1422a6b30bcaSPeter Maydell  Switch link *name* on (i.e. up) or off (i.e. down).
1423a6b30bcaSPeter MaydellERST
14242313086aSBlue Swirl
1425d7f9b689SLuiz Capitulino    {
1426d7f9b689SLuiz Capitulino        .name       = "watchdog_action",
1427d7f9b689SLuiz Capitulino        .args_type  = "action:s",
1428d7f9b689SLuiz Capitulino        .params     = "[reset|shutdown|poweroff|pause|debug|none]",
1429d7f9b689SLuiz Capitulino        .help       = "change watchdog action",
14302b9e3576SMarc-André Lureau        .cmd        = hmp_watchdog_action,
1431d0ece345SHani Benhabiles        .command_completion = watchdog_action_completion,
1432d7f9b689SLuiz Capitulino    },
1433d7f9b689SLuiz Capitulino
1434a6b30bcaSPeter MaydellSRST
1435a6b30bcaSPeter Maydell``watchdog_action``
1436a6b30bcaSPeter Maydell  Change watchdog action.
1437a6b30bcaSPeter MaydellERST
14382313086aSBlue Swirl
1439d7f9b689SLuiz Capitulino    {
1440d7f9b689SLuiz Capitulino        .name       = "acl_show",
1441d7f9b689SLuiz Capitulino        .args_type  = "aclname:s",
1442d7f9b689SLuiz Capitulino        .params     = "aclname",
1443d7f9b689SLuiz Capitulino        .help       = "list rules in the access control list",
14442b9e3576SMarc-André Lureau        .cmd        = hmp_acl_show,
1445d7f9b689SLuiz Capitulino    },
1446d7f9b689SLuiz Capitulino
1447a6b30bcaSPeter MaydellSRST
1448a6b30bcaSPeter Maydell``acl_show`` *aclname*
1449a6b30bcaSPeter Maydell  List all the matching rules in the access control list, and the default
1450a6b30bcaSPeter Maydell  policy. There are currently two named access control lists,
1451a6b30bcaSPeter Maydell  *vnc.x509dname* and *vnc.username* matching on the x509 client
1452a6b30bcaSPeter Maydell  certificate distinguished name, and SASL username respectively.
1453a6b30bcaSPeter MaydellERST
14542313086aSBlue Swirl
1455d7f9b689SLuiz Capitulino    {
1456d7f9b689SLuiz Capitulino        .name       = "acl_policy",
1457d7f9b689SLuiz Capitulino        .args_type  = "aclname:s,policy:s",
1458d7f9b689SLuiz Capitulino        .params     = "aclname allow|deny",
1459d7f9b689SLuiz Capitulino        .help       = "set default access control list policy",
14602b9e3576SMarc-André Lureau        .cmd        = hmp_acl_policy,
1461d7f9b689SLuiz Capitulino    },
1462d7f9b689SLuiz Capitulino
1463a6b30bcaSPeter MaydellSRST
1464a6b30bcaSPeter Maydell``acl_policy`` *aclname* ``allow|deny``
1465a6b30bcaSPeter Maydell  Set the default access control list policy, used in the event that
1466a6b30bcaSPeter Maydell  none of the explicit rules match. The default policy at startup is
1467a6b30bcaSPeter Maydell  always ``deny``.
1468a6b30bcaSPeter MaydellERST
146915dfcd45SJan Kiszka
1470d7f9b689SLuiz Capitulino    {
1471d7f9b689SLuiz Capitulino        .name       = "acl_add",
1472d7f9b689SLuiz Capitulino        .args_type  = "aclname:s,match:s,policy:s,index:i?",
1473d7f9b689SLuiz Capitulino        .params     = "aclname match allow|deny [index]",
1474d7f9b689SLuiz Capitulino        .help       = "add a match rule to the access control list",
14752b9e3576SMarc-André Lureau        .cmd        = hmp_acl_add,
1476d7f9b689SLuiz Capitulino    },
1477d7f9b689SLuiz Capitulino
1478a6b30bcaSPeter MaydellSRST
1479a6b30bcaSPeter Maydell``acl_add`` *aclname* *match* ``allow|deny`` [*index*]
1480a6b30bcaSPeter Maydell  Add a match rule to the access control list, allowing or denying access.
1481a6b30bcaSPeter Maydell  The match will normally be an exact username or x509 distinguished name,
1482a6b30bcaSPeter Maydell  but can optionally include wildcard globs. eg ``*@EXAMPLE.COM`` to
1483a6b30bcaSPeter Maydell  allow all users in the ``EXAMPLE.COM`` kerberos realm. The match will
1484a6b30bcaSPeter Maydell  normally be appended to the end of the ACL, but can be inserted
1485a6b30bcaSPeter Maydell  earlier in the list if the optional *index* parameter is supplied.
1486a6b30bcaSPeter MaydellERST
148715dfcd45SJan Kiszka
1488d7f9b689SLuiz Capitulino    {
1489d7f9b689SLuiz Capitulino        .name       = "acl_remove",
1490d7f9b689SLuiz Capitulino        .args_type  = "aclname:s,match:s",
1491d7f9b689SLuiz Capitulino        .params     = "aclname match",
1492d7f9b689SLuiz Capitulino        .help       = "remove a match rule from the access control list",
14932b9e3576SMarc-André Lureau        .cmd        = hmp_acl_remove,
1494d7f9b689SLuiz Capitulino    },
1495d7f9b689SLuiz Capitulino
1496a6b30bcaSPeter MaydellSRST
1497a6b30bcaSPeter Maydell``acl_remove`` *aclname* *match*
1498a6b30bcaSPeter Maydell  Remove the specified match rule from the access control list.
1499a6b30bcaSPeter MaydellERST
150015dfcd45SJan Kiszka
1501d7f9b689SLuiz Capitulino    {
1502d7f9b689SLuiz Capitulino        .name       = "acl_reset",
1503d7f9b689SLuiz Capitulino        .args_type  = "aclname:s",
1504d7f9b689SLuiz Capitulino        .params     = "aclname",
1505d7f9b689SLuiz Capitulino        .help       = "reset the access control list",
15062b9e3576SMarc-André Lureau        .cmd        = hmp_acl_reset,
1507d7f9b689SLuiz Capitulino    },
1508d7f9b689SLuiz Capitulino
1509a6b30bcaSPeter MaydellSRST
1510a6b30bcaSPeter Maydell``acl_reset`` *aclname*
1511a6b30bcaSPeter Maydell  Remove all matches from the access control list, and set the default
1512a6b30bcaSPeter Maydell  policy back to ``deny``.
1513a6b30bcaSPeter MaydellERST
15142313086aSBlue Swirl
15154057725fSPaolo Bonzini    {
15164057725fSPaolo Bonzini        .name       = "nbd_server_start",
15174057725fSPaolo Bonzini        .args_type  = "all:-a,writable:-w,uri:s",
15184057725fSPaolo Bonzini        .params     = "nbd_server_start [-a] [-w] host:port",
15194057725fSPaolo Bonzini        .help       = "serve block devices on the given host and port",
15202b9e3576SMarc-André Lureau        .cmd        = hmp_nbd_server_start,
15214057725fSPaolo Bonzini    },
1522a6b30bcaSPeter MaydellSRST
1523a6b30bcaSPeter Maydell``nbd_server_start`` *host*:*port*
1524a6b30bcaSPeter Maydell  Start an NBD server on the given host and/or port.  If the ``-a``
1525a6b30bcaSPeter Maydell  option is included, all of the virtual machine's block devices that
1526a6b30bcaSPeter Maydell  have an inserted media on them are automatically exported; in this case,
1527a6b30bcaSPeter Maydell  the ``-w`` option makes the devices writable too.
1528a6b30bcaSPeter MaydellERST
15294057725fSPaolo Bonzini
15304057725fSPaolo Bonzini    {
15314057725fSPaolo Bonzini        .name       = "nbd_server_add",
1532dba49323SEric Blake        .args_type  = "writable:-w,device:B,name:s?",
1533dba49323SEric Blake        .params     = "nbd_server_add [-w] device [name]",
15344057725fSPaolo Bonzini        .help       = "export a block device via NBD",
15352b9e3576SMarc-André Lureau        .cmd        = hmp_nbd_server_add,
15364057725fSPaolo Bonzini    },
1537a6b30bcaSPeter MaydellSRST
1538a6b30bcaSPeter Maydell``nbd_server_add`` *device* [ *name* ]
1539a6b30bcaSPeter Maydell  Export a block device through QEMU's NBD server, which must be started
1540a6b30bcaSPeter Maydell  beforehand with ``nbd_server_start``.  The ``-w`` option makes the
1541a6b30bcaSPeter Maydell  exported device writable too.  The export name is controlled by *name*,
1542a6b30bcaSPeter Maydell  defaulting to *device*.
1543a6b30bcaSPeter MaydellERST
15444057725fSPaolo Bonzini
15454057725fSPaolo Bonzini    {
154608fb10a7SEric Blake        .name       = "nbd_server_remove",
154708fb10a7SEric Blake        .args_type  = "force:-f,name:s",
154808fb10a7SEric Blake        .params     = "nbd_server_remove [-f] name",
154908fb10a7SEric Blake        .help       = "remove an export previously exposed via NBD",
155008fb10a7SEric Blake        .cmd        = hmp_nbd_server_remove,
155108fb10a7SEric Blake    },
1552a6b30bcaSPeter MaydellSRST
1553a6b30bcaSPeter Maydell``nbd_server_remove [-f]`` *name*
1554a6b30bcaSPeter Maydell  Stop exporting a block device through QEMU's NBD server, which was
1555a6b30bcaSPeter Maydell  previously started with ``nbd_server_add``.  The ``-f``
1556a6b30bcaSPeter Maydell  option forces the server to drop the export immediately even if
1557a6b30bcaSPeter Maydell  clients are connected; otherwise the command fails unless there are no
1558a6b30bcaSPeter Maydell  clients.
1559a6b30bcaSPeter MaydellERST
156008fb10a7SEric Blake
156108fb10a7SEric Blake    {
15624057725fSPaolo Bonzini        .name       = "nbd_server_stop",
15634057725fSPaolo Bonzini        .args_type  = "",
15644057725fSPaolo Bonzini        .params     = "nbd_server_stop",
15654057725fSPaolo Bonzini        .help       = "stop serving block devices using the NBD protocol",
15662b9e3576SMarc-André Lureau        .cmd        = hmp_nbd_server_stop,
15674057725fSPaolo Bonzini    },
1568a6b30bcaSPeter MaydellSRST
1569a6b30bcaSPeter Maydell``nbd_server_stop``
1570a6b30bcaSPeter Maydell  Stop the QEMU embedded NBD server.
1571a6b30bcaSPeter MaydellERST
15724057725fSPaolo Bonzini
15734057725fSPaolo Bonzini
157479c4f6b0SHuang Ying#if defined(TARGET_I386)
1575d7f9b689SLuiz Capitulino
1576d7f9b689SLuiz Capitulino    {
1577d7f9b689SLuiz Capitulino        .name       = "mce",
157831ce5e0cSJin Dongming        .args_type  = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
157931ce5e0cSJin Dongming        .params     = "[-b] cpu bank status mcgstatus addr misc",
158031ce5e0cSJin Dongming        .help       = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
15812b9e3576SMarc-André Lureau        .cmd        = hmp_mce,
1582d7f9b689SLuiz Capitulino    },
1583d7f9b689SLuiz Capitulino
158479c4f6b0SHuang Ying#endif
1585a6b30bcaSPeter MaydellSRST
1586a6b30bcaSPeter Maydell``mce`` *cpu* *bank* *status* *mcgstatus* *addr* *misc*
1587a6b30bcaSPeter Maydell  Inject an MCE on the given CPU (x86 only).
1588a6b30bcaSPeter MaydellERST
158979c4f6b0SHuang Ying
1590d7f9b689SLuiz Capitulino    {
1591d7f9b689SLuiz Capitulino        .name       = "getfd",
1592d7f9b689SLuiz Capitulino        .args_type  = "fdname:s",
1593d7f9b689SLuiz Capitulino        .params     = "getfd name",
1594d7f9b689SLuiz Capitulino        .help       = "receive a file descriptor via SCM rights and assign it a name",
15952b9e3576SMarc-André Lureau        .cmd        = hmp_getfd,
1596d7f9b689SLuiz Capitulino    },
1597d7f9b689SLuiz Capitulino
1598a6b30bcaSPeter MaydellSRST
1599a6b30bcaSPeter Maydell``getfd`` *fdname*
1600a6b30bcaSPeter Maydell  If a file descriptor is passed alongside this command using the SCM_RIGHTS
1601a6b30bcaSPeter Maydell  mechanism on unix sockets, it is stored using the name *fdname* for
1602a6b30bcaSPeter Maydell  later use by other monitor commands.
1603a6b30bcaSPeter MaydellERST
1604f07918fdSMark McLoughlin
1605d7f9b689SLuiz Capitulino    {
1606d7f9b689SLuiz Capitulino        .name       = "closefd",
1607d7f9b689SLuiz Capitulino        .args_type  = "fdname:s",
1608d7f9b689SLuiz Capitulino        .params     = "closefd name",
1609d7f9b689SLuiz Capitulino        .help       = "close a file descriptor previously passed via SCM rights",
16102b9e3576SMarc-André Lureau        .cmd        = hmp_closefd,
1611d7f9b689SLuiz Capitulino    },
1612d7f9b689SLuiz Capitulino
1613a6b30bcaSPeter MaydellSRST
1614a6b30bcaSPeter Maydell``closefd`` *fdname*
1615a6b30bcaSPeter Maydell  Close the file descriptor previously assigned to *fdname* using the
1616a6b30bcaSPeter Maydell  ``getfd`` command. This is only needed if the file descriptor was never
1617a6b30bcaSPeter Maydell  used by another monitor command.
1618a6b30bcaSPeter MaydellERST
1619f07918fdSMark McLoughlin
1620a3a55a2eSLuiz Capitulino    {
1621a3a55a2eSLuiz Capitulino        .name       = "block_passwd",
1622a3a55a2eSLuiz Capitulino        .args_type  = "device:B,password:s",
1623a3a55a2eSLuiz Capitulino        .params     = "block_passwd device password",
1624a3a55a2eSLuiz Capitulino        .help       = "set the password of encrypted block devices",
16252b9e3576SMarc-André Lureau        .cmd        = hmp_block_passwd,
1626a3a55a2eSLuiz Capitulino    },
1627a3a55a2eSLuiz Capitulino
1628a6b30bcaSPeter MaydellSRST
1629a6b30bcaSPeter Maydell``block_passwd`` *device* *password*
1630a6b30bcaSPeter Maydell  Set the encrypted device *device* password to *password*
1631a6b30bcaSPeter Maydell
1632a6b30bcaSPeter Maydell  This command is now obsolete and will always return an error since 2.10
1633a6b30bcaSPeter MaydellERST
1634727f005eSZhi Yong Wu
1635727f005eSZhi Yong Wu    {
1636727f005eSZhi Yong Wu        .name       = "block_set_io_throttle",
1637727f005eSZhi Yong Wu        .args_type  = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
1638727f005eSZhi Yong Wu        .params     = "device bps bps_rd bps_wr iops iops_rd iops_wr",
1639727f005eSZhi Yong Wu        .help       = "change I/O throttle limits for a block drive",
16402b9e3576SMarc-André Lureau        .cmd        = hmp_block_set_io_throttle,
1641727f005eSZhi Yong Wu    },
1642727f005eSZhi Yong Wu
1643a6b30bcaSPeter MaydellSRST
1644a6b30bcaSPeter Maydell``block_set_io_throttle`` *device* *bps* *bps_rd* *bps_wr* *iops* *iops_rd* *iops_wr*
1645a6b30bcaSPeter Maydell  Change I/O throttle limits for a block drive to
1646a6b30bcaSPeter Maydell  *bps* *bps_rd* *bps_wr* *iops* *iops_rd* *iops_wr*.
1647a6b30bcaSPeter Maydell  *device* can be a block device name, a qdev ID or a QOM path.
1648a6b30bcaSPeter MaydellERST
1649b40292e7SJan Kiszka
165033572eceSJan Kiszka    {
16517572150cSGerd Hoffmann        .name       = "set_password",
16527572150cSGerd Hoffmann        .args_type  = "protocol:s,password:s,connected:s?",
16537572150cSGerd Hoffmann        .params     = "protocol password action-if-connected",
16547572150cSGerd Hoffmann        .help       = "set spice/vnc password",
16552b9e3576SMarc-André Lureau        .cmd        = hmp_set_password,
16567572150cSGerd Hoffmann    },
16577572150cSGerd Hoffmann
1658a6b30bcaSPeter MaydellSRST
1659a6b30bcaSPeter Maydell``set_password [ vnc | spice ] password [ action-if-connected ]``
1660a6b30bcaSPeter Maydell  Change spice/vnc password.  Use zero to make the password stay valid
1661a6b30bcaSPeter Maydell  forever.  *action-if-connected* specifies what should happen in
1662a6b30bcaSPeter Maydell  case a connection is established: *fail* makes the password change
1663a6b30bcaSPeter Maydell  fail.  *disconnect* changes the password and disconnects the
1664a6b30bcaSPeter Maydell  client.  *keep* changes the password and keeps the connection up.
1665a6b30bcaSPeter Maydell  *keep* is the default.
1666a6b30bcaSPeter MaydellERST
16677572150cSGerd Hoffmann
16687572150cSGerd Hoffmann    {
16697572150cSGerd Hoffmann        .name       = "expire_password",
16707572150cSGerd Hoffmann        .args_type  = "protocol:s,time:s",
16717572150cSGerd Hoffmann        .params     = "protocol time",
16727572150cSGerd Hoffmann        .help       = "set spice/vnc password expire-time",
16732b9e3576SMarc-André Lureau        .cmd        = hmp_expire_password,
16747572150cSGerd Hoffmann    },
16757572150cSGerd Hoffmann
1676a6b30bcaSPeter MaydellSRST
1677a6b30bcaSPeter Maydell``expire_password [ vnc | spice ]`` *expire-time*
1678a6b30bcaSPeter Maydell  Specify when a password for spice/vnc becomes
1679a6b30bcaSPeter Maydell  invalid. *expire-time* accepts:
1680a6b30bcaSPeter Maydell
1681a6b30bcaSPeter Maydell  ``now``
1682a6b30bcaSPeter Maydell    Invalidate password instantly.
1683a6b30bcaSPeter Maydell  ``never``
1684a6b30bcaSPeter Maydell    Password stays valid forever.
1685a6b30bcaSPeter Maydell  ``+``\ *nsec*
1686a6b30bcaSPeter Maydell    Password stays valid for *nsec* seconds starting now.
1687a6b30bcaSPeter Maydell  *nsec*
1688a6b30bcaSPeter Maydell    Password is invalidated at the given time.  *nsec* are the seconds
1689a6b30bcaSPeter Maydell    passed since 1970, i.e. unix epoch.
1690a6b30bcaSPeter Maydell
1691a6b30bcaSPeter MaydellERST
16927572150cSGerd Hoffmann
169346920825SGerd Hoffmann    {
169446920825SGerd Hoffmann        .name       = "chardev-add",
169546920825SGerd Hoffmann        .args_type  = "args:s",
169646920825SGerd Hoffmann        .params     = "args",
169746920825SGerd Hoffmann        .help       = "add chardev",
16982b9e3576SMarc-André Lureau        .cmd        = hmp_chardev_add,
169913e315daSHani Benhabiles        .command_completion = chardev_add_completion,
170046920825SGerd Hoffmann    },
170146920825SGerd Hoffmann
1702a6b30bcaSPeter MaydellSRST
1703a6b30bcaSPeter Maydell``chardev-add`` *args*
1704a6b30bcaSPeter Maydell  chardev-add accepts the same parameters as the -chardev command line switch.
1705a6b30bcaSPeter MaydellERST
170675b60160SAnton Nefedov
170775b60160SAnton Nefedov    {
170875b60160SAnton Nefedov        .name       = "chardev-change",
170975b60160SAnton Nefedov        .args_type  = "id:s,args:s",
171075b60160SAnton Nefedov        .params     = "id args",
171175b60160SAnton Nefedov        .help       = "change chardev",
171275b60160SAnton Nefedov        .cmd        = hmp_chardev_change,
171375b60160SAnton Nefedov    },
171475b60160SAnton Nefedov
1715a6b30bcaSPeter MaydellSRST
1716a6b30bcaSPeter Maydell``chardev-change`` *args*
1717a6b30bcaSPeter Maydell  chardev-change accepts existing chardev *id* and then the same arguments
1718a6b30bcaSPeter Maydell  as the -chardev command line switch (except for "id").
1719a6b30bcaSPeter MaydellERST
172046920825SGerd Hoffmann
172146920825SGerd Hoffmann    {
172246920825SGerd Hoffmann        .name       = "chardev-remove",
172346920825SGerd Hoffmann        .args_type  = "id:s",
172446920825SGerd Hoffmann        .params     = "id",
172546920825SGerd Hoffmann        .help       = "remove chardev",
17262b9e3576SMarc-André Lureau        .cmd        = hmp_chardev_remove,
17276297d9a2SHani Benhabiles        .command_completion = chardev_remove_completion,
172846920825SGerd Hoffmann    },
172946920825SGerd Hoffmann
1730a6b30bcaSPeter MaydellSRST
1731a6b30bcaSPeter Maydell``chardev-remove`` *id*
1732a6b30bcaSPeter Maydell  Removes the chardev *id*.
1733a6b30bcaSPeter MaydellERST
1734f1088908SGerd Hoffmann
1735f1088908SGerd Hoffmann    {
1736bd1d5ad9SStefan Fritsch        .name       = "chardev-send-break",
1737bd1d5ad9SStefan Fritsch        .args_type  = "id:s",
1738bd1d5ad9SStefan Fritsch        .params     = "id",
1739bd1d5ad9SStefan Fritsch        .help       = "send a break on chardev",
1740bd1d5ad9SStefan Fritsch        .cmd        = hmp_chardev_send_break,
1741bd1d5ad9SStefan Fritsch        .command_completion = chardev_remove_completion,
1742bd1d5ad9SStefan Fritsch    },
1743bd1d5ad9SStefan Fritsch
1744a6b30bcaSPeter MaydellSRST
1745a6b30bcaSPeter Maydell``chardev-send-break`` *id*
1746a6b30bcaSPeter Maydell  Send a break on the chardev *id*.
1747a6b30bcaSPeter MaydellERST
1748bd1d5ad9SStefan Fritsch
1749bd1d5ad9SStefan Fritsch    {
1750587da2c3SKevin Wolf        .name       = "qemu-io",
175189b6fc45SKevin Wolf        .args_type  = "qdev:-d,device:B,command:s",
175289b6fc45SKevin Wolf        .params     = "[-d] [device] \"[command]\"",
175389b6fc45SKevin Wolf        .help       = "run a qemu-io command on a block device\n\t\t\t"
175489b6fc45SKevin Wolf                      "-d: [device] is a device ID rather than a "
175589b6fc45SKevin Wolf                      "drive ID or node name",
17562b9e3576SMarc-André Lureau        .cmd        = hmp_qemu_io,
1757587da2c3SKevin Wolf    },
1758587da2c3SKevin Wolf
1759a6b30bcaSPeter MaydellSRST
1760a6b30bcaSPeter Maydell``qemu-io`` *device* *command*
1761a6b30bcaSPeter Maydell  Executes a qemu-io command on the given block device.
1762a6b30bcaSPeter MaydellERST
1763587da2c3SKevin Wolf
1764587da2c3SKevin Wolf    {
176589d7fa9eSAndreas Färber        .name       = "qom-list",
176689d7fa9eSAndreas Färber        .args_type  = "path:s?",
176789d7fa9eSAndreas Färber        .params     = "path",
176889d7fa9eSAndreas Färber        .help       = "list QOM properties",
17692b9e3576SMarc-André Lureau        .cmd        = hmp_qom_list,
17708c7c7ecbSDr. David Alan Gilbert        .flags      = "p",
177189d7fa9eSAndreas Färber    },
177289d7fa9eSAndreas Färber
1773a6b30bcaSPeter MaydellSRST
1774a6b30bcaSPeter Maydell``qom-list`` [*path*]
1775a6b30bcaSPeter Maydell  Print QOM properties of object at location *path*
1776a6b30bcaSPeter MaydellERST
177789d7fa9eSAndreas Färber
177889d7fa9eSAndreas Färber    {
177989cf4fe3SDr. David Alan Gilbert        .name       = "qom-get",
178089cf4fe3SDr. David Alan Gilbert        .args_type  = "path:s,property:s",
178189cf4fe3SDr. David Alan Gilbert        .params     = "path property",
178289cf4fe3SDr. David Alan Gilbert        .help       = "print QOM property",
178389cf4fe3SDr. David Alan Gilbert        .cmd        = hmp_qom_get,
178489cf4fe3SDr. David Alan Gilbert        .flags      = "p",
178589cf4fe3SDr. David Alan Gilbert    },
178689cf4fe3SDr. David Alan Gilbert
178789cf4fe3SDr. David Alan GilbertSRST
178889cf4fe3SDr. David Alan Gilbert``qom-get`` *path* *property*
178989cf4fe3SDr. David Alan Gilbert  Print QOM property *property* of object at location *path*
179089cf4fe3SDr. David Alan GilbertERST
179189cf4fe3SDr. David Alan Gilbert
179289cf4fe3SDr. David Alan Gilbert    {
1793c0e6ee9eSAndreas Färber        .name       = "qom-set",
17942d9e3dd9SDavid Hildenbrand        .args_type  = "json:-j,path:s,property:s,value:S",
17952d9e3dd9SDavid Hildenbrand        .params     = "[-j] path property value",
17962d9e3dd9SDavid Hildenbrand        .help       = "set QOM property.\n\t\t\t"
17972d9e3dd9SDavid Hildenbrand                      "-j: the value is specified in json format.",
17982b9e3576SMarc-André Lureau        .cmd        = hmp_qom_set,
17998c7c7ecbSDr. David Alan Gilbert        .flags      = "p",
1800c0e6ee9eSAndreas Färber    },
1801c0e6ee9eSAndreas Färber
1802a6b30bcaSPeter MaydellSRST
1803a6b30bcaSPeter Maydell``qom-set`` *path* *property* *value*
1804a6b30bcaSPeter Maydell  Set QOM property *property* of object at location *path* to value *value*
1805a6b30bcaSPeter MaydellERST
1806c0e6ee9eSAndreas Färber
1807c0e6ee9eSAndreas Färber    {
1808*e7510671SPavel Dovgalyuk        .name       = "replay_break",
1809*e7510671SPavel Dovgalyuk        .args_type  = "icount:i",
1810*e7510671SPavel Dovgalyuk        .params     = "icount",
1811*e7510671SPavel Dovgalyuk        .help       = "set breakpoint at the specified instruction count",
1812*e7510671SPavel Dovgalyuk        .cmd        = hmp_replay_break,
1813*e7510671SPavel Dovgalyuk    },
1814*e7510671SPavel Dovgalyuk
1815*e7510671SPavel DovgalyukSRST
1816*e7510671SPavel Dovgalyuk``replay_break`` *icount*
1817*e7510671SPavel Dovgalyuk  Set replay breakpoint at instruction count *icount*.
1818*e7510671SPavel Dovgalyuk  Execution stops when the specified instruction is reached.
1819*e7510671SPavel Dovgalyuk  There can be at most one breakpoint. When breakpoint is set, any prior
1820*e7510671SPavel Dovgalyuk  one is removed.  The breakpoint may be set only in replay mode and only
1821*e7510671SPavel Dovgalyuk  "in the future", i.e. at instruction counts greater than the current one.
1822*e7510671SPavel Dovgalyuk  The current instruction count can be observed with ``info replay``.
1823*e7510671SPavel DovgalyukERST
1824*e7510671SPavel Dovgalyuk
1825*e7510671SPavel Dovgalyuk    {
1826*e7510671SPavel Dovgalyuk        .name       = "replay_delete_break",
1827*e7510671SPavel Dovgalyuk        .args_type  = "",
1828*e7510671SPavel Dovgalyuk        .params     = "",
1829*e7510671SPavel Dovgalyuk        .help       = "remove replay breakpoint",
1830*e7510671SPavel Dovgalyuk        .cmd        = hmp_replay_delete_break,
1831*e7510671SPavel Dovgalyuk    },
1832*e7510671SPavel Dovgalyuk
1833*e7510671SPavel DovgalyukSRST
1834*e7510671SPavel Dovgalyuk``replay_delete_break``
1835*e7510671SPavel Dovgalyuk  Remove replay breakpoint which was previously set with ``replay_break``.
1836*e7510671SPavel Dovgalyuk  The command is ignored when there are no replay breakpoints.
1837*e7510671SPavel DovgalyukERST
1838*e7510671SPavel Dovgalyuk
1839*e7510671SPavel Dovgalyuk    {
184033572eceSJan Kiszka        .name       = "info",
184133572eceSJan Kiszka        .args_type  = "item:s?",
184233572eceSJan Kiszka        .params     = "[subcommand]",
184333572eceSJan Kiszka        .help       = "show various information about the system state",
18442b9e3576SMarc-André Lureau        .cmd        = hmp_info_help,
1845a0cd5e1cSKevin Wolf        .sub_table  = hmp_info_cmds,
18468c7c7ecbSDr. David Alan Gilbert        .flags      = "p",
184733572eceSJan Kiszka    },
184833572eceSJan Kiszka
1849