xref: /openbmc/qemu/hmp-commands.hx (revision 705f48cc221fea128abdcc334606931e971229e4)
1HXCOMM Use DEFHEADING() to define headings in both help text and texi
2HXCOMM Text between STEXI and ETEXI are copied to texi version and
3HXCOMM discarded from C version
4HXCOMM DEF(command, args, callback, arg_string, help) is used to construct
5HXCOMM monitor commands
6HXCOMM HXCOMM can be used for comments, discarded from both texi and C
7
8STEXI
9@table @option
10ETEXI
11
12    {
13        .name       = "help|?",
14        .args_type  = "name:S?",
15        .params     = "[cmd]",
16        .help       = "show the help",
17        .cmd        = do_help_cmd,
18        .flags      = "p",
19    },
20
21STEXI
22@item help or ? [@var{cmd}]
23@findex help
24Show the help for all commands or just for command @var{cmd}.
25ETEXI
26SRST
27``help`` or ``?`` [*cmd*]
28  Show the help for all commands or just for command *cmd*.
29ERST
30
31    {
32        .name       = "commit",
33        .args_type  = "device:B",
34        .params     = "device|all",
35        .help       = "commit changes to the disk images (if -snapshot is used) or backing files",
36        .cmd        = hmp_commit,
37    },
38
39STEXI
40@item commit
41@findex commit
42Commit changes to the disk images (if -snapshot is used) or backing files.
43If the backing file is smaller than the snapshot, then the backing file will be
44resized to be the same size as the snapshot.  If the snapshot is smaller than
45the backing file, the backing file will not be truncated.  If you want the
46backing file to match the size of the smaller snapshot, you can safely truncate
47it yourself once the commit operation successfully completes.
48ETEXI
49SRST
50``commit``
51  Commit changes to the disk images (if -snapshot is used) or backing files.
52  If the backing file is smaller than the snapshot, then the backing file
53  will be resized to be the same size as the snapshot.  If the snapshot is
54  smaller than the backing file, the backing file will not be truncated.
55  If you want the backing file to match the size of the smaller snapshot,
56  you can safely truncate it yourself once the commit operation successfully
57  completes.
58ERST
59
60    {
61        .name       = "q|quit",
62        .args_type  = "",
63        .params     = "",
64        .help       = "quit the emulator",
65        .cmd        = hmp_quit,
66    },
67
68STEXI
69@item q or quit
70@findex quit
71Quit the emulator.
72ETEXI
73SRST
74``q`` or ``quit``
75  Quit the emulator.
76ERST
77
78    {
79        .name       = "exit_preconfig",
80        .args_type  = "",
81        .params     = "",
82        .help       = "exit the preconfig state",
83        .cmd        = hmp_exit_preconfig,
84        .flags      = "p",
85    },
86
87STEXI
88@item exit_preconfig
89@findex exit_preconfig
90This command makes QEMU exit the preconfig state and proceed with
91VM initialization using configuration data provided on the command line
92and via the QMP monitor during the preconfig state. The command is only
93available during the preconfig state (i.e. when the --preconfig command
94line option was in use).
95ETEXI
96SRST
97``exit_preconfig``
98  This command makes QEMU exit the preconfig state and proceed with
99  VM initialization using configuration data provided on the command line
100  and via the QMP monitor during the preconfig state. The command is only
101  available during the preconfig state (i.e. when the --preconfig command
102  line option was in use).
103ERST
104
105    {
106        .name       = "block_resize",
107        .args_type  = "device:B,size:o",
108        .params     = "device size",
109        .help       = "resize a block image",
110        .cmd        = hmp_block_resize,
111    },
112
113STEXI
114@item block_resize
115@findex block_resize
116Resize a block image while a guest is running.  Usually requires guest
117action to see the updated size.  Resize to a lower size is supported,
118but should be used with extreme caution.  Note that this command only
119resizes image files, it can not resize block devices like LVM volumes.
120ETEXI
121SRST
122``block_resize``
123  Resize a block image while a guest is running.  Usually requires guest
124  action to see the updated size.  Resize to a lower size is supported,
125  but should be used with extreme caution.  Note that this command only
126  resizes image files, it can not resize block devices like LVM volumes.
127ERST
128
129    {
130        .name       = "block_stream",
131        .args_type  = "device:B,speed:o?,base:s?",
132        .params     = "device [speed [base]]",
133        .help       = "copy data from a backing file into a block device",
134        .cmd        = hmp_block_stream,
135    },
136
137STEXI
138@item block_stream
139@findex block_stream
140Copy data from a backing file into a block device.
141ETEXI
142SRST
143``block_stream``
144  Copy data from a backing file into a block device.
145ERST
146
147    {
148        .name       = "block_job_set_speed",
149        .args_type  = "device:B,speed:o",
150        .params     = "device speed",
151        .help       = "set maximum speed for a background block operation",
152        .cmd        = hmp_block_job_set_speed,
153    },
154
155STEXI
156@item block_job_set_speed
157@findex block_job_set_speed
158Set maximum speed for a background block operation.
159ETEXI
160SRST
161``block_job_set_speed``
162  Set maximum speed for a background block operation.
163ERST
164
165    {
166        .name       = "block_job_cancel",
167        .args_type  = "force:-f,device:B",
168        .params     = "[-f] device",
169        .help       = "stop an active background block operation (use -f"
170                      "\n\t\t\t if you want to abort the operation immediately"
171                      "\n\t\t\t instead of keep running until data is in sync)",
172        .cmd        = hmp_block_job_cancel,
173    },
174
175STEXI
176@item block_job_cancel
177@findex block_job_cancel
178Stop an active background block operation (streaming, mirroring).
179ETEXI
180SRST
181``block_job_cancel``
182  Stop an active background block operation (streaming, mirroring).
183ERST
184
185    {
186        .name       = "block_job_complete",
187        .args_type  = "device:B",
188        .params     = "device",
189        .help       = "stop an active background block operation",
190        .cmd        = hmp_block_job_complete,
191    },
192
193STEXI
194@item block_job_complete
195@findex block_job_complete
196Manually trigger completion of an active background block operation.
197For mirroring, this will switch the device to the destination path.
198ETEXI
199SRST
200``block_job_complete``
201  Manually trigger completion of an active background block operation.
202  For mirroring, this will switch the device to the destination path.
203ERST
204
205    {
206        .name       = "block_job_pause",
207        .args_type  = "device:B",
208        .params     = "device",
209        .help       = "pause an active background block operation",
210        .cmd        = hmp_block_job_pause,
211    },
212
213STEXI
214@item block_job_pause
215@findex block_job_pause
216Pause an active block streaming operation.
217ETEXI
218SRST
219``block_job_pause``
220  Pause an active block streaming operation.
221ERST
222
223    {
224        .name       = "block_job_resume",
225        .args_type  = "device:B",
226        .params     = "device",
227        .help       = "resume a paused background block operation",
228        .cmd        = hmp_block_job_resume,
229    },
230
231STEXI
232@item block_job_resume
233@findex block_job_resume
234Resume a paused block streaming operation.
235ETEXI
236SRST
237``block_job_resume``
238  Resume a paused block streaming operation.
239ERST
240
241    {
242        .name       = "eject",
243        .args_type  = "force:-f,device:B",
244        .params     = "[-f] device",
245        .help       = "eject a removable medium (use -f to force it)",
246        .cmd        = hmp_eject,
247    },
248
249STEXI
250@item eject [-f] @var{device}
251@findex eject
252Eject a removable medium (use -f to force it).
253ETEXI
254SRST
255``eject [-f]`` *device*
256  Eject a removable medium (use -f to force it).
257ERST
258
259    {
260        .name       = "drive_del",
261        .args_type  = "id:B",
262        .params     = "device",
263        .help       = "remove host block device",
264        .cmd        = hmp_drive_del,
265    },
266
267STEXI
268@item drive_del @var{device}
269@findex drive_del
270Remove host block device.  The result is that guest generated IO is no longer
271submitted against the host device underlying the disk.  Once a drive has
272been deleted, the QEMU Block layer returns -EIO which results in IO
273errors in the guest for applications that are reading/writing to the device.
274These errors are always reported to the guest, regardless of the drive's error
275actions (drive options rerror, werror).
276ETEXI
277SRST
278``drive_del`` *device*
279  Remove host block device.  The result is that guest generated IO is no longer
280  submitted against the host device underlying the disk.  Once a drive has
281  been deleted, the QEMU Block layer returns -EIO which results in IO
282  errors in the guest for applications that are reading/writing to the device.
283  These errors are always reported to the guest, regardless of the drive's error
284  actions (drive options rerror, werror).
285ERST
286
287    {
288        .name       = "change",
289        .args_type  = "device:B,target:F,arg:s?,read-only-mode:s?",
290        .params     = "device filename [format [read-only-mode]]",
291        .help       = "change a removable medium, optional format",
292        .cmd        = hmp_change,
293    },
294
295STEXI
296@item change @var{device} @var{setting}
297@findex change
298Change the configuration of a device.
299
300@table @option
301@item change @var{diskdevice} @var{filename} [@var{format} [@var{read-only-mode}]]
302Change the medium for a removable disk device to point to @var{filename}. eg
303
304@example
305(qemu) change ide1-cd0 /path/to/some.iso
306@end example
307
308@var{format} is optional.
309
310@var{read-only-mode} may be used to change the read-only status of the device.
311It accepts the following values:
312
313@table @var
314@item retain
315Retains the current status; this is the default.
316
317@item read-only
318Makes the device read-only.
319
320@item read-write
321Makes the device writable.
322@end table
323
324@item change vnc @var{display},@var{options}
325Change the configuration of the VNC server. The valid syntax for @var{display}
326and @var{options} are described at @ref{sec_invocation}. eg
327
328@example
329(qemu) change vnc localhost:1
330@end example
331
332@item change vnc password [@var{password}]
333
334Change the password associated with the VNC server. If the new password is not
335supplied, the monitor will prompt for it to be entered. VNC passwords are only
336significant up to 8 letters. eg
337
338@example
339(qemu) change vnc password
340Password: ********
341@end example
342
343@end table
344ETEXI
345SRST
346``change`` *device* *setting*
347  Change the configuration of a device.
348
349  ``change`` *diskdevice* *filename* [*format* [*read-only-mode*]]
350    Change the medium for a removable disk device to point to *filename*. eg::
351
352      (qemu) change ide1-cd0 /path/to/some.iso
353
354    *format* is optional.
355
356    *read-only-mode* may be used to change the read-only status of the device.
357    It accepts the following values:
358
359    retain
360      Retains the current status; this is the default.
361
362    read-only
363      Makes the device read-only.
364
365    read-write
366      Makes the device writable.
367
368  ``change vnc`` *display*,\ *options*
369    Change the configuration of the VNC server. The valid syntax for *display*
370    and *options* are described at :ref:`sec_005finvocation`. eg::
371
372      (qemu) change vnc localhost:1
373
374  ``change vnc password`` [*password*]
375
376    Change the password associated with the VNC server. If the new password
377    is not supplied, the monitor will prompt for it to be entered. VNC
378    passwords are only significant up to 8 letters. eg::
379
380      (qemu) change vnc password
381      Password: ********
382
383ERST
384
385    {
386        .name       = "screendump",
387        .args_type  = "filename:F,device:s?,head:i?",
388        .params     = "filename [device [head]]",
389        .help       = "save screen from head 'head' of display device 'device' "
390                      "into PPM image 'filename'",
391        .cmd        = hmp_screendump,
392    },
393
394STEXI
395@item screendump @var{filename}
396@findex screendump
397Save screen into PPM image @var{filename}.
398ETEXI
399SRST
400``screendump`` *filename*
401  Save screen into PPM image *filename*.
402ERST
403
404    {
405        .name       = "logfile",
406        .args_type  = "filename:F",
407        .params     = "filename",
408        .help       = "output logs to 'filename'",
409        .cmd        = hmp_logfile,
410    },
411
412STEXI
413@item logfile @var{filename}
414@findex logfile
415Output logs to @var{filename}.
416ETEXI
417SRST
418``logfile`` *filename*
419  Output logs to *filename*.
420ERST
421
422    {
423        .name       = "trace-event",
424        .args_type  = "name:s,option:b,vcpu:i?",
425        .params     = "name on|off [vcpu]",
426        .help       = "changes status of a specific trace event "
427                      "(vcpu: vCPU to set, default is all)",
428        .cmd = hmp_trace_event,
429        .command_completion = trace_event_completion,
430    },
431
432STEXI
433@item trace-event
434@findex trace-event
435changes status of a trace event
436ETEXI
437SRST
438``trace-event``
439  changes status of a trace event
440ERST
441
442#if defined(CONFIG_TRACE_SIMPLE)
443    {
444        .name       = "trace-file",
445        .args_type  = "op:s?,arg:F?",
446        .params     = "on|off|flush|set [arg]",
447        .help       = "open, close, or flush trace file, or set a new file name",
448        .cmd        = hmp_trace_file,
449    },
450
451STEXI
452@item trace-file on|off|flush
453@findex trace-file
454Open, close, or flush the trace file.  If no argument is given, the status of the trace file is displayed.
455ETEXI
456SRST
457``trace-file on|off|flush``
458  Open, close, or flush the trace file.  If no argument is given, the
459  status of the trace file is displayed.
460ERST
461#endif
462
463    {
464        .name       = "log",
465        .args_type  = "items:s",
466        .params     = "item1[,...]",
467        .help       = "activate logging of the specified items",
468        .cmd        = hmp_log,
469    },
470
471STEXI
472@item log @var{item1}[,...]
473@findex log
474Activate logging of the specified items.
475ETEXI
476SRST
477``log`` *item1*\ [,...]
478  Activate logging of the specified items.
479ERST
480
481    {
482        .name       = "savevm",
483        .args_type  = "name:s?",
484        .params     = "tag",
485        .help       = "save a VM snapshot. If no tag is provided, a new snapshot is created",
486        .cmd        = hmp_savevm,
487    },
488
489STEXI
490@item savevm @var{tag}
491@findex savevm
492Create a snapshot of the whole virtual machine. If @var{tag} is
493provided, it is used as human readable identifier. If there is already
494a snapshot with the same tag, it is replaced. More info at
495@ref{vm_snapshots}.
496
497Since 4.0, savevm stopped allowing the snapshot id to be set, accepting
498only @var{tag} as parameter.
499ETEXI
500SRST
501``savevm`` *tag*
502  Create a snapshot of the whole virtual machine. If *tag* is
503  provided, it is used as human readable identifier. If there is already
504  a snapshot with the same tag, it is replaced. More info at
505  :ref:`vm_005fsnapshots`.
506
507  Since 4.0, savevm stopped allowing the snapshot id to be set, accepting
508  only *tag* as parameter.
509ERST
510
511    {
512        .name       = "loadvm",
513        .args_type  = "name:s",
514        .params     = "tag",
515        .help       = "restore a VM snapshot from its tag",
516        .cmd        = hmp_loadvm,
517        .command_completion = loadvm_completion,
518    },
519
520STEXI
521@item loadvm @var{tag}
522@findex loadvm
523Set the whole virtual machine to the snapshot identified by the tag
524@var{tag}.
525
526Since 4.0, loadvm stopped accepting snapshot id as parameter.
527ETEXI
528SRST
529``loadvm`` *tag*
530  Set the whole virtual machine to the snapshot identified by the tag
531  *tag*.
532
533  Since 4.0, loadvm stopped accepting snapshot id as parameter.
534ERST
535
536    {
537        .name       = "delvm",
538        .args_type  = "name:s",
539        .params     = "tag",
540        .help       = "delete a VM snapshot from its tag",
541        .cmd        = hmp_delvm,
542        .command_completion = delvm_completion,
543    },
544
545STEXI
546@item delvm @var{tag}
547@findex delvm
548Delete the snapshot identified by @var{tag}.
549
550Since 4.0, delvm stopped deleting snapshots by snapshot id, accepting
551only @var{tag} as parameter.
552ETEXI
553SRST
554``delvm`` *tag*
555  Delete the snapshot identified by *tag*.
556
557  Since 4.0, delvm stopped deleting snapshots by snapshot id, accepting
558  only *tag* as parameter.
559ERST
560
561    {
562        .name       = "singlestep",
563        .args_type  = "option:s?",
564        .params     = "[on|off]",
565        .help       = "run emulation in singlestep mode or switch to normal mode",
566        .cmd        = hmp_singlestep,
567    },
568
569STEXI
570@item singlestep [off]
571@findex singlestep
572Run the emulation in single step mode.
573If called with option off, the emulation returns to normal mode.
574ETEXI
575SRST
576``singlestep [off]``
577  Run the emulation in single step mode.
578  If called with option off, the emulation returns to normal mode.
579ERST
580
581    {
582        .name       = "stop",
583        .args_type  = "",
584        .params     = "",
585        .help       = "stop emulation",
586        .cmd        = hmp_stop,
587    },
588
589STEXI
590@item stop
591@findex stop
592Stop emulation.
593ETEXI
594SRST
595``stop``
596  Stop emulation.
597ERST
598
599    {
600        .name       = "c|cont",
601        .args_type  = "",
602        .params     = "",
603        .help       = "resume emulation",
604        .cmd        = hmp_cont,
605    },
606
607STEXI
608@item c or cont
609@findex cont
610Resume emulation.
611ETEXI
612SRST
613``c`` or ``cont``
614  Resume emulation.
615ERST
616
617    {
618        .name       = "system_wakeup",
619        .args_type  = "",
620        .params     = "",
621        .help       = "wakeup guest from suspend",
622        .cmd        = hmp_system_wakeup,
623    },
624
625STEXI
626@item system_wakeup
627@findex system_wakeup
628Wakeup guest from suspend.
629ETEXI
630SRST
631``system_wakeup``
632  Wakeup guest from suspend.
633ERST
634
635    {
636        .name       = "gdbserver",
637        .args_type  = "device:s?",
638        .params     = "[device]",
639        .help       = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
640        .cmd        = hmp_gdbserver,
641    },
642
643STEXI
644@item gdbserver [@var{port}]
645@findex gdbserver
646Start gdbserver session (default @var{port}=1234)
647ETEXI
648SRST
649``gdbserver`` [*port*]
650  Start gdbserver session (default *port*\=1234)
651ERST
652
653    {
654        .name       = "x",
655        .args_type  = "fmt:/,addr:l",
656        .params     = "/fmt addr",
657        .help       = "virtual memory dump starting at 'addr'",
658        .cmd        = hmp_memory_dump,
659    },
660
661STEXI
662@item x/fmt @var{addr}
663@findex x
664Virtual memory dump starting at @var{addr}.
665ETEXI
666SRST
667``x/``\ *fmt* *addr*
668  Virtual memory dump starting at *addr*.
669ERST
670
671    {
672        .name       = "xp",
673        .args_type  = "fmt:/,addr:l",
674        .params     = "/fmt addr",
675        .help       = "physical memory dump starting at 'addr'",
676        .cmd        = hmp_physical_memory_dump,
677    },
678
679STEXI
680@item xp /@var{fmt} @var{addr}
681@findex xp
682Physical memory dump starting at @var{addr}.
683
684@var{fmt} is a format which tells the command how to format the
685data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
686
687@table @var
688@item count
689is the number of items to be dumped.
690
691@item format
692can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
693c (char) or i (asm instruction).
694
695@item size
696can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
697@code{h} or @code{w} can be specified with the @code{i} format to
698respectively select 16 or 32 bit code instruction size.
699
700@end table
701
702Examples:
703@itemize
704@item
705Dump 10 instructions at the current instruction pointer:
706@example
707(qemu) x/10i $eip
7080x90107063:  ret
7090x90107064:  sti
7100x90107065:  lea    0x0(%esi,1),%esi
7110x90107069:  lea    0x0(%edi,1),%edi
7120x90107070:  ret
7130x90107071:  jmp    0x90107080
7140x90107073:  nop
7150x90107074:  nop
7160x90107075:  nop
7170x90107076:  nop
718@end example
719
720@item
721Dump 80 16 bit values at the start of the video memory.
722@smallexample
723(qemu) xp/80hx 0xb8000
7240x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
7250x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
7260x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
7270x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
7280x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
7290x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
7300x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
7310x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
7320x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
7330x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
734@end smallexample
735@end itemize
736ETEXI
737SRST
738``xp /``\ *fmt* *addr*
739  Physical memory dump starting at *addr*.
740
741  *fmt* is a format which tells the command how to format the
742  data. Its syntax is: ``/{count}{format}{size}``
743
744  *count*
745    is the number of items to be dumped.
746  *format*
747    can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
748    c (char) or i (asm instruction).
749  *size*
750    can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
751    ``h`` or ``w`` can be specified with the ``i`` format to
752    respectively select 16 or 32 bit code instruction size.
753
754  Examples:
755
756  Dump 10 instructions at the current instruction pointer::
757
758    (qemu) x/10i $eip
759    0x90107063:  ret
760    0x90107064:  sti
761    0x90107065:  lea    0x0(%esi,1),%esi
762    0x90107069:  lea    0x0(%edi,1),%edi
763    0x90107070:  ret
764    0x90107071:  jmp    0x90107080
765    0x90107073:  nop
766    0x90107074:  nop
767    0x90107075:  nop
768    0x90107076:  nop
769
770  Dump 80 16 bit values at the start of the video memory::
771
772    (qemu) xp/80hx 0xb8000
773    0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
774    0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
775    0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
776    0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
777    0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
778    0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
779    0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
780    0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
781    0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
782    0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
783
784ERST
785
786    {
787        .name       = "gpa2hva",
788        .args_type  = "addr:l",
789        .params     = "addr",
790        .help       = "print the host virtual address corresponding to a guest physical address",
791        .cmd        = hmp_gpa2hva,
792    },
793
794STEXI
795@item gpa2hva @var{addr}
796@findex gpa2hva
797Print the host virtual address at which the guest's physical address @var{addr}
798is mapped.
799ETEXI
800SRST
801``gpa2hva`` *addr*
802  Print the host virtual address at which the guest's physical address *addr*
803  is mapped.
804ERST
805
806#ifdef CONFIG_LINUX
807    {
808        .name       = "gpa2hpa",
809        .args_type  = "addr:l",
810        .params     = "addr",
811        .help       = "print the host physical address corresponding to a guest physical address",
812        .cmd        = hmp_gpa2hpa,
813    },
814#endif
815
816STEXI
817@item gpa2hpa @var{addr}
818@findex gpa2hpa
819Print the host physical address at which the guest's physical address @var{addr}
820is mapped.
821ETEXI
822SRST
823``gpa2hpa`` *addr*
824  Print the host physical address at which the guest's physical address *addr*
825  is mapped.
826ERST
827
828    {
829        .name       = "gva2gpa",
830        .args_type  = "addr:l",
831        .params     = "addr",
832        .help       = "print the guest physical address corresponding to a guest virtual address",
833        .cmd        = hmp_gva2gpa,
834    },
835
836STEXI
837@item gva2gpa @var{addr}
838@findex gva2gpa
839Print the guest physical address at which the guest's virtual address @var{addr}
840is mapped based on the mapping for the current CPU.
841ETEXI
842SRST
843``gva2gpa`` *addr*
844  Print the guest physical address at which the guest's virtual address *addr*
845  is mapped based on the mapping for the current CPU.
846ERST
847
848    {
849        .name       = "p|print",
850        .args_type  = "fmt:/,val:l",
851        .params     = "/fmt expr",
852        .help       = "print expression value (use $reg for CPU register access)",
853        .cmd        = do_print,
854    },
855
856STEXI
857@item p or print/@var{fmt} @var{expr}
858@findex print
859Print expression value. Only the @var{format} part of @var{fmt} is
860used.
861ETEXI
862SRST
863``p`` or ``print/``\ *fmt* *expr*
864  Print expression value. Only the *format* part of *fmt* is
865  used.
866ERST
867
868    {
869        .name       = "i",
870        .args_type  = "fmt:/,addr:i,index:i.",
871        .params     = "/fmt addr",
872        .help       = "I/O port read",
873        .cmd        = hmp_ioport_read,
874    },
875
876STEXI
877@item i/@var{fmt} @var{addr} [.@var{index}]
878@findex i
879Read I/O port.
880ETEXI
881SRST
882``i/``\ *fmt* *addr* [.\ *index*\ ]
883  Read I/O port.
884ERST
885
886    {
887        .name       = "o",
888        .args_type  = "fmt:/,addr:i,val:i",
889        .params     = "/fmt addr value",
890        .help       = "I/O port write",
891        .cmd        = hmp_ioport_write,
892    },
893
894STEXI
895@item o/@var{fmt} @var{addr} @var{val}
896@findex o
897Write to I/O port.
898ETEXI
899SRST
900``o/``\ *fmt* *addr* *val*
901  Write to I/O port.
902ERST
903
904    {
905        .name       = "sendkey",
906        .args_type  = "keys:s,hold-time:i?",
907        .params     = "keys [hold_ms]",
908        .help       = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
909        .cmd        = hmp_sendkey,
910        .command_completion = sendkey_completion,
911    },
912
913STEXI
914@item sendkey @var{keys}
915@findex sendkey
916Send @var{keys} to the guest. @var{keys} could be the name of the
917key or the raw value in hexadecimal format. Use @code{-} to press
918several keys simultaneously. Example:
919@example
920sendkey ctrl-alt-f1
921@end example
922
923This command is useful to send keys that your graphical user interface
924intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
925ETEXI
926SRST
927``sendkey`` *keys*
928  Send *keys* to the guest. *keys* could be the name of the
929  key or the raw value in hexadecimal format. Use ``-`` to press
930  several keys simultaneously. Example::
931
932    sendkey ctrl-alt-f1
933
934  This command is useful to send keys that your graphical user interface
935  intercepts at low level, such as ``ctrl-alt-f1`` in X Window.
936ERST
937    {
938        .name       = "sync-profile",
939        .args_type  = "op:s?",
940        .params     = "[on|off|reset]",
941        .help       = "enable, disable or reset synchronization profiling. "
942                      "With no arguments, prints whether profiling is on or off.",
943        .cmd        = hmp_sync_profile,
944    },
945
946STEXI
947@item sync-profile [on|off|reset]
948@findex sync-profile
949Enable, disable or reset synchronization profiling. With no arguments, prints
950whether profiling is on or off.
951ETEXI
952SRST
953``sync-profile [on|off|reset]``
954  Enable, disable or reset synchronization profiling. With no arguments, prints
955  whether profiling is on or off.
956ERST
957
958    {
959        .name       = "system_reset",
960        .args_type  = "",
961        .params     = "",
962        .help       = "reset the system",
963        .cmd        = hmp_system_reset,
964    },
965
966STEXI
967@item system_reset
968@findex system_reset
969Reset the system.
970ETEXI
971SRST
972``system_reset``
973  Reset the system.
974ERST
975
976    {
977        .name       = "system_powerdown",
978        .args_type  = "",
979        .params     = "",
980        .help       = "send system power down event",
981        .cmd        = hmp_system_powerdown,
982    },
983
984STEXI
985@item system_powerdown
986@findex system_powerdown
987Power down the system (if supported).
988ETEXI
989SRST
990``system_powerdown``
991  Power down the system (if supported).
992ERST
993
994    {
995        .name       = "sum",
996        .args_type  = "start:i,size:i",
997        .params     = "addr size",
998        .help       = "compute the checksum of a memory region",
999        .cmd        = hmp_sum,
1000    },
1001
1002STEXI
1003@item sum @var{addr} @var{size}
1004@findex sum
1005Compute the checksum of a memory region.
1006ETEXI
1007SRST
1008``sum`` *addr* *size*
1009  Compute the checksum of a memory region.
1010ERST
1011
1012    {
1013        .name       = "device_add",
1014        .args_type  = "device:O",
1015        .params     = "driver[,prop=value][,...]",
1016        .help       = "add device, like -device on the command line",
1017        .cmd        = hmp_device_add,
1018        .command_completion = device_add_completion,
1019    },
1020
1021STEXI
1022@item device_add @var{config}
1023@findex device_add
1024Add device.
1025ETEXI
1026SRST
1027``device_add`` *config*
1028  Add device.
1029ERST
1030
1031    {
1032        .name       = "device_del",
1033        .args_type  = "id:s",
1034        .params     = "device",
1035        .help       = "remove device",
1036        .cmd        = hmp_device_del,
1037        .command_completion = device_del_completion,
1038    },
1039
1040STEXI
1041@item device_del @var{id}
1042@findex device_del
1043Remove device @var{id}. @var{id} may be a short ID
1044or a QOM object path.
1045ETEXI
1046SRST
1047``device_del`` *id*
1048  Remove device *id*. *id* may be a short ID
1049  or a QOM object path.
1050ERST
1051
1052    {
1053        .name       = "cpu",
1054        .args_type  = "index:i",
1055        .params     = "index",
1056        .help       = "set the default CPU",
1057        .cmd        = hmp_cpu,
1058    },
1059
1060STEXI
1061@item cpu @var{index}
1062@findex cpu
1063Set the default CPU.
1064ETEXI
1065SRST
1066``cpu`` *index*
1067  Set the default CPU.
1068ERST
1069
1070    {
1071        .name       = "mouse_move",
1072        .args_type  = "dx_str:s,dy_str:s,dz_str:s?",
1073        .params     = "dx dy [dz]",
1074        .help       = "send mouse move events",
1075        .cmd        = hmp_mouse_move,
1076    },
1077
1078STEXI
1079@item mouse_move @var{dx} @var{dy} [@var{dz}]
1080@findex mouse_move
1081Move the active mouse to the specified coordinates @var{dx} @var{dy}
1082with optional scroll axis @var{dz}.
1083ETEXI
1084SRST
1085``mouse_move`` *dx* *dy* [*dz*]
1086  Move the active mouse to the specified coordinates *dx* *dy*
1087  with optional scroll axis *dz*.
1088ERST
1089
1090    {
1091        .name       = "mouse_button",
1092        .args_type  = "button_state:i",
1093        .params     = "state",
1094        .help       = "change mouse button state (1=L, 2=M, 4=R)",
1095        .cmd        = hmp_mouse_button,
1096    },
1097
1098STEXI
1099@item mouse_button @var{val}
1100@findex mouse_button
1101Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
1102ETEXI
1103SRST
1104``mouse_button`` *val*
1105  Change the active mouse button state *val* (1=L, 2=M, 4=R).
1106ERST
1107
1108    {
1109        .name       = "mouse_set",
1110        .args_type  = "index:i",
1111        .params     = "index",
1112        .help       = "set which mouse device receives events",
1113        .cmd        = hmp_mouse_set,
1114    },
1115
1116STEXI
1117@item mouse_set @var{index}
1118@findex mouse_set
1119Set which mouse device receives events at given @var{index}, index
1120can be obtained with
1121@example
1122info mice
1123@end example
1124ETEXI
1125SRST
1126``mouse_set`` *index*
1127  Set which mouse device receives events at given *index*, index
1128  can be obtained with::
1129
1130    info mice
1131
1132ERST
1133
1134    {
1135        .name       = "wavcapture",
1136        .args_type  = "path:F,audiodev:s,freq:i?,bits:i?,nchannels:i?",
1137        .params     = "path audiodev [frequency [bits [channels]]]",
1138        .help       = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
1139        .cmd        = hmp_wavcapture,
1140    },
1141STEXI
1142@item wavcapture @var{filename} @var{audiodev} [@var{frequency} [@var{bits} [@var{channels}]]]
1143@findex wavcapture
1144Capture audio into @var{filename} from @var{audiodev}, using sample rate
1145@var{frequency} bits per sample @var{bits} and number of channels
1146@var{channels}.
1147
1148Defaults:
1149@itemize @minus
1150@item Sample rate = 44100 Hz - CD quality
1151@item Bits = 16
1152@item Number of channels = 2 - Stereo
1153@end itemize
1154ETEXI
1155SRST
1156``wavcapture`` *filename* *audiodev* [*frequency* [*bits* [*channels*]]]
1157  Capture audio into *filename* from *audiodev*, using sample rate
1158  *frequency* bits per sample *bits* and number of channels
1159  *channels*.
1160
1161  Defaults:
1162
1163  - Sample rate = 44100 Hz - CD quality
1164  - Bits = 16
1165  - Number of channels = 2 - Stereo
1166ERST
1167
1168    {
1169        .name       = "stopcapture",
1170        .args_type  = "n:i",
1171        .params     = "capture index",
1172        .help       = "stop capture",
1173        .cmd        = hmp_stopcapture,
1174    },
1175STEXI
1176@item stopcapture @var{index}
1177@findex stopcapture
1178Stop capture with a given @var{index}, index can be obtained with
1179@example
1180info capture
1181@end example
1182ETEXI
1183SRST
1184``stopcapture`` *index*
1185  Stop capture with a given *index*, index can be obtained with::
1186
1187    info capture
1188
1189ERST
1190
1191    {
1192        .name       = "memsave",
1193        .args_type  = "val:l,size:i,filename:s",
1194        .params     = "addr size file",
1195        .help       = "save to disk virtual memory dump starting at 'addr' of size 'size'",
1196        .cmd        = hmp_memsave,
1197    },
1198
1199STEXI
1200@item memsave @var{addr} @var{size} @var{file}
1201@findex memsave
1202save to disk virtual memory dump starting at @var{addr} of size @var{size}.
1203ETEXI
1204SRST
1205``memsave`` *addr* *size* *file*
1206  save to disk virtual memory dump starting at *addr* of size *size*.
1207ERST
1208
1209    {
1210        .name       = "pmemsave",
1211        .args_type  = "val:l,size:i,filename:s",
1212        .params     = "addr size file",
1213        .help       = "save to disk physical memory dump starting at 'addr' of size 'size'",
1214        .cmd        = hmp_pmemsave,
1215    },
1216
1217STEXI
1218@item pmemsave @var{addr} @var{size} @var{file}
1219@findex pmemsave
1220save to disk physical memory dump starting at @var{addr} of size @var{size}.
1221ETEXI
1222SRST
1223``pmemsave`` *addr* *size* *file*
1224  save to disk physical memory dump starting at *addr* of size *size*.
1225ERST
1226
1227    {
1228        .name       = "boot_set",
1229        .args_type  = "bootdevice:s",
1230        .params     = "bootdevice",
1231        .help       = "define new values for the boot device list",
1232        .cmd        = hmp_boot_set,
1233    },
1234
1235STEXI
1236@item boot_set @var{bootdevicelist}
1237@findex boot_set
1238Define new values for the boot device list. Those values will override
1239the values specified on the command line through the @code{-boot} option.
1240
1241The values that can be specified here depend on the machine type, but are
1242the same that can be specified in the @code{-boot} command line option.
1243ETEXI
1244SRST
1245``boot_set`` *bootdevicelist*
1246  Define new values for the boot device list. Those values will override
1247  the values specified on the command line through the ``-boot`` option.
1248
1249  The values that can be specified here depend on the machine type, but are
1250  the same that can be specified in the ``-boot`` command line option.
1251ERST
1252
1253    {
1254        .name       = "nmi",
1255        .args_type  = "",
1256        .params     = "",
1257        .help       = "inject an NMI",
1258        .cmd        = hmp_nmi,
1259    },
1260STEXI
1261@item nmi @var{cpu}
1262@findex nmi
1263Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
1264
1265ETEXI
1266SRST
1267``nmi`` *cpu*
1268  Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
1269ERST
1270
1271    {
1272        .name       = "ringbuf_write",
1273        .args_type  = "device:s,data:s",
1274        .params     = "device data",
1275        .help       = "Write to a ring buffer character device",
1276        .cmd        = hmp_ringbuf_write,
1277        .command_completion = ringbuf_write_completion,
1278    },
1279
1280STEXI
1281@item ringbuf_write @var{device} @var{data}
1282@findex ringbuf_write
1283Write @var{data} to ring buffer character device @var{device}.
1284@var{data} must be a UTF-8 string.
1285
1286ETEXI
1287SRST
1288``ringbuf_write`` *device* *data*
1289  Write *data* to ring buffer character device *device*.
1290  *data* must be a UTF-8 string.
1291ERST
1292
1293    {
1294        .name       = "ringbuf_read",
1295        .args_type  = "device:s,size:i",
1296        .params     = "device size",
1297        .help       = "Read from a ring buffer character device",
1298        .cmd        = hmp_ringbuf_read,
1299        .command_completion = ringbuf_write_completion,
1300    },
1301
1302STEXI
1303@item ringbuf_read @var{device}
1304@findex ringbuf_read
1305Read and print up to @var{size} bytes from ring buffer character
1306device @var{device}.
1307Certain non-printable characters are printed \uXXXX, where XXXX is the
1308character code in hexadecimal.  Character \ is printed \\.
1309Bug: can screw up when the buffer contains invalid UTF-8 sequences,
1310NUL characters, after the ring buffer lost data, and when reading
1311stops because the size limit is reached.
1312
1313ETEXI
1314SRST
1315``ringbuf_read`` *device*
1316  Read and print up to *size* bytes from ring buffer character
1317  device *device*.
1318  Certain non-printable characters are printed ``\uXXXX``, where ``XXXX`` is the
1319  character code in hexadecimal.  Character ``\`` is printed ``\\``.
1320  Bug: can screw up when the buffer contains invalid UTF-8 sequences,
1321  NUL characters, after the ring buffer lost data, and when reading
1322  stops because the size limit is reached.
1323ERST
1324
1325    {
1326        .name       = "announce_self",
1327        .args_type  = "interfaces:s?,id:s?",
1328        .params     = "[interfaces] [id]",
1329        .help       = "Trigger GARP/RARP announcements",
1330        .cmd        = hmp_announce_self,
1331    },
1332
1333STEXI
1334@item announce_self
1335@findex announce_self
1336Trigger a round of GARP/RARP broadcasts; this is useful for explicitly updating the
1337network infrastructure after a reconfiguration or some forms of migration.
1338The timings of the round are set by the migration announce parameters.
1339An optional comma separated @var{interfaces} list restricts the announce to the
1340named set of interfaces. An optional @var{id} can be used to start a separate announce
1341timer and to change the parameters of it later.
1342ETEXI
1343SRST
1344``announce_self``
1345  Trigger a round of GARP/RARP broadcasts; this is useful for explicitly
1346  updating the network infrastructure after a reconfiguration or some forms
1347  of migration. The timings of the round are set by the migration announce
1348  parameters. An optional comma separated *interfaces* list restricts the
1349  announce to the named set of interfaces. An optional *id* can be used to
1350  start a separate announce timer and to change the parameters of it later.
1351ERST
1352
1353    {
1354        .name       = "migrate",
1355        .args_type  = "detach:-d,blk:-b,inc:-i,resume:-r,uri:s",
1356        .params     = "[-d] [-b] [-i] [-r] uri",
1357        .help       = "migrate to URI (using -d to not wait for completion)"
1358		      "\n\t\t\t -b for migration without shared storage with"
1359		      " full copy of disk\n\t\t\t -i for migration without "
1360		      "shared storage with incremental copy of disk "
1361		      "(base image shared between src and destination)"
1362                      "\n\t\t\t -r to resume a paused migration",
1363        .cmd        = hmp_migrate,
1364    },
1365
1366
1367STEXI
1368@item migrate [-d] [-b] [-i] @var{uri}
1369@findex migrate
1370Migrate to @var{uri} (using -d to not wait for completion).
1371	-b for migration with full copy of disk
1372	-i for migration with incremental copy of disk (base image is shared)
1373ETEXI
1374SRST
1375``migrate [-d] [-b] [-i]`` *uri*
1376  Migrate to *uri* (using -d to not wait for completion).
1377
1378  ``-b``
1379    for migration with full copy of disk
1380  ``-i``
1381    for migration with incremental copy of disk (base image is shared)
1382ERST
1383
1384    {
1385        .name       = "migrate_cancel",
1386        .args_type  = "",
1387        .params     = "",
1388        .help       = "cancel the current VM migration",
1389        .cmd        = hmp_migrate_cancel,
1390    },
1391
1392STEXI
1393@item migrate_cancel
1394@findex migrate_cancel
1395Cancel the current VM migration.
1396ETEXI
1397SRST
1398``migrate_cancel``
1399  Cancel the current VM migration.
1400ERST
1401
1402    {
1403        .name       = "migrate_continue",
1404        .args_type  = "state:s",
1405        .params     = "state",
1406        .help       = "Continue migration from the given paused state",
1407        .cmd        = hmp_migrate_continue,
1408    },
1409STEXI
1410@item migrate_continue @var{state}
1411@findex migrate_continue
1412Continue migration from the paused state @var{state}
1413ETEXI
1414SRST
1415``migrate_continue`` *state*
1416  Continue migration from the paused state *state*
1417ERST
1418
1419    {
1420        .name       = "migrate_incoming",
1421        .args_type  = "uri:s",
1422        .params     = "uri",
1423        .help       = "Continue an incoming migration from an -incoming defer",
1424        .cmd        = hmp_migrate_incoming,
1425    },
1426
1427STEXI
1428@item migrate_incoming @var{uri}
1429@findex migrate_incoming
1430Continue an incoming migration using the @var{uri} (that has the same syntax
1431as the -incoming option).
1432ETEXI
1433SRST
1434``migrate_incoming`` *uri*
1435  Continue an incoming migration using the *uri* (that has the same syntax
1436  as the ``-incoming`` option).
1437ERST
1438
1439    {
1440        .name       = "migrate_recover",
1441        .args_type  = "uri:s",
1442        .params     = "uri",
1443        .help       = "Continue a paused incoming postcopy migration",
1444        .cmd        = hmp_migrate_recover,
1445    },
1446
1447STEXI
1448@item migrate_recover @var{uri}
1449@findex migrate_recover
1450Continue a paused incoming postcopy migration using the @var{uri}.
1451ETEXI
1452SRST
1453``migrate_recover`` *uri*
1454  Continue a paused incoming postcopy migration using the *uri*.
1455ERST
1456
1457    {
1458        .name       = "migrate_pause",
1459        .args_type  = "",
1460        .params     = "",
1461        .help       = "Pause an ongoing migration (postcopy-only)",
1462        .cmd        = hmp_migrate_pause,
1463    },
1464
1465STEXI
1466@item migrate_pause
1467@findex migrate_pause
1468Pause an ongoing migration.  Currently it only supports postcopy.
1469ETEXI
1470SRST
1471``migrate_pause``
1472  Pause an ongoing migration.  Currently it only supports postcopy.
1473ERST
1474
1475    {
1476        .name       = "migrate_set_cache_size",
1477        .args_type  = "value:o",
1478        .params     = "value",
1479        .help       = "set cache size (in bytes) for XBZRLE migrations,"
1480                      "the cache size will be rounded down to the nearest "
1481                      "power of 2.\n"
1482                      "The cache size affects the number of cache misses."
1483                      "In case of a high cache miss ratio you need to increase"
1484                      " the cache size",
1485        .cmd        = hmp_migrate_set_cache_size,
1486    },
1487
1488STEXI
1489@item migrate_set_cache_size @var{value}
1490@findex migrate_set_cache_size
1491Set cache size to @var{value} (in bytes) for xbzrle migrations.
1492ETEXI
1493SRST
1494``migrate_set_cache_size`` *value*
1495  Set cache size to *value* (in bytes) for xbzrle migrations.
1496ERST
1497
1498    {
1499        .name       = "migrate_set_speed",
1500        .args_type  = "value:o",
1501        .params     = "value",
1502        .help       = "set maximum speed (in bytes) for migrations. "
1503	"Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
1504        .cmd        = hmp_migrate_set_speed,
1505    },
1506
1507STEXI
1508@item migrate_set_speed @var{value}
1509@findex migrate_set_speed
1510Set maximum speed to @var{value} (in bytes) for migrations.
1511ETEXI
1512SRST
1513``migrate_set_speed`` *value*
1514  Set maximum speed to *value* (in bytes) for migrations.
1515ERST
1516
1517    {
1518        .name       = "migrate_set_downtime",
1519        .args_type  = "value:T",
1520        .params     = "value",
1521        .help       = "set maximum tolerated downtime (in seconds) for migrations",
1522        .cmd        = hmp_migrate_set_downtime,
1523    },
1524
1525STEXI
1526@item migrate_set_downtime @var{second}
1527@findex migrate_set_downtime
1528Set maximum tolerated downtime (in seconds) for migration.
1529ETEXI
1530SRST
1531``migrate_set_downtime`` *second*
1532  Set maximum tolerated downtime (in seconds) for migration.
1533ERST
1534
1535    {
1536        .name       = "migrate_set_capability",
1537        .args_type  = "capability:s,state:b",
1538        .params     = "capability state",
1539        .help       = "Enable/Disable the usage of a capability for migration",
1540        .cmd        = hmp_migrate_set_capability,
1541        .command_completion = migrate_set_capability_completion,
1542    },
1543
1544STEXI
1545@item migrate_set_capability @var{capability} @var{state}
1546@findex migrate_set_capability
1547Enable/Disable the usage of a capability @var{capability} for migration.
1548ETEXI
1549SRST
1550``migrate_set_capability`` *capability* *state*
1551  Enable/Disable the usage of a capability *capability* for migration.
1552ERST
1553
1554    {
1555        .name       = "migrate_set_parameter",
1556        .args_type  = "parameter:s,value:s",
1557        .params     = "parameter value",
1558        .help       = "Set the parameter for migration",
1559        .cmd        = hmp_migrate_set_parameter,
1560        .command_completion = migrate_set_parameter_completion,
1561    },
1562
1563STEXI
1564@item migrate_set_parameter @var{parameter} @var{value}
1565@findex migrate_set_parameter
1566Set the parameter @var{parameter} for migration.
1567ETEXI
1568SRST
1569``migrate_set_parameter`` *parameter* *value*
1570  Set the parameter *parameter* for migration.
1571ERST
1572
1573    {
1574        .name       = "migrate_start_postcopy",
1575        .args_type  = "",
1576        .params     = "",
1577        .help       = "Followup to a migration command to switch the migration"
1578                      " to postcopy mode. The postcopy-ram capability must "
1579                      "be set on both source and destination before the "
1580                      "original migration command .",
1581        .cmd        = hmp_migrate_start_postcopy,
1582    },
1583
1584STEXI
1585@item migrate_start_postcopy
1586@findex migrate_start_postcopy
1587Switch in-progress migration to postcopy mode. Ignored after the end of
1588migration (or once already in postcopy).
1589ETEXI
1590SRST
1591``migrate_start_postcopy``
1592  Switch in-progress migration to postcopy mode. Ignored after the end of
1593  migration (or once already in postcopy).
1594ERST
1595
1596    {
1597        .name       = "x_colo_lost_heartbeat",
1598        .args_type  = "",
1599        .params     = "",
1600        .help       = "Tell COLO that heartbeat is lost,\n\t\t\t"
1601                      "a failover or takeover is needed.",
1602        .cmd = hmp_x_colo_lost_heartbeat,
1603    },
1604
1605STEXI
1606@item x_colo_lost_heartbeat
1607@findex x_colo_lost_heartbeat
1608Tell COLO that heartbeat is lost, a failover or takeover is needed.
1609ETEXI
1610SRST
1611``x_colo_lost_heartbeat``
1612  Tell COLO that heartbeat is lost, a failover or takeover is needed.
1613ERST
1614
1615    {
1616        .name       = "client_migrate_info",
1617        .args_type  = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
1618        .params     = "protocol hostname port tls-port cert-subject",
1619        .help       = "set migration information for remote display",
1620        .cmd        = hmp_client_migrate_info,
1621    },
1622
1623STEXI
1624@item client_migrate_info @var{protocol} @var{hostname} @var{port} @var{tls-port} @var{cert-subject}
1625@findex client_migrate_info
1626Set migration information for remote display.  This makes the server
1627ask the client to automatically reconnect using the new parameters
1628once migration finished successfully.  Only implemented for SPICE.
1629ETEXI
1630SRST
1631``client_migrate_info`` *protocol* *hostname* *port* *tls-port* *cert-subject*
1632  Set migration information for remote display.  This makes the server
1633  ask the client to automatically reconnect using the new parameters
1634  once migration finished successfully.  Only implemented for SPICE.
1635ERST
1636
1637    {
1638        .name       = "dump-guest-memory",
1639        .args_type  = "paging:-p,detach:-d,windmp:-w,zlib:-z,lzo:-l,snappy:-s,filename:F,begin:l?,length:l?",
1640        .params     = "[-p] [-d] [-z|-l|-s|-w] filename [begin length]",
1641        .help       = "dump guest memory into file 'filename'.\n\t\t\t"
1642                      "-p: do paging to get guest's memory mapping.\n\t\t\t"
1643                      "-d: return immediately (do not wait for completion).\n\t\t\t"
1644                      "-z: dump in kdump-compressed format, with zlib compression.\n\t\t\t"
1645                      "-l: dump in kdump-compressed format, with lzo compression.\n\t\t\t"
1646                      "-s: dump in kdump-compressed format, with snappy compression.\n\t\t\t"
1647                      "-w: dump in Windows crashdump format (can be used instead of ELF-dump converting),\n\t\t\t"
1648                      "    for Windows x64 guests with vmcoreinfo driver only.\n\t\t\t"
1649                      "begin: the starting physical address.\n\t\t\t"
1650                      "length: the memory size, in bytes.",
1651        .cmd        = hmp_dump_guest_memory,
1652    },
1653
1654STEXI
1655@item dump-guest-memory [-p] @var{filename} @var{begin} @var{length}
1656@item dump-guest-memory [-z|-l|-s|-w] @var{filename}
1657@findex dump-guest-memory
1658Dump guest memory to @var{protocol}. The file can be processed with crash or
1659gdb. Without -z|-l|-s|-w, the dump format is ELF.
1660        -p: do paging to get guest's memory mapping.
1661        -z: dump in kdump-compressed format, with zlib compression.
1662        -l: dump in kdump-compressed format, with lzo compression.
1663        -s: dump in kdump-compressed format, with snappy compression.
1664        -w: dump in Windows crashdump format (can be used instead of ELF-dump converting),
1665            for Windows x64 guests with vmcoreinfo driver only
1666  filename: dump file name.
1667     begin: the starting physical address. It's optional, and should be
1668            specified together with length.
1669    length: the memory size, in bytes. It's optional, and should be specified
1670            together with begin.
1671ETEXI
1672SRST
1673``dump-guest-memory [-p]`` *filename* *begin* *length*
1674  \
1675``dump-guest-memory [-z|-l|-s|-w]`` *filename*
1676  Dump guest memory to *protocol*. The file can be processed with crash or
1677  gdb. Without ``-z|-l|-s|-w``, the dump format is ELF.
1678
1679  ``-p``
1680    do paging to get guest's memory mapping.
1681  ``-z``
1682    dump in kdump-compressed format, with zlib compression.
1683  ``-l``
1684    dump in kdump-compressed format, with lzo compression.
1685  ``-s``
1686    dump in kdump-compressed format, with snappy compression.
1687  ``-w``
1688    dump in Windows crashdump format (can be used instead of ELF-dump converting),
1689    for Windows x64 guests with vmcoreinfo driver only
1690  *filename*
1691    dump file name.
1692  *begin*
1693    the starting physical address. It's optional, and should be
1694    specified together with *length*.
1695  *length*
1696    the memory size, in bytes. It's optional, and should be specified
1697    together with *begin*.
1698
1699ERST
1700
1701#if defined(TARGET_S390X)
1702    {
1703        .name       = "dump-skeys",
1704        .args_type  = "filename:F",
1705        .params     = "",
1706        .help       = "Save guest storage keys into file 'filename'.\n",
1707        .cmd        = hmp_dump_skeys,
1708    },
1709#endif
1710
1711STEXI
1712@item dump-skeys @var{filename}
1713@findex dump-skeys
1714Save guest storage keys to a file.
1715ETEXI
1716SRST
1717``dump-skeys`` *filename*
1718  Save guest storage keys to a file.
1719ERST
1720
1721#if defined(TARGET_S390X)
1722    {
1723        .name       = "migration_mode",
1724        .args_type  = "mode:i",
1725        .params     = "mode",
1726        .help       = "Enables or disables migration mode\n",
1727        .cmd        = hmp_migrationmode,
1728    },
1729#endif
1730
1731STEXI
1732@item migration_mode @var{mode}
1733@findex migration_mode
1734Enables or disables migration mode.
1735ETEXI
1736SRST
1737``migration_mode`` *mode*
1738  Enables or disables migration mode.
1739ERST
1740
1741    {
1742        .name       = "snapshot_blkdev",
1743        .args_type  = "reuse:-n,device:B,snapshot-file:s?,format:s?",
1744        .params     = "[-n] device [new-image-file] [format]",
1745        .help       = "initiates a live snapshot\n\t\t\t"
1746                      "of device. If a new image file is specified, the\n\t\t\t"
1747                      "new image file will become the new root image.\n\t\t\t"
1748                      "If format is specified, the snapshot file will\n\t\t\t"
1749                      "be created in that format.\n\t\t\t"
1750                      "The default format is qcow2.  The -n flag requests QEMU\n\t\t\t"
1751                      "to reuse the image found in new-image-file, instead of\n\t\t\t"
1752                      "recreating it from scratch.",
1753        .cmd        = hmp_snapshot_blkdev,
1754    },
1755
1756STEXI
1757@item snapshot_blkdev
1758@findex snapshot_blkdev
1759Snapshot device, using snapshot file as target if provided
1760ETEXI
1761SRST
1762``snapshot_blkdev``
1763  Snapshot device, using snapshot file as target if provided
1764ERST
1765
1766    {
1767        .name       = "snapshot_blkdev_internal",
1768        .args_type  = "device:B,name:s",
1769        .params     = "device name",
1770        .help       = "take an internal snapshot of device.\n\t\t\t"
1771                      "The format of the image used by device must\n\t\t\t"
1772                      "support it, such as qcow2.\n\t\t\t",
1773        .cmd        = hmp_snapshot_blkdev_internal,
1774    },
1775
1776STEXI
1777@item snapshot_blkdev_internal
1778@findex snapshot_blkdev_internal
1779Take an internal snapshot on device if it support
1780ETEXI
1781SRST
1782``snapshot_blkdev_internal``
1783  Take an internal snapshot on device if it support
1784ERST
1785
1786    {
1787        .name       = "snapshot_delete_blkdev_internal",
1788        .args_type  = "device:B,name:s,id:s?",
1789        .params     = "device name [id]",
1790        .help       = "delete an internal snapshot of device.\n\t\t\t"
1791                      "If id is specified, qemu will try delete\n\t\t\t"
1792                      "the snapshot matching both id and name.\n\t\t\t"
1793                      "The format of the image used by device must\n\t\t\t"
1794                      "support it, such as qcow2.\n\t\t\t",
1795        .cmd        = hmp_snapshot_delete_blkdev_internal,
1796    },
1797
1798STEXI
1799@item snapshot_delete_blkdev_internal
1800@findex snapshot_delete_blkdev_internal
1801Delete an internal snapshot on device if it support
1802ETEXI
1803SRST
1804``snapshot_delete_blkdev_internal``
1805  Delete an internal snapshot on device if it support
1806ERST
1807
1808    {
1809        .name       = "drive_mirror",
1810        .args_type  = "reuse:-n,full:-f,device:B,target:s,format:s?",
1811        .params     = "[-n] [-f] device target [format]",
1812        .help       = "initiates live storage\n\t\t\t"
1813                      "migration for a device. The device's contents are\n\t\t\t"
1814                      "copied to the new image file, including data that\n\t\t\t"
1815                      "is written after the command is started.\n\t\t\t"
1816                      "The -n flag requests QEMU to reuse the image found\n\t\t\t"
1817                      "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
1818                      "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
1819                      "so that the result does not need a backing file.\n\t\t\t",
1820        .cmd        = hmp_drive_mirror,
1821    },
1822STEXI
1823@item drive_mirror
1824@findex drive_mirror
1825Start mirroring a block device's writes to a new destination,
1826using the specified target.
1827ETEXI
1828SRST
1829``drive_mirror``
1830  Start mirroring a block device's writes to a new destination,
1831  using the specified target.
1832ERST
1833
1834    {
1835        .name       = "drive_backup",
1836        .args_type  = "reuse:-n,full:-f,compress:-c,device:B,target:s,format:s?",
1837        .params     = "[-n] [-f] [-c] device target [format]",
1838        .help       = "initiates a point-in-time\n\t\t\t"
1839                      "copy for a device. The device's contents are\n\t\t\t"
1840                      "copied to the new image file, excluding data that\n\t\t\t"
1841                      "is written after the command is started.\n\t\t\t"
1842                      "The -n flag requests QEMU to reuse the image found\n\t\t\t"
1843                      "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
1844                      "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
1845                      "so that the result does not need a backing file.\n\t\t\t"
1846                      "The -c flag requests QEMU to compress backup data\n\t\t\t"
1847                      "(if the target format supports it).\n\t\t\t",
1848        .cmd        = hmp_drive_backup,
1849    },
1850STEXI
1851@item drive_backup
1852@findex drive_backup
1853Start a point-in-time copy of a block device to a specificed target.
1854ETEXI
1855SRST
1856``drive_backup``
1857  Start a point-in-time copy of a block device to a specificed target.
1858ERST
1859
1860    {
1861        .name       = "drive_add",
1862        .args_type  = "node:-n,pci_addr:s,opts:s",
1863        .params     = "[-n] [[<domain>:]<bus>:]<slot>\n"
1864                      "[file=file][,if=type][,bus=n]\n"
1865                      "[,unit=m][,media=d][,index=i]\n"
1866                      "[,snapshot=on|off][,cache=on|off]\n"
1867                      "[,readonly=on|off][,copy-on-read=on|off]",
1868        .help       = "add drive to PCI storage controller",
1869        .cmd        = hmp_drive_add,
1870    },
1871
1872STEXI
1873@item drive_add
1874@findex drive_add
1875Add drive to PCI storage controller.
1876ETEXI
1877SRST
1878``drive_add``
1879  Add drive to PCI storage controller.
1880ERST
1881
1882    {
1883        .name       = "pcie_aer_inject_error",
1884        .args_type  = "advisory_non_fatal:-a,correctable:-c,"
1885	              "id:s,error_status:s,"
1886	              "header0:i?,header1:i?,header2:i?,header3:i?,"
1887	              "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
1888        .params     = "[-a] [-c] id "
1889                      "<error_status> [<tlp header> [<tlp header prefix>]]",
1890        .help       = "inject pcie aer error\n\t\t\t"
1891	              " -a for advisory non fatal error\n\t\t\t"
1892	              " -c for correctable error\n\t\t\t"
1893                      "<id> = qdev device id\n\t\t\t"
1894                      "<error_status> = error string or 32bit\n\t\t\t"
1895                      "<tlb header> = 32bit x 4\n\t\t\t"
1896                      "<tlb header prefix> = 32bit x 4",
1897        .cmd        = hmp_pcie_aer_inject_error,
1898    },
1899
1900STEXI
1901@item pcie_aer_inject_error
1902@findex pcie_aer_inject_error
1903Inject PCIe AER error
1904ETEXI
1905SRST
1906``pcie_aer_inject_error``
1907  Inject PCIe AER error
1908ERST
1909
1910    {
1911        .name       = "netdev_add",
1912        .args_type  = "netdev:O",
1913        .params     = "[user|tap|socket|vde|bridge|hubport|netmap|vhost-user],id=str[,prop=value][,...]",
1914        .help       = "add host network device",
1915        .cmd        = hmp_netdev_add,
1916        .command_completion = netdev_add_completion,
1917    },
1918
1919STEXI
1920@item netdev_add
1921@findex netdev_add
1922Add host network device.
1923ETEXI
1924SRST
1925``netdev_add``
1926  Add host network device.
1927ERST
1928
1929    {
1930        .name       = "netdev_del",
1931        .args_type  = "id:s",
1932        .params     = "id",
1933        .help       = "remove host network device",
1934        .cmd        = hmp_netdev_del,
1935        .command_completion = netdev_del_completion,
1936    },
1937
1938STEXI
1939@item netdev_del
1940@findex netdev_del
1941Remove host network device.
1942ETEXI
1943SRST
1944``netdev_del``
1945  Remove host network device.
1946ERST
1947
1948    {
1949        .name       = "object_add",
1950        .args_type  = "object:O",
1951        .params     = "[qom-type=]type,id=str[,prop=value][,...]",
1952        .help       = "create QOM object",
1953        .cmd        = hmp_object_add,
1954        .command_completion = object_add_completion,
1955    },
1956
1957STEXI
1958@item object_add
1959@findex object_add
1960Create QOM object.
1961ETEXI
1962SRST
1963``object_add``
1964  Create QOM object.
1965ERST
1966
1967    {
1968        .name       = "object_del",
1969        .args_type  = "id:s",
1970        .params     = "id",
1971        .help       = "destroy QOM object",
1972        .cmd        = hmp_object_del,
1973        .command_completion = object_del_completion,
1974    },
1975
1976STEXI
1977@item object_del
1978@findex object_del
1979Destroy QOM object.
1980ETEXI
1981SRST
1982``object_del``
1983  Destroy QOM object.
1984ERST
1985
1986#ifdef CONFIG_SLIRP
1987    {
1988        .name       = "hostfwd_add",
1989        .args_type  = "arg1:s,arg2:s?,arg3:s?",
1990        .params     = "[hub_id name]|[netdev_id] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
1991        .help       = "redirect TCP or UDP connections from host to guest (requires -net user)",
1992        .cmd        = hmp_hostfwd_add,
1993    },
1994#endif
1995STEXI
1996@item hostfwd_add
1997@findex hostfwd_add
1998Redirect TCP or UDP connections from host to guest (requires -net user).
1999ETEXI
2000SRST
2001``hostfwd_add``
2002  Redirect TCP or UDP connections from host to guest (requires -net user).
2003ERST
2004
2005#ifdef CONFIG_SLIRP
2006    {
2007        .name       = "hostfwd_remove",
2008        .args_type  = "arg1:s,arg2:s?,arg3:s?",
2009        .params     = "[hub_id name]|[netdev_id] [tcp|udp]:[hostaddr]:hostport",
2010        .help       = "remove host-to-guest TCP or UDP redirection",
2011        .cmd        = hmp_hostfwd_remove,
2012    },
2013
2014#endif
2015STEXI
2016@item hostfwd_remove
2017@findex hostfwd_remove
2018Remove host-to-guest TCP or UDP redirection.
2019ETEXI
2020SRST
2021``hostfwd_remove``
2022  Remove host-to-guest TCP or UDP redirection.
2023ERST
2024
2025    {
2026        .name       = "balloon",
2027        .args_type  = "value:M",
2028        .params     = "target",
2029        .help       = "request VM to change its memory allocation (in MB)",
2030        .cmd        = hmp_balloon,
2031    },
2032
2033STEXI
2034@item balloon @var{value}
2035@findex balloon
2036Request VM to change its memory allocation to @var{value} (in MB).
2037ETEXI
2038SRST
2039``balloon`` *value*
2040  Request VM to change its memory allocation to *value* (in MB).
2041ERST
2042
2043    {
2044        .name       = "set_link",
2045        .args_type  = "name:s,up:b",
2046        .params     = "name on|off",
2047        .help       = "change the link status of a network adapter",
2048        .cmd        = hmp_set_link,
2049        .command_completion = set_link_completion,
2050    },
2051
2052STEXI
2053@item set_link @var{name} [on|off]
2054@findex set_link
2055Switch link @var{name} on (i.e. up) or off (i.e. down).
2056ETEXI
2057SRST
2058``set_link`` *name* ``[on|off]``
2059  Switch link *name* on (i.e. up) or off (i.e. down).
2060ERST
2061
2062    {
2063        .name       = "watchdog_action",
2064        .args_type  = "action:s",
2065        .params     = "[reset|shutdown|poweroff|pause|debug|none]",
2066        .help       = "change watchdog action",
2067        .cmd        = hmp_watchdog_action,
2068        .command_completion = watchdog_action_completion,
2069    },
2070
2071STEXI
2072@item watchdog_action
2073@findex watchdog_action
2074Change watchdog action.
2075ETEXI
2076SRST
2077``watchdog_action``
2078  Change watchdog action.
2079ERST
2080
2081    {
2082        .name       = "acl_show",
2083        .args_type  = "aclname:s",
2084        .params     = "aclname",
2085        .help       = "list rules in the access control list",
2086        .cmd        = hmp_acl_show,
2087    },
2088
2089STEXI
2090@item acl_show @var{aclname}
2091@findex acl_show
2092List all the matching rules in the access control list, and the default
2093policy. There are currently two named access control lists,
2094@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
2095certificate distinguished name, and SASL username respectively.
2096ETEXI
2097SRST
2098``acl_show`` *aclname*
2099  List all the matching rules in the access control list, and the default
2100  policy. There are currently two named access control lists,
2101  *vnc.x509dname* and *vnc.username* matching on the x509 client
2102  certificate distinguished name, and SASL username respectively.
2103ERST
2104
2105    {
2106        .name       = "acl_policy",
2107        .args_type  = "aclname:s,policy:s",
2108        .params     = "aclname allow|deny",
2109        .help       = "set default access control list policy",
2110        .cmd        = hmp_acl_policy,
2111    },
2112
2113STEXI
2114@item acl_policy @var{aclname} @code{allow|deny}
2115@findex acl_policy
2116Set the default access control list policy, used in the event that
2117none of the explicit rules match. The default policy at startup is
2118always @code{deny}.
2119ETEXI
2120SRST
2121``acl_policy`` *aclname* ``allow|deny``
2122  Set the default access control list policy, used in the event that
2123  none of the explicit rules match. The default policy at startup is
2124  always ``deny``.
2125ERST
2126
2127    {
2128        .name       = "acl_add",
2129        .args_type  = "aclname:s,match:s,policy:s,index:i?",
2130        .params     = "aclname match allow|deny [index]",
2131        .help       = "add a match rule to the access control list",
2132        .cmd        = hmp_acl_add,
2133    },
2134
2135STEXI
2136@item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
2137@findex acl_add
2138Add a match rule to the access control list, allowing or denying access.
2139The match will normally be an exact username or x509 distinguished name,
2140but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
2141allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
2142normally be appended to the end of the ACL, but can be inserted
2143earlier in the list if the optional @var{index} parameter is supplied.
2144ETEXI
2145SRST
2146``acl_add`` *aclname* *match* ``allow|deny`` [*index*]
2147  Add a match rule to the access control list, allowing or denying access.
2148  The match will normally be an exact username or x509 distinguished name,
2149  but can optionally include wildcard globs. eg ``*@EXAMPLE.COM`` to
2150  allow all users in the ``EXAMPLE.COM`` kerberos realm. The match will
2151  normally be appended to the end of the ACL, but can be inserted
2152  earlier in the list if the optional *index* parameter is supplied.
2153ERST
2154
2155    {
2156        .name       = "acl_remove",
2157        .args_type  = "aclname:s,match:s",
2158        .params     = "aclname match",
2159        .help       = "remove a match rule from the access control list",
2160        .cmd        = hmp_acl_remove,
2161    },
2162
2163STEXI
2164@item acl_remove @var{aclname} @var{match}
2165@findex acl_remove
2166Remove the specified match rule from the access control list.
2167ETEXI
2168SRST
2169``acl_remove`` *aclname* *match*
2170  Remove the specified match rule from the access control list.
2171ERST
2172
2173    {
2174        .name       = "acl_reset",
2175        .args_type  = "aclname:s",
2176        .params     = "aclname",
2177        .help       = "reset the access control list",
2178        .cmd        = hmp_acl_reset,
2179    },
2180
2181STEXI
2182@item acl_reset @var{aclname}
2183@findex acl_reset
2184Remove all matches from the access control list, and set the default
2185policy back to @code{deny}.
2186ETEXI
2187SRST
2188``acl_reset`` *aclname*
2189  Remove all matches from the access control list, and set the default
2190  policy back to ``deny``.
2191ERST
2192
2193    {
2194        .name       = "nbd_server_start",
2195        .args_type  = "all:-a,writable:-w,uri:s",
2196        .params     = "nbd_server_start [-a] [-w] host:port",
2197        .help       = "serve block devices on the given host and port",
2198        .cmd        = hmp_nbd_server_start,
2199    },
2200STEXI
2201@item nbd_server_start @var{host}:@var{port}
2202@findex nbd_server_start
2203Start an NBD server on the given host and/or port.  If the @option{-a}
2204option is included, all of the virtual machine's block devices that
2205have an inserted media on them are automatically exported; in this case,
2206the @option{-w} option makes the devices writable too.
2207ETEXI
2208SRST
2209``nbd_server_start`` *host*:*port*
2210  Start an NBD server on the given host and/or port.  If the ``-a``
2211  option is included, all of the virtual machine's block devices that
2212  have an inserted media on them are automatically exported; in this case,
2213  the ``-w`` option makes the devices writable too.
2214ERST
2215
2216    {
2217        .name       = "nbd_server_add",
2218        .args_type  = "writable:-w,device:B,name:s?",
2219        .params     = "nbd_server_add [-w] device [name]",
2220        .help       = "export a block device via NBD",
2221        .cmd        = hmp_nbd_server_add,
2222    },
2223STEXI
2224@item nbd_server_add @var{device} [ @var{name} ]
2225@findex nbd_server_add
2226Export a block device through QEMU's NBD server, which must be started
2227beforehand with @command{nbd_server_start}.  The @option{-w} option makes the
2228exported device writable too.  The export name is controlled by @var{name},
2229defaulting to @var{device}.
2230ETEXI
2231SRST
2232``nbd_server_add`` *device* [ *name* ]
2233  Export a block device through QEMU's NBD server, which must be started
2234  beforehand with ``nbd_server_start``.  The ``-w`` option makes the
2235  exported device writable too.  The export name is controlled by *name*,
2236  defaulting to *device*.
2237ERST
2238
2239    {
2240        .name       = "nbd_server_remove",
2241        .args_type  = "force:-f,name:s",
2242        .params     = "nbd_server_remove [-f] name",
2243        .help       = "remove an export previously exposed via NBD",
2244        .cmd        = hmp_nbd_server_remove,
2245    },
2246STEXI
2247@item nbd_server_remove [-f] @var{name}
2248@findex nbd_server_remove
2249Stop exporting a block device through QEMU's NBD server, which was
2250previously started with @command{nbd_server_add}.  The @option{-f}
2251option forces the server to drop the export immediately even if
2252clients are connected; otherwise the command fails unless there are no
2253clients.
2254ETEXI
2255SRST
2256``nbd_server_remove [-f]`` *name*
2257  Stop exporting a block device through QEMU's NBD server, which was
2258  previously started with ``nbd_server_add``.  The ``-f``
2259  option forces the server to drop the export immediately even if
2260  clients are connected; otherwise the command fails unless there are no
2261  clients.
2262ERST
2263
2264    {
2265        .name       = "nbd_server_stop",
2266        .args_type  = "",
2267        .params     = "nbd_server_stop",
2268        .help       = "stop serving block devices using the NBD protocol",
2269        .cmd        = hmp_nbd_server_stop,
2270    },
2271STEXI
2272@item nbd_server_stop
2273@findex nbd_server_stop
2274Stop the QEMU embedded NBD server.
2275ETEXI
2276SRST
2277``nbd_server_stop``
2278  Stop the QEMU embedded NBD server.
2279ERST
2280
2281
2282#if defined(TARGET_I386)
2283
2284    {
2285        .name       = "mce",
2286        .args_type  = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
2287        .params     = "[-b] cpu bank status mcgstatus addr misc",
2288        .help       = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
2289        .cmd        = hmp_mce,
2290    },
2291
2292#endif
2293STEXI
2294@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
2295@findex mce (x86)
2296Inject an MCE on the given CPU (x86 only).
2297ETEXI
2298SRST
2299``mce`` *cpu* *bank* *status* *mcgstatus* *addr* *misc*
2300  Inject an MCE on the given CPU (x86 only).
2301ERST
2302
2303    {
2304        .name       = "getfd",
2305        .args_type  = "fdname:s",
2306        .params     = "getfd name",
2307        .help       = "receive a file descriptor via SCM rights and assign it a name",
2308        .cmd        = hmp_getfd,
2309    },
2310
2311STEXI
2312@item getfd @var{fdname}
2313@findex getfd
2314If a file descriptor is passed alongside this command using the SCM_RIGHTS
2315mechanism on unix sockets, it is stored using the name @var{fdname} for
2316later use by other monitor commands.
2317ETEXI
2318SRST
2319``getfd`` *fdname*
2320  If a file descriptor is passed alongside this command using the SCM_RIGHTS
2321  mechanism on unix sockets, it is stored using the name *fdname* for
2322  later use by other monitor commands.
2323ERST
2324
2325    {
2326        .name       = "closefd",
2327        .args_type  = "fdname:s",
2328        .params     = "closefd name",
2329        .help       = "close a file descriptor previously passed via SCM rights",
2330        .cmd        = hmp_closefd,
2331    },
2332
2333STEXI
2334@item closefd @var{fdname}
2335@findex closefd
2336Close the file descriptor previously assigned to @var{fdname} using the
2337@code{getfd} command. This is only needed if the file descriptor was never
2338used by another monitor command.
2339ETEXI
2340SRST
2341``closefd`` *fdname*
2342  Close the file descriptor previously assigned to *fdname* using the
2343  ``getfd`` command. This is only needed if the file descriptor was never
2344  used by another monitor command.
2345ERST
2346
2347    {
2348        .name       = "block_passwd",
2349        .args_type  = "device:B,password:s",
2350        .params     = "block_passwd device password",
2351        .help       = "set the password of encrypted block devices",
2352        .cmd        = hmp_block_passwd,
2353    },
2354
2355STEXI
2356@item block_passwd @var{device} @var{password}
2357@findex block_passwd
2358Set the encrypted device @var{device} password to @var{password}
2359
2360This command is now obsolete and will always return an error since 2.10
2361ETEXI
2362SRST
2363``block_passwd`` *device* *password*
2364  Set the encrypted device *device* password to *password*
2365
2366  This command is now obsolete and will always return an error since 2.10
2367ERST
2368
2369    {
2370        .name       = "block_set_io_throttle",
2371        .args_type  = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
2372        .params     = "device bps bps_rd bps_wr iops iops_rd iops_wr",
2373        .help       = "change I/O throttle limits for a block drive",
2374        .cmd        = hmp_block_set_io_throttle,
2375    },
2376
2377STEXI
2378@item block_set_io_throttle @var{device} @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}
2379@findex block_set_io_throttle
2380Change 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}.
2381@var{device} can be a block device name, a qdev ID or a QOM path.
2382ETEXI
2383SRST
2384``block_set_io_throttle`` *device* *bps* *bps_rd* *bps_wr* *iops* *iops_rd* *iops_wr*
2385  Change I/O throttle limits for a block drive to
2386  *bps* *bps_rd* *bps_wr* *iops* *iops_rd* *iops_wr*.
2387  *device* can be a block device name, a qdev ID or a QOM path.
2388ERST
2389
2390    {
2391        .name       = "set_password",
2392        .args_type  = "protocol:s,password:s,connected:s?",
2393        .params     = "protocol password action-if-connected",
2394        .help       = "set spice/vnc password",
2395        .cmd        = hmp_set_password,
2396    },
2397
2398STEXI
2399@item set_password [ vnc | spice ] password [ action-if-connected ]
2400@findex set_password
2401Change spice/vnc password.  Use zero to make the password stay valid
2402forever.  @var{action-if-connected} specifies what should happen in
2403case a connection is established: @var{fail} makes the password change
2404fail.  @var{disconnect} changes the password and disconnects the
2405client.  @var{keep} changes the password and keeps the connection up.
2406@var{keep} is the default.
2407ETEXI
2408SRST
2409``set_password [ vnc | spice ] password [ action-if-connected ]``
2410  Change spice/vnc password.  Use zero to make the password stay valid
2411  forever.  *action-if-connected* specifies what should happen in
2412  case a connection is established: *fail* makes the password change
2413  fail.  *disconnect* changes the password and disconnects the
2414  client.  *keep* changes the password and keeps the connection up.
2415  *keep* is the default.
2416ERST
2417
2418    {
2419        .name       = "expire_password",
2420        .args_type  = "protocol:s,time:s",
2421        .params     = "protocol time",
2422        .help       = "set spice/vnc password expire-time",
2423        .cmd        = hmp_expire_password,
2424    },
2425
2426STEXI
2427@item expire_password [ vnc | spice ] expire-time
2428@findex expire_password
2429Specify when a password for spice/vnc becomes
2430invalid. @var{expire-time} accepts:
2431
2432@table @var
2433@item now
2434Invalidate password instantly.
2435
2436@item never
2437Password stays valid forever.
2438
2439@item +nsec
2440Password stays valid for @var{nsec} seconds starting now.
2441
2442@item nsec
2443Password is invalidated at the given time.  @var{nsec} are the seconds
2444passed since 1970, i.e. unix epoch.
2445
2446@end table
2447ETEXI
2448SRST
2449``expire_password [ vnc | spice ]`` *expire-time*
2450  Specify when a password for spice/vnc becomes
2451  invalid. *expire-time* accepts:
2452
2453  ``now``
2454    Invalidate password instantly.
2455  ``never``
2456    Password stays valid forever.
2457  ``+``\ *nsec*
2458    Password stays valid for *nsec* seconds starting now.
2459  *nsec*
2460    Password is invalidated at the given time.  *nsec* are the seconds
2461    passed since 1970, i.e. unix epoch.
2462
2463ERST
2464
2465    {
2466        .name       = "chardev-add",
2467        .args_type  = "args:s",
2468        .params     = "args",
2469        .help       = "add chardev",
2470        .cmd        = hmp_chardev_add,
2471        .command_completion = chardev_add_completion,
2472    },
2473
2474STEXI
2475@item chardev-add args
2476@findex chardev-add
2477chardev-add accepts the same parameters as the -chardev command line switch.
2478
2479ETEXI
2480SRST
2481``chardev-add`` *args*
2482  chardev-add accepts the same parameters as the -chardev command line switch.
2483ERST
2484
2485    {
2486        .name       = "chardev-change",
2487        .args_type  = "id:s,args:s",
2488        .params     = "id args",
2489        .help       = "change chardev",
2490        .cmd        = hmp_chardev_change,
2491    },
2492
2493STEXI
2494@item chardev-change args
2495@findex chardev-change
2496chardev-change accepts existing chardev @var{id} and then the same arguments
2497as the -chardev command line switch (except for "id").
2498
2499ETEXI
2500SRST
2501``chardev-change`` *args*
2502  chardev-change accepts existing chardev *id* and then the same arguments
2503  as the -chardev command line switch (except for "id").
2504ERST
2505
2506    {
2507        .name       = "chardev-remove",
2508        .args_type  = "id:s",
2509        .params     = "id",
2510        .help       = "remove chardev",
2511        .cmd        = hmp_chardev_remove,
2512        .command_completion = chardev_remove_completion,
2513    },
2514
2515STEXI
2516@item chardev-remove id
2517@findex chardev-remove
2518Removes the chardev @var{id}.
2519
2520ETEXI
2521SRST
2522``chardev-remove`` *id*
2523  Removes the chardev *id*.
2524ERST
2525
2526    {
2527        .name       = "chardev-send-break",
2528        .args_type  = "id:s",
2529        .params     = "id",
2530        .help       = "send a break on chardev",
2531        .cmd        = hmp_chardev_send_break,
2532        .command_completion = chardev_remove_completion,
2533    },
2534
2535STEXI
2536@item chardev-send-break id
2537@findex chardev-send-break
2538Send a break on the chardev @var{id}.
2539
2540ETEXI
2541SRST
2542``chardev-send-break`` *id*
2543  Send a break on the chardev *id*.
2544ERST
2545
2546    {
2547        .name       = "qemu-io",
2548        .args_type  = "qdev:-d,device:B,command:s",
2549        .params     = "[-d] [device] \"[command]\"",
2550        .help       = "run a qemu-io command on a block device\n\t\t\t"
2551                      "-d: [device] is a device ID rather than a "
2552                      "drive ID or node name",
2553        .cmd        = hmp_qemu_io,
2554    },
2555
2556STEXI
2557@item qemu-io @var{device} @var{command}
2558@findex qemu-io
2559Executes a qemu-io command on the given block device.
2560
2561ETEXI
2562SRST
2563``qemu-io`` *device* *command*
2564  Executes a qemu-io command on the given block device.
2565ERST
2566
2567    {
2568        .name       = "cpu-add",
2569        .args_type  = "id:i",
2570        .params     = "id",
2571        .help       = "add cpu (deprecated, use device_add instead)",
2572        .cmd        = hmp_cpu_add,
2573    },
2574
2575STEXI
2576@item cpu-add @var{id}
2577@findex cpu-add
2578Add CPU with id @var{id}.  This command is deprecated, please
2579+use @code{device_add} instead. For details, refer to
2580'docs/cpu-hotplug.rst'.
2581ETEXI
2582SRST
2583``cpu-add`` *id*
2584  Add CPU with id *id*.  This command is deprecated, please
2585  +use ``device_add`` instead. For details, refer to
2586  'docs/cpu-hotplug.rst'.
2587ERST
2588
2589    {
2590        .name       = "qom-list",
2591        .args_type  = "path:s?",
2592        .params     = "path",
2593        .help       = "list QOM properties",
2594        .cmd        = hmp_qom_list,
2595        .flags      = "p",
2596    },
2597
2598STEXI
2599@item qom-list [@var{path}]
2600Print QOM properties of object at location @var{path}
2601ETEXI
2602SRST
2603``qom-list`` [*path*]
2604  Print QOM properties of object at location *path*
2605ERST
2606
2607    {
2608        .name       = "qom-set",
2609        .args_type  = "path:s,property:s,value:s",
2610        .params     = "path property value",
2611        .help       = "set QOM property",
2612        .cmd        = hmp_qom_set,
2613        .flags      = "p",
2614    },
2615
2616STEXI
2617@item qom-set @var{path} @var{property} @var{value}
2618Set QOM property @var{property} of object at location @var{path} to value @var{value}
2619ETEXI
2620SRST
2621``qom-set`` *path* *property* *value*
2622  Set QOM property *property* of object at location *path* to value *value*
2623ERST
2624
2625    {
2626        .name       = "info",
2627        .args_type  = "item:s?",
2628        .params     = "[subcommand]",
2629        .help       = "show various information about the system state",
2630        .cmd        = hmp_info_help,
2631        .sub_table  = hmp_info_cmds,
2632        .flags      = "p",
2633    },
2634
2635STEXI
2636@end table
2637ETEXI
2638