qcow2-refcount: remove write-only variables
[qemu/mdroth.git] / hmp-commands.hx
blob8df4adf8314312872ff456c8643f59c2d26df55c
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_new = do_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 .user_print = monitor_user_noop,
61 .mhandler.cmd_new = do_block_resize,
64 STEXI
65 @item block_resize
66 @findex block_resize
67 Resize a block image while a guest is running. Usually requires guest
68 action to see the updated size. Resize to a lower size is supported,
69 but should be used with extreme caution. Note that this command only
70 resizes image files, it can not resize block devices like LVM volumes.
71 ETEXI
75 .name = "eject",
76 .args_type = "force:-f,device:B",
77 .params = "[-f] device",
78 .help = "eject a removable medium (use -f to force it)",
79 .user_print = monitor_user_noop,
80 .mhandler.cmd_new = do_eject,
83 STEXI
84 @item eject [-f] @var{device}
85 @findex eject
86 Eject a removable medium (use -f to force it).
87 ETEXI
90 .name = "drive_del",
91 .args_type = "id:s",
92 .params = "device",
93 .help = "remove host block device",
94 .user_print = monitor_user_noop,
95 .mhandler.cmd_new = do_drive_del,
98 STEXI
99 @item drive_del @var{device}
100 @findex drive_del
101 Remove host block device. The result is that guest generated IO is no longer
102 submitted against the host device underlying the disk. Once a drive has
103 been deleted, the QEMU Block layer returns -EIO which results in IO
104 errors in the guest for applications that are reading/writing to the device.
105 ETEXI
108 .name = "change",
109 .args_type = "device:B,target:F,arg:s?",
110 .params = "device filename [format]",
111 .help = "change a removable medium, optional format",
112 .user_print = monitor_user_noop,
113 .mhandler.cmd_new = do_change,
116 STEXI
117 @item change @var{device} @var{setting}
118 @findex change
120 Change the configuration of a device.
122 @table @option
123 @item change @var{diskdevice} @var{filename} [@var{format}]
124 Change the medium for a removable disk device to point to @var{filename}. eg
126 @example
127 (qemu) change ide1-cd0 /path/to/some.iso
128 @end example
130 @var{format} is optional.
132 @item change vnc @var{display},@var{options}
133 Change the configuration of the VNC server. The valid syntax for @var{display}
134 and @var{options} are described at @ref{sec_invocation}. eg
136 @example
137 (qemu) change vnc localhost:1
138 @end example
140 @item change vnc password [@var{password}]
142 Change the password associated with the VNC server. If the new password is not
143 supplied, the monitor will prompt for it to be entered. VNC passwords are only
144 significant up to 8 letters. eg
146 @example
147 (qemu) change vnc password
148 Password: ********
149 @end example
151 @end table
152 ETEXI
155 .name = "screendump",
156 .args_type = "filename:F",
157 .params = "filename",
158 .help = "save screen into PPM image 'filename'",
159 .user_print = monitor_user_noop,
160 .mhandler.cmd_new = do_screen_dump,
163 STEXI
164 @item screendump @var{filename}
165 @findex screendump
166 Save screen into PPM image @var{filename}.
167 ETEXI
170 .name = "logfile",
171 .args_type = "filename:F",
172 .params = "filename",
173 .help = "output logs to 'filename'",
174 .mhandler.cmd = do_logfile,
177 STEXI
178 @item logfile @var{filename}
179 @findex logfile
180 Output logs to @var{filename}.
181 ETEXI
183 #ifdef CONFIG_SIMPLE_TRACE
185 .name = "trace-event",
186 .args_type = "name:s,option:b",
187 .params = "name on|off",
188 .help = "changes status of a specific trace event",
189 .mhandler.cmd = do_change_trace_event_state,
192 STEXI
193 @item trace-event
194 @findex trace-event
195 changes status of a trace event
196 ETEXI
199 .name = "trace-file",
200 .args_type = "op:s?,arg:F?",
201 .params = "on|off|flush|set [arg]",
202 .help = "open, close, or flush trace file, or set a new file name",
203 .mhandler.cmd = do_trace_file,
206 STEXI
207 @item trace-file on|off|flush
208 @findex trace-file
209 Open, close, or flush the trace file. If no argument is given, the status of the trace file is displayed.
210 ETEXI
211 #endif
214 .name = "log",
215 .args_type = "items:s",
216 .params = "item1[,...]",
217 .help = "activate logging of the specified items to '/tmp/qemu.log'",
218 .mhandler.cmd = do_log,
221 STEXI
222 @item log @var{item1}[,...]
223 @findex log
224 Activate logging of the specified items to @file{/tmp/qemu.log}.
225 ETEXI
228 .name = "savevm",
229 .args_type = "name:s?",
230 .params = "[tag|id]",
231 .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
232 .mhandler.cmd = do_savevm,
235 STEXI
236 @item savevm [@var{tag}|@var{id}]
237 @findex savevm
238 Create a snapshot of the whole virtual machine. If @var{tag} is
239 provided, it is used as human readable identifier. If there is already
240 a snapshot with the same tag or ID, it is replaced. More info at
241 @ref{vm_snapshots}.
242 ETEXI
245 .name = "loadvm",
246 .args_type = "name:s",
247 .params = "tag|id",
248 .help = "restore a VM snapshot from its tag or id",
249 .mhandler.cmd = do_loadvm,
252 STEXI
253 @item loadvm @var{tag}|@var{id}
254 @findex loadvm
255 Set the whole virtual machine to the snapshot identified by the tag
256 @var{tag} or the unique snapshot ID @var{id}.
257 ETEXI
260 .name = "delvm",
261 .args_type = "name:s",
262 .params = "tag|id",
263 .help = "delete a VM snapshot from its tag or id",
264 .mhandler.cmd = do_delvm,
267 STEXI
268 @item delvm @var{tag}|@var{id}
269 @findex delvm
270 Delete the snapshot identified by @var{tag} or @var{id}.
271 ETEXI
274 .name = "singlestep",
275 .args_type = "option:s?",
276 .params = "[on|off]",
277 .help = "run emulation in singlestep mode or switch to normal mode",
278 .mhandler.cmd = do_singlestep,
281 STEXI
282 @item singlestep [off]
283 @findex singlestep
284 Run the emulation in single step mode.
285 If called with option off, the emulation returns to normal mode.
286 ETEXI
289 .name = "stop",
290 .args_type = "",
291 .params = "",
292 .help = "stop emulation",
293 .user_print = monitor_user_noop,
294 .mhandler.cmd_new = do_stop,
297 STEXI
298 @item stop
299 @findex stop
300 Stop emulation.
301 ETEXI
304 .name = "c|cont",
305 .args_type = "",
306 .params = "",
307 .help = "resume emulation",
308 .user_print = monitor_user_noop,
309 .mhandler.cmd_new = do_cont,
312 STEXI
313 @item c or cont
314 @findex cont
315 Resume emulation.
316 ETEXI
319 .name = "gdbserver",
320 .args_type = "device:s?",
321 .params = "[device]",
322 .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
323 .mhandler.cmd = do_gdbserver,
326 STEXI
327 @item gdbserver [@var{port}]
328 @findex gdbserver
329 Start gdbserver session (default @var{port}=1234)
330 ETEXI
333 .name = "x",
334 .args_type = "fmt:/,addr:l",
335 .params = "/fmt addr",
336 .help = "virtual memory dump starting at 'addr'",
337 .mhandler.cmd = do_memory_dump,
340 STEXI
341 @item x/fmt @var{addr}
342 @findex x
343 Virtual memory dump starting at @var{addr}.
344 ETEXI
347 .name = "xp",
348 .args_type = "fmt:/,addr:l",
349 .params = "/fmt addr",
350 .help = "physical memory dump starting at 'addr'",
351 .mhandler.cmd = do_physical_memory_dump,
354 STEXI
355 @item xp /@var{fmt} @var{addr}
356 @findex xp
357 Physical memory dump starting at @var{addr}.
359 @var{fmt} is a format which tells the command how to format the
360 data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
362 @table @var
363 @item count
364 is the number of items to be dumped.
366 @item format
367 can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
368 c (char) or i (asm instruction).
370 @item size
371 can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
372 @code{h} or @code{w} can be specified with the @code{i} format to
373 respectively select 16 or 32 bit code instruction size.
375 @end table
377 Examples:
378 @itemize
379 @item
380 Dump 10 instructions at the current instruction pointer:
381 @example
382 (qemu) x/10i $eip
383 0x90107063: ret
384 0x90107064: sti
385 0x90107065: lea 0x0(%esi,1),%esi
386 0x90107069: lea 0x0(%edi,1),%edi
387 0x90107070: ret
388 0x90107071: jmp 0x90107080
389 0x90107073: nop
390 0x90107074: nop
391 0x90107075: nop
392 0x90107076: nop
393 @end example
395 @item
396 Dump 80 16 bit values at the start of the video memory.
397 @smallexample
398 (qemu) xp/80hx 0xb8000
399 0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
400 0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
401 0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
402 0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
403 0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
404 0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
405 0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
406 0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
407 0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
408 0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
409 @end smallexample
410 @end itemize
411 ETEXI
414 .name = "p|print",
415 .args_type = "fmt:/,val:l",
416 .params = "/fmt expr",
417 .help = "print expression value (use $reg for CPU register access)",
418 .mhandler.cmd = do_print,
421 STEXI
422 @item p or print/@var{fmt} @var{expr}
423 @findex print
425 Print expression value. Only the @var{format} part of @var{fmt} is
426 used.
427 ETEXI
430 .name = "i",
431 .args_type = "fmt:/,addr:i,index:i.",
432 .params = "/fmt addr",
433 .help = "I/O port read",
434 .mhandler.cmd = do_ioport_read,
437 STEXI
438 Read I/O port.
439 ETEXI
442 .name = "o",
443 .args_type = "fmt:/,addr:i,val:i",
444 .params = "/fmt addr value",
445 .help = "I/O port write",
446 .mhandler.cmd = do_ioport_write,
449 STEXI
450 Write to I/O port.
451 ETEXI
454 .name = "sendkey",
455 .args_type = "string:s,hold_time:i?",
456 .params = "keys [hold_ms]",
457 .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
458 .mhandler.cmd = do_sendkey,
461 STEXI
462 @item sendkey @var{keys}
463 @findex sendkey
465 Send @var{keys} to the emulator. @var{keys} could be the name of the
466 key or @code{#} followed by the raw value in either decimal or hexadecimal
467 format. Use @code{-} to press several keys simultaneously. Example:
468 @example
469 sendkey ctrl-alt-f1
470 @end example
472 This command is useful to send keys that your graphical user interface
473 intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
474 ETEXI
477 .name = "system_reset",
478 .args_type = "",
479 .params = "",
480 .help = "reset the system",
481 .user_print = monitor_user_noop,
482 .mhandler.cmd_new = do_system_reset,
485 STEXI
486 @item system_reset
487 @findex system_reset
489 Reset the system.
490 ETEXI
493 .name = "system_powerdown",
494 .args_type = "",
495 .params = "",
496 .help = "send system power down event",
497 .user_print = monitor_user_noop,
498 .mhandler.cmd_new = do_system_powerdown,
501 STEXI
502 @item system_powerdown
503 @findex system_powerdown
505 Power down the system (if supported).
506 ETEXI
509 .name = "sum",
510 .args_type = "start:i,size:i",
511 .params = "addr size",
512 .help = "compute the checksum of a memory region",
513 .mhandler.cmd = do_sum,
516 STEXI
517 @item sum @var{addr} @var{size}
518 @findex sum
520 Compute the checksum of a memory region.
521 ETEXI
524 .name = "usb_add",
525 .args_type = "devname:s",
526 .params = "device",
527 .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
528 .mhandler.cmd = do_usb_add,
531 STEXI
532 @item usb_add @var{devname}
533 @findex usb_add
535 Add the USB device @var{devname}. For details of available devices see
536 @ref{usb_devices}
537 ETEXI
540 .name = "usb_del",
541 .args_type = "devname:s",
542 .params = "device",
543 .help = "remove USB device 'bus.addr'",
544 .mhandler.cmd = do_usb_del,
547 STEXI
548 @item usb_del @var{devname}
549 @findex usb_del
551 Remove the USB device @var{devname} from the QEMU virtual USB
552 hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
553 command @code{info usb} to see the devices you can remove.
554 ETEXI
557 .name = "device_add",
558 .args_type = "device:O",
559 .params = "driver[,prop=value][,...]",
560 .help = "add device, like -device on the command line",
561 .user_print = monitor_user_noop,
562 .mhandler.cmd_new = do_device_add,
565 STEXI
566 @item device_add @var{config}
567 @findex device_add
569 Add device.
570 ETEXI
573 .name = "device_del",
574 .args_type = "id:s",
575 .params = "device",
576 .help = "remove device",
577 .user_print = monitor_user_noop,
578 .mhandler.cmd_new = do_device_del,
581 STEXI
582 @item device_del @var{id}
583 @findex device_del
585 Remove device @var{id}.
586 ETEXI
589 .name = "cpu",
590 .args_type = "index:i",
591 .params = "index",
592 .help = "set the default CPU",
593 .user_print = monitor_user_noop,
594 .mhandler.cmd_new = do_cpu_set,
597 STEXI
598 @item cpu @var{index}
599 @findex cpu
600 Set the default CPU.
601 ETEXI
604 .name = "mouse_move",
605 .args_type = "dx_str:s,dy_str:s,dz_str:s?",
606 .params = "dx dy [dz]",
607 .help = "send mouse move events",
608 .mhandler.cmd = do_mouse_move,
611 STEXI
612 @item mouse_move @var{dx} @var{dy} [@var{dz}]
613 @findex mouse_move
614 Move the active mouse to the specified coordinates @var{dx} @var{dy}
615 with optional scroll axis @var{dz}.
616 ETEXI
619 .name = "mouse_button",
620 .args_type = "button_state:i",
621 .params = "state",
622 .help = "change mouse button state (1=L, 2=M, 4=R)",
623 .mhandler.cmd = do_mouse_button,
626 STEXI
627 @item mouse_button @var{val}
628 @findex mouse_button
629 Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
630 ETEXI
633 .name = "mouse_set",
634 .args_type = "index:i",
635 .params = "index",
636 .help = "set which mouse device receives events",
637 .mhandler.cmd = do_mouse_set,
640 STEXI
641 @item mouse_set @var{index}
642 @findex mouse_set
643 Set which mouse device receives events at given @var{index}, index
644 can be obtained with
645 @example
646 info mice
647 @end example
648 ETEXI
650 #ifdef HAS_AUDIO
652 .name = "wavcapture",
653 .args_type = "path:F,freq:i?,bits:i?,nchannels:i?",
654 .params = "path [frequency [bits [channels]]]",
655 .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
656 .mhandler.cmd = do_wav_capture,
658 #endif
659 STEXI
660 @item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
661 @findex wavcapture
662 Capture audio into @var{filename}. Using sample rate @var{frequency}
663 bits per sample @var{bits} and number of channels @var{channels}.
665 Defaults:
666 @itemize @minus
667 @item Sample rate = 44100 Hz - CD quality
668 @item Bits = 16
669 @item Number of channels = 2 - Stereo
670 @end itemize
671 ETEXI
673 #ifdef HAS_AUDIO
675 .name = "stopcapture",
676 .args_type = "n:i",
677 .params = "capture index",
678 .help = "stop capture",
679 .mhandler.cmd = do_stop_capture,
681 #endif
682 STEXI
683 @item stopcapture @var{index}
684 @findex stopcapture
685 Stop capture with a given @var{index}, index can be obtained with
686 @example
687 info capture
688 @end example
689 ETEXI
692 .name = "memsave",
693 .args_type = "val:l,size:i,filename:s",
694 .params = "addr size file",
695 .help = "save to disk virtual memory dump starting at 'addr' of size 'size'",
696 .user_print = monitor_user_noop,
697 .mhandler.cmd_new = do_memory_save,
700 STEXI
701 @item memsave @var{addr} @var{size} @var{file}
702 @findex memsave
703 save to disk virtual memory dump starting at @var{addr} of size @var{size}.
704 ETEXI
707 .name = "pmemsave",
708 .args_type = "val:l,size:i,filename:s",
709 .params = "addr size file",
710 .help = "save to disk physical memory dump starting at 'addr' of size 'size'",
711 .user_print = monitor_user_noop,
712 .mhandler.cmd_new = do_physical_memory_save,
715 STEXI
716 @item pmemsave @var{addr} @var{size} @var{file}
717 @findex pmemsave
718 save to disk physical memory dump starting at @var{addr} of size @var{size}.
719 ETEXI
722 .name = "boot_set",
723 .args_type = "bootdevice:s",
724 .params = "bootdevice",
725 .help = "define new values for the boot device list",
726 .mhandler.cmd = do_boot_set,
729 STEXI
730 @item boot_set @var{bootdevicelist}
731 @findex boot_set
733 Define new values for the boot device list. Those values will override
734 the values specified on the command line through the @code{-boot} option.
736 The values that can be specified here depend on the machine type, but are
737 the same that can be specified in the @code{-boot} command line option.
738 ETEXI
740 #if defined(TARGET_I386)
742 .name = "nmi",
743 .args_type = "cpu_index:i",
744 .params = "cpu",
745 .help = "inject an NMI on the given CPU",
746 .mhandler.cmd = do_inject_nmi,
748 #endif
749 STEXI
750 @item nmi @var{cpu}
751 @findex nmi
752 Inject an NMI on the given CPU (x86 only).
753 ETEXI
756 .name = "migrate",
757 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
758 .params = "[-d] [-b] [-i] uri",
759 .help = "migrate to URI (using -d to not wait for completion)"
760 "\n\t\t\t -b for migration without shared storage with"
761 " full copy of disk\n\t\t\t -i for migration without "
762 "shared storage with incremental copy of disk "
763 "(base image shared between src and destination)",
764 .user_print = monitor_user_noop,
765 .mhandler.cmd_new = do_migrate,
769 STEXI
770 @item migrate [-d] [-b] [-i] @var{uri}
771 @findex migrate
772 Migrate to @var{uri} (using -d to not wait for completion).
773 -b for migration with full copy of disk
774 -i for migration with incremental copy of disk (base image is shared)
775 ETEXI
778 .name = "migrate_cancel",
779 .args_type = "",
780 .params = "",
781 .help = "cancel the current VM migration",
782 .user_print = monitor_user_noop,
783 .mhandler.cmd_new = do_migrate_cancel,
786 STEXI
787 @item migrate_cancel
788 @findex migrate_cancel
789 Cancel the current VM migration.
790 ETEXI
793 .name = "migrate_set_speed",
794 .args_type = "value:o",
795 .params = "value",
796 .help = "set maximum speed (in bytes) for migrations. "
797 "Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
798 .user_print = monitor_user_noop,
799 .mhandler.cmd_new = do_migrate_set_speed,
802 STEXI
803 @item migrate_set_speed @var{value}
804 @findex migrate_set_speed
805 Set maximum speed to @var{value} (in bytes) for migrations.
806 ETEXI
809 .name = "migrate_set_downtime",
810 .args_type = "value:T",
811 .params = "value",
812 .help = "set maximum tolerated downtime (in seconds) for migrations",
813 .user_print = monitor_user_noop,
814 .mhandler.cmd_new = do_migrate_set_downtime,
817 STEXI
818 @item migrate_set_downtime @var{second}
819 @findex migrate_set_downtime
820 Set maximum tolerated downtime (in seconds) for migration.
821 ETEXI
824 .name = "snapshot_blkdev",
825 .args_type = "device:s,snapshot_file:s?,format:s?",
826 .params = "device [new-image-file] [format]",
827 .help = "initiates a live snapshot\n\t\t\t"
828 "of device. If a new image file is specified, the\n\t\t\t"
829 "new image file will become the new root image.\n\t\t\t"
830 "If format is specified, the snapshot file will\n\t\t\t"
831 "be created in that format. Otherwise the\n\t\t\t"
832 "snapshot will be internal! (currently unsupported)",
833 .mhandler.cmd_new = do_snapshot_blkdev,
836 STEXI
837 @item snapshot_blkdev
838 @findex snapshot_blkdev
839 Snapshot device, using snapshot file as target if provided
840 ETEXI
842 #if defined(TARGET_I386)
844 .name = "drive_add",
845 .args_type = "pci_addr:s,opts:s",
846 .params = "[[<domain>:]<bus>:]<slot>\n"
847 "[file=file][,if=type][,bus=n]\n"
848 "[,unit=m][,media=d][index=i]\n"
849 "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
850 "[snapshot=on|off][,cache=on|off]",
851 .help = "add drive to PCI storage controller",
852 .mhandler.cmd = drive_hot_add,
854 #endif
856 STEXI
857 @item drive_add
858 @findex drive_add
859 Add drive to PCI storage controller.
860 ETEXI
862 #if defined(TARGET_I386)
864 .name = "pci_add",
865 .args_type = "pci_addr:s,type:s,opts:s?",
866 .params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
867 .help = "hot-add PCI device",
868 .mhandler.cmd = pci_device_hot_add,
870 #endif
872 STEXI
873 @item pci_add
874 @findex pci_add
875 Hot-add PCI device.
876 ETEXI
878 #if defined(TARGET_I386)
880 .name = "pci_del",
881 .args_type = "pci_addr:s",
882 .params = "[[<domain>:]<bus>:]<slot>",
883 .help = "hot remove PCI device",
884 .mhandler.cmd = do_pci_device_hot_remove,
886 #endif
888 STEXI
889 @item pci_del
890 @findex pci_del
891 Hot remove PCI device.
892 ETEXI
895 .name = "pcie_aer_inject_error",
896 .args_type = "advisory_non_fatal:-a,correctable:-c,"
897 "id:s,error_status:s,"
898 "header0:i?,header1:i?,header2:i?,header3:i?,"
899 "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
900 .params = "[-a] [-c] id "
901 "<error_status> [<tlp header> [<tlp header prefix>]]",
902 .help = "inject pcie aer error\n\t\t\t"
903 " -a for advisory non fatal error\n\t\t\t"
904 " -c for correctable error\n\t\t\t"
905 "<id> = qdev device id\n\t\t\t"
906 "<error_status> = error string or 32bit\n\t\t\t"
907 "<tlb header> = 32bit x 4\n\t\t\t"
908 "<tlb header prefix> = 32bit x 4",
909 .user_print = pcie_aer_inject_error_print,
910 .mhandler.cmd_new = do_pcie_aer_inejct_error,
913 STEXI
914 @item pcie_aer_inject_error
915 @findex pcie_aer_inject_error
916 Inject PCIe AER error
917 ETEXI
920 .name = "host_net_add",
921 .args_type = "device:s,opts:s?",
922 .params = "tap|user|socket|vde|dump [options]",
923 .help = "add host VLAN client",
924 .mhandler.cmd = net_host_device_add,
927 STEXI
928 @item host_net_add
929 @findex host_net_add
930 Add host VLAN client.
931 ETEXI
934 .name = "host_net_remove",
935 .args_type = "vlan_id:i,device:s",
936 .params = "vlan_id name",
937 .help = "remove host VLAN client",
938 .mhandler.cmd = net_host_device_remove,
941 STEXI
942 @item host_net_remove
943 @findex host_net_remove
944 Remove host VLAN client.
945 ETEXI
948 .name = "netdev_add",
949 .args_type = "netdev:O",
950 .params = "[user|tap|socket],id=str[,prop=value][,...]",
951 .help = "add host network device",
952 .user_print = monitor_user_noop,
953 .mhandler.cmd_new = do_netdev_add,
956 STEXI
957 @item netdev_add
958 @findex netdev_add
959 Add host network device.
960 ETEXI
963 .name = "netdev_del",
964 .args_type = "id:s",
965 .params = "id",
966 .help = "remove host network device",
967 .user_print = monitor_user_noop,
968 .mhandler.cmd_new = do_netdev_del,
971 STEXI
972 @item netdev_del
973 @findex netdev_del
974 Remove host network device.
975 ETEXI
977 #ifdef CONFIG_SLIRP
979 .name = "hostfwd_add",
980 .args_type = "arg1:s,arg2:s?,arg3:s?",
981 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
982 .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
983 .mhandler.cmd = net_slirp_hostfwd_add,
985 #endif
986 STEXI
987 @item hostfwd_add
988 @findex hostfwd_add
989 Redirect TCP or UDP connections from host to guest (requires -net user).
990 ETEXI
992 #ifdef CONFIG_SLIRP
994 .name = "hostfwd_remove",
995 .args_type = "arg1:s,arg2:s?,arg3:s?",
996 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
997 .help = "remove host-to-guest TCP or UDP redirection",
998 .mhandler.cmd = net_slirp_hostfwd_remove,
1001 #endif
1002 STEXI
1003 @item hostfwd_remove
1004 @findex hostfwd_remove
1005 Remove host-to-guest TCP or UDP redirection.
1006 ETEXI
1009 .name = "balloon",
1010 .args_type = "value:M",
1011 .params = "target",
1012 .help = "request VM to change its memory allocation (in MB)",
1013 .user_print = monitor_user_noop,
1014 .mhandler.cmd_async = do_balloon,
1015 .flags = MONITOR_CMD_ASYNC,
1018 STEXI
1019 @item balloon @var{value}
1020 @findex balloon
1021 Request VM to change its memory allocation to @var{value} (in MB).
1022 ETEXI
1025 .name = "set_link",
1026 .args_type = "name:s,up:b",
1027 .params = "name on|off",
1028 .help = "change the link status of a network adapter",
1029 .user_print = monitor_user_noop,
1030 .mhandler.cmd_new = do_set_link,
1033 STEXI
1034 @item set_link @var{name} [on|off]
1035 @findex set_link
1036 Switch link @var{name} on (i.e. up) or off (i.e. down).
1037 ETEXI
1040 .name = "watchdog_action",
1041 .args_type = "action:s",
1042 .params = "[reset|shutdown|poweroff|pause|debug|none]",
1043 .help = "change watchdog action",
1044 .mhandler.cmd = do_watchdog_action,
1047 STEXI
1048 @item watchdog_action
1049 @findex watchdog_action
1050 Change watchdog action.
1051 ETEXI
1054 .name = "acl_show",
1055 .args_type = "aclname:s",
1056 .params = "aclname",
1057 .help = "list rules in the access control list",
1058 .mhandler.cmd = do_acl_show,
1061 STEXI
1062 @item acl_show @var{aclname}
1063 @findex acl_show
1064 List all the matching rules in the access control list, and the default
1065 policy. There are currently two named access control lists,
1066 @var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
1067 certificate distinguished name, and SASL username respectively.
1068 ETEXI
1071 .name = "acl_policy",
1072 .args_type = "aclname:s,policy:s",
1073 .params = "aclname allow|deny",
1074 .help = "set default access control list policy",
1075 .mhandler.cmd = do_acl_policy,
1078 STEXI
1079 @item acl_policy @var{aclname} @code{allow|deny}
1080 @findex acl_policy
1081 Set the default access control list policy, used in the event that
1082 none of the explicit rules match. The default policy at startup is
1083 always @code{deny}.
1084 ETEXI
1087 .name = "acl_add",
1088 .args_type = "aclname:s,match:s,policy:s,index:i?",
1089 .params = "aclname match allow|deny [index]",
1090 .help = "add a match rule to the access control list",
1091 .mhandler.cmd = do_acl_add,
1094 STEXI
1095 @item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
1096 @findex acl_add
1097 Add a match rule to the access control list, allowing or denying access.
1098 The match will normally be an exact username or x509 distinguished name,
1099 but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
1100 allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
1101 normally be appended to the end of the ACL, but can be inserted
1102 earlier in the list if the optional @var{index} parameter is supplied.
1103 ETEXI
1106 .name = "acl_remove",
1107 .args_type = "aclname:s,match:s",
1108 .params = "aclname match",
1109 .help = "remove a match rule from the access control list",
1110 .mhandler.cmd = do_acl_remove,
1113 STEXI
1114 @item acl_remove @var{aclname} @var{match}
1115 @findex acl_remove
1116 Remove the specified match rule from the access control list.
1117 ETEXI
1120 .name = "acl_reset",
1121 .args_type = "aclname:s",
1122 .params = "aclname",
1123 .help = "reset the access control list",
1124 .mhandler.cmd = do_acl_reset,
1127 STEXI
1128 @item acl_reset @var{aclname}
1129 @findex acl_reset
1130 Remove all matches from the access control list, and set the default
1131 policy back to @code{deny}.
1132 ETEXI
1134 #if defined(TARGET_I386)
1137 .name = "mce",
1138 .args_type = "cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
1139 .params = "cpu bank status mcgstatus addr misc",
1140 .help = "inject a MCE on the given CPU",
1141 .mhandler.cmd = do_inject_mce,
1144 #endif
1145 STEXI
1146 @item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
1147 @findex mce (x86)
1148 Inject an MCE on the given CPU (x86 only).
1149 ETEXI
1152 .name = "getfd",
1153 .args_type = "fdname:s",
1154 .params = "getfd name",
1155 .help = "receive a file descriptor via SCM rights and assign it a name",
1156 .user_print = monitor_user_noop,
1157 .mhandler.cmd_new = do_getfd,
1160 STEXI
1161 @item getfd @var{fdname}
1162 @findex getfd
1163 If a file descriptor is passed alongside this command using the SCM_RIGHTS
1164 mechanism on unix sockets, it is stored using the name @var{fdname} for
1165 later use by other monitor commands.
1166 ETEXI
1169 .name = "closefd",
1170 .args_type = "fdname:s",
1171 .params = "closefd name",
1172 .help = "close a file descriptor previously passed via SCM rights",
1173 .user_print = monitor_user_noop,
1174 .mhandler.cmd_new = do_closefd,
1177 STEXI
1178 @item closefd @var{fdname}
1179 @findex closefd
1180 Close the file descriptor previously assigned to @var{fdname} using the
1181 @code{getfd} command. This is only needed if the file descriptor was never
1182 used by another monitor command.
1183 ETEXI
1186 .name = "block_passwd",
1187 .args_type = "device:B,password:s",
1188 .params = "block_passwd device password",
1189 .help = "set the password of encrypted block devices",
1190 .user_print = monitor_user_noop,
1191 .mhandler.cmd_new = do_block_set_passwd,
1194 STEXI
1195 @item block_passwd @var{device} @var{password}
1196 @findex block_passwd
1197 Set the encrypted device @var{device} password to @var{password}
1198 ETEXI
1201 .name = "set_password",
1202 .args_type = "protocol:s,password:s,connected:s?",
1203 .params = "protocol password action-if-connected",
1204 .help = "set spice/vnc password",
1205 .user_print = monitor_user_noop,
1206 .mhandler.cmd_new = set_password,
1209 STEXI
1210 @item set_password [ vnc | spice ] password [ action-if-connected ]
1211 @findex set_password
1213 Change spice/vnc password. Use zero to make the password stay valid
1214 forever. @var{action-if-connected} specifies what should happen in
1215 case a connection is established: @var{fail} makes the password change
1216 fail. @var{disconnect} changes the password and disconnects the
1217 client. @var{keep} changes the password and keeps the connection up.
1218 @var{keep} is the default.
1219 ETEXI
1222 .name = "expire_password",
1223 .args_type = "protocol:s,time:s",
1224 .params = "protocol time",
1225 .help = "set spice/vnc password expire-time",
1226 .user_print = monitor_user_noop,
1227 .mhandler.cmd_new = expire_password,
1230 STEXI
1231 @item expire_password [ vnc | spice ] expire-time
1232 @findex expire_password
1234 Specify when a password for spice/vnc becomes
1235 invalid. @var{expire-time} accepts:
1237 @table @var
1238 @item now
1239 Invalidate password instantly.
1241 @item never
1242 Password stays valid forever.
1244 @item +nsec
1245 Password stays valid for @var{nsec} seconds starting now.
1247 @item nsec
1248 Password is invalidated at the given time. @var{nsec} are the seconds
1249 passed since 1970, i.e. unix epoch.
1251 @end table
1252 ETEXI
1255 .name = "info",
1256 .args_type = "item:s?",
1257 .params = "[subcommand]",
1258 .help = "show various information about the system state",
1259 .mhandler.cmd = do_info,
1262 STEXI
1263 @item info @var{subcommand}
1264 @findex info
1265 Show various information about the system state.
1267 @table @option
1268 @item info version
1269 show the version of QEMU
1270 @item info network
1271 show the various VLANs and the associated devices
1272 @item info chardev
1273 show the character devices
1274 @item info block
1275 show the block devices
1276 @item info blockstats
1277 show block device statistics
1278 @item info registers
1279 show the cpu registers
1280 @item info cpus
1281 show infos for each CPU
1282 @item info history
1283 show the command line history
1284 @item info irq
1285 show the interrupts statistics (if available)
1286 @item info pic
1287 show i8259 (PIC) state
1288 @item info pci
1289 show emulated PCI device info
1290 @item info tlb
1291 show virtual to physical memory mappings (i386, SH4 and SPARC only)
1292 @item info mem
1293 show the active virtual memory mappings (i386 only)
1294 @item info jit
1295 show dynamic compiler info
1296 @item info kvm
1297 show KVM information
1298 @item info numa
1299 show NUMA information
1300 @item info kvm
1301 show KVM information
1302 @item info usb
1303 show USB devices plugged on the virtual USB hub
1304 @item info usbhost
1305 show all USB host devices
1306 @item info profile
1307 show profiling information
1308 @item info capture
1309 show information about active capturing
1310 @item info snapshots
1311 show list of VM snapshots
1312 @item info status
1313 show the current VM status (running|paused)
1314 @item info pcmcia
1315 show guest PCMCIA status
1316 @item info mice
1317 show which guest mouse is receiving events
1318 @item info vnc
1319 show the vnc server status
1320 @item info name
1321 show the current VM name
1322 @item info uuid
1323 show the current VM UUID
1324 @item info cpustats
1325 show CPU statistics
1326 @item info usernet
1327 show user network stack connection states
1328 @item info migrate
1329 show migration status
1330 @item info balloon
1331 show balloon information
1332 @item info qtree
1333 show device tree
1334 @item info qdm
1335 show qdev device model list
1336 @item info roms
1337 show roms
1338 @end table
1339 ETEXI
1341 #ifdef CONFIG_SIMPLE_TRACE
1342 STEXI
1343 @item info trace
1344 show contents of trace buffer
1345 @item info trace-events
1346 show available trace events and their state
1347 ETEXI
1348 #endif
1350 STEXI
1351 @end table
1352 ETEXI