X-Git-Url: https://repo.jachan.dev/qemu.git/blobdiff_plain/2a2c4830c0068d70443f3dddc4cc668f0c601b5c..dc407ae8a75d03cf48e114d3812d077fa29a8bd9:/hmp-commands.hx diff --git a/hmp-commands.hx b/hmp-commands.hx index 5f1a677b85..e864a6ca81 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -28,7 +28,7 @@ ETEXI .args_type = "device:B", .params = "device|all", .help = "commit changes to the disk images (if -snapshot is used) or backing files", - .mhandler.cmd = do_commit, + .mhandler.cmd = hmp_commit, }, STEXI @@ -47,7 +47,6 @@ ETEXI .args_type = "", .params = "", .help = "quit the emulator", - .user_print = monitor_user_noop, .mhandler.cmd = hmp_quit, }, @@ -180,7 +179,7 @@ ETEXI .params = "device", .help = "remove host block device", .user_print = monitor_user_noop, - .mhandler.cmd_new = do_drive_del, + .mhandler.cmd_new = hmp_drive_del, }, STEXI @@ -205,7 +204,6 @@ ETEXI STEXI @item change @var{device} @var{setting} @findex change - Change the configuration of a device. @table @option @@ -245,7 +243,7 @@ ETEXI .args_type = "filename:F", .params = "filename", .help = "save screen into PPM image 'filename'", - .mhandler.cmd = hmp_screen_dump, + .mhandler.cmd = hmp_screendump, }, STEXI @@ -259,7 +257,7 @@ ETEXI .args_type = "filename:F", .params = "filename", .help = "output logs to 'filename'", - .mhandler.cmd = do_logfile, + .mhandler.cmd = hmp_logfile, }, STEXI @@ -273,7 +271,7 @@ ETEXI .args_type = "name:s,option:b", .params = "name on|off", .help = "changes status of a specific trace event", - .mhandler.cmd = do_trace_event_set_state, + .mhandler.cmd = hmp_trace_event, }, STEXI @@ -288,7 +286,7 @@ ETEXI .args_type = "op:s?,arg:F?", .params = "on|off|flush|set [arg]", .help = "open, close, or flush trace file, or set a new file name", - .mhandler.cmd = do_trace_file, + .mhandler.cmd = hmp_trace_file, }, STEXI @@ -303,7 +301,7 @@ ETEXI .args_type = "items:s", .params = "item1[,...]", .help = "activate logging of the specified items", - .mhandler.cmd = do_log, + .mhandler.cmd = hmp_log, }, STEXI @@ -317,7 +315,7 @@ ETEXI .args_type = "name:s?", .params = "[tag|id]", .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created", - .mhandler.cmd = do_savevm, + .mhandler.cmd = hmp_savevm, }, STEXI @@ -334,7 +332,7 @@ ETEXI .args_type = "name:s", .params = "tag|id", .help = "restore a VM snapshot from its tag or id", - .mhandler.cmd = do_loadvm, + .mhandler.cmd = hmp_loadvm, .command_completion = loadvm_completion, }, @@ -350,7 +348,7 @@ ETEXI .args_type = "name:s", .params = "tag|id", .help = "delete a VM snapshot from its tag or id", - .mhandler.cmd = do_delvm, + .mhandler.cmd = hmp_delvm, .command_completion = delvm_completion, }, @@ -365,7 +363,7 @@ ETEXI .args_type = "option:s?", .params = "[on|off]", .help = "run emulation in singlestep mode or switch to normal mode", - .mhandler.cmd = do_singlestep, + .mhandler.cmd = hmp_singlestep, }, STEXI @@ -422,7 +420,7 @@ ETEXI .args_type = "device:s?", .params = "[device]", .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'", - .mhandler.cmd = do_gdbserver, + .mhandler.cmd = hmp_gdbserver, }, STEXI @@ -436,7 +434,7 @@ ETEXI .args_type = "fmt:/,addr:l", .params = "/fmt addr", .help = "virtual memory dump starting at 'addr'", - .mhandler.cmd = do_memory_dump, + .mhandler.cmd = hmp_memory_dump, }, STEXI @@ -450,7 +448,7 @@ ETEXI .args_type = "fmt:/,addr:l", .params = "/fmt addr", .help = "physical memory dump starting at 'addr'", - .mhandler.cmd = do_physical_memory_dump, + .mhandler.cmd = hmp_physical_memory_dump, }, STEXI @@ -523,7 +521,6 @@ ETEXI STEXI @item p or print/@var{fmt} @var{expr} @findex print - Print expression value. Only the @var{format} part of @var{fmt} is used. ETEXI @@ -533,10 +530,12 @@ ETEXI .args_type = "fmt:/,addr:i,index:i.", .params = "/fmt addr", .help = "I/O port read", - .mhandler.cmd = do_ioport_read, + .mhandler.cmd = hmp_ioport_read, }, STEXI +@item i/@var{fmt} @var{addr} [.@var{index}] +@findex i Read I/O port. ETEXI @@ -545,10 +544,12 @@ ETEXI .args_type = "fmt:/,addr:i,val:i", .params = "/fmt addr value", .help = "I/O port write", - .mhandler.cmd = do_ioport_write, + .mhandler.cmd = hmp_ioport_write, }, STEXI +@item o/@var{fmt} @var{addr} @var{val} +@findex o Write to I/O port. ETEXI @@ -557,14 +558,13 @@ ETEXI .args_type = "keys:s,hold-time:i?", .params = "keys [hold_ms]", .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)", - .mhandler.cmd = hmp_send_key, + .mhandler.cmd = hmp_sendkey, .command_completion = sendkey_completion, }, STEXI @item sendkey @var{keys} @findex sendkey - Send @var{keys} to the guest. @var{keys} could be the name of the key or the raw value in hexadecimal format. Use @code{-} to press several keys simultaneously. Example: @@ -587,7 +587,6 @@ ETEXI STEXI @item system_reset @findex system_reset - Reset the system. ETEXI @@ -602,7 +601,6 @@ ETEXI STEXI @item system_powerdown @findex system_powerdown - Power down the system (if supported). ETEXI @@ -611,13 +609,12 @@ ETEXI .args_type = "start:i,size:i", .params = "addr size", .help = "compute the checksum of a memory region", - .mhandler.cmd = do_sum, + .mhandler.cmd = hmp_sum, }, STEXI @item sum @var{addr} @var{size} @findex sum - Compute the checksum of a memory region. ETEXI @@ -626,13 +623,12 @@ ETEXI .args_type = "devname:s", .params = "device", .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')", - .mhandler.cmd = do_usb_add, + .mhandler.cmd = hmp_usb_add, }, STEXI @item usb_add @var{devname} @findex usb_add - Add the USB device @var{devname}. For details of available devices see @ref{usb_devices} ETEXI @@ -642,13 +638,12 @@ ETEXI .args_type = "devname:s", .params = "device", .help = "remove USB device 'bus.addr'", - .mhandler.cmd = do_usb_del, + .mhandler.cmd = hmp_usb_del, }, STEXI @item usb_del @var{devname} @findex usb_del - Remove the USB device @var{devname} from the QEMU virtual USB hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor command @code{info usb} to see the devices you can remove. @@ -667,7 +662,6 @@ ETEXI STEXI @item device_add @var{config} @findex device_add - Add device. ETEXI @@ -683,7 +677,6 @@ ETEXI STEXI @item device_del @var{id} @findex device_del - Remove device @var{id}. ETEXI @@ -706,7 +699,7 @@ ETEXI .args_type = "dx_str:s,dy_str:s,dz_str:s?", .params = "dx dy [dz]", .help = "send mouse move events", - .mhandler.cmd = do_mouse_move, + .mhandler.cmd = hmp_mouse_move, }, STEXI @@ -721,7 +714,7 @@ ETEXI .args_type = "button_state:i", .params = "state", .help = "change mouse button state (1=L, 2=M, 4=R)", - .mhandler.cmd = do_mouse_button, + .mhandler.cmd = hmp_mouse_button, }, STEXI @@ -735,7 +728,7 @@ ETEXI .args_type = "index:i", .params = "index", .help = "set which mouse device receives events", - .mhandler.cmd = do_mouse_set, + .mhandler.cmd = hmp_mouse_set, }, STEXI @@ -753,7 +746,7 @@ ETEXI .args_type = "path:F,freq:i?,bits:i?,nchannels:i?", .params = "path [frequency [bits [channels]]]", .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)", - .mhandler.cmd = do_wav_capture, + .mhandler.cmd = hmp_wavcapture, }, STEXI @item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]] @@ -774,7 +767,7 @@ ETEXI .args_type = "n:i", .params = "capture index", .help = "stop capture", - .mhandler.cmd = do_stop_capture, + .mhandler.cmd = hmp_stopcapture, }, STEXI @item stopcapture @var{index} @@ -818,13 +811,12 @@ ETEXI .args_type = "bootdevice:s", .params = "bootdevice", .help = "define new values for the boot device list", - .mhandler.cmd = do_boot_set, + .mhandler.cmd = hmp_boot_set, }, STEXI @item boot_set @var{bootdevicelist} @findex boot_set - Define new values for the boot device list. Those values will override the values specified on the command line through the @code{-boot} option. @@ -832,19 +824,17 @@ The values that can be specified here depend on the machine type, but are the same that can be specified in the @code{-boot} command line option. ETEXI -#if defined(TARGET_I386) || defined(TARGET_S390X) { .name = "nmi", .args_type = "", .params = "", - .help = "inject an NMI on all guest's CPUs", - .mhandler.cmd = hmp_inject_nmi, + .help = "inject an NMI", + .mhandler.cmd = hmp_nmi, }, -#endif STEXI @item nmi @var{cpu} @findex nmi -Inject an NMI (x86) or RESTART (s390x) on the given CPU. +Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64). ETEXI @@ -921,6 +911,22 @@ STEXI @findex migrate_cancel Cancel the current VM migration. +ETEXI + + { + .name = "migrate_incoming", + .args_type = "uri:s", + .params = "uri", + .help = "Continue an incoming migration from an -incoming defer", + .mhandler.cmd = hmp_migrate_incoming, + }, + +STEXI +@item migrate_incoming @var{uri} +@findex migrate_incoming +Continue an incoming migration using the @var{uri} (that has the same syntax +as the -incoming option). + ETEXI { @@ -984,6 +990,21 @@ STEXI @item migrate_set_capability @var{capability} @var{state} @findex migrate_set_capability Enable/Disable the usage of a capability @var{capability} for migration. +ETEXI + + { + .name = "migrate_set_parameter", + .args_type = "parameter:s,value:i", + .params = "parameter value", + .help = "Set the parameter for migration", + .mhandler.cmd = hmp_migrate_set_parameter, + .command_completion = migrate_set_parameter_completion, + }, + +STEXI +@item migrate_set_parameter @var{parameter} @var{value} +@findex migrate_set_parameter +Set the parameter @var{parameter} for migration. ETEXI { @@ -992,8 +1013,7 @@ ETEXI .params = "protocol hostname port tls-port cert-subject", .help = "send migration info to spice/vnc client", .user_print = monitor_user_noop, - .mhandler.cmd_async = client_migrate_info, - .flags = MONITOR_CMD_ASYNC, + .mhandler.cmd_new = client_migrate_info, }, STEXI @@ -1142,45 +1162,13 @@ ETEXI "[,snapshot=on|off][,cache=on|off]\n" "[,readonly=on|off][,copy-on-read=on|off]", .help = "add drive to PCI storage controller", - .mhandler.cmd = drive_hot_add, + .mhandler.cmd = hmp_drive_add, }, STEXI @item drive_add @findex drive_add Add drive to PCI storage controller. -ETEXI - -#if defined(CONFIG_PCI_HOTPLUG_OLD) - { - .name = "pci_add", - .args_type = "pci_addr:s,type:s,opts:s?", - .params = "auto|[[:]:] nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...", - .help = "hot-add PCI device", - .mhandler.cmd = pci_device_hot_add, - }, -#endif - -STEXI -@item pci_add -@findex pci_add -Hot-add PCI device. -ETEXI - -#if defined(CONFIG_PCI_HOTPLUG_OLD) - { - .name = "pci_del", - .args_type = "pci_addr:s", - .params = "[[:]:]", - .help = "hot remove PCI device", - .mhandler.cmd = do_pci_device_hot_remove, - }, -#endif - -STEXI -@item pci_del -@findex pci_del -Hot remove PCI device. ETEXI { @@ -1199,7 +1187,7 @@ ETEXI " = 32bit x 4\n\t\t\t" " = 32bit x 4", .user_print = pcie_aer_inject_error_print, - .mhandler.cmd_new = do_pcie_aer_inject_error, + .mhandler.cmd_new = hmp_pcie_aer_inject_error, }, STEXI @@ -1211,9 +1199,9 @@ ETEXI { .name = "host_net_add", .args_type = "device:s,opts:s?", - .params = "tap|user|socket|vde|netmap|bridge|dump [options]", + .params = "tap|user|socket|vde|netmap|bridge|vhost-user|dump [options]", .help = "add host VLAN client", - .mhandler.cmd = net_host_device_add, + .mhandler.cmd = hmp_host_net_add, .command_completion = host_net_add_completion, }, @@ -1228,7 +1216,7 @@ ETEXI .args_type = "vlan_id:i,device:s", .params = "vlan_id name", .help = "remove host VLAN client", - .mhandler.cmd = net_host_device_remove, + .mhandler.cmd = hmp_host_net_remove, .command_completion = host_net_remove_completion, }, @@ -1241,7 +1229,7 @@ ETEXI { .name = "netdev_add", .args_type = "netdev:O", - .params = "[user|tap|socket|vde|bridge|hubport|netmap],id=str[,prop=value][,...]", + .params = "[user|tap|socket|vde|bridge|hubport|netmap|vhost-user],id=str[,prop=value][,...]", .help = "add host network device", .mhandler.cmd = hmp_netdev_add, .command_completion = netdev_add_completion, @@ -1304,7 +1292,7 @@ ETEXI .args_type = "arg1:s,arg2:s?,arg3:s?", .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport", .help = "redirect TCP or UDP connections from host to guest (requires -net user)", - .mhandler.cmd = net_slirp_hostfwd_add, + .mhandler.cmd = hmp_hostfwd_add, }, #endif STEXI @@ -1319,7 +1307,7 @@ ETEXI .args_type = "arg1:s,arg2:s?,arg3:s?", .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport", .help = "remove host-to-guest TCP or UDP redirection", - .mhandler.cmd = net_slirp_hostfwd_remove, + .mhandler.cmd = hmp_hostfwd_remove, }, #endif @@ -1363,7 +1351,7 @@ ETEXI .args_type = "action:s", .params = "[reset|shutdown|poweroff|pause|debug|none]", .help = "change watchdog action", - .mhandler.cmd = do_watchdog_action, + .mhandler.cmd = hmp_watchdog_action, .command_completion = watchdog_action_completion, }, @@ -1378,7 +1366,7 @@ ETEXI .args_type = "aclname:s", .params = "aclname", .help = "list rules in the access control list", - .mhandler.cmd = do_acl_show, + .mhandler.cmd = hmp_acl_show, }, STEXI @@ -1395,7 +1383,7 @@ ETEXI .args_type = "aclname:s,policy:s", .params = "aclname allow|deny", .help = "set default access control list policy", - .mhandler.cmd = do_acl_policy, + .mhandler.cmd = hmp_acl_policy, }, STEXI @@ -1411,7 +1399,7 @@ ETEXI .args_type = "aclname:s,match:s,policy:s,index:i?", .params = "aclname match allow|deny [index]", .help = "add a match rule to the access control list", - .mhandler.cmd = do_acl_add, + .mhandler.cmd = hmp_acl_add, }, STEXI @@ -1430,7 +1418,7 @@ ETEXI .args_type = "aclname:s,match:s", .params = "aclname match", .help = "remove a match rule from the access control list", - .mhandler.cmd = do_acl_remove, + .mhandler.cmd = hmp_acl_remove, }, STEXI @@ -1444,7 +1432,7 @@ ETEXI .args_type = "aclname:s", .params = "aclname", .help = "reset the access control list", - .mhandler.cmd = do_acl_reset, + .mhandler.cmd = hmp_acl_reset, }, STEXI @@ -1506,7 +1494,7 @@ ETEXI .args_type = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l", .params = "[-b] cpu bank status mcgstatus addr misc", .help = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]", - .mhandler.cmd = do_inject_mce, + .mhandler.cmd = hmp_mce, }, #endif @@ -1557,9 +1545,9 @@ ETEXI }, STEXI -@item block_set_io_throttle @var{device} @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr} -@findex block_set_io_throttle -Change I/O throttle limits for a block drive to @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr} +@item block_passwd @var{device} @var{password} +@findex block_passwd +Set the encrypted device @var{device} password to @var{password} ETEXI { @@ -1571,9 +1559,9 @@ ETEXI }, STEXI -@item block_passwd @var{device} @var{password} -@findex block_passwd -Set the encrypted device @var{device} password to @var{password} +@item block_set_io_throttle @var{device} @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr} +@findex block_set_io_throttle +Change I/O throttle limits for a block drive to @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr} ETEXI { @@ -1587,7 +1575,6 @@ ETEXI STEXI @item set_password [ vnc | spice ] password [ action-if-connected ] @findex set_password - Change spice/vnc password. Use zero to make the password stay valid forever. @var{action-if-connected} specifies what should happen in case a connection is established: @var{fail} makes the password change @@ -1607,7 +1594,6 @@ ETEXI STEXI @item expire_password [ vnc | spice ] expire-time @findex expire_password - Specify when a password for spice/vnc becomes invalid. @var{expire-time} accepts: @@ -1638,9 +1624,8 @@ ETEXI }, STEXI -@item chardev_add args -@findex chardev_add - +@item chardev-add args +@findex chardev-add chardev_add accepts the same parameters as the -chardev command line switch. ETEXI @@ -1655,9 +1640,8 @@ ETEXI }, STEXI -@item chardev_remove id -@findex chardev_remove - +@item chardev-remove id +@findex chardev-remove Removes the chardev @var{id}. ETEXI @@ -1673,7 +1657,6 @@ ETEXI STEXI @item qemu-io @var{device} @var{command} @findex qemu-io - Executes a qemu-io command on the given block device. ETEXI @@ -1688,7 +1671,34 @@ ETEXI STEXI @item cpu-add @var{id} +@findex cpu-add Add CPU with id @var{id} +ETEXI + + { + .name = "qom-list", + .args_type = "path:s?", + .params = "path", + .help = "list QOM properties", + .mhandler.cmd = hmp_qom_list, + }, + +STEXI +@item qom-list [@var{path}] +Print QOM properties of object at location @var{path} +ETEXI + + { + .name = "qom-set", + .args_type = "path:s,property:s,value:s", + .params = "path property value", + .help = "set QOM property", + .mhandler.cmd = hmp_qom_set, + }, + +STEXI +@item qom-set @var{path} @var{property} @var{value} +Set QOM property @var{property} of object at location @var{path} to value @var{value} ETEXI { @@ -1696,7 +1706,7 @@ ETEXI .args_type = "item:s?", .params = "[subcommand]", .help = "show various information about the system state", - .mhandler.cmd = do_info_help, + .mhandler.cmd = hmp_info_help, .sub_table = info_cmds, }, @@ -1750,8 +1760,6 @@ show information about active capturing show list of VM snapshots @item info status show the current VM status (running|paused) -@item info pcmcia -show guest PCMCIA status @item info mice show which guest mouse is receiving events @item info vnc @@ -1768,6 +1776,8 @@ show user network stack connection states show migration status @item info migrate_capabilities show current migration capabilities +@item info migrate_parameters +show current migration parameters @item info migrate_cache_size show current migration XBZRLE cache size @item info balloon @@ -1776,10 +1786,14 @@ show balloon information show device tree @item info qdm show qdev device model list +@item info qom-tree +show object composition tree @item info roms show roms @item info tpm show the TPM device +@item info memory-devices +show the memory devices @end table ETEXI