xref: /openbmc/qemu/hmp-commands.hx (revision 52c95cae)
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    },
19
20STEXI
21@item help or ? [@var{cmd}]
22@findex help
23Show the help for all commands or just for command @var{cmd}.
24ETEXI
25
26    {
27        .name       = "commit",
28        .args_type  = "device:B",
29        .params     = "device|all",
30        .help       = "commit changes to the disk images (if -snapshot is used) or backing files",
31        .cmd        = hmp_commit,
32    },
33
34STEXI
35@item commit
36@findex commit
37Commit changes to the disk images (if -snapshot is used) or backing files.
38If the backing file is smaller than the snapshot, then the backing file will be
39resized to be the same size as the snapshot.  If the snapshot is smaller than
40the backing file, the backing file will not be truncated.  If you want the
41backing file to match the size of the smaller snapshot, you can safely truncate
42it yourself once the commit operation successfully completes.
43ETEXI
44
45    {
46        .name       = "q|quit",
47        .args_type  = "",
48        .params     = "",
49        .help       = "quit the emulator",
50        .cmd        = hmp_quit,
51    },
52
53STEXI
54@item q or quit
55@findex quit
56Quit the emulator.
57ETEXI
58
59    {
60        .name       = "block_resize",
61        .args_type  = "device:B,size:o",
62        .params     = "device size",
63        .help       = "resize a block image",
64        .cmd        = hmp_block_resize,
65    },
66
67STEXI
68@item block_resize
69@findex block_resize
70Resize a block image while a guest is running.  Usually requires guest
71action to see the updated size.  Resize to a lower size is supported,
72but should be used with extreme caution.  Note that this command only
73resizes image files, it can not resize block devices like LVM volumes.
74ETEXI
75
76    {
77        .name       = "block_stream",
78        .args_type  = "device:B,speed:o?,base:s?",
79        .params     = "device [speed [base]]",
80        .help       = "copy data from a backing file into a block device",
81        .cmd        = hmp_block_stream,
82    },
83
84STEXI
85@item block_stream
86@findex block_stream
87Copy data from a backing file into a block device.
88ETEXI
89
90    {
91        .name       = "block_job_set_speed",
92        .args_type  = "device:B,speed:o",
93        .params     = "device speed",
94        .help       = "set maximum speed for a background block operation",
95        .cmd        = hmp_block_job_set_speed,
96    },
97
98STEXI
99@item block_job_set_speed
100@findex block_job_set_speed
101Set maximum speed for a background block operation.
102ETEXI
103
104    {
105        .name       = "block_job_cancel",
106        .args_type  = "force:-f,device:B",
107        .params     = "[-f] device",
108        .help       = "stop an active background block operation (use -f"
109                      "\n\t\t\t if the operation is currently paused)",
110        .cmd        = hmp_block_job_cancel,
111    },
112
113STEXI
114@item block_job_cancel
115@findex block_job_cancel
116Stop an active background block operation (streaming, mirroring).
117ETEXI
118
119    {
120        .name       = "block_job_complete",
121        .args_type  = "device:B",
122        .params     = "device",
123        .help       = "stop an active background block operation",
124        .cmd        = hmp_block_job_complete,
125    },
126
127STEXI
128@item block_job_complete
129@findex block_job_complete
130Manually trigger completion of an active background block operation.
131For mirroring, this will switch the device to the destination path.
132ETEXI
133
134    {
135        .name       = "block_job_pause",
136        .args_type  = "device:B",
137        .params     = "device",
138        .help       = "pause an active background block operation",
139        .cmd        = hmp_block_job_pause,
140    },
141
142STEXI
143@item block_job_pause
144@findex block_job_pause
145Pause an active block streaming operation.
146ETEXI
147
148    {
149        .name       = "block_job_resume",
150        .args_type  = "device:B",
151        .params     = "device",
152        .help       = "resume a paused background block operation",
153        .cmd        = hmp_block_job_resume,
154    },
155
156STEXI
157@item block_job_resume
158@findex block_job_resume
159Resume a paused block streaming operation.
160ETEXI
161
162    {
163        .name       = "eject",
164        .args_type  = "force:-f,device:B",
165        .params     = "[-f] device",
166        .help       = "eject a removable medium (use -f to force it)",
167        .cmd        = hmp_eject,
168    },
169
170STEXI
171@item eject [-f] @var{device}
172@findex eject
173Eject a removable medium (use -f to force it).
174ETEXI
175
176    {
177        .name       = "drive_del",
178        .args_type  = "id:B",
179        .params     = "device",
180        .help       = "remove host block device",
181        .cmd        = hmp_drive_del,
182    },
183
184STEXI
185@item drive_del @var{device}
186@findex drive_del
187Remove host block device.  The result is that guest generated IO is no longer
188submitted against the host device underlying the disk.  Once a drive has
189been deleted, the QEMU Block layer returns -EIO which results in IO
190errors in the guest for applications that are reading/writing to the device.
191These errors are always reported to the guest, regardless of the drive's error
192actions (drive options rerror, werror).
193ETEXI
194
195    {
196        .name       = "change",
197        .args_type  = "device:B,target:F,arg:s?,read-only-mode:s?",
198        .params     = "device filename [format [read-only-mode]]",
199        .help       = "change a removable medium, optional format",
200        .cmd        = hmp_change,
201    },
202
203STEXI
204@item change @var{device} @var{setting}
205@findex change
206Change the configuration of a device.
207
208@table @option
209@item change @var{diskdevice} @var{filename} [@var{format} [@var{read-only-mode}]]
210Change the medium for a removable disk device to point to @var{filename}. eg
211
212@example
213(qemu) change ide1-cd0 /path/to/some.iso
214@end example
215
216@var{format} is optional.
217
218@var{read-only-mode} may be used to change the read-only status of the device.
219It accepts the following values:
220
221@table @var
222@item retain
223Retains the current status; this is the default.
224
225@item read-only
226Makes the device read-only.
227
228@item read-write
229Makes the device writable.
230@end table
231
232@item change vnc @var{display},@var{options}
233Change the configuration of the VNC server. The valid syntax for @var{display}
234and @var{options} are described at @ref{sec_invocation}. eg
235
236@example
237(qemu) change vnc localhost:1
238@end example
239
240@item change vnc password [@var{password}]
241
242Change the password associated with the VNC server. If the new password is not
243supplied, the monitor will prompt for it to be entered. VNC passwords are only
244significant up to 8 letters. eg
245
246@example
247(qemu) change vnc password
248Password: ********
249@end example
250
251@end table
252ETEXI
253
254    {
255        .name       = "screendump",
256        .args_type  = "filename:F,device:s?,head:i?",
257        .params     = "filename [device [head]]",
258        .help       = "save screen from head 'head' of display device 'device' "
259                      "into PPM image 'filename'",
260        .cmd        = hmp_screendump,
261    },
262
263STEXI
264@item screendump @var{filename}
265@findex screendump
266Save screen into PPM image @var{filename}.
267ETEXI
268
269    {
270        .name       = "logfile",
271        .args_type  = "filename:F",
272        .params     = "filename",
273        .help       = "output logs to 'filename'",
274        .cmd        = hmp_logfile,
275    },
276
277STEXI
278@item logfile @var{filename}
279@findex logfile
280Output logs to @var{filename}.
281ETEXI
282
283    {
284        .name       = "trace-event",
285        .args_type  = "name:s,option:b,vcpu:i?",
286        .params     = "name on|off [vcpu]",
287        .help       = "changes status of a specific trace event "
288                      "(vcpu: vCPU to set, default is all)",
289        .cmd = hmp_trace_event,
290        .command_completion = trace_event_completion,
291    },
292
293STEXI
294@item trace-event
295@findex trace-event
296changes status of a trace event
297ETEXI
298
299#if defined(CONFIG_TRACE_SIMPLE)
300    {
301        .name       = "trace-file",
302        .args_type  = "op:s?,arg:F?",
303        .params     = "on|off|flush|set [arg]",
304        .help       = "open, close, or flush trace file, or set a new file name",
305        .cmd        = hmp_trace_file,
306    },
307
308STEXI
309@item trace-file on|off|flush
310@findex trace-file
311Open, close, or flush the trace file.  If no argument is given, the status of the trace file is displayed.
312ETEXI
313#endif
314
315    {
316        .name       = "log",
317        .args_type  = "items:s",
318        .params     = "item1[,...]",
319        .help       = "activate logging of the specified items",
320        .cmd        = hmp_log,
321    },
322
323STEXI
324@item log @var{item1}[,...]
325@findex log
326Activate logging of the specified items.
327ETEXI
328
329    {
330        .name       = "savevm",
331        .args_type  = "name:s?",
332        .params     = "[tag|id]",
333        .help       = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
334        .cmd        = hmp_savevm,
335    },
336
337STEXI
338@item savevm [@var{tag}|@var{id}]
339@findex savevm
340Create a snapshot of the whole virtual machine. If @var{tag} is
341provided, it is used as human readable identifier. If there is already
342a snapshot with the same tag or ID, it is replaced. More info at
343@ref{vm_snapshots}.
344ETEXI
345
346    {
347        .name       = "loadvm",
348        .args_type  = "name:s",
349        .params     = "tag|id",
350        .help       = "restore a VM snapshot from its tag or id",
351        .cmd        = hmp_loadvm,
352        .command_completion = loadvm_completion,
353    },
354
355STEXI
356@item loadvm @var{tag}|@var{id}
357@findex loadvm
358Set the whole virtual machine to the snapshot identified by the tag
359@var{tag} or the unique snapshot ID @var{id}.
360ETEXI
361
362    {
363        .name       = "delvm",
364        .args_type  = "name:s",
365        .params     = "tag|id",
366        .help       = "delete a VM snapshot from its tag or id",
367        .cmd        = hmp_delvm,
368        .command_completion = delvm_completion,
369    },
370
371STEXI
372@item delvm @var{tag}|@var{id}
373@findex delvm
374Delete the snapshot identified by @var{tag} or @var{id}.
375ETEXI
376
377    {
378        .name       = "singlestep",
379        .args_type  = "option:s?",
380        .params     = "[on|off]",
381        .help       = "run emulation in singlestep mode or switch to normal mode",
382        .cmd        = hmp_singlestep,
383    },
384
385STEXI
386@item singlestep [off]
387@findex singlestep
388Run the emulation in single step mode.
389If called with option off, the emulation returns to normal mode.
390ETEXI
391
392    {
393        .name       = "stop",
394        .args_type  = "",
395        .params     = "",
396        .help       = "stop emulation",
397        .cmd        = hmp_stop,
398    },
399
400STEXI
401@item stop
402@findex stop
403Stop emulation.
404ETEXI
405
406    {
407        .name       = "c|cont",
408        .args_type  = "",
409        .params     = "",
410        .help       = "resume emulation",
411        .cmd        = hmp_cont,
412    },
413
414STEXI
415@item c or cont
416@findex cont
417Resume emulation.
418ETEXI
419
420    {
421        .name       = "system_wakeup",
422        .args_type  = "",
423        .params     = "",
424        .help       = "wakeup guest from suspend",
425        .cmd        = hmp_system_wakeup,
426    },
427
428STEXI
429@item system_wakeup
430@findex system_wakeup
431Wakeup guest from suspend.
432ETEXI
433
434    {
435        .name       = "gdbserver",
436        .args_type  = "device:s?",
437        .params     = "[device]",
438        .help       = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
439        .cmd        = hmp_gdbserver,
440    },
441
442STEXI
443@item gdbserver [@var{port}]
444@findex gdbserver
445Start gdbserver session (default @var{port}=1234)
446ETEXI
447
448    {
449        .name       = "x",
450        .args_type  = "fmt:/,addr:l",
451        .params     = "/fmt addr",
452        .help       = "virtual memory dump starting at 'addr'",
453        .cmd        = hmp_memory_dump,
454    },
455
456STEXI
457@item x/fmt @var{addr}
458@findex x
459Virtual memory dump starting at @var{addr}.
460ETEXI
461
462    {
463        .name       = "xp",
464        .args_type  = "fmt:/,addr:l",
465        .params     = "/fmt addr",
466        .help       = "physical memory dump starting at 'addr'",
467        .cmd        = hmp_physical_memory_dump,
468    },
469
470STEXI
471@item xp /@var{fmt} @var{addr}
472@findex xp
473Physical memory dump starting at @var{addr}.
474
475@var{fmt} is a format which tells the command how to format the
476data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
477
478@table @var
479@item count
480is the number of items to be dumped.
481
482@item format
483can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
484c (char) or i (asm instruction).
485
486@item size
487can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
488@code{h} or @code{w} can be specified with the @code{i} format to
489respectively select 16 or 32 bit code instruction size.
490
491@end table
492
493Examples:
494@itemize
495@item
496Dump 10 instructions at the current instruction pointer:
497@example
498(qemu) x/10i $eip
4990x90107063:  ret
5000x90107064:  sti
5010x90107065:  lea    0x0(%esi,1),%esi
5020x90107069:  lea    0x0(%edi,1),%edi
5030x90107070:  ret
5040x90107071:  jmp    0x90107080
5050x90107073:  nop
5060x90107074:  nop
5070x90107075:  nop
5080x90107076:  nop
509@end example
510
511@item
512Dump 80 16 bit values at the start of the video memory.
513@smallexample
514(qemu) xp/80hx 0xb8000
5150x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
5160x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
5170x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
5180x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
5190x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
5200x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
5210x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
5220x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
5230x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
5240x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
525@end smallexample
526@end itemize
527ETEXI
528
529    {
530        .name       = "gpa2hva",
531        .args_type  = "addr:l",
532        .params     = "addr",
533        .help       = "print the host virtual address corresponding to a guest physical address",
534        .cmd        = hmp_gpa2hva,
535    },
536
537STEXI
538@item gpa2hva @var{addr}
539@findex gpa2hva
540Print the host virtual address at which the guest's physical address @var{addr}
541is mapped.
542ETEXI
543
544#ifdef CONFIG_LINUX
545    {
546        .name       = "gpa2hpa",
547        .args_type  = "addr:l",
548        .params     = "addr",
549        .help       = "print the host physical address corresponding to a guest physical address",
550        .cmd        = hmp_gpa2hpa,
551    },
552#endif
553
554STEXI
555@item gpa2hpa @var{addr}
556@findex gpa2hpa
557Print the host physical address at which the guest's physical address @var{addr}
558is mapped.
559ETEXI
560
561    {
562        .name       = "p|print",
563        .args_type  = "fmt:/,val:l",
564        .params     = "/fmt expr",
565        .help       = "print expression value (use $reg for CPU register access)",
566        .cmd        = do_print,
567    },
568
569STEXI
570@item p or print/@var{fmt} @var{expr}
571@findex print
572Print expression value. Only the @var{format} part of @var{fmt} is
573used.
574ETEXI
575
576    {
577        .name       = "i",
578        .args_type  = "fmt:/,addr:i,index:i.",
579        .params     = "/fmt addr",
580        .help       = "I/O port read",
581        .cmd        = hmp_ioport_read,
582    },
583
584STEXI
585@item i/@var{fmt} @var{addr} [.@var{index}]
586@findex i
587Read I/O port.
588ETEXI
589
590    {
591        .name       = "o",
592        .args_type  = "fmt:/,addr:i,val:i",
593        .params     = "/fmt addr value",
594        .help       = "I/O port write",
595        .cmd        = hmp_ioport_write,
596    },
597
598STEXI
599@item o/@var{fmt} @var{addr} @var{val}
600@findex o
601Write to I/O port.
602ETEXI
603
604    {
605        .name       = "sendkey",
606        .args_type  = "keys:s,hold-time:i?",
607        .params     = "keys [hold_ms]",
608        .help       = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
609        .cmd        = hmp_sendkey,
610        .command_completion = sendkey_completion,
611    },
612
613STEXI
614@item sendkey @var{keys}
615@findex sendkey
616Send @var{keys} to the guest. @var{keys} could be the name of the
617key or the raw value in hexadecimal format. Use @code{-} to press
618several keys simultaneously. Example:
619@example
620sendkey ctrl-alt-f1
621@end example
622
623This command is useful to send keys that your graphical user interface
624intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
625ETEXI
626
627    {
628        .name       = "system_reset",
629        .args_type  = "",
630        .params     = "",
631        .help       = "reset the system",
632        .cmd        = hmp_system_reset,
633    },
634
635STEXI
636@item system_reset
637@findex system_reset
638Reset the system.
639ETEXI
640
641    {
642        .name       = "system_powerdown",
643        .args_type  = "",
644        .params     = "",
645        .help       = "send system power down event",
646        .cmd        = hmp_system_powerdown,
647    },
648
649STEXI
650@item system_powerdown
651@findex system_powerdown
652Power down the system (if supported).
653ETEXI
654
655    {
656        .name       = "sum",
657        .args_type  = "start:i,size:i",
658        .params     = "addr size",
659        .help       = "compute the checksum of a memory region",
660        .cmd        = hmp_sum,
661    },
662
663STEXI
664@item sum @var{addr} @var{size}
665@findex sum
666Compute the checksum of a memory region.
667ETEXI
668
669    {
670        .name       = "device_add",
671        .args_type  = "device:O",
672        .params     = "driver[,prop=value][,...]",
673        .help       = "add device, like -device on the command line",
674        .cmd        = hmp_device_add,
675        .command_completion = device_add_completion,
676    },
677
678STEXI
679@item device_add @var{config}
680@findex device_add
681Add device.
682ETEXI
683
684    {
685        .name       = "device_del",
686        .args_type  = "id:s",
687        .params     = "device",
688        .help       = "remove device",
689        .cmd        = hmp_device_del,
690        .command_completion = device_del_completion,
691    },
692
693STEXI
694@item device_del @var{id}
695@findex device_del
696Remove device @var{id}. @var{id} may be a short ID
697or a QOM object path.
698ETEXI
699
700    {
701        .name       = "cpu",
702        .args_type  = "index:i",
703        .params     = "index",
704        .help       = "set the default CPU",
705        .cmd        = hmp_cpu,
706    },
707
708STEXI
709@item cpu @var{index}
710@findex cpu
711Set the default CPU.
712ETEXI
713
714    {
715        .name       = "mouse_move",
716        .args_type  = "dx_str:s,dy_str:s,dz_str:s?",
717        .params     = "dx dy [dz]",
718        .help       = "send mouse move events",
719        .cmd        = hmp_mouse_move,
720    },
721
722STEXI
723@item mouse_move @var{dx} @var{dy} [@var{dz}]
724@findex mouse_move
725Move the active mouse to the specified coordinates @var{dx} @var{dy}
726with optional scroll axis @var{dz}.
727ETEXI
728
729    {
730        .name       = "mouse_button",
731        .args_type  = "button_state:i",
732        .params     = "state",
733        .help       = "change mouse button state (1=L, 2=M, 4=R)",
734        .cmd        = hmp_mouse_button,
735    },
736
737STEXI
738@item mouse_button @var{val}
739@findex mouse_button
740Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
741ETEXI
742
743    {
744        .name       = "mouse_set",
745        .args_type  = "index:i",
746        .params     = "index",
747        .help       = "set which mouse device receives events",
748        .cmd        = hmp_mouse_set,
749    },
750
751STEXI
752@item mouse_set @var{index}
753@findex mouse_set
754Set which mouse device receives events at given @var{index}, index
755can be obtained with
756@example
757info mice
758@end example
759ETEXI
760
761    {
762        .name       = "wavcapture",
763        .args_type  = "path:F,freq:i?,bits:i?,nchannels:i?",
764        .params     = "path [frequency [bits [channels]]]",
765        .help       = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
766        .cmd        = hmp_wavcapture,
767    },
768STEXI
769@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
770@findex wavcapture
771Capture audio into @var{filename}. Using sample rate @var{frequency}
772bits per sample @var{bits} and number of channels @var{channels}.
773
774Defaults:
775@itemize @minus
776@item Sample rate = 44100 Hz - CD quality
777@item Bits = 16
778@item Number of channels = 2 - Stereo
779@end itemize
780ETEXI
781
782    {
783        .name       = "stopcapture",
784        .args_type  = "n:i",
785        .params     = "capture index",
786        .help       = "stop capture",
787        .cmd        = hmp_stopcapture,
788    },
789STEXI
790@item stopcapture @var{index}
791@findex stopcapture
792Stop capture with a given @var{index}, index can be obtained with
793@example
794info capture
795@end example
796ETEXI
797
798    {
799        .name       = "memsave",
800        .args_type  = "val:l,size:i,filename:s",
801        .params     = "addr size file",
802        .help       = "save to disk virtual memory dump starting at 'addr' of size 'size'",
803        .cmd        = hmp_memsave,
804    },
805
806STEXI
807@item memsave @var{addr} @var{size} @var{file}
808@findex memsave
809save to disk virtual memory dump starting at @var{addr} of size @var{size}.
810ETEXI
811
812    {
813        .name       = "pmemsave",
814        .args_type  = "val:l,size:i,filename:s",
815        .params     = "addr size file",
816        .help       = "save to disk physical memory dump starting at 'addr' of size 'size'",
817        .cmd        = hmp_pmemsave,
818    },
819
820STEXI
821@item pmemsave @var{addr} @var{size} @var{file}
822@findex pmemsave
823save to disk physical memory dump starting at @var{addr} of size @var{size}.
824ETEXI
825
826    {
827        .name       = "boot_set",
828        .args_type  = "bootdevice:s",
829        .params     = "bootdevice",
830        .help       = "define new values for the boot device list",
831        .cmd        = hmp_boot_set,
832    },
833
834STEXI
835@item boot_set @var{bootdevicelist}
836@findex boot_set
837Define new values for the boot device list. Those values will override
838the values specified on the command line through the @code{-boot} option.
839
840The values that can be specified here depend on the machine type, but are
841the same that can be specified in the @code{-boot} command line option.
842ETEXI
843
844    {
845        .name       = "nmi",
846        .args_type  = "",
847        .params     = "",
848        .help       = "inject an NMI",
849        .cmd        = hmp_nmi,
850    },
851STEXI
852@item nmi @var{cpu}
853@findex nmi
854Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
855
856ETEXI
857
858    {
859        .name       = "ringbuf_write",
860        .args_type  = "device:s,data:s",
861        .params     = "device data",
862        .help       = "Write to a ring buffer character device",
863        .cmd        = hmp_ringbuf_write,
864        .command_completion = ringbuf_write_completion,
865    },
866
867STEXI
868@item ringbuf_write @var{device} @var{data}
869@findex ringbuf_write
870Write @var{data} to ring buffer character device @var{device}.
871@var{data} must be a UTF-8 string.
872
873ETEXI
874
875    {
876        .name       = "ringbuf_read",
877        .args_type  = "device:s,size:i",
878        .params     = "device size",
879        .help       = "Read from a ring buffer character device",
880        .cmd        = hmp_ringbuf_read,
881        .command_completion = ringbuf_write_completion,
882    },
883
884STEXI
885@item ringbuf_read @var{device}
886@findex ringbuf_read
887Read and print up to @var{size} bytes from ring buffer character
888device @var{device}.
889Certain non-printable characters are printed \uXXXX, where XXXX is the
890character code in hexadecimal.  Character \ is printed \\.
891Bug: can screw up when the buffer contains invalid UTF-8 sequences,
892NUL characters, after the ring buffer lost data, and when reading
893stops because the size limit is reached.
894
895ETEXI
896
897    {
898        .name       = "migrate",
899        .args_type  = "detach:-d,blk:-b,inc:-i,uri:s",
900        .params     = "[-d] [-b] [-i] uri",
901        .help       = "migrate to URI (using -d to not wait for completion)"
902		      "\n\t\t\t -b for migration without shared storage with"
903		      " full copy of disk\n\t\t\t -i for migration without "
904		      "shared storage with incremental copy of disk "
905		      "(base image shared between src and destination)",
906        .cmd        = hmp_migrate,
907    },
908
909
910STEXI
911@item migrate [-d] [-b] [-i] @var{uri}
912@findex migrate
913Migrate to @var{uri} (using -d to not wait for completion).
914	-b for migration with full copy of disk
915	-i for migration with incremental copy of disk (base image is shared)
916ETEXI
917
918    {
919        .name       = "migrate_cancel",
920        .args_type  = "",
921        .params     = "",
922        .help       = "cancel the current VM migration",
923        .cmd        = hmp_migrate_cancel,
924    },
925
926STEXI
927@item migrate_cancel
928@findex migrate_cancel
929Cancel the current VM migration.
930ETEXI
931
932    {
933        .name       = "migrate_continue",
934        .args_type  = "state:s",
935        .params     = "state",
936        .help       = "Continue migration from the given paused state",
937        .cmd        = hmp_migrate_continue,
938    },
939STEXI
940@item migrate_continue @var{state}
941@findex migrate_continue
942Continue migration from the paused state @var{state}
943ETEXI
944
945    {
946        .name       = "migrate_incoming",
947        .args_type  = "uri:s",
948        .params     = "uri",
949        .help       = "Continue an incoming migration from an -incoming defer",
950        .cmd        = hmp_migrate_incoming,
951    },
952
953STEXI
954@item migrate_incoming @var{uri}
955@findex migrate_incoming
956Continue an incoming migration using the @var{uri} (that has the same syntax
957as the -incoming option).
958
959ETEXI
960
961    {
962        .name       = "migrate_set_cache_size",
963        .args_type  = "value:o",
964        .params     = "value",
965        .help       = "set cache size (in bytes) for XBZRLE migrations,"
966                      "the cache size will be rounded down to the nearest "
967                      "power of 2.\n"
968                      "The cache size affects the number of cache misses."
969                      "In case of a high cache miss ratio you need to increase"
970                      " the cache size",
971        .cmd        = hmp_migrate_set_cache_size,
972    },
973
974STEXI
975@item migrate_set_cache_size @var{value}
976@findex migrate_set_cache_size
977Set cache size to @var{value} (in bytes) for xbzrle migrations.
978ETEXI
979
980    {
981        .name       = "migrate_set_speed",
982        .args_type  = "value:o",
983        .params     = "value",
984        .help       = "set maximum speed (in bytes) for migrations. "
985	"Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
986        .cmd        = hmp_migrate_set_speed,
987    },
988
989STEXI
990@item migrate_set_speed @var{value}
991@findex migrate_set_speed
992Set maximum speed to @var{value} (in bytes) for migrations.
993ETEXI
994
995    {
996        .name       = "migrate_set_downtime",
997        .args_type  = "value:T",
998        .params     = "value",
999        .help       = "set maximum tolerated downtime (in seconds) for migrations",
1000        .cmd        = hmp_migrate_set_downtime,
1001    },
1002
1003STEXI
1004@item migrate_set_downtime @var{second}
1005@findex migrate_set_downtime
1006Set maximum tolerated downtime (in seconds) for migration.
1007ETEXI
1008
1009    {
1010        .name       = "migrate_set_capability",
1011        .args_type  = "capability:s,state:b",
1012        .params     = "capability state",
1013        .help       = "Enable/Disable the usage of a capability for migration",
1014        .cmd        = hmp_migrate_set_capability,
1015        .command_completion = migrate_set_capability_completion,
1016    },
1017
1018STEXI
1019@item migrate_set_capability @var{capability} @var{state}
1020@findex migrate_set_capability
1021Enable/Disable the usage of a capability @var{capability} for migration.
1022ETEXI
1023
1024    {
1025        .name       = "migrate_set_parameter",
1026        .args_type  = "parameter:s,value:s",
1027        .params     = "parameter value",
1028        .help       = "Set the parameter for migration",
1029        .cmd        = hmp_migrate_set_parameter,
1030        .command_completion = migrate_set_parameter_completion,
1031    },
1032
1033STEXI
1034@item migrate_set_parameter @var{parameter} @var{value}
1035@findex migrate_set_parameter
1036Set the parameter @var{parameter} for migration.
1037ETEXI
1038
1039    {
1040        .name       = "migrate_start_postcopy",
1041        .args_type  = "",
1042        .params     = "",
1043        .help       = "Followup to a migration command to switch the migration"
1044                      " to postcopy mode. The postcopy-ram capability must "
1045                      "be set on both source and destination before the "
1046                      "original migration command .",
1047        .cmd        = hmp_migrate_start_postcopy,
1048    },
1049
1050STEXI
1051@item migrate_start_postcopy
1052@findex migrate_start_postcopy
1053Switch in-progress migration to postcopy mode. Ignored after the end of
1054migration (or once already in postcopy).
1055ETEXI
1056
1057    {
1058        .name       = "x_colo_lost_heartbeat",
1059        .args_type  = "",
1060        .params     = "",
1061        .help       = "Tell COLO that heartbeat is lost,\n\t\t\t"
1062                      "a failover or takeover is needed.",
1063        .cmd = hmp_x_colo_lost_heartbeat,
1064    },
1065
1066STEXI
1067@item x_colo_lost_heartbeat
1068@findex x_colo_lost_heartbeat
1069Tell COLO that heartbeat is lost, a failover or takeover is needed.
1070ETEXI
1071
1072    {
1073        .name       = "client_migrate_info",
1074        .args_type  = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
1075        .params     = "protocol hostname port tls-port cert-subject",
1076        .help       = "set migration information for remote display",
1077        .cmd        = hmp_client_migrate_info,
1078    },
1079
1080STEXI
1081@item client_migrate_info @var{protocol} @var{hostname} @var{port} @var{tls-port} @var{cert-subject}
1082@findex client_migrate_info
1083Set migration information for remote display.  This makes the server
1084ask the client to automatically reconnect using the new parameters
1085once migration finished successfully.  Only implemented for SPICE.
1086ETEXI
1087
1088    {
1089        .name       = "dump-guest-memory",
1090        .args_type  = "paging:-p,detach:-d,zlib:-z,lzo:-l,snappy:-s,filename:F,begin:i?,length:i?",
1091        .params     = "[-p] [-d] [-z|-l|-s] filename [begin length]",
1092        .help       = "dump guest memory into file 'filename'.\n\t\t\t"
1093                      "-p: do paging to get guest's memory mapping.\n\t\t\t"
1094                      "-d: return immediately (do not wait for completion).\n\t\t\t"
1095                      "-z: dump in kdump-compressed format, with zlib compression.\n\t\t\t"
1096                      "-l: dump in kdump-compressed format, with lzo compression.\n\t\t\t"
1097                      "-s: dump in kdump-compressed format, with snappy compression.\n\t\t\t"
1098                      "begin: the starting physical address.\n\t\t\t"
1099                      "length: the memory size, in bytes.",
1100        .cmd        = hmp_dump_guest_memory,
1101    },
1102
1103
1104STEXI
1105@item dump-guest-memory [-p] @var{filename} @var{begin} @var{length}
1106@item dump-guest-memory [-z|-l|-s] @var{filename}
1107@findex dump-guest-memory
1108Dump guest memory to @var{protocol}. The file can be processed with crash or
1109gdb. Without -z|-l|-s, the dump format is ELF.
1110        -p: do paging to get guest's memory mapping.
1111        -z: dump in kdump-compressed format, with zlib compression.
1112        -l: dump in kdump-compressed format, with lzo compression.
1113        -s: dump in kdump-compressed format, with snappy compression.
1114  filename: dump file name.
1115     begin: the starting physical address. It's optional, and should be
1116            specified together with length.
1117    length: the memory size, in bytes. It's optional, and should be specified
1118            together with begin.
1119ETEXI
1120
1121#if defined(TARGET_S390X)
1122    {
1123        .name       = "dump-skeys",
1124        .args_type  = "filename:F",
1125        .params     = "",
1126        .help       = "Save guest storage keys into file 'filename'.\n",
1127        .cmd        = hmp_dump_skeys,
1128    },
1129#endif
1130
1131STEXI
1132@item dump-skeys @var{filename}
1133@findex dump-skeys
1134Save guest storage keys to a file.
1135ETEXI
1136
1137#if defined(TARGET_S390X)
1138    {
1139        .name       = "migration_mode",
1140        .args_type  = "mode:i",
1141        .params     = "mode",
1142        .help       = "Enables or disables migration mode\n",
1143        .cmd        = hmp_migrationmode,
1144    },
1145#endif
1146
1147STEXI
1148@item migration_mode @var{mode}
1149@findex migration_mode
1150Enables or disables migration mode.
1151ETEXI
1152
1153    {
1154        .name       = "snapshot_blkdev",
1155        .args_type  = "reuse:-n,device:B,snapshot-file:s?,format:s?",
1156        .params     = "[-n] device [new-image-file] [format]",
1157        .help       = "initiates a live snapshot\n\t\t\t"
1158                      "of device. If a new image file is specified, the\n\t\t\t"
1159                      "new image file will become the new root image.\n\t\t\t"
1160                      "If format is specified, the snapshot file will\n\t\t\t"
1161                      "be created in that format.\n\t\t\t"
1162                      "The default format is qcow2.  The -n flag requests QEMU\n\t\t\t"
1163                      "to reuse the image found in new-image-file, instead of\n\t\t\t"
1164                      "recreating it from scratch.",
1165        .cmd        = hmp_snapshot_blkdev,
1166    },
1167
1168STEXI
1169@item snapshot_blkdev
1170@findex snapshot_blkdev
1171Snapshot device, using snapshot file as target if provided
1172ETEXI
1173
1174    {
1175        .name       = "snapshot_blkdev_internal",
1176        .args_type  = "device:B,name:s",
1177        .params     = "device name",
1178        .help       = "take an internal snapshot of device.\n\t\t\t"
1179                      "The format of the image used by device must\n\t\t\t"
1180                      "support it, such as qcow2.\n\t\t\t",
1181        .cmd        = hmp_snapshot_blkdev_internal,
1182    },
1183
1184STEXI
1185@item snapshot_blkdev_internal
1186@findex snapshot_blkdev_internal
1187Take an internal snapshot on device if it support
1188ETEXI
1189
1190    {
1191        .name       = "snapshot_delete_blkdev_internal",
1192        .args_type  = "device:B,name:s,id:s?",
1193        .params     = "device name [id]",
1194        .help       = "delete an internal snapshot of device.\n\t\t\t"
1195                      "If id is specified, qemu will try delete\n\t\t\t"
1196                      "the snapshot matching both id and name.\n\t\t\t"
1197                      "The format of the image used by device must\n\t\t\t"
1198                      "support it, such as qcow2.\n\t\t\t",
1199        .cmd        = hmp_snapshot_delete_blkdev_internal,
1200    },
1201
1202STEXI
1203@item snapshot_delete_blkdev_internal
1204@findex snapshot_delete_blkdev_internal
1205Delete an internal snapshot on device if it support
1206ETEXI
1207
1208    {
1209        .name       = "drive_mirror",
1210        .args_type  = "reuse:-n,full:-f,device:B,target:s,format:s?",
1211        .params     = "[-n] [-f] device target [format]",
1212        .help       = "initiates live storage\n\t\t\t"
1213                      "migration for a device. The device's contents are\n\t\t\t"
1214                      "copied to the new image file, including data that\n\t\t\t"
1215                      "is written after the command is started.\n\t\t\t"
1216                      "The -n flag requests QEMU to reuse the image found\n\t\t\t"
1217                      "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
1218                      "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
1219                      "so that the result does not need a backing file.\n\t\t\t",
1220        .cmd        = hmp_drive_mirror,
1221    },
1222STEXI
1223@item drive_mirror
1224@findex drive_mirror
1225Start mirroring a block device's writes to a new destination,
1226using the specified target.
1227ETEXI
1228
1229    {
1230        .name       = "drive_backup",
1231        .args_type  = "reuse:-n,full:-f,compress:-c,device:B,target:s,format:s?",
1232        .params     = "[-n] [-f] [-c] device target [format]",
1233        .help       = "initiates a point-in-time\n\t\t\t"
1234                      "copy for a device. The device's contents are\n\t\t\t"
1235                      "copied to the new image file, excluding data that\n\t\t\t"
1236                      "is written after the command is started.\n\t\t\t"
1237                      "The -n flag requests QEMU to reuse the image found\n\t\t\t"
1238                      "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
1239                      "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
1240                      "so that the result does not need a backing file.\n\t\t\t"
1241                      "The -c flag requests QEMU to compress backup data\n\t\t\t"
1242                      "(if the target format supports it).\n\t\t\t",
1243        .cmd        = hmp_drive_backup,
1244    },
1245STEXI
1246@item drive_backup
1247@findex drive_backup
1248Start a point-in-time copy of a block device to a specificed target.
1249ETEXI
1250
1251    {
1252        .name       = "drive_add",
1253        .args_type  = "node:-n,pci_addr:s,opts:s",
1254        .params     = "[-n] [[<domain>:]<bus>:]<slot>\n"
1255                      "[file=file][,if=type][,bus=n]\n"
1256                      "[,unit=m][,media=d][,index=i]\n"
1257                      "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
1258                      "[,snapshot=on|off][,cache=on|off]\n"
1259                      "[,readonly=on|off][,copy-on-read=on|off]",
1260        .help       = "add drive to PCI storage controller",
1261        .cmd        = hmp_drive_add,
1262    },
1263
1264STEXI
1265@item drive_add
1266@findex drive_add
1267Add drive to PCI storage controller.
1268ETEXI
1269
1270    {
1271        .name       = "pcie_aer_inject_error",
1272        .args_type  = "advisory_non_fatal:-a,correctable:-c,"
1273	              "id:s,error_status:s,"
1274	              "header0:i?,header1:i?,header2:i?,header3:i?,"
1275	              "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
1276        .params     = "[-a] [-c] id "
1277                      "<error_status> [<tlp header> [<tlp header prefix>]]",
1278        .help       = "inject pcie aer error\n\t\t\t"
1279	              " -a for advisory non fatal error\n\t\t\t"
1280	              " -c for correctable error\n\t\t\t"
1281                      "<id> = qdev device id\n\t\t\t"
1282                      "<error_status> = error string or 32bit\n\t\t\t"
1283                      "<tlb header> = 32bit x 4\n\t\t\t"
1284                      "<tlb header prefix> = 32bit x 4",
1285        .cmd        = hmp_pcie_aer_inject_error,
1286    },
1287
1288STEXI
1289@item pcie_aer_inject_error
1290@findex pcie_aer_inject_error
1291Inject PCIe AER error
1292ETEXI
1293
1294    {
1295        .name       = "netdev_add",
1296        .args_type  = "netdev:O",
1297        .params     = "[user|tap|socket|vde|bridge|hubport|netmap|vhost-user],id=str[,prop=value][,...]",
1298        .help       = "add host network device",
1299        .cmd        = hmp_netdev_add,
1300        .command_completion = netdev_add_completion,
1301    },
1302
1303STEXI
1304@item netdev_add
1305@findex netdev_add
1306Add host network device.
1307ETEXI
1308
1309    {
1310        .name       = "netdev_del",
1311        .args_type  = "id:s",
1312        .params     = "id",
1313        .help       = "remove host network device",
1314        .cmd        = hmp_netdev_del,
1315        .command_completion = netdev_del_completion,
1316    },
1317
1318STEXI
1319@item netdev_del
1320@findex netdev_del
1321Remove host network device.
1322ETEXI
1323
1324    {
1325        .name       = "object_add",
1326        .args_type  = "object:O",
1327        .params     = "[qom-type=]type,id=str[,prop=value][,...]",
1328        .help       = "create QOM object",
1329        .cmd        = hmp_object_add,
1330        .command_completion = object_add_completion,
1331    },
1332
1333STEXI
1334@item object_add
1335@findex object_add
1336Create QOM object.
1337ETEXI
1338
1339    {
1340        .name       = "object_del",
1341        .args_type  = "id:s",
1342        .params     = "id",
1343        .help       = "destroy QOM object",
1344        .cmd        = hmp_object_del,
1345        .command_completion = object_del_completion,
1346    },
1347
1348STEXI
1349@item object_del
1350@findex object_del
1351Destroy QOM object.
1352ETEXI
1353
1354#ifdef CONFIG_SLIRP
1355    {
1356        .name       = "hostfwd_add",
1357        .args_type  = "arg1:s,arg2:s?,arg3:s?",
1358        .params     = "[hub_id name]|[netdev_id] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
1359        .help       = "redirect TCP or UDP connections from host to guest (requires -net user)",
1360        .cmd        = hmp_hostfwd_add,
1361    },
1362#endif
1363STEXI
1364@item hostfwd_add
1365@findex hostfwd_add
1366Redirect TCP or UDP connections from host to guest (requires -net user).
1367ETEXI
1368
1369#ifdef CONFIG_SLIRP
1370    {
1371        .name       = "hostfwd_remove",
1372        .args_type  = "arg1:s,arg2:s?,arg3:s?",
1373        .params     = "[hub_id name]|[netdev_id] [tcp|udp]:[hostaddr]:hostport",
1374        .help       = "remove host-to-guest TCP or UDP redirection",
1375        .cmd        = hmp_hostfwd_remove,
1376    },
1377
1378#endif
1379STEXI
1380@item hostfwd_remove
1381@findex hostfwd_remove
1382Remove host-to-guest TCP or UDP redirection.
1383ETEXI
1384
1385    {
1386        .name       = "balloon",
1387        .args_type  = "value:M",
1388        .params     = "target",
1389        .help       = "request VM to change its memory allocation (in MB)",
1390        .cmd        = hmp_balloon,
1391    },
1392
1393STEXI
1394@item balloon @var{value}
1395@findex balloon
1396Request VM to change its memory allocation to @var{value} (in MB).
1397ETEXI
1398
1399    {
1400        .name       = "set_link",
1401        .args_type  = "name:s,up:b",
1402        .params     = "name on|off",
1403        .help       = "change the link status of a network adapter",
1404        .cmd        = hmp_set_link,
1405        .command_completion = set_link_completion,
1406    },
1407
1408STEXI
1409@item set_link @var{name} [on|off]
1410@findex set_link
1411Switch link @var{name} on (i.e. up) or off (i.e. down).
1412ETEXI
1413
1414    {
1415        .name       = "watchdog_action",
1416        .args_type  = "action:s",
1417        .params     = "[reset|shutdown|poweroff|pause|debug|none]",
1418        .help       = "change watchdog action",
1419        .cmd        = hmp_watchdog_action,
1420        .command_completion = watchdog_action_completion,
1421    },
1422
1423STEXI
1424@item watchdog_action
1425@findex watchdog_action
1426Change watchdog action.
1427ETEXI
1428
1429    {
1430        .name       = "acl_show",
1431        .args_type  = "aclname:s",
1432        .params     = "aclname",
1433        .help       = "list rules in the access control list",
1434        .cmd        = hmp_acl_show,
1435    },
1436
1437STEXI
1438@item acl_show @var{aclname}
1439@findex acl_show
1440List all the matching rules in the access control list, and the default
1441policy. There are currently two named access control lists,
1442@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
1443certificate distinguished name, and SASL username respectively.
1444ETEXI
1445
1446    {
1447        .name       = "acl_policy",
1448        .args_type  = "aclname:s,policy:s",
1449        .params     = "aclname allow|deny",
1450        .help       = "set default access control list policy",
1451        .cmd        = hmp_acl_policy,
1452    },
1453
1454STEXI
1455@item acl_policy @var{aclname} @code{allow|deny}
1456@findex acl_policy
1457Set the default access control list policy, used in the event that
1458none of the explicit rules match. The default policy at startup is
1459always @code{deny}.
1460ETEXI
1461
1462    {
1463        .name       = "acl_add",
1464        .args_type  = "aclname:s,match:s,policy:s,index:i?",
1465        .params     = "aclname match allow|deny [index]",
1466        .help       = "add a match rule to the access control list",
1467        .cmd        = hmp_acl_add,
1468    },
1469
1470STEXI
1471@item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
1472@findex acl_add
1473Add a match rule to the access control list, allowing or denying access.
1474The match will normally be an exact username or x509 distinguished name,
1475but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
1476allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
1477normally be appended to the end of the ACL, but can be inserted
1478earlier in the list if the optional @var{index} parameter is supplied.
1479ETEXI
1480
1481    {
1482        .name       = "acl_remove",
1483        .args_type  = "aclname:s,match:s",
1484        .params     = "aclname match",
1485        .help       = "remove a match rule from the access control list",
1486        .cmd        = hmp_acl_remove,
1487    },
1488
1489STEXI
1490@item acl_remove @var{aclname} @var{match}
1491@findex acl_remove
1492Remove the specified match rule from the access control list.
1493ETEXI
1494
1495    {
1496        .name       = "acl_reset",
1497        .args_type  = "aclname:s",
1498        .params     = "aclname",
1499        .help       = "reset the access control list",
1500        .cmd        = hmp_acl_reset,
1501    },
1502
1503STEXI
1504@item acl_reset @var{aclname}
1505@findex acl_reset
1506Remove all matches from the access control list, and set the default
1507policy back to @code{deny}.
1508ETEXI
1509
1510    {
1511        .name       = "nbd_server_start",
1512        .args_type  = "all:-a,writable:-w,uri:s",
1513        .params     = "nbd_server_start [-a] [-w] host:port",
1514        .help       = "serve block devices on the given host and port",
1515        .cmd        = hmp_nbd_server_start,
1516    },
1517STEXI
1518@item nbd_server_start @var{host}:@var{port}
1519@findex nbd_server_start
1520Start an NBD server on the given host and/or port.  If the @option{-a}
1521option is included, all of the virtual machine's block devices that
1522have an inserted media on them are automatically exported; in this case,
1523the @option{-w} option makes the devices writable too.
1524ETEXI
1525
1526    {
1527        .name       = "nbd_server_add",
1528        .args_type  = "writable:-w,device:B,name:s?",
1529        .params     = "nbd_server_add [-w] device [name]",
1530        .help       = "export a block device via NBD",
1531        .cmd        = hmp_nbd_server_add,
1532    },
1533STEXI
1534@item nbd_server_add @var{device} [ @var{name} ]
1535@findex nbd_server_add
1536Export a block device through QEMU's NBD server, which must be started
1537beforehand with @command{nbd_server_start}.  The @option{-w} option makes the
1538exported device writable too.  The export name is controlled by @var{name},
1539defaulting to @var{device}.
1540ETEXI
1541
1542    {
1543        .name       = "nbd_server_remove",
1544        .args_type  = "force:-f,name:s",
1545        .params     = "nbd_server_remove [-f] name",
1546        .help       = "remove an export previously exposed via NBD",
1547        .cmd        = hmp_nbd_server_remove,
1548    },
1549STEXI
1550@item nbd_server_remove [-f] @var{name}
1551@findex nbd_server_remove
1552Stop exporting a block device through QEMU's NBD server, which was
1553previously started with @command{nbd_server_add}.  The @option{-f}
1554option forces the server to drop the export immediately even if
1555clients are connected; otherwise the command fails unless there are no
1556clients.
1557ETEXI
1558
1559    {
1560        .name       = "nbd_server_stop",
1561        .args_type  = "",
1562        .params     = "nbd_server_stop",
1563        .help       = "stop serving block devices using the NBD protocol",
1564        .cmd        = hmp_nbd_server_stop,
1565    },
1566STEXI
1567@item nbd_server_stop
1568@findex nbd_server_stop
1569Stop the QEMU embedded NBD server.
1570ETEXI
1571
1572
1573#if defined(TARGET_I386)
1574
1575    {
1576        .name       = "mce",
1577        .args_type  = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
1578        .params     = "[-b] cpu bank status mcgstatus addr misc",
1579        .help       = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
1580        .cmd        = hmp_mce,
1581    },
1582
1583#endif
1584STEXI
1585@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
1586@findex mce (x86)
1587Inject an MCE on the given CPU (x86 only).
1588ETEXI
1589
1590    {
1591        .name       = "getfd",
1592        .args_type  = "fdname:s",
1593        .params     = "getfd name",
1594        .help       = "receive a file descriptor via SCM rights and assign it a name",
1595        .cmd        = hmp_getfd,
1596    },
1597
1598STEXI
1599@item getfd @var{fdname}
1600@findex getfd
1601If a file descriptor is passed alongside this command using the SCM_RIGHTS
1602mechanism on unix sockets, it is stored using the name @var{fdname} for
1603later use by other monitor commands.
1604ETEXI
1605
1606    {
1607        .name       = "closefd",
1608        .args_type  = "fdname:s",
1609        .params     = "closefd name",
1610        .help       = "close a file descriptor previously passed via SCM rights",
1611        .cmd        = hmp_closefd,
1612    },
1613
1614STEXI
1615@item closefd @var{fdname}
1616@findex closefd
1617Close the file descriptor previously assigned to @var{fdname} using the
1618@code{getfd} command. This is only needed if the file descriptor was never
1619used by another monitor command.
1620ETEXI
1621
1622    {
1623        .name       = "block_passwd",
1624        .args_type  = "device:B,password:s",
1625        .params     = "block_passwd device password",
1626        .help       = "set the password of encrypted block devices",
1627        .cmd        = hmp_block_passwd,
1628    },
1629
1630STEXI
1631@item block_passwd @var{device} @var{password}
1632@findex block_passwd
1633Set the encrypted device @var{device} password to @var{password}
1634
1635This command is now obsolete and will always return an error since 2.10
1636ETEXI
1637
1638    {
1639        .name       = "block_set_io_throttle",
1640        .args_type  = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
1641        .params     = "device bps bps_rd bps_wr iops iops_rd iops_wr",
1642        .help       = "change I/O throttle limits for a block drive",
1643        .cmd        = hmp_block_set_io_throttle,
1644    },
1645
1646STEXI
1647@item block_set_io_throttle @var{device} @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}
1648@findex block_set_io_throttle
1649Change 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}
1650ETEXI
1651
1652    {
1653        .name       = "set_password",
1654        .args_type  = "protocol:s,password:s,connected:s?",
1655        .params     = "protocol password action-if-connected",
1656        .help       = "set spice/vnc password",
1657        .cmd        = hmp_set_password,
1658    },
1659
1660STEXI
1661@item set_password [ vnc | spice ] password [ action-if-connected ]
1662@findex set_password
1663Change spice/vnc password.  Use zero to make the password stay valid
1664forever.  @var{action-if-connected} specifies what should happen in
1665case a connection is established: @var{fail} makes the password change
1666fail.  @var{disconnect} changes the password and disconnects the
1667client.  @var{keep} changes the password and keeps the connection up.
1668@var{keep} is the default.
1669ETEXI
1670
1671    {
1672        .name       = "expire_password",
1673        .args_type  = "protocol:s,time:s",
1674        .params     = "protocol time",
1675        .help       = "set spice/vnc password expire-time",
1676        .cmd        = hmp_expire_password,
1677    },
1678
1679STEXI
1680@item expire_password [ vnc | spice ] expire-time
1681@findex expire_password
1682Specify when a password for spice/vnc becomes
1683invalid. @var{expire-time} accepts:
1684
1685@table @var
1686@item now
1687Invalidate password instantly.
1688
1689@item never
1690Password stays valid forever.
1691
1692@item +nsec
1693Password stays valid for @var{nsec} seconds starting now.
1694
1695@item nsec
1696Password is invalidated at the given time.  @var{nsec} are the seconds
1697passed since 1970, i.e. unix epoch.
1698
1699@end table
1700ETEXI
1701
1702    {
1703        .name       = "chardev-add",
1704        .args_type  = "args:s",
1705        .params     = "args",
1706        .help       = "add chardev",
1707        .cmd        = hmp_chardev_add,
1708        .command_completion = chardev_add_completion,
1709    },
1710
1711STEXI
1712@item chardev-add args
1713@findex chardev-add
1714chardev-add accepts the same parameters as the -chardev command line switch.
1715
1716ETEXI
1717
1718    {
1719        .name       = "chardev-change",
1720        .args_type  = "id:s,args:s",
1721        .params     = "id args",
1722        .help       = "change chardev",
1723        .cmd        = hmp_chardev_change,
1724    },
1725
1726STEXI
1727@item chardev-change args
1728@findex chardev-change
1729chardev-change accepts existing chardev @var{id} and then the same arguments
1730as the -chardev command line switch (except for "id").
1731
1732ETEXI
1733
1734    {
1735        .name       = "chardev-remove",
1736        .args_type  = "id:s",
1737        .params     = "id",
1738        .help       = "remove chardev",
1739        .cmd        = hmp_chardev_remove,
1740        .command_completion = chardev_remove_completion,
1741    },
1742
1743STEXI
1744@item chardev-remove id
1745@findex chardev-remove
1746Removes the chardev @var{id}.
1747
1748ETEXI
1749
1750    {
1751        .name       = "chardev-send-break",
1752        .args_type  = "id:s",
1753        .params     = "id",
1754        .help       = "send a break on chardev",
1755        .cmd        = hmp_chardev_send_break,
1756        .command_completion = chardev_remove_completion,
1757    },
1758
1759STEXI
1760@item chardev-send-break id
1761@findex chardev-send-break
1762Send a break on the chardev @var{id}.
1763
1764ETEXI
1765
1766    {
1767        .name       = "qemu-io",
1768        .args_type  = "device:B,command:s",
1769        .params     = "[device] \"[command]\"",
1770        .help       = "run a qemu-io command on a block device",
1771        .cmd        = hmp_qemu_io,
1772    },
1773
1774STEXI
1775@item qemu-io @var{device} @var{command}
1776@findex qemu-io
1777Executes a qemu-io command on the given block device.
1778
1779ETEXI
1780
1781    {
1782        .name       = "cpu-add",
1783        .args_type  = "id:i",
1784        .params     = "id",
1785        .help       = "add cpu",
1786        .cmd        = hmp_cpu_add,
1787    },
1788
1789STEXI
1790@item cpu-add @var{id}
1791@findex cpu-add
1792Add CPU with id @var{id}
1793ETEXI
1794
1795    {
1796        .name       = "qom-list",
1797        .args_type  = "path:s?",
1798        .params     = "path",
1799        .help       = "list QOM properties",
1800        .cmd        = hmp_qom_list,
1801    },
1802
1803STEXI
1804@item qom-list [@var{path}]
1805Print QOM properties of object at location @var{path}
1806ETEXI
1807
1808    {
1809        .name       = "qom-set",
1810        .args_type  = "path:s,property:s,value:s",
1811        .params     = "path property value",
1812        .help       = "set QOM property",
1813        .cmd        = hmp_qom_set,
1814    },
1815
1816STEXI
1817@item qom-set @var{path} @var{property} @var{value}
1818Set QOM property @var{property} of object at location @var{path} to value @var{value}
1819ETEXI
1820
1821    {
1822        .name       = "info",
1823        .args_type  = "item:s?",
1824        .params     = "[subcommand]",
1825        .help       = "show various information about the system state",
1826        .cmd        = hmp_info_help,
1827        .sub_table  = info_cmds,
1828    },
1829
1830STEXI
1831@end table
1832ETEXI
1833