]> git.proxmox.com Git - qemu.git/blame_incremental - qemu-monitor.hx
usb-uhci: symbolic names for pci registers
[qemu.git] / qemu-monitor.hx
... / ...
CommitLineData
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 .mhandler.cmd = do_help_cmd,
18 },
19
20STEXI
21@item help or ? [@var{cmd}]
22Show the help for all commands or just for command @var{cmd}.
23ETEXI
24
25 {
26 .name = "commit",
27 .args_type = "device:B",
28 .params = "device|all",
29 .help = "commit changes to the disk images (if -snapshot is used) or backing files",
30 .mhandler.cmd = do_commit,
31 },
32
33STEXI
34@item commit
35Commit changes to the disk images (if -snapshot is used) or backing files.
36ETEXI
37
38 {
39 .name = "info",
40 .args_type = "item:s?",
41 .params = "[subcommand]",
42 .help = "show various information about the system state",
43 .user_print = monitor_user_noop,
44 .mhandler.cmd_new = do_info,
45 },
46
47STEXI
48@item info @var{subcommand}
49Show various information about the system state.
50
51@table @option
52@item info version
53show the version of QEMU
54@item info network
55show the various VLANs and the associated devices
56@item info chardev
57show the character devices
58@item info block
59show the block devices
60@item info block
61show block device statistics
62@item info registers
63show the cpu registers
64@item info cpus
65show infos for each CPU
66@item info history
67show the command line history
68@item info irq
69show the interrupts statistics (if available)
70@item info pic
71show i8259 (PIC) state
72@item info pci
73show emulated PCI device info
74@item info tlb
75show virtual to physical memory mappings (i386 only)
76@item info mem
77show the active virtual memory mappings (i386 only)
78@item info hpet
79show state of HPET (i386 only)
80@item info kvm
81show KVM information
82@item info usb
83show USB devices plugged on the virtual USB hub
84@item info usbhost
85show all USB host devices
86@item info profile
87show profiling information
88@item info capture
89show information about active capturing
90@item info snapshots
91show list of VM snapshots
92@item info status
93show the current VM status (running|paused)
94@item info pcmcia
95show guest PCMCIA status
96@item info mice
97show which guest mouse is receiving events
98@item info vnc
99show the vnc server status
100@item info name
101show the current VM name
102@item info uuid
103show the current VM UUID
104@item info cpustats
105show CPU statistics
106@item info usernet
107show user network stack connection states
108@item info migrate
109show migration status
110@item info balloon
111show balloon information
112@item info qtree
113show device tree
114@end table
115ETEXI
116
117 {
118 .name = "q|quit",
119 .args_type = "",
120 .params = "",
121 .help = "quit the emulator",
122 .user_print = monitor_user_noop,
123 .mhandler.cmd_new = do_quit,
124 },
125
126STEXI
127@item q or quit
128Quit the emulator.
129ETEXI
130
131 {
132 .name = "eject",
133 .args_type = "force:-f,device:B",
134 .params = "[-f] device",
135 .help = "eject a removable medium (use -f to force it)",
136 .user_print = monitor_user_noop,
137 .mhandler.cmd_new = do_eject,
138 },
139
140STEXI
141@item eject [-f] @var{device}
142Eject a removable medium (use -f to force it).
143ETEXI
144
145 {
146 .name = "change",
147 .args_type = "device:B,target:F,arg:s?",
148 .params = "device filename [format]",
149 .help = "change a removable medium, optional format",
150 .user_print = monitor_user_noop,
151 .mhandler.cmd_new = do_change,
152 },
153
154STEXI
155@item change @var{device} @var{setting}
156
157Change the configuration of a device.
158
159@table @option
160@item change @var{diskdevice} @var{filename} [@var{format}]
161Change the medium for a removable disk device to point to @var{filename}. eg
162
163@example
164(qemu) change ide1-cd0 /path/to/some.iso
165@end example
166
167@var{format} is optional.
168
169@item change vnc @var{display},@var{options}
170Change the configuration of the VNC server. The valid syntax for @var{display}
171and @var{options} are described at @ref{sec_invocation}. eg
172
173@example
174(qemu) change vnc localhost:1
175@end example
176
177@item change vnc password [@var{password}]
178
179Change the password associated with the VNC server. If the new password is not
180supplied, the monitor will prompt for it to be entered. VNC passwords are only
181significant up to 8 letters. eg
182
183@example
184(qemu) change vnc password
185Password: ********
186@end example
187
188@end table
189ETEXI
190
191 {
192 .name = "screendump",
193 .args_type = "filename:F",
194 .params = "filename",
195 .help = "save screen into PPM image 'filename'",
196 .mhandler.cmd = do_screen_dump,
197 },
198
199STEXI
200@item screendump @var{filename}
201Save screen into PPM image @var{filename}.
202ETEXI
203
204 {
205 .name = "logfile",
206 .args_type = "filename:F",
207 .params = "filename",
208 .help = "output logs to 'filename'",
209 .mhandler.cmd = do_logfile,
210 },
211
212STEXI
213@item logfile @var{filename}
214Output logs to @var{filename}.
215ETEXI
216
217 {
218 .name = "log",
219 .args_type = "items:s",
220 .params = "item1[,...]",
221 .help = "activate logging of the specified items to '/tmp/qemu.log'",
222 .mhandler.cmd = do_log,
223 },
224
225STEXI
226@item log @var{item1}[,...]
227Activate logging of the specified items to @file{/tmp/qemu.log}.
228ETEXI
229
230 {
231 .name = "savevm",
232 .args_type = "name:s?",
233 .params = "[tag|id]",
234 .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
235 .mhandler.cmd = do_savevm,
236 },
237
238STEXI
239@item savevm [@var{tag}|@var{id}]
240Create a snapshot of the whole virtual machine. If @var{tag} is
241provided, it is used as human readable identifier. If there is already
242a snapshot with the same tag or ID, it is replaced. More info at
243@ref{vm_snapshots}.
244ETEXI
245
246 {
247 .name = "loadvm",
248 .args_type = "name:s",
249 .params = "tag|id",
250 .help = "restore a VM snapshot from its tag or id",
251 .mhandler.cmd = do_loadvm,
252 },
253
254STEXI
255@item loadvm @var{tag}|@var{id}
256Set the whole virtual machine to the snapshot identified by the tag
257@var{tag} or the unique snapshot ID @var{id}.
258ETEXI
259
260 {
261 .name = "delvm",
262 .args_type = "name:s",
263 .params = "tag|id",
264 .help = "delete a VM snapshot from its tag or id",
265 .mhandler.cmd = do_delvm,
266 },
267
268STEXI
269@item delvm @var{tag}|@var{id}
270Delete the snapshot identified by @var{tag} or @var{id}.
271ETEXI
272
273 {
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,
279 },
280
281STEXI
282@item singlestep [off]
283Run the emulation in single step mode.
284If called with option off, the emulation returns to normal mode.
285ETEXI
286
287 {
288 .name = "stop",
289 .args_type = "",
290 .params = "",
291 .help = "stop emulation",
292 .user_print = monitor_user_noop,
293 .mhandler.cmd_new = do_stop,
294 },
295
296STEXI
297@item stop
298Stop emulation.
299ETEXI
300
301 {
302 .name = "c|cont",
303 .args_type = "",
304 .params = "",
305 .help = "resume emulation",
306 .user_print = monitor_user_noop,
307 .mhandler.cmd_new = do_cont,
308 },
309
310STEXI
311@item c or cont
312Resume emulation.
313ETEXI
314
315 {
316 .name = "gdbserver",
317 .args_type = "device:s?",
318 .params = "[device]",
319 .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
320 .mhandler.cmd = do_gdbserver,
321 },
322
323STEXI
324@item gdbserver [@var{port}]
325Start gdbserver session (default @var{port}=1234)
326ETEXI
327
328 {
329 .name = "x",
330 .args_type = "fmt:/,addr:l",
331 .params = "/fmt addr",
332 .help = "virtual memory dump starting at 'addr'",
333 .mhandler.cmd = do_memory_dump,
334 },
335
336STEXI
337@item x/fmt @var{addr}
338Virtual memory dump starting at @var{addr}.
339ETEXI
340
341 {
342 .name = "xp",
343 .args_type = "fmt:/,addr:l",
344 .params = "/fmt addr",
345 .help = "physical memory dump starting at 'addr'",
346 .mhandler.cmd = do_physical_memory_dump,
347 },
348
349STEXI
350@item xp /@var{fmt} @var{addr}
351Physical memory dump starting at @var{addr}.
352
353@var{fmt} is a format which tells the command how to format the
354data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
355
356@table @var
357@item count
358is the number of items to be dumped.
359
360@item format
361can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
362c (char) or i (asm instruction).
363
364@item size
365can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
366@code{h} or @code{w} can be specified with the @code{i} format to
367respectively select 16 or 32 bit code instruction size.
368
369@end table
370
371Examples:
372@itemize
373@item
374Dump 10 instructions at the current instruction pointer:
375@example
376(qemu) x/10i $eip
3770x90107063: ret
3780x90107064: sti
3790x90107065: lea 0x0(%esi,1),%esi
3800x90107069: lea 0x0(%edi,1),%edi
3810x90107070: ret
3820x90107071: jmp 0x90107080
3830x90107073: nop
3840x90107074: nop
3850x90107075: nop
3860x90107076: nop
387@end example
388
389@item
390Dump 80 16 bit values at the start of the video memory.
391@smallexample
392(qemu) xp/80hx 0xb8000
3930x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
3940x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
3950x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
3960x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
3970x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
3980x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
3990x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4000x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4010x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4020x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
403@end smallexample
404@end itemize
405ETEXI
406
407 {
408 .name = "p|print",
409 .args_type = "fmt:/,val:l",
410 .params = "/fmt expr",
411 .help = "print expression value (use $reg for CPU register access)",
412 .mhandler.cmd = do_print,
413 },
414
415STEXI
416@item p or print/@var{fmt} @var{expr}
417
418Print expression value. Only the @var{format} part of @var{fmt} is
419used.
420ETEXI
421
422 {
423 .name = "i",
424 .args_type = "fmt:/,addr:i,index:i.",
425 .params = "/fmt addr",
426 .help = "I/O port read",
427 .mhandler.cmd = do_ioport_read,
428 },
429
430STEXI
431Read I/O port.
432ETEXI
433
434 {
435 .name = "o",
436 .args_type = "fmt:/,addr:i,val:i",
437 .params = "/fmt addr value",
438 .help = "I/O port write",
439 .mhandler.cmd = do_ioport_write,
440 },
441
442STEXI
443Write to I/O port.
444ETEXI
445
446 {
447 .name = "sendkey",
448 .args_type = "string:s,hold_time:i?",
449 .params = "keys [hold_ms]",
450 .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
451 .mhandler.cmd = do_sendkey,
452 },
453
454STEXI
455@item sendkey @var{keys}
456
457Send @var{keys} to the emulator. @var{keys} could be the name of the
458key or @code{#} followed by the raw value in either decimal or hexadecimal
459format. Use @code{-} to press several keys simultaneously. Example:
460@example
461sendkey ctrl-alt-f1
462@end example
463
464This command is useful to send keys that your graphical user interface
465intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
466ETEXI
467
468 {
469 .name = "system_reset",
470 .args_type = "",
471 .params = "",
472 .help = "reset the system",
473 .user_print = monitor_user_noop,
474 .mhandler.cmd_new = do_system_reset,
475 },
476
477STEXI
478@item system_reset
479
480Reset the system.
481ETEXI
482
483 {
484 .name = "system_powerdown",
485 .args_type = "",
486 .params = "",
487 .help = "send system power down event",
488 .user_print = monitor_user_noop,
489 .mhandler.cmd_new = do_system_powerdown,
490 },
491
492STEXI
493@item system_powerdown
494
495Power down the system (if supported).
496ETEXI
497
498 {
499 .name = "sum",
500 .args_type = "start:i,size:i",
501 .params = "addr size",
502 .help = "compute the checksum of a memory region",
503 .mhandler.cmd = do_sum,
504 },
505
506STEXI
507@item sum @var{addr} @var{size}
508
509Compute the checksum of a memory region.
510ETEXI
511
512 {
513 .name = "usb_add",
514 .args_type = "devname:s",
515 .params = "device",
516 .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
517 .mhandler.cmd = do_usb_add,
518 },
519
520STEXI
521@item usb_add @var{devname}
522
523Add the USB device @var{devname}. For details of available devices see
524@ref{usb_devices}
525ETEXI
526
527 {
528 .name = "usb_del",
529 .args_type = "devname:s",
530 .params = "device",
531 .help = "remove USB device 'bus.addr'",
532 .mhandler.cmd = do_usb_del,
533 },
534
535STEXI
536@item usb_del @var{devname}
537
538Remove the USB device @var{devname} from the QEMU virtual USB
539hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
540command @code{info usb} to see the devices you can remove.
541ETEXI
542
543 {
544 .name = "device_add",
545 .args_type = "config:s",
546 .params = "device",
547 .help = "add device, like -device on the command line",
548 .mhandler.cmd = do_device_add,
549 },
550
551STEXI
552@item device_add @var{config}
553
554Add device.
555ETEXI
556
557 {
558 .name = "device_del",
559 .args_type = "id:s",
560 .params = "device",
561 .help = "remove device",
562 .mhandler.cmd = do_device_del,
563 },
564
565STEXI
566@item device_del @var{id}
567
568Remove device @var{id}.
569ETEXI
570
571 {
572 .name = "cpu",
573 .args_type = "index:i",
574 .params = "index",
575 .help = "set the default CPU",
576 .mhandler.cmd = do_cpu_set,
577 },
578
579STEXI
580Set the default CPU.
581ETEXI
582
583 {
584 .name = "mouse_move",
585 .args_type = "dx_str:s,dy_str:s,dz_str:s?",
586 .params = "dx dy [dz]",
587 .help = "send mouse move events",
588 .mhandler.cmd = do_mouse_move,
589 },
590
591STEXI
592@item mouse_move @var{dx} @var{dy} [@var{dz}]
593Move the active mouse to the specified coordinates @var{dx} @var{dy}
594with optional scroll axis @var{dz}.
595ETEXI
596
597 {
598 .name = "mouse_button",
599 .args_type = "button_state:i",
600 .params = "state",
601 .help = "change mouse button state (1=L, 2=M, 4=R)",
602 .mhandler.cmd = do_mouse_button,
603 },
604
605STEXI
606@item mouse_button @var{val}
607Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
608ETEXI
609
610 {
611 .name = "mouse_set",
612 .args_type = "index:i",
613 .params = "index",
614 .help = "set which mouse device receives events",
615 .mhandler.cmd = do_mouse_set,
616 },
617
618STEXI
619@item mouse_set @var{index}
620Set which mouse device receives events at given @var{index}, index
621can be obtained with
622@example
623info mice
624@end example
625ETEXI
626
627#ifdef HAS_AUDIO
628 {
629 .name = "wavcapture",
630 .args_type = "path:F,freq:i?,bits:i?,nchannels:i?",
631 .params = "path [frequency [bits [channels]]]",
632 .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
633 .mhandler.cmd = do_wav_capture,
634 },
635#endif
636STEXI
637@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
638Capture audio into @var{filename}. Using sample rate @var{frequency}
639bits per sample @var{bits} and number of channels @var{channels}.
640
641Defaults:
642@itemize @minus
643@item Sample rate = 44100 Hz - CD quality
644@item Bits = 16
645@item Number of channels = 2 - Stereo
646@end itemize
647ETEXI
648
649#ifdef HAS_AUDIO
650 {
651 .name = "stopcapture",
652 .args_type = "n:i",
653 .params = "capture index",
654 .help = "stop capture",
655 .mhandler.cmd = do_stop_capture,
656 },
657#endif
658STEXI
659@item stopcapture @var{index}
660Stop capture with a given @var{index}, index can be obtained with
661@example
662info capture
663@end example
664ETEXI
665
666 {
667 .name = "memsave",
668 .args_type = "val:l,size:i,filename:s",
669 .params = "addr size file",
670 .help = "save to disk virtual memory dump starting at 'addr' of size 'size'",
671 .user_print = monitor_user_noop,
672 .mhandler.cmd_new = do_memory_save,
673 },
674
675STEXI
676@item memsave @var{addr} @var{size} @var{file}
677save to disk virtual memory dump starting at @var{addr} of size @var{size}.
678ETEXI
679
680 {
681 .name = "pmemsave",
682 .args_type = "val:l,size:i,filename:s",
683 .params = "addr size file",
684 .help = "save to disk physical memory dump starting at 'addr' of size 'size'",
685 .user_print = monitor_user_noop,
686 .mhandler.cmd_new = do_physical_memory_save,
687 },
688
689STEXI
690@item pmemsave @var{addr} @var{size} @var{file}
691save to disk physical memory dump starting at @var{addr} of size @var{size}.
692ETEXI
693
694 {
695 .name = "boot_set",
696 .args_type = "bootdevice:s",
697 .params = "bootdevice",
698 .help = "define new values for the boot device list",
699 .mhandler.cmd = do_boot_set,
700 },
701
702STEXI
703@item boot_set @var{bootdevicelist}
704
705Define new values for the boot device list. Those values will override
706the values specified on the command line through the @code{-boot} option.
707
708The values that can be specified here depend on the machine type, but are
709the same that can be specified in the @code{-boot} command line option.
710ETEXI
711
712#if defined(TARGET_I386)
713 {
714 .name = "nmi",
715 .args_type = "cpu_index:i",
716 .params = "cpu",
717 .help = "inject an NMI on the given CPU",
718 .mhandler.cmd = do_inject_nmi,
719 },
720#endif
721STEXI
722@item nmi @var{cpu}
723Inject an NMI on the given CPU (x86 only).
724ETEXI
725
726 {
727 .name = "migrate",
728 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
729 .params = "[-d] [-b] [-i] uri",
730 .help = "migrate to URI (using -d to not wait for completion)"
731 "\n\t\t\t -b for migration without shared storage with"
732 " full copy of disk\n\t\t\t -i for migration without "
733 "shared storage with incremental copy of disk "
734 "(base image shared between src and destination)",
735 .user_print = monitor_user_noop,
736 .mhandler.cmd_new = do_migrate,
737 },
738
739
740STEXI
741@item migrate [-d] [-b] [-i] @var{uri}
742Migrate to @var{uri} (using -d to not wait for completion).
743 -b for migration with full copy of disk
744 -i for migration with incremental copy of disk (base image is shared)
745ETEXI
746
747 {
748 .name = "migrate_cancel",
749 .args_type = "",
750 .params = "",
751 .help = "cancel the current VM migration",
752 .user_print = monitor_user_noop,
753 .mhandler.cmd_new = do_migrate_cancel,
754 },
755
756STEXI
757@item migrate_cancel
758Cancel the current VM migration.
759ETEXI
760
761 {
762 .name = "migrate_set_speed",
763 .args_type = "value:s",
764 .params = "value",
765 .help = "set maximum speed (in bytes) for migrations",
766 .mhandler.cmd = do_migrate_set_speed,
767 },
768
769STEXI
770@item migrate_set_speed @var{value}
771Set maximum speed to @var{value} (in bytes) for migrations.
772ETEXI
773
774 {
775 .name = "migrate_set_downtime",
776 .args_type = "value:s",
777 .params = "value",
778 .help = "set maximum tolerated downtime (in seconds) for migrations",
779 .mhandler.cmd = do_migrate_set_downtime,
780 },
781
782STEXI
783@item migrate_set_downtime @var{second}
784Set maximum tolerated downtime (in seconds) for migration.
785ETEXI
786
787#if defined(TARGET_I386)
788 {
789 .name = "drive_add",
790 .args_type = "pci_addr:s,opts:s",
791 .params = "[[<domain>:]<bus>:]<slot>\n"
792 "[file=file][,if=type][,bus=n]\n"
793 "[,unit=m][,media=d][index=i]\n"
794 "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
795 "[snapshot=on|off][,cache=on|off]",
796 .help = "add drive to PCI storage controller",
797 .mhandler.cmd = drive_hot_add,
798 },
799#endif
800
801STEXI
802@item drive_add
803Add drive to PCI storage controller.
804ETEXI
805
806#if defined(TARGET_I386)
807 {
808 .name = "pci_add",
809 .args_type = "pci_addr:s,type:s,opts:s?",
810 .params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
811 .help = "hot-add PCI device",
812 .user_print = pci_device_hot_add_print,
813 .mhandler.cmd_new = pci_device_hot_add,
814 },
815#endif
816
817STEXI
818@item pci_add
819Hot-add PCI device.
820ETEXI
821
822#if defined(TARGET_I386)
823 {
824 .name = "pci_del",
825 .args_type = "pci_addr:s",
826 .params = "[[<domain>:]<bus>:]<slot>",
827 .help = "hot remove PCI device",
828 .user_print = monitor_user_noop,
829 .mhandler.cmd_new = do_pci_device_hot_remove,
830 },
831#endif
832
833STEXI
834@item pci_del
835Hot remove PCI device.
836ETEXI
837
838 {
839 .name = "host_net_add",
840 .args_type = "device:s,opts:s?",
841 .params = "tap|user|socket|vde|dump [options]",
842 .help = "add host VLAN client",
843 .mhandler.cmd = net_host_device_add,
844 },
845
846STEXI
847@item host_net_add
848Add host VLAN client.
849ETEXI
850
851 {
852 .name = "host_net_remove",
853 .args_type = "vlan_id:i,device:s",
854 .params = "vlan_id name",
855 .help = "remove host VLAN client",
856 .mhandler.cmd = net_host_device_remove,
857 },
858
859STEXI
860@item host_net_remove
861Remove host VLAN client.
862ETEXI
863
864#ifdef CONFIG_SLIRP
865 {
866 .name = "hostfwd_add",
867 .args_type = "arg1:s,arg2:s?,arg3:s?",
868 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
869 .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
870 .mhandler.cmd = net_slirp_hostfwd_add,
871 },
872
873 {
874 .name = "hostfwd_remove",
875 .args_type = "arg1:s,arg2:s?,arg3:s?",
876 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
877 .help = "remove host-to-guest TCP or UDP redirection",
878 .mhandler.cmd = net_slirp_hostfwd_remove,
879 },
880
881#endif
882STEXI
883@item host_net_redir
884Redirect TCP or UDP connections from host to guest (requires -net user).
885ETEXI
886
887 {
888 .name = "balloon",
889 .args_type = "value:M",
890 .params = "target",
891 .help = "request VM to change it's memory allocation (in MB)",
892 .user_print = monitor_user_noop,
893 .mhandler.cmd_new = do_balloon,
894 },
895
896STEXI
897@item balloon @var{value}
898Request VM to change its memory allocation to @var{value} (in MB).
899ETEXI
900
901 {
902 .name = "set_link",
903 .args_type = "name:s,up_or_down:s",
904 .params = "name up|down",
905 .help = "change the link status of a network adapter",
906 .mhandler.cmd = do_set_link,
907 },
908
909STEXI
910@item set_link @var{name} [up|down]
911Set link @var{name} up or down.
912ETEXI
913
914 {
915 .name = "watchdog_action",
916 .args_type = "action:s",
917 .params = "[reset|shutdown|poweroff|pause|debug|none]",
918 .help = "change watchdog action",
919 .mhandler.cmd = do_watchdog_action,
920 },
921
922STEXI
923@item watchdog_action
924Change watchdog action.
925ETEXI
926
927 {
928 .name = "acl_show",
929 .args_type = "aclname:s",
930 .params = "aclname",
931 .help = "list rules in the access control list",
932 .mhandler.cmd = do_acl_show,
933 },
934
935STEXI
936@item acl_show @var{aclname}
937List all the matching rules in the access control list, and the default
938policy. There are currently two named access control lists,
939@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
940certificate distinguished name, and SASL username respectively.
941ETEXI
942
943 {
944 .name = "acl_policy",
945 .args_type = "aclname:s,policy:s",
946 .params = "aclname allow|deny",
947 .help = "set default access control list policy",
948 .mhandler.cmd = do_acl_policy,
949 },
950
951STEXI
952@item acl_policy @var{aclname} @code{allow|deny}
953Set the default access control list policy, used in the event that
954none of the explicit rules match. The default policy at startup is
955always @code{deny}.
956ETEXI
957
958 {
959 .name = "acl_add",
960 .args_type = "aclname:s,match:s,policy:s,index:i?",
961 .params = "aclname match allow|deny [index]",
962 .help = "add a match rule to the access control list",
963 .mhandler.cmd = do_acl_add,
964 },
965
966STEXI
967@item acl_allow @var{aclname} @var{match} @code{allow|deny} [@var{index}]
968Add a match rule to the access control list, allowing or denying access.
969The match will normally be an exact username or x509 distinguished name,
970but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
971allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
972normally be appended to the end of the ACL, but can be inserted
973earlier in the list if the optional @var{index} parameter is supplied.
974ETEXI
975
976 {
977 .name = "acl_remove",
978 .args_type = "aclname:s,match:s",
979 .params = "aclname match",
980 .help = "remove a match rule from the access control list",
981 .mhandler.cmd = do_acl_remove,
982 },
983
984STEXI
985@item acl_remove @var{aclname} @var{match}
986Remove the specified match rule from the access control list.
987ETEXI
988
989 {
990 .name = "acl_reset",
991 .args_type = "aclname:s",
992 .params = "aclname",
993 .help = "reset the access control list",
994 .mhandler.cmd = do_acl_reset,
995 },
996
997STEXI
998@item acl_remove @var{aclname} @var{match}
999Remove all matches from the access control list, and set the default
1000policy back to @code{deny}.
1001ETEXI
1002
1003#if defined(TARGET_I386)
1004
1005 {
1006 .name = "mce",
1007 .args_type = "cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
1008 .params = "cpu bank status mcgstatus addr misc",
1009 .help = "inject a MCE on the given CPU",
1010 .mhandler.cmd = do_inject_mce,
1011 },
1012
1013#endif
1014STEXI
1015@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
1016Inject an MCE on the given CPU (x86 only).
1017ETEXI
1018
1019 {
1020 .name = "getfd",
1021 .args_type = "fdname:s",
1022 .params = "getfd name",
1023 .help = "receive a file descriptor via SCM rights and assign it a name",
1024 .user_print = monitor_user_noop,
1025 .mhandler.cmd_new = do_getfd,
1026 },
1027
1028STEXI
1029@item getfd @var{fdname}
1030If a file descriptor is passed alongside this command using the SCM_RIGHTS
1031mechanism on unix sockets, it is stored using the name @var{fdname} for
1032later use by other monitor commands.
1033ETEXI
1034
1035 {
1036 .name = "closefd",
1037 .args_type = "fdname:s",
1038 .params = "closefd name",
1039 .help = "close a file descriptor previously passed via SCM rights",
1040 .user_print = monitor_user_noop,
1041 .mhandler.cmd_new = do_closefd,
1042 },
1043
1044STEXI
1045@item closefd @var{fdname}
1046Close the file descriptor previously assigned to @var{fdname} using the
1047@code{getfd} command. This is only needed if the file descriptor was never
1048used by another monitor command.
1049ETEXI
1050
1051 {
1052 .name = "block_passwd",
1053 .args_type = "device:B,password:s",
1054 .params = "block_passwd device password",
1055 .help = "set the password of encrypted block devices",
1056 .user_print = monitor_user_noop,
1057 .mhandler.cmd_new = do_block_set_passwd,
1058 },
1059
1060STEXI
1061@item block_passwd @var{device} @var{password}
1062Set the encrypted device @var{device} password to @var{password}
1063ETEXI
1064
1065STEXI
1066@end table
1067ETEXI