xref: /qemu/hmp-commands.hx (revision 753637695bcf6b80ea96614de5d31161603ad50f)
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|?",
14d7f9b689SLuiz Capitulino        .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.
382313086aSBlue SwirlETEXI
392313086aSBlue Swirl
40d7f9b689SLuiz Capitulino    {
41d7f9b689SLuiz Capitulino        .name       = "q|quit",
42d7f9b689SLuiz Capitulino        .args_type  = "",
43d7f9b689SLuiz Capitulino        .params     = "",
44d7f9b689SLuiz Capitulino        .help       = "quit the emulator",
45b223f35fSLuiz Capitulino        .user_print = monitor_user_noop,
467a7f325eSLuiz Capitulino        .mhandler.cmd = hmp_quit,
47d7f9b689SLuiz Capitulino    },
48d7f9b689SLuiz Capitulino
492313086aSBlue SwirlSTEXI
502313086aSBlue Swirl@item q or quit
5170fcbbe7SStefan Weil@findex quit
522313086aSBlue SwirlQuit the emulator.
532313086aSBlue SwirlETEXI
542313086aSBlue Swirl
55d7f9b689SLuiz Capitulino    {
566d4a2b3aSChristoph Hellwig        .name       = "block_resize",
576d4a2b3aSChristoph Hellwig        .args_type  = "device:B,size:o",
586d4a2b3aSChristoph Hellwig        .params     = "device size",
596d4a2b3aSChristoph Hellwig        .help       = "resize a block image",
605e7caacbSLuiz Capitulino        .mhandler.cmd = hmp_block_resize,
616d4a2b3aSChristoph Hellwig    },
626d4a2b3aSChristoph Hellwig
636d4a2b3aSChristoph HellwigSTEXI
646d4a2b3aSChristoph Hellwig@item block_resize
656d4a2b3aSChristoph Hellwig@findex block_resize
666d4a2b3aSChristoph HellwigResize a block image while a guest is running.  Usually requires guest
676d4a2b3aSChristoph Hellwigaction to see the updated size.  Resize to a lower size is supported,
686d4a2b3aSChristoph Hellwigbut should be used with extreme caution.  Note that this command only
696d4a2b3aSChristoph Hellwigresizes image files, it can not resize block devices like LVM volumes.
706d4a2b3aSChristoph HellwigETEXI
716d4a2b3aSChristoph Hellwig
7212bd451fSStefan Hajnoczi    {
7312bd451fSStefan Hajnoczi        .name       = "block_stream",
74c83c66c3SStefan Hajnoczi        .args_type  = "device:B,speed:o?,base:s?",
75c83c66c3SStefan Hajnoczi        .params     = "device [speed [base]]",
7612bd451fSStefan Hajnoczi        .help       = "copy data from a backing file into a block device",
7712bd451fSStefan Hajnoczi        .mhandler.cmd = hmp_block_stream,
7812bd451fSStefan Hajnoczi    },
7912bd451fSStefan Hajnoczi
8012bd451fSStefan HajnocziSTEXI
8112bd451fSStefan Hajnoczi@item block_stream
8212bd451fSStefan Hajnoczi@findex block_stream
8312bd451fSStefan HajnocziCopy data from a backing file into a block device.
8412bd451fSStefan HajnocziETEXI
856d4a2b3aSChristoph Hellwig
866d4a2b3aSChristoph Hellwig    {
872d47c6e9SStefan Hajnoczi        .name       = "block_job_set_speed",
88882ec7ceSStefan Hajnoczi        .args_type  = "device:B,speed:o",
89882ec7ceSStefan Hajnoczi        .params     = "device speed",
902d47c6e9SStefan Hajnoczi        .help       = "set maximum speed for a background block operation",
912d47c6e9SStefan Hajnoczi        .mhandler.cmd = hmp_block_job_set_speed,
922d47c6e9SStefan Hajnoczi    },
932d47c6e9SStefan Hajnoczi
942d47c6e9SStefan HajnocziSTEXI
954451b799SPaolo Bonzini@item block_job_set_speed
964451b799SPaolo Bonzini@findex block_job_set_speed
972d47c6e9SStefan HajnocziSet maximum speed for a background block operation.
982d47c6e9SStefan HajnocziETEXI
992d47c6e9SStefan Hajnoczi
1002d47c6e9SStefan Hajnoczi    {
101370521a1SStefan Hajnoczi        .name       = "block_job_cancel",
102370521a1SStefan Hajnoczi        .args_type  = "device:B",
103370521a1SStefan Hajnoczi        .params     = "device",
10405290d80SPaolo Bonzini        .help       = "stop an active background block operation",
105370521a1SStefan Hajnoczi        .mhandler.cmd = hmp_block_job_cancel,
106370521a1SStefan Hajnoczi    },
107370521a1SStefan Hajnoczi
108370521a1SStefan HajnocziSTEXI
109370521a1SStefan Hajnoczi@item block_job_cancel
110370521a1SStefan Hajnoczi@findex block_job_cancel
111370521a1SStefan HajnocziStop an active block streaming operation.
112370521a1SStefan HajnocziETEXI
113370521a1SStefan Hajnoczi
114370521a1SStefan Hajnoczi    {
115d7f9b689SLuiz Capitulino        .name       = "eject",
11678d714e0SLuiz Capitulino        .args_type  = "force:-f,device:B",
117d7f9b689SLuiz Capitulino        .params     = "[-f] device",
118d7f9b689SLuiz Capitulino        .help       = "eject a removable medium (use -f to force it)",
119c245b6a3SLuiz Capitulino        .mhandler.cmd = hmp_eject,
120d7f9b689SLuiz Capitulino    },
121d7f9b689SLuiz Capitulino
1222313086aSBlue SwirlSTEXI
1232313086aSBlue Swirl@item eject [-f] @var{device}
12470fcbbe7SStefan Weil@findex eject
1252313086aSBlue SwirlEject a removable medium (use -f to force it).
1262313086aSBlue SwirlETEXI
1272313086aSBlue Swirl
128d7f9b689SLuiz Capitulino    {
1299063f814SRyan Harper        .name       = "drive_del",
1309063f814SRyan Harper        .args_type  = "id:s",
1319063f814SRyan Harper        .params     = "device",
1329063f814SRyan Harper        .help       = "remove host block device",
1339063f814SRyan Harper        .user_print = monitor_user_noop,
1349063f814SRyan Harper        .mhandler.cmd_new = do_drive_del,
1359063f814SRyan Harper    },
1369063f814SRyan Harper
1379063f814SRyan HarperSTEXI
1389063f814SRyan Harper@item drive_del @var{device}
1399063f814SRyan Harper@findex drive_del
1409063f814SRyan HarperRemove host block device.  The result is that guest generated IO is no longer
1419063f814SRyan Harpersubmitted against the host device underlying the disk.  Once a drive has
1429063f814SRyan Harperbeen deleted, the QEMU Block layer returns -EIO which results in IO
1439063f814SRyan Harpererrors in the guest for applications that are reading/writing to the device.
1449063f814SRyan HarperETEXI
1459063f814SRyan Harper
1469063f814SRyan Harper    {
147d7f9b689SLuiz Capitulino        .name       = "change",
148d7f9b689SLuiz Capitulino        .args_type  = "device:B,target:F,arg:s?",
149d7f9b689SLuiz Capitulino        .params     = "device filename [format]",
150d7f9b689SLuiz Capitulino        .help       = "change a removable medium, optional format",
151333a96ecSLuiz Capitulino        .mhandler.cmd = hmp_change,
152d7f9b689SLuiz Capitulino    },
153d7f9b689SLuiz Capitulino
1542313086aSBlue SwirlSTEXI
1552313086aSBlue Swirl@item change @var{device} @var{setting}
15670fcbbe7SStefan Weil@findex change
1572313086aSBlue Swirl
1582313086aSBlue SwirlChange the configuration of a device.
1592313086aSBlue Swirl
1602313086aSBlue Swirl@table @option
1612313086aSBlue Swirl@item change @var{diskdevice} @var{filename} [@var{format}]
1622313086aSBlue SwirlChange the medium for a removable disk device to point to @var{filename}. eg
1632313086aSBlue Swirl
1642313086aSBlue Swirl@example
1652313086aSBlue Swirl(qemu) change ide1-cd0 /path/to/some.iso
1662313086aSBlue Swirl@end example
1672313086aSBlue Swirl
1682313086aSBlue Swirl@var{format} is optional.
1692313086aSBlue Swirl
1702313086aSBlue Swirl@item change vnc @var{display},@var{options}
1712313086aSBlue SwirlChange the configuration of the VNC server. The valid syntax for @var{display}
1722313086aSBlue Swirland @var{options} are described at @ref{sec_invocation}. eg
1732313086aSBlue Swirl
1742313086aSBlue Swirl@example
1752313086aSBlue Swirl(qemu) change vnc localhost:1
1762313086aSBlue Swirl@end example
1772313086aSBlue Swirl
1782313086aSBlue Swirl@item change vnc password [@var{password}]
1792313086aSBlue Swirl
1802313086aSBlue SwirlChange the password associated with the VNC server. If the new password is not
1812313086aSBlue Swirlsupplied, the monitor will prompt for it to be entered. VNC passwords are only
1822313086aSBlue Swirlsignificant up to 8 letters. eg
1832313086aSBlue Swirl
1842313086aSBlue Swirl@example
1852313086aSBlue Swirl(qemu) change vnc password
1862313086aSBlue SwirlPassword: ********
1872313086aSBlue Swirl@end example
1882313086aSBlue Swirl
1892313086aSBlue Swirl@end table
1902313086aSBlue SwirlETEXI
1912313086aSBlue Swirl
192d7f9b689SLuiz Capitulino    {
193d7f9b689SLuiz Capitulino        .name       = "screendump",
194d7f9b689SLuiz Capitulino        .args_type  = "filename:F",
195d7f9b689SLuiz Capitulino        .params     = "filename",
196d7f9b689SLuiz Capitulino        .help       = "save screen into PPM image 'filename'",
197ad39cf6dSLuiz Capitulino        .mhandler.cmd = hmp_screen_dump,
198d7f9b689SLuiz Capitulino    },
199d7f9b689SLuiz Capitulino
2002313086aSBlue SwirlSTEXI
2012313086aSBlue Swirl@item screendump @var{filename}
20270fcbbe7SStefan Weil@findex screendump
2032313086aSBlue SwirlSave screen into PPM image @var{filename}.
2042313086aSBlue SwirlETEXI
2052313086aSBlue Swirl
206d7f9b689SLuiz Capitulino    {
207d7f9b689SLuiz Capitulino        .name       = "logfile",
208d7f9b689SLuiz Capitulino        .args_type  = "filename:F",
209d7f9b689SLuiz Capitulino        .params     = "filename",
210d7f9b689SLuiz Capitulino        .help       = "output logs to 'filename'",
211af4ce882SLuiz Capitulino        .mhandler.cmd = do_logfile,
212d7f9b689SLuiz Capitulino    },
213d7f9b689SLuiz Capitulino
2142313086aSBlue SwirlSTEXI
2152313086aSBlue Swirl@item logfile @var{filename}
21670fcbbe7SStefan Weil@findex logfile
2172313086aSBlue SwirlOutput logs to @var{filename}.
2182313086aSBlue SwirlETEXI
2192313086aSBlue Swirl
22022890ab5SPrerna Saxena    {
22122890ab5SPrerna Saxena        .name       = "trace-event",
22222890ab5SPrerna Saxena        .args_type  = "name:s,option:b",
22322890ab5SPrerna Saxena        .params     = "name on|off",
22422890ab5SPrerna Saxena        .help       = "changes status of a specific trace event",
225fc764105SLluís        .mhandler.cmd = do_trace_event_set_state,
22622890ab5SPrerna Saxena    },
22722890ab5SPrerna Saxena
22822890ab5SPrerna SaxenaSTEXI
22922890ab5SPrerna Saxena@item trace-event
23022890ab5SPrerna Saxena@findex trace-event
23122890ab5SPrerna Saxenachanges status of a trace event
23222890ab5SPrerna SaxenaETEXI
233c5ceb523SStefan Hajnoczi
234c45a8168SMichael Roth#if defined(CONFIG_TRACE_SIMPLE)
235c5ceb523SStefan Hajnoczi    {
236c5ceb523SStefan Hajnoczi        .name       = "trace-file",
237c5ceb523SStefan Hajnoczi        .args_type  = "op:s?,arg:F?",
238c5ceb523SStefan Hajnoczi        .params     = "on|off|flush|set [arg]",
239c5ceb523SStefan Hajnoczi        .help       = "open, close, or flush trace file, or set a new file name",
240c5ceb523SStefan Hajnoczi        .mhandler.cmd = do_trace_file,
241c5ceb523SStefan Hajnoczi    },
242c5ceb523SStefan Hajnoczi
243c5ceb523SStefan HajnocziSTEXI
244c5ceb523SStefan Hajnoczi@item trace-file on|off|flush
245c5ceb523SStefan Hajnoczi@findex trace-file
246c5ceb523SStefan HajnocziOpen, close, or flush the trace file.  If no argument is given, the status of the trace file is displayed.
247c5ceb523SStefan HajnocziETEXI
24822890ab5SPrerna Saxena#endif
24922890ab5SPrerna Saxena
250d7f9b689SLuiz Capitulino    {
251d7f9b689SLuiz Capitulino        .name       = "log",
252d7f9b689SLuiz Capitulino        .args_type  = "items:s",
253d7f9b689SLuiz Capitulino        .params     = "item1[,...]",
254d7f9b689SLuiz Capitulino        .help       = "activate logging of the specified items to '/tmp/qemu.log'",
255af4ce882SLuiz Capitulino        .mhandler.cmd = do_log,
256d7f9b689SLuiz Capitulino    },
257d7f9b689SLuiz Capitulino
2582313086aSBlue SwirlSTEXI
2592313086aSBlue Swirl@item log @var{item1}[,...]
26070fcbbe7SStefan Weil@findex log
2612313086aSBlue SwirlActivate logging of the specified items to @file{/tmp/qemu.log}.
2622313086aSBlue SwirlETEXI
2632313086aSBlue Swirl
264d7f9b689SLuiz Capitulino    {
265d7f9b689SLuiz Capitulino        .name       = "savevm",
266d7f9b689SLuiz Capitulino        .args_type  = "name:s?",
267d7f9b689SLuiz Capitulino        .params     = "[tag|id]",
268d7f9b689SLuiz Capitulino        .help       = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
269af4ce882SLuiz Capitulino        .mhandler.cmd = do_savevm,
270d7f9b689SLuiz Capitulino    },
271d7f9b689SLuiz Capitulino
2722313086aSBlue SwirlSTEXI
2732313086aSBlue Swirl@item savevm [@var{tag}|@var{id}]
27470fcbbe7SStefan Weil@findex savevm
2752313086aSBlue SwirlCreate a snapshot of the whole virtual machine. If @var{tag} is
2762313086aSBlue Swirlprovided, it is used as human readable identifier. If there is already
2772313086aSBlue Swirla snapshot with the same tag or ID, it is replaced. More info at
2782313086aSBlue Swirl@ref{vm_snapshots}.
2792313086aSBlue SwirlETEXI
2802313086aSBlue Swirl
281d7f9b689SLuiz Capitulino    {
282d7f9b689SLuiz Capitulino        .name       = "loadvm",
283d7f9b689SLuiz Capitulino        .args_type  = "name:s",
284d7f9b689SLuiz Capitulino        .params     = "tag|id",
285d7f9b689SLuiz Capitulino        .help       = "restore a VM snapshot from its tag or id",
286af4ce882SLuiz Capitulino        .mhandler.cmd = do_loadvm,
287d7f9b689SLuiz Capitulino    },
288d7f9b689SLuiz Capitulino
2892313086aSBlue SwirlSTEXI
2902313086aSBlue Swirl@item loadvm @var{tag}|@var{id}
29170fcbbe7SStefan Weil@findex loadvm
2922313086aSBlue SwirlSet the whole virtual machine to the snapshot identified by the tag
2932313086aSBlue Swirl@var{tag} or the unique snapshot ID @var{id}.
2942313086aSBlue SwirlETEXI
2952313086aSBlue Swirl
296d7f9b689SLuiz Capitulino    {
297d7f9b689SLuiz Capitulino        .name       = "delvm",
298d7f9b689SLuiz Capitulino        .args_type  = "name:s",
299d7f9b689SLuiz Capitulino        .params     = "tag|id",
300d7f9b689SLuiz Capitulino        .help       = "delete a VM snapshot from its tag or id",
301af4ce882SLuiz Capitulino        .mhandler.cmd = do_delvm,
302d7f9b689SLuiz Capitulino    },
303d7f9b689SLuiz Capitulino
3042313086aSBlue SwirlSTEXI
3052313086aSBlue Swirl@item delvm @var{tag}|@var{id}
30670fcbbe7SStefan Weil@findex delvm
3072313086aSBlue SwirlDelete the snapshot identified by @var{tag} or @var{id}.
3082313086aSBlue SwirlETEXI
3092313086aSBlue Swirl
310d7f9b689SLuiz Capitulino    {
311d7f9b689SLuiz Capitulino        .name       = "singlestep",
312d7f9b689SLuiz Capitulino        .args_type  = "option:s?",
313d7f9b689SLuiz Capitulino        .params     = "[on|off]",
314d7f9b689SLuiz Capitulino        .help       = "run emulation in singlestep mode or switch to normal mode",
315af4ce882SLuiz Capitulino        .mhandler.cmd = do_singlestep,
316d7f9b689SLuiz Capitulino    },
317d7f9b689SLuiz Capitulino
3182313086aSBlue SwirlSTEXI
3192313086aSBlue Swirl@item singlestep [off]
32070fcbbe7SStefan Weil@findex singlestep
3212313086aSBlue SwirlRun the emulation in single step mode.
3222313086aSBlue SwirlIf called with option off, the emulation returns to normal mode.
3232313086aSBlue SwirlETEXI
3242313086aSBlue Swirl
325d7f9b689SLuiz Capitulino    {
326d7f9b689SLuiz Capitulino        .name       = "stop",
327d7f9b689SLuiz Capitulino        .args_type  = "",
328d7f9b689SLuiz Capitulino        .params     = "",
329d7f9b689SLuiz Capitulino        .help       = "stop emulation",
3305f158f21SLuiz Capitulino        .mhandler.cmd = hmp_stop,
331d7f9b689SLuiz Capitulino    },
332d7f9b689SLuiz Capitulino
3332313086aSBlue SwirlSTEXI
3342313086aSBlue Swirl@item stop
33570fcbbe7SStefan Weil@findex stop
3362313086aSBlue SwirlStop emulation.
3372313086aSBlue SwirlETEXI
3382313086aSBlue Swirl
339d7f9b689SLuiz Capitulino    {
340d7f9b689SLuiz Capitulino        .name       = "c|cont",
341d7f9b689SLuiz Capitulino        .args_type  = "",
342d7f9b689SLuiz Capitulino        .params     = "",
343d7f9b689SLuiz Capitulino        .help       = "resume emulation",
344e42e818bSLuiz Capitulino        .mhandler.cmd = hmp_cont,
345d7f9b689SLuiz Capitulino    },
346d7f9b689SLuiz Capitulino
3472313086aSBlue SwirlSTEXI
3482313086aSBlue Swirl@item c or cont
34970fcbbe7SStefan Weil@findex cont
3502313086aSBlue SwirlResume emulation.
3512313086aSBlue SwirlETEXI
3522313086aSBlue Swirl
353d7f9b689SLuiz Capitulino    {
3549b9df25aSGerd Hoffmann        .name       = "system_wakeup",
3559b9df25aSGerd Hoffmann        .args_type  = "",
3569b9df25aSGerd Hoffmann        .params     = "",
3579b9df25aSGerd Hoffmann        .help       = "wakeup guest from suspend",
3589b9df25aSGerd Hoffmann        .mhandler.cmd = hmp_system_wakeup,
3599b9df25aSGerd Hoffmann    },
3609b9df25aSGerd Hoffmann
3619b9df25aSGerd HoffmannSTEXI
3629b9df25aSGerd Hoffmann@item system_wakeup
3639b9df25aSGerd Hoffmann@findex system_wakeup
3649b9df25aSGerd HoffmannWakeup guest from suspend.
3659b9df25aSGerd HoffmannETEXI
3669b9df25aSGerd Hoffmann
3679b9df25aSGerd Hoffmann    {
368d7f9b689SLuiz Capitulino        .name       = "gdbserver",
369d7f9b689SLuiz Capitulino        .args_type  = "device:s?",
370d7f9b689SLuiz Capitulino        .params     = "[device]",
371d7f9b689SLuiz Capitulino        .help       = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
372af4ce882SLuiz Capitulino        .mhandler.cmd = do_gdbserver,
373d7f9b689SLuiz Capitulino    },
374d7f9b689SLuiz Capitulino
3752313086aSBlue SwirlSTEXI
3762313086aSBlue Swirl@item gdbserver [@var{port}]
37770fcbbe7SStefan Weil@findex gdbserver
3782313086aSBlue SwirlStart gdbserver session (default @var{port}=1234)
3792313086aSBlue SwirlETEXI
3802313086aSBlue Swirl
381d7f9b689SLuiz Capitulino    {
382d7f9b689SLuiz Capitulino        .name       = "x",
383d7f9b689SLuiz Capitulino        .args_type  = "fmt:/,addr:l",
384d7f9b689SLuiz Capitulino        .params     = "/fmt addr",
385d7f9b689SLuiz Capitulino        .help       = "virtual memory dump starting at 'addr'",
386af4ce882SLuiz Capitulino        .mhandler.cmd = do_memory_dump,
387d7f9b689SLuiz Capitulino    },
388d7f9b689SLuiz Capitulino
3892313086aSBlue SwirlSTEXI
3902313086aSBlue Swirl@item x/fmt @var{addr}
39170fcbbe7SStefan Weil@findex x
3922313086aSBlue SwirlVirtual memory dump starting at @var{addr}.
3932313086aSBlue SwirlETEXI
3942313086aSBlue Swirl
395d7f9b689SLuiz Capitulino    {
396d7f9b689SLuiz Capitulino        .name       = "xp",
397d7f9b689SLuiz Capitulino        .args_type  = "fmt:/,addr:l",
398d7f9b689SLuiz Capitulino        .params     = "/fmt addr",
399d7f9b689SLuiz Capitulino        .help       = "physical memory dump starting at 'addr'",
400af4ce882SLuiz Capitulino        .mhandler.cmd = do_physical_memory_dump,
401d7f9b689SLuiz Capitulino    },
402d7f9b689SLuiz Capitulino
4032313086aSBlue SwirlSTEXI
4042313086aSBlue Swirl@item xp /@var{fmt} @var{addr}
40570fcbbe7SStefan Weil@findex xp
4062313086aSBlue SwirlPhysical memory dump starting at @var{addr}.
4072313086aSBlue Swirl
4082313086aSBlue Swirl@var{fmt} is a format which tells the command how to format the
4092313086aSBlue Swirldata. Its syntax is: @option{/@{count@}@{format@}@{size@}}
4102313086aSBlue Swirl
4112313086aSBlue Swirl@table @var
4122313086aSBlue Swirl@item count
4132313086aSBlue Swirlis the number of items to be dumped.
4142313086aSBlue Swirl
4152313086aSBlue Swirl@item format
4162313086aSBlue Swirlcan be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
4172313086aSBlue Swirlc (char) or i (asm instruction).
4182313086aSBlue Swirl
4192313086aSBlue Swirl@item size
4202313086aSBlue Swirlcan be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
4212313086aSBlue Swirl@code{h} or @code{w} can be specified with the @code{i} format to
4222313086aSBlue Swirlrespectively select 16 or 32 bit code instruction size.
4232313086aSBlue Swirl
4242313086aSBlue Swirl@end table
4252313086aSBlue Swirl
4262313086aSBlue SwirlExamples:
4272313086aSBlue Swirl@itemize
4282313086aSBlue Swirl@item
4292313086aSBlue SwirlDump 10 instructions at the current instruction pointer:
4302313086aSBlue Swirl@example
4312313086aSBlue Swirl(qemu) x/10i $eip
4322313086aSBlue Swirl0x90107063:  ret
4332313086aSBlue Swirl0x90107064:  sti
4342313086aSBlue Swirl0x90107065:  lea    0x0(%esi,1),%esi
4352313086aSBlue Swirl0x90107069:  lea    0x0(%edi,1),%edi
4362313086aSBlue Swirl0x90107070:  ret
4372313086aSBlue Swirl0x90107071:  jmp    0x90107080
4382313086aSBlue Swirl0x90107073:  nop
4392313086aSBlue Swirl0x90107074:  nop
4402313086aSBlue Swirl0x90107075:  nop
4412313086aSBlue Swirl0x90107076:  nop
4422313086aSBlue Swirl@end example
4432313086aSBlue Swirl
4442313086aSBlue Swirl@item
4452313086aSBlue SwirlDump 80 16 bit values at the start of the video memory.
4462313086aSBlue Swirl@smallexample
4472313086aSBlue Swirl(qemu) xp/80hx 0xb8000
4482313086aSBlue Swirl0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
4492313086aSBlue Swirl0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
4502313086aSBlue Swirl0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
4512313086aSBlue Swirl0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
4522313086aSBlue Swirl0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
4532313086aSBlue Swirl0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
4542313086aSBlue Swirl0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4552313086aSBlue Swirl0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4562313086aSBlue Swirl0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4572313086aSBlue Swirl0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4582313086aSBlue Swirl@end smallexample
4592313086aSBlue Swirl@end itemize
4602313086aSBlue SwirlETEXI
4612313086aSBlue Swirl
462d7f9b689SLuiz Capitulino    {
463d7f9b689SLuiz Capitulino        .name       = "p|print",
464d7f9b689SLuiz Capitulino        .args_type  = "fmt:/,val:l",
465d7f9b689SLuiz Capitulino        .params     = "/fmt expr",
466d7f9b689SLuiz Capitulino        .help       = "print expression value (use $reg for CPU register access)",
467af4ce882SLuiz Capitulino        .mhandler.cmd = do_print,
468d7f9b689SLuiz Capitulino    },
469d7f9b689SLuiz Capitulino
4702313086aSBlue SwirlSTEXI
4712313086aSBlue Swirl@item p or print/@var{fmt} @var{expr}
47270fcbbe7SStefan Weil@findex print
4732313086aSBlue Swirl
4742313086aSBlue SwirlPrint expression value. Only the @var{format} part of @var{fmt} is
4752313086aSBlue Swirlused.
4762313086aSBlue SwirlETEXI
4772313086aSBlue Swirl
478d7f9b689SLuiz Capitulino    {
479d7f9b689SLuiz Capitulino        .name       = "i",
480d7f9b689SLuiz Capitulino        .args_type  = "fmt:/,addr:i,index:i.",
481d7f9b689SLuiz Capitulino        .params     = "/fmt addr",
482d7f9b689SLuiz Capitulino        .help       = "I/O port read",
483af4ce882SLuiz Capitulino        .mhandler.cmd = do_ioport_read,
484d7f9b689SLuiz Capitulino    },
485d7f9b689SLuiz Capitulino
4862313086aSBlue SwirlSTEXI
4872313086aSBlue SwirlRead I/O port.
4882313086aSBlue SwirlETEXI
4892313086aSBlue Swirl
490d7f9b689SLuiz Capitulino    {
491d7f9b689SLuiz Capitulino        .name       = "o",
492d7f9b689SLuiz Capitulino        .args_type  = "fmt:/,addr:i,val:i",
493d7f9b689SLuiz Capitulino        .params     = "/fmt addr value",
494d7f9b689SLuiz Capitulino        .help       = "I/O port write",
495af4ce882SLuiz Capitulino        .mhandler.cmd = do_ioport_write,
496d7f9b689SLuiz Capitulino    },
497d7f9b689SLuiz Capitulino
498f114784fSJan KiszkaSTEXI
499f114784fSJan KiszkaWrite to I/O port.
500f114784fSJan KiszkaETEXI
5012313086aSBlue Swirl
502d7f9b689SLuiz Capitulino    {
503d7f9b689SLuiz Capitulino        .name       = "sendkey",
5042ef20c15SAmos Kong        .args_type  = "keys:s,hold-time:i?",
505d7f9b689SLuiz Capitulino        .params     = "keys [hold_ms]",
506d7f9b689SLuiz Capitulino        .help       = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
507e4c8f004SAmos Kong        .mhandler.cmd = hmp_send_key,
508d7f9b689SLuiz Capitulino    },
509d7f9b689SLuiz Capitulino
5102313086aSBlue SwirlSTEXI
5112313086aSBlue Swirl@item sendkey @var{keys}
51270fcbbe7SStefan Weil@findex sendkey
5132313086aSBlue Swirl
514886cc706SAmos KongSend @var{keys} to the guest. @var{keys} could be the name of the
515886cc706SAmos Kongkey or the raw value in hexadecimal format. Use @code{-} to press
516886cc706SAmos Kongseveral keys simultaneously. Example:
5172313086aSBlue Swirl@example
5182313086aSBlue Swirlsendkey ctrl-alt-f1
5192313086aSBlue Swirl@end example
5202313086aSBlue Swirl
5212313086aSBlue SwirlThis command is useful to send keys that your graphical user interface
5222313086aSBlue Swirlintercepts at low level, such as @code{ctrl-alt-f1} in X Window.
5232313086aSBlue SwirlETEXI
5242313086aSBlue Swirl
525d7f9b689SLuiz Capitulino    {
526d7f9b689SLuiz Capitulino        .name       = "system_reset",
527d7f9b689SLuiz Capitulino        .args_type  = "",
528d7f9b689SLuiz Capitulino        .params     = "",
529d7f9b689SLuiz Capitulino        .help       = "reset the system",
53038d22653SLuiz Capitulino        .mhandler.cmd = hmp_system_reset,
531d7f9b689SLuiz Capitulino    },
532d7f9b689SLuiz Capitulino
5332313086aSBlue SwirlSTEXI
5342313086aSBlue Swirl@item system_reset
53570fcbbe7SStefan Weil@findex system_reset
5362313086aSBlue Swirl
5372313086aSBlue SwirlReset the system.
5382313086aSBlue SwirlETEXI
5392313086aSBlue Swirl
540d7f9b689SLuiz Capitulino    {
541d7f9b689SLuiz Capitulino        .name       = "system_powerdown",
542d7f9b689SLuiz Capitulino        .args_type  = "",
543d7f9b689SLuiz Capitulino        .params     = "",
544d7f9b689SLuiz Capitulino        .help       = "send system power down event",
5455bc465e4SLuiz Capitulino        .mhandler.cmd = hmp_system_powerdown,
546d7f9b689SLuiz Capitulino    },
547d7f9b689SLuiz Capitulino
5482313086aSBlue SwirlSTEXI
5492313086aSBlue Swirl@item system_powerdown
55070fcbbe7SStefan Weil@findex system_powerdown
5512313086aSBlue Swirl
5522313086aSBlue SwirlPower down the system (if supported).
5532313086aSBlue SwirlETEXI
5542313086aSBlue Swirl
555d7f9b689SLuiz Capitulino    {
556d7f9b689SLuiz Capitulino        .name       = "sum",
557d7f9b689SLuiz Capitulino        .args_type  = "start:i,size:i",
558d7f9b689SLuiz Capitulino        .params     = "addr size",
559d7f9b689SLuiz Capitulino        .help       = "compute the checksum of a memory region",
560af4ce882SLuiz Capitulino        .mhandler.cmd = do_sum,
561d7f9b689SLuiz Capitulino    },
562d7f9b689SLuiz Capitulino
5632313086aSBlue SwirlSTEXI
5642313086aSBlue Swirl@item sum @var{addr} @var{size}
56570fcbbe7SStefan Weil@findex sum
5662313086aSBlue Swirl
5672313086aSBlue SwirlCompute the checksum of a memory region.
5682313086aSBlue SwirlETEXI
5692313086aSBlue Swirl
570d7f9b689SLuiz Capitulino    {
571d7f9b689SLuiz Capitulino        .name       = "usb_add",
572d7f9b689SLuiz Capitulino        .args_type  = "devname:s",
573d7f9b689SLuiz Capitulino        .params     = "device",
574d7f9b689SLuiz Capitulino        .help       = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
575af4ce882SLuiz Capitulino        .mhandler.cmd = do_usb_add,
576d7f9b689SLuiz Capitulino    },
577d7f9b689SLuiz Capitulino
5782313086aSBlue SwirlSTEXI
5792313086aSBlue Swirl@item usb_add @var{devname}
58070fcbbe7SStefan Weil@findex usb_add
5812313086aSBlue Swirl
5822313086aSBlue SwirlAdd the USB device @var{devname}.  For details of available devices see
5832313086aSBlue Swirl@ref{usb_devices}
5842313086aSBlue SwirlETEXI
5852313086aSBlue Swirl
586d7f9b689SLuiz Capitulino    {
587d7f9b689SLuiz Capitulino        .name       = "usb_del",
588d7f9b689SLuiz Capitulino        .args_type  = "devname:s",
589d7f9b689SLuiz Capitulino        .params     = "device",
590d7f9b689SLuiz Capitulino        .help       = "remove USB device 'bus.addr'",
591af4ce882SLuiz Capitulino        .mhandler.cmd = do_usb_del,
592d7f9b689SLuiz Capitulino    },
593d7f9b689SLuiz Capitulino
5942313086aSBlue SwirlSTEXI
5952313086aSBlue Swirl@item usb_del @var{devname}
59670fcbbe7SStefan Weil@findex usb_del
5972313086aSBlue Swirl
5982313086aSBlue SwirlRemove the USB device @var{devname} from the QEMU virtual USB
5992313086aSBlue Swirlhub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
6002313086aSBlue Swirlcommand @code{info usb} to see the devices you can remove.
6012313086aSBlue SwirlETEXI
6022313086aSBlue Swirl
603d7f9b689SLuiz Capitulino    {
604d7f9b689SLuiz Capitulino        .name       = "device_add",
605c7e4e8ceSMarkus Armbruster        .args_type  = "device:O",
606c7e4e8ceSMarkus Armbruster        .params     = "driver[,prop=value][,...]",
607d7f9b689SLuiz Capitulino        .help       = "add device, like -device on the command line",
6088bc27249SMarkus Armbruster        .user_print = monitor_user_noop,
6098bc27249SMarkus Armbruster        .mhandler.cmd_new = do_device_add,
610d7f9b689SLuiz Capitulino    },
611d7f9b689SLuiz Capitulino
6123418bd25SGerd HoffmannSTEXI
6133418bd25SGerd Hoffmann@item device_add @var{config}
61470fcbbe7SStefan Weil@findex device_add
6153418bd25SGerd Hoffmann
6163418bd25SGerd HoffmannAdd device.
6173418bd25SGerd HoffmannETEXI
6183418bd25SGerd Hoffmann
619d7f9b689SLuiz Capitulino    {
620d7f9b689SLuiz Capitulino        .name       = "device_del",
621d7f9b689SLuiz Capitulino        .args_type  = "id:s",
622d7f9b689SLuiz Capitulino        .params     = "device",
623d7f9b689SLuiz Capitulino        .help       = "remove device",
624a15fef21SLuiz Capitulino        .mhandler.cmd = hmp_device_del,
625d7f9b689SLuiz Capitulino    },
626d7f9b689SLuiz Capitulino
6273418bd25SGerd HoffmannSTEXI
6283418bd25SGerd Hoffmann@item device_del @var{id}
62970fcbbe7SStefan Weil@findex device_del
6303418bd25SGerd Hoffmann
6313418bd25SGerd HoffmannRemove device @var{id}.
6323418bd25SGerd HoffmannETEXI
6333418bd25SGerd Hoffmann
634d7f9b689SLuiz Capitulino    {
635d7f9b689SLuiz Capitulino        .name       = "cpu",
636d7f9b689SLuiz Capitulino        .args_type  = "index:i",
637d7f9b689SLuiz Capitulino        .params     = "index",
638d7f9b689SLuiz Capitulino        .help       = "set the default CPU",
639755f1968SLuiz Capitulino        .mhandler.cmd = hmp_cpu,
640d7f9b689SLuiz Capitulino    },
6413418bd25SGerd Hoffmann
6422313086aSBlue SwirlSTEXI
643c427ea9cSMarkus Armbruster@item cpu @var{index}
644c427ea9cSMarkus Armbruster@findex cpu
6452313086aSBlue SwirlSet the default CPU.
6462313086aSBlue SwirlETEXI
6472313086aSBlue Swirl
648d7f9b689SLuiz Capitulino    {
649d7f9b689SLuiz Capitulino        .name       = "mouse_move",
650d7f9b689SLuiz Capitulino        .args_type  = "dx_str:s,dy_str:s,dz_str:s?",
651d7f9b689SLuiz Capitulino        .params     = "dx dy [dz]",
652d7f9b689SLuiz Capitulino        .help       = "send mouse move events",
653af4ce882SLuiz Capitulino        .mhandler.cmd = do_mouse_move,
654d7f9b689SLuiz Capitulino    },
655d7f9b689SLuiz Capitulino
6562313086aSBlue SwirlSTEXI
6572313086aSBlue Swirl@item mouse_move @var{dx} @var{dy} [@var{dz}]
65870fcbbe7SStefan Weil@findex mouse_move
6592313086aSBlue SwirlMove the active mouse to the specified coordinates @var{dx} @var{dy}
6602313086aSBlue Swirlwith optional scroll axis @var{dz}.
6612313086aSBlue SwirlETEXI
6622313086aSBlue Swirl
663d7f9b689SLuiz Capitulino    {
664d7f9b689SLuiz Capitulino        .name       = "mouse_button",
665d7f9b689SLuiz Capitulino        .args_type  = "button_state:i",
666d7f9b689SLuiz Capitulino        .params     = "state",
667d7f9b689SLuiz Capitulino        .help       = "change mouse button state (1=L, 2=M, 4=R)",
668af4ce882SLuiz Capitulino        .mhandler.cmd = do_mouse_button,
669d7f9b689SLuiz Capitulino    },
670d7f9b689SLuiz Capitulino
6712313086aSBlue SwirlSTEXI
6722313086aSBlue Swirl@item mouse_button @var{val}
67370fcbbe7SStefan Weil@findex mouse_button
6742313086aSBlue SwirlChange the active mouse button state @var{val} (1=L, 2=M, 4=R).
6752313086aSBlue SwirlETEXI
6762313086aSBlue Swirl
677d7f9b689SLuiz Capitulino    {
678d7f9b689SLuiz Capitulino        .name       = "mouse_set",
679d7f9b689SLuiz Capitulino        .args_type  = "index:i",
680d7f9b689SLuiz Capitulino        .params     = "index",
681d7f9b689SLuiz Capitulino        .help       = "set which mouse device receives events",
682af4ce882SLuiz Capitulino        .mhandler.cmd = do_mouse_set,
683d7f9b689SLuiz Capitulino    },
684d7f9b689SLuiz Capitulino
6852313086aSBlue SwirlSTEXI
6862313086aSBlue Swirl@item mouse_set @var{index}
68770fcbbe7SStefan Weil@findex mouse_set
6882313086aSBlue SwirlSet which mouse device receives events at given @var{index}, index
6892313086aSBlue Swirlcan be obtained with
6902313086aSBlue Swirl@example
6912313086aSBlue Swirlinfo mice
6922313086aSBlue Swirl@end example
6932313086aSBlue SwirlETEXI
6942313086aSBlue Swirl
6952313086aSBlue Swirl#ifdef HAS_AUDIO
696d7f9b689SLuiz Capitulino    {
697d7f9b689SLuiz Capitulino        .name       = "wavcapture",
698d7f9b689SLuiz Capitulino        .args_type  = "path:F,freq:i?,bits:i?,nchannels:i?",
699d7f9b689SLuiz Capitulino        .params     = "path [frequency [bits [channels]]]",
700d7f9b689SLuiz Capitulino        .help       = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
701af4ce882SLuiz Capitulino        .mhandler.cmd = do_wav_capture,
702d7f9b689SLuiz Capitulino    },
7032313086aSBlue Swirl#endif
7042313086aSBlue SwirlSTEXI
7052313086aSBlue Swirl@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
70670fcbbe7SStefan Weil@findex wavcapture
7072313086aSBlue SwirlCapture audio into @var{filename}. Using sample rate @var{frequency}
7082313086aSBlue Swirlbits per sample @var{bits} and number of channels @var{channels}.
7092313086aSBlue Swirl
7102313086aSBlue SwirlDefaults:
7112313086aSBlue Swirl@itemize @minus
7122313086aSBlue Swirl@item Sample rate = 44100 Hz - CD quality
7132313086aSBlue Swirl@item Bits = 16
7142313086aSBlue Swirl@item Number of channels = 2 - Stereo
7152313086aSBlue Swirl@end itemize
7162313086aSBlue SwirlETEXI
7172313086aSBlue Swirl
7182313086aSBlue Swirl#ifdef HAS_AUDIO
719d7f9b689SLuiz Capitulino    {
720d7f9b689SLuiz Capitulino        .name       = "stopcapture",
721d7f9b689SLuiz Capitulino        .args_type  = "n:i",
722d7f9b689SLuiz Capitulino        .params     = "capture index",
723d7f9b689SLuiz Capitulino        .help       = "stop capture",
724af4ce882SLuiz Capitulino        .mhandler.cmd = do_stop_capture,
725d7f9b689SLuiz Capitulino    },
7262313086aSBlue Swirl#endif
7272313086aSBlue SwirlSTEXI
7282313086aSBlue Swirl@item stopcapture @var{index}
72970fcbbe7SStefan Weil@findex stopcapture
7302313086aSBlue SwirlStop capture with a given @var{index}, index can be obtained with
7312313086aSBlue Swirl@example
7322313086aSBlue Swirlinfo capture
7332313086aSBlue Swirl@end example
7342313086aSBlue SwirlETEXI
7352313086aSBlue Swirl
736d7f9b689SLuiz Capitulino    {
737d7f9b689SLuiz Capitulino        .name       = "memsave",
738d7f9b689SLuiz Capitulino        .args_type  = "val:l,size:i,filename:s",
739d7f9b689SLuiz Capitulino        .params     = "addr size file",
740d7f9b689SLuiz Capitulino        .help       = "save to disk virtual memory dump starting at 'addr' of size 'size'",
7410cfd6a9aSLuiz Capitulino        .mhandler.cmd = hmp_memsave,
742d7f9b689SLuiz Capitulino    },
743d7f9b689SLuiz Capitulino
7442313086aSBlue SwirlSTEXI
7452313086aSBlue Swirl@item memsave @var{addr} @var{size} @var{file}
74670fcbbe7SStefan Weil@findex memsave
7472313086aSBlue Swirlsave to disk virtual memory dump starting at @var{addr} of size @var{size}.
7482313086aSBlue SwirlETEXI
7492313086aSBlue Swirl
750d7f9b689SLuiz Capitulino    {
751d7f9b689SLuiz Capitulino        .name       = "pmemsave",
752d7f9b689SLuiz Capitulino        .args_type  = "val:l,size:i,filename:s",
753d7f9b689SLuiz Capitulino        .params     = "addr size file",
754d7f9b689SLuiz Capitulino        .help       = "save to disk physical memory dump starting at 'addr' of size 'size'",
7556d3962bfSLuiz Capitulino        .mhandler.cmd = hmp_pmemsave,
756d7f9b689SLuiz Capitulino    },
757d7f9b689SLuiz Capitulino
7582313086aSBlue SwirlSTEXI
7592313086aSBlue Swirl@item pmemsave @var{addr} @var{size} @var{file}
76070fcbbe7SStefan Weil@findex pmemsave
7612313086aSBlue Swirlsave to disk physical memory dump starting at @var{addr} of size @var{size}.
7622313086aSBlue SwirlETEXI
7632313086aSBlue Swirl
764d7f9b689SLuiz Capitulino    {
765d7f9b689SLuiz Capitulino        .name       = "boot_set",
766d7f9b689SLuiz Capitulino        .args_type  = "bootdevice:s",
767d7f9b689SLuiz Capitulino        .params     = "bootdevice",
768d7f9b689SLuiz Capitulino        .help       = "define new values for the boot device list",
769af4ce882SLuiz Capitulino        .mhandler.cmd = do_boot_set,
770d7f9b689SLuiz Capitulino    },
771d7f9b689SLuiz Capitulino
7722313086aSBlue SwirlSTEXI
7732313086aSBlue Swirl@item boot_set @var{bootdevicelist}
77470fcbbe7SStefan Weil@findex boot_set
7752313086aSBlue Swirl
7762313086aSBlue SwirlDefine new values for the boot device list. Those values will override
7772313086aSBlue Swirlthe values specified on the command line through the @code{-boot} option.
7782313086aSBlue Swirl
7792313086aSBlue SwirlThe values that can be specified here depend on the machine type, but are
7802313086aSBlue Swirlthe same that can be specified in the @code{-boot} command line option.
7812313086aSBlue SwirlETEXI
7822313086aSBlue Swirl
7832313086aSBlue Swirl#if defined(TARGET_I386)
784d7f9b689SLuiz Capitulino    {
785d7f9b689SLuiz Capitulino        .name       = "nmi",
786e9b4b432SLuiz Capitulino        .args_type  = "",
787e9b4b432SLuiz Capitulino        .params     = "",
788e9b4b432SLuiz Capitulino        .help       = "inject an NMI on all guest's CPUs",
789ab49ab5cSLuiz Capitulino        .mhandler.cmd = hmp_inject_nmi,
790d7f9b689SLuiz Capitulino    },
7912313086aSBlue Swirl#endif
7922313086aSBlue SwirlSTEXI
7932313086aSBlue Swirl@item nmi @var{cpu}
79470fcbbe7SStefan Weil@findex nmi
7952313086aSBlue SwirlInject an NMI on the given CPU (x86 only).
7962313086aSBlue SwirlETEXI
7972313086aSBlue Swirl
798d7f9b689SLuiz Capitulino    {
799d7f9b689SLuiz Capitulino        .name       = "migrate",
800fbc3d96cSlirans@il.ibm.com        .args_type  = "detach:-d,blk:-b,inc:-i,uri:s",
801fbc3d96cSlirans@il.ibm.com        .params     = "[-d] [-b] [-i] uri",
802fbc3d96cSlirans@il.ibm.com        .help       = "migrate to URI (using -d to not wait for completion)"
803fbc3d96cSlirans@il.ibm.com		      "\n\t\t\t -b for migration without shared storage with"
804fbc3d96cSlirans@il.ibm.com		      " full copy of disk\n\t\t\t -i for migration without "
805fbc3d96cSlirans@il.ibm.com		      "shared storage with incremental copy of disk "
806fbc3d96cSlirans@il.ibm.com		      "(base image shared between src and destination)",
807e1c37d0eSLuiz Capitulino        .mhandler.cmd = hmp_migrate,
808d7f9b689SLuiz Capitulino    },
809d7f9b689SLuiz Capitulino
810fbc3d96cSlirans@il.ibm.com
8112313086aSBlue SwirlSTEXI
812fbc3d96cSlirans@il.ibm.com@item migrate [-d] [-b] [-i] @var{uri}
81370fcbbe7SStefan Weil@findex migrate
8142313086aSBlue SwirlMigrate to @var{uri} (using -d to not wait for completion).
815fbc3d96cSlirans@il.ibm.com	-b for migration with full copy of disk
816fbc3d96cSlirans@il.ibm.com	-i for migration with incremental copy of disk (base image is shared)
8172313086aSBlue SwirlETEXI
8182313086aSBlue Swirl
819d7f9b689SLuiz Capitulino    {
820d7f9b689SLuiz Capitulino        .name       = "migrate_cancel",
821d7f9b689SLuiz Capitulino        .args_type  = "",
822d7f9b689SLuiz Capitulino        .params     = "",
823d7f9b689SLuiz Capitulino        .help       = "cancel the current VM migration",
8246cdedb07SLuiz Capitulino        .mhandler.cmd = hmp_migrate_cancel,
825d7f9b689SLuiz Capitulino    },
826d7f9b689SLuiz Capitulino
8272313086aSBlue SwirlSTEXI
8282313086aSBlue Swirl@item migrate_cancel
82970fcbbe7SStefan Weil@findex migrate_cancel
8302313086aSBlue SwirlCancel the current VM migration.
8319e1ba4ccSOrit Wasserman
8329e1ba4ccSOrit WassermanETEXI
8339e1ba4ccSOrit Wasserman
8349e1ba4ccSOrit Wasserman    {
8359e1ba4ccSOrit Wasserman        .name       = "migrate_set_cache_size",
8369e1ba4ccSOrit Wasserman        .args_type  = "value:o",
8379e1ba4ccSOrit Wasserman        .params     = "value",
8389e1ba4ccSOrit Wasserman        .help       = "set cache size (in bytes) for XBZRLE migrations,"
8399e1ba4ccSOrit Wasserman                      "the cache size will be rounded down to the nearest "
8409e1ba4ccSOrit Wasserman                      "power of 2.\n"
8419e1ba4ccSOrit Wasserman                      "The cache size affects the number of cache misses."
8429e1ba4ccSOrit Wasserman                      "In case of a high cache miss ratio you need to increase"
8439e1ba4ccSOrit Wasserman                      " the cache size",
8449e1ba4ccSOrit Wasserman        .mhandler.cmd = hmp_migrate_set_cache_size,
8459e1ba4ccSOrit Wasserman    },
8469e1ba4ccSOrit Wasserman
8479e1ba4ccSOrit WassermanSTEXI
8489e1ba4ccSOrit Wasserman@item migrate_set_cache_size @var{value}
8499e1ba4ccSOrit Wasserman@findex migrate_set_cache_size
8509e1ba4ccSOrit WassermanSet cache size to @var{value} (in bytes) for xbzrle migrations.
8512313086aSBlue SwirlETEXI
8522313086aSBlue Swirl
853d7f9b689SLuiz Capitulino    {
854d7f9b689SLuiz Capitulino        .name       = "migrate_set_speed",
855ed3d4a80SJes Sorensen        .args_type  = "value:o",
856d7f9b689SLuiz Capitulino        .params     = "value",
857ed3d4a80SJes Sorensen        .help       = "set maximum speed (in bytes) for migrations. "
858ed3d4a80SJes Sorensen	"Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
8593dc85383SLuiz Capitulino        .mhandler.cmd = hmp_migrate_set_speed,
860d7f9b689SLuiz Capitulino    },
861d7f9b689SLuiz Capitulino
8622313086aSBlue SwirlSTEXI
8632313086aSBlue Swirl@item migrate_set_speed @var{value}
86470fcbbe7SStefan Weil@findex migrate_set_speed
8652313086aSBlue SwirlSet maximum speed to @var{value} (in bytes) for migrations.
8662313086aSBlue SwirlETEXI
8672313086aSBlue Swirl
868d7f9b689SLuiz Capitulino    {
869d7f9b689SLuiz Capitulino        .name       = "migrate_set_downtime",
870b0fbf7d3SMarkus Armbruster        .args_type  = "value:T",
871d7f9b689SLuiz Capitulino        .params     = "value",
872d7f9b689SLuiz Capitulino        .help       = "set maximum tolerated downtime (in seconds) for migrations",
8734f0a993bSLuiz Capitulino        .mhandler.cmd = hmp_migrate_set_downtime,
874d7f9b689SLuiz Capitulino    },
8752ea42952SGlauber Costa
8762ea42952SGlauber CostaSTEXI
8772ea42952SGlauber Costa@item migrate_set_downtime @var{second}
87870fcbbe7SStefan Weil@findex migrate_set_downtime
8792ea42952SGlauber CostaSet maximum tolerated downtime (in seconds) for migration.
8802ea42952SGlauber CostaETEXI
8812ea42952SGlauber Costa
882f8882568SJes Sorensen    {
88300458433SOrit Wasserman        .name       = "migrate_set_capability",
88400458433SOrit Wasserman        .args_type  = "capability:s,state:b",
88500458433SOrit Wasserman        .params     = "capability state",
88600458433SOrit Wasserman        .help       = "Enable/Disable the usage of a capability for migration",
88700458433SOrit Wasserman        .mhandler.cmd = hmp_migrate_set_capability,
88800458433SOrit Wasserman    },
88900458433SOrit Wasserman
89000458433SOrit WassermanSTEXI
89100458433SOrit Wasserman@item migrate_set_capability @var{capability} @var{state}
89200458433SOrit Wasserman@findex migrate_set_capability
89300458433SOrit WassermanEnable/Disable the usage of a capability @var{capability} for migration.
89400458433SOrit WassermanETEXI
89500458433SOrit Wasserman
89600458433SOrit Wasserman    {
8972ea720dbSJes Sorensen        .name       = "client_migrate_info",
8982ea720dbSJes Sorensen        .args_type  = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
8992ea720dbSJes Sorensen        .params     = "protocol hostname port tls-port cert-subject",
9002ea720dbSJes Sorensen        .help       = "send migration info to spice/vnc client",
9012ea720dbSJes Sorensen        .user_print = monitor_user_noop,
902edc5cb1aSYonit Halperin        .mhandler.cmd_async = client_migrate_info,
903edc5cb1aSYonit Halperin        .flags      = MONITOR_CMD_ASYNC,
904f8882568SJes Sorensen    },
905f8882568SJes Sorensen
906f8882568SJes SorensenSTEXI
907e866e239SGerd Hoffmann@item client_migrate_info @var{protocol} @var{hostname} @var{port} @var{tls-port} @var{cert-subject}
908e866e239SGerd Hoffmann@findex client_migrate_info
909e866e239SGerd HoffmannSet the spice/vnc connection info for the migration target.  The spice/vnc
910e866e239SGerd Hoffmannserver will ask the spice/vnc client to automatically reconnect using the
911e866e239SGerd Hoffmannnew parameters (if specified) once the vm migration finished successfully.
912e866e239SGerd HoffmannETEXI
913e866e239SGerd Hoffmann
914783e9b48SWen Congyang#if defined(CONFIG_HAVE_CORE_DUMP)
915783e9b48SWen Congyang    {
916783e9b48SWen Congyang        .name       = "dump-guest-memory",
917*75363769SLuiz Capitulino        .args_type  = "paging:-p,filename:F,begin:i?,length:i?",
918*75363769SLuiz Capitulino        .params     = "[-p] filename [begin] [length]",
919783e9b48SWen Congyang        .help       = "dump guest memory to file"
920783e9b48SWen Congyang                      "\n\t\t\t begin(optional): the starting physical address"
921783e9b48SWen Congyang                      "\n\t\t\t length(optional): the memory size, in bytes",
922783e9b48SWen Congyang        .mhandler.cmd = hmp_dump_guest_memory,
923783e9b48SWen Congyang    },
924783e9b48SWen Congyang
925783e9b48SWen Congyang
926783e9b48SWen CongyangSTEXI
927783e9b48SWen Congyang@item dump-guest-memory [-p] @var{protocol} @var{begin} @var{length}
928783e9b48SWen Congyang@findex dump-guest-memory
929783e9b48SWen CongyangDump guest memory to @var{protocol}. The file can be processed with crash or
930783e9b48SWen Congyanggdb.
931*75363769SLuiz Capitulino  filename: dump file name
932783e9b48SWen Congyang    paging: do paging to get guest's memory mapping
933783e9b48SWen Congyang     begin: the starting physical address. It's optional, and should be
934783e9b48SWen Congyang            specified with length together.
935783e9b48SWen Congyang    length: the memory size, in bytes. It's optional, and should be specified
936783e9b48SWen Congyang            with begin together.
937783e9b48SWen CongyangETEXI
938783e9b48SWen Congyang#endif
939783e9b48SWen Congyang
940e866e239SGerd Hoffmann    {
9412ea720dbSJes Sorensen        .name       = "snapshot_blkdev",
9426cc2a415SPaolo Bonzini        .args_type  = "reuse:-n,device:B,snapshot-file:s?,format:s?",
9436cc2a415SPaolo Bonzini        .params     = "[-n] device [new-image-file] [format]",
9442ea720dbSJes Sorensen        .help       = "initiates a live snapshot\n\t\t\t"
9452ea720dbSJes Sorensen                      "of device. If a new image file is specified, the\n\t\t\t"
9462ea720dbSJes Sorensen                      "new image file will become the new root image.\n\t\t\t"
9472ea720dbSJes Sorensen                      "If format is specified, the snapshot file will\n\t\t\t"
9482ea720dbSJes Sorensen                      "be created in that format. Otherwise the\n\t\t\t"
9496cc2a415SPaolo Bonzini                      "snapshot will be internal! (currently unsupported).\n\t\t\t"
9506cc2a415SPaolo Bonzini                      "The default format is qcow2.  The -n flag requests QEMU\n\t\t\t"
9516cc2a415SPaolo Bonzini                      "to reuse the image found in new-image-file, instead of\n\t\t\t"
9526cc2a415SPaolo Bonzini                      "recreating it from scratch.",
9536106e249SLuiz Capitulino        .mhandler.cmd = hmp_snapshot_blkdev,
954e866e239SGerd Hoffmann    },
955e866e239SGerd Hoffmann
956e866e239SGerd HoffmannSTEXI
957f8882568SJes Sorensen@item snapshot_blkdev
958f8882568SJes Sorensen@findex snapshot_blkdev
959f8882568SJes SorensenSnapshot device, using snapshot file as target if provided
960f8882568SJes SorensenETEXI
961f8882568SJes Sorensen
962d7f9b689SLuiz Capitulino    {
963d7f9b689SLuiz Capitulino        .name       = "drive_add",
964d7f9b689SLuiz Capitulino        .args_type  = "pci_addr:s,opts:s",
965d7f9b689SLuiz Capitulino        .params     = "[[<domain>:]<bus>:]<slot>\n"
9662313086aSBlue Swirl                      "[file=file][,if=type][,bus=n]\n"
967fb0490f6SStefan Hajnoczi                      "[,unit=m][,media=d][,index=i]\n"
9682313086aSBlue Swirl                      "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
969fb0490f6SStefan Hajnoczi                      "[,snapshot=on|off][,cache=on|off]\n"
970fb0490f6SStefan Hajnoczi                      "[,readonly=on|off][,copy-on-read=on|off]",
971d7f9b689SLuiz Capitulino        .help       = "add drive to PCI storage controller",
972af4ce882SLuiz Capitulino        .mhandler.cmd = drive_hot_add,
973d7f9b689SLuiz Capitulino    },
974d7f9b689SLuiz Capitulino
9752313086aSBlue SwirlSTEXI
9762313086aSBlue Swirl@item drive_add
97770fcbbe7SStefan Weil@findex drive_add
9782313086aSBlue SwirlAdd drive to PCI storage controller.
9792313086aSBlue SwirlETEXI
9802313086aSBlue Swirl
9812313086aSBlue Swirl#if defined(TARGET_I386)
982d7f9b689SLuiz Capitulino    {
983d7f9b689SLuiz Capitulino        .name       = "pci_add",
984d7f9b689SLuiz Capitulino        .args_type  = "pci_addr:s,type:s,opts:s?",
985d7f9b689SLuiz Capitulino        .params     = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
986d7f9b689SLuiz Capitulino        .help       = "hot-add PCI device",
9876c6a58aeSMarkus Armbruster        .mhandler.cmd = pci_device_hot_add,
988d7f9b689SLuiz Capitulino    },
9892313086aSBlue Swirl#endif
990d7f9b689SLuiz Capitulino
9912313086aSBlue SwirlSTEXI
9922313086aSBlue Swirl@item pci_add
99370fcbbe7SStefan Weil@findex pci_add
9942313086aSBlue SwirlHot-add PCI device.
9952313086aSBlue SwirlETEXI
9962313086aSBlue Swirl
9972313086aSBlue Swirl#if defined(TARGET_I386)
998d7f9b689SLuiz Capitulino    {
999d7f9b689SLuiz Capitulino        .name       = "pci_del",
1000d7f9b689SLuiz Capitulino        .args_type  = "pci_addr:s",
1001d7f9b689SLuiz Capitulino        .params     = "[[<domain>:]<bus>:]<slot>",
1002d7f9b689SLuiz Capitulino        .help       = "hot remove PCI device",
1003b752daf0SMarkus Armbruster        .mhandler.cmd = do_pci_device_hot_remove,
1004d7f9b689SLuiz Capitulino    },
10052313086aSBlue Swirl#endif
1006d7f9b689SLuiz Capitulino
10072313086aSBlue SwirlSTEXI
10082313086aSBlue Swirl@item pci_del
100970fcbbe7SStefan Weil@findex pci_del
10102313086aSBlue SwirlHot remove PCI device.
10112313086aSBlue SwirlETEXI
10122313086aSBlue Swirl
1013d7f9b689SLuiz Capitulino    {
10142ae63bdaSIsaku Yamahata        .name       = "pcie_aer_inject_error",
10152ae63bdaSIsaku Yamahata        .args_type  = "advisory_non_fatal:-a,correctable:-c,"
10162ae63bdaSIsaku Yamahata	              "id:s,error_status:s,"
10172ae63bdaSIsaku Yamahata	              "header0:i?,header1:i?,header2:i?,header3:i?,"
10182ae63bdaSIsaku Yamahata	              "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
10192ae63bdaSIsaku Yamahata        .params     = "[-a] [-c] id "
10202ae63bdaSIsaku Yamahata                      "<error_status> [<tlp header> [<tlp header prefix>]]",
10212ae63bdaSIsaku Yamahata        .help       = "inject pcie aer error\n\t\t\t"
10222ae63bdaSIsaku Yamahata	              " -a for advisory non fatal error\n\t\t\t"
10232ae63bdaSIsaku Yamahata	              " -c for correctable error\n\t\t\t"
10242ae63bdaSIsaku Yamahata                      "<id> = qdev device id\n\t\t\t"
10252ae63bdaSIsaku Yamahata                      "<error_status> = error string or 32bit\n\t\t\t"
10262ae63bdaSIsaku Yamahata                      "<tlb header> = 32bit x 4\n\t\t\t"
10272ae63bdaSIsaku Yamahata                      "<tlb header prefix> = 32bit x 4",
10282ae63bdaSIsaku Yamahata        .user_print  = pcie_aer_inject_error_print,
10291f3392b7SZhi Yong Wu        .mhandler.cmd_new = do_pcie_aer_inject_error,
10302ae63bdaSIsaku Yamahata    },
10312ae63bdaSIsaku Yamahata
10322ae63bdaSIsaku YamahataSTEXI
10332ae63bdaSIsaku Yamahata@item pcie_aer_inject_error
10342ae63bdaSIsaku Yamahata@findex pcie_aer_inject_error
10352ae63bdaSIsaku YamahataInject PCIe AER error
10362ae63bdaSIsaku YamahataETEXI
10372ae63bdaSIsaku Yamahata
10382ae63bdaSIsaku Yamahata    {
1039d7f9b689SLuiz Capitulino        .name       = "host_net_add",
1040d7f9b689SLuiz Capitulino        .args_type  = "device:s,opts:s?",
1041d7f9b689SLuiz Capitulino        .params     = "tap|user|socket|vde|dump [options]",
1042d7f9b689SLuiz Capitulino        .help       = "add host VLAN client",
1043af4ce882SLuiz Capitulino        .mhandler.cmd = net_host_device_add,
1044d7f9b689SLuiz Capitulino    },
1045d7f9b689SLuiz Capitulino
10462313086aSBlue SwirlSTEXI
10472313086aSBlue Swirl@item host_net_add
104870fcbbe7SStefan Weil@findex host_net_add
10492313086aSBlue SwirlAdd host VLAN client.
10502313086aSBlue SwirlETEXI
10512313086aSBlue Swirl
1052d7f9b689SLuiz Capitulino    {
1053d7f9b689SLuiz Capitulino        .name       = "host_net_remove",
1054d7f9b689SLuiz Capitulino        .args_type  = "vlan_id:i,device:s",
1055d7f9b689SLuiz Capitulino        .params     = "vlan_id name",
1056d7f9b689SLuiz Capitulino        .help       = "remove host VLAN client",
1057af4ce882SLuiz Capitulino        .mhandler.cmd = net_host_device_remove,
1058d7f9b689SLuiz Capitulino    },
1059d7f9b689SLuiz Capitulino
10602313086aSBlue SwirlSTEXI
10612313086aSBlue Swirl@item host_net_remove
106270fcbbe7SStefan Weil@findex host_net_remove
10632313086aSBlue SwirlRemove host VLAN client.
10642313086aSBlue SwirlETEXI
10652313086aSBlue Swirl
1066ae82d324SMarkus Armbruster    {
1067ae82d324SMarkus Armbruster        .name       = "netdev_add",
1068ae82d324SMarkus Armbruster        .args_type  = "netdev:O",
1069ae82d324SMarkus Armbruster        .params     = "[user|tap|socket],id=str[,prop=value][,...]",
1070ae82d324SMarkus Armbruster        .help       = "add host network device",
1071928059a3SLuiz Capitulino        .mhandler.cmd = hmp_netdev_add,
1072ae82d324SMarkus Armbruster    },
1073ae82d324SMarkus Armbruster
1074ae82d324SMarkus ArmbrusterSTEXI
1075ae82d324SMarkus Armbruster@item netdev_add
1076ae82d324SMarkus Armbruster@findex netdev_add
1077ae82d324SMarkus ArmbrusterAdd host network device.
1078ae82d324SMarkus ArmbrusterETEXI
1079ae82d324SMarkus Armbruster
1080ae82d324SMarkus Armbruster    {
1081ae82d324SMarkus Armbruster        .name       = "netdev_del",
1082ae82d324SMarkus Armbruster        .args_type  = "id:s",
1083ae82d324SMarkus Armbruster        .params     = "id",
1084ae82d324SMarkus Armbruster        .help       = "remove host network device",
10855f964155SLuiz Capitulino        .mhandler.cmd = hmp_netdev_del,
1086ae82d324SMarkus Armbruster    },
1087ae82d324SMarkus Armbruster
1088ae82d324SMarkus ArmbrusterSTEXI
1089ae82d324SMarkus Armbruster@item netdev_del
1090ae82d324SMarkus Armbruster@findex netdev_del
1091ae82d324SMarkus ArmbrusterRemove host network device.
1092ae82d324SMarkus ArmbrusterETEXI
1093ae82d324SMarkus Armbruster
10942313086aSBlue Swirl#ifdef CONFIG_SLIRP
1095d7f9b689SLuiz Capitulino    {
1096d7f9b689SLuiz Capitulino        .name       = "hostfwd_add",
1097d7f9b689SLuiz Capitulino        .args_type  = "arg1:s,arg2:s?,arg3:s?",
1098d7f9b689SLuiz Capitulino        .params     = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
1099d7f9b689SLuiz Capitulino        .help       = "redirect TCP or UDP connections from host to guest (requires -net user)",
1100af4ce882SLuiz Capitulino        .mhandler.cmd = net_slirp_hostfwd_add,
1101d7f9b689SLuiz Capitulino    },
110221413d68SMarkus Armbruster#endif
110321413d68SMarkus ArmbrusterSTEXI
110421413d68SMarkus Armbruster@item hostfwd_add
110521413d68SMarkus Armbruster@findex hostfwd_add
110621413d68SMarkus ArmbrusterRedirect TCP or UDP connections from host to guest (requires -net user).
110721413d68SMarkus ArmbrusterETEXI
1108d7f9b689SLuiz Capitulino
110921413d68SMarkus Armbruster#ifdef CONFIG_SLIRP
1110d7f9b689SLuiz Capitulino    {
1111d7f9b689SLuiz Capitulino        .name       = "hostfwd_remove",
1112d7f9b689SLuiz Capitulino        .args_type  = "arg1:s,arg2:s?,arg3:s?",
1113d7f9b689SLuiz Capitulino        .params     = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
1114d7f9b689SLuiz Capitulino        .help       = "remove host-to-guest TCP or UDP redirection",
1115af4ce882SLuiz Capitulino        .mhandler.cmd = net_slirp_hostfwd_remove,
1116d7f9b689SLuiz Capitulino    },
1117d7f9b689SLuiz Capitulino
11182313086aSBlue Swirl#endif
11192313086aSBlue SwirlSTEXI
112021413d68SMarkus Armbruster@item hostfwd_remove
112121413d68SMarkus Armbruster@findex hostfwd_remove
112221413d68SMarkus ArmbrusterRemove host-to-guest TCP or UDP redirection.
11232313086aSBlue SwirlETEXI
11242313086aSBlue Swirl
1125d7f9b689SLuiz Capitulino    {
1126d7f9b689SLuiz Capitulino        .name       = "balloon",
11273b0bd6ecSLuiz Capitulino        .args_type  = "value:M",
1128d7f9b689SLuiz Capitulino        .params     = "target",
11293c05613aSRiccardo Magliocchetti        .help       = "request VM to change its memory allocation (in MB)",
1130d72f3264SLuiz Capitulino        .mhandler.cmd = hmp_balloon,
1131d7f9b689SLuiz Capitulino    },
1132d7f9b689SLuiz Capitulino
11332313086aSBlue SwirlSTEXI
11342313086aSBlue Swirl@item balloon @var{value}
113570fcbbe7SStefan Weil@findex balloon
11362313086aSBlue SwirlRequest VM to change its memory allocation to @var{value} (in MB).
11372313086aSBlue SwirlETEXI
11382313086aSBlue Swirl
1139d7f9b689SLuiz Capitulino    {
1140d7f9b689SLuiz Capitulino        .name       = "set_link",
1141c9b26a4cSMarkus Armbruster        .args_type  = "name:s,up:b",
1142c9b26a4cSMarkus Armbruster        .params     = "name on|off",
1143d7f9b689SLuiz Capitulino        .help       = "change the link status of a network adapter",
11444b37156cSLuiz Capitulino        .mhandler.cmd = hmp_set_link,
1145d7f9b689SLuiz Capitulino    },
1146d7f9b689SLuiz Capitulino
11472313086aSBlue SwirlSTEXI
1148c9b26a4cSMarkus Armbruster@item set_link @var{name} [on|off]
114970fcbbe7SStefan Weil@findex set_link
1150c9b26a4cSMarkus ArmbrusterSwitch link @var{name} on (i.e. up) or off (i.e. down).
11512313086aSBlue SwirlETEXI
11522313086aSBlue Swirl
1153d7f9b689SLuiz Capitulino    {
1154d7f9b689SLuiz Capitulino        .name       = "watchdog_action",
1155d7f9b689SLuiz Capitulino        .args_type  = "action:s",
1156d7f9b689SLuiz Capitulino        .params     = "[reset|shutdown|poweroff|pause|debug|none]",
1157d7f9b689SLuiz Capitulino        .help       = "change watchdog action",
1158af4ce882SLuiz Capitulino        .mhandler.cmd = do_watchdog_action,
1159d7f9b689SLuiz Capitulino    },
1160d7f9b689SLuiz Capitulino
11612313086aSBlue SwirlSTEXI
11622313086aSBlue Swirl@item watchdog_action
116370fcbbe7SStefan Weil@findex watchdog_action
11642313086aSBlue SwirlChange watchdog action.
11652313086aSBlue SwirlETEXI
11662313086aSBlue Swirl
1167d7f9b689SLuiz Capitulino    {
1168d7f9b689SLuiz Capitulino        .name       = "acl_show",
1169d7f9b689SLuiz Capitulino        .args_type  = "aclname:s",
1170d7f9b689SLuiz Capitulino        .params     = "aclname",
1171d7f9b689SLuiz Capitulino        .help       = "list rules in the access control list",
1172af4ce882SLuiz Capitulino        .mhandler.cmd = do_acl_show,
1173d7f9b689SLuiz Capitulino    },
1174d7f9b689SLuiz Capitulino
11752313086aSBlue SwirlSTEXI
117615dfcd45SJan Kiszka@item acl_show @var{aclname}
117770fcbbe7SStefan Weil@findex acl_show
117815dfcd45SJan KiszkaList all the matching rules in the access control list, and the default
117915dfcd45SJan Kiszkapolicy. There are currently two named access control lists,
118015dfcd45SJan Kiszka@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
118115dfcd45SJan Kiszkacertificate distinguished name, and SASL username respectively.
118215dfcd45SJan KiszkaETEXI
11832313086aSBlue Swirl
1184d7f9b689SLuiz Capitulino    {
1185d7f9b689SLuiz Capitulino        .name       = "acl_policy",
1186d7f9b689SLuiz Capitulino        .args_type  = "aclname:s,policy:s",
1187d7f9b689SLuiz Capitulino        .params     = "aclname allow|deny",
1188d7f9b689SLuiz Capitulino        .help       = "set default access control list policy",
1189af4ce882SLuiz Capitulino        .mhandler.cmd = do_acl_policy,
1190d7f9b689SLuiz Capitulino    },
1191d7f9b689SLuiz Capitulino
119215dfcd45SJan KiszkaSTEXI
1193cbbfacc6SJan Kiszka@item acl_policy @var{aclname} @code{allow|deny}
119470fcbbe7SStefan Weil@findex acl_policy
119515dfcd45SJan KiszkaSet the default access control list policy, used in the event that
11962313086aSBlue Swirlnone of the explicit rules match. The default policy at startup is
119715dfcd45SJan Kiszkaalways @code{deny}.
119815dfcd45SJan KiszkaETEXI
119915dfcd45SJan Kiszka
1200d7f9b689SLuiz Capitulino    {
1201d7f9b689SLuiz Capitulino        .name       = "acl_add",
1202d7f9b689SLuiz Capitulino        .args_type  = "aclname:s,match:s,policy:s,index:i?",
1203d7f9b689SLuiz Capitulino        .params     = "aclname match allow|deny [index]",
1204d7f9b689SLuiz Capitulino        .help       = "add a match rule to the access control list",
1205af4ce882SLuiz Capitulino        .mhandler.cmd = do_acl_add,
1206d7f9b689SLuiz Capitulino    },
1207d7f9b689SLuiz Capitulino
120815dfcd45SJan KiszkaSTEXI
12090e4aec98SMarkus Armbruster@item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
12100e4aec98SMarkus Armbruster@findex acl_add
121115dfcd45SJan KiszkaAdd a match rule to the access control list, allowing or denying access.
121215dfcd45SJan KiszkaThe match will normally be an exact username or x509 distinguished name,
121315dfcd45SJan Kiszkabut can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
121415dfcd45SJan Kiszkaallow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
12152313086aSBlue Swirlnormally be appended to the end of the ACL, but can be inserted
121615dfcd45SJan Kiszkaearlier in the list if the optional @var{index} parameter is supplied.
121715dfcd45SJan KiszkaETEXI
121815dfcd45SJan Kiszka
1219d7f9b689SLuiz Capitulino    {
1220d7f9b689SLuiz Capitulino        .name       = "acl_remove",
1221d7f9b689SLuiz Capitulino        .args_type  = "aclname:s,match:s",
1222d7f9b689SLuiz Capitulino        .params     = "aclname match",
1223d7f9b689SLuiz Capitulino        .help       = "remove a match rule from the access control list",
1224af4ce882SLuiz Capitulino        .mhandler.cmd = do_acl_remove,
1225d7f9b689SLuiz Capitulino    },
1226d7f9b689SLuiz Capitulino
122715dfcd45SJan KiszkaSTEXI
122815dfcd45SJan Kiszka@item acl_remove @var{aclname} @var{match}
122970fcbbe7SStefan Weil@findex acl_remove
123015dfcd45SJan KiszkaRemove the specified match rule from the access control list.
123115dfcd45SJan KiszkaETEXI
123215dfcd45SJan Kiszka
1233d7f9b689SLuiz Capitulino    {
1234d7f9b689SLuiz Capitulino        .name       = "acl_reset",
1235d7f9b689SLuiz Capitulino        .args_type  = "aclname:s",
1236d7f9b689SLuiz Capitulino        .params     = "aclname",
1237d7f9b689SLuiz Capitulino        .help       = "reset the access control list",
1238af4ce882SLuiz Capitulino        .mhandler.cmd = do_acl_reset,
1239d7f9b689SLuiz Capitulino    },
1240d7f9b689SLuiz Capitulino
124115dfcd45SJan KiszkaSTEXI
12420e4aec98SMarkus Armbruster@item acl_reset @var{aclname}
12430e4aec98SMarkus Armbruster@findex acl_reset
124415dfcd45SJan KiszkaRemove all matches from the access control list, and set the default
12452313086aSBlue Swirlpolicy back to @code{deny}.
12462313086aSBlue SwirlETEXI
12472313086aSBlue Swirl
124879c4f6b0SHuang Ying#if defined(TARGET_I386)
1249d7f9b689SLuiz Capitulino
1250d7f9b689SLuiz Capitulino    {
1251d7f9b689SLuiz Capitulino        .name       = "mce",
125231ce5e0cSJin Dongming        .args_type  = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
125331ce5e0cSJin Dongming        .params     = "[-b] cpu bank status mcgstatus addr misc",
125431ce5e0cSJin Dongming        .help       = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
1255af4ce882SLuiz Capitulino        .mhandler.cmd = do_inject_mce,
1256d7f9b689SLuiz Capitulino    },
1257d7f9b689SLuiz Capitulino
125879c4f6b0SHuang Ying#endif
125979c4f6b0SHuang YingSTEXI
126079c4f6b0SHuang Ying@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
126170fcbbe7SStefan Weil@findex mce (x86)
126279c4f6b0SHuang YingInject an MCE on the given CPU (x86 only).
126379c4f6b0SHuang YingETEXI
126479c4f6b0SHuang Ying
1265d7f9b689SLuiz Capitulino    {
1266d7f9b689SLuiz Capitulino        .name       = "getfd",
1267d7f9b689SLuiz Capitulino        .args_type  = "fdname:s",
1268d7f9b689SLuiz Capitulino        .params     = "getfd name",
1269d7f9b689SLuiz Capitulino        .help       = "receive a file descriptor via SCM rights and assign it a name",
1270208c9d1bSCorey Bryant        .mhandler.cmd = hmp_getfd,
1271d7f9b689SLuiz Capitulino    },
1272d7f9b689SLuiz Capitulino
1273f07918fdSMark McLoughlinSTEXI
1274f07918fdSMark McLoughlin@item getfd @var{fdname}
127570fcbbe7SStefan Weil@findex getfd
1276f07918fdSMark McLoughlinIf a file descriptor is passed alongside this command using the SCM_RIGHTS
1277f07918fdSMark McLoughlinmechanism on unix sockets, it is stored using the name @var{fdname} for
1278f07918fdSMark McLoughlinlater use by other monitor commands.
1279f07918fdSMark McLoughlinETEXI
1280f07918fdSMark McLoughlin
1281d7f9b689SLuiz Capitulino    {
1282d7f9b689SLuiz Capitulino        .name       = "closefd",
1283d7f9b689SLuiz Capitulino        .args_type  = "fdname:s",
1284d7f9b689SLuiz Capitulino        .params     = "closefd name",
1285d7f9b689SLuiz Capitulino        .help       = "close a file descriptor previously passed via SCM rights",
1286208c9d1bSCorey Bryant        .mhandler.cmd = hmp_closefd,
1287d7f9b689SLuiz Capitulino    },
1288d7f9b689SLuiz Capitulino
1289f07918fdSMark McLoughlinSTEXI
1290f07918fdSMark McLoughlin@item closefd @var{fdname}
129170fcbbe7SStefan Weil@findex closefd
1292f07918fdSMark McLoughlinClose the file descriptor previously assigned to @var{fdname} using the
1293f07918fdSMark McLoughlin@code{getfd} command. This is only needed if the file descriptor was never
1294f07918fdSMark McLoughlinused by another monitor command.
1295f07918fdSMark McLoughlinETEXI
1296f07918fdSMark McLoughlin
1297a3a55a2eSLuiz Capitulino    {
1298a3a55a2eSLuiz Capitulino        .name       = "block_passwd",
1299a3a55a2eSLuiz Capitulino        .args_type  = "device:B,password:s",
1300a3a55a2eSLuiz Capitulino        .params     = "block_passwd device password",
1301a3a55a2eSLuiz Capitulino        .help       = "set the password of encrypted block devices",
1302a4dea8a9SLuiz Capitulino        .mhandler.cmd = hmp_block_passwd,
1303a3a55a2eSLuiz Capitulino    },
1304a3a55a2eSLuiz Capitulino
1305a3a55a2eSLuiz CapitulinoSTEXI
1306727f005eSZhi 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}
1307727f005eSZhi Yong Wu@findex block_set_io_throttle
1308727f005eSZhi 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}
1309727f005eSZhi Yong WuETEXI
1310727f005eSZhi Yong Wu
1311727f005eSZhi Yong Wu    {
1312727f005eSZhi Yong Wu        .name       = "block_set_io_throttle",
1313727f005eSZhi Yong Wu        .args_type  = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
1314727f005eSZhi Yong Wu        .params     = "device bps bps_rd bps_wr iops iops_rd iops_wr",
1315727f005eSZhi Yong Wu        .help       = "change I/O throttle limits for a block drive",
131680047da5SLuiz Capitulino        .mhandler.cmd = hmp_block_set_io_throttle,
1317727f005eSZhi Yong Wu    },
1318727f005eSZhi Yong Wu
1319727f005eSZhi Yong WuSTEXI
1320a3a55a2eSLuiz Capitulino@item block_passwd @var{device} @var{password}
132170fcbbe7SStefan Weil@findex block_passwd
1322a3a55a2eSLuiz CapitulinoSet the encrypted device @var{device} password to @var{password}
1323a3a55a2eSLuiz CapitulinoETEXI
1324b40292e7SJan Kiszka
132533572eceSJan Kiszka    {
13267572150cSGerd Hoffmann        .name       = "set_password",
13277572150cSGerd Hoffmann        .args_type  = "protocol:s,password:s,connected:s?",
13287572150cSGerd Hoffmann        .params     = "protocol password action-if-connected",
13297572150cSGerd Hoffmann        .help       = "set spice/vnc password",
1330fbf796fdSLuiz Capitulino        .mhandler.cmd = hmp_set_password,
13317572150cSGerd Hoffmann    },
13327572150cSGerd Hoffmann
13337572150cSGerd HoffmannSTEXI
13347572150cSGerd Hoffmann@item set_password [ vnc | spice ] password [ action-if-connected ]
13357572150cSGerd Hoffmann@findex set_password
13367572150cSGerd Hoffmann
13377572150cSGerd HoffmannChange spice/vnc password.  Use zero to make the password stay valid
13387572150cSGerd Hoffmannforever.  @var{action-if-connected} specifies what should happen in
13397572150cSGerd Hoffmanncase a connection is established: @var{fail} makes the password change
13407572150cSGerd Hoffmannfail.  @var{disconnect} changes the password and disconnects the
13417572150cSGerd Hoffmannclient.  @var{keep} changes the password and keeps the connection up.
13427572150cSGerd Hoffmann@var{keep} is the default.
13437572150cSGerd HoffmannETEXI
13447572150cSGerd Hoffmann
13457572150cSGerd Hoffmann    {
13467572150cSGerd Hoffmann        .name       = "expire_password",
13477572150cSGerd Hoffmann        .args_type  = "protocol:s,time:s",
13487572150cSGerd Hoffmann        .params     = "protocol time",
13497572150cSGerd Hoffmann        .help       = "set spice/vnc password expire-time",
13509ad5372dSLuiz Capitulino        .mhandler.cmd = hmp_expire_password,
13517572150cSGerd Hoffmann    },
13527572150cSGerd Hoffmann
13537572150cSGerd HoffmannSTEXI
13547572150cSGerd Hoffmann@item expire_password [ vnc | spice ] expire-time
13557572150cSGerd Hoffmann@findex expire_password
13567572150cSGerd Hoffmann
13577572150cSGerd HoffmannSpecify when a password for spice/vnc becomes
13587572150cSGerd Hoffmanninvalid. @var{expire-time} accepts:
13597572150cSGerd Hoffmann
13607572150cSGerd Hoffmann@table @var
13617572150cSGerd Hoffmann@item now
13627572150cSGerd HoffmannInvalidate password instantly.
13637572150cSGerd Hoffmann
13647572150cSGerd Hoffmann@item never
13657572150cSGerd HoffmannPassword stays valid forever.
13667572150cSGerd Hoffmann
13677572150cSGerd Hoffmann@item +nsec
13687572150cSGerd HoffmannPassword stays valid for @var{nsec} seconds starting now.
13697572150cSGerd Hoffmann
13707572150cSGerd Hoffmann@item nsec
13717572150cSGerd HoffmannPassword is invalidated at the given time.  @var{nsec} are the seconds
13727572150cSGerd Hoffmannpassed since 1970, i.e. unix epoch.
13737572150cSGerd Hoffmann
13747572150cSGerd Hoffmann@end table
13757572150cSGerd HoffmannETEXI
13767572150cSGerd Hoffmann
13777572150cSGerd Hoffmann    {
137833572eceSJan Kiszka        .name       = "info",
137933572eceSJan Kiszka        .args_type  = "item:s?",
138033572eceSJan Kiszka        .params     = "[subcommand]",
138133572eceSJan Kiszka        .help       = "show various information about the system state",
13821162daa6SLuiz Capitulino        .mhandler.cmd = do_info,
138333572eceSJan Kiszka    },
138433572eceSJan Kiszka
138533572eceSJan KiszkaSTEXI
138633572eceSJan Kiszka@item info @var{subcommand}
138733572eceSJan Kiszka@findex info
138833572eceSJan KiszkaShow various information about the system state.
138933572eceSJan Kiszka
139033572eceSJan Kiszka@table @option
139133572eceSJan Kiszka@item info version
139233572eceSJan Kiszkashow the version of QEMU
139333572eceSJan Kiszka@item info network
139433572eceSJan Kiszkashow the various VLANs and the associated devices
139533572eceSJan Kiszka@item info chardev
139633572eceSJan Kiszkashow the character devices
139733572eceSJan Kiszka@item info block
139833572eceSJan Kiszkashow the block devices
139933572eceSJan Kiszka@item info blockstats
140033572eceSJan Kiszkashow block device statistics
140133572eceSJan Kiszka@item info registers
140233572eceSJan Kiszkashow the cpu registers
140333572eceSJan Kiszka@item info cpus
140433572eceSJan Kiszkashow infos for each CPU
140533572eceSJan Kiszka@item info history
140633572eceSJan Kiszkashow the command line history
140733572eceSJan Kiszka@item info irq
140833572eceSJan Kiszkashow the interrupts statistics (if available)
140933572eceSJan Kiszka@item info pic
141033572eceSJan Kiszkashow i8259 (PIC) state
141133572eceSJan Kiszka@item info pci
141233572eceSJan Kiszkashow emulated PCI device info
141333572eceSJan Kiszka@item info tlb
1414692f737cSMax Filippovshow virtual to physical memory mappings (i386, SH4, SPARC, PPC, and Xtensa only)
141533572eceSJan Kiszka@item info mem
141633572eceSJan Kiszkashow the active virtual memory mappings (i386 only)
141733572eceSJan Kiszka@item info jit
141833572eceSJan Kiszkashow dynamic compiler info
141933572eceSJan Kiszka@item info numa
142033572eceSJan Kiszkashow NUMA information
1421b40292e7SJan Kiszka@item info kvm
1422b40292e7SJan Kiszkashow KVM information
142333572eceSJan Kiszka@item info usb
142433572eceSJan Kiszkashow USB devices plugged on the virtual USB hub
142533572eceSJan Kiszka@item info usbhost
142633572eceSJan Kiszkashow all USB host devices
142733572eceSJan Kiszka@item info profile
142833572eceSJan Kiszkashow profiling information
142933572eceSJan Kiszka@item info capture
143033572eceSJan Kiszkashow information about active capturing
143133572eceSJan Kiszka@item info snapshots
143233572eceSJan Kiszkashow list of VM snapshots
143333572eceSJan Kiszka@item info status
143433572eceSJan Kiszkashow the current VM status (running|paused)
143533572eceSJan Kiszka@item info pcmcia
143633572eceSJan Kiszkashow guest PCMCIA status
143733572eceSJan Kiszka@item info mice
143833572eceSJan Kiszkashow which guest mouse is receiving events
143933572eceSJan Kiszka@item info vnc
144033572eceSJan Kiszkashow the vnc server status
144133572eceSJan Kiszka@item info name
144233572eceSJan Kiszkashow the current VM name
144333572eceSJan Kiszka@item info uuid
144433572eceSJan Kiszkashow the current VM UUID
144533572eceSJan Kiszka@item info cpustats
144633572eceSJan Kiszkashow CPU statistics
144733572eceSJan Kiszka@item info usernet
144833572eceSJan Kiszkashow user network stack connection states
144933572eceSJan Kiszka@item info migrate
145033572eceSJan Kiszkashow migration status
1451bbf6da32SOrit Wasserman@item info migrate_capabilities
1452bbf6da32SOrit Wassermanshow current migration capabilities
14539e1ba4ccSOrit Wasserman@item info migrate_cache_size
14549e1ba4ccSOrit Wassermanshow current migration XBZRLE cache size
145533572eceSJan Kiszka@item info balloon
145633572eceSJan Kiszkashow balloon information
145733572eceSJan Kiszka@item info qtree
145833572eceSJan Kiszkashow device tree
145933572eceSJan Kiszka@item info qdm
146033572eceSJan Kiszkashow qdev device model list
146133572eceSJan Kiszka@item info roms
146233572eceSJan Kiszkashow roms
146333572eceSJan Kiszka@end table
146433572eceSJan KiszkaETEXI
146533572eceSJan Kiszka
14666d8a764eSLluís#ifdef CONFIG_TRACE_SIMPLE
146722890ab5SPrerna SaxenaSTEXI
146822890ab5SPrerna Saxena@item info trace
146922890ab5SPrerna Saxenashow contents of trace buffer
147031965ae2SLluísETEXI
147131965ae2SLluís#endif
147231965ae2SLluís
147331965ae2SLluísSTEXI
147422890ab5SPrerna Saxena@item info trace-events
147522890ab5SPrerna Saxenashow available trace events and their state
147622890ab5SPrerna SaxenaETEXI
147722890ab5SPrerna Saxena
14782313086aSBlue SwirlSTEXI
14792313086aSBlue Swirl@end table
14802313086aSBlue SwirlETEXI
1481