Commit 2313086addaf609c5f64636591818eebc213fd53

Authored by Blue Swirl
1 parent 25517f99

Use hxtool to generate monitor documentation and C structures

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Makefile
@@ -332,7 +332,10 @@ cscope: @@ -332,7 +332,10 @@ cscope:
332 qemu-options.texi: $(SRC_PATH)/qemu-options.hx 332 qemu-options.texi: $(SRC_PATH)/qemu-options.hx
333 $(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@") 333 $(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@")
334 334
335 -qemu.1: qemu-doc.texi qemu-options.texi 335 +qemu-monitor.texi: $(SRC_PATH)/qemu-monitor.hx
  336 + $(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@")
  337 +
  338 +qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
336 $(call quiet-command, \ 339 $(call quiet-command, \
337 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu.pod && \ 340 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu.pod && \
338 pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \ 341 pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \
@@ -356,7 +359,7 @@ dvi: qemu-doc.dvi qemu-tech.dvi @@ -356,7 +359,7 @@ dvi: qemu-doc.dvi qemu-tech.dvi
356 359
357 html: qemu-doc.html qemu-tech.html 360 html: qemu-doc.html qemu-tech.html
358 361
359 -qemu-doc.dvi qemu-doc.html qemu-doc.info: qemu-img.texi qemu-nbd.texi qemu-options.texi 362 +qemu-doc.dvi qemu-doc.html qemu-doc.info: qemu-img.texi qemu-nbd.texi qemu-options.texi qemu-monitor.texi
360 363
361 VERSION ?= $(shell cat VERSION) 364 VERSION ?= $(shell cat VERSION)
362 FILE = qemu-$(VERSION) 365 FILE = qemu-$(VERSION)
Makefile.target
@@ -732,6 +732,8 @@ endif @@ -732,6 +732,8 @@ endif
732 732
733 vl.o: qemu-options.h 733 vl.o: qemu-options.h
734 734
  735 +monitor.o: qemu-monitor.h
  736 +
735 $(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) $(CURL_LIBS) 737 $(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) $(CURL_LIBS)
736 $(QEMU_PROG): ARLIBS=../libqemu_common.a libqemu.a $(HWLIB) 738 $(QEMU_PROG): ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
737 $(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a $(HWLIB) 739 $(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a $(HWLIB)
@@ -749,9 +751,13 @@ endif @@ -749,9 +751,13 @@ endif
749 qemu-options.h: $(SRC_PATH)/qemu-options.hx 751 qemu-options.h: $(SRC_PATH)/qemu-options.hx
750 $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@") 752 $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@")
751 753
  754 +qemu-monitor.h: $(SRC_PATH)/qemu-monitor.hx
  755 + $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@")
  756 +
752 clean: 757 clean:
753 - rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o qemu-options.h gdbstub-xml.c 758 + rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
754 rm -f *.d */*.d tcg/*.o 759 rm -f *.d */*.d tcg/*.o
  760 + rm -f qemu-options.h qemu-monitor.h gdbstub-xml.c
755 761
756 install: all 762 install: all
757 ifneq ($(PROGS),) 763 ifneq ($(PROGS),)
monitor.c
@@ -1496,6 +1496,7 @@ static void do_info_capture(Monitor *mon) @@ -1496,6 +1496,7 @@ static void do_info_capture(Monitor *mon)
1496 } 1496 }
1497 } 1497 }
1498 1498
  1499 +#ifdef HAS_AUDIO
1499 static void do_stop_capture(Monitor *mon, int n) 1500 static void do_stop_capture(Monitor *mon, int n)
1500 { 1501 {
1501 int i; 1502 int i;
@@ -1511,7 +1512,6 @@ static void do_stop_capture(Monitor *mon, int n) @@ -1511,7 +1512,6 @@ static void do_stop_capture(Monitor *mon, int n)
1511 } 1512 }
1512 } 1513 }
1513 1514
1514 -#ifdef HAS_AUDIO  
1515 static void do_wav_capture(Monitor *mon, const char *path, 1515 static void do_wav_capture(Monitor *mon, const char *path,
1516 int has_freq, int freq, 1516 int has_freq, int freq,
1517 int has_bits, int bits, 1517 int has_bits, int bits,
@@ -1659,128 +1659,12 @@ static void do_acl(Monitor *mon, @@ -1659,128 +1659,12 @@ static void do_acl(Monitor *mon,
1659 } 1659 }
1660 } 1660 }
1661 1661
1662 -/* Please update qemu-doc.texi when adding or changing commands */  
1663 static const mon_cmd_t mon_cmds[] = { 1662 static const mon_cmd_t mon_cmds[] = {
1664 - { "help|?", "s?", help_cmd,  
1665 - "[cmd]", "show the help" },  
1666 - { "commit", "s", do_commit,  
1667 - "device|all", "commit changes to the disk images (if -snapshot is used) or backing files" },  
1668 - { "info", "s?", do_info,  
1669 - "[subcommand]", "show various information about the system state" },  
1670 - { "q|quit", "", do_quit,  
1671 - "", "quit the emulator" },  
1672 - { "eject", "-fB", do_eject,  
1673 - "[-f] device", "eject a removable medium (use -f to force it)" },  
1674 - { "change", "BFs?", do_change,  
1675 - "device filename [format]", "change a removable medium, optional format" },  
1676 - { "screendump", "F", do_screen_dump,  
1677 - "filename", "save screen into PPM image 'filename'" },  
1678 - { "logfile", "F", do_logfile,  
1679 - "filename", "output logs to 'filename'" },  
1680 - { "log", "s", do_log,  
1681 - "item1[,...]", "activate logging of the specified items to '/tmp/qemu.log'" },  
1682 - { "savevm", "s?", do_savevm,  
1683 - "[tag|id]", "save a VM snapshot. If no tag or id are provided, a new snapshot is created" },  
1684 - { "loadvm", "s", do_loadvm,  
1685 - "tag|id", "restore a VM snapshot from its tag or id" },  
1686 - { "delvm", "s", do_delvm,  
1687 - "tag|id", "delete a VM snapshot from its tag or id" },  
1688 - { "singlestep", "s?", do_singlestep,  
1689 - "[on|off]", "run emulation in singlestep mode or switch to normal mode", },  
1690 - { "stop", "", do_stop,  
1691 - "", "stop emulation", },  
1692 - { "c|cont", "", do_cont,  
1693 - "", "resume emulation", },  
1694 - { "gdbserver", "s?", do_gdbserver,  
1695 - "[device]", "start gdbserver on given device (default 'tcp::1234'), stop with 'none'", },  
1696 - { "x", "/l", do_memory_dump,  
1697 - "/fmt addr", "virtual memory dump starting at 'addr'", },  
1698 - { "xp", "/l", do_physical_memory_dump,  
1699 - "/fmt addr", "physical memory dump starting at 'addr'", },  
1700 - { "p|print", "/l", do_print,  
1701 - "/fmt expr", "print expression value (use $reg for CPU register access)", },  
1702 - { "i", "/ii.", do_ioport_read,  
1703 - "/fmt addr", "I/O port read" },  
1704 -  
1705 - { "sendkey", "si?", do_sendkey,  
1706 - "keys [hold_ms]", "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)" },  
1707 - { "system_reset", "", do_system_reset,  
1708 - "", "reset the system" },  
1709 - { "system_powerdown", "", do_system_powerdown,  
1710 - "", "send system power down event" },  
1711 - { "sum", "ii", do_sum,  
1712 - "addr size", "compute the checksum of a memory region" },  
1713 - { "usb_add", "s", do_usb_add,  
1714 - "device", "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')" },  
1715 - { "usb_del", "s", do_usb_del,  
1716 - "device", "remove USB device 'bus.addr'" },  
1717 - { "cpu", "i", do_cpu_set,  
1718 - "index", "set the default CPU" },  
1719 - { "mouse_move", "sss?", do_mouse_move,  
1720 - "dx dy [dz]", "send mouse move events" },  
1721 - { "mouse_button", "i", do_mouse_button,  
1722 - "state", "change mouse button state (1=L, 2=M, 4=R)" },  
1723 - { "mouse_set", "i", do_mouse_set,  
1724 - "index", "set which mouse device receives events" },  
1725 -#ifdef HAS_AUDIO  
1726 - { "wavcapture", "si?i?i?", do_wav_capture,  
1727 - "path [frequency [bits [channels]]]",  
1728 - "capture audio to a wave file (default frequency=44100 bits=16 channels=2)" },  
1729 -#endif  
1730 - { "stopcapture", "i", do_stop_capture,  
1731 - "capture index", "stop capture" },  
1732 - { "memsave", "lis", do_memory_save,  
1733 - "addr size file", "save to disk virtual memory dump starting at 'addr' of size 'size'", },  
1734 - { "pmemsave", "lis", do_physical_memory_save,  
1735 - "addr size file", "save to disk physical memory dump starting at 'addr' of size 'size'", },  
1736 - { "boot_set", "s", do_boot_set,  
1737 - "bootdevice", "define new values for the boot device list" },  
1738 -#if defined(TARGET_I386)  
1739 - { "nmi", "i", do_inject_nmi,  
1740 - "cpu", "inject an NMI on the given CPU", },  
1741 -#endif  
1742 - { "migrate", "-ds", do_migrate,  
1743 - "[-d] uri", "migrate to URI (using -d to not wait for completion)" },  
1744 - { "migrate_cancel", "", do_migrate_cancel,  
1745 - "", "cancel the current VM migration" },  
1746 - { "migrate_set_speed", "s", do_migrate_set_speed,  
1747 - "value", "set maximum speed (in bytes) for migrations" },  
1748 -#if defined(TARGET_I386)  
1749 - { "drive_add", "ss", drive_hot_add, "pci_addr=[[<domain>:]<bus>:]<slot>\n"  
1750 - "[file=file][,if=type][,bus=n]\n"  
1751 - "[,unit=m][,media=d][index=i]\n"  
1752 - "[,cyls=c,heads=h,secs=s[,trans=t]]\n"  
1753 - "[snapshot=on|off][,cache=on|off]",  
1754 - "add drive to PCI storage controller" },  
1755 - { "pci_add", "sss", pci_device_hot_add, "pci_addr=auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...", "hot-add PCI device" },  
1756 - { "pci_del", "s", pci_device_hot_remove, "pci_addr=[[<domain>:]<bus>:]<slot>", "hot remove PCI device" },  
1757 -#endif  
1758 - { "host_net_add", "ss?", net_host_device_add,  
1759 - "tap|user|socket|vde|dump [options]", "add host VLAN client" },  
1760 - { "host_net_remove", "is", net_host_device_remove,  
1761 - "vlan_id name", "remove host VLAN client" },  
1762 -#ifdef CONFIG_SLIRP  
1763 - { "host_net_redir", "ss?", net_slirp_redir,  
1764 - "[tcp|udp]:host-port:[guest-host]:guest-port", "redirect TCP or UDP connections from host to guest (requires -net user)\n"  
1765 - "host_net_redir remove [tcp:|udp:]host-port -- remove redirection\n"  
1766 - "host_net_redir list -- show all redirections" },  
1767 -#endif  
1768 - { "balloon", "i", do_balloon,  
1769 - "target", "request VM to change it's memory allocation (in MB)" },  
1770 - { "set_link", "ss", do_set_link,  
1771 - "name up|down", "change the link status of a network adapter" },  
1772 - { "watchdog_action", "s", do_watchdog_action,  
1773 - "[reset|shutdown|poweroff|pause|debug|none]", "change watchdog action" },  
1774 - { "acl", "sss?i?", do_acl, "<command> <aclname> [<match> [<index>]]\n",  
1775 - "acl show vnc.username\n"  
1776 - "acl policy vnc.username deny\n"  
1777 - "acl allow vnc.username fred\n"  
1778 - "acl deny vnc.username bob\n"  
1779 - "acl reset vnc.username\n" }, 1663 +#include "qemu-monitor.h"
1780 { NULL, NULL, }, 1664 { NULL, NULL, },
1781 }; 1665 };
1782 1666
1783 -/* Please update qemu-doc.texi when adding or changing commands */ 1667 +/* Please update qemu-monitor.hx when adding or changing commands */
1784 static const mon_cmd_t info_cmds[] = { 1668 static const mon_cmd_t info_cmds[] = {
1785 { "version", "", do_info_version, 1669 { "version", "", do_info_version,
1786 "", "show the version of QEMU" }, 1670 "", "show the version of QEMU" },
qemu-doc.texi
@@ -318,357 +318,7 @@ from a disk file. @@ -318,357 +318,7 @@ from a disk file.
318 318
319 The following commands are available: 319 The following commands are available:
320 320
321 -@table @option  
322 -  
323 -@item help or ? [@var{cmd}]  
324 -Show the help for all commands or just for command @var{cmd}.  
325 -  
326 -@item commit  
327 -Commit changes to the disk images (if -snapshot is used).  
328 -  
329 -@item info @var{subcommand}  
330 -Show various information about the system state.  
331 -  
332 -@table @option  
333 -@item info version  
334 -show the version of QEMU  
335 -@item info network  
336 -show the various VLANs and the associated devices  
337 -@item info chardev  
338 -show the character devices  
339 -@item info block  
340 -show the block devices  
341 -@item info block  
342 -show block device statistics  
343 -@item info registers  
344 -show the cpu registers  
345 -@item info cpus  
346 -show infos for each CPU  
347 -@item info history  
348 -show the command line history  
349 -@item info irq  
350 -show the interrupts statistics (if available)  
351 -@item info pic  
352 -show i8259 (PIC) state  
353 -@item info pci  
354 -show emulated PCI device info  
355 -@item info tlb  
356 -show virtual to physical memory mappings (i386 only)  
357 -@item info mem  
358 -show the active virtual memory mappings (i386 only)  
359 -@item info hpet  
360 -show state of HPET (i386 only)  
361 -@item info kqemu  
362 -show KQEMU information  
363 -@item info kvm  
364 -show KVM information  
365 -@item info usb  
366 -show USB devices plugged on the virtual USB hub  
367 -@item info usbhost  
368 -show all USB host devices  
369 -@item info profile  
370 -show profiling information  
371 -@item info capture  
372 -show information about active capturing  
373 -@item info snapshots  
374 -show list of VM snapshots  
375 -@item info status  
376 -show the current VM status (running|paused)  
377 -@item info pcmcia  
378 -show guest PCMCIA status  
379 -@item info mice  
380 -show which guest mouse is receiving events  
381 -@item info vnc  
382 -show the vnc server status  
383 -@item info name  
384 -show the current VM name  
385 -@item info uuid  
386 -show the current VM UUID  
387 -@item info cpustats  
388 -show CPU statistics  
389 -@item info slirp  
390 -show SLIRP statistics (if available)  
391 -@item info migrate  
392 -show migration status  
393 -@item info balloon  
394 -show balloon information  
395 -@end table  
396 -  
397 -@item q or quit  
398 -Quit the emulator.  
399 -  
400 -@item eject [-f] @var{device}  
401 -Eject a removable medium (use -f to force it).  
402 -  
403 -@item change @var{device} @var{setting}  
404 -  
405 -Change the configuration of a device.  
406 -  
407 -@table @option  
408 -@item change @var{diskdevice} @var{filename} [@var{format}]  
409 -Change the medium for a removable disk device to point to @var{filename}. eg  
410 -  
411 -@example  
412 -(qemu) change ide1-cd0 /path/to/some.iso  
413 -@end example  
414 -  
415 -@var{format} is optional.  
416 -  
417 -@item change vnc @var{display},@var{options}  
418 -Change the configuration of the VNC server. The valid syntax for @var{display}  
419 -and @var{options} are described at @ref{sec_invocation}. eg  
420 -  
421 -@example  
422 -(qemu) change vnc localhost:1  
423 -@end example  
424 -  
425 -@item change vnc password [@var{password}]  
426 -  
427 -Change the password associated with the VNC server. If the new password is not  
428 -supplied, the monitor will prompt for it to be entered. VNC passwords are only  
429 -significant up to 8 letters. eg  
430 -  
431 -@example  
432 -(qemu) change vnc password  
433 -Password: ********  
434 -@end example  
435 -  
436 -@end table  
437 -  
438 -@item acl @var{subcommand} @var{aclname} @var{match} @var{index}  
439 -  
440 -Manage access control lists for network services. There are currently  
441 -two named access control lists, @var{vnc.x509dname} and @var{vnc.username}  
442 -matching on the x509 client certificate distinguished name, and SASL  
443 -username respectively.  
444 -  
445 -@table @option  
446 -@item acl show <aclname>  
447 -list all the match rules in the access control list, and the default  
448 -policy  
449 -@item acl policy <aclname> @code{allow|deny}  
450 -set the default access control list policy, used in the event that  
451 -none of the explicit rules match. The default policy at startup is  
452 -always @code{deny}  
453 -@item acl allow <aclname> <match> [<index>]  
454 -add a match to the access control list, allowing access. The match will  
455 -normally be an exact username or x509 distinguished name, but can  
456 -optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to allow  
457 -all users in the @code{EXAMPLE.COM} kerberos realm. The match will  
458 -normally be appended to the end of the ACL, but can be inserted  
459 -earlier in the list if the optional @code{index} parameter is supplied.  
460 -@item acl deny <aclname> <match> [<index>]  
461 -add a match to the access control list, denying access. The match will  
462 -normally be an exact username or x509 distinguished name, but can  
463 -optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to allow  
464 -all users in the @code{EXAMPLE.COM} kerberos realm. The match will  
465 -normally be appended to the end of the ACL, but can be inserted  
466 -earlier in the list if the optional @code{index} parameter is supplied.  
467 -@item acl remove <aclname> <match>  
468 -remove the specified match rule from the access control list.  
469 -@item acl reset <aclname>  
470 -remove all matches from the access control list, and set the default  
471 -policy back to @code{deny}.  
472 -@end table  
473 -  
474 -@item screendump @var{filename}  
475 -Save screen into PPM image @var{filename}.  
476 -  
477 -@item logfile @var{filename}  
478 -Output logs to @var{filename}.  
479 -  
480 -@item log @var{item1}[,...]  
481 -Activate logging of the specified items to @file{/tmp/qemu.log}.  
482 -  
483 -@item savevm [@var{tag}|@var{id}]  
484 -Create a snapshot of the whole virtual machine. If @var{tag} is  
485 -provided, it is used as human readable identifier. If there is already  
486 -a snapshot with the same tag or ID, it is replaced. More info at  
487 -@ref{vm_snapshots}.  
488 -  
489 -@item loadvm @var{tag}|@var{id}  
490 -Set the whole virtual machine to the snapshot identified by the tag  
491 -@var{tag} or the unique snapshot ID @var{id}.  
492 -  
493 -@item delvm @var{tag}|@var{id}  
494 -Delete the snapshot identified by @var{tag} or @var{id}.  
495 -  
496 -@item singlestep [off]  
497 -Run the emulation in single step mode.  
498 -If called with option off, the emulation returns to normal mode.  
499 -  
500 -@item stop  
501 -Stop emulation.  
502 -  
503 -@item c or cont  
504 -Resume emulation.  
505 -  
506 -@item gdbserver [@var{port}]  
507 -Start gdbserver session (default @var{port}=1234)  
508 -  
509 -@item x/fmt @var{addr}  
510 -Virtual memory dump starting at @var{addr}.  
511 -  
512 -@item xp /@var{fmt} @var{addr}  
513 -Physical memory dump starting at @var{addr}.  
514 -  
515 -@var{fmt} is a format which tells the command how to format the  
516 -data. Its syntax is: @option{/@{count@}@{format@}@{size@}}  
517 -  
518 -@table @var  
519 -@item count  
520 -is the number of items to be dumped.  
521 -  
522 -@item format  
523 -can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),  
524 -c (char) or i (asm instruction).  
525 -  
526 -@item size  
527 -can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,  
528 -@code{h} or @code{w} can be specified with the @code{i} format to  
529 -respectively select 16 or 32 bit code instruction size.  
530 -  
531 -@end table  
532 -  
533 -Examples:  
534 -@itemize  
535 -@item  
536 -Dump 10 instructions at the current instruction pointer:  
537 -@example  
538 -(qemu) x/10i $eip  
539 -0x90107063: ret  
540 -0x90107064: sti  
541 -0x90107065: lea 0x0(%esi,1),%esi  
542 -0x90107069: lea 0x0(%edi,1),%edi  
543 -0x90107070: ret  
544 -0x90107071: jmp 0x90107080  
545 -0x90107073: nop  
546 -0x90107074: nop  
547 -0x90107075: nop  
548 -0x90107076: nop  
549 -@end example  
550 -  
551 -@item  
552 -Dump 80 16 bit values at the start of the video memory.  
553 -@smallexample  
554 -(qemu) xp/80hx 0xb8000  
555 -0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42  
556 -0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41  
557 -0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72  
558 -0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73  
559 -0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20  
560 -0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720  
561 -0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720  
562 -0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720  
563 -0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720  
564 -0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720  
565 -@end smallexample  
566 -@end itemize  
567 -  
568 -@item p or print/@var{fmt} @var{expr}  
569 -  
570 -Print expression value. Only the @var{format} part of @var{fmt} is  
571 -used.  
572 -  
573 -@item sendkey @var{keys}  
574 -  
575 -Send @var{keys} to the emulator. @var{keys} could be the name of the  
576 -key or @code{#} followed by the raw value in either decimal or hexadecimal  
577 -format. Use @code{-} to press several keys simultaneously. Example:  
578 -@example  
579 -sendkey ctrl-alt-f1  
580 -@end example  
581 -  
582 -This command is useful to send keys that your graphical user interface  
583 -intercepts at low level, such as @code{ctrl-alt-f1} in X Window.  
584 -  
585 -@item system_reset  
586 -  
587 -Reset the system.  
588 -  
589 -@item system_powerdown  
590 -  
591 -Power down the system (if supported).  
592 -  
593 -@item sum @var{addr} @var{size}  
594 -  
595 -Compute the checksum of a memory region.  
596 -  
597 -@item usb_add @var{devname}  
598 -  
599 -Add the USB device @var{devname}. For details of available devices see  
600 -@ref{usb_devices}  
601 -  
602 -@item usb_del @var{devname}  
603 -  
604 -Remove the USB device @var{devname} from the QEMU virtual USB  
605 -hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor  
606 -command @code{info usb} to see the devices you can remove.  
607 -  
608 -@item mouse_move @var{dx} @var{dy} [@var{dz}]  
609 -Move the active mouse to the specified coordinates @var{dx} @var{dy}  
610 -with optional scroll axis @var{dz}.  
611 -  
612 -@item mouse_button @var{val}  
613 -Change the active mouse button state @var{val} (1=L, 2=M, 4=R).  
614 -  
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 -  
622 -@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]  
623 -Capture audio into @var{filename}. Using sample rate @var{frequency}  
624 -bits per sample @var{bits} and number of channels @var{channels}.  
625 -  
626 -Defaults:  
627 -@itemize @minus  
628 -@item Sample rate = 44100 Hz - CD quality  
629 -@item Bits = 16  
630 -@item Number of channels = 2 - Stereo  
631 -@end itemize  
632 -  
633 -@item stopcapture @var{index}  
634 -Stop capture with a given @var{index}, index can be obtained with  
635 -@example  
636 -info capture  
637 -@end example  
638 -  
639 -@item memsave @var{addr} @var{size} @var{file}  
640 -save to disk virtual memory dump starting at @var{addr} of size @var{size}.  
641 -  
642 -@item pmemsave @var{addr} @var{size} @var{file}  
643 -save to disk physical memory dump starting at @var{addr} of size @var{size}.  
644 -  
645 -@item boot_set @var{bootdevicelist}  
646 -  
647 -Define new values for the boot device list. Those values will override  
648 -the values specified on the command line through the @code{-boot} option.  
649 -  
650 -The values that can be specified here depend on the machine type, but are  
651 -the same that can be specified in the @code{-boot} command line option.  
652 -  
653 -@item nmi @var{cpu}  
654 -Inject an NMI on the given CPU.  
655 -  
656 -@item migrate [-d] @var{uri}  
657 -Migrate to @var{uri} (using -d to not wait for completion).  
658 -  
659 -@item migrate_cancel  
660 -Cancel the current VM migration.  
661 -  
662 -@item migrate_set_speed @var{value}  
663 -Set maximum speed to @var{value} (in bytes) for migrations.  
664 -  
665 -@item balloon @var{value}  
666 -Request VM to change its memory allocation to @var{value} (in MB).  
667 -  
668 -@item set_link @var{name} [up|down]  
669 -Set link @var{name} up or down.  
670 -  
671 -@end table 321 +@include qemu-monitor.texi
672 322
673 @subsection Integer expressions 323 @subsection Integer expressions
674 324
qemu-monitor.hx 0 โ†’ 100644
  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 + { "help|?", "s?", help_cmd, "[cmd]", "show the help" },
  13 +STEXI
  14 +@item help or ? [@var{cmd}]
  15 +Show the help for all commands or just for command @var{cmd}.
  16 +ETEXI
  17 +
  18 + { "commit", "s", do_commit,
  19 + "device|all", "commit changes to the disk images (if -snapshot is used) or backing files" },
  20 +STEXI
  21 +@item commit
  22 +Commit changes to the disk images (if -snapshot is used) or backing files.
  23 +ETEXI
  24 +
  25 + { "info", "s?", do_info,
  26 + "[subcommand]", "show various information about the system state" },
  27 +STEXI
  28 +@item info @var{subcommand}
  29 +Show various information about the system state.
  30 +
  31 +@table @option
  32 +@item info version
  33 +show the version of QEMU
  34 +@item info network
  35 +show the various VLANs and the associated devices
  36 +@item info chardev
  37 +show the character devices
  38 +@item info block
  39 +show the block devices
  40 +@item info block
  41 +show block device statistics
  42 +@item info registers
  43 +show the cpu registers
  44 +@item info cpus
  45 +show infos for each CPU
  46 +@item info history
  47 +show the command line history
  48 +@item info irq
  49 +show the interrupts statistics (if available)
  50 +@item info pic
  51 +show i8259 (PIC) state
  52 +@item info pci
  53 +show emulated PCI device info
  54 +@item info tlb
  55 +show virtual to physical memory mappings (i386 only)
  56 +@item info mem
  57 +show the active virtual memory mappings (i386 only)
  58 +@item info hpet
  59 +show state of HPET (i386 only)
  60 +@item info kqemu
  61 +show KQEMU information
  62 +@item info kvm
  63 +show KVM information
  64 +@item info usb
  65 +show USB devices plugged on the virtual USB hub
  66 +@item info usbhost
  67 +show all USB host devices
  68 +@item info profile
  69 +show profiling information
  70 +@item info capture
  71 +show information about active capturing
  72 +@item info snapshots
  73 +show list of VM snapshots
  74 +@item info status
  75 +show the current VM status (running|paused)
  76 +@item info pcmcia
  77 +show guest PCMCIA status
  78 +@item info mice
  79 +show which guest mouse is receiving events
  80 +@item info vnc
  81 +show the vnc server status
  82 +@item info name
  83 +show the current VM name
  84 +@item info uuid
  85 +show the current VM UUID
  86 +@item info cpustats
  87 +show CPU statistics
  88 +@item info slirp
  89 +show SLIRP statistics (if available)
  90 +@item info migrate
  91 +show migration status
  92 +@item info balloon
  93 +show balloon information
  94 +@item info qtree
  95 +show device tree
  96 +@end table
  97 +ETEXI
  98 +
  99 + { "q|quit", "", do_quit,
  100 + "", "quit the emulator" },
  101 +STEXI
  102 +@item q or quit
  103 +Quit the emulator.
  104 +ETEXI
  105 +
  106 + { "eject", "-fB", do_eject,
  107 + "[-f] device", "eject a removable medium (use -f to force it)" },
  108 +STEXI
  109 +@item eject [-f] @var{device}
  110 +Eject a removable medium (use -f to force it).
  111 +ETEXI
  112 +
  113 + { "change", "BFs?", do_change,
  114 + "device filename [format]", "change a removable medium, optional format" },
  115 +STEXI
  116 +@item change @var{device} @var{setting}
  117 +
  118 +Change the configuration of a device.
  119 +
  120 +@table @option
  121 +@item change @var{diskdevice} @var{filename} [@var{format}]
  122 +Change the medium for a removable disk device to point to @var{filename}. eg
  123 +
  124 +@example
  125 +(qemu) change ide1-cd0 /path/to/some.iso
  126 +@end example
  127 +
  128 +@var{format} is optional.
  129 +
  130 +@item change vnc @var{display},@var{options}
  131 +Change the configuration of the VNC server. The valid syntax for @var{display}
  132 +and @var{options} are described at @ref{sec_invocation}. eg
  133 +
  134 +@example
  135 +(qemu) change vnc localhost:1
  136 +@end example
  137 +
  138 +@item change vnc password [@var{password}]
  139 +
  140 +Change the password associated with the VNC server. If the new password is not
  141 +supplied, the monitor will prompt for it to be entered. VNC passwords are only
  142 +significant up to 8 letters. eg
  143 +
  144 +@example
  145 +(qemu) change vnc password
  146 +Password: ********
  147 +@end example
  148 +
  149 +@end table
  150 +ETEXI
  151 +
  152 + { "screendump", "F", do_screen_dump,
  153 + "filename", "save screen into PPM image 'filename'" },
  154 +STEXI
  155 +@item screendump @var{filename}
  156 +Save screen into PPM image @var{filename}.
  157 +ETEXI
  158 +
  159 + { "logfile", "F", do_logfile,
  160 + "filename", "output logs to 'filename'" },
  161 +STEXI
  162 +@item logfile @var{filename}
  163 +Output logs to @var{filename}.
  164 +ETEXI
  165 +
  166 + { "log", "s", do_log,
  167 + "item1[,...]", "activate logging of the specified items to '/tmp/qemu.log'" },
  168 +STEXI
  169 +@item log @var{item1}[,...]
  170 +Activate logging of the specified items to @file{/tmp/qemu.log}.
  171 +ETEXI
  172 +
  173 + { "savevm", "s?", do_savevm,
  174 + "[tag|id]", "save a VM snapshot. If no tag or id are provided, a new snapshot is created" },
  175 +STEXI
  176 +@item savevm [@var{tag}|@var{id}]
  177 +Create a snapshot of the whole virtual machine. If @var{tag} is
  178 +provided, it is used as human readable identifier. If there is already
  179 +a snapshot with the same tag or ID, it is replaced. More info at
  180 +@ref{vm_snapshots}.
  181 +ETEXI
  182 +
  183 + { "loadvm", "s", do_loadvm,
  184 + "tag|id", "restore a VM snapshot from its tag or id" },
  185 +STEXI
  186 +@item loadvm @var{tag}|@var{id}
  187 +Set the whole virtual machine to the snapshot identified by the tag
  188 +@var{tag} or the unique snapshot ID @var{id}.
  189 +ETEXI
  190 +
  191 + { "delvm", "s", do_delvm,
  192 + "tag|id", "delete a VM snapshot from its tag or id" },
  193 +STEXI
  194 +@item delvm @var{tag}|@var{id}
  195 +Delete the snapshot identified by @var{tag} or @var{id}.
  196 +ETEXI
  197 +
  198 + { "singlestep", "s?", do_singlestep,
  199 + "[on|off]", "run emulation in singlestep mode or switch to normal mode", },
  200 +STEXI
  201 +@item singlestep [off]
  202 +Run the emulation in single step mode.
  203 +If called with option off, the emulation returns to normal mode.
  204 +ETEXI
  205 +
  206 + { "stop", "", do_stop,
  207 + "", "stop emulation", },
  208 +STEXI
  209 +@item stop
  210 +Stop emulation.
  211 +ETEXI
  212 +
  213 + { "c|cont", "", do_cont,
  214 + "", "resume emulation", },
  215 +STEXI
  216 +@item c or cont
  217 +Resume emulation.
  218 +ETEXI
  219 +
  220 + { "gdbserver", "s?", do_gdbserver,
  221 + "[device]", "start gdbserver on given device (default 'tcp::1234'), stop with 'none'", },
  222 +STEXI
  223 +@item gdbserver [@var{port}]
  224 +Start gdbserver session (default @var{port}=1234)
  225 +ETEXI
  226 +
  227 + { "x", "/l", do_memory_dump,
  228 + "/fmt addr", "virtual memory dump starting at 'addr'", },
  229 +STEXI
  230 +@item x/fmt @var{addr}
  231 +Virtual memory dump starting at @var{addr}.
  232 +ETEXI
  233 +
  234 + { "xp", "/l", do_physical_memory_dump,
  235 + "/fmt addr", "physical memory dump starting at 'addr'", },
  236 +STEXI
  237 +@item xp /@var{fmt} @var{addr}
  238 +Physical memory dump starting at @var{addr}.
  239 +
  240 +@var{fmt} is a format which tells the command how to format the
  241 +data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
  242 +
  243 +@table @var
  244 +@item count
  245 +is the number of items to be dumped.
  246 +
  247 +@item format
  248 +can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
  249 +c (char) or i (asm instruction).
  250 +
  251 +@item size
  252 +can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
  253 +@code{h} or @code{w} can be specified with the @code{i} format to
  254 +respectively select 16 or 32 bit code instruction size.
  255 +
  256 +@end table
  257 +
  258 +Examples:
  259 +@itemize
  260 +@item
  261 +Dump 10 instructions at the current instruction pointer:
  262 +@example
  263 +(qemu) x/10i $eip
  264 +0x90107063: ret
  265 +0x90107064: sti
  266 +0x90107065: lea 0x0(%esi,1),%esi
  267 +0x90107069: lea 0x0(%edi,1),%edi
  268 +0x90107070: ret
  269 +0x90107071: jmp 0x90107080
  270 +0x90107073: nop
  271 +0x90107074: nop
  272 +0x90107075: nop
  273 +0x90107076: nop
  274 +@end example
  275 +
  276 +@item
  277 +Dump 80 16 bit values at the start of the video memory.
  278 +@smallexample
  279 +(qemu) xp/80hx 0xb8000
  280 +0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
  281 +0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
  282 +0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
  283 +0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
  284 +0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
  285 +0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
  286 +0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
  287 +0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
  288 +0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
  289 +0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
  290 +@end smallexample
  291 +@end itemize
  292 +ETEXI
  293 +
  294 + { "p|print", "/l", do_print,
  295 + "/fmt expr", "print expression value (use $reg for CPU register access)", },
  296 +STEXI
  297 +@item p or print/@var{fmt} @var{expr}
  298 +
  299 +Print expression value. Only the @var{format} part of @var{fmt} is
  300 +used.
  301 +ETEXI
  302 +
  303 + { "i", "/ii.", do_ioport_read,
  304 + "/fmt addr", "I/O port read" },
  305 +STEXI
  306 +Read I/O port.
  307 +ETEXI
  308 +
  309 +
  310 + { "sendkey", "si?", do_sendkey,
  311 + "keys [hold_ms]", "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)" },
  312 +STEXI
  313 +@item sendkey @var{keys}
  314 +
  315 +Send @var{keys} to the emulator. @var{keys} could be the name of the
  316 +key or @code{#} followed by the raw value in either decimal or hexadecimal
  317 +format. Use @code{-} to press several keys simultaneously. Example:
  318 +@example
  319 +sendkey ctrl-alt-f1
  320 +@end example
  321 +
  322 +This command is useful to send keys that your graphical user interface
  323 +intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
  324 +ETEXI
  325 +
  326 + { "system_reset", "", do_system_reset,
  327 + "", "reset the system" },
  328 +STEXI
  329 +@item system_reset
  330 +
  331 +Reset the system.
  332 +ETEXI
  333 +
  334 + { "system_powerdown", "", do_system_powerdown,
  335 + "", "send system power down event" },
  336 +STEXI
  337 +@item system_powerdown
  338 +
  339 +Power down the system (if supported).
  340 +ETEXI
  341 +
  342 + { "sum", "ii", do_sum,
  343 + "addr size", "compute the checksum of a memory region" },
  344 +STEXI
  345 +@item sum @var{addr} @var{size}
  346 +
  347 +Compute the checksum of a memory region.
  348 +ETEXI
  349 +
  350 + { "usb_add", "s", do_usb_add,
  351 + "device", "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')" },
  352 +STEXI
  353 +@item usb_add @var{devname}
  354 +
  355 +Add the USB device @var{devname}. For details of available devices see
  356 +@ref{usb_devices}
  357 +ETEXI
  358 +
  359 + { "usb_del", "s", do_usb_del,
  360 + "device", "remove USB device 'bus.addr'" },
  361 +STEXI
  362 +@item usb_del @var{devname}
  363 +
  364 +Remove the USB device @var{devname} from the QEMU virtual USB
  365 +hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
  366 +command @code{info usb} to see the devices you can remove.
  367 +ETEXI
  368 +
  369 + { "cpu", "i", do_cpu_set,
  370 + "index", "set the default CPU" },
  371 +STEXI
  372 +Set the default CPU.
  373 +ETEXI
  374 +
  375 + { "mouse_move", "sss?", do_mouse_move,
  376 + "dx dy [dz]", "send mouse move events" },
  377 +STEXI
  378 +@item mouse_move @var{dx} @var{dy} [@var{dz}]
  379 +Move the active mouse to the specified coordinates @var{dx} @var{dy}
  380 +with optional scroll axis @var{dz}.
  381 +ETEXI
  382 +
  383 + { "mouse_button", "i", do_mouse_button,
  384 + "state", "change mouse button state (1=L, 2=M, 4=R)" },
  385 +STEXI
  386 +@item mouse_button @var{val}
  387 +Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
  388 +ETEXI
  389 +
  390 + { "mouse_set", "i", do_mouse_set,
  391 + "index", "set which mouse device receives events" },
  392 +STEXI
  393 +@item mouse_set @var{index}
  394 +Set which mouse device receives events at given @var{index}, index
  395 +can be obtained with
  396 +@example
  397 +info mice
  398 +@end example
  399 +ETEXI
  400 +
  401 +#ifdef HAS_AUDIO
  402 + { "wavcapture", "si?i?i?", do_wav_capture,
  403 + "path [frequency [bits [channels]]]",
  404 + "capture audio to a wave file (default frequency=44100 bits=16 channels=2)" },
  405 +#endif
  406 +STEXI
  407 +@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
  408 +Capture audio into @var{filename}. Using sample rate @var{frequency}
  409 +bits per sample @var{bits} and number of channels @var{channels}.
  410 +
  411 +Defaults:
  412 +@itemize @minus
  413 +@item Sample rate = 44100 Hz - CD quality
  414 +@item Bits = 16
  415 +@item Number of channels = 2 - Stereo
  416 +@end itemize
  417 +ETEXI
  418 +
  419 +#ifdef HAS_AUDIO
  420 + { "stopcapture", "i", do_stop_capture,
  421 + "capture index", "stop capture" },
  422 +#endif
  423 +STEXI
  424 +@item stopcapture @var{index}
  425 +Stop capture with a given @var{index}, index can be obtained with
  426 +@example
  427 +info capture
  428 +@end example
  429 +ETEXI
  430 +
  431 + { "memsave", "lis", do_memory_save,
  432 + "addr size file", "save to disk virtual memory dump starting at 'addr' of size 'size'", },
  433 +STEXI
  434 +@item memsave @var{addr} @var{size} @var{file}
  435 +save to disk virtual memory dump starting at @var{addr} of size @var{size}.
  436 +ETEXI
  437 +
  438 + { "pmemsave", "lis", do_physical_memory_save,
  439 + "addr size file", "save to disk physical memory dump starting at 'addr' of size 'size'", },
  440 +STEXI
  441 +@item pmemsave @var{addr} @var{size} @var{file}
  442 +save to disk physical memory dump starting at @var{addr} of size @var{size}.
  443 +ETEXI
  444 +
  445 + { "boot_set", "s", do_boot_set,
  446 + "bootdevice", "define new values for the boot device list" },
  447 +STEXI
  448 +@item boot_set @var{bootdevicelist}
  449 +
  450 +Define new values for the boot device list. Those values will override
  451 +the values specified on the command line through the @code{-boot} option.
  452 +
  453 +The values that can be specified here depend on the machine type, but are
  454 +the same that can be specified in the @code{-boot} command line option.
  455 +ETEXI
  456 +
  457 +#if defined(TARGET_I386)
  458 + { "nmi", "i", do_inject_nmi,
  459 + "cpu", "inject an NMI on the given CPU", },
  460 +#endif
  461 +STEXI
  462 +@item nmi @var{cpu}
  463 +Inject an NMI on the given CPU (x86 only).
  464 +ETEXI
  465 +
  466 + { "migrate", "-ds", do_migrate,
  467 + "[-d] uri", "migrate to URI (using -d to not wait for completion)" },
  468 +STEXI
  469 +@item migrate [-d] @var{uri}
  470 +Migrate to @var{uri} (using -d to not wait for completion).
  471 +ETEXI
  472 +
  473 + { "migrate_cancel", "", do_migrate_cancel,
  474 + "", "cancel the current VM migration" },
  475 +STEXI
  476 +@item migrate_cancel
  477 +Cancel the current VM migration.
  478 +ETEXI
  479 +
  480 + { "migrate_set_speed", "s", do_migrate_set_speed,
  481 + "value", "set maximum speed (in bytes) for migrations" },
  482 +STEXI
  483 +@item migrate_set_speed @var{value}
  484 +Set maximum speed to @var{value} (in bytes) for migrations.
  485 +ETEXI
  486 +
  487 +#if defined(TARGET_I386)
  488 + { "drive_add", "ss", drive_hot_add, "pci_addr=[[<domain>:]<bus>:]<slot>\n"
  489 + "[file=file][,if=type][,bus=n]\n"
  490 + "[,unit=m][,media=d][index=i]\n"
  491 + "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
  492 + "[snapshot=on|off][,cache=on|off]",
  493 + "add drive to PCI storage controller" },
  494 +#endif
  495 +STEXI
  496 +@item drive_add
  497 +Add drive to PCI storage controller.
  498 +ETEXI
  499 +
  500 +#if defined(TARGET_I386)
  501 + { "pci_add", "sss", pci_device_hot_add, "pci_addr=auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...", "hot-add PCI device" },
  502 +#endif
  503 +STEXI
  504 +@item pci_add
  505 +Hot-add PCI device.
  506 +ETEXI
  507 +
  508 +#if defined(TARGET_I386)
  509 + { "pci_del", "s", pci_device_hot_remove, "pci_addr=[[<domain>:]<bus>:]<slot>", "hot remove PCI device" },
  510 +#endif
  511 +STEXI
  512 +@item pci_del
  513 +Hot remove PCI device.
  514 +ETEXI
  515 +
  516 + { "host_net_add", "ss?", net_host_device_add,
  517 + "tap|user|socket|vde|dump [options]", "add host VLAN client" },
  518 +STEXI
  519 +@item host_net_add
  520 +Add host VLAN client.
  521 +ETEXI
  522 +
  523 + { "host_net_remove", "is", net_host_device_remove,
  524 + "vlan_id name", "remove host VLAN client" },
  525 +STEXI
  526 +@item host_net_remove
  527 +Remove host VLAN client.
  528 +ETEXI
  529 +
  530 +#ifdef CONFIG_SLIRP
  531 + { "host_net_redir", "ss?", net_slirp_redir,
  532 + "[tcp|udp]:host-port:[guest-host]:guest-port", "redirect TCP or UDP connections from host to guest (requires -net user)\n"
  533 + "host_net_redir remove [tcp:|udp:]host-port -- remove redirection\n"
  534 + "host_net_redir list -- show all redirections" },
  535 +#endif
  536 +STEXI
  537 +@item host_net_redir
  538 +Redirect TCP or UDP connections from host to guest (requires -net user).
  539 +ETEXI
  540 +
  541 + { "balloon", "i", do_balloon,
  542 + "target", "request VM to change it's memory allocation (in MB)" },
  543 +STEXI
  544 +@item balloon @var{value}
  545 +Request VM to change its memory allocation to @var{value} (in MB).
  546 +ETEXI
  547 +
  548 + { "set_link", "ss", do_set_link,
  549 + "name up|down", "change the link status of a network adapter" },
  550 +STEXI
  551 +@item set_link @var{name} [up|down]
  552 +Set link @var{name} up or down.
  553 +ETEXI
  554 +
  555 + { "watchdog_action", "s", do_watchdog_action,
  556 + "[reset|shutdown|poweroff|pause|debug|none]", "change watchdog action" },
  557 +STEXI
  558 +@item watchdog_action
  559 +Change watchdog action.
  560 +ETEXI
  561 +
  562 + { "acl", "sss?i?", do_acl, "<command> <aclname> [<match> [<index>]]\n",
  563 + "acl show vnc.username\n"
  564 + "acl policy vnc.username deny\n"
  565 + "acl allow vnc.username fred\n"
  566 + "acl deny vnc.username bob\n"
  567 + "acl reset vnc.username\n" },
  568 +STEXI
  569 +@item acl @var{subcommand} @var{aclname} @var{match} @var{index}
  570 +
  571 +Manage access control lists for network services. There are currently
  572 +two named access control lists, @var{vnc.x509dname} and @var{vnc.username}
  573 +matching on the x509 client certificate distinguished name, and SASL
  574 +username respectively.
  575 +
  576 +@table @option
  577 +@item acl show <aclname>
  578 +list all the match rules in the access control list, and the default
  579 +policy
  580 +@item acl policy <aclname> @code{allow|deny}
  581 +set the default access control list policy, used in the event that
  582 +none of the explicit rules match. The default policy at startup is
  583 +always @code{deny}
  584 +@item acl allow <aclname> <match> [<index>]
  585 +add a match to the access control list, allowing access. The match will
  586 +normally be an exact username or x509 distinguished name, but can
  587 +optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to allow
  588 +all users in the @code{EXAMPLE.COM} kerberos realm. The match will
  589 +normally be appended to the end of the ACL, but can be inserted
  590 +earlier in the list if the optional @code{index} parameter is supplied.
  591 +@item acl deny <aclname> <match> [<index>]
  592 +add a match to the access control list, denying access. The match will
  593 +normally be an exact username or x509 distinguished name, but can
  594 +optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to allow
  595 +all users in the @code{EXAMPLE.COM} kerberos realm. The match will
  596 +normally be appended to the end of the ACL, but can be inserted
  597 +earlier in the list if the optional @code{index} parameter is supplied.
  598 +@item acl remove <aclname> <match>
  599 +remove the specified match rule from the access control list.
  600 +@item acl reset <aclname>
  601 +remove all matches from the access control list, and set the default
  602 +policy back to @code{deny}.
  603 +@end table
  604 +ETEXI
  605 +
  606 +STEXI
  607 +@end table
  608 +ETEXI