xref: /qemu/hmp-commands.hx (revision ddd6b45ce25281a5894e2df0f7af014e83af19f7)
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",
31af4ce882SLuiz Capitulino        .mhandler.cmd = do_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",
50b223f35fSLuiz Capitulino        .user_print = monitor_user_noop,
517a7f325eSLuiz Capitulino        .mhandler.cmd = hmp_quit,
52d7f9b689SLuiz Capitulino    },
53d7f9b689SLuiz Capitulino
542313086aSBlue SwirlSTEXI
552313086aSBlue Swirl@item q or quit
5670fcbbe7SStefan Weil@findex quit
572313086aSBlue SwirlQuit the emulator.
582313086aSBlue SwirlETEXI
592313086aSBlue Swirl
60d7f9b689SLuiz Capitulino    {
616d4a2b3aSChristoph Hellwig        .name       = "block_resize",
626d4a2b3aSChristoph Hellwig        .args_type  = "device:B,size:o",
636d4a2b3aSChristoph Hellwig        .params     = "device size",
646d4a2b3aSChristoph Hellwig        .help       = "resize a block image",
655e7caacbSLuiz Capitulino        .mhandler.cmd = hmp_block_resize,
666d4a2b3aSChristoph Hellwig    },
676d4a2b3aSChristoph Hellwig
686d4a2b3aSChristoph HellwigSTEXI
696d4a2b3aSChristoph Hellwig@item block_resize
706d4a2b3aSChristoph Hellwig@findex block_resize
716d4a2b3aSChristoph HellwigResize a block image while a guest is running.  Usually requires guest
726d4a2b3aSChristoph Hellwigaction to see the updated size.  Resize to a lower size is supported,
736d4a2b3aSChristoph Hellwigbut should be used with extreme caution.  Note that this command only
746d4a2b3aSChristoph Hellwigresizes image files, it can not resize block devices like LVM volumes.
756d4a2b3aSChristoph HellwigETEXI
766d4a2b3aSChristoph Hellwig
7712bd451fSStefan Hajnoczi    {
7812bd451fSStefan Hajnoczi        .name       = "block_stream",
79c83c66c3SStefan Hajnoczi        .args_type  = "device:B,speed:o?,base:s?",
80c83c66c3SStefan Hajnoczi        .params     = "device [speed [base]]",
8112bd451fSStefan Hajnoczi        .help       = "copy data from a backing file into a block device",
8212bd451fSStefan Hajnoczi        .mhandler.cmd = hmp_block_stream,
8312bd451fSStefan Hajnoczi    },
8412bd451fSStefan Hajnoczi
8512bd451fSStefan HajnocziSTEXI
8612bd451fSStefan Hajnoczi@item block_stream
8712bd451fSStefan Hajnoczi@findex block_stream
8812bd451fSStefan HajnocziCopy data from a backing file into a block device.
8912bd451fSStefan HajnocziETEXI
906d4a2b3aSChristoph Hellwig
916d4a2b3aSChristoph Hellwig    {
922d47c6e9SStefan Hajnoczi        .name       = "block_job_set_speed",
93882ec7ceSStefan Hajnoczi        .args_type  = "device:B,speed:o",
94882ec7ceSStefan Hajnoczi        .params     = "device speed",
952d47c6e9SStefan Hajnoczi        .help       = "set maximum speed for a background block operation",
962d47c6e9SStefan Hajnoczi        .mhandler.cmd = hmp_block_job_set_speed,
972d47c6e9SStefan Hajnoczi    },
982d47c6e9SStefan Hajnoczi
992d47c6e9SStefan HajnocziSTEXI
1004451b799SPaolo Bonzini@item block_job_set_speed
1014451b799SPaolo Bonzini@findex block_job_set_speed
1022d47c6e9SStefan HajnocziSet maximum speed for a background block operation.
1032d47c6e9SStefan HajnocziETEXI
1042d47c6e9SStefan Hajnoczi
1052d47c6e9SStefan Hajnoczi    {
106370521a1SStefan Hajnoczi        .name       = "block_job_cancel",
1076e37fb81SPaolo Bonzini        .args_type  = "force:-f,device:B",
1086e37fb81SPaolo Bonzini        .params     = "[-f] device",
1096e37fb81SPaolo Bonzini        .help       = "stop an active background block operation (use -f"
1106e37fb81SPaolo Bonzini                      "\n\t\t\t if the operation is currently paused)",
111370521a1SStefan Hajnoczi        .mhandler.cmd = hmp_block_job_cancel,
112370521a1SStefan Hajnoczi    },
113370521a1SStefan Hajnoczi
114370521a1SStefan HajnocziSTEXI
115370521a1SStefan Hajnoczi@item block_job_cancel
116370521a1SStefan Hajnoczi@findex block_job_cancel
117aeae883bSPaolo BonziniStop an active background block operation (streaming, mirroring).
118aeae883bSPaolo BonziniETEXI
119aeae883bSPaolo Bonzini
120aeae883bSPaolo Bonzini    {
121aeae883bSPaolo Bonzini        .name       = "block_job_complete",
122aeae883bSPaolo Bonzini        .args_type  = "device:B",
123aeae883bSPaolo Bonzini        .params     = "device",
124aeae883bSPaolo Bonzini        .help       = "stop an active background block operation",
125aeae883bSPaolo Bonzini        .mhandler.cmd = hmp_block_job_complete,
126aeae883bSPaolo Bonzini    },
127aeae883bSPaolo Bonzini
128aeae883bSPaolo BonziniSTEXI
129aeae883bSPaolo Bonzini@item block_job_complete
130aeae883bSPaolo Bonzini@findex block_job_complete
131aeae883bSPaolo BonziniManually trigger completion of an active background block operation.
132aeae883bSPaolo BonziniFor mirroring, this will switch the device to the destination path.
133370521a1SStefan HajnocziETEXI
134370521a1SStefan Hajnoczi
135370521a1SStefan Hajnoczi    {
1366e37fb81SPaolo Bonzini        .name       = "block_job_pause",
1376e37fb81SPaolo Bonzini        .args_type  = "device:B",
1386e37fb81SPaolo Bonzini        .params     = "device",
1396e37fb81SPaolo Bonzini        .help       = "pause an active background block operation",
1406e37fb81SPaolo Bonzini        .mhandler.cmd = hmp_block_job_pause,
1416e37fb81SPaolo Bonzini    },
1426e37fb81SPaolo Bonzini
1436e37fb81SPaolo BonziniSTEXI
1446e37fb81SPaolo Bonzini@item block_job_pause
1456e37fb81SPaolo Bonzini@findex block_job_pause
1466e37fb81SPaolo BonziniPause an active block streaming operation.
1476e37fb81SPaolo BonziniETEXI
1486e37fb81SPaolo Bonzini
1496e37fb81SPaolo Bonzini    {
1506e37fb81SPaolo Bonzini        .name       = "block_job_resume",
1516e37fb81SPaolo Bonzini        .args_type  = "device:B",
1526e37fb81SPaolo Bonzini        .params     = "device",
1536e37fb81SPaolo Bonzini        .help       = "resume a paused background block operation",
1546e37fb81SPaolo Bonzini        .mhandler.cmd = hmp_block_job_resume,
1556e37fb81SPaolo Bonzini    },
1566e37fb81SPaolo Bonzini
1576e37fb81SPaolo BonziniSTEXI
1586e37fb81SPaolo Bonzini@item block_job_resume
1596e37fb81SPaolo Bonzini@findex block_job_resume
1606e37fb81SPaolo BonziniResume a paused block streaming operation.
1616e37fb81SPaolo BonziniETEXI
1626e37fb81SPaolo Bonzini
1636e37fb81SPaolo Bonzini    {
164d7f9b689SLuiz Capitulino        .name       = "eject",
16578d714e0SLuiz Capitulino        .args_type  = "force:-f,device:B",
166d7f9b689SLuiz Capitulino        .params     = "[-f] device",
167d7f9b689SLuiz Capitulino        .help       = "eject a removable medium (use -f to force it)",
168c245b6a3SLuiz Capitulino        .mhandler.cmd = hmp_eject,
169d7f9b689SLuiz Capitulino    },
170d7f9b689SLuiz Capitulino
1712313086aSBlue SwirlSTEXI
1722313086aSBlue Swirl@item eject [-f] @var{device}
17370fcbbe7SStefan Weil@findex eject
1742313086aSBlue SwirlEject a removable medium (use -f to force it).
1752313086aSBlue SwirlETEXI
1762313086aSBlue Swirl
177d7f9b689SLuiz Capitulino    {
1789063f814SRyan Harper        .name       = "drive_del",
179f7bdc41aSHani Benhabiles        .args_type  = "id:B",
1809063f814SRyan Harper        .params     = "device",
1819063f814SRyan Harper        .help       = "remove host block device",
1829063f814SRyan Harper        .user_print = monitor_user_noop,
1839063f814SRyan Harper        .mhandler.cmd_new = do_drive_del,
1849063f814SRyan Harper    },
1859063f814SRyan Harper
1869063f814SRyan HarperSTEXI
1879063f814SRyan Harper@item drive_del @var{device}
1889063f814SRyan Harper@findex drive_del
1899063f814SRyan HarperRemove host block device.  The result is that guest generated IO is no longer
1909063f814SRyan Harpersubmitted against the host device underlying the disk.  Once a drive has
1919063f814SRyan Harperbeen deleted, the QEMU Block layer returns -EIO which results in IO
1929063f814SRyan Harpererrors in the guest for applications that are reading/writing to the device.
193293c51a6SStefan HajnocziThese errors are always reported to the guest, regardless of the drive's error
194293c51a6SStefan Hajnocziactions (drive options rerror, werror).
1959063f814SRyan HarperETEXI
1969063f814SRyan Harper
1979063f814SRyan Harper    {
198d7f9b689SLuiz Capitulino        .name       = "change",
199d7f9b689SLuiz Capitulino        .args_type  = "device:B,target:F,arg:s?",
200d7f9b689SLuiz Capitulino        .params     = "device filename [format]",
201d7f9b689SLuiz Capitulino        .help       = "change a removable medium, optional format",
202333a96ecSLuiz Capitulino        .mhandler.cmd = hmp_change,
203d7f9b689SLuiz Capitulino    },
204d7f9b689SLuiz Capitulino
2052313086aSBlue SwirlSTEXI
2062313086aSBlue Swirl@item change @var{device} @var{setting}
20770fcbbe7SStefan Weil@findex change
2082313086aSBlue Swirl
2092313086aSBlue SwirlChange the configuration of a device.
2102313086aSBlue Swirl
2112313086aSBlue Swirl@table @option
2122313086aSBlue Swirl@item change @var{diskdevice} @var{filename} [@var{format}]
2132313086aSBlue SwirlChange the medium for a removable disk device to point to @var{filename}. eg
2142313086aSBlue Swirl
2152313086aSBlue Swirl@example
2162313086aSBlue Swirl(qemu) change ide1-cd0 /path/to/some.iso
2172313086aSBlue Swirl@end example
2182313086aSBlue Swirl
2192313086aSBlue Swirl@var{format} is optional.
2202313086aSBlue Swirl
2212313086aSBlue Swirl@item change vnc @var{display},@var{options}
2222313086aSBlue SwirlChange the configuration of the VNC server. The valid syntax for @var{display}
2232313086aSBlue Swirland @var{options} are described at @ref{sec_invocation}. eg
2242313086aSBlue Swirl
2252313086aSBlue Swirl@example
2262313086aSBlue Swirl(qemu) change vnc localhost:1
2272313086aSBlue Swirl@end example
2282313086aSBlue Swirl
2292313086aSBlue Swirl@item change vnc password [@var{password}]
2302313086aSBlue Swirl
2312313086aSBlue SwirlChange the password associated with the VNC server. If the new password is not
2322313086aSBlue Swirlsupplied, the monitor will prompt for it to be entered. VNC passwords are only
2332313086aSBlue Swirlsignificant up to 8 letters. eg
2342313086aSBlue Swirl
2352313086aSBlue Swirl@example
2362313086aSBlue Swirl(qemu) change vnc password
2372313086aSBlue SwirlPassword: ********
2382313086aSBlue Swirl@end example
2392313086aSBlue Swirl
2402313086aSBlue Swirl@end table
2412313086aSBlue SwirlETEXI
2422313086aSBlue Swirl
243d7f9b689SLuiz Capitulino    {
244d7f9b689SLuiz Capitulino        .name       = "screendump",
245d7f9b689SLuiz Capitulino        .args_type  = "filename:F",
246d7f9b689SLuiz Capitulino        .params     = "filename",
247d7f9b689SLuiz Capitulino        .help       = "save screen into PPM image 'filename'",
248ad39cf6dSLuiz Capitulino        .mhandler.cmd = hmp_screen_dump,
249d7f9b689SLuiz Capitulino    },
250d7f9b689SLuiz Capitulino
2512313086aSBlue SwirlSTEXI
2522313086aSBlue Swirl@item screendump @var{filename}
25370fcbbe7SStefan Weil@findex screendump
2542313086aSBlue SwirlSave screen into PPM image @var{filename}.
2552313086aSBlue SwirlETEXI
2562313086aSBlue Swirl
257d7f9b689SLuiz Capitulino    {
258d7f9b689SLuiz Capitulino        .name       = "logfile",
259d7f9b689SLuiz Capitulino        .args_type  = "filename:F",
260d7f9b689SLuiz Capitulino        .params     = "filename",
261d7f9b689SLuiz Capitulino        .help       = "output logs to 'filename'",
262af4ce882SLuiz Capitulino        .mhandler.cmd = do_logfile,
263d7f9b689SLuiz Capitulino    },
264d7f9b689SLuiz Capitulino
2652313086aSBlue SwirlSTEXI
2662313086aSBlue Swirl@item logfile @var{filename}
26770fcbbe7SStefan Weil@findex logfile
2682313086aSBlue SwirlOutput logs to @var{filename}.
2692313086aSBlue SwirlETEXI
2702313086aSBlue Swirl
27122890ab5SPrerna Saxena    {
27222890ab5SPrerna Saxena        .name       = "trace-event",
27322890ab5SPrerna Saxena        .args_type  = "name:s,option:b",
27422890ab5SPrerna Saxena        .params     = "name on|off",
27522890ab5SPrerna Saxena        .help       = "changes status of a specific trace event",
276fc764105SLluís        .mhandler.cmd = do_trace_event_set_state,
27722890ab5SPrerna Saxena    },
27822890ab5SPrerna Saxena
27922890ab5SPrerna SaxenaSTEXI
28022890ab5SPrerna Saxena@item trace-event
28122890ab5SPrerna Saxena@findex trace-event
28222890ab5SPrerna Saxenachanges status of a trace event
28322890ab5SPrerna SaxenaETEXI
284c5ceb523SStefan Hajnoczi
285c45a8168SMichael Roth#if defined(CONFIG_TRACE_SIMPLE)
286c5ceb523SStefan Hajnoczi    {
287c5ceb523SStefan Hajnoczi        .name       = "trace-file",
288c5ceb523SStefan Hajnoczi        .args_type  = "op:s?,arg:F?",
289c5ceb523SStefan Hajnoczi        .params     = "on|off|flush|set [arg]",
290c5ceb523SStefan Hajnoczi        .help       = "open, close, or flush trace file, or set a new file name",
291c5ceb523SStefan Hajnoczi        .mhandler.cmd = do_trace_file,
292c5ceb523SStefan Hajnoczi    },
293c5ceb523SStefan Hajnoczi
294c5ceb523SStefan HajnocziSTEXI
295c5ceb523SStefan Hajnoczi@item trace-file on|off|flush
296c5ceb523SStefan Hajnoczi@findex trace-file
297c5ceb523SStefan HajnocziOpen, close, or flush the trace file.  If no argument is given, the status of the trace file is displayed.
298c5ceb523SStefan HajnocziETEXI
29922890ab5SPrerna Saxena#endif
30022890ab5SPrerna Saxena
301d7f9b689SLuiz Capitulino    {
302d7f9b689SLuiz Capitulino        .name       = "log",
303d7f9b689SLuiz Capitulino        .args_type  = "items:s",
304d7f9b689SLuiz Capitulino        .params     = "item1[,...]",
305989b697dSPeter Maydell        .help       = "activate logging of the specified items",
306af4ce882SLuiz Capitulino        .mhandler.cmd = do_log,
307d7f9b689SLuiz Capitulino    },
308d7f9b689SLuiz Capitulino
3092313086aSBlue SwirlSTEXI
3102313086aSBlue Swirl@item log @var{item1}[,...]
31170fcbbe7SStefan Weil@findex log
312989b697dSPeter MaydellActivate logging of the specified items.
3132313086aSBlue SwirlETEXI
3142313086aSBlue Swirl
315d7f9b689SLuiz Capitulino    {
316d7f9b689SLuiz Capitulino        .name       = "savevm",
317d7f9b689SLuiz Capitulino        .args_type  = "name:s?",
318d7f9b689SLuiz Capitulino        .params     = "[tag|id]",
319d7f9b689SLuiz Capitulino        .help       = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
320af4ce882SLuiz Capitulino        .mhandler.cmd = do_savevm,
321d7f9b689SLuiz Capitulino    },
322d7f9b689SLuiz Capitulino
3232313086aSBlue SwirlSTEXI
3242313086aSBlue Swirl@item savevm [@var{tag}|@var{id}]
32570fcbbe7SStefan Weil@findex savevm
3262313086aSBlue SwirlCreate a snapshot of the whole virtual machine. If @var{tag} is
3272313086aSBlue Swirlprovided, it is used as human readable identifier. If there is already
3282313086aSBlue Swirla snapshot with the same tag or ID, it is replaced. More info at
3292313086aSBlue Swirl@ref{vm_snapshots}.
3302313086aSBlue SwirlETEXI
3312313086aSBlue Swirl
332d7f9b689SLuiz Capitulino    {
333d7f9b689SLuiz Capitulino        .name       = "loadvm",
334d7f9b689SLuiz Capitulino        .args_type  = "name:s",
335d7f9b689SLuiz Capitulino        .params     = "tag|id",
336d7f9b689SLuiz Capitulino        .help       = "restore a VM snapshot from its tag or id",
337af4ce882SLuiz Capitulino        .mhandler.cmd = do_loadvm,
338d7f9b689SLuiz Capitulino    },
339d7f9b689SLuiz Capitulino
3402313086aSBlue SwirlSTEXI
3412313086aSBlue Swirl@item loadvm @var{tag}|@var{id}
34270fcbbe7SStefan Weil@findex loadvm
3432313086aSBlue SwirlSet the whole virtual machine to the snapshot identified by the tag
3442313086aSBlue Swirl@var{tag} or the unique snapshot ID @var{id}.
3452313086aSBlue SwirlETEXI
3462313086aSBlue Swirl
347d7f9b689SLuiz Capitulino    {
348d7f9b689SLuiz Capitulino        .name       = "delvm",
349d7f9b689SLuiz Capitulino        .args_type  = "name:s",
350d7f9b689SLuiz Capitulino        .params     = "tag|id",
351d7f9b689SLuiz Capitulino        .help       = "delete a VM snapshot from its tag or id",
352af4ce882SLuiz Capitulino        .mhandler.cmd = do_delvm,
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",
366af4ce882SLuiz Capitulino        .mhandler.cmd = do_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'",
423af4ce882SLuiz Capitulino        .mhandler.cmd = do_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'",
437af4ce882SLuiz Capitulino        .mhandler.cmd = do_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'",
451af4ce882SLuiz Capitulino        .mhandler.cmd = do_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 Swirl
5252313086aSBlue SwirlPrint expression value. Only the @var{format} part of @var{fmt} is
5262313086aSBlue Swirlused.
5272313086aSBlue SwirlETEXI
5282313086aSBlue Swirl
529d7f9b689SLuiz Capitulino    {
530d7f9b689SLuiz Capitulino        .name       = "i",
531d7f9b689SLuiz Capitulino        .args_type  = "fmt:/,addr:i,index:i.",
532d7f9b689SLuiz Capitulino        .params     = "/fmt addr",
533d7f9b689SLuiz Capitulino        .help       = "I/O port read",
534af4ce882SLuiz Capitulino        .mhandler.cmd = do_ioport_read,
535d7f9b689SLuiz Capitulino    },
536d7f9b689SLuiz Capitulino
5372313086aSBlue SwirlSTEXI
5382313086aSBlue SwirlRead I/O port.
5392313086aSBlue SwirlETEXI
5402313086aSBlue Swirl
541d7f9b689SLuiz Capitulino    {
542d7f9b689SLuiz Capitulino        .name       = "o",
543d7f9b689SLuiz Capitulino        .args_type  = "fmt:/,addr:i,val:i",
544d7f9b689SLuiz Capitulino        .params     = "/fmt addr value",
545d7f9b689SLuiz Capitulino        .help       = "I/O port write",
546af4ce882SLuiz Capitulino        .mhandler.cmd = do_ioport_write,
547d7f9b689SLuiz Capitulino    },
548d7f9b689SLuiz Capitulino
549f114784fSJan KiszkaSTEXI
550f114784fSJan KiszkaWrite to I/O port.
551f114784fSJan KiszkaETEXI
5522313086aSBlue Swirl
553d7f9b689SLuiz Capitulino    {
554d7f9b689SLuiz Capitulino        .name       = "sendkey",
5552ef20c15SAmos Kong        .args_type  = "keys:s,hold-time:i?",
556d7f9b689SLuiz Capitulino        .params     = "keys [hold_ms]",
557d7f9b689SLuiz Capitulino        .help       = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
558e4c8f004SAmos Kong        .mhandler.cmd = hmp_send_key,
55929136cd8SHani Benhabiles        .command_completion = sendkey_completion,
560d7f9b689SLuiz Capitulino    },
561d7f9b689SLuiz Capitulino
5622313086aSBlue SwirlSTEXI
5632313086aSBlue Swirl@item sendkey @var{keys}
56470fcbbe7SStefan Weil@findex sendkey
5652313086aSBlue Swirl
566886cc706SAmos KongSend @var{keys} to the guest. @var{keys} could be the name of the
567886cc706SAmos Kongkey or the raw value in hexadecimal format. Use @code{-} to press
568886cc706SAmos Kongseveral keys simultaneously. Example:
5692313086aSBlue Swirl@example
5702313086aSBlue Swirlsendkey ctrl-alt-f1
5712313086aSBlue Swirl@end example
5722313086aSBlue Swirl
5732313086aSBlue SwirlThis command is useful to send keys that your graphical user interface
5742313086aSBlue Swirlintercepts at low level, such as @code{ctrl-alt-f1} in X Window.
5752313086aSBlue SwirlETEXI
5762313086aSBlue Swirl
577d7f9b689SLuiz Capitulino    {
578d7f9b689SLuiz Capitulino        .name       = "system_reset",
579d7f9b689SLuiz Capitulino        .args_type  = "",
580d7f9b689SLuiz Capitulino        .params     = "",
581d7f9b689SLuiz Capitulino        .help       = "reset the system",
58238d22653SLuiz Capitulino        .mhandler.cmd = hmp_system_reset,
583d7f9b689SLuiz Capitulino    },
584d7f9b689SLuiz Capitulino
5852313086aSBlue SwirlSTEXI
5862313086aSBlue Swirl@item system_reset
58770fcbbe7SStefan Weil@findex system_reset
5882313086aSBlue Swirl
5892313086aSBlue SwirlReset the system.
5902313086aSBlue SwirlETEXI
5912313086aSBlue Swirl
592d7f9b689SLuiz Capitulino    {
593d7f9b689SLuiz Capitulino        .name       = "system_powerdown",
594d7f9b689SLuiz Capitulino        .args_type  = "",
595d7f9b689SLuiz Capitulino        .params     = "",
596d7f9b689SLuiz Capitulino        .help       = "send system power down event",
5975bc465e4SLuiz Capitulino        .mhandler.cmd = hmp_system_powerdown,
598d7f9b689SLuiz Capitulino    },
599d7f9b689SLuiz Capitulino
6002313086aSBlue SwirlSTEXI
6012313086aSBlue Swirl@item system_powerdown
60270fcbbe7SStefan Weil@findex system_powerdown
6032313086aSBlue Swirl
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",
612af4ce882SLuiz Capitulino        .mhandler.cmd = do_sum,
613d7f9b689SLuiz Capitulino    },
614d7f9b689SLuiz Capitulino
6152313086aSBlue SwirlSTEXI
6162313086aSBlue Swirl@item sum @var{addr} @var{size}
61770fcbbe7SStefan Weil@findex sum
6182313086aSBlue Swirl
6192313086aSBlue SwirlCompute the checksum of a memory region.
6202313086aSBlue SwirlETEXI
6212313086aSBlue Swirl
622d7f9b689SLuiz Capitulino    {
623d7f9b689SLuiz Capitulino        .name       = "usb_add",
624d7f9b689SLuiz Capitulino        .args_type  = "devname:s",
625d7f9b689SLuiz Capitulino        .params     = "device",
626d7f9b689SLuiz Capitulino        .help       = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
627af4ce882SLuiz Capitulino        .mhandler.cmd = do_usb_add,
628d7f9b689SLuiz Capitulino    },
629d7f9b689SLuiz Capitulino
6302313086aSBlue SwirlSTEXI
6312313086aSBlue Swirl@item usb_add @var{devname}
63270fcbbe7SStefan Weil@findex usb_add
6332313086aSBlue Swirl
6342313086aSBlue SwirlAdd the USB device @var{devname}.  For details of available devices see
6352313086aSBlue Swirl@ref{usb_devices}
6362313086aSBlue SwirlETEXI
6372313086aSBlue Swirl
638d7f9b689SLuiz Capitulino    {
639d7f9b689SLuiz Capitulino        .name       = "usb_del",
640d7f9b689SLuiz Capitulino        .args_type  = "devname:s",
641d7f9b689SLuiz Capitulino        .params     = "device",
642d7f9b689SLuiz Capitulino        .help       = "remove USB device 'bus.addr'",
643af4ce882SLuiz Capitulino        .mhandler.cmd = do_usb_del,
644d7f9b689SLuiz Capitulino    },
645d7f9b689SLuiz Capitulino
6462313086aSBlue SwirlSTEXI
6472313086aSBlue Swirl@item usb_del @var{devname}
64870fcbbe7SStefan Weil@findex usb_del
6492313086aSBlue Swirl
6502313086aSBlue SwirlRemove the USB device @var{devname} from the QEMU virtual USB
6512313086aSBlue Swirlhub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
6522313086aSBlue Swirlcommand @code{info usb} to see the devices you can remove.
6532313086aSBlue SwirlETEXI
6542313086aSBlue Swirl
655d7f9b689SLuiz Capitulino    {
656d7f9b689SLuiz Capitulino        .name       = "device_add",
657c7e4e8ceSMarkus Armbruster        .args_type  = "device:O",
658c7e4e8ceSMarkus Armbruster        .params     = "driver[,prop=value][,...]",
659d7f9b689SLuiz Capitulino        .help       = "add device, like -device on the command line",
6608bc27249SMarkus Armbruster        .user_print = monitor_user_noop,
6618bc27249SMarkus Armbruster        .mhandler.cmd_new = do_device_add,
6622da1b3abSHani Benhabiles        .command_completion = device_add_completion,
663d7f9b689SLuiz Capitulino    },
664d7f9b689SLuiz Capitulino
6653418bd25SGerd HoffmannSTEXI
6663418bd25SGerd Hoffmann@item device_add @var{config}
66770fcbbe7SStefan Weil@findex device_add
6683418bd25SGerd Hoffmann
6693418bd25SGerd HoffmannAdd device.
6703418bd25SGerd HoffmannETEXI
6713418bd25SGerd Hoffmann
672d7f9b689SLuiz Capitulino    {
673d7f9b689SLuiz Capitulino        .name       = "device_del",
674d7f9b689SLuiz Capitulino        .args_type  = "id:s",
675d7f9b689SLuiz Capitulino        .params     = "device",
676d7f9b689SLuiz Capitulino        .help       = "remove device",
677a15fef21SLuiz Capitulino        .mhandler.cmd = hmp_device_del,
6782da1b3abSHani Benhabiles        .command_completion = device_del_completion,
679d7f9b689SLuiz Capitulino    },
680d7f9b689SLuiz Capitulino
6813418bd25SGerd HoffmannSTEXI
6823418bd25SGerd Hoffmann@item device_del @var{id}
68370fcbbe7SStefan Weil@findex device_del
6843418bd25SGerd Hoffmann
6853418bd25SGerd HoffmannRemove device @var{id}.
6863418bd25SGerd HoffmannETEXI
6873418bd25SGerd Hoffmann
688d7f9b689SLuiz Capitulino    {
689d7f9b689SLuiz Capitulino        .name       = "cpu",
690d7f9b689SLuiz Capitulino        .args_type  = "index:i",
691d7f9b689SLuiz Capitulino        .params     = "index",
692d7f9b689SLuiz Capitulino        .help       = "set the default CPU",
693755f1968SLuiz Capitulino        .mhandler.cmd = hmp_cpu,
694d7f9b689SLuiz Capitulino    },
6953418bd25SGerd Hoffmann
6962313086aSBlue SwirlSTEXI
697c427ea9cSMarkus Armbruster@item cpu @var{index}
698c427ea9cSMarkus Armbruster@findex cpu
6992313086aSBlue SwirlSet the default CPU.
7002313086aSBlue SwirlETEXI
7012313086aSBlue Swirl
702d7f9b689SLuiz Capitulino    {
703d7f9b689SLuiz Capitulino        .name       = "mouse_move",
704d7f9b689SLuiz Capitulino        .args_type  = "dx_str:s,dy_str:s,dz_str:s?",
705d7f9b689SLuiz Capitulino        .params     = "dx dy [dz]",
706d7f9b689SLuiz Capitulino        .help       = "send mouse move events",
707af4ce882SLuiz Capitulino        .mhandler.cmd = do_mouse_move,
708d7f9b689SLuiz Capitulino    },
709d7f9b689SLuiz Capitulino
7102313086aSBlue SwirlSTEXI
7112313086aSBlue Swirl@item mouse_move @var{dx} @var{dy} [@var{dz}]
71270fcbbe7SStefan Weil@findex mouse_move
7132313086aSBlue SwirlMove the active mouse to the specified coordinates @var{dx} @var{dy}
7142313086aSBlue Swirlwith optional scroll axis @var{dz}.
7152313086aSBlue SwirlETEXI
7162313086aSBlue Swirl
717d7f9b689SLuiz Capitulino    {
718d7f9b689SLuiz Capitulino        .name       = "mouse_button",
719d7f9b689SLuiz Capitulino        .args_type  = "button_state:i",
720d7f9b689SLuiz Capitulino        .params     = "state",
721d7f9b689SLuiz Capitulino        .help       = "change mouse button state (1=L, 2=M, 4=R)",
722af4ce882SLuiz Capitulino        .mhandler.cmd = do_mouse_button,
723d7f9b689SLuiz Capitulino    },
724d7f9b689SLuiz Capitulino
7252313086aSBlue SwirlSTEXI
7262313086aSBlue Swirl@item mouse_button @var{val}
72770fcbbe7SStefan Weil@findex mouse_button
7282313086aSBlue SwirlChange the active mouse button state @var{val} (1=L, 2=M, 4=R).
7292313086aSBlue SwirlETEXI
7302313086aSBlue Swirl
731d7f9b689SLuiz Capitulino    {
732d7f9b689SLuiz Capitulino        .name       = "mouse_set",
733d7f9b689SLuiz Capitulino        .args_type  = "index:i",
734d7f9b689SLuiz Capitulino        .params     = "index",
735d7f9b689SLuiz Capitulino        .help       = "set which mouse device receives events",
736af4ce882SLuiz Capitulino        .mhandler.cmd = do_mouse_set,
737d7f9b689SLuiz Capitulino    },
738d7f9b689SLuiz Capitulino
7392313086aSBlue SwirlSTEXI
7402313086aSBlue Swirl@item mouse_set @var{index}
74170fcbbe7SStefan Weil@findex mouse_set
7422313086aSBlue SwirlSet which mouse device receives events at given @var{index}, index
7432313086aSBlue Swirlcan be obtained with
7442313086aSBlue Swirl@example
7452313086aSBlue Swirlinfo mice
7462313086aSBlue Swirl@end example
7472313086aSBlue SwirlETEXI
7482313086aSBlue Swirl
749d7f9b689SLuiz Capitulino    {
750d7f9b689SLuiz Capitulino        .name       = "wavcapture",
751d7f9b689SLuiz Capitulino        .args_type  = "path:F,freq:i?,bits:i?,nchannels:i?",
752d7f9b689SLuiz Capitulino        .params     = "path [frequency [bits [channels]]]",
753d7f9b689SLuiz Capitulino        .help       = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
754af4ce882SLuiz Capitulino        .mhandler.cmd = do_wav_capture,
755d7f9b689SLuiz Capitulino    },
7562313086aSBlue SwirlSTEXI
7572313086aSBlue Swirl@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
75870fcbbe7SStefan Weil@findex wavcapture
7592313086aSBlue SwirlCapture audio into @var{filename}. Using sample rate @var{frequency}
7602313086aSBlue Swirlbits per sample @var{bits} and number of channels @var{channels}.
7612313086aSBlue Swirl
7622313086aSBlue SwirlDefaults:
7632313086aSBlue Swirl@itemize @minus
7642313086aSBlue Swirl@item Sample rate = 44100 Hz - CD quality
7652313086aSBlue Swirl@item Bits = 16
7662313086aSBlue Swirl@item Number of channels = 2 - Stereo
7672313086aSBlue Swirl@end itemize
7682313086aSBlue SwirlETEXI
7692313086aSBlue Swirl
770d7f9b689SLuiz Capitulino    {
771d7f9b689SLuiz Capitulino        .name       = "stopcapture",
772d7f9b689SLuiz Capitulino        .args_type  = "n:i",
773d7f9b689SLuiz Capitulino        .params     = "capture index",
774d7f9b689SLuiz Capitulino        .help       = "stop capture",
775af4ce882SLuiz Capitulino        .mhandler.cmd = do_stop_capture,
776d7f9b689SLuiz Capitulino    },
7772313086aSBlue SwirlSTEXI
7782313086aSBlue Swirl@item stopcapture @var{index}
77970fcbbe7SStefan Weil@findex stopcapture
7802313086aSBlue SwirlStop capture with a given @var{index}, index can be obtained with
7812313086aSBlue Swirl@example
7822313086aSBlue Swirlinfo capture
7832313086aSBlue Swirl@end example
7842313086aSBlue SwirlETEXI
7852313086aSBlue Swirl
786d7f9b689SLuiz Capitulino    {
787d7f9b689SLuiz Capitulino        .name       = "memsave",
788d7f9b689SLuiz Capitulino        .args_type  = "val:l,size:i,filename:s",
789d7f9b689SLuiz Capitulino        .params     = "addr size file",
790d7f9b689SLuiz Capitulino        .help       = "save to disk virtual memory dump starting at 'addr' of size 'size'",
7910cfd6a9aSLuiz Capitulino        .mhandler.cmd = hmp_memsave,
792d7f9b689SLuiz Capitulino    },
793d7f9b689SLuiz Capitulino
7942313086aSBlue SwirlSTEXI
7952313086aSBlue Swirl@item memsave @var{addr} @var{size} @var{file}
79670fcbbe7SStefan Weil@findex memsave
7972313086aSBlue Swirlsave to disk virtual memory dump starting at @var{addr} of size @var{size}.
7982313086aSBlue SwirlETEXI
7992313086aSBlue Swirl
800d7f9b689SLuiz Capitulino    {
801d7f9b689SLuiz Capitulino        .name       = "pmemsave",
802d7f9b689SLuiz Capitulino        .args_type  = "val:l,size:i,filename:s",
803d7f9b689SLuiz Capitulino        .params     = "addr size file",
804d7f9b689SLuiz Capitulino        .help       = "save to disk physical memory dump starting at 'addr' of size 'size'",
8056d3962bfSLuiz Capitulino        .mhandler.cmd = hmp_pmemsave,
806d7f9b689SLuiz Capitulino    },
807d7f9b689SLuiz Capitulino
8082313086aSBlue SwirlSTEXI
8092313086aSBlue Swirl@item pmemsave @var{addr} @var{size} @var{file}
81070fcbbe7SStefan Weil@findex pmemsave
8112313086aSBlue Swirlsave to disk physical memory dump starting at @var{addr} of size @var{size}.
8122313086aSBlue SwirlETEXI
8132313086aSBlue Swirl
814d7f9b689SLuiz Capitulino    {
815d7f9b689SLuiz Capitulino        .name       = "boot_set",
816d7f9b689SLuiz Capitulino        .args_type  = "bootdevice:s",
817d7f9b689SLuiz Capitulino        .params     = "bootdevice",
818d7f9b689SLuiz Capitulino        .help       = "define new values for the boot device list",
819af4ce882SLuiz Capitulino        .mhandler.cmd = do_boot_set,
820d7f9b689SLuiz Capitulino    },
821d7f9b689SLuiz Capitulino
8222313086aSBlue SwirlSTEXI
8232313086aSBlue Swirl@item boot_set @var{bootdevicelist}
82470fcbbe7SStefan Weil@findex boot_set
8252313086aSBlue Swirl
8262313086aSBlue SwirlDefine new values for the boot device list. Those values will override
8272313086aSBlue Swirlthe values specified on the command line through the @code{-boot} option.
8282313086aSBlue Swirl
8292313086aSBlue SwirlThe values that can be specified here depend on the machine type, but are
8302313086aSBlue Swirlthe same that can be specified in the @code{-boot} command line option.
8312313086aSBlue SwirlETEXI
8322313086aSBlue Swirl
8337f7f9752SEugene (jno) Dvurechenski#if defined(TARGET_I386) || defined(TARGET_S390X)
834d7f9b689SLuiz Capitulino    {
835d7f9b689SLuiz Capitulino        .name       = "nmi",
836e9b4b432SLuiz Capitulino        .args_type  = "",
837e9b4b432SLuiz Capitulino        .params     = "",
838e9b4b432SLuiz Capitulino        .help       = "inject an NMI on all guest's CPUs",
839ab49ab5cSLuiz Capitulino        .mhandler.cmd = hmp_inject_nmi,
840d7f9b689SLuiz Capitulino    },
8412313086aSBlue Swirl#endif
8422313086aSBlue SwirlSTEXI
8432313086aSBlue Swirl@item nmi @var{cpu}
84470fcbbe7SStefan Weil@findex nmi
8457f7f9752SEugene (jno) DvurechenskiInject an NMI (x86) or RESTART (s390x) on the given CPU.
8461f590cf9SLei Li
8471f590cf9SLei LiETEXI
8481f590cf9SLei Li
8491f590cf9SLei Li    {
8503949e594SMarkus Armbruster        .name       = "ringbuf_write",
8511f590cf9SLei Li        .args_type  = "device:s,data:s",
8521f590cf9SLei Li        .params     = "device data",
8533949e594SMarkus Armbruster        .help       = "Write to a ring buffer character device",
8543949e594SMarkus Armbruster        .mhandler.cmd = hmp_ringbuf_write,
8558e597779SHani Benhabiles        .command_completion = ringbuf_write_completion,
8561f590cf9SLei Li    },
8571f590cf9SLei Li
8581f590cf9SLei LiSTEXI
8593949e594SMarkus Armbruster@item ringbuf_write @var{device} @var{data}
8603949e594SMarkus Armbruster@findex ringbuf_write
8613949e594SMarkus ArmbrusterWrite @var{data} to ring buffer character device @var{device}.
8623949e594SMarkus Armbruster@var{data} must be a UTF-8 string.
8631f590cf9SLei Li
8642313086aSBlue SwirlETEXI
8652313086aSBlue Swirl
866d7f9b689SLuiz Capitulino    {
8673949e594SMarkus Armbruster        .name       = "ringbuf_read",
86849b6d722SLei Li        .args_type  = "device:s,size:i",
86949b6d722SLei Li        .params     = "device size",
8703949e594SMarkus Armbruster        .help       = "Read from a ring buffer character device",
8713949e594SMarkus Armbruster        .mhandler.cmd = hmp_ringbuf_read,
8728e597779SHani Benhabiles        .command_completion = ringbuf_write_completion,
87349b6d722SLei Li    },
87449b6d722SLei Li
87549b6d722SLei LiSTEXI
8763949e594SMarkus Armbruster@item ringbuf_read @var{device}
8773949e594SMarkus Armbruster@findex ringbuf_read
8783949e594SMarkus ArmbrusterRead and print up to @var{size} bytes from ring buffer character
8793949e594SMarkus Armbrusterdevice @var{device}.
880543f3412SMarkus ArmbrusterCertain non-printable characters are printed \uXXXX, where XXXX is the
881543f3412SMarkus Armbrustercharacter code in hexadecimal.  Character \ is printed \\.
8823949e594SMarkus ArmbrusterBug: can screw up when the buffer contains invalid UTF-8 sequences,
8833949e594SMarkus ArmbrusterNUL characters, after the ring buffer lost data, and when reading
8843949e594SMarkus Armbrusterstops because the size limit is reached.
88549b6d722SLei Li
88649b6d722SLei LiETEXI
88749b6d722SLei Li
88849b6d722SLei Li    {
889d7f9b689SLuiz Capitulino        .name       = "migrate",
890fbc3d96cSlirans@il.ibm.com        .args_type  = "detach:-d,blk:-b,inc:-i,uri:s",
891fbc3d96cSlirans@il.ibm.com        .params     = "[-d] [-b] [-i] uri",
892fbc3d96cSlirans@il.ibm.com        .help       = "migrate to URI (using -d to not wait for completion)"
893fbc3d96cSlirans@il.ibm.com		      "\n\t\t\t -b for migration without shared storage with"
894fbc3d96cSlirans@il.ibm.com		      " full copy of disk\n\t\t\t -i for migration without "
895fbc3d96cSlirans@il.ibm.com		      "shared storage with incremental copy of disk "
896fbc3d96cSlirans@il.ibm.com		      "(base image shared between src and destination)",
897e1c37d0eSLuiz Capitulino        .mhandler.cmd = hmp_migrate,
898d7f9b689SLuiz Capitulino    },
899d7f9b689SLuiz Capitulino
900fbc3d96cSlirans@il.ibm.com
9012313086aSBlue SwirlSTEXI
902fbc3d96cSlirans@il.ibm.com@item migrate [-d] [-b] [-i] @var{uri}
90370fcbbe7SStefan Weil@findex migrate
9042313086aSBlue SwirlMigrate to @var{uri} (using -d to not wait for completion).
905fbc3d96cSlirans@il.ibm.com	-b for migration with full copy of disk
906fbc3d96cSlirans@il.ibm.com	-i for migration with incremental copy of disk (base image is shared)
9072313086aSBlue SwirlETEXI
9082313086aSBlue Swirl
909d7f9b689SLuiz Capitulino    {
910d7f9b689SLuiz Capitulino        .name       = "migrate_cancel",
911d7f9b689SLuiz Capitulino        .args_type  = "",
912d7f9b689SLuiz Capitulino        .params     = "",
913d7f9b689SLuiz Capitulino        .help       = "cancel the current VM migration",
9146cdedb07SLuiz Capitulino        .mhandler.cmd = hmp_migrate_cancel,
915d7f9b689SLuiz Capitulino    },
916d7f9b689SLuiz Capitulino
9172313086aSBlue SwirlSTEXI
9182313086aSBlue Swirl@item migrate_cancel
91970fcbbe7SStefan Weil@findex migrate_cancel
9202313086aSBlue SwirlCancel the current VM migration.
9219e1ba4ccSOrit Wasserman
9229e1ba4ccSOrit WassermanETEXI
9239e1ba4ccSOrit Wasserman
9249e1ba4ccSOrit Wasserman    {
9259e1ba4ccSOrit Wasserman        .name       = "migrate_set_cache_size",
9269e1ba4ccSOrit Wasserman        .args_type  = "value:o",
9279e1ba4ccSOrit Wasserman        .params     = "value",
9289e1ba4ccSOrit Wasserman        .help       = "set cache size (in bytes) for XBZRLE migrations,"
9299e1ba4ccSOrit Wasserman                      "the cache size will be rounded down to the nearest "
9309e1ba4ccSOrit Wasserman                      "power of 2.\n"
9319e1ba4ccSOrit Wasserman                      "The cache size affects the number of cache misses."
9329e1ba4ccSOrit Wasserman                      "In case of a high cache miss ratio you need to increase"
9339e1ba4ccSOrit Wasserman                      " the cache size",
9349e1ba4ccSOrit Wasserman        .mhandler.cmd = hmp_migrate_set_cache_size,
9359e1ba4ccSOrit Wasserman    },
9369e1ba4ccSOrit Wasserman
9379e1ba4ccSOrit WassermanSTEXI
9389e1ba4ccSOrit Wasserman@item migrate_set_cache_size @var{value}
9399e1ba4ccSOrit Wasserman@findex migrate_set_cache_size
9409e1ba4ccSOrit WassermanSet cache size to @var{value} (in bytes) for xbzrle migrations.
9412313086aSBlue SwirlETEXI
9422313086aSBlue Swirl
943d7f9b689SLuiz Capitulino    {
944d7f9b689SLuiz Capitulino        .name       = "migrate_set_speed",
945ed3d4a80SJes Sorensen        .args_type  = "value:o",
946d7f9b689SLuiz Capitulino        .params     = "value",
947ed3d4a80SJes Sorensen        .help       = "set maximum speed (in bytes) for migrations. "
948ed3d4a80SJes Sorensen	"Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
9493dc85383SLuiz Capitulino        .mhandler.cmd = hmp_migrate_set_speed,
950d7f9b689SLuiz Capitulino    },
951d7f9b689SLuiz Capitulino
9522313086aSBlue SwirlSTEXI
9532313086aSBlue Swirl@item migrate_set_speed @var{value}
95470fcbbe7SStefan Weil@findex migrate_set_speed
9552313086aSBlue SwirlSet maximum speed to @var{value} (in bytes) for migrations.
9562313086aSBlue SwirlETEXI
9572313086aSBlue Swirl
958d7f9b689SLuiz Capitulino    {
959d7f9b689SLuiz Capitulino        .name       = "migrate_set_downtime",
960b0fbf7d3SMarkus Armbruster        .args_type  = "value:T",
961d7f9b689SLuiz Capitulino        .params     = "value",
962d7f9b689SLuiz Capitulino        .help       = "set maximum tolerated downtime (in seconds) for migrations",
9634f0a993bSLuiz Capitulino        .mhandler.cmd = hmp_migrate_set_downtime,
964d7f9b689SLuiz Capitulino    },
9652ea42952SGlauber Costa
9662ea42952SGlauber CostaSTEXI
9672ea42952SGlauber Costa@item migrate_set_downtime @var{second}
96870fcbbe7SStefan Weil@findex migrate_set_downtime
9692ea42952SGlauber CostaSet maximum tolerated downtime (in seconds) for migration.
9702ea42952SGlauber CostaETEXI
9712ea42952SGlauber Costa
972f8882568SJes Sorensen    {
97300458433SOrit Wasserman        .name       = "migrate_set_capability",
97400458433SOrit Wasserman        .args_type  = "capability:s,state:b",
97500458433SOrit Wasserman        .params     = "capability state",
97600458433SOrit Wasserman        .help       = "Enable/Disable the usage of a capability for migration",
97700458433SOrit Wasserman        .mhandler.cmd = hmp_migrate_set_capability,
978c68a0409SHani Benhabiles        .command_completion = migrate_set_capability_completion,
97900458433SOrit Wasserman    },
98000458433SOrit Wasserman
98100458433SOrit WassermanSTEXI
98200458433SOrit Wasserman@item migrate_set_capability @var{capability} @var{state}
98300458433SOrit Wasserman@findex migrate_set_capability
98400458433SOrit WassermanEnable/Disable the usage of a capability @var{capability} for migration.
98500458433SOrit WassermanETEXI
98600458433SOrit Wasserman
98700458433SOrit Wasserman    {
9882ea720dbSJes Sorensen        .name       = "client_migrate_info",
9892ea720dbSJes Sorensen        .args_type  = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
9902ea720dbSJes Sorensen        .params     = "protocol hostname port tls-port cert-subject",
9912ea720dbSJes Sorensen        .help       = "send migration info to spice/vnc client",
9922ea720dbSJes Sorensen        .user_print = monitor_user_noop,
993edc5cb1aSYonit Halperin        .mhandler.cmd_async = client_migrate_info,
994edc5cb1aSYonit Halperin        .flags      = MONITOR_CMD_ASYNC,
995f8882568SJes Sorensen    },
996f8882568SJes Sorensen
997f8882568SJes SorensenSTEXI
998e866e239SGerd Hoffmann@item client_migrate_info @var{protocol} @var{hostname} @var{port} @var{tls-port} @var{cert-subject}
999e866e239SGerd Hoffmann@findex client_migrate_info
1000e866e239SGerd HoffmannSet the spice/vnc connection info for the migration target.  The spice/vnc
1001e866e239SGerd Hoffmannserver will ask the spice/vnc client to automatically reconnect using the
1002e866e239SGerd Hoffmannnew parameters (if specified) once the vm migration finished successfully.
1003e866e239SGerd HoffmannETEXI
1004e866e239SGerd Hoffmann
1005783e9b48SWen Congyang    {
1006783e9b48SWen Congyang        .name       = "dump-guest-memory",
10071b7a0f75SQiao Nuohan        .args_type  = "paging:-p,zlib:-z,lzo:-l,snappy:-s,filename:F,begin:i?,length:i?",
10081b7a0f75SQiao Nuohan        .params     = "[-p] [-z|-l|-s] filename [begin length]",
1009c20499d9SQiao Nuohan        .help       = "dump guest memory into file 'filename'.\n\t\t\t"
1010c20499d9SQiao Nuohan                      "-p: do paging to get guest's memory mapping.\n\t\t\t"
10111b7a0f75SQiao Nuohan                      "-z: dump in kdump-compressed format, with zlib compression.\n\t\t\t"
10121b7a0f75SQiao Nuohan                      "-l: dump in kdump-compressed format, with lzo compression.\n\t\t\t"
10131b7a0f75SQiao Nuohan                      "-s: dump in kdump-compressed format, with snappy compression.\n\t\t\t"
1014c20499d9SQiao Nuohan                      "begin: the starting physical address.\n\t\t\t"
1015c20499d9SQiao Nuohan                      "length: the memory size, in bytes.",
1016783e9b48SWen Congyang        .mhandler.cmd = hmp_dump_guest_memory,
1017783e9b48SWen Congyang    },
1018783e9b48SWen Congyang
1019783e9b48SWen Congyang
1020783e9b48SWen CongyangSTEXI
1021c20499d9SQiao Nuohan@item dump-guest-memory [-p] @var{filename} @var{begin} @var{length}
10221b7a0f75SQiao Nuohan@item dump-guest-memory [-z|-l|-s] @var{filename}
1023783e9b48SWen Congyang@findex dump-guest-memory
1024783e9b48SWen CongyangDump guest memory to @var{protocol}. The file can be processed with crash or
10251b7a0f75SQiao Nuohangdb. Without -z|-l|-s, the dump format is ELF.
1026c20499d9SQiao Nuohan        -p: do paging to get guest's memory mapping.
10271b7a0f75SQiao Nuohan        -z: dump in kdump-compressed format, with zlib compression.
10281b7a0f75SQiao Nuohan        -l: dump in kdump-compressed format, with lzo compression.
10291b7a0f75SQiao Nuohan        -s: dump in kdump-compressed format, with snappy compression.
1030c20499d9SQiao Nuohan  filename: dump file name.
1031783e9b48SWen Congyang     begin: the starting physical address. It's optional, and should be
1032c20499d9SQiao Nuohan            specified together with length.
1033783e9b48SWen Congyang    length: the memory size, in bytes. It's optional, and should be specified
1034c20499d9SQiao Nuohan            together with begin.
1035783e9b48SWen CongyangETEXI
1036783e9b48SWen Congyang
1037e866e239SGerd Hoffmann    {
10382ea720dbSJes Sorensen        .name       = "snapshot_blkdev",
10396cc2a415SPaolo Bonzini        .args_type  = "reuse:-n,device:B,snapshot-file:s?,format:s?",
10406cc2a415SPaolo Bonzini        .params     = "[-n] device [new-image-file] [format]",
10412ea720dbSJes Sorensen        .help       = "initiates a live snapshot\n\t\t\t"
10422ea720dbSJes Sorensen                      "of device. If a new image file is specified, the\n\t\t\t"
10432ea720dbSJes Sorensen                      "new image file will become the new root image.\n\t\t\t"
10442ea720dbSJes Sorensen                      "If format is specified, the snapshot file will\n\t\t\t"
1045775ca88eSWenchao Xia                      "be created in that format.\n\t\t\t"
10466cc2a415SPaolo Bonzini                      "The default format is qcow2.  The -n flag requests QEMU\n\t\t\t"
10476cc2a415SPaolo Bonzini                      "to reuse the image found in new-image-file, instead of\n\t\t\t"
10486cc2a415SPaolo Bonzini                      "recreating it from scratch.",
10496106e249SLuiz Capitulino        .mhandler.cmd = hmp_snapshot_blkdev,
1050e866e239SGerd Hoffmann    },
1051e866e239SGerd Hoffmann
1052e866e239SGerd HoffmannSTEXI
1053f8882568SJes Sorensen@item snapshot_blkdev
1054f8882568SJes Sorensen@findex snapshot_blkdev
1055f8882568SJes SorensenSnapshot device, using snapshot file as target if provided
1056f8882568SJes SorensenETEXI
1057f8882568SJes Sorensen
1058d7f9b689SLuiz Capitulino    {
1059775ca88eSWenchao Xia        .name       = "snapshot_blkdev_internal",
1060775ca88eSWenchao Xia        .args_type  = "device:B,name:s",
1061775ca88eSWenchao Xia        .params     = "device name",
1062775ca88eSWenchao Xia        .help       = "take an internal snapshot of device.\n\t\t\t"
1063775ca88eSWenchao Xia                      "The format of the image used by device must\n\t\t\t"
1064775ca88eSWenchao Xia                      "support it, such as qcow2.\n\t\t\t",
1065775ca88eSWenchao Xia        .mhandler.cmd = hmp_snapshot_blkdev_internal,
1066775ca88eSWenchao Xia    },
1067775ca88eSWenchao Xia
1068775ca88eSWenchao XiaSTEXI
1069775ca88eSWenchao Xia@item snapshot_blkdev_internal
1070775ca88eSWenchao Xia@findex snapshot_blkdev_internal
1071775ca88eSWenchao XiaTake an internal snapshot on device if it support
1072775ca88eSWenchao XiaETEXI
1073775ca88eSWenchao Xia
1074775ca88eSWenchao Xia    {
10757a4ed2eeSWenchao Xia        .name       = "snapshot_delete_blkdev_internal",
10767a4ed2eeSWenchao Xia        .args_type  = "device:B,name:s,id:s?",
10777a4ed2eeSWenchao Xia        .params     = "device name [id]",
10787a4ed2eeSWenchao Xia        .help       = "delete an internal snapshot of device.\n\t\t\t"
10797a4ed2eeSWenchao Xia                      "If id is specified, qemu will try delete\n\t\t\t"
10807a4ed2eeSWenchao Xia                      "the snapshot matching both id and name.\n\t\t\t"
10817a4ed2eeSWenchao Xia                      "The format of the image used by device must\n\t\t\t"
10827a4ed2eeSWenchao Xia                      "support it, such as qcow2.\n\t\t\t",
10837a4ed2eeSWenchao Xia        .mhandler.cmd = hmp_snapshot_delete_blkdev_internal,
10847a4ed2eeSWenchao Xia    },
10857a4ed2eeSWenchao Xia
10867a4ed2eeSWenchao XiaSTEXI
10877a4ed2eeSWenchao Xia@item snapshot_delete_blkdev_internal
10887a4ed2eeSWenchao Xia@findex snapshot_delete_blkdev_internal
10897a4ed2eeSWenchao XiaDelete an internal snapshot on device if it support
10907a4ed2eeSWenchao XiaETEXI
10917a4ed2eeSWenchao Xia
10927a4ed2eeSWenchao Xia    {
1093d9b902dbSPaolo Bonzini        .name       = "drive_mirror",
1094d9b902dbSPaolo Bonzini        .args_type  = "reuse:-n,full:-f,device:B,target:s,format:s?",
1095d9b902dbSPaolo Bonzini        .params     = "[-n] [-f] device target [format]",
1096d9b902dbSPaolo Bonzini        .help       = "initiates live storage\n\t\t\t"
1097d9b902dbSPaolo Bonzini                      "migration for a device. The device's contents are\n\t\t\t"
1098d9b902dbSPaolo Bonzini                      "copied to the new image file, including data that\n\t\t\t"
1099d9b902dbSPaolo Bonzini                      "is written after the command is started.\n\t\t\t"
1100d9b902dbSPaolo Bonzini                      "The -n flag requests QEMU to reuse the image found\n\t\t\t"
1101d9b902dbSPaolo Bonzini                      "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
1102d9b902dbSPaolo Bonzini                      "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
1103d9b902dbSPaolo Bonzini                      "so that the result does not need a backing file.\n\t\t\t",
1104d9b902dbSPaolo Bonzini        .mhandler.cmd = hmp_drive_mirror,
1105d9b902dbSPaolo Bonzini    },
1106d9b902dbSPaolo BonziniSTEXI
1107d9b902dbSPaolo Bonzini@item drive_mirror
1108d9b902dbSPaolo Bonzini@findex drive_mirror
1109d9b902dbSPaolo BonziniStart mirroring a block device's writes to a new destination,
1110d9b902dbSPaolo Bonziniusing the specified target.
1111d9b902dbSPaolo BonziniETEXI
1112d9b902dbSPaolo Bonzini
1113d9b902dbSPaolo Bonzini    {
1114de90930aSStefan Hajnoczi        .name       = "drive_backup",
1115de90930aSStefan Hajnoczi        .args_type  = "reuse:-n,full:-f,device:B,target:s,format:s?",
1116de90930aSStefan Hajnoczi        .params     = "[-n] [-f] device target [format]",
1117de90930aSStefan Hajnoczi        .help       = "initiates a point-in-time\n\t\t\t"
1118de90930aSStefan Hajnoczi                      "copy for a device. The device's contents are\n\t\t\t"
1119de90930aSStefan Hajnoczi                      "copied to the new image file, excluding data that\n\t\t\t"
1120de90930aSStefan Hajnoczi                      "is written after the command is started.\n\t\t\t"
1121de90930aSStefan Hajnoczi                      "The -n flag requests QEMU to reuse the image found\n\t\t\t"
1122de90930aSStefan Hajnoczi                      "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
1123de90930aSStefan Hajnoczi                      "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
1124de90930aSStefan Hajnoczi                      "so that the result does not need a backing file.\n\t\t\t",
1125de90930aSStefan Hajnoczi        .mhandler.cmd = hmp_drive_backup,
1126de90930aSStefan Hajnoczi    },
1127de90930aSStefan HajnocziSTEXI
1128de90930aSStefan Hajnoczi@item drive_backup
1129de90930aSStefan Hajnoczi@findex drive_backup
1130de90930aSStefan HajnocziStart a point-in-time copy of a block device to a specificed target.
1131de90930aSStefan HajnocziETEXI
1132de90930aSStefan Hajnoczi
1133de90930aSStefan Hajnoczi    {
1134d7f9b689SLuiz Capitulino        .name       = "drive_add",
1135d7f9b689SLuiz Capitulino        .args_type  = "pci_addr:s,opts:s",
1136d7f9b689SLuiz Capitulino        .params     = "[[<domain>:]<bus>:]<slot>\n"
11372313086aSBlue Swirl                      "[file=file][,if=type][,bus=n]\n"
1138fb0490f6SStefan Hajnoczi                      "[,unit=m][,media=d][,index=i]\n"
11392313086aSBlue Swirl                      "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
1140fb0490f6SStefan Hajnoczi                      "[,snapshot=on|off][,cache=on|off]\n"
1141fb0490f6SStefan Hajnoczi                      "[,readonly=on|off][,copy-on-read=on|off]",
1142d7f9b689SLuiz Capitulino        .help       = "add drive to PCI storage controller",
1143af4ce882SLuiz Capitulino        .mhandler.cmd = drive_hot_add,
1144d7f9b689SLuiz Capitulino    },
1145d7f9b689SLuiz Capitulino
11462313086aSBlue SwirlSTEXI
11472313086aSBlue Swirl@item drive_add
114870fcbbe7SStefan Weil@findex drive_add
11492313086aSBlue SwirlAdd drive to PCI storage controller.
11502313086aSBlue SwirlETEXI
11512313086aSBlue Swirl
115279ca616fSDavid Gibson#if defined(CONFIG_PCI_HOTPLUG_OLD)
1153d7f9b689SLuiz Capitulino    {
1154d7f9b689SLuiz Capitulino        .name       = "pci_add",
1155d7f9b689SLuiz Capitulino        .args_type  = "pci_addr:s,type:s,opts:s?",
1156d7f9b689SLuiz Capitulino        .params     = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
1157d7f9b689SLuiz Capitulino        .help       = "hot-add PCI device",
11586c6a58aeSMarkus Armbruster        .mhandler.cmd = pci_device_hot_add,
1159d7f9b689SLuiz Capitulino    },
11602313086aSBlue Swirl#endif
1161d7f9b689SLuiz Capitulino
11622313086aSBlue SwirlSTEXI
11632313086aSBlue Swirl@item pci_add
116470fcbbe7SStefan Weil@findex pci_add
11652313086aSBlue SwirlHot-add PCI device.
11662313086aSBlue SwirlETEXI
11672313086aSBlue Swirl
116879ca616fSDavid Gibson#if defined(CONFIG_PCI_HOTPLUG_OLD)
1169d7f9b689SLuiz Capitulino    {
1170d7f9b689SLuiz Capitulino        .name       = "pci_del",
1171d7f9b689SLuiz Capitulino        .args_type  = "pci_addr:s",
1172d7f9b689SLuiz Capitulino        .params     = "[[<domain>:]<bus>:]<slot>",
1173d7f9b689SLuiz Capitulino        .help       = "hot remove PCI device",
1174b752daf0SMarkus Armbruster        .mhandler.cmd = do_pci_device_hot_remove,
1175d7f9b689SLuiz Capitulino    },
11762313086aSBlue Swirl#endif
1177d7f9b689SLuiz Capitulino
11782313086aSBlue SwirlSTEXI
11792313086aSBlue Swirl@item pci_del
118070fcbbe7SStefan Weil@findex pci_del
11812313086aSBlue SwirlHot remove PCI device.
11822313086aSBlue SwirlETEXI
11832313086aSBlue Swirl
1184d7f9b689SLuiz Capitulino    {
11852ae63bdaSIsaku Yamahata        .name       = "pcie_aer_inject_error",
11862ae63bdaSIsaku Yamahata        .args_type  = "advisory_non_fatal:-a,correctable:-c,"
11872ae63bdaSIsaku Yamahata	              "id:s,error_status:s,"
11882ae63bdaSIsaku Yamahata	              "header0:i?,header1:i?,header2:i?,header3:i?,"
11892ae63bdaSIsaku Yamahata	              "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
11902ae63bdaSIsaku Yamahata        .params     = "[-a] [-c] id "
11912ae63bdaSIsaku Yamahata                      "<error_status> [<tlp header> [<tlp header prefix>]]",
11922ae63bdaSIsaku Yamahata        .help       = "inject pcie aer error\n\t\t\t"
11932ae63bdaSIsaku Yamahata	              " -a for advisory non fatal error\n\t\t\t"
11942ae63bdaSIsaku Yamahata	              " -c for correctable error\n\t\t\t"
11952ae63bdaSIsaku Yamahata                      "<id> = qdev device id\n\t\t\t"
11962ae63bdaSIsaku Yamahata                      "<error_status> = error string or 32bit\n\t\t\t"
11972ae63bdaSIsaku Yamahata                      "<tlb header> = 32bit x 4\n\t\t\t"
11982ae63bdaSIsaku Yamahata                      "<tlb header prefix> = 32bit x 4",
11992ae63bdaSIsaku Yamahata        .user_print  = pcie_aer_inject_error_print,
12001f3392b7SZhi Yong Wu        .mhandler.cmd_new = do_pcie_aer_inject_error,
12012ae63bdaSIsaku Yamahata    },
12022ae63bdaSIsaku Yamahata
12032ae63bdaSIsaku YamahataSTEXI
12042ae63bdaSIsaku Yamahata@item pcie_aer_inject_error
12052ae63bdaSIsaku Yamahata@findex pcie_aer_inject_error
12062ae63bdaSIsaku YamahataInject PCIe AER error
12072ae63bdaSIsaku YamahataETEXI
12082ae63bdaSIsaku Yamahata
12092ae63bdaSIsaku Yamahata    {
1210d7f9b689SLuiz Capitulino        .name       = "host_net_add",
1211d7f9b689SLuiz Capitulino        .args_type  = "device:s,opts:s?",
1212e3bb532cSHani Benhabiles        .params     = "tap|user|socket|vde|netmap|bridge|dump [options]",
1213d7f9b689SLuiz Capitulino        .help       = "add host VLAN client",
1214af4ce882SLuiz Capitulino        .mhandler.cmd = net_host_device_add,
1215e3bb532cSHani Benhabiles        .command_completion = host_net_add_completion,
1216d7f9b689SLuiz Capitulino    },
1217d7f9b689SLuiz Capitulino
12182313086aSBlue SwirlSTEXI
12192313086aSBlue Swirl@item host_net_add
122070fcbbe7SStefan Weil@findex host_net_add
12212313086aSBlue SwirlAdd host VLAN client.
12222313086aSBlue SwirlETEXI
12232313086aSBlue Swirl
1224d7f9b689SLuiz Capitulino    {
1225d7f9b689SLuiz Capitulino        .name       = "host_net_remove",
1226d7f9b689SLuiz Capitulino        .args_type  = "vlan_id:i,device:s",
1227d7f9b689SLuiz Capitulino        .params     = "vlan_id name",
1228d7f9b689SLuiz Capitulino        .help       = "remove host VLAN client",
1229af4ce882SLuiz Capitulino        .mhandler.cmd = net_host_device_remove,
1230*ddd6b45cSHani Benhabiles        .command_completion = host_net_remove_completion,
1231d7f9b689SLuiz Capitulino    },
1232d7f9b689SLuiz Capitulino
12332313086aSBlue SwirlSTEXI
12342313086aSBlue Swirl@item host_net_remove
123570fcbbe7SStefan Weil@findex host_net_remove
12362313086aSBlue SwirlRemove host VLAN client.
12372313086aSBlue SwirlETEXI
12382313086aSBlue Swirl
1239ae82d324SMarkus Armbruster    {
1240ae82d324SMarkus Armbruster        .name       = "netdev_add",
1241ae82d324SMarkus Armbruster        .args_type  = "netdev:O",
1242b162b49aSHani Benhabiles        .params     = "[user|tap|socket|vde|bridge|hubport|netmap],id=str[,prop=value][,...]",
1243ae82d324SMarkus Armbruster        .help       = "add host network device",
1244928059a3SLuiz Capitulino        .mhandler.cmd = hmp_netdev_add,
1245b162b49aSHani Benhabiles        .command_completion = netdev_add_completion,
1246ae82d324SMarkus Armbruster    },
1247ae82d324SMarkus Armbruster
1248ae82d324SMarkus ArmbrusterSTEXI
1249ae82d324SMarkus Armbruster@item netdev_add
1250ae82d324SMarkus Armbruster@findex netdev_add
1251ae82d324SMarkus ArmbrusterAdd host network device.
1252ae82d324SMarkus ArmbrusterETEXI
1253ae82d324SMarkus Armbruster
1254ae82d324SMarkus Armbruster    {
1255ae82d324SMarkus Armbruster        .name       = "netdev_del",
1256ae82d324SMarkus Armbruster        .args_type  = "id:s",
1257ae82d324SMarkus Armbruster        .params     = "id",
1258ae82d324SMarkus Armbruster        .help       = "remove host network device",
12595f964155SLuiz Capitulino        .mhandler.cmd = hmp_netdev_del,
126011b389f2SHani Benhabiles        .command_completion = netdev_del_completion,
1261ae82d324SMarkus Armbruster    },
1262ae82d324SMarkus Armbruster
1263ae82d324SMarkus ArmbrusterSTEXI
1264ae82d324SMarkus Armbruster@item netdev_del
1265ae82d324SMarkus Armbruster@findex netdev_del
1266ae82d324SMarkus ArmbrusterRemove host network device.
1267ae82d324SMarkus ArmbrusterETEXI
1268ae82d324SMarkus Armbruster
1269ab2d0531SPaolo Bonzini    {
1270cff8b2c6SPaolo Bonzini        .name       = "object_add",
1271cff8b2c6SPaolo Bonzini        .args_type  = "object:O",
1272cff8b2c6SPaolo Bonzini        .params     = "[qom-type=]type,id=str[,prop=value][,...]",
1273cff8b2c6SPaolo Bonzini        .help       = "create QOM object",
1274cff8b2c6SPaolo Bonzini        .mhandler.cmd = hmp_object_add,
1275bfa40f77SHani Benhabiles        .command_completion = object_add_completion,
1276cff8b2c6SPaolo Bonzini    },
1277cff8b2c6SPaolo Bonzini
1278cff8b2c6SPaolo BonziniSTEXI
1279cff8b2c6SPaolo Bonzini@item object_add
1280cff8b2c6SPaolo Bonzini@findex object_add
1281cff8b2c6SPaolo BonziniCreate QOM object.
1282cff8b2c6SPaolo BonziniETEXI
1283cff8b2c6SPaolo Bonzini
1284cff8b2c6SPaolo Bonzini    {
1285ab2d0531SPaolo Bonzini        .name       = "object_del",
1286ab2d0531SPaolo Bonzini        .args_type  = "id:s",
1287ab2d0531SPaolo Bonzini        .params     = "id",
1288ab2d0531SPaolo Bonzini        .help       = "destroy QOM object",
1289ab2d0531SPaolo Bonzini        .mhandler.cmd = hmp_object_del,
1290bfa40f77SHani Benhabiles        .command_completion = object_del_completion,
1291ab2d0531SPaolo Bonzini    },
1292ab2d0531SPaolo Bonzini
1293ab2d0531SPaolo BonziniSTEXI
1294ab2d0531SPaolo Bonzini@item object_del
1295ab2d0531SPaolo Bonzini@findex object_del
1296ab2d0531SPaolo BonziniDestroy QOM object.
1297ab2d0531SPaolo BonziniETEXI
1298ab2d0531SPaolo Bonzini
12992313086aSBlue Swirl#ifdef CONFIG_SLIRP
1300d7f9b689SLuiz Capitulino    {
1301d7f9b689SLuiz Capitulino        .name       = "hostfwd_add",
1302d7f9b689SLuiz Capitulino        .args_type  = "arg1:s,arg2:s?,arg3:s?",
1303d7f9b689SLuiz Capitulino        .params     = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
1304d7f9b689SLuiz Capitulino        .help       = "redirect TCP or UDP connections from host to guest (requires -net user)",
1305af4ce882SLuiz Capitulino        .mhandler.cmd = net_slirp_hostfwd_add,
1306d7f9b689SLuiz Capitulino    },
130721413d68SMarkus Armbruster#endif
130821413d68SMarkus ArmbrusterSTEXI
130921413d68SMarkus Armbruster@item hostfwd_add
131021413d68SMarkus Armbruster@findex hostfwd_add
131121413d68SMarkus ArmbrusterRedirect TCP or UDP connections from host to guest (requires -net user).
131221413d68SMarkus ArmbrusterETEXI
1313d7f9b689SLuiz Capitulino
131421413d68SMarkus Armbruster#ifdef CONFIG_SLIRP
1315d7f9b689SLuiz Capitulino    {
1316d7f9b689SLuiz Capitulino        .name       = "hostfwd_remove",
1317d7f9b689SLuiz Capitulino        .args_type  = "arg1:s,arg2:s?,arg3:s?",
1318d7f9b689SLuiz Capitulino        .params     = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
1319d7f9b689SLuiz Capitulino        .help       = "remove host-to-guest TCP or UDP redirection",
1320af4ce882SLuiz Capitulino        .mhandler.cmd = net_slirp_hostfwd_remove,
1321d7f9b689SLuiz Capitulino    },
1322d7f9b689SLuiz Capitulino
13232313086aSBlue Swirl#endif
13242313086aSBlue SwirlSTEXI
132521413d68SMarkus Armbruster@item hostfwd_remove
132621413d68SMarkus Armbruster@findex hostfwd_remove
132721413d68SMarkus ArmbrusterRemove host-to-guest TCP or UDP redirection.
13282313086aSBlue SwirlETEXI
13292313086aSBlue Swirl
1330d7f9b689SLuiz Capitulino    {
1331d7f9b689SLuiz Capitulino        .name       = "balloon",
13323b0bd6ecSLuiz Capitulino        .args_type  = "value:M",
1333d7f9b689SLuiz Capitulino        .params     = "target",
13343c05613aSRiccardo Magliocchetti        .help       = "request VM to change its memory allocation (in MB)",
1335d72f3264SLuiz Capitulino        .mhandler.cmd = hmp_balloon,
1336d7f9b689SLuiz Capitulino    },
1337d7f9b689SLuiz Capitulino
13382313086aSBlue SwirlSTEXI
13392313086aSBlue Swirl@item balloon @var{value}
134070fcbbe7SStefan Weil@findex balloon
13412313086aSBlue SwirlRequest VM to change its memory allocation to @var{value} (in MB).
13422313086aSBlue SwirlETEXI
13432313086aSBlue Swirl
1344d7f9b689SLuiz Capitulino    {
1345d7f9b689SLuiz Capitulino        .name       = "set_link",
1346c9b26a4cSMarkus Armbruster        .args_type  = "name:s,up:b",
1347c9b26a4cSMarkus Armbruster        .params     = "name on|off",
1348d7f9b689SLuiz Capitulino        .help       = "change the link status of a network adapter",
13494b37156cSLuiz Capitulino        .mhandler.cmd = hmp_set_link,
135040d19394SHani Benhabiles        .command_completion = set_link_completion,
1351d7f9b689SLuiz Capitulino    },
1352d7f9b689SLuiz Capitulino
13532313086aSBlue SwirlSTEXI
1354c9b26a4cSMarkus Armbruster@item set_link @var{name} [on|off]
135570fcbbe7SStefan Weil@findex set_link
1356c9b26a4cSMarkus ArmbrusterSwitch link @var{name} on (i.e. up) or off (i.e. down).
13572313086aSBlue SwirlETEXI
13582313086aSBlue Swirl
1359d7f9b689SLuiz Capitulino    {
1360d7f9b689SLuiz Capitulino        .name       = "watchdog_action",
1361d7f9b689SLuiz Capitulino        .args_type  = "action:s",
1362d7f9b689SLuiz Capitulino        .params     = "[reset|shutdown|poweroff|pause|debug|none]",
1363d7f9b689SLuiz Capitulino        .help       = "change watchdog action",
1364af4ce882SLuiz Capitulino        .mhandler.cmd = do_watchdog_action,
1365d0ece345SHani Benhabiles        .command_completion = watchdog_action_completion,
1366d7f9b689SLuiz Capitulino    },
1367d7f9b689SLuiz Capitulino
13682313086aSBlue SwirlSTEXI
13692313086aSBlue Swirl@item watchdog_action
137070fcbbe7SStefan Weil@findex watchdog_action
13712313086aSBlue SwirlChange watchdog action.
13722313086aSBlue SwirlETEXI
13732313086aSBlue Swirl
1374d7f9b689SLuiz Capitulino    {
1375d7f9b689SLuiz Capitulino        .name       = "acl_show",
1376d7f9b689SLuiz Capitulino        .args_type  = "aclname:s",
1377d7f9b689SLuiz Capitulino        .params     = "aclname",
1378d7f9b689SLuiz Capitulino        .help       = "list rules in the access control list",
1379af4ce882SLuiz Capitulino        .mhandler.cmd = do_acl_show,
1380d7f9b689SLuiz Capitulino    },
1381d7f9b689SLuiz Capitulino
13822313086aSBlue SwirlSTEXI
138315dfcd45SJan Kiszka@item acl_show @var{aclname}
138470fcbbe7SStefan Weil@findex acl_show
138515dfcd45SJan KiszkaList all the matching rules in the access control list, and the default
138615dfcd45SJan Kiszkapolicy. There are currently two named access control lists,
138715dfcd45SJan Kiszka@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
138815dfcd45SJan Kiszkacertificate distinguished name, and SASL username respectively.
138915dfcd45SJan KiszkaETEXI
13902313086aSBlue Swirl
1391d7f9b689SLuiz Capitulino    {
1392d7f9b689SLuiz Capitulino        .name       = "acl_policy",
1393d7f9b689SLuiz Capitulino        .args_type  = "aclname:s,policy:s",
1394d7f9b689SLuiz Capitulino        .params     = "aclname allow|deny",
1395d7f9b689SLuiz Capitulino        .help       = "set default access control list policy",
1396af4ce882SLuiz Capitulino        .mhandler.cmd = do_acl_policy,
1397d7f9b689SLuiz Capitulino    },
1398d7f9b689SLuiz Capitulino
139915dfcd45SJan KiszkaSTEXI
1400cbbfacc6SJan Kiszka@item acl_policy @var{aclname} @code{allow|deny}
140170fcbbe7SStefan Weil@findex acl_policy
140215dfcd45SJan KiszkaSet the default access control list policy, used in the event that
14032313086aSBlue Swirlnone of the explicit rules match. The default policy at startup is
140415dfcd45SJan Kiszkaalways @code{deny}.
140515dfcd45SJan KiszkaETEXI
140615dfcd45SJan Kiszka
1407d7f9b689SLuiz Capitulino    {
1408d7f9b689SLuiz Capitulino        .name       = "acl_add",
1409d7f9b689SLuiz Capitulino        .args_type  = "aclname:s,match:s,policy:s,index:i?",
1410d7f9b689SLuiz Capitulino        .params     = "aclname match allow|deny [index]",
1411d7f9b689SLuiz Capitulino        .help       = "add a match rule to the access control list",
1412af4ce882SLuiz Capitulino        .mhandler.cmd = do_acl_add,
1413d7f9b689SLuiz Capitulino    },
1414d7f9b689SLuiz Capitulino
141515dfcd45SJan KiszkaSTEXI
14160e4aec98SMarkus Armbruster@item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
14170e4aec98SMarkus Armbruster@findex acl_add
141815dfcd45SJan KiszkaAdd a match rule to the access control list, allowing or denying access.
141915dfcd45SJan KiszkaThe match will normally be an exact username or x509 distinguished name,
142015dfcd45SJan Kiszkabut can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
142115dfcd45SJan Kiszkaallow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
14222313086aSBlue Swirlnormally be appended to the end of the ACL, but can be inserted
142315dfcd45SJan Kiszkaearlier in the list if the optional @var{index} parameter is supplied.
142415dfcd45SJan KiszkaETEXI
142515dfcd45SJan Kiszka
1426d7f9b689SLuiz Capitulino    {
1427d7f9b689SLuiz Capitulino        .name       = "acl_remove",
1428d7f9b689SLuiz Capitulino        .args_type  = "aclname:s,match:s",
1429d7f9b689SLuiz Capitulino        .params     = "aclname match",
1430d7f9b689SLuiz Capitulino        .help       = "remove a match rule from the access control list",
1431af4ce882SLuiz Capitulino        .mhandler.cmd = do_acl_remove,
1432d7f9b689SLuiz Capitulino    },
1433d7f9b689SLuiz Capitulino
143415dfcd45SJan KiszkaSTEXI
143515dfcd45SJan Kiszka@item acl_remove @var{aclname} @var{match}
143670fcbbe7SStefan Weil@findex acl_remove
143715dfcd45SJan KiszkaRemove the specified match rule from the access control list.
143815dfcd45SJan KiszkaETEXI
143915dfcd45SJan Kiszka
1440d7f9b689SLuiz Capitulino    {
1441d7f9b689SLuiz Capitulino        .name       = "acl_reset",
1442d7f9b689SLuiz Capitulino        .args_type  = "aclname:s",
1443d7f9b689SLuiz Capitulino        .params     = "aclname",
1444d7f9b689SLuiz Capitulino        .help       = "reset the access control list",
1445af4ce882SLuiz Capitulino        .mhandler.cmd = do_acl_reset,
1446d7f9b689SLuiz Capitulino    },
1447d7f9b689SLuiz Capitulino
144815dfcd45SJan KiszkaSTEXI
14490e4aec98SMarkus Armbruster@item acl_reset @var{aclname}
14500e4aec98SMarkus Armbruster@findex acl_reset
145115dfcd45SJan KiszkaRemove all matches from the access control list, and set the default
14522313086aSBlue Swirlpolicy back to @code{deny}.
14532313086aSBlue SwirlETEXI
14542313086aSBlue Swirl
14554057725fSPaolo Bonzini    {
14564057725fSPaolo Bonzini        .name       = "nbd_server_start",
14574057725fSPaolo Bonzini        .args_type  = "all:-a,writable:-w,uri:s",
14584057725fSPaolo Bonzini        .params     = "nbd_server_start [-a] [-w] host:port",
14594057725fSPaolo Bonzini        .help       = "serve block devices on the given host and port",
14604057725fSPaolo Bonzini        .mhandler.cmd = hmp_nbd_server_start,
14614057725fSPaolo Bonzini    },
14624057725fSPaolo BonziniSTEXI
14634057725fSPaolo Bonzini@item nbd_server_start @var{host}:@var{port}
14644057725fSPaolo Bonzini@findex nbd_server_start
14654057725fSPaolo BonziniStart an NBD server on the given host and/or port.  If the @option{-a}
14664057725fSPaolo Bonzinioption is included, all of the virtual machine's block devices that
14674057725fSPaolo Bonzinihave an inserted media on them are automatically exported; in this case,
14684057725fSPaolo Bonzinithe @option{-w} option makes the devices writable too.
14694057725fSPaolo BonziniETEXI
14704057725fSPaolo Bonzini
14714057725fSPaolo Bonzini    {
14724057725fSPaolo Bonzini        .name       = "nbd_server_add",
14734057725fSPaolo Bonzini        .args_type  = "writable:-w,device:B",
14744057725fSPaolo Bonzini        .params     = "nbd_server_add [-w] device",
14754057725fSPaolo Bonzini        .help       = "export a block device via NBD",
14764057725fSPaolo Bonzini        .mhandler.cmd = hmp_nbd_server_add,
14774057725fSPaolo Bonzini    },
14784057725fSPaolo BonziniSTEXI
14794057725fSPaolo Bonzini@item nbd_server_add @var{device}
14804057725fSPaolo Bonzini@findex nbd_server_add
14814057725fSPaolo BonziniExport a block device through QEMU's NBD server, which must be started
14824057725fSPaolo Bonzinibeforehand with @command{nbd_server_start}.  The @option{-w} option makes the
14834057725fSPaolo Bonziniexported device writable too.
14844057725fSPaolo BonziniETEXI
14854057725fSPaolo Bonzini
14864057725fSPaolo Bonzini    {
14874057725fSPaolo Bonzini        .name       = "nbd_server_stop",
14884057725fSPaolo Bonzini        .args_type  = "",
14894057725fSPaolo Bonzini        .params     = "nbd_server_stop",
14904057725fSPaolo Bonzini        .help       = "stop serving block devices using the NBD protocol",
14914057725fSPaolo Bonzini        .mhandler.cmd = hmp_nbd_server_stop,
14924057725fSPaolo Bonzini    },
14934057725fSPaolo BonziniSTEXI
14944057725fSPaolo Bonzini@item nbd_server_stop
14954057725fSPaolo Bonzini@findex nbd_server_stop
14964057725fSPaolo BonziniStop the QEMU embedded NBD server.
14974057725fSPaolo BonziniETEXI
14984057725fSPaolo Bonzini
14994057725fSPaolo Bonzini
150079c4f6b0SHuang Ying#if defined(TARGET_I386)
1501d7f9b689SLuiz Capitulino
1502d7f9b689SLuiz Capitulino    {
1503d7f9b689SLuiz Capitulino        .name       = "mce",
150431ce5e0cSJin Dongming        .args_type  = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
150531ce5e0cSJin Dongming        .params     = "[-b] cpu bank status mcgstatus addr misc",
150631ce5e0cSJin Dongming        .help       = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
1507af4ce882SLuiz Capitulino        .mhandler.cmd = do_inject_mce,
1508d7f9b689SLuiz Capitulino    },
1509d7f9b689SLuiz Capitulino
151079c4f6b0SHuang Ying#endif
151179c4f6b0SHuang YingSTEXI
151279c4f6b0SHuang Ying@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
151370fcbbe7SStefan Weil@findex mce (x86)
151479c4f6b0SHuang YingInject an MCE on the given CPU (x86 only).
151579c4f6b0SHuang YingETEXI
151679c4f6b0SHuang Ying
1517d7f9b689SLuiz Capitulino    {
1518d7f9b689SLuiz Capitulino        .name       = "getfd",
1519d7f9b689SLuiz Capitulino        .args_type  = "fdname:s",
1520d7f9b689SLuiz Capitulino        .params     = "getfd name",
1521d7f9b689SLuiz Capitulino        .help       = "receive a file descriptor via SCM rights and assign it a name",
1522208c9d1bSCorey Bryant        .mhandler.cmd = hmp_getfd,
1523d7f9b689SLuiz Capitulino    },
1524d7f9b689SLuiz Capitulino
1525f07918fdSMark McLoughlinSTEXI
1526f07918fdSMark McLoughlin@item getfd @var{fdname}
152770fcbbe7SStefan Weil@findex getfd
1528f07918fdSMark McLoughlinIf a file descriptor is passed alongside this command using the SCM_RIGHTS
1529f07918fdSMark McLoughlinmechanism on unix sockets, it is stored using the name @var{fdname} for
1530f07918fdSMark McLoughlinlater use by other monitor commands.
1531f07918fdSMark McLoughlinETEXI
1532f07918fdSMark McLoughlin
1533d7f9b689SLuiz Capitulino    {
1534d7f9b689SLuiz Capitulino        .name       = "closefd",
1535d7f9b689SLuiz Capitulino        .args_type  = "fdname:s",
1536d7f9b689SLuiz Capitulino        .params     = "closefd name",
1537d7f9b689SLuiz Capitulino        .help       = "close a file descriptor previously passed via SCM rights",
1538208c9d1bSCorey Bryant        .mhandler.cmd = hmp_closefd,
1539d7f9b689SLuiz Capitulino    },
1540d7f9b689SLuiz Capitulino
1541f07918fdSMark McLoughlinSTEXI
1542f07918fdSMark McLoughlin@item closefd @var{fdname}
154370fcbbe7SStefan Weil@findex closefd
1544f07918fdSMark McLoughlinClose the file descriptor previously assigned to @var{fdname} using the
1545f07918fdSMark McLoughlin@code{getfd} command. This is only needed if the file descriptor was never
1546f07918fdSMark McLoughlinused by another monitor command.
1547f07918fdSMark McLoughlinETEXI
1548f07918fdSMark McLoughlin
1549a3a55a2eSLuiz Capitulino    {
1550a3a55a2eSLuiz Capitulino        .name       = "block_passwd",
1551a3a55a2eSLuiz Capitulino        .args_type  = "device:B,password:s",
1552a3a55a2eSLuiz Capitulino        .params     = "block_passwd device password",
1553a3a55a2eSLuiz Capitulino        .help       = "set the password of encrypted block devices",
1554a4dea8a9SLuiz Capitulino        .mhandler.cmd = hmp_block_passwd,
1555a3a55a2eSLuiz Capitulino    },
1556a3a55a2eSLuiz Capitulino
1557a3a55a2eSLuiz CapitulinoSTEXI
1558727f005eSZhi Yong Wu@item block_set_io_throttle @var{device} @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}
1559727f005eSZhi Yong Wu@findex block_set_io_throttle
1560727f005eSZhi Yong WuChange 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}
1561727f005eSZhi Yong WuETEXI
1562727f005eSZhi Yong Wu
1563727f005eSZhi Yong Wu    {
1564727f005eSZhi Yong Wu        .name       = "block_set_io_throttle",
1565727f005eSZhi Yong Wu        .args_type  = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
1566727f005eSZhi Yong Wu        .params     = "device bps bps_rd bps_wr iops iops_rd iops_wr",
1567727f005eSZhi Yong Wu        .help       = "change I/O throttle limits for a block drive",
156880047da5SLuiz Capitulino        .mhandler.cmd = hmp_block_set_io_throttle,
1569727f005eSZhi Yong Wu    },
1570727f005eSZhi Yong Wu
1571727f005eSZhi Yong WuSTEXI
1572a3a55a2eSLuiz Capitulino@item block_passwd @var{device} @var{password}
157370fcbbe7SStefan Weil@findex block_passwd
1574a3a55a2eSLuiz CapitulinoSet the encrypted device @var{device} password to @var{password}
1575a3a55a2eSLuiz CapitulinoETEXI
1576b40292e7SJan Kiszka
157733572eceSJan Kiszka    {
15787572150cSGerd Hoffmann        .name       = "set_password",
15797572150cSGerd Hoffmann        .args_type  = "protocol:s,password:s,connected:s?",
15807572150cSGerd Hoffmann        .params     = "protocol password action-if-connected",
15817572150cSGerd Hoffmann        .help       = "set spice/vnc password",
1582fbf796fdSLuiz Capitulino        .mhandler.cmd = hmp_set_password,
15837572150cSGerd Hoffmann    },
15847572150cSGerd Hoffmann
15857572150cSGerd HoffmannSTEXI
15867572150cSGerd Hoffmann@item set_password [ vnc | spice ] password [ action-if-connected ]
15877572150cSGerd Hoffmann@findex set_password
15887572150cSGerd Hoffmann
15897572150cSGerd HoffmannChange spice/vnc password.  Use zero to make the password stay valid
15907572150cSGerd Hoffmannforever.  @var{action-if-connected} specifies what should happen in
15917572150cSGerd Hoffmanncase a connection is established: @var{fail} makes the password change
15927572150cSGerd Hoffmannfail.  @var{disconnect} changes the password and disconnects the
15937572150cSGerd Hoffmannclient.  @var{keep} changes the password and keeps the connection up.
15947572150cSGerd Hoffmann@var{keep} is the default.
15957572150cSGerd HoffmannETEXI
15967572150cSGerd Hoffmann
15977572150cSGerd Hoffmann    {
15987572150cSGerd Hoffmann        .name       = "expire_password",
15997572150cSGerd Hoffmann        .args_type  = "protocol:s,time:s",
16007572150cSGerd Hoffmann        .params     = "protocol time",
16017572150cSGerd Hoffmann        .help       = "set spice/vnc password expire-time",
16029ad5372dSLuiz Capitulino        .mhandler.cmd = hmp_expire_password,
16037572150cSGerd Hoffmann    },
16047572150cSGerd Hoffmann
16057572150cSGerd HoffmannSTEXI
16067572150cSGerd Hoffmann@item expire_password [ vnc | spice ] expire-time
16077572150cSGerd Hoffmann@findex expire_password
16087572150cSGerd Hoffmann
16097572150cSGerd HoffmannSpecify when a password for spice/vnc becomes
16107572150cSGerd Hoffmanninvalid. @var{expire-time} accepts:
16117572150cSGerd Hoffmann
16127572150cSGerd Hoffmann@table @var
16137572150cSGerd Hoffmann@item now
16147572150cSGerd HoffmannInvalidate password instantly.
16157572150cSGerd Hoffmann
16167572150cSGerd Hoffmann@item never
16177572150cSGerd HoffmannPassword stays valid forever.
16187572150cSGerd Hoffmann
16197572150cSGerd Hoffmann@item +nsec
16207572150cSGerd HoffmannPassword stays valid for @var{nsec} seconds starting now.
16217572150cSGerd Hoffmann
16227572150cSGerd Hoffmann@item nsec
16237572150cSGerd HoffmannPassword is invalidated at the given time.  @var{nsec} are the seconds
16247572150cSGerd Hoffmannpassed since 1970, i.e. unix epoch.
16257572150cSGerd Hoffmann
16267572150cSGerd Hoffmann@end table
16277572150cSGerd HoffmannETEXI
16287572150cSGerd Hoffmann
162946920825SGerd Hoffmann    {
163046920825SGerd Hoffmann        .name       = "chardev-add",
163146920825SGerd Hoffmann        .args_type  = "args:s",
163246920825SGerd Hoffmann        .params     = "args",
163346920825SGerd Hoffmann        .help       = "add chardev",
163446920825SGerd Hoffmann        .mhandler.cmd = hmp_chardev_add,
163513e315daSHani Benhabiles        .command_completion = chardev_add_completion,
163646920825SGerd Hoffmann    },
163746920825SGerd Hoffmann
163846920825SGerd HoffmannSTEXI
163946920825SGerd Hoffmann@item chardev_add args
164046920825SGerd Hoffmann@findex chardev_add
164146920825SGerd Hoffmann
164246920825SGerd Hoffmannchardev_add accepts the same parameters as the -chardev command line switch.
164346920825SGerd Hoffmann
164446920825SGerd HoffmannETEXI
164546920825SGerd Hoffmann
164646920825SGerd Hoffmann    {
164746920825SGerd Hoffmann        .name       = "chardev-remove",
164846920825SGerd Hoffmann        .args_type  = "id:s",
164946920825SGerd Hoffmann        .params     = "id",
165046920825SGerd Hoffmann        .help       = "remove chardev",
165146920825SGerd Hoffmann        .mhandler.cmd = hmp_chardev_remove,
16526297d9a2SHani Benhabiles        .command_completion = chardev_remove_completion,
165346920825SGerd Hoffmann    },
165446920825SGerd Hoffmann
165546920825SGerd HoffmannSTEXI
165646920825SGerd Hoffmann@item chardev_remove id
165746920825SGerd Hoffmann@findex chardev_remove
165846920825SGerd Hoffmann
165946920825SGerd HoffmannRemoves the chardev @var{id}.
166046920825SGerd Hoffmann
166146920825SGerd HoffmannETEXI
1662f1088908SGerd Hoffmann
1663f1088908SGerd Hoffmann    {
1664587da2c3SKevin Wolf        .name       = "qemu-io",
1665587da2c3SKevin Wolf        .args_type  = "device:B,command:s",
1666587da2c3SKevin Wolf        .params     = "[device] \"[command]\"",
1667587da2c3SKevin Wolf        .help       = "run a qemu-io command on a block device",
1668587da2c3SKevin Wolf        .mhandler.cmd = hmp_qemu_io,
1669587da2c3SKevin Wolf    },
1670587da2c3SKevin Wolf
1671587da2c3SKevin WolfSTEXI
1672587da2c3SKevin Wolf@item qemu-io @var{device} @var{command}
1673587da2c3SKevin Wolf@findex qemu-io
1674587da2c3SKevin Wolf
1675587da2c3SKevin WolfExecutes a qemu-io command on the given block device.
1676587da2c3SKevin Wolf
1677587da2c3SKevin WolfETEXI
1678587da2c3SKevin Wolf
1679587da2c3SKevin Wolf    {
1680abf23329SJason J. Herne        .name       = "cpu-add",
1681abf23329SJason J. Herne        .args_type  = "id:i",
1682abf23329SJason J. Herne        .params     = "id",
1683abf23329SJason J. Herne        .help       = "add cpu",
1684abf23329SJason J. Herne        .mhandler.cmd  = hmp_cpu_add,
1685abf23329SJason J. Herne    },
1686abf23329SJason J. Herne
1687abf23329SJason J. HerneSTEXI
1688abf23329SJason J. Herne@item cpu-add @var{id}
1689abf23329SJason J. HerneAdd CPU with id @var{id}
1690abf23329SJason J. HerneETEXI
1691abf23329SJason J. Herne
1692abf23329SJason J. Herne    {
169333572eceSJan Kiszka        .name       = "info",
169433572eceSJan Kiszka        .args_type  = "item:s?",
169533572eceSJan Kiszka        .params     = "[subcommand]",
169633572eceSJan Kiszka        .help       = "show various information about the system state",
169784c44613SWenchao Xia        .mhandler.cmd = do_info_help,
169884c44613SWenchao Xia        .sub_table = info_cmds,
169933572eceSJan Kiszka    },
170033572eceSJan Kiszka
170133572eceSJan KiszkaSTEXI
170233572eceSJan Kiszka@item info @var{subcommand}
170333572eceSJan Kiszka@findex info
170433572eceSJan KiszkaShow various information about the system state.
170533572eceSJan Kiszka
170633572eceSJan Kiszka@table @option
170733572eceSJan Kiszka@item info version
170833572eceSJan Kiszkashow the version of QEMU
170933572eceSJan Kiszka@item info network
171033572eceSJan Kiszkashow the various VLANs and the associated devices
171133572eceSJan Kiszka@item info chardev
171233572eceSJan Kiszkashow the character devices
171333572eceSJan Kiszka@item info block
171433572eceSJan Kiszkashow the block devices
171533572eceSJan Kiszka@item info blockstats
171633572eceSJan Kiszkashow block device statistics
171733572eceSJan Kiszka@item info registers
171833572eceSJan Kiszkashow the cpu registers
171933572eceSJan Kiszka@item info cpus
172033572eceSJan Kiszkashow infos for each CPU
172133572eceSJan Kiszka@item info history
172233572eceSJan Kiszkashow the command line history
172333572eceSJan Kiszka@item info irq
172433572eceSJan Kiszkashow the interrupts statistics (if available)
172533572eceSJan Kiszka@item info pic
172633572eceSJan Kiszkashow i8259 (PIC) state
172733572eceSJan Kiszka@item info pci
172833572eceSJan Kiszkashow emulated PCI device info
172933572eceSJan Kiszka@item info tlb
1730692f737cSMax Filippovshow virtual to physical memory mappings (i386, SH4, SPARC, PPC, and Xtensa only)
173133572eceSJan Kiszka@item info mem
173233572eceSJan Kiszkashow the active virtual memory mappings (i386 only)
173333572eceSJan Kiszka@item info jit
173433572eceSJan Kiszkashow dynamic compiler info
173533572eceSJan Kiszka@item info numa
173633572eceSJan Kiszkashow NUMA information
1737b40292e7SJan Kiszka@item info kvm
1738b40292e7SJan Kiszkashow KVM information
173933572eceSJan Kiszka@item info usb
174033572eceSJan Kiszkashow USB devices plugged on the virtual USB hub
174133572eceSJan Kiszka@item info usbhost
174233572eceSJan Kiszkashow all USB host devices
174333572eceSJan Kiszka@item info profile
174433572eceSJan Kiszkashow profiling information
174533572eceSJan Kiszka@item info capture
174633572eceSJan Kiszkashow information about active capturing
174733572eceSJan Kiszka@item info snapshots
174833572eceSJan Kiszkashow list of VM snapshots
174933572eceSJan Kiszka@item info status
175033572eceSJan Kiszkashow the current VM status (running|paused)
175133572eceSJan Kiszka@item info pcmcia
175233572eceSJan Kiszkashow guest PCMCIA status
175333572eceSJan Kiszka@item info mice
175433572eceSJan Kiszkashow which guest mouse is receiving events
175533572eceSJan Kiszka@item info vnc
175633572eceSJan Kiszkashow the vnc server status
175733572eceSJan Kiszka@item info name
175833572eceSJan Kiszkashow the current VM name
175933572eceSJan Kiszka@item info uuid
176033572eceSJan Kiszkashow the current VM UUID
176133572eceSJan Kiszka@item info cpustats
176233572eceSJan Kiszkashow CPU statistics
176333572eceSJan Kiszka@item info usernet
176433572eceSJan Kiszkashow user network stack connection states
176533572eceSJan Kiszka@item info migrate
176633572eceSJan Kiszkashow migration status
1767bbf6da32SOrit Wasserman@item info migrate_capabilities
1768bbf6da32SOrit Wassermanshow current migration capabilities
17699e1ba4ccSOrit Wasserman@item info migrate_cache_size
17709e1ba4ccSOrit Wassermanshow current migration XBZRLE cache size
177133572eceSJan Kiszka@item info balloon
177233572eceSJan Kiszkashow balloon information
177333572eceSJan Kiszka@item info qtree
177433572eceSJan Kiszkashow device tree
177533572eceSJan Kiszka@item info qdm
177633572eceSJan Kiszkashow qdev device model list
177733572eceSJan Kiszka@item info roms
177833572eceSJan Kiszkashow roms
1779d1a0cf73SStefan Berger@item info tpm
1780d1a0cf73SStefan Bergershow the TPM device
178133572eceSJan Kiszka@end table
178233572eceSJan KiszkaETEXI
178333572eceSJan Kiszka
178431965ae2SLluísSTEXI
178522890ab5SPrerna Saxena@item info trace-events
178622890ab5SPrerna Saxenashow available trace events and their state
178722890ab5SPrerna SaxenaETEXI
178822890ab5SPrerna Saxena
17892313086aSBlue SwirlSTEXI
17902313086aSBlue Swirl@end table
17912313086aSBlue SwirlETEXI
1792