blkdebug: process all set_state rules in the old state
[qemu/ar7.git] / hmp-commands.hx
blob27d90a24af7a49c3189508f9c64987d946b9c486
1 HXCOMM Use DEFHEADING() to define headings in both help text and texi
2 HXCOMM Text between STEXI and ETEXI are copied to texi version and
3 HXCOMM discarded from C version
4 HXCOMM DEF(command, args, callback, arg_string, help) is used to construct
5 HXCOMM monitor commands
6 HXCOMM HXCOMM can be used for comments, discarded from both texi and C
8 STEXI
9 @table @option
10 ETEXI
13 .name = "help|?",
14 .args_type = "name:s?",
15 .params = "[cmd]",
16 .help = "show the help",
17 .mhandler.cmd = do_help_cmd,
20 STEXI
21 @item help or ? [@var{cmd}]
22 @findex help
23 Show the help for all commands or just for command @var{cmd}.
24 ETEXI
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 .mhandler.cmd = do_commit,
34 STEXI
35 @item commit
36 @findex commit
37 Commit changes to the disk images (if -snapshot is used) or backing files.
38 ETEXI
41 .name = "q|quit",
42 .args_type = "",
43 .params = "",
44 .help = "quit the emulator",
45 .user_print = monitor_user_noop,
46 .mhandler.cmd = hmp_quit,
49 STEXI
50 @item q or quit
51 @findex quit
52 Quit the emulator.
53 ETEXI
56 .name = "block_resize",
57 .args_type = "device:B,size:o",
58 .params = "device size",
59 .help = "resize a block image",
60 .mhandler.cmd = hmp_block_resize,
63 STEXI
64 @item block_resize
65 @findex block_resize
66 Resize a block image while a guest is running. Usually requires guest
67 action to see the updated size. Resize to a lower size is supported,
68 but should be used with extreme caution. Note that this command only
69 resizes image files, it can not resize block devices like LVM volumes.
70 ETEXI
73 .name = "block_stream",
74 .args_type = "device:B,speed:o?,base:s?",
75 .params = "device [speed [base]]",
76 .help = "copy data from a backing file into a block device",
77 .mhandler.cmd = hmp_block_stream,
80 STEXI
81 @item block_stream
82 @findex block_stream
83 Copy data from a backing file into a block device.
84 ETEXI
87 .name = "block_job_set_speed",
88 .args_type = "device:B,speed:o",
89 .params = "device speed",
90 .help = "set maximum speed for a background block operation",
91 .mhandler.cmd = hmp_block_job_set_speed,
94 STEXI
95 @item block_job_set_speed
96 @findex block_job_set_speed
97 Set maximum speed for a background block operation.
98 ETEXI
101 .name = "block_job_cancel",
102 .args_type = "force:-f,device:B",
103 .params = "[-f] device",
104 .help = "stop an active background block operation (use -f"
105 "\n\t\t\t if the operation is currently paused)",
106 .mhandler.cmd = hmp_block_job_cancel,
109 STEXI
110 @item block_job_cancel
111 @findex block_job_cancel
112 Stop an active block streaming operation.
113 ETEXI
116 .name = "block_job_pause",
117 .args_type = "device:B",
118 .params = "device",
119 .help = "pause an active background block operation",
120 .mhandler.cmd = hmp_block_job_pause,
123 STEXI
124 @item block_job_pause
125 @findex block_job_pause
126 Pause an active block streaming operation.
127 ETEXI
130 .name = "block_job_resume",
131 .args_type = "device:B",
132 .params = "device",
133 .help = "resume a paused background block operation",
134 .mhandler.cmd = hmp_block_job_resume,
137 STEXI
138 @item block_job_resume
139 @findex block_job_resume
140 Resume a paused block streaming operation.
141 ETEXI
144 .name = "eject",
145 .args_type = "force:-f,device:B",
146 .params = "[-f] device",
147 .help = "eject a removable medium (use -f to force it)",
148 .mhandler.cmd = hmp_eject,
151 STEXI
152 @item eject [-f] @var{device}
153 @findex eject
154 Eject a removable medium (use -f to force it).
155 ETEXI
158 .name = "drive_del",
159 .args_type = "id:s",
160 .params = "device",
161 .help = "remove host block device",
162 .user_print = monitor_user_noop,
163 .mhandler.cmd_new = do_drive_del,
166 STEXI
167 @item drive_del @var{device}
168 @findex drive_del
169 Remove host block device. The result is that guest generated IO is no longer
170 submitted against the host device underlying the disk. Once a drive has
171 been deleted, the QEMU Block layer returns -EIO which results in IO
172 errors in the guest for applications that are reading/writing to the device.
173 ETEXI
176 .name = "change",
177 .args_type = "device:B,target:F,arg:s?",
178 .params = "device filename [format]",
179 .help = "change a removable medium, optional format",
180 .mhandler.cmd = hmp_change,
183 STEXI
184 @item change @var{device} @var{setting}
185 @findex change
187 Change the configuration of a device.
189 @table @option
190 @item change @var{diskdevice} @var{filename} [@var{format}]
191 Change the medium for a removable disk device to point to @var{filename}. eg
193 @example
194 (qemu) change ide1-cd0 /path/to/some.iso
195 @end example
197 @var{format} is optional.
199 @item change vnc @var{display},@var{options}
200 Change the configuration of the VNC server. The valid syntax for @var{display}
201 and @var{options} are described at @ref{sec_invocation}. eg
203 @example
204 (qemu) change vnc localhost:1
205 @end example
207 @item change vnc password [@var{password}]
209 Change the password associated with the VNC server. If the new password is not
210 supplied, the monitor will prompt for it to be entered. VNC passwords are only
211 significant up to 8 letters. eg
213 @example
214 (qemu) change vnc password
215 Password: ********
216 @end example
218 @end table
219 ETEXI
222 .name = "screendump",
223 .args_type = "filename:F",
224 .params = "filename",
225 .help = "save screen into PPM image 'filename'",
226 .mhandler.cmd = hmp_screen_dump,
229 STEXI
230 @item screendump @var{filename}
231 @findex screendump
232 Save screen into PPM image @var{filename}.
233 ETEXI
236 .name = "logfile",
237 .args_type = "filename:F",
238 .params = "filename",
239 .help = "output logs to 'filename'",
240 .mhandler.cmd = do_logfile,
243 STEXI
244 @item logfile @var{filename}
245 @findex logfile
246 Output logs to @var{filename}.
247 ETEXI
250 .name = "trace-event",
251 .args_type = "name:s,option:b",
252 .params = "name on|off",
253 .help = "changes status of a specific trace event",
254 .mhandler.cmd = do_trace_event_set_state,
257 STEXI
258 @item trace-event
259 @findex trace-event
260 changes status of a trace event
261 ETEXI
263 #if defined(CONFIG_TRACE_SIMPLE)
265 .name = "trace-file",
266 .args_type = "op:s?,arg:F?",
267 .params = "on|off|flush|set [arg]",
268 .help = "open, close, or flush trace file, or set a new file name",
269 .mhandler.cmd = do_trace_file,
272 STEXI
273 @item trace-file on|off|flush
274 @findex trace-file
275 Open, close, or flush the trace file. If no argument is given, the status of the trace file is displayed.
276 ETEXI
277 #endif
280 .name = "log",
281 .args_type = "items:s",
282 .params = "item1[,...]",
283 .help = "activate logging of the specified items to '/tmp/qemu.log'",
284 .mhandler.cmd = do_log,
287 STEXI
288 @item log @var{item1}[,...]
289 @findex log
290 Activate logging of the specified items to @file{/tmp/qemu.log}.
291 ETEXI
294 .name = "savevm",
295 .args_type = "name:s?",
296 .params = "[tag|id]",
297 .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
298 .mhandler.cmd = do_savevm,
301 STEXI
302 @item savevm [@var{tag}|@var{id}]
303 @findex savevm
304 Create a snapshot of the whole virtual machine. If @var{tag} is
305 provided, it is used as human readable identifier. If there is already
306 a snapshot with the same tag or ID, it is replaced. More info at
307 @ref{vm_snapshots}.
308 ETEXI
311 .name = "loadvm",
312 .args_type = "name:s",
313 .params = "tag|id",
314 .help = "restore a VM snapshot from its tag or id",
315 .mhandler.cmd = do_loadvm,
318 STEXI
319 @item loadvm @var{tag}|@var{id}
320 @findex loadvm
321 Set the whole virtual machine to the snapshot identified by the tag
322 @var{tag} or the unique snapshot ID @var{id}.
323 ETEXI
326 .name = "delvm",
327 .args_type = "name:s",
328 .params = "tag|id",
329 .help = "delete a VM snapshot from its tag or id",
330 .mhandler.cmd = do_delvm,
333 STEXI
334 @item delvm @var{tag}|@var{id}
335 @findex delvm
336 Delete the snapshot identified by @var{tag} or @var{id}.
337 ETEXI
340 .name = "singlestep",
341 .args_type = "option:s?",
342 .params = "[on|off]",
343 .help = "run emulation in singlestep mode or switch to normal mode",
344 .mhandler.cmd = do_singlestep,
347 STEXI
348 @item singlestep [off]
349 @findex singlestep
350 Run the emulation in single step mode.
351 If called with option off, the emulation returns to normal mode.
352 ETEXI
355 .name = "stop",
356 .args_type = "",
357 .params = "",
358 .help = "stop emulation",
359 .mhandler.cmd = hmp_stop,
362 STEXI
363 @item stop
364 @findex stop
365 Stop emulation.
366 ETEXI
369 .name = "c|cont",
370 .args_type = "",
371 .params = "",
372 .help = "resume emulation",
373 .mhandler.cmd = hmp_cont,
376 STEXI
377 @item c or cont
378 @findex cont
379 Resume emulation.
380 ETEXI
383 .name = "system_wakeup",
384 .args_type = "",
385 .params = "",
386 .help = "wakeup guest from suspend",
387 .mhandler.cmd = hmp_system_wakeup,
390 STEXI
391 @item system_wakeup
392 @findex system_wakeup
393 Wakeup guest from suspend.
394 ETEXI
397 .name = "gdbserver",
398 .args_type = "device:s?",
399 .params = "[device]",
400 .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
401 .mhandler.cmd = do_gdbserver,
404 STEXI
405 @item gdbserver [@var{port}]
406 @findex gdbserver
407 Start gdbserver session (default @var{port}=1234)
408 ETEXI
411 .name = "x",
412 .args_type = "fmt:/,addr:l",
413 .params = "/fmt addr",
414 .help = "virtual memory dump starting at 'addr'",
415 .mhandler.cmd = do_memory_dump,
418 STEXI
419 @item x/fmt @var{addr}
420 @findex x
421 Virtual memory dump starting at @var{addr}.
422 ETEXI
425 .name = "xp",
426 .args_type = "fmt:/,addr:l",
427 .params = "/fmt addr",
428 .help = "physical memory dump starting at 'addr'",
429 .mhandler.cmd = do_physical_memory_dump,
432 STEXI
433 @item xp /@var{fmt} @var{addr}
434 @findex xp
435 Physical memory dump starting at @var{addr}.
437 @var{fmt} is a format which tells the command how to format the
438 data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
440 @table @var
441 @item count
442 is the number of items to be dumped.
444 @item format
445 can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
446 c (char) or i (asm instruction).
448 @item size
449 can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
450 @code{h} or @code{w} can be specified with the @code{i} format to
451 respectively select 16 or 32 bit code instruction size.
453 @end table
455 Examples:
456 @itemize
457 @item
458 Dump 10 instructions at the current instruction pointer:
459 @example
460 (qemu) x/10i $eip
461 0x90107063: ret
462 0x90107064: sti
463 0x90107065: lea 0x0(%esi,1),%esi
464 0x90107069: lea 0x0(%edi,1),%edi
465 0x90107070: ret
466 0x90107071: jmp 0x90107080
467 0x90107073: nop
468 0x90107074: nop
469 0x90107075: nop
470 0x90107076: nop
471 @end example
473 @item
474 Dump 80 16 bit values at the start of the video memory.
475 @smallexample
476 (qemu) xp/80hx 0xb8000
477 0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
478 0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
479 0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
480 0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
481 0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
482 0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
483 0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
484 0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
485 0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
486 0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
487 @end smallexample
488 @end itemize
489 ETEXI
492 .name = "p|print",
493 .args_type = "fmt:/,val:l",
494 .params = "/fmt expr",
495 .help = "print expression value (use $reg for CPU register access)",
496 .mhandler.cmd = do_print,
499 STEXI
500 @item p or print/@var{fmt} @var{expr}
501 @findex print
503 Print expression value. Only the @var{format} part of @var{fmt} is
504 used.
505 ETEXI
508 .name = "i",
509 .args_type = "fmt:/,addr:i,index:i.",
510 .params = "/fmt addr",
511 .help = "I/O port read",
512 .mhandler.cmd = do_ioport_read,
515 STEXI
516 Read I/O port.
517 ETEXI
520 .name = "o",
521 .args_type = "fmt:/,addr:i,val:i",
522 .params = "/fmt addr value",
523 .help = "I/O port write",
524 .mhandler.cmd = do_ioport_write,
527 STEXI
528 Write to I/O port.
529 ETEXI
532 .name = "sendkey",
533 .args_type = "keys:s,hold-time:i?",
534 .params = "keys [hold_ms]",
535 .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
536 .mhandler.cmd = hmp_send_key,
539 STEXI
540 @item sendkey @var{keys}
541 @findex sendkey
543 Send @var{keys} to the guest. @var{keys} could be the name of the
544 key or the raw value in hexadecimal format. Use @code{-} to press
545 several keys simultaneously. Example:
546 @example
547 sendkey ctrl-alt-f1
548 @end example
550 This command is useful to send keys that your graphical user interface
551 intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
552 ETEXI
555 .name = "system_reset",
556 .args_type = "",
557 .params = "",
558 .help = "reset the system",
559 .mhandler.cmd = hmp_system_reset,
562 STEXI
563 @item system_reset
564 @findex system_reset
566 Reset the system.
567 ETEXI
570 .name = "system_powerdown",
571 .args_type = "",
572 .params = "",
573 .help = "send system power down event",
574 .mhandler.cmd = hmp_system_powerdown,
577 STEXI
578 @item system_powerdown
579 @findex system_powerdown
581 Power down the system (if supported).
582 ETEXI
585 .name = "sum",
586 .args_type = "start:i,size:i",
587 .params = "addr size",
588 .help = "compute the checksum of a memory region",
589 .mhandler.cmd = do_sum,
592 STEXI
593 @item sum @var{addr} @var{size}
594 @findex sum
596 Compute the checksum of a memory region.
597 ETEXI
600 .name = "usb_add",
601 .args_type = "devname:s",
602 .params = "device",
603 .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
604 .mhandler.cmd = do_usb_add,
607 STEXI
608 @item usb_add @var{devname}
609 @findex usb_add
611 Add the USB device @var{devname}. For details of available devices see
612 @ref{usb_devices}
613 ETEXI
616 .name = "usb_del",
617 .args_type = "devname:s",
618 .params = "device",
619 .help = "remove USB device 'bus.addr'",
620 .mhandler.cmd = do_usb_del,
623 STEXI
624 @item usb_del @var{devname}
625 @findex usb_del
627 Remove the USB device @var{devname} from the QEMU virtual USB
628 hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
629 command @code{info usb} to see the devices you can remove.
630 ETEXI
633 .name = "device_add",
634 .args_type = "device:O",
635 .params = "driver[,prop=value][,...]",
636 .help = "add device, like -device on the command line",
637 .user_print = monitor_user_noop,
638 .mhandler.cmd_new = do_device_add,
641 STEXI
642 @item device_add @var{config}
643 @findex device_add
645 Add device.
646 ETEXI
649 .name = "device_del",
650 .args_type = "id:s",
651 .params = "device",
652 .help = "remove device",
653 .mhandler.cmd = hmp_device_del,
656 STEXI
657 @item device_del @var{id}
658 @findex device_del
660 Remove device @var{id}.
661 ETEXI
664 .name = "cpu",
665 .args_type = "index:i",
666 .params = "index",
667 .help = "set the default CPU",
668 .mhandler.cmd = hmp_cpu,
671 STEXI
672 @item cpu @var{index}
673 @findex cpu
674 Set the default CPU.
675 ETEXI
678 .name = "mouse_move",
679 .args_type = "dx_str:s,dy_str:s,dz_str:s?",
680 .params = "dx dy [dz]",
681 .help = "send mouse move events",
682 .mhandler.cmd = do_mouse_move,
685 STEXI
686 @item mouse_move @var{dx} @var{dy} [@var{dz}]
687 @findex mouse_move
688 Move the active mouse to the specified coordinates @var{dx} @var{dy}
689 with optional scroll axis @var{dz}.
690 ETEXI
693 .name = "mouse_button",
694 .args_type = "button_state:i",
695 .params = "state",
696 .help = "change mouse button state (1=L, 2=M, 4=R)",
697 .mhandler.cmd = do_mouse_button,
700 STEXI
701 @item mouse_button @var{val}
702 @findex mouse_button
703 Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
704 ETEXI
707 .name = "mouse_set",
708 .args_type = "index:i",
709 .params = "index",
710 .help = "set which mouse device receives events",
711 .mhandler.cmd = do_mouse_set,
714 STEXI
715 @item mouse_set @var{index}
716 @findex mouse_set
717 Set which mouse device receives events at given @var{index}, index
718 can be obtained with
719 @example
720 info mice
721 @end example
722 ETEXI
724 #ifdef HAS_AUDIO
726 .name = "wavcapture",
727 .args_type = "path:F,freq:i?,bits:i?,nchannels:i?",
728 .params = "path [frequency [bits [channels]]]",
729 .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
730 .mhandler.cmd = do_wav_capture,
732 #endif
733 STEXI
734 @item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
735 @findex wavcapture
736 Capture audio into @var{filename}. Using sample rate @var{frequency}
737 bits per sample @var{bits} and number of channels @var{channels}.
739 Defaults:
740 @itemize @minus
741 @item Sample rate = 44100 Hz - CD quality
742 @item Bits = 16
743 @item Number of channels = 2 - Stereo
744 @end itemize
745 ETEXI
747 #ifdef HAS_AUDIO
749 .name = "stopcapture",
750 .args_type = "n:i",
751 .params = "capture index",
752 .help = "stop capture",
753 .mhandler.cmd = do_stop_capture,
755 #endif
756 STEXI
757 @item stopcapture @var{index}
758 @findex stopcapture
759 Stop capture with a given @var{index}, index can be obtained with
760 @example
761 info capture
762 @end example
763 ETEXI
766 .name = "memsave",
767 .args_type = "val:l,size:i,filename:s",
768 .params = "addr size file",
769 .help = "save to disk virtual memory dump starting at 'addr' of size 'size'",
770 .mhandler.cmd = hmp_memsave,
773 STEXI
774 @item memsave @var{addr} @var{size} @var{file}
775 @findex memsave
776 save to disk virtual memory dump starting at @var{addr} of size @var{size}.
777 ETEXI
780 .name = "pmemsave",
781 .args_type = "val:l,size:i,filename:s",
782 .params = "addr size file",
783 .help = "save to disk physical memory dump starting at 'addr' of size 'size'",
784 .mhandler.cmd = hmp_pmemsave,
787 STEXI
788 @item pmemsave @var{addr} @var{size} @var{file}
789 @findex pmemsave
790 save to disk physical memory dump starting at @var{addr} of size @var{size}.
791 ETEXI
794 .name = "boot_set",
795 .args_type = "bootdevice:s",
796 .params = "bootdevice",
797 .help = "define new values for the boot device list",
798 .mhandler.cmd = do_boot_set,
801 STEXI
802 @item boot_set @var{bootdevicelist}
803 @findex boot_set
805 Define new values for the boot device list. Those values will override
806 the values specified on the command line through the @code{-boot} option.
808 The values that can be specified here depend on the machine type, but are
809 the same that can be specified in the @code{-boot} command line option.
810 ETEXI
812 #if defined(TARGET_I386)
814 .name = "nmi",
815 .args_type = "",
816 .params = "",
817 .help = "inject an NMI on all guest's CPUs",
818 .mhandler.cmd = hmp_inject_nmi,
820 #endif
821 STEXI
822 @item nmi @var{cpu}
823 @findex nmi
824 Inject an NMI on the given CPU (x86 only).
825 ETEXI
828 .name = "migrate",
829 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
830 .params = "[-d] [-b] [-i] uri",
831 .help = "migrate to URI (using -d to not wait for completion)"
832 "\n\t\t\t -b for migration without shared storage with"
833 " full copy of disk\n\t\t\t -i for migration without "
834 "shared storage with incremental copy of disk "
835 "(base image shared between src and destination)",
836 .mhandler.cmd = hmp_migrate,
840 STEXI
841 @item migrate [-d] [-b] [-i] @var{uri}
842 @findex migrate
843 Migrate to @var{uri} (using -d to not wait for completion).
844 -b for migration with full copy of disk
845 -i for migration with incremental copy of disk (base image is shared)
846 ETEXI
849 .name = "migrate_cancel",
850 .args_type = "",
851 .params = "",
852 .help = "cancel the current VM migration",
853 .mhandler.cmd = hmp_migrate_cancel,
856 STEXI
857 @item migrate_cancel
858 @findex migrate_cancel
859 Cancel the current VM migration.
861 ETEXI
864 .name = "migrate_set_cache_size",
865 .args_type = "value:o",
866 .params = "value",
867 .help = "set cache size (in bytes) for XBZRLE migrations,"
868 "the cache size will be rounded down to the nearest "
869 "power of 2.\n"
870 "The cache size affects the number of cache misses."
871 "In case of a high cache miss ratio you need to increase"
872 " the cache size",
873 .mhandler.cmd = hmp_migrate_set_cache_size,
876 STEXI
877 @item migrate_set_cache_size @var{value}
878 @findex migrate_set_cache_size
879 Set cache size to @var{value} (in bytes) for xbzrle migrations.
880 ETEXI
883 .name = "migrate_set_speed",
884 .args_type = "value:o",
885 .params = "value",
886 .help = "set maximum speed (in bytes) for migrations. "
887 "Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
888 .mhandler.cmd = hmp_migrate_set_speed,
891 STEXI
892 @item migrate_set_speed @var{value}
893 @findex migrate_set_speed
894 Set maximum speed to @var{value} (in bytes) for migrations.
895 ETEXI
898 .name = "migrate_set_downtime",
899 .args_type = "value:T",
900 .params = "value",
901 .help = "set maximum tolerated downtime (in seconds) for migrations",
902 .mhandler.cmd = hmp_migrate_set_downtime,
905 STEXI
906 @item migrate_set_downtime @var{second}
907 @findex migrate_set_downtime
908 Set maximum tolerated downtime (in seconds) for migration.
909 ETEXI
912 .name = "migrate_set_capability",
913 .args_type = "capability:s,state:b",
914 .params = "capability state",
915 .help = "Enable/Disable the usage of a capability for migration",
916 .mhandler.cmd = hmp_migrate_set_capability,
919 STEXI
920 @item migrate_set_capability @var{capability} @var{state}
921 @findex migrate_set_capability
922 Enable/Disable the usage of a capability @var{capability} for migration.
923 ETEXI
926 .name = "client_migrate_info",
927 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
928 .params = "protocol hostname port tls-port cert-subject",
929 .help = "send migration info to spice/vnc client",
930 .user_print = monitor_user_noop,
931 .mhandler.cmd_async = client_migrate_info,
932 .flags = MONITOR_CMD_ASYNC,
935 STEXI
936 @item client_migrate_info @var{protocol} @var{hostname} @var{port} @var{tls-port} @var{cert-subject}
937 @findex client_migrate_info
938 Set the spice/vnc connection info for the migration target. The spice/vnc
939 server will ask the spice/vnc client to automatically reconnect using the
940 new parameters (if specified) once the vm migration finished successfully.
941 ETEXI
943 #if defined(CONFIG_HAVE_CORE_DUMP)
945 .name = "dump-guest-memory",
946 .args_type = "paging:-p,protocol:s,begin:i?,length:i?",
947 .params = "[-p] protocol [begin] [length]",
948 .help = "dump guest memory to file"
949 "\n\t\t\t begin(optional): the starting physical address"
950 "\n\t\t\t length(optional): the memory size, in bytes",
951 .user_print = monitor_user_noop,
952 .mhandler.cmd = hmp_dump_guest_memory,
956 STEXI
957 @item dump-guest-memory [-p] @var{protocol} @var{begin} @var{length}
958 @findex dump-guest-memory
959 Dump guest memory to @var{protocol}. The file can be processed with crash or
960 gdb.
961 protocol: destination file(started with "file:") or destination file
962 descriptor (started with "fd:")
963 paging: do paging to get guest's memory mapping
964 begin: the starting physical address. It's optional, and should be
965 specified with length together.
966 length: the memory size, in bytes. It's optional, and should be specified
967 with begin together.
968 ETEXI
969 #endif
972 .name = "snapshot_blkdev",
973 .args_type = "reuse:-n,device:B,snapshot-file:s?,format:s?",
974 .params = "[-n] device [new-image-file] [format]",
975 .help = "initiates a live snapshot\n\t\t\t"
976 "of device. If a new image file is specified, the\n\t\t\t"
977 "new image file will become the new root image.\n\t\t\t"
978 "If format is specified, the snapshot file will\n\t\t\t"
979 "be created in that format. Otherwise the\n\t\t\t"
980 "snapshot will be internal! (currently unsupported).\n\t\t\t"
981 "The default format is qcow2. The -n flag requests QEMU\n\t\t\t"
982 "to reuse the image found in new-image-file, instead of\n\t\t\t"
983 "recreating it from scratch.",
984 .mhandler.cmd = hmp_snapshot_blkdev,
987 STEXI
988 @item snapshot_blkdev
989 @findex snapshot_blkdev
990 Snapshot device, using snapshot file as target if provided
991 ETEXI
994 .name = "drive_add",
995 .args_type = "pci_addr:s,opts:s",
996 .params = "[[<domain>:]<bus>:]<slot>\n"
997 "[file=file][,if=type][,bus=n]\n"
998 "[,unit=m][,media=d][,index=i]\n"
999 "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
1000 "[,snapshot=on|off][,cache=on|off]\n"
1001 "[,readonly=on|off][,copy-on-read=on|off]",
1002 .help = "add drive to PCI storage controller",
1003 .mhandler.cmd = drive_hot_add,
1006 STEXI
1007 @item drive_add
1008 @findex drive_add
1009 Add drive to PCI storage controller.
1010 ETEXI
1012 #if defined(TARGET_I386)
1014 .name = "pci_add",
1015 .args_type = "pci_addr:s,type:s,opts:s?",
1016 .params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
1017 .help = "hot-add PCI device",
1018 .mhandler.cmd = pci_device_hot_add,
1020 #endif
1022 STEXI
1023 @item pci_add
1024 @findex pci_add
1025 Hot-add PCI device.
1026 ETEXI
1028 #if defined(TARGET_I386)
1030 .name = "pci_del",
1031 .args_type = "pci_addr:s",
1032 .params = "[[<domain>:]<bus>:]<slot>",
1033 .help = "hot remove PCI device",
1034 .mhandler.cmd = do_pci_device_hot_remove,
1036 #endif
1038 STEXI
1039 @item pci_del
1040 @findex pci_del
1041 Hot remove PCI device.
1042 ETEXI
1045 .name = "pcie_aer_inject_error",
1046 .args_type = "advisory_non_fatal:-a,correctable:-c,"
1047 "id:s,error_status:s,"
1048 "header0:i?,header1:i?,header2:i?,header3:i?,"
1049 "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
1050 .params = "[-a] [-c] id "
1051 "<error_status> [<tlp header> [<tlp header prefix>]]",
1052 .help = "inject pcie aer error\n\t\t\t"
1053 " -a for advisory non fatal error\n\t\t\t"
1054 " -c for correctable error\n\t\t\t"
1055 "<id> = qdev device id\n\t\t\t"
1056 "<error_status> = error string or 32bit\n\t\t\t"
1057 "<tlb header> = 32bit x 4\n\t\t\t"
1058 "<tlb header prefix> = 32bit x 4",
1059 .user_print = pcie_aer_inject_error_print,
1060 .mhandler.cmd_new = do_pcie_aer_inject_error,
1063 STEXI
1064 @item pcie_aer_inject_error
1065 @findex pcie_aer_inject_error
1066 Inject PCIe AER error
1067 ETEXI
1070 .name = "host_net_add",
1071 .args_type = "device:s,opts:s?",
1072 .params = "tap|user|socket|vde|dump [options]",
1073 .help = "add host VLAN client",
1074 .mhandler.cmd = net_host_device_add,
1077 STEXI
1078 @item host_net_add
1079 @findex host_net_add
1080 Add host VLAN client.
1081 ETEXI
1084 .name = "host_net_remove",
1085 .args_type = "vlan_id:i,device:s",
1086 .params = "vlan_id name",
1087 .help = "remove host VLAN client",
1088 .mhandler.cmd = net_host_device_remove,
1091 STEXI
1092 @item host_net_remove
1093 @findex host_net_remove
1094 Remove host VLAN client.
1095 ETEXI
1098 .name = "netdev_add",
1099 .args_type = "netdev:O",
1100 .params = "[user|tap|socket],id=str[,prop=value][,...]",
1101 .help = "add host network device",
1102 .mhandler.cmd = hmp_netdev_add,
1105 STEXI
1106 @item netdev_add
1107 @findex netdev_add
1108 Add host network device.
1109 ETEXI
1112 .name = "netdev_del",
1113 .args_type = "id:s",
1114 .params = "id",
1115 .help = "remove host network device",
1116 .mhandler.cmd = hmp_netdev_del,
1119 STEXI
1120 @item netdev_del
1121 @findex netdev_del
1122 Remove host network device.
1123 ETEXI
1125 #ifdef CONFIG_SLIRP
1127 .name = "hostfwd_add",
1128 .args_type = "arg1:s,arg2:s?,arg3:s?",
1129 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
1130 .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
1131 .mhandler.cmd = net_slirp_hostfwd_add,
1133 #endif
1134 STEXI
1135 @item hostfwd_add
1136 @findex hostfwd_add
1137 Redirect TCP or UDP connections from host to guest (requires -net user).
1138 ETEXI
1140 #ifdef CONFIG_SLIRP
1142 .name = "hostfwd_remove",
1143 .args_type = "arg1:s,arg2:s?,arg3:s?",
1144 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
1145 .help = "remove host-to-guest TCP or UDP redirection",
1146 .mhandler.cmd = net_slirp_hostfwd_remove,
1149 #endif
1150 STEXI
1151 @item hostfwd_remove
1152 @findex hostfwd_remove
1153 Remove host-to-guest TCP or UDP redirection.
1154 ETEXI
1157 .name = "balloon",
1158 .args_type = "value:M",
1159 .params = "target",
1160 .help = "request VM to change its memory allocation (in MB)",
1161 .mhandler.cmd = hmp_balloon,
1164 STEXI
1165 @item balloon @var{value}
1166 @findex balloon
1167 Request VM to change its memory allocation to @var{value} (in MB).
1168 ETEXI
1171 .name = "set_link",
1172 .args_type = "name:s,up:b",
1173 .params = "name on|off",
1174 .help = "change the link status of a network adapter",
1175 .mhandler.cmd = hmp_set_link,
1178 STEXI
1179 @item set_link @var{name} [on|off]
1180 @findex set_link
1181 Switch link @var{name} on (i.e. up) or off (i.e. down).
1182 ETEXI
1185 .name = "watchdog_action",
1186 .args_type = "action:s",
1187 .params = "[reset|shutdown|poweroff|pause|debug|none]",
1188 .help = "change watchdog action",
1189 .mhandler.cmd = do_watchdog_action,
1192 STEXI
1193 @item watchdog_action
1194 @findex watchdog_action
1195 Change watchdog action.
1196 ETEXI
1199 .name = "acl_show",
1200 .args_type = "aclname:s",
1201 .params = "aclname",
1202 .help = "list rules in the access control list",
1203 .mhandler.cmd = do_acl_show,
1206 STEXI
1207 @item acl_show @var{aclname}
1208 @findex acl_show
1209 List all the matching rules in the access control list, and the default
1210 policy. There are currently two named access control lists,
1211 @var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
1212 certificate distinguished name, and SASL username respectively.
1213 ETEXI
1216 .name = "acl_policy",
1217 .args_type = "aclname:s,policy:s",
1218 .params = "aclname allow|deny",
1219 .help = "set default access control list policy",
1220 .mhandler.cmd = do_acl_policy,
1223 STEXI
1224 @item acl_policy @var{aclname} @code{allow|deny}
1225 @findex acl_policy
1226 Set the default access control list policy, used in the event that
1227 none of the explicit rules match. The default policy at startup is
1228 always @code{deny}.
1229 ETEXI
1232 .name = "acl_add",
1233 .args_type = "aclname:s,match:s,policy:s,index:i?",
1234 .params = "aclname match allow|deny [index]",
1235 .help = "add a match rule to the access control list",
1236 .mhandler.cmd = do_acl_add,
1239 STEXI
1240 @item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
1241 @findex acl_add
1242 Add a match rule to the access control list, allowing or denying access.
1243 The match will normally be an exact username or x509 distinguished name,
1244 but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
1245 allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
1246 normally be appended to the end of the ACL, but can be inserted
1247 earlier in the list if the optional @var{index} parameter is supplied.
1248 ETEXI
1251 .name = "acl_remove",
1252 .args_type = "aclname:s,match:s",
1253 .params = "aclname match",
1254 .help = "remove a match rule from the access control list",
1255 .mhandler.cmd = do_acl_remove,
1258 STEXI
1259 @item acl_remove @var{aclname} @var{match}
1260 @findex acl_remove
1261 Remove the specified match rule from the access control list.
1262 ETEXI
1265 .name = "acl_reset",
1266 .args_type = "aclname:s",
1267 .params = "aclname",
1268 .help = "reset the access control list",
1269 .mhandler.cmd = do_acl_reset,
1272 STEXI
1273 @item acl_reset @var{aclname}
1274 @findex acl_reset
1275 Remove all matches from the access control list, and set the default
1276 policy back to @code{deny}.
1277 ETEXI
1279 #if defined(TARGET_I386)
1282 .name = "mce",
1283 .args_type = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
1284 .params = "[-b] cpu bank status mcgstatus addr misc",
1285 .help = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
1286 .mhandler.cmd = do_inject_mce,
1289 #endif
1290 STEXI
1291 @item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
1292 @findex mce (x86)
1293 Inject an MCE on the given CPU (x86 only).
1294 ETEXI
1297 .name = "getfd",
1298 .args_type = "fdname:s",
1299 .params = "getfd name",
1300 .help = "receive a file descriptor via SCM rights and assign it a name",
1301 .mhandler.cmd = hmp_getfd,
1304 STEXI
1305 @item getfd @var{fdname}
1306 @findex getfd
1307 If a file descriptor is passed alongside this command using the SCM_RIGHTS
1308 mechanism on unix sockets, it is stored using the name @var{fdname} for
1309 later use by other monitor commands.
1310 ETEXI
1313 .name = "closefd",
1314 .args_type = "fdname:s",
1315 .params = "closefd name",
1316 .help = "close a file descriptor previously passed via SCM rights",
1317 .mhandler.cmd = hmp_closefd,
1320 STEXI
1321 @item closefd @var{fdname}
1322 @findex closefd
1323 Close the file descriptor previously assigned to @var{fdname} using the
1324 @code{getfd} command. This is only needed if the file descriptor was never
1325 used by another monitor command.
1326 ETEXI
1329 .name = "block_passwd",
1330 .args_type = "device:B,password:s",
1331 .params = "block_passwd device password",
1332 .help = "set the password of encrypted block devices",
1333 .mhandler.cmd = hmp_block_passwd,
1336 STEXI
1337 @item block_set_io_throttle @var{device} @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}
1338 @findex block_set_io_throttle
1339 Change 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}
1340 ETEXI
1343 .name = "block_set_io_throttle",
1344 .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
1345 .params = "device bps bps_rd bps_wr iops iops_rd iops_wr",
1346 .help = "change I/O throttle limits for a block drive",
1347 .mhandler.cmd = hmp_block_set_io_throttle,
1350 STEXI
1351 @item block_passwd @var{device} @var{password}
1352 @findex block_passwd
1353 Set the encrypted device @var{device} password to @var{password}
1354 ETEXI
1357 .name = "set_password",
1358 .args_type = "protocol:s,password:s,connected:s?",
1359 .params = "protocol password action-if-connected",
1360 .help = "set spice/vnc password",
1361 .mhandler.cmd = hmp_set_password,
1364 STEXI
1365 @item set_password [ vnc | spice ] password [ action-if-connected ]
1366 @findex set_password
1368 Change spice/vnc password. Use zero to make the password stay valid
1369 forever. @var{action-if-connected} specifies what should happen in
1370 case a connection is established: @var{fail} makes the password change
1371 fail. @var{disconnect} changes the password and disconnects the
1372 client. @var{keep} changes the password and keeps the connection up.
1373 @var{keep} is the default.
1374 ETEXI
1377 .name = "expire_password",
1378 .args_type = "protocol:s,time:s",
1379 .params = "protocol time",
1380 .help = "set spice/vnc password expire-time",
1381 .mhandler.cmd = hmp_expire_password,
1384 STEXI
1385 @item expire_password [ vnc | spice ] expire-time
1386 @findex expire_password
1388 Specify when a password for spice/vnc becomes
1389 invalid. @var{expire-time} accepts:
1391 @table @var
1392 @item now
1393 Invalidate password instantly.
1395 @item never
1396 Password stays valid forever.
1398 @item +nsec
1399 Password stays valid for @var{nsec} seconds starting now.
1401 @item nsec
1402 Password is invalidated at the given time. @var{nsec} are the seconds
1403 passed since 1970, i.e. unix epoch.
1405 @end table
1406 ETEXI
1409 .name = "info",
1410 .args_type = "item:s?",
1411 .params = "[subcommand]",
1412 .help = "show various information about the system state",
1413 .mhandler.cmd = do_info,
1416 STEXI
1417 @item info @var{subcommand}
1418 @findex info
1419 Show various information about the system state.
1421 @table @option
1422 @item info version
1423 show the version of QEMU
1424 @item info network
1425 show the various VLANs and the associated devices
1426 @item info chardev
1427 show the character devices
1428 @item info block
1429 show the block devices
1430 @item info blockstats
1431 show block device statistics
1432 @item info registers
1433 show the cpu registers
1434 @item info cpus
1435 show infos for each CPU
1436 @item info history
1437 show the command line history
1438 @item info irq
1439 show the interrupts statistics (if available)
1440 @item info pic
1441 show i8259 (PIC) state
1442 @item info pci
1443 show emulated PCI device info
1444 @item info tlb
1445 show virtual to physical memory mappings (i386, SH4, SPARC, PPC, and Xtensa only)
1446 @item info mem
1447 show the active virtual memory mappings (i386 only)
1448 @item info jit
1449 show dynamic compiler info
1450 @item info numa
1451 show NUMA information
1452 @item info kvm
1453 show KVM information
1454 @item info usb
1455 show USB devices plugged on the virtual USB hub
1456 @item info usbhost
1457 show all USB host devices
1458 @item info profile
1459 show profiling information
1460 @item info capture
1461 show information about active capturing
1462 @item info snapshots
1463 show list of VM snapshots
1464 @item info status
1465 show the current VM status (running|paused)
1466 @item info pcmcia
1467 show guest PCMCIA status
1468 @item info mice
1469 show which guest mouse is receiving events
1470 @item info vnc
1471 show the vnc server status
1472 @item info name
1473 show the current VM name
1474 @item info uuid
1475 show the current VM UUID
1476 @item info cpustats
1477 show CPU statistics
1478 @item info usernet
1479 show user network stack connection states
1480 @item info migrate
1481 show migration status
1482 @item info migrate_capabilities
1483 show current migration capabilities
1484 @item info migrate_cache_size
1485 show current migration XBZRLE cache size
1486 @item info balloon
1487 show balloon information
1488 @item info qtree
1489 show device tree
1490 @item info qdm
1491 show qdev device model list
1492 @item info roms
1493 show roms
1494 @end table
1495 ETEXI
1497 #ifdef CONFIG_TRACE_SIMPLE
1498 STEXI
1499 @item info trace
1500 show contents of trace buffer
1501 ETEXI
1502 #endif
1504 STEXI
1505 @item info trace-events
1506 show available trace events and their state
1507 ETEXI
1509 STEXI
1510 @end table
1511 ETEXI