13c95fdefSPeter MaydellHXCOMM Use DEFHEADING() to define headings in both help text and rST. 23c95fdefSPeter MaydellHXCOMM Text between SRST and ERST is copied to the rST version and 33c95fdefSPeter MaydellHXCOMM discarded from C version. 42313086aSBlue SwirlHXCOMM DEF(command, args, callback, arg_string, help) is used to construct 52313086aSBlue SwirlHXCOMM monitor commands 63c95fdefSPeter MaydellHXCOMM HXCOMM can be used for comments, discarded from both rST and C. 72313086aSBlue Swirl 82313086aSBlue Swirl 9d7f9b689SLuiz Capitulino { 10d7f9b689SLuiz Capitulino .name = "help|?", 11129be006SWenchao Xia .args_type = "name:S?", 12d7f9b689SLuiz Capitulino .params = "[cmd]", 13d7f9b689SLuiz Capitulino .help = "show the help", 14*cbf81997SMarkus Armbruster .cmd = hmp_help, 1531785f1bSDr. David Alan Gilbert .flags = "p", 16d7f9b689SLuiz Capitulino }, 17d7f9b689SLuiz Capitulino 18a6b30bcaSPeter MaydellSRST 19a6b30bcaSPeter Maydell``help`` or ``?`` [*cmd*] 20a6b30bcaSPeter Maydell Show the help for all commands or just for command *cmd*. 21a6b30bcaSPeter MaydellERST 222313086aSBlue Swirl 23d7f9b689SLuiz Capitulino { 24d7f9b689SLuiz Capitulino .name = "commit", 25d7f9b689SLuiz Capitulino .args_type = "device:B", 26d7f9b689SLuiz Capitulino .params = "device|all", 27d7f9b689SLuiz Capitulino .help = "commit changes to the disk images (if -snapshot is used) or backing files", 282b9e3576SMarc-André Lureau .cmd = hmp_commit, 29d7f9b689SLuiz Capitulino }, 30d7f9b689SLuiz Capitulino 31a6b30bcaSPeter MaydellSRST 32a6b30bcaSPeter Maydell``commit`` 33a6b30bcaSPeter Maydell Commit changes to the disk images (if -snapshot is used) or backing files. 34a6b30bcaSPeter Maydell If the backing file is smaller than the snapshot, then the backing file 35a6b30bcaSPeter Maydell will be resized to be the same size as the snapshot. If the snapshot is 36a6b30bcaSPeter Maydell smaller than the backing file, the backing file will not be truncated. 37a6b30bcaSPeter Maydell If you want the backing file to match the size of the smaller snapshot, 38a6b30bcaSPeter Maydell you can safely truncate it yourself once the commit operation successfully 39a6b30bcaSPeter Maydell completes. 40a6b30bcaSPeter MaydellERST 412313086aSBlue Swirl 42d7f9b689SLuiz Capitulino { 43ff688cd2SPeter Maydell .name = "quit|q", 44d7f9b689SLuiz Capitulino .args_type = "", 45d7f9b689SLuiz Capitulino .params = "", 46d7f9b689SLuiz Capitulino .help = "quit the emulator", 472b9e3576SMarc-André Lureau .cmd = hmp_quit, 48ebe34444SPaolo Bonzini .flags = "p", 49d7f9b689SLuiz Capitulino }, 50d7f9b689SLuiz Capitulino 51a6b30bcaSPeter MaydellSRST 52ff688cd2SPeter Maydell``quit`` or ``q`` 53a6b30bcaSPeter Maydell Quit the emulator. 54a6b30bcaSPeter MaydellERST 552313086aSBlue Swirl 56d7f9b689SLuiz Capitulino { 578e8581e6SDr. David Alan Gilbert .name = "exit_preconfig", 588e8581e6SDr. David Alan Gilbert .args_type = "", 598e8581e6SDr. David Alan Gilbert .params = "", 608e8581e6SDr. David Alan Gilbert .help = "exit the preconfig state", 618e8581e6SDr. David Alan Gilbert .cmd = hmp_exit_preconfig, 628e8581e6SDr. David Alan Gilbert .flags = "p", 638e8581e6SDr. David Alan Gilbert }, 648e8581e6SDr. David Alan Gilbert 65a6b30bcaSPeter MaydellSRST 66a6b30bcaSPeter Maydell``exit_preconfig`` 67a6b30bcaSPeter Maydell This command makes QEMU exit the preconfig state and proceed with 68a6b30bcaSPeter Maydell VM initialization using configuration data provided on the command line 69a6b30bcaSPeter Maydell and via the QMP monitor during the preconfig state. The command is only 70a6b30bcaSPeter Maydell available during the preconfig state (i.e. when the --preconfig command 71a6b30bcaSPeter Maydell line option was in use). 72a6b30bcaSPeter MaydellERST 738e8581e6SDr. David Alan Gilbert 748e8581e6SDr. David Alan Gilbert { 756d4a2b3aSChristoph Hellwig .name = "block_resize", 766d4a2b3aSChristoph Hellwig .args_type = "device:B,size:o", 776d4a2b3aSChristoph Hellwig .params = "device size", 786d4a2b3aSChristoph Hellwig .help = "resize a block image", 792b9e3576SMarc-André Lureau .cmd = hmp_block_resize, 80eb94b81aSKevin Wolf .coroutine = true, 81f55ba801SPaolo Bonzini .flags = "p", 826d4a2b3aSChristoph Hellwig }, 836d4a2b3aSChristoph Hellwig 84a6b30bcaSPeter MaydellSRST 85a6b30bcaSPeter Maydell``block_resize`` 86a6b30bcaSPeter Maydell Resize a block image while a guest is running. Usually requires guest 87a6b30bcaSPeter Maydell action to see the updated size. Resize to a lower size is supported, 88a6b30bcaSPeter Maydell but should be used with extreme caution. Note that this command only 89a6b30bcaSPeter Maydell resizes image files, it can not resize block devices like LVM volumes. 90a6b30bcaSPeter MaydellERST 916d4a2b3aSChristoph Hellwig 9212bd451fSStefan Hajnoczi { 9312bd451fSStefan Hajnoczi .name = "block_stream", 94c83c66c3SStefan Hajnoczi .args_type = "device:B,speed:o?,base:s?", 95c83c66c3SStefan Hajnoczi .params = "device [speed [base]]", 9612bd451fSStefan Hajnoczi .help = "copy data from a backing file into a block device", 972b9e3576SMarc-André Lureau .cmd = hmp_block_stream, 98f55ba801SPaolo Bonzini .flags = "p", 9912bd451fSStefan Hajnoczi }, 10012bd451fSStefan Hajnoczi 101a6b30bcaSPeter MaydellSRST 102a6b30bcaSPeter Maydell``block_stream`` 103a6b30bcaSPeter Maydell Copy data from a backing file into a block device. 104a6b30bcaSPeter MaydellERST 1056d4a2b3aSChristoph Hellwig 1066d4a2b3aSChristoph Hellwig { 1072d47c6e9SStefan Hajnoczi .name = "block_job_set_speed", 108882ec7ceSStefan Hajnoczi .args_type = "device:B,speed:o", 109882ec7ceSStefan Hajnoczi .params = "device speed", 1102d47c6e9SStefan Hajnoczi .help = "set maximum speed for a background block operation", 1112b9e3576SMarc-André Lureau .cmd = hmp_block_job_set_speed, 112f55ba801SPaolo Bonzini .flags = "p", 1132d47c6e9SStefan Hajnoczi }, 1142d47c6e9SStefan Hajnoczi 115a6b30bcaSPeter MaydellSRST 116a6b30bcaSPeter Maydell``block_job_set_speed`` 117a6b30bcaSPeter Maydell Set maximum speed for a background block operation. 118a6b30bcaSPeter MaydellERST 1192d47c6e9SStefan Hajnoczi 1202d47c6e9SStefan Hajnoczi { 121370521a1SStefan Hajnoczi .name = "block_job_cancel", 1226e37fb81SPaolo Bonzini .args_type = "force:-f,device:B", 1236e37fb81SPaolo Bonzini .params = "[-f] device", 1246e37fb81SPaolo Bonzini .help = "stop an active background block operation (use -f" 125b76e4458SLiang Li "\n\t\t\t if you want to abort the operation immediately" 126b76e4458SLiang Li "\n\t\t\t instead of keep running until data is in sync)", 1272b9e3576SMarc-André Lureau .cmd = hmp_block_job_cancel, 128f55ba801SPaolo Bonzini .flags = "p", 129370521a1SStefan Hajnoczi }, 130370521a1SStefan Hajnoczi 131a6b30bcaSPeter MaydellSRST 132a6b30bcaSPeter Maydell``block_job_cancel`` 133a6b30bcaSPeter Maydell Stop an active background block operation (streaming, mirroring). 134a6b30bcaSPeter MaydellERST 135aeae883bSPaolo Bonzini 136aeae883bSPaolo Bonzini { 137aeae883bSPaolo Bonzini .name = "block_job_complete", 138aeae883bSPaolo Bonzini .args_type = "device:B", 139aeae883bSPaolo Bonzini .params = "device", 140aeae883bSPaolo Bonzini .help = "stop an active background block operation", 1412b9e3576SMarc-André Lureau .cmd = hmp_block_job_complete, 142f55ba801SPaolo Bonzini .flags = "p", 143aeae883bSPaolo Bonzini }, 144aeae883bSPaolo Bonzini 145a6b30bcaSPeter MaydellSRST 146a6b30bcaSPeter Maydell``block_job_complete`` 147a6b30bcaSPeter Maydell Manually trigger completion of an active background block operation. 148a6b30bcaSPeter Maydell For mirroring, this will switch the device to the destination path. 149a6b30bcaSPeter MaydellERST 150370521a1SStefan Hajnoczi 151370521a1SStefan Hajnoczi { 1526e37fb81SPaolo Bonzini .name = "block_job_pause", 1536e37fb81SPaolo Bonzini .args_type = "device:B", 1546e37fb81SPaolo Bonzini .params = "device", 1556e37fb81SPaolo Bonzini .help = "pause an active background block operation", 1562b9e3576SMarc-André Lureau .cmd = hmp_block_job_pause, 157f55ba801SPaolo Bonzini .flags = "p", 1586e37fb81SPaolo Bonzini }, 1596e37fb81SPaolo Bonzini 160a6b30bcaSPeter MaydellSRST 161a6b30bcaSPeter Maydell``block_job_pause`` 162a6b30bcaSPeter Maydell Pause an active block streaming operation. 163a6b30bcaSPeter MaydellERST 1646e37fb81SPaolo Bonzini 1656e37fb81SPaolo Bonzini { 1666e37fb81SPaolo Bonzini .name = "block_job_resume", 1676e37fb81SPaolo Bonzini .args_type = "device:B", 1686e37fb81SPaolo Bonzini .params = "device", 1696e37fb81SPaolo Bonzini .help = "resume a paused background block operation", 1702b9e3576SMarc-André Lureau .cmd = hmp_block_job_resume, 171f55ba801SPaolo Bonzini .flags = "p", 1726e37fb81SPaolo Bonzini }, 1736e37fb81SPaolo Bonzini 174a6b30bcaSPeter MaydellSRST 175a6b30bcaSPeter Maydell``block_job_resume`` 176a6b30bcaSPeter Maydell Resume a paused block streaming operation. 177a6b30bcaSPeter MaydellERST 1786e37fb81SPaolo Bonzini 1796e37fb81SPaolo Bonzini { 180d7f9b689SLuiz Capitulino .name = "eject", 18178d714e0SLuiz Capitulino .args_type = "force:-f,device:B", 182d7f9b689SLuiz Capitulino .params = "[-f] device", 183d7f9b689SLuiz Capitulino .help = "eject a removable medium (use -f to force it)", 1842b9e3576SMarc-André Lureau .cmd = hmp_eject, 185d7f9b689SLuiz Capitulino }, 186d7f9b689SLuiz Capitulino 187a6b30bcaSPeter MaydellSRST 188a6b30bcaSPeter Maydell``eject [-f]`` *device* 189a6b30bcaSPeter Maydell Eject a removable medium (use -f to force it). 190a6b30bcaSPeter MaydellERST 1912313086aSBlue Swirl 192d7f9b689SLuiz Capitulino { 1939063f814SRyan Harper .name = "drive_del", 194f7bdc41aSHani Benhabiles .args_type = "id:B", 1959063f814SRyan Harper .params = "device", 1969063f814SRyan Harper .help = "remove host block device", 1972b9e3576SMarc-André Lureau .cmd = hmp_drive_del, 1989063f814SRyan Harper }, 1999063f814SRyan Harper 200a6b30bcaSPeter MaydellSRST 201a6b30bcaSPeter Maydell``drive_del`` *device* 202a6b30bcaSPeter Maydell Remove host block device. The result is that guest generated IO is no longer 203a6b30bcaSPeter Maydell submitted against the host device underlying the disk. Once a drive has 204a6b30bcaSPeter Maydell been deleted, the QEMU Block layer returns -EIO which results in IO 205a6b30bcaSPeter Maydell errors in the guest for applications that are reading/writing to the device. 206a6b30bcaSPeter Maydell These errors are always reported to the guest, regardless of the drive's error 207a6b30bcaSPeter Maydell actions (drive options rerror, werror). 208a6b30bcaSPeter MaydellERST 2099063f814SRyan Harper 2109063f814SRyan Harper { 211d7f9b689SLuiz Capitulino .name = "change", 21280dd5affSDenis V. Lunev .args_type = "device:B,force:-f,target:F,arg:s?,read-only-mode:s?", 21380dd5affSDenis V. Lunev .params = "device [-f] filename [format [read-only-mode]]", 21480dd5affSDenis V. Lunev .help = "change a removable medium, optional format, use -f to force the operation", 2152b9e3576SMarc-André Lureau .cmd = hmp_change, 216d7f9b689SLuiz Capitulino }, 217d7f9b689SLuiz Capitulino 218a6b30bcaSPeter MaydellSRST 219a6b30bcaSPeter Maydell``change`` *device* *setting* 220a6b30bcaSPeter Maydell Change the configuration of a device. 221a6b30bcaSPeter Maydell 22280dd5affSDenis V. Lunev ``change`` *diskdevice* [-f] *filename* [*format* [*read-only-mode*]] 223a6b30bcaSPeter Maydell Change the medium for a removable disk device to point to *filename*. eg:: 224a6b30bcaSPeter Maydell 225a6b30bcaSPeter Maydell (qemu) change ide1-cd0 /path/to/some.iso 226a6b30bcaSPeter Maydell 22780dd5affSDenis V. Lunev ``-f`` 22880dd5affSDenis V. Lunev forces the operation even if the guest has locked the tray. 22980dd5affSDenis V. Lunev 230a6b30bcaSPeter Maydell *format* is optional. 231a6b30bcaSPeter Maydell 232a6b30bcaSPeter Maydell *read-only-mode* may be used to change the read-only status of the device. 233a6b30bcaSPeter Maydell It accepts the following values: 234a6b30bcaSPeter Maydell 235a6b30bcaSPeter Maydell retain 236a6b30bcaSPeter Maydell Retains the current status; this is the default. 237a6b30bcaSPeter Maydell 238a6b30bcaSPeter Maydell read-only 239a6b30bcaSPeter Maydell Makes the device read-only. 240a6b30bcaSPeter Maydell 241a6b30bcaSPeter Maydell read-write 242a6b30bcaSPeter Maydell Makes the device writable. 243a6b30bcaSPeter Maydell 244a6b30bcaSPeter Maydell ``change vnc password`` [*password*] 245a6b30bcaSPeter Maydell 246a6b30bcaSPeter Maydell Change the password associated with the VNC server. If the new password 247a6b30bcaSPeter Maydell is not supplied, the monitor will prompt for it to be entered. VNC 248a6b30bcaSPeter Maydell passwords are only significant up to 8 letters. eg:: 249a6b30bcaSPeter Maydell 250a6b30bcaSPeter Maydell (qemu) change vnc password 251a6b30bcaSPeter Maydell Password: ******** 252a6b30bcaSPeter Maydell 253a6b30bcaSPeter MaydellERST 2542313086aSBlue Swirl 255d7f9b689SLuiz Capitulino { 256d7f9b689SLuiz Capitulino .name = "screendump", 2579a0a119aSKshitij Suri .args_type = "filename:F,format:-fs,device:s?,head:i?", 2589a0a119aSKshitij Suri .params = "filename [-f format] [device [head]]", 259f771c544SThomas Huth .help = "save screen from head 'head' of display device 'device'" 2609a0a119aSKshitij Suri "in specified format 'format' as image 'filename'." 2619a0a119aSKshitij Suri "Currently only 'png' and 'ppm' formats are supported.", 2622b9e3576SMarc-André Lureau .cmd = hmp_screendump, 2630d9b90ceSMarc-André Lureau .coroutine = true, 264d7f9b689SLuiz Capitulino }, 265d7f9b689SLuiz Capitulino 266a6b30bcaSPeter MaydellSRST 267a6b30bcaSPeter Maydell``screendump`` *filename* 268a6b30bcaSPeter Maydell Save screen into PPM image *filename*. 269a6b30bcaSPeter MaydellERST 2702313086aSBlue Swirl 271d7f9b689SLuiz Capitulino { 272d7f9b689SLuiz Capitulino .name = "logfile", 273d7f9b689SLuiz Capitulino .args_type = "filename:F", 274d7f9b689SLuiz Capitulino .params = "filename", 275d7f9b689SLuiz Capitulino .help = "output logs to 'filename'", 2762b9e3576SMarc-André Lureau .cmd = hmp_logfile, 277d7f9b689SLuiz Capitulino }, 278d7f9b689SLuiz Capitulino 279a6b30bcaSPeter MaydellSRST 280a6b30bcaSPeter Maydell``logfile`` *filename* 281a6b30bcaSPeter Maydell Output logs to *filename*. 282a6b30bcaSPeter MaydellERST 2832313086aSBlue Swirl 28422890ab5SPrerna Saxena { 28522890ab5SPrerna Saxena .name = "trace-event", 28677e2b172SLluís Vilanova .args_type = "name:s,option:b,vcpu:i?", 28777e2b172SLluís Vilanova .params = "name on|off [vcpu]", 28877e2b172SLluís Vilanova .help = "changes status of a specific trace event " 28977e2b172SLluís Vilanova "(vcpu: vCPU to set, default is all)", 2902b9e3576SMarc-André Lureau .cmd = hmp_trace_event, 291987bd270SDr. David Alan Gilbert .command_completion = trace_event_completion, 29222890ab5SPrerna Saxena }, 29322890ab5SPrerna Saxena 294a6b30bcaSPeter MaydellSRST 295a6b30bcaSPeter Maydell``trace-event`` 296a6b30bcaSPeter Maydell changes status of a trace event 297a6b30bcaSPeter MaydellERST 298c5ceb523SStefan Hajnoczi 299c45a8168SMichael Roth#if defined(CONFIG_TRACE_SIMPLE) 300c5ceb523SStefan Hajnoczi { 301c5ceb523SStefan Hajnoczi .name = "trace-file", 302c5ceb523SStefan Hajnoczi .args_type = "op:s?,arg:F?", 303c5ceb523SStefan Hajnoczi .params = "on|off|flush|set [arg]", 304c5ceb523SStefan Hajnoczi .help = "open, close, or flush trace file, or set a new file name", 3052b9e3576SMarc-André Lureau .cmd = hmp_trace_file, 306c5ceb523SStefan Hajnoczi }, 307c5ceb523SStefan Hajnoczi 308a6b30bcaSPeter MaydellSRST 309a6b30bcaSPeter Maydell``trace-file on|off|flush`` 310a6b30bcaSPeter Maydell Open, close, or flush the trace file. If no argument is given, the 311a6b30bcaSPeter Maydell status of the trace file is displayed. 312a6b30bcaSPeter MaydellERST 31322890ab5SPrerna Saxena#endif 31422890ab5SPrerna Saxena 315d7f9b689SLuiz Capitulino { 316d7f9b689SLuiz Capitulino .name = "log", 317d7f9b689SLuiz Capitulino .args_type = "items:s", 318d7f9b689SLuiz Capitulino .params = "item1[,...]", 319989b697dSPeter Maydell .help = "activate logging of the specified items", 3202b9e3576SMarc-André Lureau .cmd = hmp_log, 321d7f9b689SLuiz Capitulino }, 322d7f9b689SLuiz Capitulino 323a6b30bcaSPeter MaydellSRST 324a6b30bcaSPeter Maydell``log`` *item1*\ [,...] 325a6b30bcaSPeter Maydell Activate logging of the specified items. 326a6b30bcaSPeter MaydellERST 3272313086aSBlue Swirl 328d7f9b689SLuiz Capitulino { 329d7f9b689SLuiz Capitulino .name = "savevm", 330d7f9b689SLuiz Capitulino .args_type = "name:s?", 3316ca08045SDaniel Henrique Barboza .params = "tag", 3326ca08045SDaniel Henrique Barboza .help = "save a VM snapshot. If no tag is provided, a new snapshot is created", 3332b9e3576SMarc-André Lureau .cmd = hmp_savevm, 334d7f9b689SLuiz Capitulino }, 335d7f9b689SLuiz Capitulino 336a6b30bcaSPeter MaydellSRST 337a6b30bcaSPeter Maydell``savevm`` *tag* 338a6b30bcaSPeter Maydell Create a snapshot of the whole virtual machine. If *tag* is 339a6b30bcaSPeter Maydell provided, it is used as human readable identifier. If there is already 340a6b30bcaSPeter Maydell a snapshot with the same tag, it is replaced. More info at 341a6b30bcaSPeter Maydell :ref:`vm_005fsnapshots`. 342a6b30bcaSPeter Maydell 343a6b30bcaSPeter Maydell Since 4.0, savevm stopped allowing the snapshot id to be set, accepting 344a6b30bcaSPeter Maydell only *tag* as parameter. 345a6b30bcaSPeter MaydellERST 3462313086aSBlue Swirl 347d7f9b689SLuiz Capitulino { 348d7f9b689SLuiz Capitulino .name = "loadvm", 349d7f9b689SLuiz Capitulino .args_type = "name:s", 3506ca08045SDaniel Henrique Barboza .params = "tag", 3516ca08045SDaniel Henrique Barboza .help = "restore a VM snapshot from its tag", 3522b9e3576SMarc-André Lureau .cmd = hmp_loadvm, 353b21631f3SHani Benhabiles .command_completion = loadvm_completion, 354d7f9b689SLuiz Capitulino }, 355d7f9b689SLuiz Capitulino 356a6b30bcaSPeter MaydellSRST 357a6b30bcaSPeter Maydell``loadvm`` *tag* 358a6b30bcaSPeter Maydell Set the whole virtual machine to the snapshot identified by the tag 359a6b30bcaSPeter Maydell *tag*. 360a6b30bcaSPeter Maydell 361a6b30bcaSPeter Maydell Since 4.0, loadvm stopped accepting snapshot id as parameter. 362a6b30bcaSPeter MaydellERST 3632313086aSBlue Swirl 364d7f9b689SLuiz Capitulino { 365d7f9b689SLuiz Capitulino .name = "delvm", 366d7f9b689SLuiz Capitulino .args_type = "name:s", 3676ca08045SDaniel Henrique Barboza .params = "tag", 3686ca08045SDaniel Henrique Barboza .help = "delete a VM snapshot from its tag", 3692b9e3576SMarc-André Lureau .cmd = hmp_delvm, 370b21631f3SHani Benhabiles .command_completion = delvm_completion, 371d7f9b689SLuiz Capitulino }, 372d7f9b689SLuiz Capitulino 373a6b30bcaSPeter MaydellSRST 374a6b30bcaSPeter Maydell``delvm`` *tag* 375a6b30bcaSPeter Maydell Delete the snapshot identified by *tag*. 376a6b30bcaSPeter Maydell 377a6b30bcaSPeter Maydell Since 4.0, delvm stopped deleting snapshots by snapshot id, accepting 378a6b30bcaSPeter Maydell only *tag* as parameter. 379a6b30bcaSPeter MaydellERST 3802313086aSBlue Swirl 381d7f9b689SLuiz Capitulino { 382d7f9b689SLuiz Capitulino .name = "singlestep", 383d7f9b689SLuiz Capitulino .args_type = "option:s?", 384d7f9b689SLuiz Capitulino .params = "[on|off]", 385d7f9b689SLuiz Capitulino .help = "run emulation in singlestep mode or switch to normal mode", 3862b9e3576SMarc-André Lureau .cmd = hmp_singlestep, 387d7f9b689SLuiz Capitulino }, 388d7f9b689SLuiz Capitulino 389a6b30bcaSPeter MaydellSRST 390a6b30bcaSPeter Maydell``singlestep [off]`` 391a6b30bcaSPeter Maydell Run the emulation in single step mode. 392a6b30bcaSPeter Maydell If called with option off, the emulation returns to normal mode. 393a6b30bcaSPeter MaydellERST 3942313086aSBlue Swirl 395d7f9b689SLuiz Capitulino { 396de4cf848SBALATON Zoltan .name = "stop|s", 397d7f9b689SLuiz Capitulino .args_type = "", 398d7f9b689SLuiz Capitulino .params = "", 399d7f9b689SLuiz Capitulino .help = "stop emulation", 4002b9e3576SMarc-André Lureau .cmd = hmp_stop, 401d7f9b689SLuiz Capitulino }, 402d7f9b689SLuiz Capitulino 403a6b30bcaSPeter MaydellSRST 404de4cf848SBALATON Zoltan``stop`` or ``s`` 405a6b30bcaSPeter Maydell Stop emulation. 406a6b30bcaSPeter MaydellERST 4072313086aSBlue Swirl 408d7f9b689SLuiz Capitulino { 409ff688cd2SPeter Maydell .name = "cont|c", 410d7f9b689SLuiz Capitulino .args_type = "", 411d7f9b689SLuiz Capitulino .params = "", 412d7f9b689SLuiz Capitulino .help = "resume emulation", 4132b9e3576SMarc-André Lureau .cmd = hmp_cont, 414d7f9b689SLuiz Capitulino }, 415d7f9b689SLuiz Capitulino 416a6b30bcaSPeter MaydellSRST 417ff688cd2SPeter Maydell``cont`` or ``c`` 418a6b30bcaSPeter Maydell Resume emulation. 419a6b30bcaSPeter MaydellERST 4202313086aSBlue Swirl 421d7f9b689SLuiz Capitulino { 4229b9df25aSGerd Hoffmann .name = "system_wakeup", 4239b9df25aSGerd Hoffmann .args_type = "", 4249b9df25aSGerd Hoffmann .params = "", 4259b9df25aSGerd Hoffmann .help = "wakeup guest from suspend", 4262b9e3576SMarc-André Lureau .cmd = hmp_system_wakeup, 4279b9df25aSGerd Hoffmann }, 4289b9df25aSGerd Hoffmann 429a6b30bcaSPeter MaydellSRST 430a6b30bcaSPeter Maydell``system_wakeup`` 431a6b30bcaSPeter Maydell Wakeup guest from suspend. 432a6b30bcaSPeter MaydellERST 4339b9df25aSGerd Hoffmann 4349b9df25aSGerd Hoffmann { 435d7f9b689SLuiz Capitulino .name = "gdbserver", 436d7f9b689SLuiz Capitulino .args_type = "device:s?", 437d7f9b689SLuiz Capitulino .params = "[device]", 438d7f9b689SLuiz Capitulino .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'", 4392b9e3576SMarc-André Lureau .cmd = hmp_gdbserver, 440d7f9b689SLuiz Capitulino }, 441d7f9b689SLuiz Capitulino 442a6b30bcaSPeter MaydellSRST 443a6b30bcaSPeter Maydell``gdbserver`` [*port*] 444a6b30bcaSPeter Maydell Start gdbserver session (default *port*\=1234) 445a6b30bcaSPeter MaydellERST 4462313086aSBlue Swirl 447d7f9b689SLuiz Capitulino { 448d7f9b689SLuiz Capitulino .name = "x", 449d7f9b689SLuiz Capitulino .args_type = "fmt:/,addr:l", 450d7f9b689SLuiz Capitulino .params = "/fmt addr", 451d7f9b689SLuiz Capitulino .help = "virtual memory dump starting at 'addr'", 4522b9e3576SMarc-André Lureau .cmd = hmp_memory_dump, 453d7f9b689SLuiz Capitulino }, 454d7f9b689SLuiz Capitulino 455a6b30bcaSPeter MaydellSRST 456a6b30bcaSPeter Maydell``x/``\ *fmt* *addr* 457a6b30bcaSPeter Maydell Virtual memory dump starting at *addr*. 458a6b30bcaSPeter MaydellERST 4592313086aSBlue Swirl 460d7f9b689SLuiz Capitulino { 461d7f9b689SLuiz Capitulino .name = "xp", 462d7f9b689SLuiz Capitulino .args_type = "fmt:/,addr:l", 463d7f9b689SLuiz Capitulino .params = "/fmt addr", 464d7f9b689SLuiz Capitulino .help = "physical memory dump starting at 'addr'", 4652b9e3576SMarc-André Lureau .cmd = hmp_physical_memory_dump, 466d7f9b689SLuiz Capitulino }, 467d7f9b689SLuiz Capitulino 468a6b30bcaSPeter MaydellSRST 469a6b30bcaSPeter Maydell``xp /``\ *fmt* *addr* 470a6b30bcaSPeter Maydell Physical memory dump starting at *addr*. 471a6b30bcaSPeter Maydell 472a6b30bcaSPeter Maydell *fmt* is a format which tells the command how to format the 473a6b30bcaSPeter Maydell data. Its syntax is: ``/{count}{format}{size}`` 474a6b30bcaSPeter Maydell 475a6b30bcaSPeter Maydell *count* 476a6b30bcaSPeter Maydell is the number of items to be dumped. 477a6b30bcaSPeter Maydell *format* 478a6b30bcaSPeter Maydell can be x (hex), d (signed decimal), u (unsigned decimal), o (octal), 479a6b30bcaSPeter Maydell c (char) or i (asm instruction). 480a6b30bcaSPeter Maydell *size* 481a6b30bcaSPeter Maydell can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86, 482a6b30bcaSPeter Maydell ``h`` or ``w`` can be specified with the ``i`` format to 483a6b30bcaSPeter Maydell respectively select 16 or 32 bit code instruction size. 484a6b30bcaSPeter Maydell 485a6b30bcaSPeter Maydell Examples: 486a6b30bcaSPeter Maydell 487a6b30bcaSPeter Maydell Dump 10 instructions at the current instruction pointer:: 488a6b30bcaSPeter Maydell 489a6b30bcaSPeter Maydell (qemu) x/10i $eip 490a6b30bcaSPeter Maydell 0x90107063: ret 491a6b30bcaSPeter Maydell 0x90107064: sti 492a6b30bcaSPeter Maydell 0x90107065: lea 0x0(%esi,1),%esi 493a6b30bcaSPeter Maydell 0x90107069: lea 0x0(%edi,1),%edi 494a6b30bcaSPeter Maydell 0x90107070: ret 495a6b30bcaSPeter Maydell 0x90107071: jmp 0x90107080 496a6b30bcaSPeter Maydell 0x90107073: nop 497a6b30bcaSPeter Maydell 0x90107074: nop 498a6b30bcaSPeter Maydell 0x90107075: nop 499a6b30bcaSPeter Maydell 0x90107076: nop 500a6b30bcaSPeter Maydell 501a6b30bcaSPeter Maydell Dump 80 16 bit values at the start of the video memory:: 502a6b30bcaSPeter Maydell 503a6b30bcaSPeter Maydell (qemu) xp/80hx 0xb8000 504a6b30bcaSPeter Maydell 0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42 505a6b30bcaSPeter Maydell 0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41 506a6b30bcaSPeter Maydell 0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72 507a6b30bcaSPeter Maydell 0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73 508a6b30bcaSPeter Maydell 0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20 509a6b30bcaSPeter Maydell 0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720 510a6b30bcaSPeter Maydell 0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 511a6b30bcaSPeter Maydell 0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 512a6b30bcaSPeter Maydell 0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 513a6b30bcaSPeter Maydell 0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 514a6b30bcaSPeter Maydell 515a6b30bcaSPeter MaydellERST 5162313086aSBlue Swirl 517d7f9b689SLuiz Capitulino { 518e9628441SPaolo Bonzini .name = "gpa2hva", 519e9628441SPaolo Bonzini .args_type = "addr:l", 520e9628441SPaolo Bonzini .params = "addr", 521e9628441SPaolo Bonzini .help = "print the host virtual address corresponding to a guest physical address", 522e9628441SPaolo Bonzini .cmd = hmp_gpa2hva, 523e9628441SPaolo Bonzini }, 524e9628441SPaolo Bonzini 525a6b30bcaSPeter MaydellSRST 526a6b30bcaSPeter Maydell``gpa2hva`` *addr* 527a6b30bcaSPeter Maydell Print the host virtual address at which the guest's physical address *addr* 528a6b30bcaSPeter Maydell is mapped. 529a6b30bcaSPeter MaydellERST 530e9628441SPaolo Bonzini 531e9628441SPaolo Bonzini#ifdef CONFIG_LINUX 532e9628441SPaolo Bonzini { 533e9628441SPaolo Bonzini .name = "gpa2hpa", 534e9628441SPaolo Bonzini .args_type = "addr:l", 535e9628441SPaolo Bonzini .params = "addr", 536e9628441SPaolo Bonzini .help = "print the host physical address corresponding to a guest physical address", 537e9628441SPaolo Bonzini .cmd = hmp_gpa2hpa, 538e9628441SPaolo Bonzini }, 539e9628441SPaolo Bonzini#endif 540e9628441SPaolo Bonzini 541a6b30bcaSPeter MaydellSRST 542a6b30bcaSPeter Maydell``gpa2hpa`` *addr* 543a6b30bcaSPeter Maydell Print the host physical address at which the guest's physical address *addr* 544a6b30bcaSPeter Maydell is mapped. 545a6b30bcaSPeter MaydellERST 546e9628441SPaolo Bonzini 547e9628441SPaolo Bonzini { 548574d9693SDr. David Alan Gilbert .name = "gva2gpa", 549574d9693SDr. David Alan Gilbert .args_type = "addr:l", 550574d9693SDr. David Alan Gilbert .params = "addr", 551574d9693SDr. David Alan Gilbert .help = "print the guest physical address corresponding to a guest virtual address", 552574d9693SDr. David Alan Gilbert .cmd = hmp_gva2gpa, 553574d9693SDr. David Alan Gilbert }, 554574d9693SDr. David Alan Gilbert 555a6b30bcaSPeter MaydellSRST 556a6b30bcaSPeter Maydell``gva2gpa`` *addr* 557a6b30bcaSPeter Maydell Print the guest physical address at which the guest's virtual address *addr* 558a6b30bcaSPeter Maydell is mapped based on the mapping for the current CPU. 559a6b30bcaSPeter MaydellERST 560574d9693SDr. David Alan Gilbert 561574d9693SDr. David Alan Gilbert { 562ff688cd2SPeter Maydell .name = "print|p", 563d7f9b689SLuiz Capitulino .args_type = "fmt:/,val:l", 564d7f9b689SLuiz Capitulino .params = "/fmt expr", 565d7f9b689SLuiz Capitulino .help = "print expression value (use $reg for CPU register access)", 566*cbf81997SMarkus Armbruster .cmd = hmp_print, 567d7f9b689SLuiz Capitulino }, 568d7f9b689SLuiz Capitulino 569a6b30bcaSPeter MaydellSRST 570ff688cd2SPeter Maydell``print`` or ``p/``\ *fmt* *expr* 571a6b30bcaSPeter Maydell Print expression value. Only the *format* part of *fmt* is 572a6b30bcaSPeter Maydell used. 573a6b30bcaSPeter MaydellERST 5742313086aSBlue Swirl 575d7f9b689SLuiz Capitulino { 576d7f9b689SLuiz Capitulino .name = "i", 577d7f9b689SLuiz Capitulino .args_type = "fmt:/,addr:i,index:i.", 578d7f9b689SLuiz Capitulino .params = "/fmt addr", 579d7f9b689SLuiz Capitulino .help = "I/O port read", 5802b9e3576SMarc-André Lureau .cmd = hmp_ioport_read, 581d7f9b689SLuiz Capitulino }, 582d7f9b689SLuiz Capitulino 583a6b30bcaSPeter MaydellSRST 584a6b30bcaSPeter Maydell``i/``\ *fmt* *addr* [.\ *index*\ ] 585a6b30bcaSPeter Maydell Read I/O port. 586a6b30bcaSPeter MaydellERST 5872313086aSBlue Swirl 588d7f9b689SLuiz Capitulino { 589d7f9b689SLuiz Capitulino .name = "o", 590d7f9b689SLuiz Capitulino .args_type = "fmt:/,addr:i,val:i", 591d7f9b689SLuiz Capitulino .params = "/fmt addr value", 592d7f9b689SLuiz Capitulino .help = "I/O port write", 5932b9e3576SMarc-André Lureau .cmd = hmp_ioport_write, 594d7f9b689SLuiz Capitulino }, 595d7f9b689SLuiz Capitulino 596a6b30bcaSPeter MaydellSRST 597a6b30bcaSPeter Maydell``o/``\ *fmt* *addr* *val* 598a6b30bcaSPeter Maydell Write to I/O port. 599a6b30bcaSPeter MaydellERST 6002313086aSBlue Swirl 601d7f9b689SLuiz Capitulino { 602d7f9b689SLuiz Capitulino .name = "sendkey", 6032ef20c15SAmos Kong .args_type = "keys:s,hold-time:i?", 604d7f9b689SLuiz Capitulino .params = "keys [hold_ms]", 605d7f9b689SLuiz Capitulino .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)", 6062b9e3576SMarc-André Lureau .cmd = hmp_sendkey, 60729136cd8SHani Benhabiles .command_completion = sendkey_completion, 608d7f9b689SLuiz Capitulino }, 609d7f9b689SLuiz Capitulino 610a6b30bcaSPeter MaydellSRST 611a6b30bcaSPeter Maydell``sendkey`` *keys* 612a6b30bcaSPeter Maydell Send *keys* to the guest. *keys* could be the name of the 613a6b30bcaSPeter Maydell key or the raw value in hexadecimal format. Use ``-`` to press 614a6b30bcaSPeter Maydell several keys simultaneously. Example:: 615a6b30bcaSPeter Maydell 616a6b30bcaSPeter Maydell sendkey ctrl-alt-f1 617a6b30bcaSPeter Maydell 618a6b30bcaSPeter Maydell This command is useful to send keys that your graphical user interface 619a6b30bcaSPeter Maydell intercepts at low level, such as ``ctrl-alt-f1`` in X Window. 620a6b30bcaSPeter MaydellERST 621dd12e1bbSEmilio G. Cota { 622dd12e1bbSEmilio G. Cota .name = "sync-profile", 623dd12e1bbSEmilio G. Cota .args_type = "op:s?", 624dd12e1bbSEmilio G. Cota .params = "[on|off|reset]", 625dd12e1bbSEmilio G. Cota .help = "enable, disable or reset synchronization profiling. " 626dd12e1bbSEmilio G. Cota "With no arguments, prints whether profiling is on or off.", 627dd12e1bbSEmilio G. Cota .cmd = hmp_sync_profile, 628dd12e1bbSEmilio G. Cota }, 629dd12e1bbSEmilio G. Cota 630a6b30bcaSPeter MaydellSRST 631a6b30bcaSPeter Maydell``sync-profile [on|off|reset]`` 632a6b30bcaSPeter Maydell Enable, disable or reset synchronization profiling. With no arguments, prints 633a6b30bcaSPeter Maydell whether profiling is on or off. 634a6b30bcaSPeter MaydellERST 6352313086aSBlue Swirl 636d7f9b689SLuiz Capitulino { 637d7f9b689SLuiz Capitulino .name = "system_reset", 638d7f9b689SLuiz Capitulino .args_type = "", 639d7f9b689SLuiz Capitulino .params = "", 640d7f9b689SLuiz Capitulino .help = "reset the system", 6412b9e3576SMarc-André Lureau .cmd = hmp_system_reset, 642d7f9b689SLuiz Capitulino }, 643d7f9b689SLuiz Capitulino 644a6b30bcaSPeter MaydellSRST 645a6b30bcaSPeter Maydell``system_reset`` 646a6b30bcaSPeter Maydell Reset the system. 647a6b30bcaSPeter MaydellERST 6482313086aSBlue Swirl 649d7f9b689SLuiz Capitulino { 650d7f9b689SLuiz Capitulino .name = "system_powerdown", 651d7f9b689SLuiz Capitulino .args_type = "", 652d7f9b689SLuiz Capitulino .params = "", 653d7f9b689SLuiz Capitulino .help = "send system power down event", 6542b9e3576SMarc-André Lureau .cmd = hmp_system_powerdown, 655d7f9b689SLuiz Capitulino }, 656d7f9b689SLuiz Capitulino 657a6b30bcaSPeter MaydellSRST 658a6b30bcaSPeter Maydell``system_powerdown`` 659a6b30bcaSPeter Maydell Power down the system (if supported). 660a6b30bcaSPeter MaydellERST 6612313086aSBlue Swirl 662d7f9b689SLuiz Capitulino { 663d7f9b689SLuiz Capitulino .name = "sum", 664d7f9b689SLuiz Capitulino .args_type = "start:i,size:i", 665d7f9b689SLuiz Capitulino .params = "addr size", 666d7f9b689SLuiz Capitulino .help = "compute the checksum of a memory region", 6672b9e3576SMarc-André Lureau .cmd = hmp_sum, 668d7f9b689SLuiz Capitulino }, 669d7f9b689SLuiz Capitulino 670a6b30bcaSPeter MaydellSRST 671a6b30bcaSPeter Maydell``sum`` *addr* *size* 672a6b30bcaSPeter Maydell Compute the checksum of a memory region. 673a6b30bcaSPeter MaydellERST 6742313086aSBlue Swirl 675d7f9b689SLuiz Capitulino { 676d7f9b689SLuiz Capitulino .name = "device_add", 677c7e4e8ceSMarkus Armbruster .args_type = "device:O", 678c7e4e8ceSMarkus Armbruster .params = "driver[,prop=value][,...]", 679d7f9b689SLuiz Capitulino .help = "add device, like -device on the command line", 6802b9e3576SMarc-André Lureau .cmd = hmp_device_add, 6812da1b3abSHani Benhabiles .command_completion = device_add_completion, 682d7f9b689SLuiz Capitulino }, 683d7f9b689SLuiz Capitulino 684a6b30bcaSPeter MaydellSRST 685a6b30bcaSPeter Maydell``device_add`` *config* 686a6b30bcaSPeter Maydell Add device. 687a6b30bcaSPeter MaydellERST 6883418bd25SGerd Hoffmann 689d7f9b689SLuiz Capitulino { 690d7f9b689SLuiz Capitulino .name = "device_del", 691d7f9b689SLuiz Capitulino .args_type = "id:s", 692d7f9b689SLuiz Capitulino .params = "device", 693d7f9b689SLuiz Capitulino .help = "remove device", 6942b9e3576SMarc-André Lureau .cmd = hmp_device_del, 6952da1b3abSHani Benhabiles .command_completion = device_del_completion, 696d7f9b689SLuiz Capitulino }, 697d7f9b689SLuiz Capitulino 698a6b30bcaSPeter MaydellSRST 699a6b30bcaSPeter Maydell``device_del`` *id* 700a6b30bcaSPeter Maydell Remove device *id*. *id* may be a short ID 701a6b30bcaSPeter Maydell or a QOM object path. 702a6b30bcaSPeter MaydellERST 7033418bd25SGerd Hoffmann 704d7f9b689SLuiz Capitulino { 705d7f9b689SLuiz Capitulino .name = "cpu", 706d7f9b689SLuiz Capitulino .args_type = "index:i", 707d7f9b689SLuiz Capitulino .params = "index", 708d7f9b689SLuiz Capitulino .help = "set the default CPU", 7092b9e3576SMarc-André Lureau .cmd = hmp_cpu, 710d7f9b689SLuiz Capitulino }, 7113418bd25SGerd Hoffmann 712a6b30bcaSPeter MaydellSRST 713a6b30bcaSPeter Maydell``cpu`` *index* 714a6b30bcaSPeter Maydell Set the default CPU. 715a6b30bcaSPeter MaydellERST 7162313086aSBlue Swirl 717d7f9b689SLuiz Capitulino { 718d7f9b689SLuiz Capitulino .name = "mouse_move", 719d7f9b689SLuiz Capitulino .args_type = "dx_str:s,dy_str:s,dz_str:s?", 720d7f9b689SLuiz Capitulino .params = "dx dy [dz]", 721d7f9b689SLuiz Capitulino .help = "send mouse move events", 7222b9e3576SMarc-André Lureau .cmd = hmp_mouse_move, 723d7f9b689SLuiz Capitulino }, 724d7f9b689SLuiz Capitulino 725a6b30bcaSPeter MaydellSRST 726a6b30bcaSPeter Maydell``mouse_move`` *dx* *dy* [*dz*] 727a6b30bcaSPeter Maydell Move the active mouse to the specified coordinates *dx* *dy* 728a6b30bcaSPeter Maydell with optional scroll axis *dz*. 729a6b30bcaSPeter MaydellERST 7302313086aSBlue Swirl 731d7f9b689SLuiz Capitulino { 732d7f9b689SLuiz Capitulino .name = "mouse_button", 733d7f9b689SLuiz Capitulino .args_type = "button_state:i", 734d7f9b689SLuiz Capitulino .params = "state", 735d7f9b689SLuiz Capitulino .help = "change mouse button state (1=L, 2=M, 4=R)", 7362b9e3576SMarc-André Lureau .cmd = hmp_mouse_button, 737d7f9b689SLuiz Capitulino }, 738d7f9b689SLuiz Capitulino 739a6b30bcaSPeter MaydellSRST 740a6b30bcaSPeter Maydell``mouse_button`` *val* 741a6b30bcaSPeter Maydell Change the active mouse button state *val* (1=L, 2=M, 4=R). 742a6b30bcaSPeter MaydellERST 7432313086aSBlue Swirl 744d7f9b689SLuiz Capitulino { 745d7f9b689SLuiz Capitulino .name = "mouse_set", 746d7f9b689SLuiz Capitulino .args_type = "index:i", 747d7f9b689SLuiz Capitulino .params = "index", 748d7f9b689SLuiz Capitulino .help = "set which mouse device receives events", 7492b9e3576SMarc-André Lureau .cmd = hmp_mouse_set, 750d7f9b689SLuiz Capitulino }, 751d7f9b689SLuiz Capitulino 752a6b30bcaSPeter MaydellSRST 753a6b30bcaSPeter Maydell``mouse_set`` *index* 754a6b30bcaSPeter Maydell Set which mouse device receives events at given *index*, index 755a6b30bcaSPeter Maydell can be obtained with:: 756a6b30bcaSPeter Maydell 757a6b30bcaSPeter Maydell info mice 758a6b30bcaSPeter Maydell 759a6b30bcaSPeter MaydellERST 7602313086aSBlue Swirl 761d7f9b689SLuiz Capitulino { 762d7f9b689SLuiz Capitulino .name = "wavcapture", 763f0b9f36dSKővágó, Zoltán .args_type = "path:F,audiodev:s,freq:i?,bits:i?,nchannels:i?", 764f0b9f36dSKővágó, Zoltán .params = "path audiodev [frequency [bits [channels]]]", 765d7f9b689SLuiz Capitulino .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)", 7662b9e3576SMarc-André Lureau .cmd = hmp_wavcapture, 767d7f9b689SLuiz Capitulino }, 768a6b30bcaSPeter MaydellSRST 769a6b30bcaSPeter Maydell``wavcapture`` *filename* *audiodev* [*frequency* [*bits* [*channels*]]] 770a6b30bcaSPeter Maydell Capture audio into *filename* from *audiodev*, using sample rate 771a6b30bcaSPeter Maydell *frequency* bits per sample *bits* and number of channels 772a6b30bcaSPeter Maydell *channels*. 773a6b30bcaSPeter Maydell 774a6b30bcaSPeter Maydell Defaults: 775a6b30bcaSPeter Maydell 776a6b30bcaSPeter Maydell - Sample rate = 44100 Hz - CD quality 777a6b30bcaSPeter Maydell - Bits = 16 778a6b30bcaSPeter Maydell - Number of channels = 2 - Stereo 779a6b30bcaSPeter MaydellERST 7802313086aSBlue Swirl 781d7f9b689SLuiz Capitulino { 782d7f9b689SLuiz Capitulino .name = "stopcapture", 783d7f9b689SLuiz Capitulino .args_type = "n:i", 784d7f9b689SLuiz Capitulino .params = "capture index", 785d7f9b689SLuiz Capitulino .help = "stop capture", 7862b9e3576SMarc-André Lureau .cmd = hmp_stopcapture, 787d7f9b689SLuiz Capitulino }, 788a6b30bcaSPeter MaydellSRST 789a6b30bcaSPeter Maydell``stopcapture`` *index* 790a6b30bcaSPeter Maydell Stop capture with a given *index*, index can be obtained with:: 791a6b30bcaSPeter Maydell 792a6b30bcaSPeter Maydell info capture 793a6b30bcaSPeter Maydell 794a6b30bcaSPeter MaydellERST 7952313086aSBlue Swirl 796d7f9b689SLuiz Capitulino { 797d7f9b689SLuiz Capitulino .name = "memsave", 798d7f9b689SLuiz Capitulino .args_type = "val:l,size:i,filename:s", 799d7f9b689SLuiz Capitulino .params = "addr size file", 800d7f9b689SLuiz Capitulino .help = "save to disk virtual memory dump starting at 'addr' of size 'size'", 8012b9e3576SMarc-André Lureau .cmd = hmp_memsave, 802d7f9b689SLuiz Capitulino }, 803d7f9b689SLuiz Capitulino 804a6b30bcaSPeter MaydellSRST 805a6b30bcaSPeter Maydell``memsave`` *addr* *size* *file* 806a6b30bcaSPeter Maydell save to disk virtual memory dump starting at *addr* of size *size*. 807a6b30bcaSPeter MaydellERST 8082313086aSBlue Swirl 809d7f9b689SLuiz Capitulino { 810d7f9b689SLuiz Capitulino .name = "pmemsave", 811d7f9b689SLuiz Capitulino .args_type = "val:l,size:i,filename:s", 812d7f9b689SLuiz Capitulino .params = "addr size file", 813d7f9b689SLuiz Capitulino .help = "save to disk physical memory dump starting at 'addr' of size 'size'", 8142b9e3576SMarc-André Lureau .cmd = hmp_pmemsave, 815d7f9b689SLuiz Capitulino }, 816d7f9b689SLuiz Capitulino 817a6b30bcaSPeter MaydellSRST 818a6b30bcaSPeter Maydell``pmemsave`` *addr* *size* *file* 819a6b30bcaSPeter Maydell save to disk physical memory dump starting at *addr* of size *size*. 820a6b30bcaSPeter MaydellERST 8212313086aSBlue Swirl 822d7f9b689SLuiz Capitulino { 823d7f9b689SLuiz Capitulino .name = "boot_set", 824d7f9b689SLuiz Capitulino .args_type = "bootdevice:s", 825d7f9b689SLuiz Capitulino .params = "bootdevice", 826d7f9b689SLuiz Capitulino .help = "define new values for the boot device list", 8272b9e3576SMarc-André Lureau .cmd = hmp_boot_set, 828d7f9b689SLuiz Capitulino }, 829d7f9b689SLuiz Capitulino 830a6b30bcaSPeter MaydellSRST 831a6b30bcaSPeter Maydell``boot_set`` *bootdevicelist* 832a6b30bcaSPeter Maydell Define new values for the boot device list. Those values will override 833a6b30bcaSPeter Maydell the values specified on the command line through the ``-boot`` option. 834a6b30bcaSPeter Maydell 835a6b30bcaSPeter Maydell The values that can be specified here depend on the machine type, but are 836a6b30bcaSPeter Maydell the same that can be specified in the ``-boot`` command line option. 837a6b30bcaSPeter MaydellERST 8382313086aSBlue Swirl 839d7f9b689SLuiz Capitulino { 840d7f9b689SLuiz Capitulino .name = "nmi", 841e9b4b432SLuiz Capitulino .args_type = "", 842e9b4b432SLuiz Capitulino .params = "", 8439cb805fdSAlexey Kardashevskiy .help = "inject an NMI", 8442b9e3576SMarc-André Lureau .cmd = hmp_nmi, 845d7f9b689SLuiz Capitulino }, 846a6b30bcaSPeter MaydellSRST 847a6b30bcaSPeter Maydell``nmi`` *cpu* 848a6b30bcaSPeter Maydell Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64). 849a6b30bcaSPeter MaydellERST 8501f590cf9SLei Li 8511f590cf9SLei Li { 8523949e594SMarkus Armbruster .name = "ringbuf_write", 8531f590cf9SLei Li .args_type = "device:s,data:s", 8541f590cf9SLei Li .params = "device data", 8553949e594SMarkus Armbruster .help = "Write to a ring buffer character device", 8562b9e3576SMarc-André Lureau .cmd = hmp_ringbuf_write, 8578e597779SHani Benhabiles .command_completion = ringbuf_write_completion, 8581f590cf9SLei Li }, 8591f590cf9SLei Li 860a6b30bcaSPeter MaydellSRST 861a6b30bcaSPeter Maydell``ringbuf_write`` *device* *data* 862a6b30bcaSPeter Maydell Write *data* to ring buffer character device *device*. 863a6b30bcaSPeter Maydell *data* must be a UTF-8 string. 864a6b30bcaSPeter MaydellERST 8652313086aSBlue Swirl 866d7f9b689SLuiz Capitulino { 8673949e594SMarkus Armbruster .name = "ringbuf_read", 86849b6d722SLei Li .args_type = "device:s,size:i", 86949b6d722SLei Li .params = "device size", 8703949e594SMarkus Armbruster .help = "Read from a ring buffer character device", 8712b9e3576SMarc-André Lureau .cmd = hmp_ringbuf_read, 8728e597779SHani Benhabiles .command_completion = ringbuf_write_completion, 87349b6d722SLei Li }, 87449b6d722SLei Li 875a6b30bcaSPeter MaydellSRST 876a6b30bcaSPeter Maydell``ringbuf_read`` *device* 877a6b30bcaSPeter Maydell Read and print up to *size* bytes from ring buffer character 878a6b30bcaSPeter Maydell device *device*. 879a6b30bcaSPeter Maydell Certain non-printable characters are printed ``\uXXXX``, where ``XXXX`` is the 880a6b30bcaSPeter Maydell character code in hexadecimal. Character ``\`` is printed ``\\``. 881a6b30bcaSPeter Maydell Bug: can screw up when the buffer contains invalid UTF-8 sequences, 882a6b30bcaSPeter Maydell NUL characters, after the ring buffer lost data, and when reading 883a6b30bcaSPeter Maydell stops because the size limit is reached. 884a6b30bcaSPeter MaydellERST 88549b6d722SLei Li 88649b6d722SLei Li { 887544f6ea3SDr. David Alan Gilbert .name = "announce_self", 888c6644548SDr. David Alan Gilbert .args_type = "interfaces:s?,id:s?", 889c6644548SDr. David Alan Gilbert .params = "[interfaces] [id]", 890544f6ea3SDr. David Alan Gilbert .help = "Trigger GARP/RARP announcements", 891544f6ea3SDr. David Alan Gilbert .cmd = hmp_announce_self, 892544f6ea3SDr. David Alan Gilbert }, 893544f6ea3SDr. David Alan Gilbert 894a6b30bcaSPeter MaydellSRST 895a6b30bcaSPeter Maydell``announce_self`` 896a6b30bcaSPeter Maydell Trigger a round of GARP/RARP broadcasts; this is useful for explicitly 897a6b30bcaSPeter Maydell updating the network infrastructure after a reconfiguration or some forms 898a6b30bcaSPeter Maydell of migration. The timings of the round are set by the migration announce 899a6b30bcaSPeter Maydell parameters. An optional comma separated *interfaces* list restricts the 900a6b30bcaSPeter Maydell announce to the named set of interfaces. An optional *id* can be used to 901a6b30bcaSPeter Maydell start a separate announce timer and to change the parameters of it later. 902a6b30bcaSPeter MaydellERST 903544f6ea3SDr. David Alan Gilbert 904544f6ea3SDr. David Alan Gilbert { 905d7f9b689SLuiz Capitulino .name = "migrate", 9067a4da28bSPeter Xu .args_type = "detach:-d,blk:-b,inc:-i,resume:-r,uri:s", 9077a4da28bSPeter Xu .params = "[-d] [-b] [-i] [-r] uri", 908fbc3d96cSlirans@il.ibm.com .help = "migrate to URI (using -d to not wait for completion)" 909fbc3d96cSlirans@il.ibm.com "\n\t\t\t -b for migration without shared storage with" 910fbc3d96cSlirans@il.ibm.com " full copy of disk\n\t\t\t -i for migration without " 911fbc3d96cSlirans@il.ibm.com "shared storage with incremental copy of disk " 9127a4da28bSPeter Xu "(base image shared between src and destination)" 9137a4da28bSPeter Xu "\n\t\t\t -r to resume a paused migration", 9142b9e3576SMarc-André Lureau .cmd = hmp_migrate, 915d7f9b689SLuiz Capitulino }, 916d7f9b689SLuiz Capitulino 917fbc3d96cSlirans@il.ibm.com 918a6b30bcaSPeter MaydellSRST 919a6b30bcaSPeter Maydell``migrate [-d] [-b] [-i]`` *uri* 920a6b30bcaSPeter Maydell Migrate to *uri* (using -d to not wait for completion). 921a6b30bcaSPeter Maydell 922a6b30bcaSPeter Maydell ``-b`` 923a6b30bcaSPeter Maydell for migration with full copy of disk 924a6b30bcaSPeter Maydell ``-i`` 925a6b30bcaSPeter Maydell for migration with incremental copy of disk (base image is shared) 926a6b30bcaSPeter MaydellERST 9272313086aSBlue Swirl 928d7f9b689SLuiz Capitulino { 929d7f9b689SLuiz Capitulino .name = "migrate_cancel", 930d7f9b689SLuiz Capitulino .args_type = "", 931d7f9b689SLuiz Capitulino .params = "", 932d7f9b689SLuiz Capitulino .help = "cancel the current VM migration", 9332b9e3576SMarc-André Lureau .cmd = hmp_migrate_cancel, 934d7f9b689SLuiz Capitulino }, 935d7f9b689SLuiz Capitulino 936a6b30bcaSPeter MaydellSRST 937a6b30bcaSPeter Maydell``migrate_cancel`` 938a6b30bcaSPeter Maydell Cancel the current VM migration. 939a6b30bcaSPeter MaydellERST 9409e1ba4ccSOrit Wasserman 94194ae12cbSDr. David Alan Gilbert { 94294ae12cbSDr. David Alan Gilbert .name = "migrate_continue", 94394ae12cbSDr. David Alan Gilbert .args_type = "state:s", 94494ae12cbSDr. David Alan Gilbert .params = "state", 94594ae12cbSDr. David Alan Gilbert .help = "Continue migration from the given paused state", 94694ae12cbSDr. David Alan Gilbert .cmd = hmp_migrate_continue, 94794ae12cbSDr. David Alan Gilbert }, 948a6b30bcaSPeter MaydellSRST 949a6b30bcaSPeter Maydell``migrate_continue`` *state* 950a6b30bcaSPeter Maydell Continue migration from the paused state *state* 951a6b30bcaSPeter MaydellERST 9529e1ba4ccSOrit Wasserman 9539e1ba4ccSOrit Wasserman { 954bf1ae1f4SDr. David Alan Gilbert .name = "migrate_incoming", 955bf1ae1f4SDr. David Alan Gilbert .args_type = "uri:s", 956bf1ae1f4SDr. David Alan Gilbert .params = "uri", 957bf1ae1f4SDr. David Alan Gilbert .help = "Continue an incoming migration from an -incoming defer", 9582b9e3576SMarc-André Lureau .cmd = hmp_migrate_incoming, 959bf1ae1f4SDr. David Alan Gilbert }, 960bf1ae1f4SDr. David Alan Gilbert 961a6b30bcaSPeter MaydellSRST 962a6b30bcaSPeter Maydell``migrate_incoming`` *uri* 963a6b30bcaSPeter Maydell Continue an incoming migration using the *uri* (that has the same syntax 964a6b30bcaSPeter Maydell as the ``-incoming`` option). 965a6b30bcaSPeter MaydellERST 966bf1ae1f4SDr. David Alan Gilbert 9673b563c4bSPeter Xu { 9683b563c4bSPeter Xu .name = "migrate_recover", 9693b563c4bSPeter Xu .args_type = "uri:s", 9703b563c4bSPeter Xu .params = "uri", 9713b563c4bSPeter Xu .help = "Continue a paused incoming postcopy migration", 9723b563c4bSPeter Xu .cmd = hmp_migrate_recover, 9733b563c4bSPeter Xu }, 9743b563c4bSPeter Xu 975a6b30bcaSPeter MaydellSRST 976a6b30bcaSPeter Maydell``migrate_recover`` *uri* 977a6b30bcaSPeter Maydell Continue a paused incoming postcopy migration using the *uri*. 978a6b30bcaSPeter MaydellERST 979bf1ae1f4SDr. David Alan Gilbert 980bf1ae1f4SDr. David Alan Gilbert { 981d37297dcSPeter Xu .name = "migrate_pause", 982d37297dcSPeter Xu .args_type = "", 983d37297dcSPeter Xu .params = "", 984d37297dcSPeter Xu .help = "Pause an ongoing migration (postcopy-only)", 985d37297dcSPeter Xu .cmd = hmp_migrate_pause, 986d37297dcSPeter Xu }, 987d37297dcSPeter Xu 988a6b30bcaSPeter MaydellSRST 989a6b30bcaSPeter Maydell``migrate_pause`` 990a6b30bcaSPeter Maydell Pause an ongoing migration. Currently it only supports postcopy. 991a6b30bcaSPeter MaydellERST 992d37297dcSPeter Xu 993d37297dcSPeter Xu { 99400458433SOrit Wasserman .name = "migrate_set_capability", 99500458433SOrit Wasserman .args_type = "capability:s,state:b", 99600458433SOrit Wasserman .params = "capability state", 99700458433SOrit Wasserman .help = "Enable/Disable the usage of a capability for migration", 9982b9e3576SMarc-André Lureau .cmd = hmp_migrate_set_capability, 999c68a0409SHani Benhabiles .command_completion = migrate_set_capability_completion, 100000458433SOrit Wasserman }, 100100458433SOrit Wasserman 1002a6b30bcaSPeter MaydellSRST 1003a6b30bcaSPeter Maydell``migrate_set_capability`` *capability* *state* 1004a6b30bcaSPeter Maydell Enable/Disable the usage of a capability *capability* for migration. 1005a6b30bcaSPeter MaydellERST 100600458433SOrit Wasserman 100700458433SOrit Wasserman { 100850e9a629SLiang Li .name = "migrate_set_parameter", 100969ef1f36SDaniel P. Berrange .args_type = "parameter:s,value:s", 101050e9a629SLiang Li .params = "parameter value", 101150e9a629SLiang Li .help = "Set the parameter for migration", 10122b9e3576SMarc-André Lureau .cmd = hmp_migrate_set_parameter, 101350e9a629SLiang Li .command_completion = migrate_set_parameter_completion, 101450e9a629SLiang Li }, 101550e9a629SLiang Li 1016a6b30bcaSPeter MaydellSRST 1017a6b30bcaSPeter Maydell``migrate_set_parameter`` *parameter* *value* 1018a6b30bcaSPeter Maydell Set the parameter *parameter* for migration. 1019a6b30bcaSPeter MaydellERST 102050e9a629SLiang Li 102150e9a629SLiang Li { 10224886a1bcSDr. David Alan Gilbert .name = "migrate_start_postcopy", 10234886a1bcSDr. David Alan Gilbert .args_type = "", 10244886a1bcSDr. David Alan Gilbert .params = "", 1025a54d340bSDr. David Alan Gilbert .help = "Followup to a migration command to switch the migration" 102632c3db5bSDr. David Alan Gilbert " to postcopy mode. The postcopy-ram capability must " 1027c2eb7f21SGreg Kurz "be set on both source and destination before the " 1028c2eb7f21SGreg Kurz "original migration command .", 10292b9e3576SMarc-André Lureau .cmd = hmp_migrate_start_postcopy, 10304886a1bcSDr. David Alan Gilbert }, 10314886a1bcSDr. David Alan Gilbert 1032a6b30bcaSPeter MaydellSRST 1033a6b30bcaSPeter Maydell``migrate_start_postcopy`` 1034a6b30bcaSPeter Maydell Switch in-progress migration to postcopy mode. Ignored after the end of 1035a6b30bcaSPeter Maydell migration (or once already in postcopy). 1036a6b30bcaSPeter MaydellERST 10374886a1bcSDr. David Alan Gilbert 10384886a1bcSDr. David Alan Gilbert { 1039d89e666eSzhanghailiang .name = "x_colo_lost_heartbeat", 1040d89e666eSzhanghailiang .args_type = "", 1041d89e666eSzhanghailiang .params = "", 1042d89e666eSzhanghailiang .help = "Tell COLO that heartbeat is lost,\n\t\t\t" 1043d89e666eSzhanghailiang "a failover or takeover is needed.", 1044d89e666eSzhanghailiang .cmd = hmp_x_colo_lost_heartbeat, 1045d89e666eSzhanghailiang }, 1046d89e666eSzhanghailiang 1047a6b30bcaSPeter MaydellSRST 1048a6b30bcaSPeter Maydell``x_colo_lost_heartbeat`` 1049a6b30bcaSPeter Maydell Tell COLO that heartbeat is lost, a failover or takeover is needed. 1050a6b30bcaSPeter MaydellERST 1051d89e666eSzhanghailiang 1052d89e666eSzhanghailiang { 10532ea720dbSJes Sorensen .name = "client_migrate_info", 10542ea720dbSJes Sorensen .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?", 10552ea720dbSJes Sorensen .params = "protocol hostname port tls-port cert-subject", 105613cadefbSMarkus Armbruster .help = "set migration information for remote display", 10572b9e3576SMarc-André Lureau .cmd = hmp_client_migrate_info, 1058f8882568SJes Sorensen }, 1059f8882568SJes Sorensen 1060a6b30bcaSPeter MaydellSRST 1061a6b30bcaSPeter Maydell``client_migrate_info`` *protocol* *hostname* *port* *tls-port* *cert-subject* 1062a6b30bcaSPeter Maydell Set migration information for remote display. This makes the server 1063a6b30bcaSPeter Maydell ask the client to automatically reconnect using the new parameters 1064a6b30bcaSPeter Maydell once migration finished successfully. Only implemented for SPICE. 1065a6b30bcaSPeter MaydellERST 1066e866e239SGerd Hoffmann 1067783e9b48SWen Congyang { 1068783e9b48SWen Congyang .name = "dump-guest-memory", 10692da91b54SViktor Prutyanov .args_type = "paging:-p,detach:-d,windmp:-w,zlib:-z,lzo:-l,snappy:-s,filename:F,begin:l?,length:l?", 10702da91b54SViktor Prutyanov .params = "[-p] [-d] [-z|-l|-s|-w] filename [begin length]", 1071c20499d9SQiao Nuohan .help = "dump guest memory into file 'filename'.\n\t\t\t" 1072c20499d9SQiao Nuohan "-p: do paging to get guest's memory mapping.\n\t\t\t" 1073228de9cfSPeter Xu "-d: return immediately (do not wait for completion).\n\t\t\t" 10741b7a0f75SQiao Nuohan "-z: dump in kdump-compressed format, with zlib compression.\n\t\t\t" 10751b7a0f75SQiao Nuohan "-l: dump in kdump-compressed format, with lzo compression.\n\t\t\t" 10761b7a0f75SQiao Nuohan "-s: dump in kdump-compressed format, with snappy compression.\n\t\t\t" 10772da91b54SViktor Prutyanov "-w: dump in Windows crashdump format (can be used instead of ELF-dump converting),\n\t\t\t" 1078f5daa829SViktor Prutyanov " for Windows x86 and x64 guests with vmcoreinfo driver only.\n\t\t\t" 1079c20499d9SQiao Nuohan "begin: the starting physical address.\n\t\t\t" 1080c20499d9SQiao Nuohan "length: the memory size, in bytes.", 10812b9e3576SMarc-André Lureau .cmd = hmp_dump_guest_memory, 1082783e9b48SWen Congyang }, 1083783e9b48SWen Congyang 1084a6b30bcaSPeter MaydellSRST 1085a6b30bcaSPeter Maydell``dump-guest-memory [-p]`` *filename* *begin* *length* 1086a6b30bcaSPeter Maydell \ 1087a6b30bcaSPeter Maydell``dump-guest-memory [-z|-l|-s|-w]`` *filename* 1088a6b30bcaSPeter Maydell Dump guest memory to *protocol*. The file can be processed with crash or 1089a6b30bcaSPeter Maydell gdb. Without ``-z|-l|-s|-w``, the dump format is ELF. 1090a6b30bcaSPeter Maydell 1091a6b30bcaSPeter Maydell ``-p`` 1092a6b30bcaSPeter Maydell do paging to get guest's memory mapping. 1093a6b30bcaSPeter Maydell ``-z`` 1094a6b30bcaSPeter Maydell dump in kdump-compressed format, with zlib compression. 1095a6b30bcaSPeter Maydell ``-l`` 1096a6b30bcaSPeter Maydell dump in kdump-compressed format, with lzo compression. 1097a6b30bcaSPeter Maydell ``-s`` 1098a6b30bcaSPeter Maydell dump in kdump-compressed format, with snappy compression. 1099a6b30bcaSPeter Maydell ``-w`` 1100a6b30bcaSPeter Maydell dump in Windows crashdump format (can be used instead of ELF-dump converting), 1101a6b30bcaSPeter Maydell for Windows x64 guests with vmcoreinfo driver only 1102a6b30bcaSPeter Maydell *filename* 1103a6b30bcaSPeter Maydell dump file name. 1104a6b30bcaSPeter Maydell *begin* 1105a6b30bcaSPeter Maydell the starting physical address. It's optional, and should be 1106a6b30bcaSPeter Maydell specified together with *length*. 1107a6b30bcaSPeter Maydell *length* 1108a6b30bcaSPeter Maydell the memory size, in bytes. It's optional, and should be specified 1109a6b30bcaSPeter Maydell together with *begin*. 1110a6b30bcaSPeter Maydell 1111a6b30bcaSPeter MaydellERST 1112783e9b48SWen Congyang 1113a4538a5cSJason J. Herne#if defined(TARGET_S390X) 1114a4538a5cSJason J. Herne { 1115a4538a5cSJason J. Herne .name = "dump-skeys", 1116a4538a5cSJason J. Herne .args_type = "filename:F", 1117a4538a5cSJason J. Herne .params = "", 1118a4538a5cSJason J. Herne .help = "Save guest storage keys into file 'filename'.\n", 11192b9e3576SMarc-André Lureau .cmd = hmp_dump_skeys, 1120a4538a5cSJason J. Herne }, 1121a4538a5cSJason J. Herne#endif 1122a4538a5cSJason J. Herne 1123a6b30bcaSPeter MaydellSRST 1124a6b30bcaSPeter Maydell``dump-skeys`` *filename* 1125a6b30bcaSPeter Maydell Save guest storage keys to a file. 1126a6b30bcaSPeter MaydellERST 1127a4538a5cSJason J. Herne 1128f860d497SClaudio Imbrenda#if defined(TARGET_S390X) 1129f860d497SClaudio Imbrenda { 1130f860d497SClaudio Imbrenda .name = "migration_mode", 1131f860d497SClaudio Imbrenda .args_type = "mode:i", 1132f860d497SClaudio Imbrenda .params = "mode", 1133f860d497SClaudio Imbrenda .help = "Enables or disables migration mode\n", 1134f860d497SClaudio Imbrenda .cmd = hmp_migrationmode, 1135f860d497SClaudio Imbrenda }, 1136f860d497SClaudio Imbrenda#endif 1137f860d497SClaudio Imbrenda 1138a6b30bcaSPeter MaydellSRST 1139a6b30bcaSPeter Maydell``migration_mode`` *mode* 1140a6b30bcaSPeter Maydell Enables or disables migration mode. 1141a6b30bcaSPeter MaydellERST 1142f860d497SClaudio Imbrenda 1143e866e239SGerd Hoffmann { 11442ea720dbSJes Sorensen .name = "snapshot_blkdev", 11456cc2a415SPaolo Bonzini .args_type = "reuse:-n,device:B,snapshot-file:s?,format:s?", 11466cc2a415SPaolo Bonzini .params = "[-n] device [new-image-file] [format]", 11472ea720dbSJes Sorensen .help = "initiates a live snapshot\n\t\t\t" 11482ea720dbSJes Sorensen "of device. If a new image file is specified, the\n\t\t\t" 11492ea720dbSJes Sorensen "new image file will become the new root image.\n\t\t\t" 11502ea720dbSJes Sorensen "If format is specified, the snapshot file will\n\t\t\t" 1151775ca88eSWenchao Xia "be created in that format.\n\t\t\t" 11526cc2a415SPaolo Bonzini "The default format is qcow2. The -n flag requests QEMU\n\t\t\t" 11536cc2a415SPaolo Bonzini "to reuse the image found in new-image-file, instead of\n\t\t\t" 11546cc2a415SPaolo Bonzini "recreating it from scratch.", 11552b9e3576SMarc-André Lureau .cmd = hmp_snapshot_blkdev, 1156e866e239SGerd Hoffmann }, 1157e866e239SGerd Hoffmann 1158a6b30bcaSPeter MaydellSRST 1159a6b30bcaSPeter Maydell``snapshot_blkdev`` 1160a6b30bcaSPeter Maydell Snapshot device, using snapshot file as target if provided 1161a6b30bcaSPeter MaydellERST 1162f8882568SJes Sorensen 1163d7f9b689SLuiz Capitulino { 1164775ca88eSWenchao Xia .name = "snapshot_blkdev_internal", 1165775ca88eSWenchao Xia .args_type = "device:B,name:s", 1166775ca88eSWenchao Xia .params = "device name", 1167775ca88eSWenchao Xia .help = "take an internal snapshot of device.\n\t\t\t" 1168775ca88eSWenchao Xia "The format of the image used by device must\n\t\t\t" 1169775ca88eSWenchao Xia "support it, such as qcow2.\n\t\t\t", 11702b9e3576SMarc-André Lureau .cmd = hmp_snapshot_blkdev_internal, 1171775ca88eSWenchao Xia }, 1172775ca88eSWenchao Xia 1173a6b30bcaSPeter MaydellSRST 1174a6b30bcaSPeter Maydell``snapshot_blkdev_internal`` 1175a6b30bcaSPeter Maydell Take an internal snapshot on device if it support 1176a6b30bcaSPeter MaydellERST 1177775ca88eSWenchao Xia 1178775ca88eSWenchao Xia { 11797a4ed2eeSWenchao Xia .name = "snapshot_delete_blkdev_internal", 11807a4ed2eeSWenchao Xia .args_type = "device:B,name:s,id:s?", 11817a4ed2eeSWenchao Xia .params = "device name [id]", 11827a4ed2eeSWenchao Xia .help = "delete an internal snapshot of device.\n\t\t\t" 11837a4ed2eeSWenchao Xia "If id is specified, qemu will try delete\n\t\t\t" 11847a4ed2eeSWenchao Xia "the snapshot matching both id and name.\n\t\t\t" 11857a4ed2eeSWenchao Xia "The format of the image used by device must\n\t\t\t" 11867a4ed2eeSWenchao Xia "support it, such as qcow2.\n\t\t\t", 11872b9e3576SMarc-André Lureau .cmd = hmp_snapshot_delete_blkdev_internal, 11887a4ed2eeSWenchao Xia }, 11897a4ed2eeSWenchao Xia 1190a6b30bcaSPeter MaydellSRST 1191a6b30bcaSPeter Maydell``snapshot_delete_blkdev_internal`` 1192a6b30bcaSPeter Maydell Delete an internal snapshot on device if it support 1193a6b30bcaSPeter MaydellERST 11947a4ed2eeSWenchao Xia 11957a4ed2eeSWenchao Xia { 1196d9b902dbSPaolo Bonzini .name = "drive_mirror", 1197d9b902dbSPaolo Bonzini .args_type = "reuse:-n,full:-f,device:B,target:s,format:s?", 1198d9b902dbSPaolo Bonzini .params = "[-n] [-f] device target [format]", 1199d9b902dbSPaolo Bonzini .help = "initiates live storage\n\t\t\t" 1200d9b902dbSPaolo Bonzini "migration for a device. The device's contents are\n\t\t\t" 1201d9b902dbSPaolo Bonzini "copied to the new image file, including data that\n\t\t\t" 1202d9b902dbSPaolo Bonzini "is written after the command is started.\n\t\t\t" 1203d9b902dbSPaolo Bonzini "The -n flag requests QEMU to reuse the image found\n\t\t\t" 1204d9b902dbSPaolo Bonzini "in new-image-file, instead of recreating it from scratch.\n\t\t\t" 1205d9b902dbSPaolo Bonzini "The -f flag requests QEMU to copy the whole disk,\n\t\t\t" 1206d9b902dbSPaolo Bonzini "so that the result does not need a backing file.\n\t\t\t", 12072b9e3576SMarc-André Lureau .cmd = hmp_drive_mirror, 1208d9b902dbSPaolo Bonzini }, 1209a6b30bcaSPeter MaydellSRST 1210a6b30bcaSPeter Maydell``drive_mirror`` 1211a6b30bcaSPeter Maydell Start mirroring a block device's writes to a new destination, 1212a6b30bcaSPeter Maydell using the specified target. 1213a6b30bcaSPeter MaydellERST 1214d9b902dbSPaolo Bonzini 1215d9b902dbSPaolo Bonzini { 1216de90930aSStefan Hajnoczi .name = "drive_backup", 121713b9414bSPavel Butsykin .args_type = "reuse:-n,full:-f,compress:-c,device:B,target:s,format:s?", 121813b9414bSPavel Butsykin .params = "[-n] [-f] [-c] device target [format]", 1219de90930aSStefan Hajnoczi .help = "initiates a point-in-time\n\t\t\t" 1220de90930aSStefan Hajnoczi "copy for a device. The device's contents are\n\t\t\t" 1221de90930aSStefan Hajnoczi "copied to the new image file, excluding data that\n\t\t\t" 1222de90930aSStefan Hajnoczi "is written after the command is started.\n\t\t\t" 1223de90930aSStefan Hajnoczi "The -n flag requests QEMU to reuse the image found\n\t\t\t" 1224de90930aSStefan Hajnoczi "in new-image-file, instead of recreating it from scratch.\n\t\t\t" 1225de90930aSStefan Hajnoczi "The -f flag requests QEMU to copy the whole disk,\n\t\t\t" 122613b9414bSPavel Butsykin "so that the result does not need a backing file.\n\t\t\t" 122713b9414bSPavel Butsykin "The -c flag requests QEMU to compress backup data\n\t\t\t" 122813b9414bSPavel Butsykin "(if the target format supports it).\n\t\t\t", 12292b9e3576SMarc-André Lureau .cmd = hmp_drive_backup, 1230de90930aSStefan Hajnoczi }, 1231a6b30bcaSPeter MaydellSRST 1232a6b30bcaSPeter Maydell``drive_backup`` 1233e3a6e0daSzhaolichang Start a point-in-time copy of a block device to a specified target. 1234a6b30bcaSPeter MaydellERST 1235de90930aSStefan Hajnoczi 1236de90930aSStefan Hajnoczi { 1237d7f9b689SLuiz Capitulino .name = "drive_add", 1238abb21ac3SKevin Wolf .args_type = "node:-n,pci_addr:s,opts:s", 1239abb21ac3SKevin Wolf .params = "[-n] [[<domain>:]<bus>:]<slot>\n" 12402313086aSBlue Swirl "[file=file][,if=type][,bus=n]\n" 1241fb0490f6SStefan Hajnoczi "[,unit=m][,media=d][,index=i]\n" 1242fb0490f6SStefan Hajnoczi "[,snapshot=on|off][,cache=on|off]\n" 1243fb0490f6SStefan Hajnoczi "[,readonly=on|off][,copy-on-read=on|off]", 1244d7f9b689SLuiz Capitulino .help = "add drive to PCI storage controller", 12452b9e3576SMarc-André Lureau .cmd = hmp_drive_add, 1246d7f9b689SLuiz Capitulino }, 1247d7f9b689SLuiz Capitulino 1248a6b30bcaSPeter MaydellSRST 1249a6b30bcaSPeter Maydell``drive_add`` 1250a6b30bcaSPeter Maydell Add drive to PCI storage controller. 1251a6b30bcaSPeter MaydellERST 12522313086aSBlue Swirl 1253d7f9b689SLuiz Capitulino { 12542ae63bdaSIsaku Yamahata .name = "pcie_aer_inject_error", 12552ae63bdaSIsaku Yamahata .args_type = "advisory_non_fatal:-a,correctable:-c," 12562ae63bdaSIsaku Yamahata "id:s,error_status:s," 12572ae63bdaSIsaku Yamahata "header0:i?,header1:i?,header2:i?,header3:i?," 12582ae63bdaSIsaku Yamahata "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?", 12592ae63bdaSIsaku Yamahata .params = "[-a] [-c] id " 12602ae63bdaSIsaku Yamahata "<error_status> [<tlp header> [<tlp header prefix>]]", 12612ae63bdaSIsaku Yamahata .help = "inject pcie aer error\n\t\t\t" 12622ae63bdaSIsaku Yamahata " -a for advisory non fatal error\n\t\t\t" 12632ae63bdaSIsaku Yamahata " -c for correctable error\n\t\t\t" 12642ae63bdaSIsaku Yamahata "<id> = qdev device id\n\t\t\t" 12652ae63bdaSIsaku Yamahata "<error_status> = error string or 32bit\n\t\t\t" 12668ad4e451SZenghui Yu "<tlp header> = 32bit x 4\n\t\t\t" 12678ad4e451SZenghui Yu "<tlp header prefix> = 32bit x 4", 12682b9e3576SMarc-André Lureau .cmd = hmp_pcie_aer_inject_error, 12692ae63bdaSIsaku Yamahata }, 12702ae63bdaSIsaku Yamahata 1271a6b30bcaSPeter MaydellSRST 1272a6b30bcaSPeter Maydell``pcie_aer_inject_error`` 1273a6b30bcaSPeter Maydell Inject PCIe AER error 1274a6b30bcaSPeter MaydellERST 12752ae63bdaSIsaku Yamahata 12762ae63bdaSIsaku Yamahata { 1277ae82d324SMarkus Armbruster .name = "netdev_add", 1278ae82d324SMarkus Armbruster .args_type = "netdev:O", 12795166fe0aSLaurent Vivier .params = "[user|tap|socket|stream|dgram|vde|bridge|hubport|netmap|vhost-user" 1280fd8c8c05SVladislav Yaroshchuk#ifdef CONFIG_VMNET 1281fd8c8c05SVladislav Yaroshchuk "|vmnet-host|vmnet-shared|vmnet-bridged" 1282fd8c8c05SVladislav Yaroshchuk#endif 1283fd8c8c05SVladislav Yaroshchuk "],id=str[,prop=value][,...]", 1284ae82d324SMarkus Armbruster .help = "add host network device", 12852b9e3576SMarc-André Lureau .cmd = hmp_netdev_add, 1286b162b49aSHani Benhabiles .command_completion = netdev_add_completion, 128748f596c5SPaolo Bonzini .flags = "p", 1288ae82d324SMarkus Armbruster }, 1289ae82d324SMarkus Armbruster 1290a6b30bcaSPeter MaydellSRST 1291a6b30bcaSPeter Maydell``netdev_add`` 1292a6b30bcaSPeter Maydell Add host network device. 1293a6b30bcaSPeter MaydellERST 1294ae82d324SMarkus Armbruster 1295ae82d324SMarkus Armbruster { 1296ae82d324SMarkus Armbruster .name = "netdev_del", 1297ae82d324SMarkus Armbruster .args_type = "id:s", 1298ae82d324SMarkus Armbruster .params = "id", 1299ae82d324SMarkus Armbruster .help = "remove host network device", 13002b9e3576SMarc-André Lureau .cmd = hmp_netdev_del, 130111b389f2SHani Benhabiles .command_completion = netdev_del_completion, 130248f596c5SPaolo Bonzini .flags = "p", 1303ae82d324SMarkus Armbruster }, 1304ae82d324SMarkus Armbruster 1305a6b30bcaSPeter MaydellSRST 1306a6b30bcaSPeter Maydell``netdev_del`` 1307a6b30bcaSPeter Maydell Remove host network device. 1308a6b30bcaSPeter MaydellERST 1309ae82d324SMarkus Armbruster 1310ab2d0531SPaolo Bonzini { 1311cff8b2c6SPaolo Bonzini .name = "object_add", 1312da0a932bSKevin Wolf .args_type = "object:S", 1313cff8b2c6SPaolo Bonzini .params = "[qom-type=]type,id=str[,prop=value][,...]", 1314cff8b2c6SPaolo Bonzini .help = "create QOM object", 13152b9e3576SMarc-André Lureau .cmd = hmp_object_add, 1316bfa40f77SHani Benhabiles .command_completion = object_add_completion, 13179e33013bSPaolo Bonzini .flags = "p", 1318cff8b2c6SPaolo Bonzini }, 1319cff8b2c6SPaolo Bonzini 1320a6b30bcaSPeter MaydellSRST 1321a6b30bcaSPeter Maydell``object_add`` 1322a6b30bcaSPeter Maydell Create QOM object. 1323a6b30bcaSPeter MaydellERST 1324cff8b2c6SPaolo Bonzini 1325cff8b2c6SPaolo Bonzini { 1326ab2d0531SPaolo Bonzini .name = "object_del", 1327ab2d0531SPaolo Bonzini .args_type = "id:s", 1328ab2d0531SPaolo Bonzini .params = "id", 1329ab2d0531SPaolo Bonzini .help = "destroy QOM object", 13302b9e3576SMarc-André Lureau .cmd = hmp_object_del, 1331bfa40f77SHani Benhabiles .command_completion = object_del_completion, 13329e33013bSPaolo Bonzini .flags = "p", 1333ab2d0531SPaolo Bonzini }, 1334ab2d0531SPaolo Bonzini 1335a6b30bcaSPeter MaydellSRST 1336a6b30bcaSPeter Maydell``object_del`` 1337a6b30bcaSPeter Maydell Destroy QOM object. 1338a6b30bcaSPeter MaydellERST 1339ab2d0531SPaolo Bonzini 13402313086aSBlue Swirl#ifdef CONFIG_SLIRP 1341d7f9b689SLuiz Capitulino { 1342d7f9b689SLuiz Capitulino .name = "hostfwd_add", 1343b4983c57SThomas Huth .args_type = "arg1:s,arg2:s?", 1344b4983c57SThomas Huth .params = "[netdev_id] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport", 1345d7f9b689SLuiz Capitulino .help = "redirect TCP or UDP connections from host to guest (requires -net user)", 13462b9e3576SMarc-André Lureau .cmd = hmp_hostfwd_add, 1347d7f9b689SLuiz Capitulino }, 134821413d68SMarkus Armbruster#endif 1349a6b30bcaSPeter MaydellSRST 1350a6b30bcaSPeter Maydell``hostfwd_add`` 1351a6b30bcaSPeter Maydell Redirect TCP or UDP connections from host to guest (requires -net user). 1352a6b30bcaSPeter MaydellERST 1353d7f9b689SLuiz Capitulino 135421413d68SMarkus Armbruster#ifdef CONFIG_SLIRP 1355d7f9b689SLuiz Capitulino { 1356d7f9b689SLuiz Capitulino .name = "hostfwd_remove", 1357b4983c57SThomas Huth .args_type = "arg1:s,arg2:s?", 1358b4983c57SThomas Huth .params = "[netdev_id] [tcp|udp]:[hostaddr]:hostport", 1359d7f9b689SLuiz Capitulino .help = "remove host-to-guest TCP or UDP redirection", 13602b9e3576SMarc-André Lureau .cmd = hmp_hostfwd_remove, 1361d7f9b689SLuiz Capitulino }, 1362d7f9b689SLuiz Capitulino 13632313086aSBlue Swirl#endif 1364a6b30bcaSPeter MaydellSRST 1365a6b30bcaSPeter Maydell``hostfwd_remove`` 1366a6b30bcaSPeter Maydell Remove host-to-guest TCP or UDP redirection. 1367a6b30bcaSPeter MaydellERST 13682313086aSBlue Swirl 1369d7f9b689SLuiz Capitulino { 1370d7f9b689SLuiz Capitulino .name = "balloon", 13713b0bd6ecSLuiz Capitulino .args_type = "value:M", 1372d7f9b689SLuiz Capitulino .params = "target", 13733c05613aSRiccardo Magliocchetti .help = "request VM to change its memory allocation (in MB)", 13742b9e3576SMarc-André Lureau .cmd = hmp_balloon, 1375d7f9b689SLuiz Capitulino }, 1376d7f9b689SLuiz Capitulino 1377a6b30bcaSPeter MaydellSRST 1378a6b30bcaSPeter Maydell``balloon`` *value* 1379a6b30bcaSPeter Maydell Request VM to change its memory allocation to *value* (in MB). 1380a6b30bcaSPeter MaydellERST 13812313086aSBlue Swirl 1382d7f9b689SLuiz Capitulino { 1383d7f9b689SLuiz Capitulino .name = "set_link", 1384c9b26a4cSMarkus Armbruster .args_type = "name:s,up:b", 1385c9b26a4cSMarkus Armbruster .params = "name on|off", 1386d7f9b689SLuiz Capitulino .help = "change the link status of a network adapter", 13872b9e3576SMarc-André Lureau .cmd = hmp_set_link, 138840d19394SHani Benhabiles .command_completion = set_link_completion, 1389d7f9b689SLuiz Capitulino }, 1390d7f9b689SLuiz Capitulino 1391a6b30bcaSPeter MaydellSRST 1392a6b30bcaSPeter Maydell``set_link`` *name* ``[on|off]`` 1393a6b30bcaSPeter Maydell Switch link *name* on (i.e. up) or off (i.e. down). 1394a6b30bcaSPeter MaydellERST 13952313086aSBlue Swirl 1396d7f9b689SLuiz Capitulino { 1397d7f9b689SLuiz Capitulino .name = "watchdog_action", 1398d7f9b689SLuiz Capitulino .args_type = "action:s", 1399d7f9b689SLuiz Capitulino .params = "[reset|shutdown|poweroff|pause|debug|none]", 1400d7f9b689SLuiz Capitulino .help = "change watchdog action", 14012b9e3576SMarc-André Lureau .cmd = hmp_watchdog_action, 1402d0ece345SHani Benhabiles .command_completion = watchdog_action_completion, 1403d7f9b689SLuiz Capitulino }, 1404d7f9b689SLuiz Capitulino 1405a6b30bcaSPeter MaydellSRST 1406a6b30bcaSPeter Maydell``watchdog_action`` 1407a6b30bcaSPeter Maydell Change watchdog action. 1408a6b30bcaSPeter MaydellERST 14092313086aSBlue Swirl 1410d7f9b689SLuiz Capitulino { 14114057725fSPaolo Bonzini .name = "nbd_server_start", 14124057725fSPaolo Bonzini .args_type = "all:-a,writable:-w,uri:s", 14134057725fSPaolo Bonzini .params = "nbd_server_start [-a] [-w] host:port", 14144057725fSPaolo Bonzini .help = "serve block devices on the given host and port", 14152b9e3576SMarc-André Lureau .cmd = hmp_nbd_server_start, 1416f55ba801SPaolo Bonzini .flags = "p", 14174057725fSPaolo Bonzini }, 1418a6b30bcaSPeter MaydellSRST 1419a6b30bcaSPeter Maydell``nbd_server_start`` *host*:*port* 1420a6b30bcaSPeter Maydell Start an NBD server on the given host and/or port. If the ``-a`` 1421a6b30bcaSPeter Maydell option is included, all of the virtual machine's block devices that 1422a6b30bcaSPeter Maydell have an inserted media on them are automatically exported; in this case, 1423a6b30bcaSPeter Maydell the ``-w`` option makes the devices writable too. 1424a6b30bcaSPeter MaydellERST 14254057725fSPaolo Bonzini 14264057725fSPaolo Bonzini { 14274057725fSPaolo Bonzini .name = "nbd_server_add", 1428dba49323SEric Blake .args_type = "writable:-w,device:B,name:s?", 1429dba49323SEric Blake .params = "nbd_server_add [-w] device [name]", 14304057725fSPaolo Bonzini .help = "export a block device via NBD", 14312b9e3576SMarc-André Lureau .cmd = hmp_nbd_server_add, 1432f55ba801SPaolo Bonzini .flags = "p", 14334057725fSPaolo Bonzini }, 1434a6b30bcaSPeter MaydellSRST 1435a6b30bcaSPeter Maydell``nbd_server_add`` *device* [ *name* ] 1436a6b30bcaSPeter Maydell Export a block device through QEMU's NBD server, which must be started 1437a6b30bcaSPeter Maydell beforehand with ``nbd_server_start``. The ``-w`` option makes the 1438a6b30bcaSPeter Maydell exported device writable too. The export name is controlled by *name*, 1439a6b30bcaSPeter Maydell defaulting to *device*. 1440a6b30bcaSPeter MaydellERST 14414057725fSPaolo Bonzini 14424057725fSPaolo Bonzini { 144308fb10a7SEric Blake .name = "nbd_server_remove", 144408fb10a7SEric Blake .args_type = "force:-f,name:s", 144508fb10a7SEric Blake .params = "nbd_server_remove [-f] name", 144608fb10a7SEric Blake .help = "remove an export previously exposed via NBD", 144708fb10a7SEric Blake .cmd = hmp_nbd_server_remove, 1448f55ba801SPaolo Bonzini .flags = "p", 144908fb10a7SEric Blake }, 1450a6b30bcaSPeter MaydellSRST 1451a6b30bcaSPeter Maydell``nbd_server_remove [-f]`` *name* 1452a6b30bcaSPeter Maydell Stop exporting a block device through QEMU's NBD server, which was 1453a6b30bcaSPeter Maydell previously started with ``nbd_server_add``. The ``-f`` 1454a6b30bcaSPeter Maydell option forces the server to drop the export immediately even if 1455a6b30bcaSPeter Maydell clients are connected; otherwise the command fails unless there are no 1456a6b30bcaSPeter Maydell clients. 1457a6b30bcaSPeter MaydellERST 145808fb10a7SEric Blake 145908fb10a7SEric Blake { 14604057725fSPaolo Bonzini .name = "nbd_server_stop", 14614057725fSPaolo Bonzini .args_type = "", 14624057725fSPaolo Bonzini .params = "nbd_server_stop", 14634057725fSPaolo Bonzini .help = "stop serving block devices using the NBD protocol", 14642b9e3576SMarc-André Lureau .cmd = hmp_nbd_server_stop, 1465f55ba801SPaolo Bonzini .flags = "p", 14664057725fSPaolo Bonzini }, 1467a6b30bcaSPeter MaydellSRST 1468a6b30bcaSPeter Maydell``nbd_server_stop`` 1469a6b30bcaSPeter Maydell Stop the QEMU embedded NBD server. 1470a6b30bcaSPeter MaydellERST 14714057725fSPaolo Bonzini 14724057725fSPaolo Bonzini 147379c4f6b0SHuang Ying#if defined(TARGET_I386) 1474d7f9b689SLuiz Capitulino 1475d7f9b689SLuiz Capitulino { 1476d7f9b689SLuiz Capitulino .name = "mce", 147731ce5e0cSJin Dongming .args_type = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l", 147831ce5e0cSJin Dongming .params = "[-b] cpu bank status mcgstatus addr misc", 147931ce5e0cSJin Dongming .help = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]", 14802b9e3576SMarc-André Lureau .cmd = hmp_mce, 1481d7f9b689SLuiz Capitulino }, 1482d7f9b689SLuiz Capitulino 148379c4f6b0SHuang Ying#endif 1484a6b30bcaSPeter MaydellSRST 1485a6b30bcaSPeter Maydell``mce`` *cpu* *bank* *status* *mcgstatus* *addr* *misc* 1486a6b30bcaSPeter Maydell Inject an MCE on the given CPU (x86 only). 1487a6b30bcaSPeter MaydellERST 148879c4f6b0SHuang Ying 1489d7f9b689SLuiz Capitulino { 1490d7f9b689SLuiz Capitulino .name = "getfd", 1491d7f9b689SLuiz Capitulino .args_type = "fdname:s", 1492d7f9b689SLuiz Capitulino .params = "getfd name", 1493d7f9b689SLuiz Capitulino .help = "receive a file descriptor via SCM rights and assign it a name", 14942b9e3576SMarc-André Lureau .cmd = hmp_getfd, 1495f55ba801SPaolo Bonzini .flags = "p", 1496d7f9b689SLuiz Capitulino }, 1497d7f9b689SLuiz Capitulino 1498a6b30bcaSPeter MaydellSRST 1499a6b30bcaSPeter Maydell``getfd`` *fdname* 1500a6b30bcaSPeter Maydell If a file descriptor is passed alongside this command using the SCM_RIGHTS 1501a6b30bcaSPeter Maydell mechanism on unix sockets, it is stored using the name *fdname* for 1502a6b30bcaSPeter Maydell later use by other monitor commands. 1503a6b30bcaSPeter MaydellERST 1504f07918fdSMark McLoughlin 1505d7f9b689SLuiz Capitulino { 1506d7f9b689SLuiz Capitulino .name = "closefd", 1507d7f9b689SLuiz Capitulino .args_type = "fdname:s", 1508d7f9b689SLuiz Capitulino .params = "closefd name", 1509d7f9b689SLuiz Capitulino .help = "close a file descriptor previously passed via SCM rights", 15102b9e3576SMarc-André Lureau .cmd = hmp_closefd, 1511f55ba801SPaolo Bonzini .flags = "p", 1512d7f9b689SLuiz Capitulino }, 1513d7f9b689SLuiz Capitulino 1514a6b30bcaSPeter MaydellSRST 1515a6b30bcaSPeter Maydell``closefd`` *fdname* 1516a6b30bcaSPeter Maydell Close the file descriptor previously assigned to *fdname* using the 1517a6b30bcaSPeter Maydell ``getfd`` command. This is only needed if the file descriptor was never 1518a6b30bcaSPeter Maydell used by another monitor command. 1519a6b30bcaSPeter MaydellERST 1520f07918fdSMark McLoughlin 1521a3a55a2eSLuiz Capitulino { 1522727f005eSZhi Yong Wu .name = "block_set_io_throttle", 1523727f005eSZhi Yong Wu .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l", 1524727f005eSZhi Yong Wu .params = "device bps bps_rd bps_wr iops iops_rd iops_wr", 1525727f005eSZhi Yong Wu .help = "change I/O throttle limits for a block drive", 15262b9e3576SMarc-André Lureau .cmd = hmp_block_set_io_throttle, 1527f55ba801SPaolo Bonzini .flags = "p", 1528727f005eSZhi Yong Wu }, 1529727f005eSZhi Yong Wu 1530a6b30bcaSPeter MaydellSRST 1531a6b30bcaSPeter Maydell``block_set_io_throttle`` *device* *bps* *bps_rd* *bps_wr* *iops* *iops_rd* *iops_wr* 1532a6b30bcaSPeter Maydell Change I/O throttle limits for a block drive to 1533a6b30bcaSPeter Maydell *bps* *bps_rd* *bps_wr* *iops* *iops_rd* *iops_wr*. 1534a6b30bcaSPeter Maydell *device* can be a block device name, a qdev ID or a QOM path. 1535a6b30bcaSPeter MaydellERST 1536b40292e7SJan Kiszka 153733572eceSJan Kiszka { 15387572150cSGerd Hoffmann .name = "set_password", 1539675fd3c9SStefan Reiter .args_type = "protocol:s,password:s,display:-ds,connected:s?", 1540675fd3c9SStefan Reiter .params = "protocol password [-d display] [action-if-connected]", 15417572150cSGerd Hoffmann .help = "set spice/vnc password", 15422b9e3576SMarc-André Lureau .cmd = hmp_set_password, 15437572150cSGerd Hoffmann }, 15447572150cSGerd Hoffmann 1545a6b30bcaSPeter MaydellSRST 1546675fd3c9SStefan Reiter``set_password [ vnc | spice ] password [ -d display ] [ action-if-connected ]`` 1547675fd3c9SStefan Reiter Change spice/vnc password. *display* can be used with 'vnc' to specify 1548675fd3c9SStefan Reiter which display to set the password on. *action-if-connected* specifies 1549675fd3c9SStefan Reiter what should happen in case a connection is established: *fail* makes 1550675fd3c9SStefan Reiter the password change fail. *disconnect* changes the password and 15518982552eSMarkus Armbruster disconnects the client. *keep* changes the password and keeps the 15528982552eSMarkus Armbruster connection up. *keep* is the default. 1553a6b30bcaSPeter MaydellERST 15547572150cSGerd Hoffmann 15557572150cSGerd Hoffmann { 15567572150cSGerd Hoffmann .name = "expire_password", 1557675fd3c9SStefan Reiter .args_type = "protocol:s,time:s,display:-ds", 1558675fd3c9SStefan Reiter .params = "protocol time [-d display]", 15597572150cSGerd Hoffmann .help = "set spice/vnc password expire-time", 15602b9e3576SMarc-André Lureau .cmd = hmp_expire_password, 15617572150cSGerd Hoffmann }, 15627572150cSGerd Hoffmann 1563a6b30bcaSPeter MaydellSRST 1564675fd3c9SStefan Reiter``expire_password [ vnc | spice ] expire-time [ -d display ]`` 1565675fd3c9SStefan Reiter Specify when a password for spice/vnc becomes invalid. 1566675fd3c9SStefan Reiter *display* behaves the same as in ``set_password``. 1567675fd3c9SStefan Reiter *expire-time* accepts: 1568a6b30bcaSPeter Maydell 1569a6b30bcaSPeter Maydell ``now`` 1570a6b30bcaSPeter Maydell Invalidate password instantly. 1571a6b30bcaSPeter Maydell ``never`` 1572a6b30bcaSPeter Maydell Password stays valid forever. 1573a6b30bcaSPeter Maydell ``+``\ *nsec* 1574a6b30bcaSPeter Maydell Password stays valid for *nsec* seconds starting now. 1575a6b30bcaSPeter Maydell *nsec* 1576a6b30bcaSPeter Maydell Password is invalidated at the given time. *nsec* are the seconds 1577a6b30bcaSPeter Maydell passed since 1970, i.e. unix epoch. 1578a6b30bcaSPeter Maydell 1579a6b30bcaSPeter MaydellERST 15807572150cSGerd Hoffmann 158146920825SGerd Hoffmann { 158246920825SGerd Hoffmann .name = "chardev-add", 158346920825SGerd Hoffmann .args_type = "args:s", 158446920825SGerd Hoffmann .params = "args", 158546920825SGerd Hoffmann .help = "add chardev", 15862b9e3576SMarc-André Lureau .cmd = hmp_chardev_add, 158713e315daSHani Benhabiles .command_completion = chardev_add_completion, 158846920825SGerd Hoffmann }, 158946920825SGerd Hoffmann 1590a6b30bcaSPeter MaydellSRST 1591a6b30bcaSPeter Maydell``chardev-add`` *args* 1592a6b30bcaSPeter Maydell chardev-add accepts the same parameters as the -chardev command line switch. 1593a6b30bcaSPeter MaydellERST 159475b60160SAnton Nefedov 159575b60160SAnton Nefedov { 159675b60160SAnton Nefedov .name = "chardev-change", 159775b60160SAnton Nefedov .args_type = "id:s,args:s", 159875b60160SAnton Nefedov .params = "id args", 159975b60160SAnton Nefedov .help = "change chardev", 160075b60160SAnton Nefedov .cmd = hmp_chardev_change, 160175b60160SAnton Nefedov }, 160275b60160SAnton Nefedov 1603a6b30bcaSPeter MaydellSRST 1604a6b30bcaSPeter Maydell``chardev-change`` *args* 1605a6b30bcaSPeter Maydell chardev-change accepts existing chardev *id* and then the same arguments 1606a6b30bcaSPeter Maydell as the -chardev command line switch (except for "id"). 1607a6b30bcaSPeter MaydellERST 160846920825SGerd Hoffmann 160946920825SGerd Hoffmann { 161046920825SGerd Hoffmann .name = "chardev-remove", 161146920825SGerd Hoffmann .args_type = "id:s", 161246920825SGerd Hoffmann .params = "id", 161346920825SGerd Hoffmann .help = "remove chardev", 16142b9e3576SMarc-André Lureau .cmd = hmp_chardev_remove, 16156297d9a2SHani Benhabiles .command_completion = chardev_remove_completion, 161646920825SGerd Hoffmann }, 161746920825SGerd Hoffmann 1618a6b30bcaSPeter MaydellSRST 1619a6b30bcaSPeter Maydell``chardev-remove`` *id* 1620a6b30bcaSPeter Maydell Removes the chardev *id*. 1621a6b30bcaSPeter MaydellERST 1622f1088908SGerd Hoffmann 1623f1088908SGerd Hoffmann { 1624bd1d5ad9SStefan Fritsch .name = "chardev-send-break", 1625bd1d5ad9SStefan Fritsch .args_type = "id:s", 1626bd1d5ad9SStefan Fritsch .params = "id", 1627bd1d5ad9SStefan Fritsch .help = "send a break on chardev", 1628bd1d5ad9SStefan Fritsch .cmd = hmp_chardev_send_break, 1629bd1d5ad9SStefan Fritsch .command_completion = chardev_remove_completion, 1630bd1d5ad9SStefan Fritsch }, 1631bd1d5ad9SStefan Fritsch 1632a6b30bcaSPeter MaydellSRST 1633a6b30bcaSPeter Maydell``chardev-send-break`` *id* 1634a6b30bcaSPeter Maydell Send a break on the chardev *id*. 1635a6b30bcaSPeter MaydellERST 1636bd1d5ad9SStefan Fritsch 1637bd1d5ad9SStefan Fritsch { 1638587da2c3SKevin Wolf .name = "qemu-io", 163989b6fc45SKevin Wolf .args_type = "qdev:-d,device:B,command:s", 164089b6fc45SKevin Wolf .params = "[-d] [device] \"[command]\"", 164189b6fc45SKevin Wolf .help = "run a qemu-io command on a block device\n\t\t\t" 164289b6fc45SKevin Wolf "-d: [device] is a device ID rather than a " 164389b6fc45SKevin Wolf "drive ID or node name", 16442b9e3576SMarc-André Lureau .cmd = hmp_qemu_io, 1645587da2c3SKevin Wolf }, 1646587da2c3SKevin Wolf 1647a6b30bcaSPeter MaydellSRST 1648a6b30bcaSPeter Maydell``qemu-io`` *device* *command* 1649a6b30bcaSPeter Maydell Executes a qemu-io command on the given block device. 1650a6b30bcaSPeter MaydellERST 1651587da2c3SKevin Wolf 1652587da2c3SKevin Wolf { 165389d7fa9eSAndreas Färber .name = "qom-list", 165489d7fa9eSAndreas Färber .args_type = "path:s?", 165589d7fa9eSAndreas Färber .params = "path", 165689d7fa9eSAndreas Färber .help = "list QOM properties", 16572b9e3576SMarc-André Lureau .cmd = hmp_qom_list, 16588c7c7ecbSDr. David Alan Gilbert .flags = "p", 165989d7fa9eSAndreas Färber }, 166089d7fa9eSAndreas Färber 1661a6b30bcaSPeter MaydellSRST 1662a6b30bcaSPeter Maydell``qom-list`` [*path*] 1663a6b30bcaSPeter Maydell Print QOM properties of object at location *path* 1664a6b30bcaSPeter MaydellERST 166589d7fa9eSAndreas Färber 166689d7fa9eSAndreas Färber { 166789cf4fe3SDr. David Alan Gilbert .name = "qom-get", 166889cf4fe3SDr. David Alan Gilbert .args_type = "path:s,property:s", 166989cf4fe3SDr. David Alan Gilbert .params = "path property", 167089cf4fe3SDr. David Alan Gilbert .help = "print QOM property", 167189cf4fe3SDr. David Alan Gilbert .cmd = hmp_qom_get, 167289cf4fe3SDr. David Alan Gilbert .flags = "p", 167389cf4fe3SDr. David Alan Gilbert }, 167489cf4fe3SDr. David Alan Gilbert 167589cf4fe3SDr. David Alan GilbertSRST 167689cf4fe3SDr. David Alan Gilbert``qom-get`` *path* *property* 167789cf4fe3SDr. David Alan Gilbert Print QOM property *property* of object at location *path* 167889cf4fe3SDr. David Alan GilbertERST 167989cf4fe3SDr. David Alan Gilbert 168089cf4fe3SDr. David Alan Gilbert { 1681c0e6ee9eSAndreas Färber .name = "qom-set", 16822d9e3dd9SDavid Hildenbrand .args_type = "json:-j,path:s,property:s,value:S", 16832d9e3dd9SDavid Hildenbrand .params = "[-j] path property value", 16842d9e3dd9SDavid Hildenbrand .help = "set QOM property.\n\t\t\t" 16852d9e3dd9SDavid Hildenbrand "-j: the value is specified in json format.", 16862b9e3576SMarc-André Lureau .cmd = hmp_qom_set, 16878c7c7ecbSDr. David Alan Gilbert .flags = "p", 1688c0e6ee9eSAndreas Färber }, 1689c0e6ee9eSAndreas Färber 1690a6b30bcaSPeter MaydellSRST 1691a6b30bcaSPeter Maydell``qom-set`` *path* *property* *value* 1692a6b30bcaSPeter Maydell Set QOM property *property* of object at location *path* to value *value* 1693a6b30bcaSPeter MaydellERST 1694c0e6ee9eSAndreas Färber 1695c0e6ee9eSAndreas Färber { 1696e7510671SPavel Dovgalyuk .name = "replay_break", 1697ae49ce00SAlex Bennée .args_type = "icount:l", 1698e7510671SPavel Dovgalyuk .params = "icount", 1699e7510671SPavel Dovgalyuk .help = "set breakpoint at the specified instruction count", 1700e7510671SPavel Dovgalyuk .cmd = hmp_replay_break, 1701e7510671SPavel Dovgalyuk }, 1702e7510671SPavel Dovgalyuk 1703e7510671SPavel DovgalyukSRST 1704e7510671SPavel Dovgalyuk``replay_break`` *icount* 1705e7510671SPavel Dovgalyuk Set replay breakpoint at instruction count *icount*. 1706e7510671SPavel Dovgalyuk Execution stops when the specified instruction is reached. 1707e7510671SPavel Dovgalyuk There can be at most one breakpoint. When breakpoint is set, any prior 1708e7510671SPavel Dovgalyuk one is removed. The breakpoint may be set only in replay mode and only 1709e7510671SPavel Dovgalyuk "in the future", i.e. at instruction counts greater than the current one. 1710e7510671SPavel Dovgalyuk The current instruction count can be observed with ``info replay``. 1711e7510671SPavel DovgalyukERST 1712e7510671SPavel Dovgalyuk 1713e7510671SPavel Dovgalyuk { 1714e7510671SPavel Dovgalyuk .name = "replay_delete_break", 1715e7510671SPavel Dovgalyuk .args_type = "", 1716e7510671SPavel Dovgalyuk .params = "", 1717e7510671SPavel Dovgalyuk .help = "remove replay breakpoint", 1718e7510671SPavel Dovgalyuk .cmd = hmp_replay_delete_break, 1719e7510671SPavel Dovgalyuk }, 1720e7510671SPavel Dovgalyuk 1721e7510671SPavel DovgalyukSRST 1722e7510671SPavel Dovgalyuk``replay_delete_break`` 1723e7510671SPavel Dovgalyuk Remove replay breakpoint which was previously set with ``replay_break``. 1724e7510671SPavel Dovgalyuk The command is ignored when there are no replay breakpoints. 1725e7510671SPavel DovgalyukERST 1726e7510671SPavel Dovgalyuk 1727e7510671SPavel Dovgalyuk { 1728f6baed3dSPavel Dovgalyuk .name = "replay_seek", 1729ae49ce00SAlex Bennée .args_type = "icount:l", 1730f6baed3dSPavel Dovgalyuk .params = "icount", 1731f6baed3dSPavel Dovgalyuk .help = "replay execution to the specified instruction count", 1732f6baed3dSPavel Dovgalyuk .cmd = hmp_replay_seek, 1733f6baed3dSPavel Dovgalyuk }, 1734f6baed3dSPavel Dovgalyuk 1735f6baed3dSPavel DovgalyukSRST 1736f6baed3dSPavel Dovgalyuk``replay_seek`` *icount* 1737f6baed3dSPavel Dovgalyuk Automatically proceed to the instruction count *icount*, when 1738f6baed3dSPavel Dovgalyuk replaying the execution. The command automatically loads nearest 1739f6baed3dSPavel Dovgalyuk snapshot and replays the execution to find the desired instruction. 1740f6baed3dSPavel Dovgalyuk When there is no preceding snapshot or the execution is not replayed, 1741f6baed3dSPavel Dovgalyuk then the command fails. 1742f6baed3dSPavel Dovgalyuk *icount* for the reference may be observed with ``info replay`` command. 1743f6baed3dSPavel DovgalyukERST 1744f6baed3dSPavel Dovgalyuk 1745f6baed3dSPavel Dovgalyuk { 1746a4a571d9SPeter Xu .name = "calc_dirty_rate", 1747826b8bc8SHyman Huang(黄勇) .args_type = "dirty_ring:-r,dirty_bitmap:-b,second:l,sample_pages_per_GB:l?", 1748826b8bc8SHyman Huang(黄勇) .params = "[-r] [-b] second [sample_pages_per_GB]", 1749826b8bc8SHyman Huang(黄勇) .help = "start a round of guest dirty rate measurement (using -r to" 1750826b8bc8SHyman Huang(黄勇) "\n\t\t\t specify dirty ring as the method of calculation and" 1751826b8bc8SHyman Huang(黄勇) "\n\t\t\t -b to specify dirty bitmap as method of calculation)", 1752a4a571d9SPeter Xu .cmd = hmp_calc_dirty_rate, 1753a4a571d9SPeter Xu }, 1754f3b2e38cSHyman Huang(黄勇) 1755f3b2e38cSHyman Huang(黄勇)SRST 175622269b04SDr. David Alan Gilbert``calc_dirty_rate`` *second* 175722269b04SDr. David Alan Gilbert Start a round of dirty rate measurement with the period specified in *second*. 175822269b04SDr. David Alan Gilbert The result of the dirty rate measurement may be observed with ``info 175922269b04SDr. David Alan Gilbert dirty_rate`` command. 1760f3b2e38cSHyman Huang(黄勇)ERST 1761f3b2e38cSHyman Huang(黄勇) 1762f3b2e38cSHyman Huang(黄勇) { 1763f3b2e38cSHyman Huang(黄勇) .name = "set_vcpu_dirty_limit", 1764f3b2e38cSHyman Huang(黄勇) .args_type = "dirty_rate:l,cpu_index:l?", 1765f3b2e38cSHyman Huang(黄勇) .params = "dirty_rate [cpu_index]", 1766f3b2e38cSHyman Huang(黄勇) .help = "set dirty page rate limit, use cpu_index to set limit" 1767f3b2e38cSHyman Huang(黄勇) "\n\t\t\t\t\t on a specified virtual cpu", 1768f3b2e38cSHyman Huang(黄勇) .cmd = hmp_set_vcpu_dirty_limit, 1769f3b2e38cSHyman Huang(黄勇) }, 1770f3b2e38cSHyman Huang(黄勇) 1771f3b2e38cSHyman Huang(黄勇)SRST 177222269b04SDr. David Alan Gilbert``set_vcpu_dirty_limit`` 177322269b04SDr. David Alan Gilbert Set dirty page rate limit on virtual CPU, the information about all the 1774f3b2e38cSHyman Huang(黄勇) virtual CPU dirty limit status can be observed with ``info vcpu_dirty_limit`` 1775f3b2e38cSHyman Huang(黄勇) command. 1776f3b2e38cSHyman Huang(黄勇)ERST 1777f3b2e38cSHyman Huang(黄勇) 1778f3b2e38cSHyman Huang(黄勇) { 1779f3b2e38cSHyman Huang(黄勇) .name = "cancel_vcpu_dirty_limit", 1780f3b2e38cSHyman Huang(黄勇) .args_type = "cpu_index:l?", 1781f3b2e38cSHyman Huang(黄勇) .params = "[cpu_index]", 1782f3b2e38cSHyman Huang(黄勇) .help = "cancel dirty page rate limit, use cpu_index to cancel" 1783f3b2e38cSHyman Huang(黄勇) "\n\t\t\t\t\t limit on a specified virtual cpu", 1784f3b2e38cSHyman Huang(黄勇) .cmd = hmp_cancel_vcpu_dirty_limit, 1785f3b2e38cSHyman Huang(黄勇) }, 178622269b04SDr. David Alan Gilbert 178722269b04SDr. David Alan GilbertSRST 178822269b04SDr. David Alan Gilbert``cancel_vcpu_dirty_limit`` 178922269b04SDr. David Alan Gilbert Cancel dirty page rate limit on virtual CPU, the information about all the 179022269b04SDr. David Alan Gilbert virtual CPU dirty limit status can be observed with ``info vcpu_dirty_limit`` 179122269b04SDr. David Alan Gilbert command. 179222269b04SDr. David Alan GilbertERST 179322269b04SDr. David Alan Gilbert 179422269b04SDr. David Alan Gilbert { 179522269b04SDr. David Alan Gilbert .name = "info", 179622269b04SDr. David Alan Gilbert .args_type = "item:s?", 179722269b04SDr. David Alan Gilbert .params = "[subcommand]", 179822269b04SDr. David Alan Gilbert .help = "show various information about the system state", 179922269b04SDr. David Alan Gilbert .cmd = hmp_info_help, 180022269b04SDr. David Alan Gilbert .sub_table = hmp_info_cmds, 180122269b04SDr. David Alan Gilbert .flags = "p", 180222269b04SDr. David Alan Gilbert }, 1803bf353ad5SDaniel Henrique Barboza 1804bf353ad5SDaniel Henrique Barboza#if defined(CONFIG_FDT) 1805bf353ad5SDaniel Henrique Barboza { 1806bf353ad5SDaniel Henrique Barboza .name = "dumpdtb", 1807bf353ad5SDaniel Henrique Barboza .args_type = "filename:F", 1808bf353ad5SDaniel Henrique Barboza .params = "filename", 1809bf353ad5SDaniel Henrique Barboza .help = "dump the FDT in dtb format to 'filename'", 1810bf353ad5SDaniel Henrique Barboza .cmd = hmp_dumpdtb, 1811bf353ad5SDaniel Henrique Barboza }, 1812bf353ad5SDaniel Henrique Barboza 1813bf353ad5SDaniel Henrique BarbozaSRST 1814bf353ad5SDaniel Henrique Barboza``dumpdtb`` *filename* 1815bf353ad5SDaniel Henrique Barboza Dump the FDT in dtb format to *filename*. 1816bf353ad5SDaniel Henrique BarbozaERST 1817bf353ad5SDaniel Henrique Barboza#endif 1818