xref: /qemu/hmp-commands.hx (revision 50e9a629c6c92e73260cd3d7c2e3f5bfd84e47e2)
12313086aSBlue SwirlHXCOMM Use DEFHEADING() to define headings in both help text and texi
22313086aSBlue SwirlHXCOMM Text between STEXI and ETEXI are copied to texi version and
32313086aSBlue SwirlHXCOMM discarded from C version
42313086aSBlue SwirlHXCOMM DEF(command, args, callback, arg_string, help) is used to construct
52313086aSBlue SwirlHXCOMM monitor commands
62313086aSBlue SwirlHXCOMM HXCOMM can be used for comments, discarded from both texi and C
72313086aSBlue Swirl
82313086aSBlue SwirlSTEXI
92313086aSBlue Swirl@table @option
102313086aSBlue SwirlETEXI
112313086aSBlue Swirl
12d7f9b689SLuiz Capitulino    {
13d7f9b689SLuiz Capitulino        .name       = "help|?",
14129be006SWenchao Xia        .args_type  = "name:S?",
15d7f9b689SLuiz Capitulino        .params     = "[cmd]",
16d7f9b689SLuiz Capitulino        .help       = "show the help",
17af4ce882SLuiz Capitulino        .mhandler.cmd = do_help_cmd,
18d7f9b689SLuiz Capitulino    },
19d7f9b689SLuiz Capitulino
202313086aSBlue SwirlSTEXI
212313086aSBlue Swirl@item help or ? [@var{cmd}]
2270fcbbe7SStefan Weil@findex help
232313086aSBlue SwirlShow the help for all commands or just for command @var{cmd}.
242313086aSBlue SwirlETEXI
252313086aSBlue Swirl
26d7f9b689SLuiz Capitulino    {
27d7f9b689SLuiz Capitulino        .name       = "commit",
28d7f9b689SLuiz Capitulino        .args_type  = "device:B",
29d7f9b689SLuiz Capitulino        .params     = "device|all",
30d7f9b689SLuiz Capitulino        .help       = "commit changes to the disk images (if -snapshot is used) or backing files",
313e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_commit,
32d7f9b689SLuiz Capitulino    },
33d7f9b689SLuiz Capitulino
342313086aSBlue SwirlSTEXI
352313086aSBlue Swirl@item commit
3670fcbbe7SStefan Weil@findex commit
372313086aSBlue SwirlCommit changes to the disk images (if -snapshot is used) or backing files.
3837222900SJeff CodyIf the backing file is smaller than the snapshot, then the backing file will be
3937222900SJeff Codyresized to be the same size as the snapshot.  If the snapshot is smaller than
4037222900SJeff Codythe backing file, the backing file will not be truncated.  If you want the
4137222900SJeff Codybacking file to match the size of the smaller snapshot, you can safely truncate
4237222900SJeff Codyit yourself once the commit operation successfully completes.
432313086aSBlue SwirlETEXI
442313086aSBlue Swirl
45d7f9b689SLuiz Capitulino    {
46d7f9b689SLuiz Capitulino        .name       = "q|quit",
47d7f9b689SLuiz Capitulino        .args_type  = "",
48d7f9b689SLuiz Capitulino        .params     = "",
49d7f9b689SLuiz Capitulino        .help       = "quit the emulator",
507a7f325eSLuiz Capitulino        .mhandler.cmd = hmp_quit,
51d7f9b689SLuiz Capitulino    },
52d7f9b689SLuiz Capitulino
532313086aSBlue SwirlSTEXI
542313086aSBlue Swirl@item q or quit
5570fcbbe7SStefan Weil@findex quit
562313086aSBlue SwirlQuit the emulator.
572313086aSBlue SwirlETEXI
582313086aSBlue Swirl
59d7f9b689SLuiz Capitulino    {
606d4a2b3aSChristoph Hellwig        .name       = "block_resize",
616d4a2b3aSChristoph Hellwig        .args_type  = "device:B,size:o",
626d4a2b3aSChristoph Hellwig        .params     = "device size",
636d4a2b3aSChristoph Hellwig        .help       = "resize a block image",
645e7caacbSLuiz Capitulino        .mhandler.cmd = hmp_block_resize,
656d4a2b3aSChristoph Hellwig    },
666d4a2b3aSChristoph Hellwig
676d4a2b3aSChristoph HellwigSTEXI
686d4a2b3aSChristoph Hellwig@item block_resize
696d4a2b3aSChristoph Hellwig@findex block_resize
706d4a2b3aSChristoph HellwigResize a block image while a guest is running.  Usually requires guest
716d4a2b3aSChristoph Hellwigaction to see the updated size.  Resize to a lower size is supported,
726d4a2b3aSChristoph Hellwigbut should be used with extreme caution.  Note that this command only
736d4a2b3aSChristoph Hellwigresizes image files, it can not resize block devices like LVM volumes.
746d4a2b3aSChristoph HellwigETEXI
756d4a2b3aSChristoph Hellwig
7612bd451fSStefan Hajnoczi    {
7712bd451fSStefan Hajnoczi        .name       = "block_stream",
78c83c66c3SStefan Hajnoczi        .args_type  = "device:B,speed:o?,base:s?",
79c83c66c3SStefan Hajnoczi        .params     = "device [speed [base]]",
8012bd451fSStefan Hajnoczi        .help       = "copy data from a backing file into a block device",
8112bd451fSStefan Hajnoczi        .mhandler.cmd = hmp_block_stream,
8212bd451fSStefan Hajnoczi    },
8312bd451fSStefan Hajnoczi
8412bd451fSStefan HajnocziSTEXI
8512bd451fSStefan Hajnoczi@item block_stream
8612bd451fSStefan Hajnoczi@findex block_stream
8712bd451fSStefan HajnocziCopy data from a backing file into a block device.
8812bd451fSStefan HajnocziETEXI
896d4a2b3aSChristoph Hellwig
906d4a2b3aSChristoph Hellwig    {
912d47c6e9SStefan Hajnoczi        .name       = "block_job_set_speed",
92882ec7ceSStefan Hajnoczi        .args_type  = "device:B,speed:o",
93882ec7ceSStefan Hajnoczi        .params     = "device speed",
942d47c6e9SStefan Hajnoczi        .help       = "set maximum speed for a background block operation",
952d47c6e9SStefan Hajnoczi        .mhandler.cmd = hmp_block_job_set_speed,
962d47c6e9SStefan Hajnoczi    },
972d47c6e9SStefan Hajnoczi
982d47c6e9SStefan HajnocziSTEXI
994451b799SPaolo Bonzini@item block_job_set_speed
1004451b799SPaolo Bonzini@findex block_job_set_speed
1012d47c6e9SStefan HajnocziSet maximum speed for a background block operation.
1022d47c6e9SStefan HajnocziETEXI
1032d47c6e9SStefan Hajnoczi
1042d47c6e9SStefan Hajnoczi    {
105370521a1SStefan Hajnoczi        .name       = "block_job_cancel",
1066e37fb81SPaolo Bonzini        .args_type  = "force:-f,device:B",
1076e37fb81SPaolo Bonzini        .params     = "[-f] device",
1086e37fb81SPaolo Bonzini        .help       = "stop an active background block operation (use -f"
1096e37fb81SPaolo Bonzini                      "\n\t\t\t if the operation is currently paused)",
110370521a1SStefan Hajnoczi        .mhandler.cmd = hmp_block_job_cancel,
111370521a1SStefan Hajnoczi    },
112370521a1SStefan Hajnoczi
113370521a1SStefan HajnocziSTEXI
114370521a1SStefan Hajnoczi@item block_job_cancel
115370521a1SStefan Hajnoczi@findex block_job_cancel
116aeae883bSPaolo BonziniStop an active background block operation (streaming, mirroring).
117aeae883bSPaolo BonziniETEXI
118aeae883bSPaolo Bonzini
119aeae883bSPaolo Bonzini    {
120aeae883bSPaolo Bonzini        .name       = "block_job_complete",
121aeae883bSPaolo Bonzini        .args_type  = "device:B",
122aeae883bSPaolo Bonzini        .params     = "device",
123aeae883bSPaolo Bonzini        .help       = "stop an active background block operation",
124aeae883bSPaolo Bonzini        .mhandler.cmd = hmp_block_job_complete,
125aeae883bSPaolo Bonzini    },
126aeae883bSPaolo Bonzini
127aeae883bSPaolo BonziniSTEXI
128aeae883bSPaolo Bonzini@item block_job_complete
129aeae883bSPaolo Bonzini@findex block_job_complete
130aeae883bSPaolo BonziniManually trigger completion of an active background block operation.
131aeae883bSPaolo BonziniFor mirroring, this will switch the device to the destination path.
132370521a1SStefan HajnocziETEXI
133370521a1SStefan Hajnoczi
134370521a1SStefan Hajnoczi    {
1356e37fb81SPaolo Bonzini        .name       = "block_job_pause",
1366e37fb81SPaolo Bonzini        .args_type  = "device:B",
1376e37fb81SPaolo Bonzini        .params     = "device",
1386e37fb81SPaolo Bonzini        .help       = "pause an active background block operation",
1396e37fb81SPaolo Bonzini        .mhandler.cmd = hmp_block_job_pause,
1406e37fb81SPaolo Bonzini    },
1416e37fb81SPaolo Bonzini
1426e37fb81SPaolo BonziniSTEXI
1436e37fb81SPaolo Bonzini@item block_job_pause
1446e37fb81SPaolo Bonzini@findex block_job_pause
1456e37fb81SPaolo BonziniPause an active block streaming operation.
1466e37fb81SPaolo BonziniETEXI
1476e37fb81SPaolo Bonzini
1486e37fb81SPaolo Bonzini    {
1496e37fb81SPaolo Bonzini        .name       = "block_job_resume",
1506e37fb81SPaolo Bonzini        .args_type  = "device:B",
1516e37fb81SPaolo Bonzini        .params     = "device",
1526e37fb81SPaolo Bonzini        .help       = "resume a paused background block operation",
1536e37fb81SPaolo Bonzini        .mhandler.cmd = hmp_block_job_resume,
1546e37fb81SPaolo Bonzini    },
1556e37fb81SPaolo Bonzini
1566e37fb81SPaolo BonziniSTEXI
1576e37fb81SPaolo Bonzini@item block_job_resume
1586e37fb81SPaolo Bonzini@findex block_job_resume
1596e37fb81SPaolo BonziniResume a paused block streaming operation.
1606e37fb81SPaolo BonziniETEXI
1616e37fb81SPaolo Bonzini
1626e37fb81SPaolo Bonzini    {
163d7f9b689SLuiz Capitulino        .name       = "eject",
16478d714e0SLuiz Capitulino        .args_type  = "force:-f,device:B",
165d7f9b689SLuiz Capitulino        .params     = "[-f] device",
166d7f9b689SLuiz Capitulino        .help       = "eject a removable medium (use -f to force it)",
167c245b6a3SLuiz Capitulino        .mhandler.cmd = hmp_eject,
168d7f9b689SLuiz Capitulino    },
169d7f9b689SLuiz Capitulino
1702313086aSBlue SwirlSTEXI
1712313086aSBlue Swirl@item eject [-f] @var{device}
17270fcbbe7SStefan Weil@findex eject
1732313086aSBlue SwirlEject a removable medium (use -f to force it).
1742313086aSBlue SwirlETEXI
1752313086aSBlue Swirl
176d7f9b689SLuiz Capitulino    {
1779063f814SRyan Harper        .name       = "drive_del",
178f7bdc41aSHani Benhabiles        .args_type  = "id:B",
1799063f814SRyan Harper        .params     = "device",
1809063f814SRyan Harper        .help       = "remove host block device",
1819063f814SRyan Harper        .user_print = monitor_user_noop,
1823e5a50d6SMarkus Armbruster        .mhandler.cmd_new = hmp_drive_del,
1839063f814SRyan Harper    },
1849063f814SRyan Harper
1859063f814SRyan HarperSTEXI
1869063f814SRyan Harper@item drive_del @var{device}
1879063f814SRyan Harper@findex drive_del
1889063f814SRyan HarperRemove host block device.  The result is that guest generated IO is no longer
1899063f814SRyan Harpersubmitted against the host device underlying the disk.  Once a drive has
1909063f814SRyan Harperbeen deleted, the QEMU Block layer returns -EIO which results in IO
1919063f814SRyan Harpererrors in the guest for applications that are reading/writing to the device.
192293c51a6SStefan HajnocziThese errors are always reported to the guest, regardless of the drive's error
193293c51a6SStefan Hajnocziactions (drive options rerror, werror).
1949063f814SRyan HarperETEXI
1959063f814SRyan Harper
1969063f814SRyan Harper    {
197d7f9b689SLuiz Capitulino        .name       = "change",
198d7f9b689SLuiz Capitulino        .args_type  = "device:B,target:F,arg:s?",
199d7f9b689SLuiz Capitulino        .params     = "device filename [format]",
200d7f9b689SLuiz Capitulino        .help       = "change a removable medium, optional format",
201333a96ecSLuiz Capitulino        .mhandler.cmd = hmp_change,
202d7f9b689SLuiz Capitulino    },
203d7f9b689SLuiz Capitulino
2042313086aSBlue SwirlSTEXI
2052313086aSBlue Swirl@item change @var{device} @var{setting}
20670fcbbe7SStefan Weil@findex change
2072313086aSBlue SwirlChange the configuration of a device.
2082313086aSBlue Swirl
2092313086aSBlue Swirl@table @option
2102313086aSBlue Swirl@item change @var{diskdevice} @var{filename} [@var{format}]
2112313086aSBlue SwirlChange the medium for a removable disk device to point to @var{filename}. eg
2122313086aSBlue Swirl
2132313086aSBlue Swirl@example
2142313086aSBlue Swirl(qemu) change ide1-cd0 /path/to/some.iso
2152313086aSBlue Swirl@end example
2162313086aSBlue Swirl
2172313086aSBlue Swirl@var{format} is optional.
2182313086aSBlue Swirl
2192313086aSBlue Swirl@item change vnc @var{display},@var{options}
2202313086aSBlue SwirlChange the configuration of the VNC server. The valid syntax for @var{display}
2212313086aSBlue Swirland @var{options} are described at @ref{sec_invocation}. eg
2222313086aSBlue Swirl
2232313086aSBlue Swirl@example
2242313086aSBlue Swirl(qemu) change vnc localhost:1
2252313086aSBlue Swirl@end example
2262313086aSBlue Swirl
2272313086aSBlue Swirl@item change vnc password [@var{password}]
2282313086aSBlue Swirl
2292313086aSBlue SwirlChange the password associated with the VNC server. If the new password is not
2302313086aSBlue Swirlsupplied, the monitor will prompt for it to be entered. VNC passwords are only
2312313086aSBlue Swirlsignificant up to 8 letters. eg
2322313086aSBlue Swirl
2332313086aSBlue Swirl@example
2342313086aSBlue Swirl(qemu) change vnc password
2352313086aSBlue SwirlPassword: ********
2362313086aSBlue Swirl@end example
2372313086aSBlue Swirl
2382313086aSBlue Swirl@end table
2392313086aSBlue SwirlETEXI
2402313086aSBlue Swirl
241d7f9b689SLuiz Capitulino    {
242d7f9b689SLuiz Capitulino        .name       = "screendump",
243d7f9b689SLuiz Capitulino        .args_type  = "filename:F",
244d7f9b689SLuiz Capitulino        .params     = "filename",
245d7f9b689SLuiz Capitulino        .help       = "save screen into PPM image 'filename'",
2463e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_screendump,
247d7f9b689SLuiz Capitulino    },
248d7f9b689SLuiz Capitulino
2492313086aSBlue SwirlSTEXI
2502313086aSBlue Swirl@item screendump @var{filename}
25170fcbbe7SStefan Weil@findex screendump
2522313086aSBlue SwirlSave screen into PPM image @var{filename}.
2532313086aSBlue SwirlETEXI
2542313086aSBlue Swirl
255d7f9b689SLuiz Capitulino    {
256d7f9b689SLuiz Capitulino        .name       = "logfile",
257d7f9b689SLuiz Capitulino        .args_type  = "filename:F",
258d7f9b689SLuiz Capitulino        .params     = "filename",
259d7f9b689SLuiz Capitulino        .help       = "output logs to 'filename'",
2603e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_logfile,
261d7f9b689SLuiz Capitulino    },
262d7f9b689SLuiz Capitulino
2632313086aSBlue SwirlSTEXI
2642313086aSBlue Swirl@item logfile @var{filename}
26570fcbbe7SStefan Weil@findex logfile
2662313086aSBlue SwirlOutput logs to @var{filename}.
2672313086aSBlue SwirlETEXI
2682313086aSBlue Swirl
26922890ab5SPrerna Saxena    {
27022890ab5SPrerna Saxena        .name       = "trace-event",
27122890ab5SPrerna Saxena        .args_type  = "name:s,option:b",
27222890ab5SPrerna Saxena        .params     = "name on|off",
27322890ab5SPrerna Saxena        .help       = "changes status of a specific trace event",
2743e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_trace_event,
27522890ab5SPrerna Saxena    },
27622890ab5SPrerna Saxena
27722890ab5SPrerna SaxenaSTEXI
27822890ab5SPrerna Saxena@item trace-event
27922890ab5SPrerna Saxena@findex trace-event
28022890ab5SPrerna Saxenachanges status of a trace event
28122890ab5SPrerna SaxenaETEXI
282c5ceb523SStefan Hajnoczi
283c45a8168SMichael Roth#if defined(CONFIG_TRACE_SIMPLE)
284c5ceb523SStefan Hajnoczi    {
285c5ceb523SStefan Hajnoczi        .name       = "trace-file",
286c5ceb523SStefan Hajnoczi        .args_type  = "op:s?,arg:F?",
287c5ceb523SStefan Hajnoczi        .params     = "on|off|flush|set [arg]",
288c5ceb523SStefan Hajnoczi        .help       = "open, close, or flush trace file, or set a new file name",
2893e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_trace_file,
290c5ceb523SStefan Hajnoczi    },
291c5ceb523SStefan Hajnoczi
292c5ceb523SStefan HajnocziSTEXI
293c5ceb523SStefan Hajnoczi@item trace-file on|off|flush
294c5ceb523SStefan Hajnoczi@findex trace-file
295c5ceb523SStefan HajnocziOpen, close, or flush the trace file.  If no argument is given, the status of the trace file is displayed.
296c5ceb523SStefan HajnocziETEXI
29722890ab5SPrerna Saxena#endif
29822890ab5SPrerna Saxena
299d7f9b689SLuiz Capitulino    {
300d7f9b689SLuiz Capitulino        .name       = "log",
301d7f9b689SLuiz Capitulino        .args_type  = "items:s",
302d7f9b689SLuiz Capitulino        .params     = "item1[,...]",
303989b697dSPeter Maydell        .help       = "activate logging of the specified items",
3043e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_log,
305d7f9b689SLuiz Capitulino    },
306d7f9b689SLuiz Capitulino
3072313086aSBlue SwirlSTEXI
3082313086aSBlue Swirl@item log @var{item1}[,...]
30970fcbbe7SStefan Weil@findex log
310989b697dSPeter MaydellActivate logging of the specified items.
3112313086aSBlue SwirlETEXI
3122313086aSBlue Swirl
313d7f9b689SLuiz Capitulino    {
314d7f9b689SLuiz Capitulino        .name       = "savevm",
315d7f9b689SLuiz Capitulino        .args_type  = "name:s?",
316d7f9b689SLuiz Capitulino        .params     = "[tag|id]",
317d7f9b689SLuiz Capitulino        .help       = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
3183e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_savevm,
319d7f9b689SLuiz Capitulino    },
320d7f9b689SLuiz Capitulino
3212313086aSBlue SwirlSTEXI
3222313086aSBlue Swirl@item savevm [@var{tag}|@var{id}]
32370fcbbe7SStefan Weil@findex savevm
3242313086aSBlue SwirlCreate a snapshot of the whole virtual machine. If @var{tag} is
3252313086aSBlue Swirlprovided, it is used as human readable identifier. If there is already
3262313086aSBlue Swirla snapshot with the same tag or ID, it is replaced. More info at
3272313086aSBlue Swirl@ref{vm_snapshots}.
3282313086aSBlue SwirlETEXI
3292313086aSBlue Swirl
330d7f9b689SLuiz Capitulino    {
331d7f9b689SLuiz Capitulino        .name       = "loadvm",
332d7f9b689SLuiz Capitulino        .args_type  = "name:s",
333d7f9b689SLuiz Capitulino        .params     = "tag|id",
334d7f9b689SLuiz Capitulino        .help       = "restore a VM snapshot from its tag or id",
3353e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_loadvm,
336b21631f3SHani Benhabiles        .command_completion = loadvm_completion,
337d7f9b689SLuiz Capitulino    },
338d7f9b689SLuiz Capitulino
3392313086aSBlue SwirlSTEXI
3402313086aSBlue Swirl@item loadvm @var{tag}|@var{id}
34170fcbbe7SStefan Weil@findex loadvm
3422313086aSBlue SwirlSet the whole virtual machine to the snapshot identified by the tag
3432313086aSBlue Swirl@var{tag} or the unique snapshot ID @var{id}.
3442313086aSBlue SwirlETEXI
3452313086aSBlue Swirl
346d7f9b689SLuiz Capitulino    {
347d7f9b689SLuiz Capitulino        .name       = "delvm",
348d7f9b689SLuiz Capitulino        .args_type  = "name:s",
349d7f9b689SLuiz Capitulino        .params     = "tag|id",
350d7f9b689SLuiz Capitulino        .help       = "delete a VM snapshot from its tag or id",
3513e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_delvm,
352b21631f3SHani Benhabiles        .command_completion = delvm_completion,
353d7f9b689SLuiz Capitulino    },
354d7f9b689SLuiz Capitulino
3552313086aSBlue SwirlSTEXI
3562313086aSBlue Swirl@item delvm @var{tag}|@var{id}
35770fcbbe7SStefan Weil@findex delvm
3582313086aSBlue SwirlDelete the snapshot identified by @var{tag} or @var{id}.
3592313086aSBlue SwirlETEXI
3602313086aSBlue Swirl
361d7f9b689SLuiz Capitulino    {
362d7f9b689SLuiz Capitulino        .name       = "singlestep",
363d7f9b689SLuiz Capitulino        .args_type  = "option:s?",
364d7f9b689SLuiz Capitulino        .params     = "[on|off]",
365d7f9b689SLuiz Capitulino        .help       = "run emulation in singlestep mode or switch to normal mode",
3663e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_singlestep,
367d7f9b689SLuiz Capitulino    },
368d7f9b689SLuiz Capitulino
3692313086aSBlue SwirlSTEXI
3702313086aSBlue Swirl@item singlestep [off]
37170fcbbe7SStefan Weil@findex singlestep
3722313086aSBlue SwirlRun the emulation in single step mode.
3732313086aSBlue SwirlIf called with option off, the emulation returns to normal mode.
3742313086aSBlue SwirlETEXI
3752313086aSBlue Swirl
376d7f9b689SLuiz Capitulino    {
377d7f9b689SLuiz Capitulino        .name       = "stop",
378d7f9b689SLuiz Capitulino        .args_type  = "",
379d7f9b689SLuiz Capitulino        .params     = "",
380d7f9b689SLuiz Capitulino        .help       = "stop emulation",
3815f158f21SLuiz Capitulino        .mhandler.cmd = hmp_stop,
382d7f9b689SLuiz Capitulino    },
383d7f9b689SLuiz Capitulino
3842313086aSBlue SwirlSTEXI
3852313086aSBlue Swirl@item stop
38670fcbbe7SStefan Weil@findex stop
3872313086aSBlue SwirlStop emulation.
3882313086aSBlue SwirlETEXI
3892313086aSBlue Swirl
390d7f9b689SLuiz Capitulino    {
391d7f9b689SLuiz Capitulino        .name       = "c|cont",
392d7f9b689SLuiz Capitulino        .args_type  = "",
393d7f9b689SLuiz Capitulino        .params     = "",
394d7f9b689SLuiz Capitulino        .help       = "resume emulation",
395e42e818bSLuiz Capitulino        .mhandler.cmd = hmp_cont,
396d7f9b689SLuiz Capitulino    },
397d7f9b689SLuiz Capitulino
3982313086aSBlue SwirlSTEXI
3992313086aSBlue Swirl@item c or cont
40070fcbbe7SStefan Weil@findex cont
4012313086aSBlue SwirlResume emulation.
4022313086aSBlue SwirlETEXI
4032313086aSBlue Swirl
404d7f9b689SLuiz Capitulino    {
4059b9df25aSGerd Hoffmann        .name       = "system_wakeup",
4069b9df25aSGerd Hoffmann        .args_type  = "",
4079b9df25aSGerd Hoffmann        .params     = "",
4089b9df25aSGerd Hoffmann        .help       = "wakeup guest from suspend",
4099b9df25aSGerd Hoffmann        .mhandler.cmd = hmp_system_wakeup,
4109b9df25aSGerd Hoffmann    },
4119b9df25aSGerd Hoffmann
4129b9df25aSGerd HoffmannSTEXI
4139b9df25aSGerd Hoffmann@item system_wakeup
4149b9df25aSGerd Hoffmann@findex system_wakeup
4159b9df25aSGerd HoffmannWakeup guest from suspend.
4169b9df25aSGerd HoffmannETEXI
4179b9df25aSGerd Hoffmann
4189b9df25aSGerd Hoffmann    {
419d7f9b689SLuiz Capitulino        .name       = "gdbserver",
420d7f9b689SLuiz Capitulino        .args_type  = "device:s?",
421d7f9b689SLuiz Capitulino        .params     = "[device]",
422d7f9b689SLuiz Capitulino        .help       = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
4233e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_gdbserver,
424d7f9b689SLuiz Capitulino    },
425d7f9b689SLuiz Capitulino
4262313086aSBlue SwirlSTEXI
4272313086aSBlue Swirl@item gdbserver [@var{port}]
42870fcbbe7SStefan Weil@findex gdbserver
4292313086aSBlue SwirlStart gdbserver session (default @var{port}=1234)
4302313086aSBlue SwirlETEXI
4312313086aSBlue Swirl
432d7f9b689SLuiz Capitulino    {
433d7f9b689SLuiz Capitulino        .name       = "x",
434d7f9b689SLuiz Capitulino        .args_type  = "fmt:/,addr:l",
435d7f9b689SLuiz Capitulino        .params     = "/fmt addr",
436d7f9b689SLuiz Capitulino        .help       = "virtual memory dump starting at 'addr'",
4373e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_memory_dump,
438d7f9b689SLuiz Capitulino    },
439d7f9b689SLuiz Capitulino
4402313086aSBlue SwirlSTEXI
4412313086aSBlue Swirl@item x/fmt @var{addr}
44270fcbbe7SStefan Weil@findex x
4432313086aSBlue SwirlVirtual memory dump starting at @var{addr}.
4442313086aSBlue SwirlETEXI
4452313086aSBlue Swirl
446d7f9b689SLuiz Capitulino    {
447d7f9b689SLuiz Capitulino        .name       = "xp",
448d7f9b689SLuiz Capitulino        .args_type  = "fmt:/,addr:l",
449d7f9b689SLuiz Capitulino        .params     = "/fmt addr",
450d7f9b689SLuiz Capitulino        .help       = "physical memory dump starting at 'addr'",
4513e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_physical_memory_dump,
452d7f9b689SLuiz Capitulino    },
453d7f9b689SLuiz Capitulino
4542313086aSBlue SwirlSTEXI
4552313086aSBlue Swirl@item xp /@var{fmt} @var{addr}
45670fcbbe7SStefan Weil@findex xp
4572313086aSBlue SwirlPhysical memory dump starting at @var{addr}.
4582313086aSBlue Swirl
4592313086aSBlue Swirl@var{fmt} is a format which tells the command how to format the
4602313086aSBlue Swirldata. Its syntax is: @option{/@{count@}@{format@}@{size@}}
4612313086aSBlue Swirl
4622313086aSBlue Swirl@table @var
4632313086aSBlue Swirl@item count
4642313086aSBlue Swirlis the number of items to be dumped.
4652313086aSBlue Swirl
4662313086aSBlue Swirl@item format
4672313086aSBlue Swirlcan be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
4682313086aSBlue Swirlc (char) or i (asm instruction).
4692313086aSBlue Swirl
4702313086aSBlue Swirl@item size
4712313086aSBlue Swirlcan be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
4722313086aSBlue Swirl@code{h} or @code{w} can be specified with the @code{i} format to
4732313086aSBlue Swirlrespectively select 16 or 32 bit code instruction size.
4742313086aSBlue Swirl
4752313086aSBlue Swirl@end table
4762313086aSBlue Swirl
4772313086aSBlue SwirlExamples:
4782313086aSBlue Swirl@itemize
4792313086aSBlue Swirl@item
4802313086aSBlue SwirlDump 10 instructions at the current instruction pointer:
4812313086aSBlue Swirl@example
4822313086aSBlue Swirl(qemu) x/10i $eip
4832313086aSBlue Swirl0x90107063:  ret
4842313086aSBlue Swirl0x90107064:  sti
4852313086aSBlue Swirl0x90107065:  lea    0x0(%esi,1),%esi
4862313086aSBlue Swirl0x90107069:  lea    0x0(%edi,1),%edi
4872313086aSBlue Swirl0x90107070:  ret
4882313086aSBlue Swirl0x90107071:  jmp    0x90107080
4892313086aSBlue Swirl0x90107073:  nop
4902313086aSBlue Swirl0x90107074:  nop
4912313086aSBlue Swirl0x90107075:  nop
4922313086aSBlue Swirl0x90107076:  nop
4932313086aSBlue Swirl@end example
4942313086aSBlue Swirl
4952313086aSBlue Swirl@item
4962313086aSBlue SwirlDump 80 16 bit values at the start of the video memory.
4972313086aSBlue Swirl@smallexample
4982313086aSBlue Swirl(qemu) xp/80hx 0xb8000
4992313086aSBlue Swirl0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
5002313086aSBlue Swirl0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
5012313086aSBlue Swirl0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
5022313086aSBlue Swirl0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
5032313086aSBlue Swirl0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
5042313086aSBlue Swirl0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
5052313086aSBlue Swirl0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
5062313086aSBlue Swirl0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
5072313086aSBlue Swirl0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
5082313086aSBlue Swirl0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
5092313086aSBlue Swirl@end smallexample
5102313086aSBlue Swirl@end itemize
5112313086aSBlue SwirlETEXI
5122313086aSBlue Swirl
513d7f9b689SLuiz Capitulino    {
514d7f9b689SLuiz Capitulino        .name       = "p|print",
515d7f9b689SLuiz Capitulino        .args_type  = "fmt:/,val:l",
516d7f9b689SLuiz Capitulino        .params     = "/fmt expr",
517d7f9b689SLuiz Capitulino        .help       = "print expression value (use $reg for CPU register access)",
518af4ce882SLuiz Capitulino        .mhandler.cmd = do_print,
519d7f9b689SLuiz Capitulino    },
520d7f9b689SLuiz Capitulino
5212313086aSBlue SwirlSTEXI
5222313086aSBlue Swirl@item p or print/@var{fmt} @var{expr}
52370fcbbe7SStefan Weil@findex print
5242313086aSBlue SwirlPrint expression value. Only the @var{format} part of @var{fmt} is
5252313086aSBlue Swirlused.
5262313086aSBlue SwirlETEXI
5272313086aSBlue Swirl
528d7f9b689SLuiz Capitulino    {
529d7f9b689SLuiz Capitulino        .name       = "i",
530d7f9b689SLuiz Capitulino        .args_type  = "fmt:/,addr:i,index:i.",
531d7f9b689SLuiz Capitulino        .params     = "/fmt addr",
532d7f9b689SLuiz Capitulino        .help       = "I/O port read",
5333e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_ioport_read,
534d7f9b689SLuiz Capitulino    },
535d7f9b689SLuiz Capitulino
5362313086aSBlue SwirlSTEXI
537b76d799eSMarkus Armbruster@item i/@var{fmt} @var{addr} [.@var{index}]
538b76d799eSMarkus Armbruster@findex i
5392313086aSBlue SwirlRead I/O port.
5402313086aSBlue SwirlETEXI
5412313086aSBlue Swirl
542d7f9b689SLuiz Capitulino    {
543d7f9b689SLuiz Capitulino        .name       = "o",
544d7f9b689SLuiz Capitulino        .args_type  = "fmt:/,addr:i,val:i",
545d7f9b689SLuiz Capitulino        .params     = "/fmt addr value",
546d7f9b689SLuiz Capitulino        .help       = "I/O port write",
5473e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_ioport_write,
548d7f9b689SLuiz Capitulino    },
549d7f9b689SLuiz Capitulino
550f114784fSJan KiszkaSTEXI
551b76d799eSMarkus Armbruster@item o/@var{fmt} @var{addr} @var{val}
552b76d799eSMarkus Armbruster@findex o
553f114784fSJan KiszkaWrite to I/O port.
554f114784fSJan KiszkaETEXI
5552313086aSBlue Swirl
556d7f9b689SLuiz Capitulino    {
557d7f9b689SLuiz Capitulino        .name       = "sendkey",
5582ef20c15SAmos Kong        .args_type  = "keys:s,hold-time:i?",
559d7f9b689SLuiz Capitulino        .params     = "keys [hold_ms]",
560d7f9b689SLuiz Capitulino        .help       = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
5613e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_sendkey,
56229136cd8SHani Benhabiles        .command_completion = sendkey_completion,
563d7f9b689SLuiz Capitulino    },
564d7f9b689SLuiz Capitulino
5652313086aSBlue SwirlSTEXI
5662313086aSBlue Swirl@item sendkey @var{keys}
56770fcbbe7SStefan Weil@findex sendkey
568886cc706SAmos KongSend @var{keys} to the guest. @var{keys} could be the name of the
569886cc706SAmos Kongkey or the raw value in hexadecimal format. Use @code{-} to press
570886cc706SAmos Kongseveral keys simultaneously. Example:
5712313086aSBlue Swirl@example
5722313086aSBlue Swirlsendkey ctrl-alt-f1
5732313086aSBlue Swirl@end example
5742313086aSBlue Swirl
5752313086aSBlue SwirlThis command is useful to send keys that your graphical user interface
5762313086aSBlue Swirlintercepts at low level, such as @code{ctrl-alt-f1} in X Window.
5772313086aSBlue SwirlETEXI
5782313086aSBlue Swirl
579d7f9b689SLuiz Capitulino    {
580d7f9b689SLuiz Capitulino        .name       = "system_reset",
581d7f9b689SLuiz Capitulino        .args_type  = "",
582d7f9b689SLuiz Capitulino        .params     = "",
583d7f9b689SLuiz Capitulino        .help       = "reset the system",
58438d22653SLuiz Capitulino        .mhandler.cmd = hmp_system_reset,
585d7f9b689SLuiz Capitulino    },
586d7f9b689SLuiz Capitulino
5872313086aSBlue SwirlSTEXI
5882313086aSBlue Swirl@item system_reset
58970fcbbe7SStefan Weil@findex system_reset
5902313086aSBlue SwirlReset the system.
5912313086aSBlue SwirlETEXI
5922313086aSBlue Swirl
593d7f9b689SLuiz Capitulino    {
594d7f9b689SLuiz Capitulino        .name       = "system_powerdown",
595d7f9b689SLuiz Capitulino        .args_type  = "",
596d7f9b689SLuiz Capitulino        .params     = "",
597d7f9b689SLuiz Capitulino        .help       = "send system power down event",
5985bc465e4SLuiz Capitulino        .mhandler.cmd = hmp_system_powerdown,
599d7f9b689SLuiz Capitulino    },
600d7f9b689SLuiz Capitulino
6012313086aSBlue SwirlSTEXI
6022313086aSBlue Swirl@item system_powerdown
60370fcbbe7SStefan Weil@findex system_powerdown
6042313086aSBlue SwirlPower down the system (if supported).
6052313086aSBlue SwirlETEXI
6062313086aSBlue Swirl
607d7f9b689SLuiz Capitulino    {
608d7f9b689SLuiz Capitulino        .name       = "sum",
609d7f9b689SLuiz Capitulino        .args_type  = "start:i,size:i",
610d7f9b689SLuiz Capitulino        .params     = "addr size",
611d7f9b689SLuiz Capitulino        .help       = "compute the checksum of a memory region",
6123e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_sum,
613d7f9b689SLuiz Capitulino    },
614d7f9b689SLuiz Capitulino
6152313086aSBlue SwirlSTEXI
6162313086aSBlue Swirl@item sum @var{addr} @var{size}
61770fcbbe7SStefan Weil@findex sum
6182313086aSBlue SwirlCompute the checksum of a memory region.
6192313086aSBlue SwirlETEXI
6202313086aSBlue Swirl
621d7f9b689SLuiz Capitulino    {
622d7f9b689SLuiz Capitulino        .name       = "usb_add",
623d7f9b689SLuiz Capitulino        .args_type  = "devname:s",
624d7f9b689SLuiz Capitulino        .params     = "device",
625d7f9b689SLuiz Capitulino        .help       = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
6263e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_usb_add,
627d7f9b689SLuiz Capitulino    },
628d7f9b689SLuiz Capitulino
6292313086aSBlue SwirlSTEXI
6302313086aSBlue Swirl@item usb_add @var{devname}
63170fcbbe7SStefan Weil@findex usb_add
6322313086aSBlue SwirlAdd the USB device @var{devname}.  For details of available devices see
6332313086aSBlue Swirl@ref{usb_devices}
6342313086aSBlue SwirlETEXI
6352313086aSBlue Swirl
636d7f9b689SLuiz Capitulino    {
637d7f9b689SLuiz Capitulino        .name       = "usb_del",
638d7f9b689SLuiz Capitulino        .args_type  = "devname:s",
639d7f9b689SLuiz Capitulino        .params     = "device",
640d7f9b689SLuiz Capitulino        .help       = "remove USB device 'bus.addr'",
6413e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_usb_del,
642d7f9b689SLuiz Capitulino    },
643d7f9b689SLuiz Capitulino
6442313086aSBlue SwirlSTEXI
6452313086aSBlue Swirl@item usb_del @var{devname}
64670fcbbe7SStefan Weil@findex usb_del
6472313086aSBlue SwirlRemove the USB device @var{devname} from the QEMU virtual USB
6482313086aSBlue Swirlhub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
6492313086aSBlue Swirlcommand @code{info usb} to see the devices you can remove.
6502313086aSBlue SwirlETEXI
6512313086aSBlue Swirl
652d7f9b689SLuiz Capitulino    {
653d7f9b689SLuiz Capitulino        .name       = "device_add",
654c7e4e8ceSMarkus Armbruster        .args_type  = "device:O",
655c7e4e8ceSMarkus Armbruster        .params     = "driver[,prop=value][,...]",
656d7f9b689SLuiz Capitulino        .help       = "add device, like -device on the command line",
6578bc27249SMarkus Armbruster        .user_print = monitor_user_noop,
6588bc27249SMarkus Armbruster        .mhandler.cmd_new = do_device_add,
6592da1b3abSHani Benhabiles        .command_completion = device_add_completion,
660d7f9b689SLuiz Capitulino    },
661d7f9b689SLuiz Capitulino
6623418bd25SGerd HoffmannSTEXI
6633418bd25SGerd Hoffmann@item device_add @var{config}
66470fcbbe7SStefan Weil@findex device_add
6653418bd25SGerd HoffmannAdd device.
6663418bd25SGerd HoffmannETEXI
6673418bd25SGerd Hoffmann
668d7f9b689SLuiz Capitulino    {
669d7f9b689SLuiz Capitulino        .name       = "device_del",
670d7f9b689SLuiz Capitulino        .args_type  = "id:s",
671d7f9b689SLuiz Capitulino        .params     = "device",
672d7f9b689SLuiz Capitulino        .help       = "remove device",
673a15fef21SLuiz Capitulino        .mhandler.cmd = hmp_device_del,
6742da1b3abSHani Benhabiles        .command_completion = device_del_completion,
675d7f9b689SLuiz Capitulino    },
676d7f9b689SLuiz Capitulino
6773418bd25SGerd HoffmannSTEXI
6783418bd25SGerd Hoffmann@item device_del @var{id}
67970fcbbe7SStefan Weil@findex device_del
6803418bd25SGerd HoffmannRemove device @var{id}.
6813418bd25SGerd HoffmannETEXI
6823418bd25SGerd Hoffmann
683d7f9b689SLuiz Capitulino    {
684d7f9b689SLuiz Capitulino        .name       = "cpu",
685d7f9b689SLuiz Capitulino        .args_type  = "index:i",
686d7f9b689SLuiz Capitulino        .params     = "index",
687d7f9b689SLuiz Capitulino        .help       = "set the default CPU",
688755f1968SLuiz Capitulino        .mhandler.cmd = hmp_cpu,
689d7f9b689SLuiz Capitulino    },
6903418bd25SGerd Hoffmann
6912313086aSBlue SwirlSTEXI
692c427ea9cSMarkus Armbruster@item cpu @var{index}
693c427ea9cSMarkus Armbruster@findex cpu
6942313086aSBlue SwirlSet the default CPU.
6952313086aSBlue SwirlETEXI
6962313086aSBlue Swirl
697d7f9b689SLuiz Capitulino    {
698d7f9b689SLuiz Capitulino        .name       = "mouse_move",
699d7f9b689SLuiz Capitulino        .args_type  = "dx_str:s,dy_str:s,dz_str:s?",
700d7f9b689SLuiz Capitulino        .params     = "dx dy [dz]",
701d7f9b689SLuiz Capitulino        .help       = "send mouse move events",
7023e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_mouse_move,
703d7f9b689SLuiz Capitulino    },
704d7f9b689SLuiz Capitulino
7052313086aSBlue SwirlSTEXI
7062313086aSBlue Swirl@item mouse_move @var{dx} @var{dy} [@var{dz}]
70770fcbbe7SStefan Weil@findex mouse_move
7082313086aSBlue SwirlMove the active mouse to the specified coordinates @var{dx} @var{dy}
7092313086aSBlue Swirlwith optional scroll axis @var{dz}.
7102313086aSBlue SwirlETEXI
7112313086aSBlue Swirl
712d7f9b689SLuiz Capitulino    {
713d7f9b689SLuiz Capitulino        .name       = "mouse_button",
714d7f9b689SLuiz Capitulino        .args_type  = "button_state:i",
715d7f9b689SLuiz Capitulino        .params     = "state",
716d7f9b689SLuiz Capitulino        .help       = "change mouse button state (1=L, 2=M, 4=R)",
7173e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_mouse_button,
718d7f9b689SLuiz Capitulino    },
719d7f9b689SLuiz Capitulino
7202313086aSBlue SwirlSTEXI
7212313086aSBlue Swirl@item mouse_button @var{val}
72270fcbbe7SStefan Weil@findex mouse_button
7232313086aSBlue SwirlChange the active mouse button state @var{val} (1=L, 2=M, 4=R).
7242313086aSBlue SwirlETEXI
7252313086aSBlue Swirl
726d7f9b689SLuiz Capitulino    {
727d7f9b689SLuiz Capitulino        .name       = "mouse_set",
728d7f9b689SLuiz Capitulino        .args_type  = "index:i",
729d7f9b689SLuiz Capitulino        .params     = "index",
730d7f9b689SLuiz Capitulino        .help       = "set which mouse device receives events",
7313e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_mouse_set,
732d7f9b689SLuiz Capitulino    },
733d7f9b689SLuiz Capitulino
7342313086aSBlue SwirlSTEXI
7352313086aSBlue Swirl@item mouse_set @var{index}
73670fcbbe7SStefan Weil@findex mouse_set
7372313086aSBlue SwirlSet which mouse device receives events at given @var{index}, index
7382313086aSBlue Swirlcan be obtained with
7392313086aSBlue Swirl@example
7402313086aSBlue Swirlinfo mice
7412313086aSBlue Swirl@end example
7422313086aSBlue SwirlETEXI
7432313086aSBlue Swirl
744d7f9b689SLuiz Capitulino    {
745d7f9b689SLuiz Capitulino        .name       = "wavcapture",
746d7f9b689SLuiz Capitulino        .args_type  = "path:F,freq:i?,bits:i?,nchannels:i?",
747d7f9b689SLuiz Capitulino        .params     = "path [frequency [bits [channels]]]",
748d7f9b689SLuiz Capitulino        .help       = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
7493e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_wavcapture,
750d7f9b689SLuiz Capitulino    },
7512313086aSBlue SwirlSTEXI
7522313086aSBlue Swirl@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
75370fcbbe7SStefan Weil@findex wavcapture
7542313086aSBlue SwirlCapture audio into @var{filename}. Using sample rate @var{frequency}
7552313086aSBlue Swirlbits per sample @var{bits} and number of channels @var{channels}.
7562313086aSBlue Swirl
7572313086aSBlue SwirlDefaults:
7582313086aSBlue Swirl@itemize @minus
7592313086aSBlue Swirl@item Sample rate = 44100 Hz - CD quality
7602313086aSBlue Swirl@item Bits = 16
7612313086aSBlue Swirl@item Number of channels = 2 - Stereo
7622313086aSBlue Swirl@end itemize
7632313086aSBlue SwirlETEXI
7642313086aSBlue Swirl
765d7f9b689SLuiz Capitulino    {
766d7f9b689SLuiz Capitulino        .name       = "stopcapture",
767d7f9b689SLuiz Capitulino        .args_type  = "n:i",
768d7f9b689SLuiz Capitulino        .params     = "capture index",
769d7f9b689SLuiz Capitulino        .help       = "stop capture",
7703e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_stopcapture,
771d7f9b689SLuiz Capitulino    },
7722313086aSBlue SwirlSTEXI
7732313086aSBlue Swirl@item stopcapture @var{index}
77470fcbbe7SStefan Weil@findex stopcapture
7752313086aSBlue SwirlStop capture with a given @var{index}, index can be obtained with
7762313086aSBlue Swirl@example
7772313086aSBlue Swirlinfo capture
7782313086aSBlue Swirl@end example
7792313086aSBlue SwirlETEXI
7802313086aSBlue Swirl
781d7f9b689SLuiz Capitulino    {
782d7f9b689SLuiz Capitulino        .name       = "memsave",
783d7f9b689SLuiz Capitulino        .args_type  = "val:l,size:i,filename:s",
784d7f9b689SLuiz Capitulino        .params     = "addr size file",
785d7f9b689SLuiz Capitulino        .help       = "save to disk virtual memory dump starting at 'addr' of size 'size'",
7860cfd6a9aSLuiz Capitulino        .mhandler.cmd = hmp_memsave,
787d7f9b689SLuiz Capitulino    },
788d7f9b689SLuiz Capitulino
7892313086aSBlue SwirlSTEXI
7902313086aSBlue Swirl@item memsave @var{addr} @var{size} @var{file}
79170fcbbe7SStefan Weil@findex memsave
7922313086aSBlue Swirlsave to disk virtual memory dump starting at @var{addr} of size @var{size}.
7932313086aSBlue SwirlETEXI
7942313086aSBlue Swirl
795d7f9b689SLuiz Capitulino    {
796d7f9b689SLuiz Capitulino        .name       = "pmemsave",
797d7f9b689SLuiz Capitulino        .args_type  = "val:l,size:i,filename:s",
798d7f9b689SLuiz Capitulino        .params     = "addr size file",
799d7f9b689SLuiz Capitulino        .help       = "save to disk physical memory dump starting at 'addr' of size 'size'",
8006d3962bfSLuiz Capitulino        .mhandler.cmd = hmp_pmemsave,
801d7f9b689SLuiz Capitulino    },
802d7f9b689SLuiz Capitulino
8032313086aSBlue SwirlSTEXI
8042313086aSBlue Swirl@item pmemsave @var{addr} @var{size} @var{file}
80570fcbbe7SStefan Weil@findex pmemsave
8062313086aSBlue Swirlsave to disk physical memory dump starting at @var{addr} of size @var{size}.
8072313086aSBlue SwirlETEXI
8082313086aSBlue Swirl
809d7f9b689SLuiz Capitulino    {
810d7f9b689SLuiz Capitulino        .name       = "boot_set",
811d7f9b689SLuiz Capitulino        .args_type  = "bootdevice:s",
812d7f9b689SLuiz Capitulino        .params     = "bootdevice",
813d7f9b689SLuiz Capitulino        .help       = "define new values for the boot device list",
8143e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_boot_set,
815d7f9b689SLuiz Capitulino    },
816d7f9b689SLuiz Capitulino
8172313086aSBlue SwirlSTEXI
8182313086aSBlue Swirl@item boot_set @var{bootdevicelist}
81970fcbbe7SStefan Weil@findex boot_set
8202313086aSBlue SwirlDefine new values for the boot device list. Those values will override
8212313086aSBlue Swirlthe values specified on the command line through the @code{-boot} option.
8222313086aSBlue Swirl
8232313086aSBlue SwirlThe values that can be specified here depend on the machine type, but are
8242313086aSBlue Swirlthe same that can be specified in the @code{-boot} command line option.
8252313086aSBlue SwirlETEXI
8262313086aSBlue Swirl
827d7f9b689SLuiz Capitulino    {
828d7f9b689SLuiz Capitulino        .name       = "nmi",
829e9b4b432SLuiz Capitulino        .args_type  = "",
830e9b4b432SLuiz Capitulino        .params     = "",
8319cb805fdSAlexey Kardashevskiy        .help       = "inject an NMI",
8323e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_nmi,
833d7f9b689SLuiz Capitulino    },
8342313086aSBlue SwirlSTEXI
8352313086aSBlue Swirl@item nmi @var{cpu}
83670fcbbe7SStefan Weil@findex nmi
8379cb805fdSAlexey KardashevskiyInject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
8381f590cf9SLei Li
8391f590cf9SLei LiETEXI
8401f590cf9SLei Li
8411f590cf9SLei Li    {
8423949e594SMarkus Armbruster        .name       = "ringbuf_write",
8431f590cf9SLei Li        .args_type  = "device:s,data:s",
8441f590cf9SLei Li        .params     = "device data",
8453949e594SMarkus Armbruster        .help       = "Write to a ring buffer character device",
8463949e594SMarkus Armbruster        .mhandler.cmd = hmp_ringbuf_write,
8478e597779SHani Benhabiles        .command_completion = ringbuf_write_completion,
8481f590cf9SLei Li    },
8491f590cf9SLei Li
8501f590cf9SLei LiSTEXI
8513949e594SMarkus Armbruster@item ringbuf_write @var{device} @var{data}
8523949e594SMarkus Armbruster@findex ringbuf_write
8533949e594SMarkus ArmbrusterWrite @var{data} to ring buffer character device @var{device}.
8543949e594SMarkus Armbruster@var{data} must be a UTF-8 string.
8551f590cf9SLei Li
8562313086aSBlue SwirlETEXI
8572313086aSBlue Swirl
858d7f9b689SLuiz Capitulino    {
8593949e594SMarkus Armbruster        .name       = "ringbuf_read",
86049b6d722SLei Li        .args_type  = "device:s,size:i",
86149b6d722SLei Li        .params     = "device size",
8623949e594SMarkus Armbruster        .help       = "Read from a ring buffer character device",
8633949e594SMarkus Armbruster        .mhandler.cmd = hmp_ringbuf_read,
8648e597779SHani Benhabiles        .command_completion = ringbuf_write_completion,
86549b6d722SLei Li    },
86649b6d722SLei Li
86749b6d722SLei LiSTEXI
8683949e594SMarkus Armbruster@item ringbuf_read @var{device}
8693949e594SMarkus Armbruster@findex ringbuf_read
8703949e594SMarkus ArmbrusterRead and print up to @var{size} bytes from ring buffer character
8713949e594SMarkus Armbrusterdevice @var{device}.
872543f3412SMarkus ArmbrusterCertain non-printable characters are printed \uXXXX, where XXXX is the
873543f3412SMarkus Armbrustercharacter code in hexadecimal.  Character \ is printed \\.
8743949e594SMarkus ArmbrusterBug: can screw up when the buffer contains invalid UTF-8 sequences,
8753949e594SMarkus ArmbrusterNUL characters, after the ring buffer lost data, and when reading
8763949e594SMarkus Armbrusterstops because the size limit is reached.
87749b6d722SLei Li
87849b6d722SLei LiETEXI
87949b6d722SLei Li
88049b6d722SLei Li    {
881d7f9b689SLuiz Capitulino        .name       = "migrate",
882fbc3d96cSlirans@il.ibm.com        .args_type  = "detach:-d,blk:-b,inc:-i,uri:s",
883fbc3d96cSlirans@il.ibm.com        .params     = "[-d] [-b] [-i] uri",
884fbc3d96cSlirans@il.ibm.com        .help       = "migrate to URI (using -d to not wait for completion)"
885fbc3d96cSlirans@il.ibm.com		      "\n\t\t\t -b for migration without shared storage with"
886fbc3d96cSlirans@il.ibm.com		      " full copy of disk\n\t\t\t -i for migration without "
887fbc3d96cSlirans@il.ibm.com		      "shared storage with incremental copy of disk "
888fbc3d96cSlirans@il.ibm.com		      "(base image shared between src and destination)",
889e1c37d0eSLuiz Capitulino        .mhandler.cmd = hmp_migrate,
890d7f9b689SLuiz Capitulino    },
891d7f9b689SLuiz Capitulino
892fbc3d96cSlirans@il.ibm.com
8932313086aSBlue SwirlSTEXI
894fbc3d96cSlirans@il.ibm.com@item migrate [-d] [-b] [-i] @var{uri}
89570fcbbe7SStefan Weil@findex migrate
8962313086aSBlue SwirlMigrate to @var{uri} (using -d to not wait for completion).
897fbc3d96cSlirans@il.ibm.com	-b for migration with full copy of disk
898fbc3d96cSlirans@il.ibm.com	-i for migration with incremental copy of disk (base image is shared)
8992313086aSBlue SwirlETEXI
9002313086aSBlue Swirl
901d7f9b689SLuiz Capitulino    {
902d7f9b689SLuiz Capitulino        .name       = "migrate_cancel",
903d7f9b689SLuiz Capitulino        .args_type  = "",
904d7f9b689SLuiz Capitulino        .params     = "",
905d7f9b689SLuiz Capitulino        .help       = "cancel the current VM migration",
9066cdedb07SLuiz Capitulino        .mhandler.cmd = hmp_migrate_cancel,
907d7f9b689SLuiz Capitulino    },
908d7f9b689SLuiz Capitulino
9092313086aSBlue SwirlSTEXI
9102313086aSBlue Swirl@item migrate_cancel
91170fcbbe7SStefan Weil@findex migrate_cancel
9122313086aSBlue SwirlCancel the current VM migration.
9139e1ba4ccSOrit Wasserman
9149e1ba4ccSOrit WassermanETEXI
9159e1ba4ccSOrit Wasserman
9169e1ba4ccSOrit Wasserman    {
917bf1ae1f4SDr. David Alan Gilbert        .name       = "migrate_incoming",
918bf1ae1f4SDr. David Alan Gilbert        .args_type  = "uri:s",
919bf1ae1f4SDr. David Alan Gilbert        .params     = "uri",
920bf1ae1f4SDr. David Alan Gilbert        .help       = "Continue an incoming migration from an -incoming defer",
921bf1ae1f4SDr. David Alan Gilbert        .mhandler.cmd = hmp_migrate_incoming,
922bf1ae1f4SDr. David Alan Gilbert    },
923bf1ae1f4SDr. David Alan Gilbert
924bf1ae1f4SDr. David Alan GilbertSTEXI
925bf1ae1f4SDr. David Alan Gilbert@item migrate_incoming @var{uri}
926bf1ae1f4SDr. David Alan Gilbert@findex migrate_incoming
927bf1ae1f4SDr. David Alan GilbertContinue an incoming migration using the @var{uri} (that has the same syntax
928bf1ae1f4SDr. David Alan Gilbertas the -incoming option).
929bf1ae1f4SDr. David Alan Gilbert
930bf1ae1f4SDr. David Alan GilbertETEXI
931bf1ae1f4SDr. David Alan Gilbert
932bf1ae1f4SDr. David Alan Gilbert    {
9339e1ba4ccSOrit Wasserman        .name       = "migrate_set_cache_size",
9349e1ba4ccSOrit Wasserman        .args_type  = "value:o",
9359e1ba4ccSOrit Wasserman        .params     = "value",
9369e1ba4ccSOrit Wasserman        .help       = "set cache size (in bytes) for XBZRLE migrations,"
9379e1ba4ccSOrit Wasserman                      "the cache size will be rounded down to the nearest "
9389e1ba4ccSOrit Wasserman                      "power of 2.\n"
9399e1ba4ccSOrit Wasserman                      "The cache size affects the number of cache misses."
9409e1ba4ccSOrit Wasserman                      "In case of a high cache miss ratio you need to increase"
9419e1ba4ccSOrit Wasserman                      " the cache size",
9429e1ba4ccSOrit Wasserman        .mhandler.cmd = hmp_migrate_set_cache_size,
9439e1ba4ccSOrit Wasserman    },
9449e1ba4ccSOrit Wasserman
9459e1ba4ccSOrit WassermanSTEXI
9469e1ba4ccSOrit Wasserman@item migrate_set_cache_size @var{value}
9479e1ba4ccSOrit Wasserman@findex migrate_set_cache_size
9489e1ba4ccSOrit WassermanSet cache size to @var{value} (in bytes) for xbzrle migrations.
9492313086aSBlue SwirlETEXI
9502313086aSBlue Swirl
951d7f9b689SLuiz Capitulino    {
952d7f9b689SLuiz Capitulino        .name       = "migrate_set_speed",
953ed3d4a80SJes Sorensen        .args_type  = "value:o",
954d7f9b689SLuiz Capitulino        .params     = "value",
955ed3d4a80SJes Sorensen        .help       = "set maximum speed (in bytes) for migrations. "
956ed3d4a80SJes Sorensen	"Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
9573dc85383SLuiz Capitulino        .mhandler.cmd = hmp_migrate_set_speed,
958d7f9b689SLuiz Capitulino    },
959d7f9b689SLuiz Capitulino
9602313086aSBlue SwirlSTEXI
9612313086aSBlue Swirl@item migrate_set_speed @var{value}
96270fcbbe7SStefan Weil@findex migrate_set_speed
9632313086aSBlue SwirlSet maximum speed to @var{value} (in bytes) for migrations.
9642313086aSBlue SwirlETEXI
9652313086aSBlue Swirl
966d7f9b689SLuiz Capitulino    {
967d7f9b689SLuiz Capitulino        .name       = "migrate_set_downtime",
968b0fbf7d3SMarkus Armbruster        .args_type  = "value:T",
969d7f9b689SLuiz Capitulino        .params     = "value",
970d7f9b689SLuiz Capitulino        .help       = "set maximum tolerated downtime (in seconds) for migrations",
9714f0a993bSLuiz Capitulino        .mhandler.cmd = hmp_migrate_set_downtime,
972d7f9b689SLuiz Capitulino    },
9732ea42952SGlauber Costa
9742ea42952SGlauber CostaSTEXI
9752ea42952SGlauber Costa@item migrate_set_downtime @var{second}
97670fcbbe7SStefan Weil@findex migrate_set_downtime
9772ea42952SGlauber CostaSet maximum tolerated downtime (in seconds) for migration.
9782ea42952SGlauber CostaETEXI
9792ea42952SGlauber Costa
980f8882568SJes Sorensen    {
98100458433SOrit Wasserman        .name       = "migrate_set_capability",
98200458433SOrit Wasserman        .args_type  = "capability:s,state:b",
98300458433SOrit Wasserman        .params     = "capability state",
98400458433SOrit Wasserman        .help       = "Enable/Disable the usage of a capability for migration",
98500458433SOrit Wasserman        .mhandler.cmd = hmp_migrate_set_capability,
986c68a0409SHani Benhabiles        .command_completion = migrate_set_capability_completion,
98700458433SOrit Wasserman    },
98800458433SOrit Wasserman
98900458433SOrit WassermanSTEXI
99000458433SOrit Wasserman@item migrate_set_capability @var{capability} @var{state}
99100458433SOrit Wasserman@findex migrate_set_capability
99200458433SOrit WassermanEnable/Disable the usage of a capability @var{capability} for migration.
99300458433SOrit WassermanETEXI
99400458433SOrit Wasserman
99500458433SOrit Wasserman    {
996*50e9a629SLiang Li        .name       = "migrate_set_parameter",
997*50e9a629SLiang Li        .args_type  = "parameter:s,value:i",
998*50e9a629SLiang Li        .params     = "parameter value",
999*50e9a629SLiang Li        .help       = "Set the parameter for migration",
1000*50e9a629SLiang Li        .mhandler.cmd = hmp_migrate_set_parameter,
1001*50e9a629SLiang Li        .command_completion = migrate_set_parameter_completion,
1002*50e9a629SLiang Li    },
1003*50e9a629SLiang Li
1004*50e9a629SLiang LiSTEXI
1005*50e9a629SLiang Li@item migrate_set_parameter @var{parameter} @var{value}
1006*50e9a629SLiang Li@findex migrate_set_parameter
1007*50e9a629SLiang LiSet the parameter @var{parameter} for migration.
1008*50e9a629SLiang LiETEXI
1009*50e9a629SLiang Li
1010*50e9a629SLiang Li    {
10112ea720dbSJes Sorensen        .name       = "client_migrate_info",
10122ea720dbSJes Sorensen        .args_type  = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
10132ea720dbSJes Sorensen        .params     = "protocol hostname port tls-port cert-subject",
10142ea720dbSJes Sorensen        .help       = "send migration info to spice/vnc client",
10152ea720dbSJes Sorensen        .user_print = monitor_user_noop,
10163b5704b2SMarkus Armbruster        .mhandler.cmd_new = client_migrate_info,
1017f8882568SJes Sorensen    },
1018f8882568SJes Sorensen
1019f8882568SJes SorensenSTEXI
1020e866e239SGerd Hoffmann@item client_migrate_info @var{protocol} @var{hostname} @var{port} @var{tls-port} @var{cert-subject}
1021e866e239SGerd Hoffmann@findex client_migrate_info
1022e866e239SGerd HoffmannSet the spice/vnc connection info for the migration target.  The spice/vnc
1023e866e239SGerd Hoffmannserver will ask the spice/vnc client to automatically reconnect using the
1024e866e239SGerd Hoffmannnew parameters (if specified) once the vm migration finished successfully.
1025e866e239SGerd HoffmannETEXI
1026e866e239SGerd Hoffmann
1027783e9b48SWen Congyang    {
1028783e9b48SWen Congyang        .name       = "dump-guest-memory",
10291b7a0f75SQiao Nuohan        .args_type  = "paging:-p,zlib:-z,lzo:-l,snappy:-s,filename:F,begin:i?,length:i?",
10301b7a0f75SQiao Nuohan        .params     = "[-p] [-z|-l|-s] filename [begin length]",
1031c20499d9SQiao Nuohan        .help       = "dump guest memory into file 'filename'.\n\t\t\t"
1032c20499d9SQiao Nuohan                      "-p: do paging to get guest's memory mapping.\n\t\t\t"
10331b7a0f75SQiao Nuohan                      "-z: dump in kdump-compressed format, with zlib compression.\n\t\t\t"
10341b7a0f75SQiao Nuohan                      "-l: dump in kdump-compressed format, with lzo compression.\n\t\t\t"
10351b7a0f75SQiao Nuohan                      "-s: dump in kdump-compressed format, with snappy compression.\n\t\t\t"
1036c20499d9SQiao Nuohan                      "begin: the starting physical address.\n\t\t\t"
1037c20499d9SQiao Nuohan                      "length: the memory size, in bytes.",
1038783e9b48SWen Congyang        .mhandler.cmd = hmp_dump_guest_memory,
1039783e9b48SWen Congyang    },
1040783e9b48SWen Congyang
1041783e9b48SWen Congyang
1042783e9b48SWen CongyangSTEXI
1043c20499d9SQiao Nuohan@item dump-guest-memory [-p] @var{filename} @var{begin} @var{length}
10441b7a0f75SQiao Nuohan@item dump-guest-memory [-z|-l|-s] @var{filename}
1045783e9b48SWen Congyang@findex dump-guest-memory
1046783e9b48SWen CongyangDump guest memory to @var{protocol}. The file can be processed with crash or
10471b7a0f75SQiao Nuohangdb. Without -z|-l|-s, the dump format is ELF.
1048c20499d9SQiao Nuohan        -p: do paging to get guest's memory mapping.
10491b7a0f75SQiao Nuohan        -z: dump in kdump-compressed format, with zlib compression.
10501b7a0f75SQiao Nuohan        -l: dump in kdump-compressed format, with lzo compression.
10511b7a0f75SQiao Nuohan        -s: dump in kdump-compressed format, with snappy compression.
1052c20499d9SQiao Nuohan  filename: dump file name.
1053783e9b48SWen Congyang     begin: the starting physical address. It's optional, and should be
1054c20499d9SQiao Nuohan            specified together with length.
1055783e9b48SWen Congyang    length: the memory size, in bytes. It's optional, and should be specified
1056c20499d9SQiao Nuohan            together with begin.
1057783e9b48SWen CongyangETEXI
1058783e9b48SWen Congyang
1059e866e239SGerd Hoffmann    {
10602ea720dbSJes Sorensen        .name       = "snapshot_blkdev",
10616cc2a415SPaolo Bonzini        .args_type  = "reuse:-n,device:B,snapshot-file:s?,format:s?",
10626cc2a415SPaolo Bonzini        .params     = "[-n] device [new-image-file] [format]",
10632ea720dbSJes Sorensen        .help       = "initiates a live snapshot\n\t\t\t"
10642ea720dbSJes Sorensen                      "of device. If a new image file is specified, the\n\t\t\t"
10652ea720dbSJes Sorensen                      "new image file will become the new root image.\n\t\t\t"
10662ea720dbSJes Sorensen                      "If format is specified, the snapshot file will\n\t\t\t"
1067775ca88eSWenchao Xia                      "be created in that format.\n\t\t\t"
10686cc2a415SPaolo Bonzini                      "The default format is qcow2.  The -n flag requests QEMU\n\t\t\t"
10696cc2a415SPaolo Bonzini                      "to reuse the image found in new-image-file, instead of\n\t\t\t"
10706cc2a415SPaolo Bonzini                      "recreating it from scratch.",
10716106e249SLuiz Capitulino        .mhandler.cmd = hmp_snapshot_blkdev,
1072e866e239SGerd Hoffmann    },
1073e866e239SGerd Hoffmann
1074e866e239SGerd HoffmannSTEXI
1075f8882568SJes Sorensen@item snapshot_blkdev
1076f8882568SJes Sorensen@findex snapshot_blkdev
1077f8882568SJes SorensenSnapshot device, using snapshot file as target if provided
1078f8882568SJes SorensenETEXI
1079f8882568SJes Sorensen
1080d7f9b689SLuiz Capitulino    {
1081775ca88eSWenchao Xia        .name       = "snapshot_blkdev_internal",
1082775ca88eSWenchao Xia        .args_type  = "device:B,name:s",
1083775ca88eSWenchao Xia        .params     = "device name",
1084775ca88eSWenchao Xia        .help       = "take an internal snapshot of device.\n\t\t\t"
1085775ca88eSWenchao Xia                      "The format of the image used by device must\n\t\t\t"
1086775ca88eSWenchao Xia                      "support it, such as qcow2.\n\t\t\t",
1087775ca88eSWenchao Xia        .mhandler.cmd = hmp_snapshot_blkdev_internal,
1088775ca88eSWenchao Xia    },
1089775ca88eSWenchao Xia
1090775ca88eSWenchao XiaSTEXI
1091775ca88eSWenchao Xia@item snapshot_blkdev_internal
1092775ca88eSWenchao Xia@findex snapshot_blkdev_internal
1093775ca88eSWenchao XiaTake an internal snapshot on device if it support
1094775ca88eSWenchao XiaETEXI
1095775ca88eSWenchao Xia
1096775ca88eSWenchao Xia    {
10977a4ed2eeSWenchao Xia        .name       = "snapshot_delete_blkdev_internal",
10987a4ed2eeSWenchao Xia        .args_type  = "device:B,name:s,id:s?",
10997a4ed2eeSWenchao Xia        .params     = "device name [id]",
11007a4ed2eeSWenchao Xia        .help       = "delete an internal snapshot of device.\n\t\t\t"
11017a4ed2eeSWenchao Xia                      "If id is specified, qemu will try delete\n\t\t\t"
11027a4ed2eeSWenchao Xia                      "the snapshot matching both id and name.\n\t\t\t"
11037a4ed2eeSWenchao Xia                      "The format of the image used by device must\n\t\t\t"
11047a4ed2eeSWenchao Xia                      "support it, such as qcow2.\n\t\t\t",
11057a4ed2eeSWenchao Xia        .mhandler.cmd = hmp_snapshot_delete_blkdev_internal,
11067a4ed2eeSWenchao Xia    },
11077a4ed2eeSWenchao Xia
11087a4ed2eeSWenchao XiaSTEXI
11097a4ed2eeSWenchao Xia@item snapshot_delete_blkdev_internal
11107a4ed2eeSWenchao Xia@findex snapshot_delete_blkdev_internal
11117a4ed2eeSWenchao XiaDelete an internal snapshot on device if it support
11127a4ed2eeSWenchao XiaETEXI
11137a4ed2eeSWenchao Xia
11147a4ed2eeSWenchao Xia    {
1115d9b902dbSPaolo Bonzini        .name       = "drive_mirror",
1116d9b902dbSPaolo Bonzini        .args_type  = "reuse:-n,full:-f,device:B,target:s,format:s?",
1117d9b902dbSPaolo Bonzini        .params     = "[-n] [-f] device target [format]",
1118d9b902dbSPaolo Bonzini        .help       = "initiates live storage\n\t\t\t"
1119d9b902dbSPaolo Bonzini                      "migration for a device. The device's contents are\n\t\t\t"
1120d9b902dbSPaolo Bonzini                      "copied to the new image file, including data that\n\t\t\t"
1121d9b902dbSPaolo Bonzini                      "is written after the command is started.\n\t\t\t"
1122d9b902dbSPaolo Bonzini                      "The -n flag requests QEMU to reuse the image found\n\t\t\t"
1123d9b902dbSPaolo Bonzini                      "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
1124d9b902dbSPaolo Bonzini                      "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
1125d9b902dbSPaolo Bonzini                      "so that the result does not need a backing file.\n\t\t\t",
1126d9b902dbSPaolo Bonzini        .mhandler.cmd = hmp_drive_mirror,
1127d9b902dbSPaolo Bonzini    },
1128d9b902dbSPaolo BonziniSTEXI
1129d9b902dbSPaolo Bonzini@item drive_mirror
1130d9b902dbSPaolo Bonzini@findex drive_mirror
1131d9b902dbSPaolo BonziniStart mirroring a block device's writes to a new destination,
1132d9b902dbSPaolo Bonziniusing the specified target.
1133d9b902dbSPaolo BonziniETEXI
1134d9b902dbSPaolo Bonzini
1135d9b902dbSPaolo Bonzini    {
1136de90930aSStefan Hajnoczi        .name       = "drive_backup",
1137de90930aSStefan Hajnoczi        .args_type  = "reuse:-n,full:-f,device:B,target:s,format:s?",
1138de90930aSStefan Hajnoczi        .params     = "[-n] [-f] device target [format]",
1139de90930aSStefan Hajnoczi        .help       = "initiates a point-in-time\n\t\t\t"
1140de90930aSStefan Hajnoczi                      "copy for a device. The device's contents are\n\t\t\t"
1141de90930aSStefan Hajnoczi                      "copied to the new image file, excluding data that\n\t\t\t"
1142de90930aSStefan Hajnoczi                      "is written after the command is started.\n\t\t\t"
1143de90930aSStefan Hajnoczi                      "The -n flag requests QEMU to reuse the image found\n\t\t\t"
1144de90930aSStefan Hajnoczi                      "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
1145de90930aSStefan Hajnoczi                      "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
1146de90930aSStefan Hajnoczi                      "so that the result does not need a backing file.\n\t\t\t",
1147de90930aSStefan Hajnoczi        .mhandler.cmd = hmp_drive_backup,
1148de90930aSStefan Hajnoczi    },
1149de90930aSStefan HajnocziSTEXI
1150de90930aSStefan Hajnoczi@item drive_backup
1151de90930aSStefan Hajnoczi@findex drive_backup
1152de90930aSStefan HajnocziStart a point-in-time copy of a block device to a specificed target.
1153de90930aSStefan HajnocziETEXI
1154de90930aSStefan Hajnoczi
1155de90930aSStefan Hajnoczi    {
1156d7f9b689SLuiz Capitulino        .name       = "drive_add",
1157d7f9b689SLuiz Capitulino        .args_type  = "pci_addr:s,opts:s",
1158d7f9b689SLuiz Capitulino        .params     = "[[<domain>:]<bus>:]<slot>\n"
11592313086aSBlue Swirl                      "[file=file][,if=type][,bus=n]\n"
1160fb0490f6SStefan Hajnoczi                      "[,unit=m][,media=d][,index=i]\n"
11612313086aSBlue Swirl                      "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
1162fb0490f6SStefan Hajnoczi                      "[,snapshot=on|off][,cache=on|off]\n"
1163fb0490f6SStefan Hajnoczi                      "[,readonly=on|off][,copy-on-read=on|off]",
1164d7f9b689SLuiz Capitulino        .help       = "add drive to PCI storage controller",
11653e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_drive_add,
1166d7f9b689SLuiz Capitulino    },
1167d7f9b689SLuiz Capitulino
11682313086aSBlue SwirlSTEXI
11692313086aSBlue Swirl@item drive_add
117070fcbbe7SStefan Weil@findex drive_add
11712313086aSBlue SwirlAdd drive to PCI storage controller.
11722313086aSBlue SwirlETEXI
11732313086aSBlue Swirl
1174d7f9b689SLuiz Capitulino    {
11752ae63bdaSIsaku Yamahata        .name       = "pcie_aer_inject_error",
11762ae63bdaSIsaku Yamahata        .args_type  = "advisory_non_fatal:-a,correctable:-c,"
11772ae63bdaSIsaku Yamahata	              "id:s,error_status:s,"
11782ae63bdaSIsaku Yamahata	              "header0:i?,header1:i?,header2:i?,header3:i?,"
11792ae63bdaSIsaku Yamahata	              "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
11802ae63bdaSIsaku Yamahata        .params     = "[-a] [-c] id "
11812ae63bdaSIsaku Yamahata                      "<error_status> [<tlp header> [<tlp header prefix>]]",
11822ae63bdaSIsaku Yamahata        .help       = "inject pcie aer error\n\t\t\t"
11832ae63bdaSIsaku Yamahata	              " -a for advisory non fatal error\n\t\t\t"
11842ae63bdaSIsaku Yamahata	              " -c for correctable error\n\t\t\t"
11852ae63bdaSIsaku Yamahata                      "<id> = qdev device id\n\t\t\t"
11862ae63bdaSIsaku Yamahata                      "<error_status> = error string or 32bit\n\t\t\t"
11872ae63bdaSIsaku Yamahata                      "<tlb header> = 32bit x 4\n\t\t\t"
11882ae63bdaSIsaku Yamahata                      "<tlb header prefix> = 32bit x 4",
11892ae63bdaSIsaku Yamahata        .user_print  = pcie_aer_inject_error_print,
11903e5a50d6SMarkus Armbruster        .mhandler.cmd_new = hmp_pcie_aer_inject_error,
11912ae63bdaSIsaku Yamahata    },
11922ae63bdaSIsaku Yamahata
11932ae63bdaSIsaku YamahataSTEXI
11942ae63bdaSIsaku Yamahata@item pcie_aer_inject_error
11952ae63bdaSIsaku Yamahata@findex pcie_aer_inject_error
11962ae63bdaSIsaku YamahataInject PCIe AER error
11972ae63bdaSIsaku YamahataETEXI
11982ae63bdaSIsaku Yamahata
11992ae63bdaSIsaku Yamahata    {
1200d7f9b689SLuiz Capitulino        .name       = "host_net_add",
1201d7f9b689SLuiz Capitulino        .args_type  = "device:s,opts:s?",
120203ce5744SNikolay Nikolaev        .params     = "tap|user|socket|vde|netmap|bridge|vhost-user|dump [options]",
1203d7f9b689SLuiz Capitulino        .help       = "add host VLAN client",
12043e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_host_net_add,
1205e3bb532cSHani Benhabiles        .command_completion = host_net_add_completion,
1206d7f9b689SLuiz Capitulino    },
1207d7f9b689SLuiz Capitulino
12082313086aSBlue SwirlSTEXI
12092313086aSBlue Swirl@item host_net_add
121070fcbbe7SStefan Weil@findex host_net_add
12112313086aSBlue SwirlAdd host VLAN client.
12122313086aSBlue SwirlETEXI
12132313086aSBlue Swirl
1214d7f9b689SLuiz Capitulino    {
1215d7f9b689SLuiz Capitulino        .name       = "host_net_remove",
1216d7f9b689SLuiz Capitulino        .args_type  = "vlan_id:i,device:s",
1217d7f9b689SLuiz Capitulino        .params     = "vlan_id name",
1218d7f9b689SLuiz Capitulino        .help       = "remove host VLAN client",
12193e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_host_net_remove,
1220ddd6b45cSHani Benhabiles        .command_completion = host_net_remove_completion,
1221d7f9b689SLuiz Capitulino    },
1222d7f9b689SLuiz Capitulino
12232313086aSBlue SwirlSTEXI
12242313086aSBlue Swirl@item host_net_remove
122570fcbbe7SStefan Weil@findex host_net_remove
12262313086aSBlue SwirlRemove host VLAN client.
12272313086aSBlue SwirlETEXI
12282313086aSBlue Swirl
1229ae82d324SMarkus Armbruster    {
1230ae82d324SMarkus Armbruster        .name       = "netdev_add",
1231ae82d324SMarkus Armbruster        .args_type  = "netdev:O",
123203ce5744SNikolay Nikolaev        .params     = "[user|tap|socket|vde|bridge|hubport|netmap|vhost-user],id=str[,prop=value][,...]",
1233ae82d324SMarkus Armbruster        .help       = "add host network device",
1234928059a3SLuiz Capitulino        .mhandler.cmd = hmp_netdev_add,
1235b162b49aSHani Benhabiles        .command_completion = netdev_add_completion,
1236ae82d324SMarkus Armbruster    },
1237ae82d324SMarkus Armbruster
1238ae82d324SMarkus ArmbrusterSTEXI
1239ae82d324SMarkus Armbruster@item netdev_add
1240ae82d324SMarkus Armbruster@findex netdev_add
1241ae82d324SMarkus ArmbrusterAdd host network device.
1242ae82d324SMarkus ArmbrusterETEXI
1243ae82d324SMarkus Armbruster
1244ae82d324SMarkus Armbruster    {
1245ae82d324SMarkus Armbruster        .name       = "netdev_del",
1246ae82d324SMarkus Armbruster        .args_type  = "id:s",
1247ae82d324SMarkus Armbruster        .params     = "id",
1248ae82d324SMarkus Armbruster        .help       = "remove host network device",
12495f964155SLuiz Capitulino        .mhandler.cmd = hmp_netdev_del,
125011b389f2SHani Benhabiles        .command_completion = netdev_del_completion,
1251ae82d324SMarkus Armbruster    },
1252ae82d324SMarkus Armbruster
1253ae82d324SMarkus ArmbrusterSTEXI
1254ae82d324SMarkus Armbruster@item netdev_del
1255ae82d324SMarkus Armbruster@findex netdev_del
1256ae82d324SMarkus ArmbrusterRemove host network device.
1257ae82d324SMarkus ArmbrusterETEXI
1258ae82d324SMarkus Armbruster
1259ab2d0531SPaolo Bonzini    {
1260cff8b2c6SPaolo Bonzini        .name       = "object_add",
1261cff8b2c6SPaolo Bonzini        .args_type  = "object:O",
1262cff8b2c6SPaolo Bonzini        .params     = "[qom-type=]type,id=str[,prop=value][,...]",
1263cff8b2c6SPaolo Bonzini        .help       = "create QOM object",
1264cff8b2c6SPaolo Bonzini        .mhandler.cmd = hmp_object_add,
1265bfa40f77SHani Benhabiles        .command_completion = object_add_completion,
1266cff8b2c6SPaolo Bonzini    },
1267cff8b2c6SPaolo Bonzini
1268cff8b2c6SPaolo BonziniSTEXI
1269cff8b2c6SPaolo Bonzini@item object_add
1270cff8b2c6SPaolo Bonzini@findex object_add
1271cff8b2c6SPaolo BonziniCreate QOM object.
1272cff8b2c6SPaolo BonziniETEXI
1273cff8b2c6SPaolo Bonzini
1274cff8b2c6SPaolo Bonzini    {
1275ab2d0531SPaolo Bonzini        .name       = "object_del",
1276ab2d0531SPaolo Bonzini        .args_type  = "id:s",
1277ab2d0531SPaolo Bonzini        .params     = "id",
1278ab2d0531SPaolo Bonzini        .help       = "destroy QOM object",
1279ab2d0531SPaolo Bonzini        .mhandler.cmd = hmp_object_del,
1280bfa40f77SHani Benhabiles        .command_completion = object_del_completion,
1281ab2d0531SPaolo Bonzini    },
1282ab2d0531SPaolo Bonzini
1283ab2d0531SPaolo BonziniSTEXI
1284ab2d0531SPaolo Bonzini@item object_del
1285ab2d0531SPaolo Bonzini@findex object_del
1286ab2d0531SPaolo BonziniDestroy QOM object.
1287ab2d0531SPaolo BonziniETEXI
1288ab2d0531SPaolo Bonzini
12892313086aSBlue Swirl#ifdef CONFIG_SLIRP
1290d7f9b689SLuiz Capitulino    {
1291d7f9b689SLuiz Capitulino        .name       = "hostfwd_add",
1292d7f9b689SLuiz Capitulino        .args_type  = "arg1:s,arg2:s?,arg3:s?",
1293d7f9b689SLuiz Capitulino        .params     = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
1294d7f9b689SLuiz Capitulino        .help       = "redirect TCP or UDP connections from host to guest (requires -net user)",
12953e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_hostfwd_add,
1296d7f9b689SLuiz Capitulino    },
129721413d68SMarkus Armbruster#endif
129821413d68SMarkus ArmbrusterSTEXI
129921413d68SMarkus Armbruster@item hostfwd_add
130021413d68SMarkus Armbruster@findex hostfwd_add
130121413d68SMarkus ArmbrusterRedirect TCP or UDP connections from host to guest (requires -net user).
130221413d68SMarkus ArmbrusterETEXI
1303d7f9b689SLuiz Capitulino
130421413d68SMarkus Armbruster#ifdef CONFIG_SLIRP
1305d7f9b689SLuiz Capitulino    {
1306d7f9b689SLuiz Capitulino        .name       = "hostfwd_remove",
1307d7f9b689SLuiz Capitulino        .args_type  = "arg1:s,arg2:s?,arg3:s?",
1308d7f9b689SLuiz Capitulino        .params     = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
1309d7f9b689SLuiz Capitulino        .help       = "remove host-to-guest TCP or UDP redirection",
13103e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_hostfwd_remove,
1311d7f9b689SLuiz Capitulino    },
1312d7f9b689SLuiz Capitulino
13132313086aSBlue Swirl#endif
13142313086aSBlue SwirlSTEXI
131521413d68SMarkus Armbruster@item hostfwd_remove
131621413d68SMarkus Armbruster@findex hostfwd_remove
131721413d68SMarkus ArmbrusterRemove host-to-guest TCP or UDP redirection.
13182313086aSBlue SwirlETEXI
13192313086aSBlue Swirl
1320d7f9b689SLuiz Capitulino    {
1321d7f9b689SLuiz Capitulino        .name       = "balloon",
13223b0bd6ecSLuiz Capitulino        .args_type  = "value:M",
1323d7f9b689SLuiz Capitulino        .params     = "target",
13243c05613aSRiccardo Magliocchetti        .help       = "request VM to change its memory allocation (in MB)",
1325d72f3264SLuiz Capitulino        .mhandler.cmd = hmp_balloon,
1326d7f9b689SLuiz Capitulino    },
1327d7f9b689SLuiz Capitulino
13282313086aSBlue SwirlSTEXI
13292313086aSBlue Swirl@item balloon @var{value}
133070fcbbe7SStefan Weil@findex balloon
13312313086aSBlue SwirlRequest VM to change its memory allocation to @var{value} (in MB).
13322313086aSBlue SwirlETEXI
13332313086aSBlue Swirl
1334d7f9b689SLuiz Capitulino    {
1335d7f9b689SLuiz Capitulino        .name       = "set_link",
1336c9b26a4cSMarkus Armbruster        .args_type  = "name:s,up:b",
1337c9b26a4cSMarkus Armbruster        .params     = "name on|off",
1338d7f9b689SLuiz Capitulino        .help       = "change the link status of a network adapter",
13394b37156cSLuiz Capitulino        .mhandler.cmd = hmp_set_link,
134040d19394SHani Benhabiles        .command_completion = set_link_completion,
1341d7f9b689SLuiz Capitulino    },
1342d7f9b689SLuiz Capitulino
13432313086aSBlue SwirlSTEXI
1344c9b26a4cSMarkus Armbruster@item set_link @var{name} [on|off]
134570fcbbe7SStefan Weil@findex set_link
1346c9b26a4cSMarkus ArmbrusterSwitch link @var{name} on (i.e. up) or off (i.e. down).
13472313086aSBlue SwirlETEXI
13482313086aSBlue Swirl
1349d7f9b689SLuiz Capitulino    {
1350d7f9b689SLuiz Capitulino        .name       = "watchdog_action",
1351d7f9b689SLuiz Capitulino        .args_type  = "action:s",
1352d7f9b689SLuiz Capitulino        .params     = "[reset|shutdown|poweroff|pause|debug|none]",
1353d7f9b689SLuiz Capitulino        .help       = "change watchdog action",
13543e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_watchdog_action,
1355d0ece345SHani Benhabiles        .command_completion = watchdog_action_completion,
1356d7f9b689SLuiz Capitulino    },
1357d7f9b689SLuiz Capitulino
13582313086aSBlue SwirlSTEXI
13592313086aSBlue Swirl@item watchdog_action
136070fcbbe7SStefan Weil@findex watchdog_action
13612313086aSBlue SwirlChange watchdog action.
13622313086aSBlue SwirlETEXI
13632313086aSBlue Swirl
1364d7f9b689SLuiz Capitulino    {
1365d7f9b689SLuiz Capitulino        .name       = "acl_show",
1366d7f9b689SLuiz Capitulino        .args_type  = "aclname:s",
1367d7f9b689SLuiz Capitulino        .params     = "aclname",
1368d7f9b689SLuiz Capitulino        .help       = "list rules in the access control list",
13693e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_acl_show,
1370d7f9b689SLuiz Capitulino    },
1371d7f9b689SLuiz Capitulino
13722313086aSBlue SwirlSTEXI
137315dfcd45SJan Kiszka@item acl_show @var{aclname}
137470fcbbe7SStefan Weil@findex acl_show
137515dfcd45SJan KiszkaList all the matching rules in the access control list, and the default
137615dfcd45SJan Kiszkapolicy. There are currently two named access control lists,
137715dfcd45SJan Kiszka@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
137815dfcd45SJan Kiszkacertificate distinguished name, and SASL username respectively.
137915dfcd45SJan KiszkaETEXI
13802313086aSBlue Swirl
1381d7f9b689SLuiz Capitulino    {
1382d7f9b689SLuiz Capitulino        .name       = "acl_policy",
1383d7f9b689SLuiz Capitulino        .args_type  = "aclname:s,policy:s",
1384d7f9b689SLuiz Capitulino        .params     = "aclname allow|deny",
1385d7f9b689SLuiz Capitulino        .help       = "set default access control list policy",
13863e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_acl_policy,
1387d7f9b689SLuiz Capitulino    },
1388d7f9b689SLuiz Capitulino
138915dfcd45SJan KiszkaSTEXI
1390cbbfacc6SJan Kiszka@item acl_policy @var{aclname} @code{allow|deny}
139170fcbbe7SStefan Weil@findex acl_policy
139215dfcd45SJan KiszkaSet the default access control list policy, used in the event that
13932313086aSBlue Swirlnone of the explicit rules match. The default policy at startup is
139415dfcd45SJan Kiszkaalways @code{deny}.
139515dfcd45SJan KiszkaETEXI
139615dfcd45SJan Kiszka
1397d7f9b689SLuiz Capitulino    {
1398d7f9b689SLuiz Capitulino        .name       = "acl_add",
1399d7f9b689SLuiz Capitulino        .args_type  = "aclname:s,match:s,policy:s,index:i?",
1400d7f9b689SLuiz Capitulino        .params     = "aclname match allow|deny [index]",
1401d7f9b689SLuiz Capitulino        .help       = "add a match rule to the access control list",
14023e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_acl_add,
1403d7f9b689SLuiz Capitulino    },
1404d7f9b689SLuiz Capitulino
140515dfcd45SJan KiszkaSTEXI
14060e4aec98SMarkus Armbruster@item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
14070e4aec98SMarkus Armbruster@findex acl_add
140815dfcd45SJan KiszkaAdd a match rule to the access control list, allowing or denying access.
140915dfcd45SJan KiszkaThe match will normally be an exact username or x509 distinguished name,
141015dfcd45SJan Kiszkabut can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
141115dfcd45SJan Kiszkaallow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
14122313086aSBlue Swirlnormally be appended to the end of the ACL, but can be inserted
141315dfcd45SJan Kiszkaearlier in the list if the optional @var{index} parameter is supplied.
141415dfcd45SJan KiszkaETEXI
141515dfcd45SJan Kiszka
1416d7f9b689SLuiz Capitulino    {
1417d7f9b689SLuiz Capitulino        .name       = "acl_remove",
1418d7f9b689SLuiz Capitulino        .args_type  = "aclname:s,match:s",
1419d7f9b689SLuiz Capitulino        .params     = "aclname match",
1420d7f9b689SLuiz Capitulino        .help       = "remove a match rule from the access control list",
14213e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_acl_remove,
1422d7f9b689SLuiz Capitulino    },
1423d7f9b689SLuiz Capitulino
142415dfcd45SJan KiszkaSTEXI
142515dfcd45SJan Kiszka@item acl_remove @var{aclname} @var{match}
142670fcbbe7SStefan Weil@findex acl_remove
142715dfcd45SJan KiszkaRemove the specified match rule from the access control list.
142815dfcd45SJan KiszkaETEXI
142915dfcd45SJan Kiszka
1430d7f9b689SLuiz Capitulino    {
1431d7f9b689SLuiz Capitulino        .name       = "acl_reset",
1432d7f9b689SLuiz Capitulino        .args_type  = "aclname:s",
1433d7f9b689SLuiz Capitulino        .params     = "aclname",
1434d7f9b689SLuiz Capitulino        .help       = "reset the access control list",
14353e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_acl_reset,
1436d7f9b689SLuiz Capitulino    },
1437d7f9b689SLuiz Capitulino
143815dfcd45SJan KiszkaSTEXI
14390e4aec98SMarkus Armbruster@item acl_reset @var{aclname}
14400e4aec98SMarkus Armbruster@findex acl_reset
144115dfcd45SJan KiszkaRemove all matches from the access control list, and set the default
14422313086aSBlue Swirlpolicy back to @code{deny}.
14432313086aSBlue SwirlETEXI
14442313086aSBlue Swirl
14454057725fSPaolo Bonzini    {
14464057725fSPaolo Bonzini        .name       = "nbd_server_start",
14474057725fSPaolo Bonzini        .args_type  = "all:-a,writable:-w,uri:s",
14484057725fSPaolo Bonzini        .params     = "nbd_server_start [-a] [-w] host:port",
14494057725fSPaolo Bonzini        .help       = "serve block devices on the given host and port",
14504057725fSPaolo Bonzini        .mhandler.cmd = hmp_nbd_server_start,
14514057725fSPaolo Bonzini    },
14524057725fSPaolo BonziniSTEXI
14534057725fSPaolo Bonzini@item nbd_server_start @var{host}:@var{port}
14544057725fSPaolo Bonzini@findex nbd_server_start
14554057725fSPaolo BonziniStart an NBD server on the given host and/or port.  If the @option{-a}
14564057725fSPaolo Bonzinioption is included, all of the virtual machine's block devices that
14574057725fSPaolo Bonzinihave an inserted media on them are automatically exported; in this case,
14584057725fSPaolo Bonzinithe @option{-w} option makes the devices writable too.
14594057725fSPaolo BonziniETEXI
14604057725fSPaolo Bonzini
14614057725fSPaolo Bonzini    {
14624057725fSPaolo Bonzini        .name       = "nbd_server_add",
14634057725fSPaolo Bonzini        .args_type  = "writable:-w,device:B",
14644057725fSPaolo Bonzini        .params     = "nbd_server_add [-w] device",
14654057725fSPaolo Bonzini        .help       = "export a block device via NBD",
14664057725fSPaolo Bonzini        .mhandler.cmd = hmp_nbd_server_add,
14674057725fSPaolo Bonzini    },
14684057725fSPaolo BonziniSTEXI
14694057725fSPaolo Bonzini@item nbd_server_add @var{device}
14704057725fSPaolo Bonzini@findex nbd_server_add
14714057725fSPaolo BonziniExport a block device through QEMU's NBD server, which must be started
14724057725fSPaolo Bonzinibeforehand with @command{nbd_server_start}.  The @option{-w} option makes the
14734057725fSPaolo Bonziniexported device writable too.
14744057725fSPaolo BonziniETEXI
14754057725fSPaolo Bonzini
14764057725fSPaolo Bonzini    {
14774057725fSPaolo Bonzini        .name       = "nbd_server_stop",
14784057725fSPaolo Bonzini        .args_type  = "",
14794057725fSPaolo Bonzini        .params     = "nbd_server_stop",
14804057725fSPaolo Bonzini        .help       = "stop serving block devices using the NBD protocol",
14814057725fSPaolo Bonzini        .mhandler.cmd = hmp_nbd_server_stop,
14824057725fSPaolo Bonzini    },
14834057725fSPaolo BonziniSTEXI
14844057725fSPaolo Bonzini@item nbd_server_stop
14854057725fSPaolo Bonzini@findex nbd_server_stop
14864057725fSPaolo BonziniStop the QEMU embedded NBD server.
14874057725fSPaolo BonziniETEXI
14884057725fSPaolo Bonzini
14894057725fSPaolo Bonzini
149079c4f6b0SHuang Ying#if defined(TARGET_I386)
1491d7f9b689SLuiz Capitulino
1492d7f9b689SLuiz Capitulino    {
1493d7f9b689SLuiz Capitulino        .name       = "mce",
149431ce5e0cSJin Dongming        .args_type  = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
149531ce5e0cSJin Dongming        .params     = "[-b] cpu bank status mcgstatus addr misc",
149631ce5e0cSJin Dongming        .help       = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
14973e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_mce,
1498d7f9b689SLuiz Capitulino    },
1499d7f9b689SLuiz Capitulino
150079c4f6b0SHuang Ying#endif
150179c4f6b0SHuang YingSTEXI
150279c4f6b0SHuang Ying@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
150370fcbbe7SStefan Weil@findex mce (x86)
150479c4f6b0SHuang YingInject an MCE on the given CPU (x86 only).
150579c4f6b0SHuang YingETEXI
150679c4f6b0SHuang Ying
1507d7f9b689SLuiz Capitulino    {
1508d7f9b689SLuiz Capitulino        .name       = "getfd",
1509d7f9b689SLuiz Capitulino        .args_type  = "fdname:s",
1510d7f9b689SLuiz Capitulino        .params     = "getfd name",
1511d7f9b689SLuiz Capitulino        .help       = "receive a file descriptor via SCM rights and assign it a name",
1512208c9d1bSCorey Bryant        .mhandler.cmd = hmp_getfd,
1513d7f9b689SLuiz Capitulino    },
1514d7f9b689SLuiz Capitulino
1515f07918fdSMark McLoughlinSTEXI
1516f07918fdSMark McLoughlin@item getfd @var{fdname}
151770fcbbe7SStefan Weil@findex getfd
1518f07918fdSMark McLoughlinIf a file descriptor is passed alongside this command using the SCM_RIGHTS
1519f07918fdSMark McLoughlinmechanism on unix sockets, it is stored using the name @var{fdname} for
1520f07918fdSMark McLoughlinlater use by other monitor commands.
1521f07918fdSMark McLoughlinETEXI
1522f07918fdSMark McLoughlin
1523d7f9b689SLuiz Capitulino    {
1524d7f9b689SLuiz Capitulino        .name       = "closefd",
1525d7f9b689SLuiz Capitulino        .args_type  = "fdname:s",
1526d7f9b689SLuiz Capitulino        .params     = "closefd name",
1527d7f9b689SLuiz Capitulino        .help       = "close a file descriptor previously passed via SCM rights",
1528208c9d1bSCorey Bryant        .mhandler.cmd = hmp_closefd,
1529d7f9b689SLuiz Capitulino    },
1530d7f9b689SLuiz Capitulino
1531f07918fdSMark McLoughlinSTEXI
1532f07918fdSMark McLoughlin@item closefd @var{fdname}
153370fcbbe7SStefan Weil@findex closefd
1534f07918fdSMark McLoughlinClose the file descriptor previously assigned to @var{fdname} using the
1535f07918fdSMark McLoughlin@code{getfd} command. This is only needed if the file descriptor was never
1536f07918fdSMark McLoughlinused by another monitor command.
1537f07918fdSMark McLoughlinETEXI
1538f07918fdSMark McLoughlin
1539a3a55a2eSLuiz Capitulino    {
1540a3a55a2eSLuiz Capitulino        .name       = "block_passwd",
1541a3a55a2eSLuiz Capitulino        .args_type  = "device:B,password:s",
1542a3a55a2eSLuiz Capitulino        .params     = "block_passwd device password",
1543a3a55a2eSLuiz Capitulino        .help       = "set the password of encrypted block devices",
1544a4dea8a9SLuiz Capitulino        .mhandler.cmd = hmp_block_passwd,
1545a3a55a2eSLuiz Capitulino    },
1546a3a55a2eSLuiz Capitulino
1547a3a55a2eSLuiz CapitulinoSTEXI
1548b76d799eSMarkus Armbruster@item block_passwd @var{device} @var{password}
1549b76d799eSMarkus Armbruster@findex block_passwd
1550b76d799eSMarkus ArmbrusterSet the encrypted device @var{device} password to @var{password}
1551727f005eSZhi Yong WuETEXI
1552727f005eSZhi Yong Wu
1553727f005eSZhi Yong Wu    {
1554727f005eSZhi Yong Wu        .name       = "block_set_io_throttle",
1555727f005eSZhi Yong Wu        .args_type  = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
1556727f005eSZhi Yong Wu        .params     = "device bps bps_rd bps_wr iops iops_rd iops_wr",
1557727f005eSZhi Yong Wu        .help       = "change I/O throttle limits for a block drive",
155880047da5SLuiz Capitulino        .mhandler.cmd = hmp_block_set_io_throttle,
1559727f005eSZhi Yong Wu    },
1560727f005eSZhi Yong Wu
1561727f005eSZhi Yong WuSTEXI
1562b76d799eSMarkus Armbruster@item block_set_io_throttle @var{device} @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}
1563b76d799eSMarkus Armbruster@findex block_set_io_throttle
1564b76d799eSMarkus ArmbrusterChange I/O throttle limits for a block drive to @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}
1565a3a55a2eSLuiz CapitulinoETEXI
1566b40292e7SJan Kiszka
156733572eceSJan Kiszka    {
15687572150cSGerd Hoffmann        .name       = "set_password",
15697572150cSGerd Hoffmann        .args_type  = "protocol:s,password:s,connected:s?",
15707572150cSGerd Hoffmann        .params     = "protocol password action-if-connected",
15717572150cSGerd Hoffmann        .help       = "set spice/vnc password",
1572fbf796fdSLuiz Capitulino        .mhandler.cmd = hmp_set_password,
15737572150cSGerd Hoffmann    },
15747572150cSGerd Hoffmann
15757572150cSGerd HoffmannSTEXI
15767572150cSGerd Hoffmann@item set_password [ vnc | spice ] password [ action-if-connected ]
15777572150cSGerd Hoffmann@findex set_password
15787572150cSGerd HoffmannChange spice/vnc password.  Use zero to make the password stay valid
15797572150cSGerd Hoffmannforever.  @var{action-if-connected} specifies what should happen in
15807572150cSGerd Hoffmanncase a connection is established: @var{fail} makes the password change
15817572150cSGerd Hoffmannfail.  @var{disconnect} changes the password and disconnects the
15827572150cSGerd Hoffmannclient.  @var{keep} changes the password and keeps the connection up.
15837572150cSGerd Hoffmann@var{keep} is the default.
15847572150cSGerd HoffmannETEXI
15857572150cSGerd Hoffmann
15867572150cSGerd Hoffmann    {
15877572150cSGerd Hoffmann        .name       = "expire_password",
15887572150cSGerd Hoffmann        .args_type  = "protocol:s,time:s",
15897572150cSGerd Hoffmann        .params     = "protocol time",
15907572150cSGerd Hoffmann        .help       = "set spice/vnc password expire-time",
15919ad5372dSLuiz Capitulino        .mhandler.cmd = hmp_expire_password,
15927572150cSGerd Hoffmann    },
15937572150cSGerd Hoffmann
15947572150cSGerd HoffmannSTEXI
15957572150cSGerd Hoffmann@item expire_password [ vnc | spice ] expire-time
15967572150cSGerd Hoffmann@findex expire_password
15977572150cSGerd HoffmannSpecify when a password for spice/vnc becomes
15987572150cSGerd Hoffmanninvalid. @var{expire-time} accepts:
15997572150cSGerd Hoffmann
16007572150cSGerd Hoffmann@table @var
16017572150cSGerd Hoffmann@item now
16027572150cSGerd HoffmannInvalidate password instantly.
16037572150cSGerd Hoffmann
16047572150cSGerd Hoffmann@item never
16057572150cSGerd HoffmannPassword stays valid forever.
16067572150cSGerd Hoffmann
16077572150cSGerd Hoffmann@item +nsec
16087572150cSGerd HoffmannPassword stays valid for @var{nsec} seconds starting now.
16097572150cSGerd Hoffmann
16107572150cSGerd Hoffmann@item nsec
16117572150cSGerd HoffmannPassword is invalidated at the given time.  @var{nsec} are the seconds
16127572150cSGerd Hoffmannpassed since 1970, i.e. unix epoch.
16137572150cSGerd Hoffmann
16147572150cSGerd Hoffmann@end table
16157572150cSGerd HoffmannETEXI
16167572150cSGerd Hoffmann
161746920825SGerd Hoffmann    {
161846920825SGerd Hoffmann        .name       = "chardev-add",
161946920825SGerd Hoffmann        .args_type  = "args:s",
162046920825SGerd Hoffmann        .params     = "args",
162146920825SGerd Hoffmann        .help       = "add chardev",
162246920825SGerd Hoffmann        .mhandler.cmd = hmp_chardev_add,
162313e315daSHani Benhabiles        .command_completion = chardev_add_completion,
162446920825SGerd Hoffmann    },
162546920825SGerd Hoffmann
162646920825SGerd HoffmannSTEXI
1627b76d799eSMarkus Armbruster@item chardev-add args
1628b76d799eSMarkus Armbruster@findex chardev-add
162946920825SGerd Hoffmannchardev_add accepts the same parameters as the -chardev command line switch.
163046920825SGerd Hoffmann
163146920825SGerd HoffmannETEXI
163246920825SGerd Hoffmann
163346920825SGerd Hoffmann    {
163446920825SGerd Hoffmann        .name       = "chardev-remove",
163546920825SGerd Hoffmann        .args_type  = "id:s",
163646920825SGerd Hoffmann        .params     = "id",
163746920825SGerd Hoffmann        .help       = "remove chardev",
163846920825SGerd Hoffmann        .mhandler.cmd = hmp_chardev_remove,
16396297d9a2SHani Benhabiles        .command_completion = chardev_remove_completion,
164046920825SGerd Hoffmann    },
164146920825SGerd Hoffmann
164246920825SGerd HoffmannSTEXI
1643b76d799eSMarkus Armbruster@item chardev-remove id
1644b76d799eSMarkus Armbruster@findex chardev-remove
164546920825SGerd HoffmannRemoves the chardev @var{id}.
164646920825SGerd Hoffmann
164746920825SGerd HoffmannETEXI
1648f1088908SGerd Hoffmann
1649f1088908SGerd Hoffmann    {
1650587da2c3SKevin Wolf        .name       = "qemu-io",
1651587da2c3SKevin Wolf        .args_type  = "device:B,command:s",
1652587da2c3SKevin Wolf        .params     = "[device] \"[command]\"",
1653587da2c3SKevin Wolf        .help       = "run a qemu-io command on a block device",
1654587da2c3SKevin Wolf        .mhandler.cmd = hmp_qemu_io,
1655587da2c3SKevin Wolf    },
1656587da2c3SKevin Wolf
1657587da2c3SKevin WolfSTEXI
1658587da2c3SKevin Wolf@item qemu-io @var{device} @var{command}
1659587da2c3SKevin Wolf@findex qemu-io
1660587da2c3SKevin WolfExecutes a qemu-io command on the given block device.
1661587da2c3SKevin Wolf
1662587da2c3SKevin WolfETEXI
1663587da2c3SKevin Wolf
1664587da2c3SKevin Wolf    {
1665abf23329SJason J. Herne        .name       = "cpu-add",
1666abf23329SJason J. Herne        .args_type  = "id:i",
1667abf23329SJason J. Herne        .params     = "id",
1668abf23329SJason J. Herne        .help       = "add cpu",
1669abf23329SJason J. Herne        .mhandler.cmd  = hmp_cpu_add,
1670abf23329SJason J. Herne    },
1671abf23329SJason J. Herne
1672abf23329SJason J. HerneSTEXI
1673abf23329SJason J. Herne@item cpu-add @var{id}
1674b76d799eSMarkus Armbruster@findex cpu-add
1675abf23329SJason J. HerneAdd CPU with id @var{id}
1676abf23329SJason J. HerneETEXI
1677abf23329SJason J. Herne
1678abf23329SJason J. Herne    {
167989d7fa9eSAndreas Färber        .name       = "qom-list",
168089d7fa9eSAndreas Färber        .args_type  = "path:s?",
168189d7fa9eSAndreas Färber        .params     = "path",
168289d7fa9eSAndreas Färber        .help       = "list QOM properties",
168389d7fa9eSAndreas Färber        .mhandler.cmd  = hmp_qom_list,
168489d7fa9eSAndreas Färber    },
168589d7fa9eSAndreas Färber
168689d7fa9eSAndreas FärberSTEXI
168789d7fa9eSAndreas Färber@item qom-list [@var{path}]
168889d7fa9eSAndreas FärberPrint QOM properties of object at location @var{path}
168989d7fa9eSAndreas FärberETEXI
169089d7fa9eSAndreas Färber
169189d7fa9eSAndreas Färber    {
1692c0e6ee9eSAndreas Färber        .name       = "qom-set",
1693c0e6ee9eSAndreas Färber        .args_type  = "path:s,property:s,value:s",
1694c0e6ee9eSAndreas Färber        .params     = "path property value",
1695c0e6ee9eSAndreas Färber        .help       = "set QOM property",
1696c0e6ee9eSAndreas Färber        .mhandler.cmd  = hmp_qom_set,
1697c0e6ee9eSAndreas Färber    },
1698c0e6ee9eSAndreas Färber
1699c0e6ee9eSAndreas FärberSTEXI
1700c0e6ee9eSAndreas Färber@item qom-set @var{path} @var{property} @var{value}
1701c0e6ee9eSAndreas FärberSet QOM property @var{property} of object at location @var{path} to value @var{value}
1702c0e6ee9eSAndreas FärberETEXI
1703c0e6ee9eSAndreas Färber
1704c0e6ee9eSAndreas Färber    {
170533572eceSJan Kiszka        .name       = "info",
170633572eceSJan Kiszka        .args_type  = "item:s?",
170733572eceSJan Kiszka        .params     = "[subcommand]",
170833572eceSJan Kiszka        .help       = "show various information about the system state",
17093e5a50d6SMarkus Armbruster        .mhandler.cmd = hmp_info_help,
171084c44613SWenchao Xia        .sub_table = info_cmds,
171133572eceSJan Kiszka    },
171233572eceSJan Kiszka
171333572eceSJan KiszkaSTEXI
171433572eceSJan Kiszka@item info @var{subcommand}
171533572eceSJan Kiszka@findex info
171633572eceSJan KiszkaShow various information about the system state.
171733572eceSJan Kiszka
171833572eceSJan Kiszka@table @option
171933572eceSJan Kiszka@item info version
172033572eceSJan Kiszkashow the version of QEMU
172133572eceSJan Kiszka@item info network
172233572eceSJan Kiszkashow the various VLANs and the associated devices
172333572eceSJan Kiszka@item info chardev
172433572eceSJan Kiszkashow the character devices
172533572eceSJan Kiszka@item info block
172633572eceSJan Kiszkashow the block devices
172733572eceSJan Kiszka@item info blockstats
172833572eceSJan Kiszkashow block device statistics
172933572eceSJan Kiszka@item info registers
173033572eceSJan Kiszkashow the cpu registers
173133572eceSJan Kiszka@item info cpus
173233572eceSJan Kiszkashow infos for each CPU
173333572eceSJan Kiszka@item info history
173433572eceSJan Kiszkashow the command line history
173533572eceSJan Kiszka@item info irq
173633572eceSJan Kiszkashow the interrupts statistics (if available)
173733572eceSJan Kiszka@item info pic
173833572eceSJan Kiszkashow i8259 (PIC) state
173933572eceSJan Kiszka@item info pci
174033572eceSJan Kiszkashow emulated PCI device info
174133572eceSJan Kiszka@item info tlb
1742692f737cSMax Filippovshow virtual to physical memory mappings (i386, SH4, SPARC, PPC, and Xtensa only)
174333572eceSJan Kiszka@item info mem
174433572eceSJan Kiszkashow the active virtual memory mappings (i386 only)
174533572eceSJan Kiszka@item info jit
174633572eceSJan Kiszkashow dynamic compiler info
174733572eceSJan Kiszka@item info numa
174833572eceSJan Kiszkashow NUMA information
1749b40292e7SJan Kiszka@item info kvm
1750b40292e7SJan Kiszkashow KVM information
175133572eceSJan Kiszka@item info usb
175233572eceSJan Kiszkashow USB devices plugged on the virtual USB hub
175333572eceSJan Kiszka@item info usbhost
175433572eceSJan Kiszkashow all USB host devices
175533572eceSJan Kiszka@item info profile
175633572eceSJan Kiszkashow profiling information
175733572eceSJan Kiszka@item info capture
175833572eceSJan Kiszkashow information about active capturing
175933572eceSJan Kiszka@item info snapshots
176033572eceSJan Kiszkashow list of VM snapshots
176133572eceSJan Kiszka@item info status
176233572eceSJan Kiszkashow the current VM status (running|paused)
176333572eceSJan Kiszka@item info mice
176433572eceSJan Kiszkashow which guest mouse is receiving events
176533572eceSJan Kiszka@item info vnc
176633572eceSJan Kiszkashow the vnc server status
176733572eceSJan Kiszka@item info name
176833572eceSJan Kiszkashow the current VM name
176933572eceSJan Kiszka@item info uuid
177033572eceSJan Kiszkashow the current VM UUID
177133572eceSJan Kiszka@item info cpustats
177233572eceSJan Kiszkashow CPU statistics
177333572eceSJan Kiszka@item info usernet
177433572eceSJan Kiszkashow user network stack connection states
177533572eceSJan Kiszka@item info migrate
177633572eceSJan Kiszkashow migration status
1777bbf6da32SOrit Wasserman@item info migrate_capabilities
1778bbf6da32SOrit Wassermanshow current migration capabilities
1779*50e9a629SLiang Li@item info migrate_parameters
1780*50e9a629SLiang Lishow current migration parameters
17819e1ba4ccSOrit Wasserman@item info migrate_cache_size
17829e1ba4ccSOrit Wassermanshow current migration XBZRLE cache size
178333572eceSJan Kiszka@item info balloon
178433572eceSJan Kiszkashow balloon information
178533572eceSJan Kiszka@item info qtree
178633572eceSJan Kiszkashow device tree
178733572eceSJan Kiszka@item info qdm
178833572eceSJan Kiszkashow qdev device model list
1789a01ff75fSAndreas Färber@item info qom-tree
1790a01ff75fSAndreas Färbershow object composition tree
179133572eceSJan Kiszka@item info roms
179233572eceSJan Kiszkashow roms
1793d1a0cf73SStefan Berger@item info tpm
1794d1a0cf73SStefan Bergershow the TPM device
1795a631892fSZhu Guihua@item info memory-devices
1796a631892fSZhu Guihuashow the memory devices
179733572eceSJan Kiszka@end table
179833572eceSJan KiszkaETEXI
179933572eceSJan Kiszka
180031965ae2SLluísSTEXI
180122890ab5SPrerna Saxena@item info trace-events
180222890ab5SPrerna Saxenashow available trace events and their state
180322890ab5SPrerna SaxenaETEXI
180422890ab5SPrerna Saxena
18052313086aSBlue SwirlSTEXI
18062313086aSBlue Swirl@end table
18072313086aSBlue SwirlETEXI
1808