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