xref: /openbmc/qemu/hmp-commands.hx (revision a016dd50052924d0de255e31b9b9f6a188ebc08b)
1d95f260aSPeter MaydellHXCOMM See docs/devel/docs.rst for the format of this file.
2d95f260aSPeter MaydellHXCOMM
3d95f260aSPeter MaydellHXCOMM This file defines the contents of an array of HMPCommand structs
4d95f260aSPeter MaydellHXCOMM which specify the name, behaviour and help text for HMP commands.
5d95f260aSPeter MaydellHXCOMM Text between SRST and ERST is rST format documentation.
63c95fdefSPeter MaydellHXCOMM HXCOMM can be used for comments, discarded from both rST and C.
7acd0a093SLuiz Capitulino
8acd0a093SLuiz Capitulino
9acd0a093SLuiz Capitulino    {
10acd0a093SLuiz Capitulino        .name       = "help|?",
11129be006SWenchao Xia        .args_type  = "name:S?",
12acd0a093SLuiz Capitulino        .params     = "[cmd]",
13acd0a093SLuiz Capitulino        .help       = "show the help",
14cbf81997SMarkus Armbruster        .cmd        = hmp_help,
1531785f1bSDr. David Alan Gilbert        .flags      = "p",
16acd0a093SLuiz Capitulino    },
17acd0a093SLuiz Capitulino
18a6b30bcaSPeter MaydellSRST
19a6b30bcaSPeter Maydell``help`` or ``?`` [*cmd*]
20a6b30bcaSPeter Maydell  Show the help for all commands or just for command *cmd*.
21a6b30bcaSPeter MaydellERST
22acd0a093SLuiz Capitulino
23acd0a093SLuiz Capitulino    {
24acd0a093SLuiz Capitulino        .name       = "commit",
25acd0a093SLuiz Capitulino        .args_type  = "device:B",
26acd0a093SLuiz Capitulino        .params     = "device|all",
27acd0a093SLuiz Capitulino        .help       = "commit changes to the disk images (if -snapshot is used) or backing files",
282b9e3576SMarc-André Lureau        .cmd        = hmp_commit,
29acd0a093SLuiz Capitulino    },
30acd0a093SLuiz 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
41acd0a093SLuiz Capitulino
42acd0a093SLuiz Capitulino    {
43ff688cd2SPeter Maydell        .name       = "quit|q",
44acd0a093SLuiz Capitulino        .args_type  = "",
45acd0a093SLuiz Capitulino        .params     = "",
46acd0a093SLuiz Capitulino        .help       = "quit the emulator",
472b9e3576SMarc-André Lureau        .cmd        = hmp_quit,
48ebe34444SPaolo Bonzini        .flags      = "p",
49acd0a093SLuiz Capitulino    },
50acd0a093SLuiz Capitulino
51a6b30bcaSPeter MaydellSRST
52ff688cd2SPeter Maydell``quit`` or ``q``
53a6b30bcaSPeter Maydell  Quit the emulator.
54a6b30bcaSPeter MaydellERST
55acd0a093SLuiz Capitulino
56acd0a093SLuiz Capitulino    {
578e8581e6SDr. David Alan Gilbert        .name       = "exit_preconfig",
588e8581e6SDr. David Alan Gilbert        .args_type  = "",
598e8581e6SDr. David Alan Gilbert        .params     = "",
608e8581e6SDr. David Alan Gilbert        .help       = "exit the preconfig state",
618e8581e6SDr. David Alan Gilbert        .cmd        = hmp_exit_preconfig,
628e8581e6SDr. David Alan Gilbert        .flags      = "p",
638e8581e6SDr. David Alan Gilbert    },
648e8581e6SDr. David Alan Gilbert
65a6b30bcaSPeter MaydellSRST
66a6b30bcaSPeter Maydell``exit_preconfig``
67a6b30bcaSPeter Maydell  This command makes QEMU exit the preconfig state and proceed with
68a6b30bcaSPeter Maydell  VM initialization using configuration data provided on the command line
69a6b30bcaSPeter Maydell  and via the QMP monitor during the preconfig state. The command is only
70a6b30bcaSPeter Maydell  available during the preconfig state (i.e. when the --preconfig command
71a6b30bcaSPeter Maydell  line option was in use).
72a6b30bcaSPeter MaydellERST
738e8581e6SDr. David Alan Gilbert
748e8581e6SDr. David Alan Gilbert    {
756d4a2b3aSChristoph Hellwig        .name       = "block_resize",
766d4a2b3aSChristoph Hellwig        .args_type  = "device:B,size:o",
776d4a2b3aSChristoph Hellwig        .params     = "device size",
786d4a2b3aSChristoph Hellwig        .help       = "resize a block image",
792b9e3576SMarc-André Lureau        .cmd        = hmp_block_resize,
80eb94b81aSKevin Wolf        .coroutine  = true,
81f55ba801SPaolo Bonzini        .flags      = "p",
826d4a2b3aSChristoph Hellwig    },
836d4a2b3aSChristoph Hellwig
84a6b30bcaSPeter MaydellSRST
85a6b30bcaSPeter Maydell``block_resize``
86a6b30bcaSPeter Maydell  Resize a block image while a guest is running.  Usually requires guest
87a6b30bcaSPeter Maydell  action to see the updated size.  Resize to a lower size is supported,
88a6b30bcaSPeter Maydell  but should be used with extreme caution.  Note that this command only
89a6b30bcaSPeter Maydell  resizes image files, it can not resize block devices like LVM volumes.
90a6b30bcaSPeter MaydellERST
916d4a2b3aSChristoph Hellwig
9212bd451fSStefan Hajnoczi    {
9312bd451fSStefan Hajnoczi        .name       = "block_stream",
94c83c66c3SStefan Hajnoczi        .args_type  = "device:B,speed:o?,base:s?",
95c83c66c3SStefan Hajnoczi        .params     = "device [speed [base]]",
9612bd451fSStefan Hajnoczi        .help       = "copy data from a backing file into a block device",
972b9e3576SMarc-André Lureau        .cmd        = hmp_block_stream,
98f55ba801SPaolo Bonzini        .flags      = "p",
9912bd451fSStefan Hajnoczi    },
10012bd451fSStefan Hajnoczi
101a6b30bcaSPeter MaydellSRST
102a6b30bcaSPeter Maydell``block_stream``
103a6b30bcaSPeter Maydell  Copy data from a backing file into a block device.
104a6b30bcaSPeter MaydellERST
1056d4a2b3aSChristoph Hellwig
1066d4a2b3aSChristoph Hellwig    {
1072d47c6e9SStefan Hajnoczi        .name       = "block_job_set_speed",
108882ec7ceSStefan Hajnoczi        .args_type  = "device:B,speed:o",
109882ec7ceSStefan Hajnoczi        .params     = "device speed",
1102d47c6e9SStefan Hajnoczi        .help       = "set maximum speed for a background block operation",
1112b9e3576SMarc-André Lureau        .cmd        = hmp_block_job_set_speed,
112f55ba801SPaolo Bonzini        .flags      = "p",
1132d47c6e9SStefan Hajnoczi    },
1142d47c6e9SStefan Hajnoczi
115a6b30bcaSPeter MaydellSRST
116a6b30bcaSPeter Maydell``block_job_set_speed``
117a6b30bcaSPeter Maydell  Set maximum speed for a background block operation.
118a6b30bcaSPeter MaydellERST
1192d47c6e9SStefan Hajnoczi
1202d47c6e9SStefan Hajnoczi    {
121370521a1SStefan Hajnoczi        .name       = "block_job_cancel",
1226e37fb81SPaolo Bonzini        .args_type  = "force:-f,device:B",
1236e37fb81SPaolo Bonzini        .params     = "[-f] device",
1246e37fb81SPaolo Bonzini        .help       = "stop an active background block operation (use -f"
125b76e4458SLiang Li                      "\n\t\t\t if you want to abort the operation immediately"
126b76e4458SLiang Li                      "\n\t\t\t instead of keep running until data is in sync)",
1272b9e3576SMarc-André Lureau        .cmd        = hmp_block_job_cancel,
128f55ba801SPaolo Bonzini        .flags      = "p",
129370521a1SStefan Hajnoczi    },
130370521a1SStefan Hajnoczi
131a6b30bcaSPeter MaydellSRST
132a6b30bcaSPeter Maydell``block_job_cancel``
133a6b30bcaSPeter Maydell  Stop an active background block operation (streaming, mirroring).
134a6b30bcaSPeter MaydellERST
135aeae883bSPaolo Bonzini
136aeae883bSPaolo Bonzini    {
137aeae883bSPaolo Bonzini        .name       = "block_job_complete",
138aeae883bSPaolo Bonzini        .args_type  = "device:B",
139aeae883bSPaolo Bonzini        .params     = "device",
140aeae883bSPaolo Bonzini        .help       = "stop an active background block operation",
1412b9e3576SMarc-André Lureau        .cmd        = hmp_block_job_complete,
142f55ba801SPaolo Bonzini        .flags      = "p",
143aeae883bSPaolo Bonzini    },
144aeae883bSPaolo Bonzini
145a6b30bcaSPeter MaydellSRST
146a6b30bcaSPeter Maydell``block_job_complete``
147a6b30bcaSPeter Maydell  Manually trigger completion of an active background block operation.
148a6b30bcaSPeter Maydell  For mirroring, this will switch the device to the destination path.
149a6b30bcaSPeter MaydellERST
150370521a1SStefan Hajnoczi
151370521a1SStefan Hajnoczi    {
1526e37fb81SPaolo Bonzini        .name       = "block_job_pause",
1536e37fb81SPaolo Bonzini        .args_type  = "device:B",
1546e37fb81SPaolo Bonzini        .params     = "device",
1556e37fb81SPaolo Bonzini        .help       = "pause an active background block operation",
1562b9e3576SMarc-André Lureau        .cmd        = hmp_block_job_pause,
157f55ba801SPaolo Bonzini        .flags      = "p",
1586e37fb81SPaolo Bonzini    },
1596e37fb81SPaolo Bonzini
160a6b30bcaSPeter MaydellSRST
161a6b30bcaSPeter Maydell``block_job_pause``
162a6b30bcaSPeter Maydell  Pause an active block streaming operation.
163a6b30bcaSPeter MaydellERST
1646e37fb81SPaolo Bonzini
1656e37fb81SPaolo Bonzini    {
1666e37fb81SPaolo Bonzini        .name       = "block_job_resume",
1676e37fb81SPaolo Bonzini        .args_type  = "device:B",
1686e37fb81SPaolo Bonzini        .params     = "device",
1696e37fb81SPaolo Bonzini        .help       = "resume a paused background block operation",
1702b9e3576SMarc-André Lureau        .cmd        = hmp_block_job_resume,
171f55ba801SPaolo Bonzini        .flags      = "p",
1726e37fb81SPaolo Bonzini    },
1736e37fb81SPaolo Bonzini
174a6b30bcaSPeter MaydellSRST
175a6b30bcaSPeter Maydell``block_job_resume``
176a6b30bcaSPeter Maydell  Resume a paused block streaming operation.
177a6b30bcaSPeter MaydellERST
1786e37fb81SPaolo Bonzini
1796e37fb81SPaolo Bonzini    {
180acd0a093SLuiz Capitulino        .name       = "eject",
181acd0a093SLuiz Capitulino        .args_type  = "force:-f,device:B",
182acd0a093SLuiz Capitulino        .params     = "[-f] device",
183acd0a093SLuiz Capitulino        .help       = "eject a removable medium (use -f to force it)",
1842b9e3576SMarc-André Lureau        .cmd        = hmp_eject,
185acd0a093SLuiz Capitulino    },
186acd0a093SLuiz Capitulino
187a6b30bcaSPeter MaydellSRST
188a6b30bcaSPeter Maydell``eject [-f]`` *device*
189a6b30bcaSPeter Maydell  Eject a removable medium (use -f to force it).
190a6b30bcaSPeter MaydellERST
191acd0a093SLuiz Capitulino
192acd0a093SLuiz Capitulino    {
1939063f814SRyan Harper        .name       = "drive_del",
194f7bdc41aSHani Benhabiles        .args_type  = "id:B",
1959063f814SRyan Harper        .params     = "device",
1969063f814SRyan Harper        .help       = "remove host block device",
1972b9e3576SMarc-André Lureau        .cmd        = hmp_drive_del,
1989063f814SRyan Harper    },
1999063f814SRyan Harper
200a6b30bcaSPeter MaydellSRST
201a6b30bcaSPeter Maydell``drive_del`` *device*
202a6b30bcaSPeter Maydell  Remove host block device.  The result is that guest generated IO is no longer
203a6b30bcaSPeter Maydell  submitted against the host device underlying the disk.  Once a drive has
204a6b30bcaSPeter Maydell  been deleted, the QEMU Block layer returns -EIO which results in IO
205a6b30bcaSPeter Maydell  errors in the guest for applications that are reading/writing to the device.
206a6b30bcaSPeter Maydell  These errors are always reported to the guest, regardless of the drive's error
207a6b30bcaSPeter Maydell  actions (drive options rerror, werror).
208a6b30bcaSPeter MaydellERST
2099063f814SRyan Harper
2109063f814SRyan Harper    {
211acd0a093SLuiz Capitulino        .name       = "change",
21280dd5affSDenis V. Lunev        .args_type  = "device:B,force:-f,target:F,arg:s?,read-only-mode:s?",
21380dd5affSDenis V. Lunev        .params     = "device [-f] filename [format [read-only-mode]]",
21480dd5affSDenis V. Lunev        .help       = "change a removable medium, optional format, use -f to force the operation",
2152b9e3576SMarc-André Lureau        .cmd        = hmp_change,
216acd0a093SLuiz Capitulino    },
217acd0a093SLuiz Capitulino
218a6b30bcaSPeter MaydellSRST
219a6b30bcaSPeter Maydell``change`` *device* *setting*
220a6b30bcaSPeter Maydell  Change the configuration of a device.
221a6b30bcaSPeter Maydell
22280dd5affSDenis V. Lunev  ``change`` *diskdevice* [-f] *filename* [*format* [*read-only-mode*]]
223a6b30bcaSPeter Maydell    Change the medium for a removable disk device to point to *filename*. eg::
224a6b30bcaSPeter Maydell
225a6b30bcaSPeter Maydell      (qemu) change ide1-cd0 /path/to/some.iso
226a6b30bcaSPeter Maydell
22780dd5affSDenis V. Lunev    ``-f``
22880dd5affSDenis V. Lunev      forces the operation even if the guest has locked the tray.
22980dd5affSDenis V. Lunev
230a6b30bcaSPeter Maydell    *format* is optional.
231a6b30bcaSPeter Maydell
232a6b30bcaSPeter Maydell    *read-only-mode* may be used to change the read-only status of the device.
233a6b30bcaSPeter Maydell    It accepts the following values:
234a6b30bcaSPeter Maydell
235a6b30bcaSPeter Maydell    retain
236a6b30bcaSPeter Maydell      Retains the current status; this is the default.
237a6b30bcaSPeter Maydell
238a6b30bcaSPeter Maydell    read-only
239a6b30bcaSPeter Maydell      Makes the device read-only.
240a6b30bcaSPeter Maydell
241a6b30bcaSPeter Maydell    read-write
242a6b30bcaSPeter Maydell      Makes the device writable.
243a6b30bcaSPeter Maydell
244a6b30bcaSPeter Maydell  ``change vnc password`` [*password*]
245a6b30bcaSPeter Maydell
246a6b30bcaSPeter Maydell    Change the password associated with the VNC server. If the new password
247a6b30bcaSPeter Maydell    is not supplied, the monitor will prompt for it to be entered. VNC
248a6b30bcaSPeter Maydell    passwords are only significant up to 8 letters. eg::
249a6b30bcaSPeter Maydell
250a6b30bcaSPeter Maydell      (qemu) change vnc password
251a6b30bcaSPeter Maydell      Password: ********
252a6b30bcaSPeter Maydell
253a6b30bcaSPeter MaydellERST
254acd0a093SLuiz Capitulino
255f38aa2c7SMarc-André Lureau#ifdef CONFIG_PIXMAN
256acd0a093SLuiz Capitulino    {
257acd0a093SLuiz Capitulino        .name       = "screendump",
2589a0a119aSKshitij Suri        .args_type  = "filename:F,format:-fs,device:s?,head:i?",
2599a0a119aSKshitij Suri        .params     = "filename [-f format] [device [head]]",
260f771c544SThomas Huth        .help       = "save screen from head 'head' of display device 'device'"
2619a0a119aSKshitij Suri                      "in specified format 'format' as image 'filename'."
2629a0a119aSKshitij Suri                      "Currently only 'png' and 'ppm' formats are supported.",
2632b9e3576SMarc-André Lureau         .cmd        = hmp_screendump,
2640d9b90ceSMarc-André Lureau        .coroutine  = true,
265acd0a093SLuiz Capitulino    },
266acd0a093SLuiz Capitulino
267a6b30bcaSPeter MaydellSRST
268a6b30bcaSPeter Maydell``screendump`` *filename*
269a6b30bcaSPeter Maydell  Save screen into PPM image *filename*.
270a6b30bcaSPeter MaydellERST
271f38aa2c7SMarc-André Lureau#endif
272acd0a093SLuiz Capitulino
273acd0a093SLuiz Capitulino    {
274acd0a093SLuiz Capitulino        .name       = "logfile",
275acd0a093SLuiz Capitulino        .args_type  = "filename:F",
276acd0a093SLuiz Capitulino        .params     = "filename",
277acd0a093SLuiz Capitulino        .help       = "output logs to 'filename'",
2782b9e3576SMarc-André Lureau        .cmd        = hmp_logfile,
279acd0a093SLuiz Capitulino    },
280acd0a093SLuiz Capitulino
281a6b30bcaSPeter MaydellSRST
282a6b30bcaSPeter Maydell``logfile`` *filename*
283a6b30bcaSPeter Maydell  Output logs to *filename*.
284a6b30bcaSPeter MaydellERST
285acd0a093SLuiz Capitulino
286acd0a093SLuiz Capitulino    {
287acd0a093SLuiz Capitulino        .name       = "trace-event",
28877e2b172SLluís Vilanova        .args_type  = "name:s,option:b,vcpu:i?",
28977e2b172SLluís Vilanova        .params     = "name on|off [vcpu]",
29077e2b172SLluís Vilanova        .help       = "changes status of a specific trace event "
29177e2b172SLluís Vilanova                      "(vcpu: vCPU to set, default is all)",
2922b9e3576SMarc-André Lureau        .cmd = hmp_trace_event,
293987bd270SDr. David Alan Gilbert        .command_completion = trace_event_completion,
294acd0a093SLuiz Capitulino    },
295acd0a093SLuiz Capitulino
296a6b30bcaSPeter MaydellSRST
297a6b30bcaSPeter Maydell``trace-event``
298a6b30bcaSPeter Maydell  changes status of a trace event
299a6b30bcaSPeter MaydellERST
300acd0a093SLuiz Capitulino
301c45a8168SMichael Roth#if defined(CONFIG_TRACE_SIMPLE)
302acd0a093SLuiz Capitulino    {
303acd0a093SLuiz Capitulino        .name       = "trace-file",
304acd0a093SLuiz Capitulino        .args_type  = "op:s?,arg:F?",
305acd0a093SLuiz Capitulino        .params     = "on|off|flush|set [arg]",
306acd0a093SLuiz Capitulino        .help       = "open, close, or flush trace file, or set a new file name",
3072b9e3576SMarc-André Lureau        .cmd        = hmp_trace_file,
308acd0a093SLuiz Capitulino    },
309acd0a093SLuiz Capitulino
310a6b30bcaSPeter MaydellSRST
311a6b30bcaSPeter Maydell``trace-file on|off|flush``
312a6b30bcaSPeter Maydell  Open, close, or flush the trace file.  If no argument is given, the
313a6b30bcaSPeter Maydell  status of the trace file is displayed.
314a6b30bcaSPeter MaydellERST
315acd0a093SLuiz Capitulino#endif
316acd0a093SLuiz Capitulino
317acd0a093SLuiz Capitulino    {
318acd0a093SLuiz Capitulino        .name       = "log",
319acd0a093SLuiz Capitulino        .args_type  = "items:s",
320acd0a093SLuiz Capitulino        .params     = "item1[,...]",
321989b697dSPeter Maydell        .help       = "activate logging of the specified items",
3222b9e3576SMarc-André Lureau        .cmd        = hmp_log,
323acd0a093SLuiz Capitulino    },
324acd0a093SLuiz Capitulino
325a6b30bcaSPeter MaydellSRST
326a6b30bcaSPeter Maydell``log`` *item1*\ [,...]
327a6b30bcaSPeter Maydell  Activate logging of the specified items.
328a6b30bcaSPeter MaydellERST
329acd0a093SLuiz Capitulino
330acd0a093SLuiz Capitulino    {
331acd0a093SLuiz Capitulino        .name       = "savevm",
332acd0a093SLuiz Capitulino        .args_type  = "name:s?",
3336ca08045SDaniel Henrique Barboza        .params     = "tag",
3346ca08045SDaniel Henrique Barboza        .help       = "save a VM snapshot. If no tag is provided, a new snapshot is created",
3352b9e3576SMarc-André Lureau        .cmd        = hmp_savevm,
336acd0a093SLuiz Capitulino    },
337acd0a093SLuiz Capitulino
338a6b30bcaSPeter MaydellSRST
339a6b30bcaSPeter Maydell``savevm`` *tag*
340a6b30bcaSPeter Maydell  Create a snapshot of the whole virtual machine. If *tag* is
341a6b30bcaSPeter Maydell  provided, it is used as human readable identifier. If there is already
342a6b30bcaSPeter Maydell  a snapshot with the same tag, it is replaced. More info at
343a6b30bcaSPeter Maydell  :ref:`vm_005fsnapshots`.
344a6b30bcaSPeter Maydell
345a6b30bcaSPeter Maydell  Since 4.0, savevm stopped allowing the snapshot id to be set, accepting
346a6b30bcaSPeter Maydell  only *tag* as parameter.
347a6b30bcaSPeter MaydellERST
348acd0a093SLuiz Capitulino
349acd0a093SLuiz Capitulino    {
350acd0a093SLuiz Capitulino        .name       = "loadvm",
351acd0a093SLuiz Capitulino        .args_type  = "name:s",
3526ca08045SDaniel Henrique Barboza        .params     = "tag",
3536ca08045SDaniel Henrique Barboza        .help       = "restore a VM snapshot from its tag",
3542b9e3576SMarc-André Lureau        .cmd        = hmp_loadvm,
355b21631f3SHani Benhabiles        .command_completion = loadvm_completion,
356acd0a093SLuiz Capitulino    },
357acd0a093SLuiz Capitulino
358a6b30bcaSPeter MaydellSRST
359a6b30bcaSPeter Maydell``loadvm`` *tag*
360a6b30bcaSPeter Maydell  Set the whole virtual machine to the snapshot identified by the tag
361a6b30bcaSPeter Maydell  *tag*.
362a6b30bcaSPeter Maydell
363a6b30bcaSPeter Maydell  Since 4.0, loadvm stopped accepting snapshot id as parameter.
364a6b30bcaSPeter MaydellERST
365acd0a093SLuiz Capitulino
366acd0a093SLuiz Capitulino    {
367acd0a093SLuiz Capitulino        .name       = "delvm",
368acd0a093SLuiz Capitulino        .args_type  = "name:s",
3696ca08045SDaniel Henrique Barboza        .params     = "tag",
3706ca08045SDaniel Henrique Barboza        .help       = "delete a VM snapshot from its tag",
3712b9e3576SMarc-André Lureau        .cmd        = hmp_delvm,
372b21631f3SHani Benhabiles        .command_completion = delvm_completion,
373acd0a093SLuiz Capitulino    },
374acd0a093SLuiz Capitulino
375a6b30bcaSPeter MaydellSRST
376a6b30bcaSPeter Maydell``delvm`` *tag*
377a6b30bcaSPeter Maydell  Delete the snapshot identified by *tag*.
378a6b30bcaSPeter Maydell
379a6b30bcaSPeter Maydell  Since 4.0, delvm stopped deleting snapshots by snapshot id, accepting
380a6b30bcaSPeter Maydell  only *tag* as parameter.
381a6b30bcaSPeter MaydellERST
382acd0a093SLuiz Capitulino
383acd0a093SLuiz Capitulino    {
384e9ccfdd9SPeter Maydell        .name       = "one-insn-per-tb",
385e9ccfdd9SPeter Maydell        .args_type  = "option:s?",
386e9ccfdd9SPeter Maydell        .params     = "[on|off]",
387e9ccfdd9SPeter Maydell        .help       = "run emulation with one guest instruction per translation block",
388e9ccfdd9SPeter Maydell        .cmd        = hmp_one_insn_per_tb,
389e9ccfdd9SPeter Maydell    },
390e9ccfdd9SPeter Maydell
391e9ccfdd9SPeter MaydellSRST
392e9ccfdd9SPeter Maydell``one-insn-per-tb [off]``
393e9ccfdd9SPeter Maydell  Run the emulation with one guest instruction per translation block.
394e9ccfdd9SPeter Maydell  This slows down emulation a lot, but can be useful in some situations,
395e9ccfdd9SPeter Maydell  such as when trying to analyse the logs produced by the ``-d`` option.
396e9ccfdd9SPeter Maydell  This only has an effect when using TCG, not with KVM or other accelerators.
397e9ccfdd9SPeter Maydell
398e9ccfdd9SPeter Maydell  If called with option off, the emulation returns to normal mode.
399e9ccfdd9SPeter MaydellERST
400e9ccfdd9SPeter Maydell
401e9ccfdd9SPeter Maydell    {
402de4cf848SBALATON Zoltan        .name       = "stop|s",
403acd0a093SLuiz Capitulino        .args_type  = "",
404acd0a093SLuiz Capitulino        .params     = "",
405acd0a093SLuiz Capitulino        .help       = "stop emulation",
4062b9e3576SMarc-André Lureau        .cmd        = hmp_stop,
407acd0a093SLuiz Capitulino    },
408acd0a093SLuiz Capitulino
409a6b30bcaSPeter MaydellSRST
410de4cf848SBALATON Zoltan``stop`` or ``s``
411a6b30bcaSPeter Maydell  Stop emulation.
412a6b30bcaSPeter MaydellERST
413acd0a093SLuiz Capitulino
414acd0a093SLuiz Capitulino    {
415ff688cd2SPeter Maydell        .name       = "cont|c",
416acd0a093SLuiz Capitulino        .args_type  = "",
417acd0a093SLuiz Capitulino        .params     = "",
418acd0a093SLuiz Capitulino        .help       = "resume emulation",
4192b9e3576SMarc-André Lureau        .cmd        = hmp_cont,
420acd0a093SLuiz Capitulino    },
421acd0a093SLuiz Capitulino
422a6b30bcaSPeter MaydellSRST
423ff688cd2SPeter Maydell``cont`` or ``c``
424a6b30bcaSPeter Maydell  Resume emulation.
425a6b30bcaSPeter MaydellERST
426acd0a093SLuiz Capitulino
427acd0a093SLuiz Capitulino    {
4289b9df25aSGerd Hoffmann        .name       = "system_wakeup",
4299b9df25aSGerd Hoffmann        .args_type  = "",
4309b9df25aSGerd Hoffmann        .params     = "",
4319b9df25aSGerd Hoffmann        .help       = "wakeup guest from suspend",
4322b9e3576SMarc-André Lureau        .cmd        = hmp_system_wakeup,
4339b9df25aSGerd Hoffmann    },
4349b9df25aSGerd Hoffmann
435a6b30bcaSPeter MaydellSRST
436a6b30bcaSPeter Maydell``system_wakeup``
437a6b30bcaSPeter Maydell  Wakeup guest from suspend.
438a6b30bcaSPeter MaydellERST
4399b9df25aSGerd Hoffmann
4409b9df25aSGerd Hoffmann    {
441acd0a093SLuiz Capitulino        .name       = "gdbserver",
442acd0a093SLuiz Capitulino        .args_type  = "device:s?",
443acd0a093SLuiz Capitulino        .params     = "[device]",
444acd0a093SLuiz Capitulino        .help       = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
4452b9e3576SMarc-André Lureau        .cmd        = hmp_gdbserver,
446acd0a093SLuiz Capitulino    },
447acd0a093SLuiz Capitulino
448a6b30bcaSPeter MaydellSRST
449a6b30bcaSPeter Maydell``gdbserver`` [*port*]
450a6b30bcaSPeter Maydell  Start gdbserver session (default *port*\=1234)
451a6b30bcaSPeter MaydellERST
452acd0a093SLuiz Capitulino
453acd0a093SLuiz Capitulino    {
454acd0a093SLuiz Capitulino        .name       = "x",
455acd0a093SLuiz Capitulino        .args_type  = "fmt:/,addr:l",
456acd0a093SLuiz Capitulino        .params     = "/fmt addr",
457acd0a093SLuiz Capitulino        .help       = "virtual memory dump starting at 'addr'",
4582b9e3576SMarc-André Lureau        .cmd        = hmp_memory_dump,
459acd0a093SLuiz Capitulino    },
460acd0a093SLuiz Capitulino
461a6b30bcaSPeter MaydellSRST
462a6b30bcaSPeter Maydell``x/``\ *fmt* *addr*
463a6b30bcaSPeter Maydell  Virtual memory dump starting at *addr*.
464a6b30bcaSPeter MaydellERST
465acd0a093SLuiz Capitulino
466acd0a093SLuiz Capitulino    {
467acd0a093SLuiz Capitulino        .name       = "xp",
468acd0a093SLuiz Capitulino        .args_type  = "fmt:/,addr:l",
469acd0a093SLuiz Capitulino        .params     = "/fmt addr",
470acd0a093SLuiz Capitulino        .help       = "physical memory dump starting at 'addr'",
4712b9e3576SMarc-André Lureau        .cmd        = hmp_physical_memory_dump,
472acd0a093SLuiz Capitulino    },
473acd0a093SLuiz Capitulino
474a6b30bcaSPeter MaydellSRST
475a6b30bcaSPeter Maydell``xp /``\ *fmt* *addr*
476a6b30bcaSPeter Maydell  Physical memory dump starting at *addr*.
477a6b30bcaSPeter Maydell
478a6b30bcaSPeter Maydell  *fmt* is a format which tells the command how to format the
479a6b30bcaSPeter Maydell  data. Its syntax is: ``/{count}{format}{size}``
480a6b30bcaSPeter Maydell
481a6b30bcaSPeter Maydell  *count*
482a6b30bcaSPeter Maydell    is the number of items to be dumped.
483a6b30bcaSPeter Maydell  *format*
484a6b30bcaSPeter Maydell    can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
485a6b30bcaSPeter Maydell    c (char) or i (asm instruction).
486a6b30bcaSPeter Maydell  *size*
487a6b30bcaSPeter Maydell    can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
488a6b30bcaSPeter Maydell    ``h`` or ``w`` can be specified with the ``i`` format to
489a6b30bcaSPeter Maydell    respectively select 16 or 32 bit code instruction size.
490a6b30bcaSPeter Maydell
491a6b30bcaSPeter Maydell  Examples:
492a6b30bcaSPeter Maydell
493a6b30bcaSPeter Maydell  Dump 10 instructions at the current instruction pointer::
494a6b30bcaSPeter Maydell
495a6b30bcaSPeter Maydell    (qemu) x/10i $eip
496a6b30bcaSPeter Maydell    0x90107063:  ret
497a6b30bcaSPeter Maydell    0x90107064:  sti
498a6b30bcaSPeter Maydell    0x90107065:  lea    0x0(%esi,1),%esi
499a6b30bcaSPeter Maydell    0x90107069:  lea    0x0(%edi,1),%edi
500a6b30bcaSPeter Maydell    0x90107070:  ret
501a6b30bcaSPeter Maydell    0x90107071:  jmp    0x90107080
502a6b30bcaSPeter Maydell    0x90107073:  nop
503a6b30bcaSPeter Maydell    0x90107074:  nop
504a6b30bcaSPeter Maydell    0x90107075:  nop
505a6b30bcaSPeter Maydell    0x90107076:  nop
506a6b30bcaSPeter Maydell
507a6b30bcaSPeter Maydell  Dump 80 16 bit values at the start of the video memory::
508a6b30bcaSPeter Maydell
509a6b30bcaSPeter Maydell    (qemu) xp/80hx 0xb8000
510a6b30bcaSPeter Maydell    0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
511a6b30bcaSPeter Maydell    0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
512a6b30bcaSPeter Maydell    0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
513a6b30bcaSPeter Maydell    0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
514a6b30bcaSPeter Maydell    0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
515a6b30bcaSPeter Maydell    0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
516a6b30bcaSPeter Maydell    0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
517a6b30bcaSPeter Maydell    0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
518a6b30bcaSPeter Maydell    0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
519a6b30bcaSPeter Maydell    0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
520a6b30bcaSPeter Maydell
521a6b30bcaSPeter MaydellERST
522acd0a093SLuiz Capitulino
523acd0a093SLuiz Capitulino    {
524e9628441SPaolo Bonzini        .name       = "gpa2hva",
525e9628441SPaolo Bonzini        .args_type  = "addr:l",
526e9628441SPaolo Bonzini        .params     = "addr",
527e9628441SPaolo Bonzini        .help       = "print the host virtual address corresponding to a guest physical address",
528e9628441SPaolo Bonzini        .cmd        = hmp_gpa2hva,
529e9628441SPaolo Bonzini    },
530e9628441SPaolo Bonzini
531a6b30bcaSPeter MaydellSRST
532a6b30bcaSPeter Maydell``gpa2hva`` *addr*
533a6b30bcaSPeter Maydell  Print the host virtual address at which the guest's physical address *addr*
534a6b30bcaSPeter Maydell  is mapped.
535a6b30bcaSPeter MaydellERST
536e9628441SPaolo Bonzini
537e9628441SPaolo Bonzini#ifdef CONFIG_LINUX
538e9628441SPaolo Bonzini    {
539e9628441SPaolo Bonzini        .name       = "gpa2hpa",
540e9628441SPaolo Bonzini        .args_type  = "addr:l",
541e9628441SPaolo Bonzini        .params     = "addr",
542e9628441SPaolo Bonzini        .help       = "print the host physical address corresponding to a guest physical address",
543e9628441SPaolo Bonzini        .cmd        = hmp_gpa2hpa,
544e9628441SPaolo Bonzini    },
545e9628441SPaolo Bonzini#endif
546e9628441SPaolo Bonzini
547a6b30bcaSPeter MaydellSRST
548a6b30bcaSPeter Maydell``gpa2hpa`` *addr*
549a6b30bcaSPeter Maydell  Print the host physical address at which the guest's physical address *addr*
550a6b30bcaSPeter Maydell  is mapped.
551a6b30bcaSPeter MaydellERST
552e9628441SPaolo Bonzini
553e9628441SPaolo Bonzini    {
554574d9693SDr. David Alan Gilbert        .name       = "gva2gpa",
555574d9693SDr. David Alan Gilbert        .args_type  = "addr:l",
556574d9693SDr. David Alan Gilbert        .params     = "addr",
557574d9693SDr. David Alan Gilbert        .help       = "print the guest physical address corresponding to a guest virtual address",
558574d9693SDr. David Alan Gilbert        .cmd        = hmp_gva2gpa,
559574d9693SDr. David Alan Gilbert    },
560574d9693SDr. David Alan Gilbert
561a6b30bcaSPeter MaydellSRST
562a6b30bcaSPeter Maydell``gva2gpa`` *addr*
563a6b30bcaSPeter Maydell  Print the guest physical address at which the guest's virtual address *addr*
564a6b30bcaSPeter Maydell  is mapped based on the mapping for the current CPU.
565a6b30bcaSPeter MaydellERST
566574d9693SDr. David Alan Gilbert
567574d9693SDr. David Alan Gilbert    {
568ff688cd2SPeter Maydell        .name       = "print|p",
569acd0a093SLuiz Capitulino        .args_type  = "fmt:/,val:l",
570acd0a093SLuiz Capitulino        .params     = "/fmt expr",
571acd0a093SLuiz Capitulino        .help       = "print expression value (use $reg for CPU register access)",
572cbf81997SMarkus Armbruster        .cmd        = hmp_print,
573acd0a093SLuiz Capitulino    },
574acd0a093SLuiz Capitulino
575a6b30bcaSPeter MaydellSRST
576ff688cd2SPeter Maydell``print`` or ``p/``\ *fmt* *expr*
577a6b30bcaSPeter Maydell  Print expression value. Only the *format* part of *fmt* is
578a6b30bcaSPeter Maydell  used.
579a6b30bcaSPeter MaydellERST
580acd0a093SLuiz Capitulino
581acd0a093SLuiz Capitulino    {
582acd0a093SLuiz Capitulino        .name       = "i",
583acd0a093SLuiz Capitulino        .args_type  = "fmt:/,addr:i,index:i.",
584acd0a093SLuiz Capitulino        .params     = "/fmt addr",
585acd0a093SLuiz Capitulino        .help       = "I/O port read",
5862b9e3576SMarc-André Lureau        .cmd        = hmp_ioport_read,
587acd0a093SLuiz Capitulino    },
588acd0a093SLuiz Capitulino
589a6b30bcaSPeter MaydellSRST
590a6b30bcaSPeter Maydell``i/``\ *fmt* *addr* [.\ *index*\ ]
591a6b30bcaSPeter Maydell  Read I/O port.
592a6b30bcaSPeter MaydellERST
593acd0a093SLuiz Capitulino
594acd0a093SLuiz Capitulino    {
595acd0a093SLuiz Capitulino        .name       = "o",
596acd0a093SLuiz Capitulino        .args_type  = "fmt:/,addr:i,val:i",
597acd0a093SLuiz Capitulino        .params     = "/fmt addr value",
598acd0a093SLuiz Capitulino        .help       = "I/O port write",
5992b9e3576SMarc-André Lureau        .cmd        = hmp_ioport_write,
600acd0a093SLuiz Capitulino    },
601acd0a093SLuiz Capitulino
602a6b30bcaSPeter MaydellSRST
603a6b30bcaSPeter Maydell``o/``\ *fmt* *addr* *val*
604a6b30bcaSPeter Maydell  Write to I/O port.
605a6b30bcaSPeter MaydellERST
606acd0a093SLuiz Capitulino
607acd0a093SLuiz Capitulino    {
608acd0a093SLuiz Capitulino        .name       = "sendkey",
6092ef20c15SAmos Kong        .args_type  = "keys:s,hold-time:i?",
610acd0a093SLuiz Capitulino        .params     = "keys [hold_ms]",
611acd0a093SLuiz Capitulino        .help       = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
6122b9e3576SMarc-André Lureau        .cmd        = hmp_sendkey,
61329136cd8SHani Benhabiles        .command_completion = sendkey_completion,
614acd0a093SLuiz Capitulino    },
615acd0a093SLuiz Capitulino
616a6b30bcaSPeter MaydellSRST
617a6b30bcaSPeter Maydell``sendkey`` *keys*
618a6b30bcaSPeter Maydell  Send *keys* to the guest. *keys* could be the name of the
619a6b30bcaSPeter Maydell  key or the raw value in hexadecimal format. Use ``-`` to press
620a6b30bcaSPeter Maydell  several keys simultaneously. Example::
621a6b30bcaSPeter Maydell
622a6b30bcaSPeter Maydell    sendkey ctrl-alt-f1
623a6b30bcaSPeter Maydell
624a6b30bcaSPeter Maydell  This command is useful to send keys that your graphical user interface
625a6b30bcaSPeter Maydell  intercepts at low level, such as ``ctrl-alt-f1`` in X Window.
626a6b30bcaSPeter MaydellERST
627dd12e1bbSEmilio G. Cota    {
628dd12e1bbSEmilio G. Cota        .name       = "sync-profile",
629dd12e1bbSEmilio G. Cota        .args_type  = "op:s?",
630dd12e1bbSEmilio G. Cota        .params     = "[on|off|reset]",
631dd12e1bbSEmilio G. Cota        .help       = "enable, disable or reset synchronization profiling. "
632dd12e1bbSEmilio G. Cota                      "With no arguments, prints whether profiling is on or off.",
633dd12e1bbSEmilio G. Cota        .cmd        = hmp_sync_profile,
634dd12e1bbSEmilio G. Cota    },
635dd12e1bbSEmilio G. Cota
636a6b30bcaSPeter MaydellSRST
637a6b30bcaSPeter Maydell``sync-profile [on|off|reset]``
638a6b30bcaSPeter Maydell  Enable, disable or reset synchronization profiling. With no arguments, prints
639a6b30bcaSPeter Maydell  whether profiling is on or off.
640a6b30bcaSPeter MaydellERST
641acd0a093SLuiz Capitulino
642acd0a093SLuiz Capitulino    {
643acd0a093SLuiz Capitulino        .name       = "system_reset",
644acd0a093SLuiz Capitulino        .args_type  = "",
645acd0a093SLuiz Capitulino        .params     = "",
646acd0a093SLuiz Capitulino        .help       = "reset the system",
6472b9e3576SMarc-André Lureau        .cmd        = hmp_system_reset,
648acd0a093SLuiz Capitulino    },
649acd0a093SLuiz Capitulino
650a6b30bcaSPeter MaydellSRST
651a6b30bcaSPeter Maydell``system_reset``
652a6b30bcaSPeter Maydell  Reset the system.
653a6b30bcaSPeter MaydellERST
654acd0a093SLuiz Capitulino
655acd0a093SLuiz Capitulino    {
656acd0a093SLuiz Capitulino        .name       = "system_powerdown",
657acd0a093SLuiz Capitulino        .args_type  = "",
658acd0a093SLuiz Capitulino        .params     = "",
659acd0a093SLuiz Capitulino        .help       = "send system power down event",
6602b9e3576SMarc-André Lureau        .cmd        = hmp_system_powerdown,
661acd0a093SLuiz Capitulino    },
662acd0a093SLuiz Capitulino
663a6b30bcaSPeter MaydellSRST
664a6b30bcaSPeter Maydell``system_powerdown``
665a6b30bcaSPeter Maydell  Power down the system (if supported).
666a6b30bcaSPeter MaydellERST
667acd0a093SLuiz Capitulino
668acd0a093SLuiz Capitulino    {
669acd0a093SLuiz Capitulino        .name       = "sum",
670acd0a093SLuiz Capitulino        .args_type  = "start:i,size:i",
671acd0a093SLuiz Capitulino        .params     = "addr size",
672acd0a093SLuiz Capitulino        .help       = "compute the checksum of a memory region",
6732b9e3576SMarc-André Lureau        .cmd        = hmp_sum,
674acd0a093SLuiz Capitulino    },
675acd0a093SLuiz Capitulino
676a6b30bcaSPeter MaydellSRST
677a6b30bcaSPeter Maydell``sum`` *addr* *size*
678a6b30bcaSPeter Maydell  Compute the checksum of a memory region.
679a6b30bcaSPeter MaydellERST
680acd0a093SLuiz Capitulino
681acd0a093SLuiz Capitulino    {
682acd0a093SLuiz Capitulino        .name       = "device_add",
683acd0a093SLuiz Capitulino        .args_type  = "device:O",
684acd0a093SLuiz Capitulino        .params     = "driver[,prop=value][,...]",
685acd0a093SLuiz Capitulino        .help       = "add device, like -device on the command line",
6862b9e3576SMarc-André Lureau        .cmd        = hmp_device_add,
6872da1b3abSHani Benhabiles        .command_completion = device_add_completion,
688acd0a093SLuiz Capitulino    },
689acd0a093SLuiz Capitulino
690a6b30bcaSPeter MaydellSRST
691a6b30bcaSPeter Maydell``device_add`` *config*
692a6b30bcaSPeter Maydell  Add device.
693a6b30bcaSPeter MaydellERST
694acd0a093SLuiz Capitulino
695acd0a093SLuiz Capitulino    {
696acd0a093SLuiz Capitulino        .name       = "device_del",
697acd0a093SLuiz Capitulino        .args_type  = "id:s",
698acd0a093SLuiz Capitulino        .params     = "device",
699acd0a093SLuiz Capitulino        .help       = "remove device",
7002b9e3576SMarc-André Lureau        .cmd        = hmp_device_del,
7012da1b3abSHani Benhabiles        .command_completion = device_del_completion,
702acd0a093SLuiz Capitulino    },
703acd0a093SLuiz Capitulino
704a6b30bcaSPeter MaydellSRST
705a6b30bcaSPeter Maydell``device_del`` *id*
706a6b30bcaSPeter Maydell  Remove device *id*. *id* may be a short ID
707a6b30bcaSPeter Maydell  or a QOM object path.
708a6b30bcaSPeter MaydellERST
709acd0a093SLuiz Capitulino
710acd0a093SLuiz Capitulino    {
711acd0a093SLuiz Capitulino        .name       = "cpu",
712acd0a093SLuiz Capitulino        .args_type  = "index:i",
713acd0a093SLuiz Capitulino        .params     = "index",
714acd0a093SLuiz Capitulino        .help       = "set the default CPU",
7152b9e3576SMarc-André Lureau        .cmd        = hmp_cpu,
716acd0a093SLuiz Capitulino    },
717acd0a093SLuiz Capitulino
718a6b30bcaSPeter MaydellSRST
719a6b30bcaSPeter Maydell``cpu`` *index*
720a6b30bcaSPeter Maydell  Set the default CPU.
721a6b30bcaSPeter MaydellERST
722acd0a093SLuiz Capitulino
723acd0a093SLuiz Capitulino    {
724acd0a093SLuiz Capitulino        .name       = "mouse_move",
725acd0a093SLuiz Capitulino        .args_type  = "dx_str:s,dy_str:s,dz_str:s?",
726acd0a093SLuiz Capitulino        .params     = "dx dy [dz]",
727acd0a093SLuiz Capitulino        .help       = "send mouse move events",
7282b9e3576SMarc-André Lureau        .cmd        = hmp_mouse_move,
729acd0a093SLuiz Capitulino    },
730acd0a093SLuiz Capitulino
731a6b30bcaSPeter MaydellSRST
732a6b30bcaSPeter Maydell``mouse_move`` *dx* *dy* [*dz*]
733a6b30bcaSPeter Maydell  Move the active mouse to the specified coordinates *dx* *dy*
734a6b30bcaSPeter Maydell  with optional scroll axis *dz*.
735a6b30bcaSPeter MaydellERST
736acd0a093SLuiz Capitulino
737acd0a093SLuiz Capitulino    {
738acd0a093SLuiz Capitulino        .name       = "mouse_button",
739acd0a093SLuiz Capitulino        .args_type  = "button_state:i",
740acd0a093SLuiz Capitulino        .params     = "state",
741acd0a093SLuiz Capitulino        .help       = "change mouse button state (1=L, 2=M, 4=R)",
7422b9e3576SMarc-André Lureau        .cmd        = hmp_mouse_button,
743acd0a093SLuiz Capitulino    },
744acd0a093SLuiz Capitulino
745a6b30bcaSPeter MaydellSRST
746a6b30bcaSPeter Maydell``mouse_button`` *val*
747a6b30bcaSPeter Maydell  Change the active mouse button state *val* (1=L, 2=M, 4=R).
748a6b30bcaSPeter MaydellERST
749acd0a093SLuiz Capitulino
750acd0a093SLuiz Capitulino    {
751acd0a093SLuiz Capitulino        .name       = "mouse_set",
752acd0a093SLuiz Capitulino        .args_type  = "index:i",
753acd0a093SLuiz Capitulino        .params     = "index",
754acd0a093SLuiz Capitulino        .help       = "set which mouse device receives events",
7552b9e3576SMarc-André Lureau        .cmd        = hmp_mouse_set,
756acd0a093SLuiz Capitulino    },
757acd0a093SLuiz Capitulino
758a6b30bcaSPeter MaydellSRST
759a6b30bcaSPeter Maydell``mouse_set`` *index*
760a6b30bcaSPeter Maydell  Set which mouse device receives events at given *index*, index
761a6b30bcaSPeter Maydell  can be obtained with::
762a6b30bcaSPeter Maydell
763a6b30bcaSPeter Maydell    info mice
764a6b30bcaSPeter Maydell
765a6b30bcaSPeter MaydellERST
766acd0a093SLuiz Capitulino
767acd0a093SLuiz Capitulino    {
768acd0a093SLuiz Capitulino        .name       = "wavcapture",
769f0b9f36dSKővágó, Zoltán        .args_type  = "path:F,audiodev:s,freq:i?,bits:i?,nchannels:i?",
770f0b9f36dSKővágó, Zoltán        .params     = "path audiodev [frequency [bits [channels]]]",
771acd0a093SLuiz Capitulino        .help       = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
7722b9e3576SMarc-André Lureau        .cmd        = hmp_wavcapture,
773acd0a093SLuiz Capitulino    },
774a6b30bcaSPeter MaydellSRST
775a6b30bcaSPeter Maydell``wavcapture`` *filename* *audiodev* [*frequency* [*bits* [*channels*]]]
776a6b30bcaSPeter Maydell  Capture audio into *filename* from *audiodev*, using sample rate
777a6b30bcaSPeter Maydell  *frequency* bits per sample *bits* and number of channels
778a6b30bcaSPeter Maydell  *channels*.
779a6b30bcaSPeter Maydell
780a6b30bcaSPeter Maydell  Defaults:
781a6b30bcaSPeter Maydell
782a6b30bcaSPeter Maydell  - Sample rate = 44100 Hz - CD quality
783a6b30bcaSPeter Maydell  - Bits = 16
784a6b30bcaSPeter Maydell  - Number of channels = 2 - Stereo
785a6b30bcaSPeter MaydellERST
786acd0a093SLuiz Capitulino
787acd0a093SLuiz Capitulino    {
788acd0a093SLuiz Capitulino        .name       = "stopcapture",
789acd0a093SLuiz Capitulino        .args_type  = "n:i",
790acd0a093SLuiz Capitulino        .params     = "capture index",
791acd0a093SLuiz Capitulino        .help       = "stop capture",
7922b9e3576SMarc-André Lureau        .cmd        = hmp_stopcapture,
793acd0a093SLuiz Capitulino    },
794a6b30bcaSPeter MaydellSRST
795a6b30bcaSPeter Maydell``stopcapture`` *index*
796a6b30bcaSPeter Maydell  Stop capture with a given *index*, index can be obtained with::
797a6b30bcaSPeter Maydell
798a6b30bcaSPeter Maydell    info capture
799a6b30bcaSPeter Maydell
800a6b30bcaSPeter MaydellERST
801acd0a093SLuiz Capitulino
802acd0a093SLuiz Capitulino    {
803acd0a093SLuiz Capitulino        .name       = "memsave",
804acd0a093SLuiz Capitulino        .args_type  = "val:l,size:i,filename:s",
805acd0a093SLuiz Capitulino        .params     = "addr size file",
806acd0a093SLuiz Capitulino        .help       = "save to disk virtual memory dump starting at 'addr' of size 'size'",
8072b9e3576SMarc-André Lureau        .cmd        = hmp_memsave,
808acd0a093SLuiz Capitulino    },
809acd0a093SLuiz Capitulino
810a6b30bcaSPeter MaydellSRST
811a6b30bcaSPeter Maydell``memsave`` *addr* *size* *file*
812a6b30bcaSPeter Maydell  save to disk virtual memory dump starting at *addr* of size *size*.
813a6b30bcaSPeter MaydellERST
814acd0a093SLuiz Capitulino
815acd0a093SLuiz Capitulino    {
816acd0a093SLuiz Capitulino        .name       = "pmemsave",
817acd0a093SLuiz Capitulino        .args_type  = "val:l,size:i,filename:s",
818acd0a093SLuiz Capitulino        .params     = "addr size file",
819acd0a093SLuiz Capitulino        .help       = "save to disk physical memory dump starting at 'addr' of size 'size'",
8202b9e3576SMarc-André Lureau        .cmd        = hmp_pmemsave,
821acd0a093SLuiz Capitulino    },
822acd0a093SLuiz Capitulino
823a6b30bcaSPeter MaydellSRST
824a6b30bcaSPeter Maydell``pmemsave`` *addr* *size* *file*
825a6b30bcaSPeter Maydell  save to disk physical memory dump starting at *addr* of size *size*.
826a6b30bcaSPeter MaydellERST
827acd0a093SLuiz Capitulino
828acd0a093SLuiz Capitulino    {
829acd0a093SLuiz Capitulino        .name       = "boot_set",
830acd0a093SLuiz Capitulino        .args_type  = "bootdevice:s",
831acd0a093SLuiz Capitulino        .params     = "bootdevice",
832acd0a093SLuiz Capitulino        .help       = "define new values for the boot device list",
8332b9e3576SMarc-André Lureau        .cmd        = hmp_boot_set,
834acd0a093SLuiz Capitulino    },
835acd0a093SLuiz Capitulino
836a6b30bcaSPeter MaydellSRST
837a6b30bcaSPeter Maydell``boot_set`` *bootdevicelist*
838a6b30bcaSPeter Maydell  Define new values for the boot device list. Those values will override
839a6b30bcaSPeter Maydell  the values specified on the command line through the ``-boot`` option.
840a6b30bcaSPeter Maydell
841a6b30bcaSPeter Maydell  The values that can be specified here depend on the machine type, but are
842a6b30bcaSPeter Maydell  the same that can be specified in the ``-boot`` command line option.
843a6b30bcaSPeter MaydellERST
844acd0a093SLuiz Capitulino
845acd0a093SLuiz Capitulino    {
846acd0a093SLuiz Capitulino        .name       = "nmi",
847e9b4b432SLuiz Capitulino        .args_type  = "",
848e9b4b432SLuiz Capitulino        .params     = "",
8499cb805fdSAlexey Kardashevskiy        .help       = "inject an NMI",
8502b9e3576SMarc-André Lureau        .cmd        = hmp_nmi,
851acd0a093SLuiz Capitulino    },
852a6b30bcaSPeter MaydellSRST
853a6b30bcaSPeter Maydell``nmi`` *cpu*
854a6b30bcaSPeter Maydell  Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
855a6b30bcaSPeter MaydellERST
8561f590cf9SLei Li
8571f590cf9SLei Li    {
8583949e594SMarkus Armbruster        .name       = "ringbuf_write",
8591f590cf9SLei Li        .args_type  = "device:s,data:s",
8601f590cf9SLei Li        .params     = "device data",
8613949e594SMarkus Armbruster        .help       = "Write to a ring buffer character device",
8622b9e3576SMarc-André Lureau        .cmd        = hmp_ringbuf_write,
8638e597779SHani Benhabiles        .command_completion = ringbuf_write_completion,
8641f590cf9SLei Li    },
8651f590cf9SLei Li
866a6b30bcaSPeter MaydellSRST
867a6b30bcaSPeter Maydell``ringbuf_write`` *device* *data*
868a6b30bcaSPeter Maydell  Write *data* to ring buffer character device *device*.
869a6b30bcaSPeter Maydell  *data* must be a UTF-8 string.
870a6b30bcaSPeter MaydellERST
871acd0a093SLuiz Capitulino
872acd0a093SLuiz Capitulino    {
8733949e594SMarkus Armbruster        .name       = "ringbuf_read",
87449b6d722SLei Li        .args_type  = "device:s,size:i",
87549b6d722SLei Li        .params     = "device size",
8763949e594SMarkus Armbruster        .help       = "Read from a ring buffer character device",
8772b9e3576SMarc-André Lureau        .cmd        = hmp_ringbuf_read,
8788e597779SHani Benhabiles        .command_completion = ringbuf_write_completion,
87949b6d722SLei Li    },
88049b6d722SLei Li
881a6b30bcaSPeter MaydellSRST
882a6b30bcaSPeter Maydell``ringbuf_read`` *device*
883a6b30bcaSPeter Maydell  Read and print up to *size* bytes from ring buffer character
884a6b30bcaSPeter Maydell  device *device*.
885a6b30bcaSPeter Maydell  Certain non-printable characters are printed ``\uXXXX``, where ``XXXX`` is the
886a6b30bcaSPeter Maydell  character code in hexadecimal.  Character ``\`` is printed ``\\``.
887a6b30bcaSPeter Maydell  Bug: can screw up when the buffer contains invalid UTF-8 sequences,
888a6b30bcaSPeter Maydell  NUL characters, after the ring buffer lost data, and when reading
889a6b30bcaSPeter Maydell  stops because the size limit is reached.
890a6b30bcaSPeter MaydellERST
89149b6d722SLei Li
89249b6d722SLei Li    {
893544f6ea3SDr. David Alan Gilbert        .name       = "announce_self",
894c6644548SDr. David Alan Gilbert        .args_type  = "interfaces:s?,id:s?",
895c6644548SDr. David Alan Gilbert        .params     = "[interfaces] [id]",
896544f6ea3SDr. David Alan Gilbert        .help       = "Trigger GARP/RARP announcements",
897544f6ea3SDr. David Alan Gilbert        .cmd        = hmp_announce_self,
898544f6ea3SDr. David Alan Gilbert    },
899544f6ea3SDr. David Alan Gilbert
900a6b30bcaSPeter MaydellSRST
901a6b30bcaSPeter Maydell``announce_self``
902a6b30bcaSPeter Maydell  Trigger a round of GARP/RARP broadcasts; this is useful for explicitly
903a6b30bcaSPeter Maydell  updating the network infrastructure after a reconfiguration or some forms
904a6b30bcaSPeter Maydell  of migration. The timings of the round are set by the migration announce
905a6b30bcaSPeter Maydell  parameters. An optional comma separated *interfaces* list restricts the
906a6b30bcaSPeter Maydell  announce to the named set of interfaces. An optional *id* can be used to
907a6b30bcaSPeter Maydell  start a separate announce timer and to change the parameters of it later.
908a6b30bcaSPeter MaydellERST
909544f6ea3SDr. David Alan Gilbert
910544f6ea3SDr. David Alan Gilbert    {
911acd0a093SLuiz Capitulino        .name       = "migrate",
91218d154f5SFabiano Rosas        .args_type  = "detach:-d,resume:-r,uri:s",
91318d154f5SFabiano Rosas        .params     = "[-d] [-r] uri",
914acd0a093SLuiz Capitulino        .help       = "migrate to URI (using -d to not wait for completion)"
915*db8cb7b6SPeter Xu		      "\n\t\t\t -r to resume a paused postcopy migration",
9162b9e3576SMarc-André Lureau        .cmd        = hmp_migrate,
917acd0a093SLuiz Capitulino    },
918acd0a093SLuiz Capitulino
919acd0a093SLuiz Capitulino
920a6b30bcaSPeter MaydellSRST
921*db8cb7b6SPeter Xu``migrate [-d] [-r]`` *uri*
922*db8cb7b6SPeter Xu  Migrate the VM to *uri*.
923*db8cb7b6SPeter Xu
924*db8cb7b6SPeter Xu  ``-d``
925*db8cb7b6SPeter Xu    Start the migration process, but do not wait for its completion.  To
926*db8cb7b6SPeter Xu    query an ongoing migration process, use "info migrate".
927*db8cb7b6SPeter Xu  ``-r``
928*db8cb7b6SPeter Xu    Resume a paused postcopy migration.
929a6b30bcaSPeter MaydellERST
930acd0a093SLuiz Capitulino
931acd0a093SLuiz Capitulino    {
932acd0a093SLuiz Capitulino        .name       = "migrate_cancel",
933acd0a093SLuiz Capitulino        .args_type  = "",
934acd0a093SLuiz Capitulino        .params     = "",
935acd0a093SLuiz Capitulino        .help       = "cancel the current VM migration",
9362b9e3576SMarc-André Lureau        .cmd        = hmp_migrate_cancel,
937acd0a093SLuiz Capitulino    },
938acd0a093SLuiz Capitulino
939a6b30bcaSPeter MaydellSRST
940a6b30bcaSPeter Maydell``migrate_cancel``
941a6b30bcaSPeter Maydell  Cancel the current VM migration.
942a6b30bcaSPeter MaydellERST
9439e1ba4ccSOrit Wasserman
94494ae12cbSDr. David Alan Gilbert    {
94594ae12cbSDr. David Alan Gilbert        .name       = "migrate_continue",
94694ae12cbSDr. David Alan Gilbert        .args_type  = "state:s",
94794ae12cbSDr. David Alan Gilbert        .params     = "state",
94894ae12cbSDr. David Alan Gilbert        .help       = "Continue migration from the given paused state",
94994ae12cbSDr. David Alan Gilbert        .cmd        = hmp_migrate_continue,
95094ae12cbSDr. David Alan Gilbert    },
951a6b30bcaSPeter MaydellSRST
952a6b30bcaSPeter Maydell``migrate_continue`` *state*
953a6b30bcaSPeter Maydell  Continue migration from the paused state *state*
954a6b30bcaSPeter MaydellERST
9559e1ba4ccSOrit Wasserman
9569e1ba4ccSOrit Wasserman    {
957bf1ae1f4SDr. David Alan Gilbert        .name       = "migrate_incoming",
958bf1ae1f4SDr. David Alan Gilbert        .args_type  = "uri:s",
959bf1ae1f4SDr. David Alan Gilbert        .params     = "uri",
960bf1ae1f4SDr. David Alan Gilbert        .help       = "Continue an incoming migration from an -incoming defer",
9612b9e3576SMarc-André Lureau        .cmd        = hmp_migrate_incoming,
962bf1ae1f4SDr. David Alan Gilbert    },
963bf1ae1f4SDr. David Alan Gilbert
964a6b30bcaSPeter MaydellSRST
965a6b30bcaSPeter Maydell``migrate_incoming`` *uri*
966a6b30bcaSPeter Maydell  Continue an incoming migration using the *uri* (that has the same syntax
967a6b30bcaSPeter Maydell  as the ``-incoming`` option).
968a6b30bcaSPeter MaydellERST
969bf1ae1f4SDr. David Alan Gilbert
9703b563c4bSPeter Xu    {
9713b563c4bSPeter Xu        .name       = "migrate_recover",
9723b563c4bSPeter Xu        .args_type  = "uri:s",
9733b563c4bSPeter Xu        .params     = "uri",
9743b563c4bSPeter Xu        .help       = "Continue a paused incoming postcopy migration",
9753b563c4bSPeter Xu        .cmd        = hmp_migrate_recover,
9763b563c4bSPeter Xu    },
9773b563c4bSPeter Xu
978a6b30bcaSPeter MaydellSRST
979a6b30bcaSPeter Maydell``migrate_recover`` *uri*
980a6b30bcaSPeter Maydell  Continue a paused incoming postcopy migration using the *uri*.
981a6b30bcaSPeter MaydellERST
982bf1ae1f4SDr. David Alan Gilbert
983bf1ae1f4SDr. David Alan Gilbert    {
984d37297dcSPeter Xu        .name       = "migrate_pause",
985d37297dcSPeter Xu        .args_type  = "",
986d37297dcSPeter Xu        .params     = "",
987d37297dcSPeter Xu        .help       = "Pause an ongoing migration (postcopy-only)",
988d37297dcSPeter Xu        .cmd        = hmp_migrate_pause,
989d37297dcSPeter Xu    },
990d37297dcSPeter Xu
991a6b30bcaSPeter MaydellSRST
992a6b30bcaSPeter Maydell``migrate_pause``
993a6b30bcaSPeter Maydell  Pause an ongoing migration.  Currently it only supports postcopy.
994a6b30bcaSPeter MaydellERST
995d37297dcSPeter Xu
996d37297dcSPeter Xu    {
99700458433SOrit Wasserman        .name       = "migrate_set_capability",
99800458433SOrit Wasserman        .args_type  = "capability:s,state:b",
99900458433SOrit Wasserman        .params     = "capability state",
100000458433SOrit Wasserman        .help       = "Enable/Disable the usage of a capability for migration",
10012b9e3576SMarc-André Lureau        .cmd        = hmp_migrate_set_capability,
1002c68a0409SHani Benhabiles        .command_completion = migrate_set_capability_completion,
100300458433SOrit Wasserman    },
100400458433SOrit Wasserman
1005a6b30bcaSPeter MaydellSRST
1006a6b30bcaSPeter Maydell``migrate_set_capability`` *capability* *state*
1007a6b30bcaSPeter Maydell  Enable/Disable the usage of a capability *capability* for migration.
1008a6b30bcaSPeter MaydellERST
100900458433SOrit Wasserman
101000458433SOrit Wasserman    {
101150e9a629SLiang Li        .name       = "migrate_set_parameter",
101269ef1f36SDaniel P. Berrange        .args_type  = "parameter:s,value:s",
101350e9a629SLiang Li        .params     = "parameter value",
101450e9a629SLiang Li        .help       = "Set the parameter for migration",
10152b9e3576SMarc-André Lureau        .cmd        = hmp_migrate_set_parameter,
101650e9a629SLiang Li        .command_completion = migrate_set_parameter_completion,
101750e9a629SLiang Li    },
101850e9a629SLiang Li
1019a6b30bcaSPeter MaydellSRST
1020a6b30bcaSPeter Maydell``migrate_set_parameter`` *parameter* *value*
1021a6b30bcaSPeter Maydell  Set the parameter *parameter* for migration.
1022a6b30bcaSPeter MaydellERST
102350e9a629SLiang Li
102450e9a629SLiang Li    {
10254886a1bcSDr. David Alan Gilbert        .name       = "migrate_start_postcopy",
10264886a1bcSDr. David Alan Gilbert        .args_type  = "",
10274886a1bcSDr. David Alan Gilbert        .params     = "",
1028a54d340bSDr. David Alan Gilbert        .help       = "Followup to a migration command to switch the migration"
102932c3db5bSDr. David Alan Gilbert                      " to postcopy mode. The postcopy-ram capability must "
1030c2eb7f21SGreg Kurz                      "be set on both source and destination before the "
1031c2eb7f21SGreg Kurz                      "original migration command .",
10322b9e3576SMarc-André Lureau        .cmd        = hmp_migrate_start_postcopy,
10334886a1bcSDr. David Alan Gilbert    },
10344886a1bcSDr. David Alan Gilbert
1035a6b30bcaSPeter MaydellSRST
1036a6b30bcaSPeter Maydell``migrate_start_postcopy``
1037a6b30bcaSPeter Maydell  Switch in-progress migration to postcopy mode. Ignored after the end of
1038a6b30bcaSPeter Maydell  migration (or once already in postcopy).
1039a6b30bcaSPeter MaydellERST
10404886a1bcSDr. David Alan Gilbert
104151e47cf8SVladimir Sementsov-Ogievskiy#ifdef CONFIG_REPLICATION
10424886a1bcSDr. David Alan Gilbert    {
1043d89e666eSzhanghailiang        .name       = "x_colo_lost_heartbeat",
1044d89e666eSzhanghailiang        .args_type  = "",
1045d89e666eSzhanghailiang        .params     = "",
1046d89e666eSzhanghailiang        .help       = "Tell COLO that heartbeat is lost,\n\t\t\t"
1047d89e666eSzhanghailiang                      "a failover or takeover is needed.",
1048d89e666eSzhanghailiang        .cmd = hmp_x_colo_lost_heartbeat,
1049d89e666eSzhanghailiang    },
105051e47cf8SVladimir Sementsov-Ogievskiy#endif
1051d89e666eSzhanghailiang
1052a6b30bcaSPeter MaydellSRST
1053a6b30bcaSPeter Maydell``x_colo_lost_heartbeat``
1054a6b30bcaSPeter Maydell  Tell COLO that heartbeat is lost, a failover or takeover is needed.
1055a6b30bcaSPeter MaydellERST
1056d89e666eSzhanghailiang
1057d89e666eSzhanghailiang    {
10582ea720dbSJes Sorensen        .name       = "client_migrate_info",
10592ea720dbSJes Sorensen        .args_type  = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
10602ea720dbSJes Sorensen        .params     = "protocol hostname port tls-port cert-subject",
106113cadefbSMarkus Armbruster        .help       = "set migration information for remote display",
10622b9e3576SMarc-André Lureau        .cmd        = hmp_client_migrate_info,
1063f8882568SJes Sorensen    },
1064f8882568SJes Sorensen
1065a6b30bcaSPeter MaydellSRST
1066a6b30bcaSPeter Maydell``client_migrate_info`` *protocol* *hostname* *port* *tls-port* *cert-subject*
1067a6b30bcaSPeter Maydell  Set migration information for remote display.  This makes the server
1068a6b30bcaSPeter Maydell  ask the client to automatically reconnect using the new parameters
1069a6b30bcaSPeter Maydell  once migration finished successfully.  Only implemented for SPICE.
1070a6b30bcaSPeter MaydellERST
1071e866e239SGerd Hoffmann
1072783e9b48SWen Congyang    {
1073783e9b48SWen Congyang        .name       = "dump-guest-memory",
1074e6549197SStephen Brennan        .args_type  = "paging:-p,detach:-d,windmp:-w,zlib:-z,lzo:-l,snappy:-s,raw:-R,filename:F,begin:l?,length:l?",
1075e6549197SStephen Brennan        .params     = "[-p] [-d] [-z|-l|-s|-w] [-R] filename [begin length]",
1076c20499d9SQiao Nuohan        .help       = "dump guest memory into file 'filename'.\n\t\t\t"
1077c20499d9SQiao Nuohan                      "-p: do paging to get guest's memory mapping.\n\t\t\t"
1078228de9cfSPeter Xu                      "-d: return immediately (do not wait for completion).\n\t\t\t"
10791b7a0f75SQiao Nuohan                      "-z: dump in kdump-compressed format, with zlib compression.\n\t\t\t"
10801b7a0f75SQiao Nuohan                      "-l: dump in kdump-compressed format, with lzo compression.\n\t\t\t"
10811b7a0f75SQiao Nuohan                      "-s: dump in kdump-compressed format, with snappy compression.\n\t\t\t"
1082e6549197SStephen Brennan                      "-R: when using kdump (-z, -l, -s), use raw rather than makedumpfile-flattened\n\t\t\t"
1083e6549197SStephen Brennan                      "    format\n\t\t\t"
10842da91b54SViktor Prutyanov                      "-w: dump in Windows crashdump format (can be used instead of ELF-dump converting),\n\t\t\t"
1085f5daa829SViktor Prutyanov                      "    for Windows x86 and x64 guests with vmcoreinfo driver only.\n\t\t\t"
1086c20499d9SQiao Nuohan                      "begin: the starting physical address.\n\t\t\t"
1087c20499d9SQiao Nuohan                      "length: the memory size, in bytes.",
10882b9e3576SMarc-André Lureau        .cmd        = hmp_dump_guest_memory,
1089783e9b48SWen Congyang    },
1090783e9b48SWen Congyang
1091a6b30bcaSPeter MaydellSRST
1092a6b30bcaSPeter Maydell``dump-guest-memory [-p]`` *filename* *begin* *length*
1093a6b30bcaSPeter Maydell  \
1094a6b30bcaSPeter Maydell``dump-guest-memory [-z|-l|-s|-w]`` *filename*
1095a6b30bcaSPeter Maydell  Dump guest memory to *protocol*. The file can be processed with crash or
1096a6b30bcaSPeter Maydell  gdb. Without ``-z|-l|-s|-w``, the dump format is ELF.
1097a6b30bcaSPeter Maydell
1098a6b30bcaSPeter Maydell  ``-p``
1099a6b30bcaSPeter Maydell    do paging to get guest's memory mapping.
1100a6b30bcaSPeter Maydell  ``-z``
1101a6b30bcaSPeter Maydell    dump in kdump-compressed format, with zlib compression.
1102a6b30bcaSPeter Maydell  ``-l``
1103a6b30bcaSPeter Maydell    dump in kdump-compressed format, with lzo compression.
1104a6b30bcaSPeter Maydell  ``-s``
1105a6b30bcaSPeter Maydell    dump in kdump-compressed format, with snappy compression.
1106e6549197SStephen Brennan  ``-R``
1107e6549197SStephen Brennan    when using kdump (-z, -l, -s), use raw rather than makedumpfile-flattened
1108e6549197SStephen Brennan    format
1109a6b30bcaSPeter Maydell  ``-w``
1110a6b30bcaSPeter Maydell    dump in Windows crashdump format (can be used instead of ELF-dump converting),
1111a6b30bcaSPeter Maydell    for Windows x64 guests with vmcoreinfo driver only
1112a6b30bcaSPeter Maydell  *filename*
1113a6b30bcaSPeter Maydell    dump file name.
1114a6b30bcaSPeter Maydell  *begin*
1115a6b30bcaSPeter Maydell    the starting physical address. It's optional, and should be
1116a6b30bcaSPeter Maydell    specified together with *length*.
1117a6b30bcaSPeter Maydell  *length*
1118a6b30bcaSPeter Maydell    the memory size, in bytes. It's optional, and should be specified
1119a6b30bcaSPeter Maydell    together with *begin*.
1120a6b30bcaSPeter Maydell
1121a6b30bcaSPeter MaydellERST
1122783e9b48SWen Congyang
1123a4538a5cSJason J. Herne#if defined(TARGET_S390X)
1124a4538a5cSJason J. Herne    {
1125a4538a5cSJason J. Herne        .name       = "dump-skeys",
1126a4538a5cSJason J. Herne        .args_type  = "filename:F",
1127a4538a5cSJason J. Herne        .params     = "",
1128a4538a5cSJason J. Herne        .help       = "Save guest storage keys into file 'filename'.\n",
11292b9e3576SMarc-André Lureau        .cmd        = hmp_dump_skeys,
1130a4538a5cSJason J. Herne    },
1131a4538a5cSJason J. Herne#endif
1132a4538a5cSJason J. Herne
1133a6b30bcaSPeter MaydellSRST
1134a6b30bcaSPeter Maydell``dump-skeys`` *filename*
1135a6b30bcaSPeter Maydell  Save guest storage keys to a file.
1136a6b30bcaSPeter MaydellERST
1137a4538a5cSJason J. Herne
1138f860d497SClaudio Imbrenda#if defined(TARGET_S390X)
1139f860d497SClaudio Imbrenda    {
1140f860d497SClaudio Imbrenda        .name       = "migration_mode",
1141f860d497SClaudio Imbrenda        .args_type  = "mode:i",
1142f860d497SClaudio Imbrenda        .params     = "mode",
1143f860d497SClaudio Imbrenda        .help       = "Enables or disables migration mode\n",
1144f860d497SClaudio Imbrenda        .cmd        = hmp_migrationmode,
1145f860d497SClaudio Imbrenda    },
1146f860d497SClaudio Imbrenda#endif
1147f860d497SClaudio Imbrenda
1148a6b30bcaSPeter MaydellSRST
1149a6b30bcaSPeter Maydell``migration_mode`` *mode*
1150a6b30bcaSPeter Maydell  Enables or disables migration mode.
1151a6b30bcaSPeter MaydellERST
1152f860d497SClaudio Imbrenda
1153e866e239SGerd Hoffmann    {
11542ea720dbSJes Sorensen        .name       = "snapshot_blkdev",
11556cc2a415SPaolo Bonzini        .args_type  = "reuse:-n,device:B,snapshot-file:s?,format:s?",
11566cc2a415SPaolo Bonzini        .params     = "[-n] device [new-image-file] [format]",
11572ea720dbSJes Sorensen        .help       = "initiates a live snapshot\n\t\t\t"
11582ea720dbSJes Sorensen                      "of device. If a new image file is specified, the\n\t\t\t"
11592ea720dbSJes Sorensen                      "new image file will become the new root image.\n\t\t\t"
11602ea720dbSJes Sorensen                      "If format is specified, the snapshot file will\n\t\t\t"
1161775ca88eSWenchao Xia                      "be created in that format.\n\t\t\t"
11626cc2a415SPaolo Bonzini                      "The default format is qcow2.  The -n flag requests QEMU\n\t\t\t"
11636cc2a415SPaolo Bonzini                      "to reuse the image found in new-image-file, instead of\n\t\t\t"
11646cc2a415SPaolo Bonzini                      "recreating it from scratch.",
11652b9e3576SMarc-André Lureau        .cmd        = hmp_snapshot_blkdev,
1166e866e239SGerd Hoffmann    },
1167e866e239SGerd Hoffmann
1168a6b30bcaSPeter MaydellSRST
1169a6b30bcaSPeter Maydell``snapshot_blkdev``
1170a6b30bcaSPeter Maydell  Snapshot device, using snapshot file as target if provided
1171a6b30bcaSPeter MaydellERST
1172f8882568SJes Sorensen
1173acd0a093SLuiz Capitulino    {
1174775ca88eSWenchao Xia        .name       = "snapshot_blkdev_internal",
1175775ca88eSWenchao Xia        .args_type  = "device:B,name:s",
1176775ca88eSWenchao Xia        .params     = "device name",
1177775ca88eSWenchao Xia        .help       = "take an internal snapshot of device.\n\t\t\t"
1178775ca88eSWenchao Xia                      "The format of the image used by device must\n\t\t\t"
1179775ca88eSWenchao Xia                      "support it, such as qcow2.\n\t\t\t",
11802b9e3576SMarc-André Lureau        .cmd        = hmp_snapshot_blkdev_internal,
1181775ca88eSWenchao Xia    },
1182775ca88eSWenchao Xia
1183a6b30bcaSPeter MaydellSRST
1184a6b30bcaSPeter Maydell``snapshot_blkdev_internal``
1185a6b30bcaSPeter Maydell  Take an internal snapshot on device if it support
1186a6b30bcaSPeter MaydellERST
1187775ca88eSWenchao Xia
1188775ca88eSWenchao Xia    {
11897a4ed2eeSWenchao Xia        .name       = "snapshot_delete_blkdev_internal",
11907a4ed2eeSWenchao Xia        .args_type  = "device:B,name:s,id:s?",
11917a4ed2eeSWenchao Xia        .params     = "device name [id]",
11927a4ed2eeSWenchao Xia        .help       = "delete an internal snapshot of device.\n\t\t\t"
11937a4ed2eeSWenchao Xia                      "If id is specified, qemu will try delete\n\t\t\t"
11947a4ed2eeSWenchao Xia                      "the snapshot matching both id and name.\n\t\t\t"
11957a4ed2eeSWenchao Xia                      "The format of the image used by device must\n\t\t\t"
11967a4ed2eeSWenchao Xia                      "support it, such as qcow2.\n\t\t\t",
11972b9e3576SMarc-André Lureau        .cmd        = hmp_snapshot_delete_blkdev_internal,
11987a4ed2eeSWenchao Xia    },
11997a4ed2eeSWenchao Xia
1200a6b30bcaSPeter MaydellSRST
1201a6b30bcaSPeter Maydell``snapshot_delete_blkdev_internal``
1202a6b30bcaSPeter Maydell  Delete an internal snapshot on device if it support
1203a6b30bcaSPeter MaydellERST
12047a4ed2eeSWenchao Xia
12057a4ed2eeSWenchao Xia    {
1206d9b902dbSPaolo Bonzini        .name       = "drive_mirror",
1207d9b902dbSPaolo Bonzini        .args_type  = "reuse:-n,full:-f,device:B,target:s,format:s?",
1208d9b902dbSPaolo Bonzini        .params     = "[-n] [-f] device target [format]",
1209d9b902dbSPaolo Bonzini        .help       = "initiates live storage\n\t\t\t"
1210d9b902dbSPaolo Bonzini                      "migration for a device. The device's contents are\n\t\t\t"
1211d9b902dbSPaolo Bonzini                      "copied to the new image file, including data that\n\t\t\t"
1212d9b902dbSPaolo Bonzini                      "is written after the command is started.\n\t\t\t"
1213d9b902dbSPaolo Bonzini                      "The -n flag requests QEMU to reuse the image found\n\t\t\t"
1214d9b902dbSPaolo Bonzini                      "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
1215d9b902dbSPaolo Bonzini                      "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
1216d9b902dbSPaolo Bonzini                      "so that the result does not need a backing file.\n\t\t\t",
12172b9e3576SMarc-André Lureau        .cmd        = hmp_drive_mirror,
1218d9b902dbSPaolo Bonzini    },
1219a6b30bcaSPeter MaydellSRST
1220a6b30bcaSPeter Maydell``drive_mirror``
1221a6b30bcaSPeter Maydell  Start mirroring a block device's writes to a new destination,
1222a6b30bcaSPeter Maydell  using the specified target.
1223a6b30bcaSPeter MaydellERST
1224d9b902dbSPaolo Bonzini
1225d9b902dbSPaolo Bonzini    {
1226de90930aSStefan Hajnoczi        .name       = "drive_backup",
122713b9414bSPavel Butsykin        .args_type  = "reuse:-n,full:-f,compress:-c,device:B,target:s,format:s?",
122813b9414bSPavel Butsykin        .params     = "[-n] [-f] [-c] device target [format]",
1229de90930aSStefan Hajnoczi        .help       = "initiates a point-in-time\n\t\t\t"
1230de90930aSStefan Hajnoczi                      "copy for a device. The device's contents are\n\t\t\t"
1231de90930aSStefan Hajnoczi                      "copied to the new image file, excluding data that\n\t\t\t"
1232de90930aSStefan Hajnoczi                      "is written after the command is started.\n\t\t\t"
1233de90930aSStefan Hajnoczi                      "The -n flag requests QEMU to reuse the image found\n\t\t\t"
1234de90930aSStefan Hajnoczi                      "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
1235de90930aSStefan Hajnoczi                      "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
123613b9414bSPavel Butsykin                      "so that the result does not need a backing file.\n\t\t\t"
123713b9414bSPavel Butsykin                      "The -c flag requests QEMU to compress backup data\n\t\t\t"
123813b9414bSPavel Butsykin                      "(if the target format supports it).\n\t\t\t",
12392b9e3576SMarc-André Lureau        .cmd        = hmp_drive_backup,
1240de90930aSStefan Hajnoczi    },
1241a6b30bcaSPeter MaydellSRST
1242a6b30bcaSPeter Maydell``drive_backup``
1243e3a6e0daSzhaolichang  Start a point-in-time copy of a block device to a specified target.
1244a6b30bcaSPeter MaydellERST
1245de90930aSStefan Hajnoczi
1246de90930aSStefan Hajnoczi    {
1247acd0a093SLuiz Capitulino        .name       = "drive_add",
1248abb21ac3SKevin Wolf        .args_type  = "node:-n,pci_addr:s,opts:s",
1249abb21ac3SKevin Wolf        .params     = "[-n] [[<domain>:]<bus>:]<slot>\n"
1250acd0a093SLuiz Capitulino                      "[file=file][,if=type][,bus=n]\n"
1251fb0490f6SStefan Hajnoczi                      "[,unit=m][,media=d][,index=i]\n"
1252fb0490f6SStefan Hajnoczi                      "[,snapshot=on|off][,cache=on|off]\n"
1253fb0490f6SStefan Hajnoczi                      "[,readonly=on|off][,copy-on-read=on|off]",
1254acd0a093SLuiz Capitulino        .help       = "add drive to PCI storage controller",
12552b9e3576SMarc-André Lureau        .cmd        = hmp_drive_add,
1256acd0a093SLuiz Capitulino    },
1257acd0a093SLuiz Capitulino
1258a6b30bcaSPeter MaydellSRST
1259a6b30bcaSPeter Maydell``drive_add``
1260a6b30bcaSPeter Maydell  Add drive to PCI storage controller.
1261a6b30bcaSPeter MaydellERST
1262acd0a093SLuiz Capitulino
1263acd0a093SLuiz Capitulino    {
12642ae63bdaSIsaku Yamahata        .name       = "pcie_aer_inject_error",
12652ae63bdaSIsaku Yamahata        .args_type  = "advisory_non_fatal:-a,correctable:-c,"
12662ae63bdaSIsaku Yamahata	              "id:s,error_status:s,"
12672ae63bdaSIsaku Yamahata	              "header0:i?,header1:i?,header2:i?,header3:i?,"
12682ae63bdaSIsaku Yamahata	              "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
12692ae63bdaSIsaku Yamahata        .params     = "[-a] [-c] id "
12702ae63bdaSIsaku Yamahata                      "<error_status> [<tlp header> [<tlp header prefix>]]",
12712ae63bdaSIsaku Yamahata        .help       = "inject pcie aer error\n\t\t\t"
12722ae63bdaSIsaku Yamahata	              " -a for advisory non fatal error\n\t\t\t"
12732ae63bdaSIsaku Yamahata	              " -c for correctable error\n\t\t\t"
12742ae63bdaSIsaku Yamahata                      "<id> = qdev device id\n\t\t\t"
12752ae63bdaSIsaku Yamahata                      "<error_status> = error string or 32bit\n\t\t\t"
12768ad4e451SZenghui Yu                      "<tlp header> = 32bit x 4\n\t\t\t"
12778ad4e451SZenghui Yu                      "<tlp header prefix> = 32bit x 4",
12782b9e3576SMarc-André Lureau        .cmd        = hmp_pcie_aer_inject_error,
12792ae63bdaSIsaku Yamahata    },
12802ae63bdaSIsaku Yamahata
1281a6b30bcaSPeter MaydellSRST
1282a6b30bcaSPeter Maydell``pcie_aer_inject_error``
1283a6b30bcaSPeter Maydell  Inject PCIe AER error
1284a6b30bcaSPeter MaydellERST
12852ae63bdaSIsaku Yamahata
12862ae63bdaSIsaku Yamahata    {
1287acd0a093SLuiz Capitulino        .name       = "netdev_add",
1288acd0a093SLuiz Capitulino        .args_type  = "netdev:O",
12895166fe0aSLaurent Vivier        .params     = "[user|tap|socket|stream|dgram|vde|bridge|hubport|netmap|vhost-user"
1290cb039ef3SIlya Maximets#ifdef CONFIG_AF_XDP
1291cb039ef3SIlya Maximets                      "|af-xdp"
1292cb039ef3SIlya Maximets#endif
1293fd8c8c05SVladislav Yaroshchuk#ifdef CONFIG_VMNET
1294fd8c8c05SVladislav Yaroshchuk                      "|vmnet-host|vmnet-shared|vmnet-bridged"
1295fd8c8c05SVladislav Yaroshchuk#endif
1296fd8c8c05SVladislav Yaroshchuk                      "],id=str[,prop=value][,...]",
1297acd0a093SLuiz Capitulino        .help       = "add host network device",
12982b9e3576SMarc-André Lureau        .cmd        = hmp_netdev_add,
1299b162b49aSHani Benhabiles        .command_completion = netdev_add_completion,
130048f596c5SPaolo Bonzini        .flags      = "p",
1301acd0a093SLuiz Capitulino    },
1302acd0a093SLuiz Capitulino
1303a6b30bcaSPeter MaydellSRST
1304a6b30bcaSPeter Maydell``netdev_add``
1305a6b30bcaSPeter Maydell  Add host network device.
1306a6b30bcaSPeter MaydellERST
1307acd0a093SLuiz Capitulino
1308acd0a093SLuiz Capitulino    {
1309acd0a093SLuiz Capitulino        .name       = "netdev_del",
1310acd0a093SLuiz Capitulino        .args_type  = "id:s",
1311acd0a093SLuiz Capitulino        .params     = "id",
1312acd0a093SLuiz Capitulino        .help       = "remove host network device",
13132b9e3576SMarc-André Lureau        .cmd        = hmp_netdev_del,
131411b389f2SHani Benhabiles        .command_completion = netdev_del_completion,
131548f596c5SPaolo Bonzini        .flags      = "p",
1316acd0a093SLuiz Capitulino    },
1317acd0a093SLuiz Capitulino
1318a6b30bcaSPeter MaydellSRST
1319a6b30bcaSPeter Maydell``netdev_del``
1320a6b30bcaSPeter Maydell  Remove host network device.
1321a6b30bcaSPeter MaydellERST
1322acd0a093SLuiz Capitulino
1323ab2d0531SPaolo Bonzini    {
1324cff8b2c6SPaolo Bonzini        .name       = "object_add",
1325da0a932bSKevin Wolf        .args_type  = "object:S",
1326cff8b2c6SPaolo Bonzini        .params     = "[qom-type=]type,id=str[,prop=value][,...]",
1327cff8b2c6SPaolo Bonzini        .help       = "create QOM object",
13282b9e3576SMarc-André Lureau        .cmd        = hmp_object_add,
1329bfa40f77SHani Benhabiles        .command_completion = object_add_completion,
13309e33013bSPaolo Bonzini        .flags      = "p",
1331cff8b2c6SPaolo Bonzini    },
1332cff8b2c6SPaolo Bonzini
1333a6b30bcaSPeter MaydellSRST
1334a6b30bcaSPeter Maydell``object_add``
1335a6b30bcaSPeter Maydell  Create QOM object.
1336a6b30bcaSPeter MaydellERST
1337cff8b2c6SPaolo Bonzini
1338cff8b2c6SPaolo Bonzini    {
1339ab2d0531SPaolo Bonzini        .name       = "object_del",
1340ab2d0531SPaolo Bonzini        .args_type  = "id:s",
1341ab2d0531SPaolo Bonzini        .params     = "id",
1342ab2d0531SPaolo Bonzini        .help       = "destroy QOM object",
13432b9e3576SMarc-André Lureau        .cmd        = hmp_object_del,
1344bfa40f77SHani Benhabiles        .command_completion = object_del_completion,
13459e33013bSPaolo Bonzini        .flags      = "p",
1346ab2d0531SPaolo Bonzini    },
1347ab2d0531SPaolo Bonzini
1348a6b30bcaSPeter MaydellSRST
1349a6b30bcaSPeter Maydell``object_del``
1350a6b30bcaSPeter Maydell  Destroy QOM object.
1351a6b30bcaSPeter MaydellERST
1352ab2d0531SPaolo Bonzini
1353acd0a093SLuiz Capitulino#ifdef CONFIG_SLIRP
1354acd0a093SLuiz Capitulino    {
1355acd0a093SLuiz Capitulino        .name       = "hostfwd_add",
1356b4983c57SThomas Huth        .args_type  = "arg1:s,arg2:s?",
1357b4983c57SThomas Huth        .params     = "[netdev_id] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
1358acd0a093SLuiz Capitulino        .help       = "redirect TCP or UDP connections from host to guest (requires -net user)",
13592b9e3576SMarc-André Lureau        .cmd        = hmp_hostfwd_add,
1360acd0a093SLuiz Capitulino    },
1361acd0a093SLuiz Capitulino#endif
1362a6b30bcaSPeter MaydellSRST
1363a6b30bcaSPeter Maydell``hostfwd_add``
1364a6b30bcaSPeter Maydell  Redirect TCP or UDP connections from host to guest (requires -net user).
1365a6b30bcaSPeter MaydellERST
1366acd0a093SLuiz Capitulino
1367acd0a093SLuiz Capitulino#ifdef CONFIG_SLIRP
1368acd0a093SLuiz Capitulino    {
1369acd0a093SLuiz Capitulino        .name       = "hostfwd_remove",
1370b4983c57SThomas Huth        .args_type  = "arg1:s,arg2:s?",
1371b4983c57SThomas Huth        .params     = "[netdev_id] [tcp|udp]:[hostaddr]:hostport",
1372acd0a093SLuiz Capitulino        .help       = "remove host-to-guest TCP or UDP redirection",
13732b9e3576SMarc-André Lureau        .cmd        = hmp_hostfwd_remove,
1374acd0a093SLuiz Capitulino    },
1375acd0a093SLuiz Capitulino
1376acd0a093SLuiz Capitulino#endif
1377a6b30bcaSPeter MaydellSRST
1378a6b30bcaSPeter Maydell``hostfwd_remove``
1379a6b30bcaSPeter Maydell  Remove host-to-guest TCP or UDP redirection.
1380a6b30bcaSPeter MaydellERST
1381acd0a093SLuiz Capitulino
1382acd0a093SLuiz Capitulino    {
1383acd0a093SLuiz Capitulino        .name       = "balloon",
1384acd0a093SLuiz Capitulino        .args_type  = "value:M",
1385acd0a093SLuiz Capitulino        .params     = "target",
1386acd0a093SLuiz Capitulino        .help       = "request VM to change its memory allocation (in MB)",
13872b9e3576SMarc-André Lureau        .cmd        = hmp_balloon,
1388acd0a093SLuiz Capitulino    },
1389acd0a093SLuiz Capitulino
1390a6b30bcaSPeter MaydellSRST
1391a6b30bcaSPeter Maydell``balloon`` *value*
1392a6b30bcaSPeter Maydell  Request VM to change its memory allocation to *value* (in MB).
1393a6b30bcaSPeter MaydellERST
1394acd0a093SLuiz Capitulino
1395acd0a093SLuiz Capitulino    {
1396acd0a093SLuiz Capitulino        .name       = "set_link",
1397acd0a093SLuiz Capitulino        .args_type  = "name:s,up:b",
1398acd0a093SLuiz Capitulino        .params     = "name on|off",
1399acd0a093SLuiz Capitulino        .help       = "change the link status of a network adapter",
14002b9e3576SMarc-André Lureau        .cmd        = hmp_set_link,
140140d19394SHani Benhabiles        .command_completion = set_link_completion,
1402acd0a093SLuiz Capitulino    },
1403acd0a093SLuiz Capitulino
1404a6b30bcaSPeter MaydellSRST
1405a6b30bcaSPeter Maydell``set_link`` *name* ``[on|off]``
1406a6b30bcaSPeter Maydell  Switch link *name* on (i.e. up) or off (i.e. down).
1407a6b30bcaSPeter MaydellERST
1408acd0a093SLuiz Capitulino
1409acd0a093SLuiz Capitulino    {
1410acd0a093SLuiz Capitulino        .name       = "watchdog_action",
1411acd0a093SLuiz Capitulino        .args_type  = "action:s",
14127805132bSDayu Liu        .params     = "[reset|shutdown|poweroff|pause|debug|none|inject-nmi]",
1413acd0a093SLuiz Capitulino        .help       = "change watchdog action",
14142b9e3576SMarc-André Lureau        .cmd        = hmp_watchdog_action,
1415d0ece345SHani Benhabiles        .command_completion = watchdog_action_completion,
1416acd0a093SLuiz Capitulino    },
1417acd0a093SLuiz Capitulino
1418a6b30bcaSPeter MaydellSRST
1419a6b30bcaSPeter Maydell``watchdog_action``
1420a6b30bcaSPeter Maydell  Change watchdog action.
1421a6b30bcaSPeter MaydellERST
1422acd0a093SLuiz Capitulino
1423acd0a093SLuiz Capitulino    {
14244057725fSPaolo Bonzini        .name       = "nbd_server_start",
14254057725fSPaolo Bonzini        .args_type  = "all:-a,writable:-w,uri:s",
14264057725fSPaolo Bonzini        .params     = "nbd_server_start [-a] [-w] host:port",
14274057725fSPaolo Bonzini        .help       = "serve block devices on the given host and port",
14282b9e3576SMarc-André Lureau        .cmd        = hmp_nbd_server_start,
1429f55ba801SPaolo Bonzini        .flags      = "p",
14304057725fSPaolo Bonzini    },
1431a6b30bcaSPeter MaydellSRST
1432a6b30bcaSPeter Maydell``nbd_server_start`` *host*:*port*
1433a6b30bcaSPeter Maydell  Start an NBD server on the given host and/or port.  If the ``-a``
1434a6b30bcaSPeter Maydell  option is included, all of the virtual machine's block devices that
1435a6b30bcaSPeter Maydell  have an inserted media on them are automatically exported; in this case,
1436a6b30bcaSPeter Maydell  the ``-w`` option makes the devices writable too.
1437a6b30bcaSPeter MaydellERST
14384057725fSPaolo Bonzini
14394057725fSPaolo Bonzini    {
14404057725fSPaolo Bonzini        .name       = "nbd_server_add",
1441dba49323SEric Blake        .args_type  = "writable:-w,device:B,name:s?",
1442dba49323SEric Blake        .params     = "nbd_server_add [-w] device [name]",
14434057725fSPaolo Bonzini        .help       = "export a block device via NBD",
14442b9e3576SMarc-André Lureau        .cmd        = hmp_nbd_server_add,
1445f55ba801SPaolo Bonzini        .flags      = "p",
14464057725fSPaolo Bonzini    },
1447a6b30bcaSPeter MaydellSRST
1448a6b30bcaSPeter Maydell``nbd_server_add`` *device* [ *name* ]
1449a6b30bcaSPeter Maydell  Export a block device through QEMU's NBD server, which must be started
1450a6b30bcaSPeter Maydell  beforehand with ``nbd_server_start``.  The ``-w`` option makes the
1451a6b30bcaSPeter Maydell  exported device writable too.  The export name is controlled by *name*,
1452a6b30bcaSPeter Maydell  defaulting to *device*.
1453a6b30bcaSPeter MaydellERST
14544057725fSPaolo Bonzini
14554057725fSPaolo Bonzini    {
145608fb10a7SEric Blake        .name       = "nbd_server_remove",
145708fb10a7SEric Blake        .args_type  = "force:-f,name:s",
145808fb10a7SEric Blake        .params     = "nbd_server_remove [-f] name",
145908fb10a7SEric Blake        .help       = "remove an export previously exposed via NBD",
146008fb10a7SEric Blake        .cmd        = hmp_nbd_server_remove,
1461f55ba801SPaolo Bonzini        .flags      = "p",
146208fb10a7SEric Blake    },
1463a6b30bcaSPeter MaydellSRST
1464a6b30bcaSPeter Maydell``nbd_server_remove [-f]`` *name*
1465a6b30bcaSPeter Maydell  Stop exporting a block device through QEMU's NBD server, which was
1466a6b30bcaSPeter Maydell  previously started with ``nbd_server_add``.  The ``-f``
1467a6b30bcaSPeter Maydell  option forces the server to drop the export immediately even if
1468a6b30bcaSPeter Maydell  clients are connected; otherwise the command fails unless there are no
1469a6b30bcaSPeter Maydell  clients.
1470a6b30bcaSPeter MaydellERST
147108fb10a7SEric Blake
147208fb10a7SEric Blake    {
14734057725fSPaolo Bonzini        .name       = "nbd_server_stop",
14744057725fSPaolo Bonzini        .args_type  = "",
14754057725fSPaolo Bonzini        .params     = "nbd_server_stop",
14764057725fSPaolo Bonzini        .help       = "stop serving block devices using the NBD protocol",
14772b9e3576SMarc-André Lureau        .cmd        = hmp_nbd_server_stop,
1478f55ba801SPaolo Bonzini        .flags      = "p",
14794057725fSPaolo Bonzini    },
1480a6b30bcaSPeter MaydellSRST
1481a6b30bcaSPeter Maydell``nbd_server_stop``
1482a6b30bcaSPeter Maydell  Stop the QEMU embedded NBD server.
1483a6b30bcaSPeter MaydellERST
14844057725fSPaolo Bonzini
14854057725fSPaolo Bonzini
1486acd0a093SLuiz Capitulino#if defined(TARGET_I386)
1487acd0a093SLuiz Capitulino
1488acd0a093SLuiz Capitulino    {
1489acd0a093SLuiz Capitulino        .name       = "mce",
149031ce5e0cSJin Dongming        .args_type  = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
149131ce5e0cSJin Dongming        .params     = "[-b] cpu bank status mcgstatus addr misc",
149231ce5e0cSJin Dongming        .help       = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
14932b9e3576SMarc-André Lureau        .cmd        = hmp_mce,
1494acd0a093SLuiz Capitulino    },
1495acd0a093SLuiz Capitulino
1496acd0a093SLuiz Capitulino#endif
1497a6b30bcaSPeter MaydellSRST
1498a6b30bcaSPeter Maydell``mce`` *cpu* *bank* *status* *mcgstatus* *addr* *misc*
1499a6b30bcaSPeter Maydell  Inject an MCE on the given CPU (x86 only).
1500a6b30bcaSPeter MaydellERST
1501acd0a093SLuiz Capitulino
15024bf21c7fSMarc-André Lureau#ifdef CONFIG_POSIX
1503acd0a093SLuiz Capitulino    {
1504acd0a093SLuiz Capitulino        .name       = "getfd",
1505acd0a093SLuiz Capitulino        .args_type  = "fdname:s",
1506acd0a093SLuiz Capitulino        .params     = "getfd name",
1507acd0a093SLuiz Capitulino        .help       = "receive a file descriptor via SCM rights and assign it a name",
15082b9e3576SMarc-André Lureau        .cmd        = hmp_getfd,
1509f55ba801SPaolo Bonzini        .flags      = "p",
1510acd0a093SLuiz Capitulino    },
1511acd0a093SLuiz Capitulino
1512a6b30bcaSPeter MaydellSRST
1513a6b30bcaSPeter Maydell``getfd`` *fdname*
1514a6b30bcaSPeter Maydell  If a file descriptor is passed alongside this command using the SCM_RIGHTS
1515a6b30bcaSPeter Maydell  mechanism on unix sockets, it is stored using the name *fdname* for
1516a6b30bcaSPeter Maydell  later use by other monitor commands.
1517a6b30bcaSPeter MaydellERST
15184bf21c7fSMarc-André Lureau#endif
1519acd0a093SLuiz Capitulino
1520acd0a093SLuiz Capitulino    {
1521acd0a093SLuiz Capitulino        .name       = "closefd",
1522acd0a093SLuiz Capitulino        .args_type  = "fdname:s",
1523acd0a093SLuiz Capitulino        .params     = "closefd name",
1524acd0a093SLuiz Capitulino        .help       = "close a file descriptor previously passed via SCM rights",
15252b9e3576SMarc-André Lureau        .cmd        = hmp_closefd,
1526f55ba801SPaolo Bonzini        .flags      = "p",
1527acd0a093SLuiz Capitulino    },
1528acd0a093SLuiz Capitulino
1529a6b30bcaSPeter MaydellSRST
1530a6b30bcaSPeter Maydell``closefd`` *fdname*
1531a6b30bcaSPeter Maydell  Close the file descriptor previously assigned to *fdname* using the
1532a6b30bcaSPeter Maydell  ``getfd`` command. This is only needed if the file descriptor was never
1533a6b30bcaSPeter Maydell  used by another monitor command.
1534a6b30bcaSPeter MaydellERST
1535acd0a093SLuiz Capitulino
1536acd0a093SLuiz Capitulino    {
1537727f005eSZhi Yong Wu        .name       = "block_set_io_throttle",
1538727f005eSZhi Yong Wu        .args_type  = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
1539727f005eSZhi Yong Wu        .params     = "device bps bps_rd bps_wr iops iops_rd iops_wr",
1540727f005eSZhi Yong Wu        .help       = "change I/O throttle limits for a block drive",
15412b9e3576SMarc-André Lureau        .cmd        = hmp_block_set_io_throttle,
1542f55ba801SPaolo Bonzini        .flags      = "p",
1543727f005eSZhi Yong Wu    },
1544727f005eSZhi Yong Wu
1545a6b30bcaSPeter MaydellSRST
1546a6b30bcaSPeter Maydell``block_set_io_throttle`` *device* *bps* *bps_rd* *bps_wr* *iops* *iops_rd* *iops_wr*
1547a6b30bcaSPeter Maydell  Change I/O throttle limits for a block drive to
1548a6b30bcaSPeter Maydell  *bps* *bps_rd* *bps_wr* *iops* *iops_rd* *iops_wr*.
1549a6b30bcaSPeter Maydell  *device* can be a block device name, a qdev ID or a QOM path.
1550a6b30bcaSPeter MaydellERST
1551acd0a093SLuiz Capitulino
1552acd0a093SLuiz Capitulino    {
15537572150cSGerd Hoffmann        .name       = "set_password",
1554675fd3c9SStefan Reiter        .args_type  = "protocol:s,password:s,display:-ds,connected:s?",
1555675fd3c9SStefan Reiter        .params     = "protocol password [-d display] [action-if-connected]",
15567572150cSGerd Hoffmann        .help       = "set spice/vnc password",
15572b9e3576SMarc-André Lureau        .cmd        = hmp_set_password,
15587572150cSGerd Hoffmann    },
15597572150cSGerd Hoffmann
1560a6b30bcaSPeter MaydellSRST
1561675fd3c9SStefan Reiter``set_password [ vnc | spice ] password [ -d display ] [ action-if-connected ]``
1562675fd3c9SStefan Reiter  Change spice/vnc password.  *display* can be used with 'vnc' to specify
1563675fd3c9SStefan Reiter  which display to set the password on.  *action-if-connected* specifies
1564675fd3c9SStefan Reiter  what should happen in case a connection is established: *fail* makes
1565675fd3c9SStefan Reiter  the password change fail.  *disconnect* changes the password and
15668982552eSMarkus Armbruster  disconnects the client.  *keep* changes the password and keeps the
15678982552eSMarkus Armbruster  connection up.  *keep* is the default.
1568a6b30bcaSPeter MaydellERST
15697572150cSGerd Hoffmann
15707572150cSGerd Hoffmann    {
15717572150cSGerd Hoffmann        .name       = "expire_password",
1572675fd3c9SStefan Reiter        .args_type  = "protocol:s,time:s,display:-ds",
1573675fd3c9SStefan Reiter        .params     = "protocol time [-d display]",
15747572150cSGerd Hoffmann        .help       = "set spice/vnc password expire-time",
15752b9e3576SMarc-André Lureau        .cmd        = hmp_expire_password,
15767572150cSGerd Hoffmann    },
15777572150cSGerd Hoffmann
1578a6b30bcaSPeter MaydellSRST
1579675fd3c9SStefan Reiter``expire_password [ vnc | spice ] expire-time [ -d display ]``
1580675fd3c9SStefan Reiter  Specify when a password for spice/vnc becomes invalid.
1581675fd3c9SStefan Reiter  *display* behaves the same as in ``set_password``.
1582675fd3c9SStefan Reiter  *expire-time* accepts:
1583a6b30bcaSPeter Maydell
1584a6b30bcaSPeter Maydell  ``now``
1585a6b30bcaSPeter Maydell    Invalidate password instantly.
1586a6b30bcaSPeter Maydell  ``never``
1587a6b30bcaSPeter Maydell    Password stays valid forever.
1588a6b30bcaSPeter Maydell  ``+``\ *nsec*
1589a6b30bcaSPeter Maydell    Password stays valid for *nsec* seconds starting now.
1590a6b30bcaSPeter Maydell  *nsec*
1591a6b30bcaSPeter Maydell    Password is invalidated at the given time.  *nsec* are the seconds
1592a6b30bcaSPeter Maydell    passed since 1970, i.e. unix epoch.
1593a6b30bcaSPeter Maydell
1594a6b30bcaSPeter MaydellERST
15957572150cSGerd Hoffmann
159646920825SGerd Hoffmann    {
159746920825SGerd Hoffmann        .name       = "chardev-add",
159846920825SGerd Hoffmann        .args_type  = "args:s",
159946920825SGerd Hoffmann        .params     = "args",
160046920825SGerd Hoffmann        .help       = "add chardev",
16012b9e3576SMarc-André Lureau        .cmd        = hmp_chardev_add,
160213e315daSHani Benhabiles        .command_completion = chardev_add_completion,
160346920825SGerd Hoffmann    },
160446920825SGerd Hoffmann
1605a6b30bcaSPeter MaydellSRST
1606a6b30bcaSPeter Maydell``chardev-add`` *args*
1607a6b30bcaSPeter Maydell  chardev-add accepts the same parameters as the -chardev command line switch.
1608a6b30bcaSPeter MaydellERST
160975b60160SAnton Nefedov
161075b60160SAnton Nefedov    {
161175b60160SAnton Nefedov        .name       = "chardev-change",
161275b60160SAnton Nefedov        .args_type  = "id:s,args:s",
161375b60160SAnton Nefedov        .params     = "id args",
161475b60160SAnton Nefedov        .help       = "change chardev",
161575b60160SAnton Nefedov        .cmd        = hmp_chardev_change,
161675b60160SAnton Nefedov    },
161775b60160SAnton Nefedov
1618a6b30bcaSPeter MaydellSRST
1619a6b30bcaSPeter Maydell``chardev-change`` *args*
1620a6b30bcaSPeter Maydell  chardev-change accepts existing chardev *id* and then the same arguments
1621a6b30bcaSPeter Maydell  as the -chardev command line switch (except for "id").
1622a6b30bcaSPeter MaydellERST
162346920825SGerd Hoffmann
162446920825SGerd Hoffmann    {
162546920825SGerd Hoffmann        .name       = "chardev-remove",
162646920825SGerd Hoffmann        .args_type  = "id:s",
162746920825SGerd Hoffmann        .params     = "id",
162846920825SGerd Hoffmann        .help       = "remove chardev",
16292b9e3576SMarc-André Lureau        .cmd        = hmp_chardev_remove,
16306297d9a2SHani Benhabiles        .command_completion = chardev_remove_completion,
163146920825SGerd Hoffmann    },
163246920825SGerd Hoffmann
1633a6b30bcaSPeter MaydellSRST
1634a6b30bcaSPeter Maydell``chardev-remove`` *id*
1635a6b30bcaSPeter Maydell  Removes the chardev *id*.
1636a6b30bcaSPeter MaydellERST
1637f1088908SGerd Hoffmann
1638f1088908SGerd Hoffmann    {
1639bd1d5ad9SStefan Fritsch        .name       = "chardev-send-break",
1640bd1d5ad9SStefan Fritsch        .args_type  = "id:s",
1641bd1d5ad9SStefan Fritsch        .params     = "id",
1642bd1d5ad9SStefan Fritsch        .help       = "send a break on chardev",
1643bd1d5ad9SStefan Fritsch        .cmd        = hmp_chardev_send_break,
1644bd1d5ad9SStefan Fritsch        .command_completion = chardev_remove_completion,
1645bd1d5ad9SStefan Fritsch    },
1646bd1d5ad9SStefan Fritsch
1647a6b30bcaSPeter MaydellSRST
1648a6b30bcaSPeter Maydell``chardev-send-break`` *id*
1649a6b30bcaSPeter Maydell  Send a break on the chardev *id*.
1650a6b30bcaSPeter MaydellERST
1651bd1d5ad9SStefan Fritsch
1652bd1d5ad9SStefan Fritsch    {
1653587da2c3SKevin Wolf        .name       = "qemu-io",
165489b6fc45SKevin Wolf        .args_type  = "qdev:-d,device:B,command:s",
165589b6fc45SKevin Wolf        .params     = "[-d] [device] \"[command]\"",
165689b6fc45SKevin Wolf        .help       = "run a qemu-io command on a block device\n\t\t\t"
165789b6fc45SKevin Wolf                      "-d: [device] is a device ID rather than a "
165889b6fc45SKevin Wolf                      "drive ID or node name",
16592b9e3576SMarc-André Lureau        .cmd        = hmp_qemu_io,
1660587da2c3SKevin Wolf    },
1661587da2c3SKevin Wolf
1662a6b30bcaSPeter MaydellSRST
1663a6b30bcaSPeter Maydell``qemu-io`` *device* *command*
1664a6b30bcaSPeter Maydell  Executes a qemu-io command on the given block device.
1665a6b30bcaSPeter MaydellERST
1666587da2c3SKevin Wolf
1667587da2c3SKevin Wolf    {
166889d7fa9eSAndreas Färber        .name       = "qom-list",
166989d7fa9eSAndreas Färber        .args_type  = "path:s?",
167089d7fa9eSAndreas Färber        .params     = "path",
167189d7fa9eSAndreas Färber        .help       = "list QOM properties",
16722b9e3576SMarc-André Lureau        .cmd        = hmp_qom_list,
16738c7c7ecbSDr. David Alan Gilbert        .flags      = "p",
167489d7fa9eSAndreas Färber    },
167589d7fa9eSAndreas Färber
1676a6b30bcaSPeter MaydellSRST
1677a6b30bcaSPeter Maydell``qom-list`` [*path*]
1678a6b30bcaSPeter Maydell  Print QOM properties of object at location *path*
1679a6b30bcaSPeter MaydellERST
168089d7fa9eSAndreas Färber
168189d7fa9eSAndreas Färber    {
168289cf4fe3SDr. David Alan Gilbert        .name       = "qom-get",
168389cf4fe3SDr. David Alan Gilbert        .args_type  = "path:s,property:s",
168489cf4fe3SDr. David Alan Gilbert        .params     = "path property",
168589cf4fe3SDr. David Alan Gilbert        .help       = "print QOM property",
168689cf4fe3SDr. David Alan Gilbert        .cmd        = hmp_qom_get,
168789cf4fe3SDr. David Alan Gilbert        .flags      = "p",
168889cf4fe3SDr. David Alan Gilbert    },
168989cf4fe3SDr. David Alan Gilbert
169089cf4fe3SDr. David Alan GilbertSRST
169189cf4fe3SDr. David Alan Gilbert``qom-get`` *path* *property*
169289cf4fe3SDr. David Alan Gilbert  Print QOM property *property* of object at location *path*
169389cf4fe3SDr. David Alan GilbertERST
169489cf4fe3SDr. David Alan Gilbert
169589cf4fe3SDr. David Alan Gilbert    {
1696c0e6ee9eSAndreas Färber        .name       = "qom-set",
16972d9e3dd9SDavid Hildenbrand        .args_type  = "json:-j,path:s,property:s,value:S",
16982d9e3dd9SDavid Hildenbrand        .params     = "[-j] path property value",
16992d9e3dd9SDavid Hildenbrand        .help       = "set QOM property.\n\t\t\t"
17002d9e3dd9SDavid Hildenbrand                      "-j: the value is specified in json format.",
17012b9e3576SMarc-André Lureau        .cmd        = hmp_qom_set,
17028c7c7ecbSDr. David Alan Gilbert        .flags      = "p",
1703c0e6ee9eSAndreas Färber    },
1704c0e6ee9eSAndreas Färber
1705a6b30bcaSPeter MaydellSRST
1706a6b30bcaSPeter Maydell``qom-set`` *path* *property* *value*
1707a6b30bcaSPeter Maydell  Set QOM property *property* of object at location *path* to value *value*
1708a6b30bcaSPeter MaydellERST
1709c0e6ee9eSAndreas Färber
1710c0e6ee9eSAndreas Färber    {
1711e7510671SPavel Dovgalyuk        .name       = "replay_break",
1712ae49ce00SAlex Bennée        .args_type  = "icount:l",
1713e7510671SPavel Dovgalyuk        .params     = "icount",
1714e7510671SPavel Dovgalyuk        .help       = "set breakpoint at the specified instruction count",
1715e7510671SPavel Dovgalyuk        .cmd        = hmp_replay_break,
1716e7510671SPavel Dovgalyuk    },
1717e7510671SPavel Dovgalyuk
1718e7510671SPavel DovgalyukSRST
1719e7510671SPavel Dovgalyuk``replay_break`` *icount*
1720e7510671SPavel Dovgalyuk  Set replay breakpoint at instruction count *icount*.
1721e7510671SPavel Dovgalyuk  Execution stops when the specified instruction is reached.
1722e7510671SPavel Dovgalyuk  There can be at most one breakpoint. When breakpoint is set, any prior
1723e7510671SPavel Dovgalyuk  one is removed.  The breakpoint may be set only in replay mode and only
1724e7510671SPavel Dovgalyuk  "in the future", i.e. at instruction counts greater than the current one.
1725e7510671SPavel Dovgalyuk  The current instruction count can be observed with ``info replay``.
1726e7510671SPavel DovgalyukERST
1727e7510671SPavel Dovgalyuk
1728e7510671SPavel Dovgalyuk    {
1729e7510671SPavel Dovgalyuk        .name       = "replay_delete_break",
1730e7510671SPavel Dovgalyuk        .args_type  = "",
1731e7510671SPavel Dovgalyuk        .params     = "",
1732e7510671SPavel Dovgalyuk        .help       = "remove replay breakpoint",
1733e7510671SPavel Dovgalyuk        .cmd        = hmp_replay_delete_break,
1734e7510671SPavel Dovgalyuk    },
1735e7510671SPavel Dovgalyuk
1736e7510671SPavel DovgalyukSRST
1737e7510671SPavel Dovgalyuk``replay_delete_break``
1738e7510671SPavel Dovgalyuk  Remove replay breakpoint which was previously set with ``replay_break``.
1739e7510671SPavel Dovgalyuk  The command is ignored when there are no replay breakpoints.
1740e7510671SPavel DovgalyukERST
1741e7510671SPavel Dovgalyuk
1742e7510671SPavel Dovgalyuk    {
1743f6baed3dSPavel Dovgalyuk        .name       = "replay_seek",
1744ae49ce00SAlex Bennée        .args_type  = "icount:l",
1745f6baed3dSPavel Dovgalyuk        .params     = "icount",
1746f6baed3dSPavel Dovgalyuk        .help       = "replay execution to the specified instruction count",
1747f6baed3dSPavel Dovgalyuk        .cmd        = hmp_replay_seek,
1748f6baed3dSPavel Dovgalyuk    },
1749f6baed3dSPavel Dovgalyuk
1750f6baed3dSPavel DovgalyukSRST
1751f6baed3dSPavel Dovgalyuk``replay_seek`` *icount*
1752f6baed3dSPavel Dovgalyuk  Automatically proceed to the instruction count *icount*, when
1753f6baed3dSPavel Dovgalyuk  replaying the execution. The command automatically loads nearest
1754f6baed3dSPavel Dovgalyuk  snapshot and replays the execution to find the desired instruction.
1755f6baed3dSPavel Dovgalyuk  When there is no preceding snapshot or the execution is not replayed,
1756f6baed3dSPavel Dovgalyuk  then the command fails.
1757f6baed3dSPavel Dovgalyuk  *icount* for the reference may be observed with ``info replay`` command.
1758f6baed3dSPavel DovgalyukERST
1759f6baed3dSPavel Dovgalyuk
1760f6baed3dSPavel Dovgalyuk    {
1761a4a571d9SPeter Xu        .name       = "calc_dirty_rate",
1762826b8bc8SHyman Huang(黄勇)        .args_type  = "dirty_ring:-r,dirty_bitmap:-b,second:l,sample_pages_per_GB:l?",
1763826b8bc8SHyman Huang(黄勇)        .params     = "[-r] [-b] second [sample_pages_per_GB]",
1764826b8bc8SHyman Huang(黄勇)        .help       = "start a round of guest dirty rate measurement (using -r to"
1765826b8bc8SHyman Huang(黄勇)                      "\n\t\t\t specify dirty ring as the method of calculation and"
1766826b8bc8SHyman Huang(黄勇)                      "\n\t\t\t -b to specify dirty bitmap as method of calculation)",
1767a4a571d9SPeter Xu        .cmd        = hmp_calc_dirty_rate,
1768a4a571d9SPeter Xu    },
1769f3b2e38cSHyman Huang(黄勇)
1770f3b2e38cSHyman Huang(黄勇)SRST
177122269b04SDr. David Alan Gilbert``calc_dirty_rate`` *second*
177222269b04SDr. David Alan Gilbert  Start a round of dirty rate measurement with the period specified in *second*.
177322269b04SDr. David Alan Gilbert  The result of the dirty rate measurement may be observed with ``info
177422269b04SDr. David Alan Gilbert  dirty_rate`` command.
1775f3b2e38cSHyman Huang(黄勇)ERST
1776f3b2e38cSHyman Huang(黄勇)
1777f3b2e38cSHyman Huang(黄勇)    {
1778f3b2e38cSHyman Huang(黄勇)        .name       = "set_vcpu_dirty_limit",
1779f3b2e38cSHyman Huang(黄勇)        .args_type  = "dirty_rate:l,cpu_index:l?",
1780f3b2e38cSHyman Huang(黄勇)        .params     = "dirty_rate [cpu_index]",
1781f3b2e38cSHyman Huang(黄勇)        .help       = "set dirty page rate limit, use cpu_index to set limit"
1782f3b2e38cSHyman Huang(黄勇)                      "\n\t\t\t\t\t on a specified virtual cpu",
1783f3b2e38cSHyman Huang(黄勇)        .cmd        = hmp_set_vcpu_dirty_limit,
1784f3b2e38cSHyman Huang(黄勇)    },
1785f3b2e38cSHyman Huang(黄勇)
1786f3b2e38cSHyman Huang(黄勇)SRST
178722269b04SDr. David Alan Gilbert``set_vcpu_dirty_limit``
178822269b04SDr. David Alan Gilbert  Set dirty page rate limit on virtual CPU, the information about all the
1789f3b2e38cSHyman Huang(黄勇)  virtual CPU dirty limit status can be observed with ``info vcpu_dirty_limit``
1790f3b2e38cSHyman Huang(黄勇)  command.
1791f3b2e38cSHyman Huang(黄勇)ERST
1792f3b2e38cSHyman Huang(黄勇)
1793f3b2e38cSHyman Huang(黄勇)    {
1794f3b2e38cSHyman Huang(黄勇)        .name       = "cancel_vcpu_dirty_limit",
1795f3b2e38cSHyman Huang(黄勇)        .args_type  = "cpu_index:l?",
1796f3b2e38cSHyman Huang(黄勇)        .params     = "[cpu_index]",
1797f3b2e38cSHyman Huang(黄勇)        .help       = "cancel dirty page rate limit, use cpu_index to cancel"
1798f3b2e38cSHyman Huang(黄勇)                      "\n\t\t\t\t\t limit on a specified virtual cpu",
1799f3b2e38cSHyman Huang(黄勇)        .cmd        = hmp_cancel_vcpu_dirty_limit,
1800f3b2e38cSHyman Huang(黄勇)    },
180122269b04SDr. David Alan Gilbert
180222269b04SDr. David Alan GilbertSRST
180322269b04SDr. David Alan Gilbert``cancel_vcpu_dirty_limit``
180422269b04SDr. David Alan Gilbert  Cancel dirty page rate limit on virtual CPU, the information about all the
180522269b04SDr. David Alan Gilbert  virtual CPU dirty limit status can be observed with ``info vcpu_dirty_limit``
180622269b04SDr. David Alan Gilbert  command.
180722269b04SDr. David Alan GilbertERST
180822269b04SDr. David Alan Gilbert
180922269b04SDr. David Alan Gilbert    {
181022269b04SDr. David Alan Gilbert        .name       = "info",
181122269b04SDr. David Alan Gilbert        .args_type  = "item:s?",
181222269b04SDr. David Alan Gilbert        .params     = "[subcommand]",
181322269b04SDr. David Alan Gilbert        .help       = "show various information about the system state",
181422269b04SDr. David Alan Gilbert        .cmd        = hmp_info_help,
181522269b04SDr. David Alan Gilbert        .sub_table  = hmp_info_cmds,
181622269b04SDr. David Alan Gilbert        .flags      = "p",
181722269b04SDr. David Alan Gilbert    },
1818bf353ad5SDaniel Henrique Barboza
1819bf353ad5SDaniel Henrique Barboza#if defined(CONFIG_FDT)
1820bf353ad5SDaniel Henrique Barboza    {
1821bf353ad5SDaniel Henrique Barboza        .name       = "dumpdtb",
1822bf353ad5SDaniel Henrique Barboza        .args_type  = "filename:F",
1823bf353ad5SDaniel Henrique Barboza        .params     = "filename",
1824bf353ad5SDaniel Henrique Barboza        .help       = "dump the FDT in dtb format to 'filename'",
1825bf353ad5SDaniel Henrique Barboza        .cmd        = hmp_dumpdtb,
1826bf353ad5SDaniel Henrique Barboza    },
1827bf353ad5SDaniel Henrique Barboza
1828bf353ad5SDaniel Henrique BarbozaSRST
1829bf353ad5SDaniel Henrique Barboza``dumpdtb`` *filename*
1830bf353ad5SDaniel Henrique Barboza  Dump the FDT in dtb format to *filename*.
1831bf353ad5SDaniel Henrique BarbozaERST
1832bf353ad5SDaniel Henrique Barboza#endif
1833507cb64dSJoao Martins
1834507cb64dSJoao Martins#if defined(CONFIG_XEN_EMU)
1835507cb64dSJoao Martins    {
1836507cb64dSJoao Martins        .name       = "xen-event-inject",
1837507cb64dSJoao Martins        .args_type  = "port:i",
1838507cb64dSJoao Martins        .params     = "port",
1839507cb64dSJoao Martins        .help       = "inject event channel",
1840507cb64dSJoao Martins        .cmd        = hmp_xen_event_inject,
1841507cb64dSJoao Martins    },
1842507cb64dSJoao Martins
1843507cb64dSJoao MartinsSRST
1844507cb64dSJoao Martins``xen-event-inject`` *port*
1845507cb64dSJoao Martins  Notify guest via event channel on port *port*.
1846507cb64dSJoao MartinsERST
1847507cb64dSJoao Martins
1848507cb64dSJoao Martins
1849507cb64dSJoao Martins    {
1850507cb64dSJoao Martins        .name       = "xen-event-list",
1851507cb64dSJoao Martins        .args_type  = "",
1852507cb64dSJoao Martins        .params     = "",
1853507cb64dSJoao Martins        .help       = "list event channel state",
1854507cb64dSJoao Martins        .cmd        = hmp_xen_event_list,
1855507cb64dSJoao Martins    },
1856507cb64dSJoao Martins
1857507cb64dSJoao MartinsSRST
1858507cb64dSJoao Martins``xen-event-list``
1859507cb64dSJoao Martins  List event channels in the guest
1860507cb64dSJoao MartinsERST
1861507cb64dSJoao Martins#endif
1862