X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=hmp-commands.hx;h=caae5ad9e9e1b2b56912da864718333c1d866154;hb=b15654c21acef4d2bc17e6ac528c6c93abbb7e1e;hp=bdd48f3469e0cd3fb76d7b4e3ee732e22f005ecf;hpb=49b6d7220bce42e6c06e0dbb61969a997868491f;p=qemu.git diff --git a/hmp-commands.hx b/hmp-commands.hx index bdd48f346..caae5ad9e 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -11,7 +11,7 @@ ETEXI { .name = "help|?", - .args_type = "name:s?", + .args_type = "name:S?", .params = "[cmd]", .help = "show the help", .mhandler.cmd = do_help_cmd, @@ -185,6 +185,8 @@ Remove host block device. The result is that guest generated IO is no longer submitted against the host device underlying the disk. Once a drive has been deleted, the QEMU Block layer returns -EIO which results in IO errors in the guest for applications that are reading/writing to the device. +These errors are always reported to the guest, regardless of the drive's error +actions (drive options rerror, werror). ETEXI { @@ -295,14 +297,14 @@ ETEXI .name = "log", .args_type = "items:s", .params = "item1[,...]", - .help = "activate logging of the specified items to '/tmp/qemu.log'", + .help = "activate logging of the specified items", .mhandler.cmd = do_log, }, STEXI @item log @var{item1}[,...] @findex log -Activate logging of the specified items to @file{/tmp/qemu.log}. +Activate logging of the specified items. ETEXI { @@ -736,7 +738,6 @@ info mice @end example ETEXI -#ifdef HAS_AUDIO { .name = "wavcapture", .args_type = "path:F,freq:i?,bits:i?,nchannels:i?", @@ -744,7 +745,6 @@ ETEXI .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)", .mhandler.cmd = do_wav_capture, }, -#endif STEXI @item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]] @findex wavcapture @@ -759,7 +759,6 @@ Defaults: @end itemize ETEXI -#ifdef HAS_AUDIO { .name = "stopcapture", .args_type = "n:i", @@ -767,7 +766,6 @@ ETEXI .help = "stop capture", .mhandler.cmd = do_stop_capture, }, -#endif STEXI @item stopcapture @var{index} @findex stopcapture @@ -824,7 +822,7 @@ 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) +#if defined(TARGET_I386) || defined(TARGET_S390X) { .name = "nmi", .args_type = "", @@ -836,45 +834,44 @@ ETEXI STEXI @item nmi @var{cpu} @findex nmi -Inject an NMI on the given CPU (x86 only). +Inject an NMI (x86) or RESTART (s390x) on the given CPU. ETEXI { - .name = "memchar_write", + .name = "ringbuf_write", .args_type = "device:s,data:s", .params = "device data", - .help = "Provide writing interface for CirMemCharDriver. Write" - "'data' to it.", - .mhandler.cmd = hmp_memchar_write, + .help = "Write to a ring buffer character device", + .mhandler.cmd = hmp_ringbuf_write, }, STEXI -@item memchar_write @var{device} @var{data} -@findex memchar_write -Provide writing interface for CirMemCharDriver. Write @var{data} -to char device 'memory'. +@item ringbuf_write @var{device} @var{data} +@findex ringbuf_write +Write @var{data} to ring buffer character device @var{device}. +@var{data} must be a UTF-8 string. ETEXI { - .name = "memchar_read", + .name = "ringbuf_read", .args_type = "device:s,size:i", .params = "device size", - .help = "Provide read interface for CirMemCharDriver. Read from" - "it and return the data with size.", - .mhandler.cmd = hmp_memchar_read, + .help = "Read from a ring buffer character device", + .mhandler.cmd = hmp_ringbuf_read, }, STEXI -@item memchar_read @var{device} -@findex memchar_read -Provide read interface for CirMemCharDriver. Read from char device -'memory' and return the data. - -@var{size} is the size of data want to read from. Refer to unencoded -size of the raw data, would adjust to the init size of the memchar -if the requested size is larger than it. +@item ringbuf_read @var{device} +@findex ringbuf_read +Read and print up to @var{size} bytes from ring buffer character +device @var{device}. +Certain non-printable characters are printed \uXXXX, where XXXX is the +character code in hexadecimal. Character \ is printed \\. +Bug: can screw up when the buffer contains invalid UTF-8 sequences, +NUL characters, after the ring buffer lost data, and when reading +stops because the size limit is reached. ETEXI @@ -994,7 +991,6 @@ server will ask the spice/vnc client to automatically reconnect using the new parameters (if specified) once the vm migration finished successfully. ETEXI -#if defined(CONFIG_HAVE_CORE_DUMP) { .name = "dump-guest-memory", .args_type = "paging:-p,filename:F,begin:i?,length:i?", @@ -1018,7 +1014,6 @@ gdb. length: the memory size, in bytes. It's optional, and should be specified with begin together. ETEXI -#endif { .name = "snapshot_blkdev", @@ -1028,8 +1023,7 @@ ETEXI "of device. If a new image file is specified, the\n\t\t\t" "new image file will become the new root image.\n\t\t\t" "If format is specified, the snapshot file will\n\t\t\t" - "be created in that format. Otherwise the\n\t\t\t" - "snapshot will be internal! (currently unsupported).\n\t\t\t" + "be created in that format.\n\t\t\t" "The default format is qcow2. The -n flag requests QEMU\n\t\t\t" "to reuse the image found in new-image-file, instead of\n\t\t\t" "recreating it from scratch.", @@ -1040,6 +1034,40 @@ STEXI @item snapshot_blkdev @findex snapshot_blkdev Snapshot device, using snapshot file as target if provided +ETEXI + + { + .name = "snapshot_blkdev_internal", + .args_type = "device:B,name:s", + .params = "device name", + .help = "take an internal snapshot of device.\n\t\t\t" + "The format of the image used by device must\n\t\t\t" + "support it, such as qcow2.\n\t\t\t", + .mhandler.cmd = hmp_snapshot_blkdev_internal, + }, + +STEXI +@item snapshot_blkdev_internal +@findex snapshot_blkdev_internal +Take an internal snapshot on device if it support +ETEXI + + { + .name = "snapshot_delete_blkdev_internal", + .args_type = "device:B,name:s,id:s?", + .params = "device name [id]", + .help = "delete an internal snapshot of device.\n\t\t\t" + "If id is specified, qemu will try delete\n\t\t\t" + "the snapshot matching both id and name.\n\t\t\t" + "The format of the image used by device must\n\t\t\t" + "support it, such as qcow2.\n\t\t\t", + .mhandler.cmd = hmp_snapshot_delete_blkdev_internal, + }, + +STEXI +@item snapshot_delete_blkdev_internal +@findex snapshot_delete_blkdev_internal +Delete an internal snapshot on device if it support ETEXI { @@ -1061,6 +1089,26 @@ STEXI @findex drive_mirror Start mirroring a block device's writes to a new destination, using the specified target. +ETEXI + + { + .name = "drive_backup", + .args_type = "reuse:-n,full:-f,device:B,target:s,format:s?", + .params = "[-n] [-f] device target [format]", + .help = "initiates a point-in-time\n\t\t\t" + "copy for a device. The device's contents are\n\t\t\t" + "copied to the new image file, excluding data that\n\t\t\t" + "is written after the command is started.\n\t\t\t" + "The -n flag requests QEMU to reuse the image found\n\t\t\t" + "in new-image-file, instead of recreating it from scratch.\n\t\t\t" + "The -f flag requests QEMU to copy the whole disk,\n\t\t\t" + "so that the result does not need a backing file.\n\t\t\t", + .mhandler.cmd = hmp_drive_backup, + }, +STEXI +@item drive_backup +@findex drive_backup +Start a point-in-time copy of a block device to a specificed target. ETEXI { @@ -1082,7 +1130,7 @@ STEXI Add drive to PCI storage controller. ETEXI -#if defined(TARGET_I386) +#if defined(CONFIG_PCI_HOTPLUG_OLD) { .name = "pci_add", .args_type = "pci_addr:s,type:s,opts:s?", @@ -1098,7 +1146,7 @@ STEXI Hot-add PCI device. ETEXI -#if defined(TARGET_I386) +#if defined(CONFIG_PCI_HOTPLUG_OLD) { .name = "pci_del", .args_type = "pci_addr:s", @@ -1170,7 +1218,7 @@ ETEXI { .name = "netdev_add", .args_type = "netdev:O", - .params = "[user|tap|socket],id=str[,prop=value][,...]", + .params = "[user|tap|socket|hubport],id=str[,prop=value][,...]", .help = "add host network device", .mhandler.cmd = hmp_netdev_add, }, @@ -1553,6 +1601,22 @@ STEXI Removes the chardev @var{id}. +ETEXI + + { + .name = "qemu-io", + .args_type = "device:B,command:s", + .params = "[device] \"[command]\"", + .help = "run a qemu-io command on a block device", + .mhandler.cmd = hmp_qemu_io, + }, + +STEXI +@item qemu-io @var{device} @var{command} +@findex qemu-io + +Executes a qemu-io command on the given block device. + ETEXI { @@ -1642,6 +1706,8 @@ show device tree show qdev device model list @item info roms show roms +@item info tpm +show the TPM device @end table ETEXI