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", 142b9e3576SMarc-André Lureau .cmd = do_help_cmd, 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, 816d4a2b3aSChristoph Hellwig }, 826d4a2b3aSChristoph Hellwig 83a6b30bcaSPeter MaydellSRST 84a6b30bcaSPeter Maydell``block_resize`` 85a6b30bcaSPeter Maydell Resize a block image while a guest is running. Usually requires guest 86a6b30bcaSPeter Maydell action to see the updated size. Resize to a lower size is supported, 87a6b30bcaSPeter Maydell but should be used with extreme caution. Note that this command only 88a6b30bcaSPeter Maydell resizes image files, it can not resize block devices like LVM volumes. 89a6b30bcaSPeter MaydellERST 906d4a2b3aSChristoph Hellwig 9112bd451fSStefan Hajnoczi { 9212bd451fSStefan Hajnoczi .name = "block_stream", 93c83c66c3SStefan Hajnoczi .args_type = "device:B,speed:o?,base:s?", 94c83c66c3SStefan Hajnoczi .params = "device [speed [base]]", 9512bd451fSStefan Hajnoczi .help = "copy data from a backing file into a block device", 962b9e3576SMarc-André Lureau .cmd = hmp_block_stream, 9712bd451fSStefan Hajnoczi }, 9812bd451fSStefan Hajnoczi 99a6b30bcaSPeter MaydellSRST 100a6b30bcaSPeter Maydell``block_stream`` 101a6b30bcaSPeter Maydell Copy data from a backing file into a block device. 102a6b30bcaSPeter MaydellERST 1036d4a2b3aSChristoph Hellwig 1046d4a2b3aSChristoph Hellwig { 1052d47c6e9SStefan Hajnoczi .name = "block_job_set_speed", 106882ec7ceSStefan Hajnoczi .args_type = "device:B,speed:o", 107882ec7ceSStefan Hajnoczi .params = "device speed", 1082d47c6e9SStefan Hajnoczi .help = "set maximum speed for a background block operation", 1092b9e3576SMarc-André Lureau .cmd = hmp_block_job_set_speed, 1102d47c6e9SStefan Hajnoczi }, 1112d47c6e9SStefan Hajnoczi 112a6b30bcaSPeter MaydellSRST 113a6b30bcaSPeter Maydell``block_job_set_speed`` 114a6b30bcaSPeter Maydell Set maximum speed for a background block operation. 115a6b30bcaSPeter MaydellERST 1162d47c6e9SStefan Hajnoczi 1172d47c6e9SStefan Hajnoczi { 118370521a1SStefan Hajnoczi .name = "block_job_cancel", 1196e37fb81SPaolo Bonzini .args_type = "force:-f,device:B", 1206e37fb81SPaolo Bonzini .params = "[-f] device", 1216e37fb81SPaolo Bonzini .help = "stop an active background block operation (use -f" 122b76e4458SLiang Li "\n\t\t\t if you want to abort the operation immediately" 123b76e4458SLiang Li "\n\t\t\t instead of keep running until data is in sync)", 1242b9e3576SMarc-André Lureau .cmd = hmp_block_job_cancel, 125370521a1SStefan Hajnoczi }, 126370521a1SStefan Hajnoczi 127a6b30bcaSPeter MaydellSRST 128a6b30bcaSPeter Maydell``block_job_cancel`` 129a6b30bcaSPeter Maydell Stop an active background block operation (streaming, mirroring). 130a6b30bcaSPeter MaydellERST 131aeae883bSPaolo Bonzini 132aeae883bSPaolo Bonzini { 133aeae883bSPaolo Bonzini .name = "block_job_complete", 134aeae883bSPaolo Bonzini .args_type = "device:B", 135aeae883bSPaolo Bonzini .params = "device", 136aeae883bSPaolo Bonzini .help = "stop an active background block operation", 1372b9e3576SMarc-André Lureau .cmd = hmp_block_job_complete, 138aeae883bSPaolo Bonzini }, 139aeae883bSPaolo Bonzini 140a6b30bcaSPeter MaydellSRST 141a6b30bcaSPeter Maydell``block_job_complete`` 142a6b30bcaSPeter Maydell Manually trigger completion of an active background block operation. 143a6b30bcaSPeter Maydell For mirroring, this will switch the device to the destination path. 144a6b30bcaSPeter MaydellERST 145370521a1SStefan Hajnoczi 146370521a1SStefan Hajnoczi { 1476e37fb81SPaolo Bonzini .name = "block_job_pause", 1486e37fb81SPaolo Bonzini .args_type = "device:B", 1496e37fb81SPaolo Bonzini .params = "device", 1506e37fb81SPaolo Bonzini .help = "pause an active background block operation", 1512b9e3576SMarc-André Lureau .cmd = hmp_block_job_pause, 1526e37fb81SPaolo Bonzini }, 1536e37fb81SPaolo Bonzini 154a6b30bcaSPeter MaydellSRST 155a6b30bcaSPeter Maydell``block_job_pause`` 156a6b30bcaSPeter Maydell Pause an active block streaming operation. 157a6b30bcaSPeter MaydellERST 1586e37fb81SPaolo Bonzini 1596e37fb81SPaolo Bonzini { 1606e37fb81SPaolo Bonzini .name = "block_job_resume", 1616e37fb81SPaolo Bonzini .args_type = "device:B", 1626e37fb81SPaolo Bonzini .params = "device", 1636e37fb81SPaolo Bonzini .help = "resume a paused background block operation", 1642b9e3576SMarc-André Lureau .cmd = hmp_block_job_resume, 1656e37fb81SPaolo Bonzini }, 1666e37fb81SPaolo Bonzini 167a6b30bcaSPeter MaydellSRST 168a6b30bcaSPeter Maydell``block_job_resume`` 169a6b30bcaSPeter Maydell Resume a paused block streaming operation. 170a6b30bcaSPeter MaydellERST 1716e37fb81SPaolo Bonzini 1726e37fb81SPaolo Bonzini { 173d7f9b689SLuiz Capitulino .name = "eject", 17478d714e0SLuiz Capitulino .args_type = "force:-f,device:B", 175d7f9b689SLuiz Capitulino .params = "[-f] device", 176d7f9b689SLuiz Capitulino .help = "eject a removable medium (use -f to force it)", 1772b9e3576SMarc-André Lureau .cmd = hmp_eject, 178d7f9b689SLuiz Capitulino }, 179d7f9b689SLuiz Capitulino 180a6b30bcaSPeter MaydellSRST 181a6b30bcaSPeter Maydell``eject [-f]`` *device* 182a6b30bcaSPeter Maydell Eject a removable medium (use -f to force it). 183a6b30bcaSPeter MaydellERST 1842313086aSBlue Swirl 185d7f9b689SLuiz Capitulino { 1869063f814SRyan Harper .name = "drive_del", 187f7bdc41aSHani Benhabiles .args_type = "id:B", 1889063f814SRyan Harper .params = "device", 1899063f814SRyan Harper .help = "remove host block device", 1902b9e3576SMarc-André Lureau .cmd = hmp_drive_del, 1919063f814SRyan Harper }, 1929063f814SRyan Harper 193a6b30bcaSPeter MaydellSRST 194a6b30bcaSPeter Maydell``drive_del`` *device* 195a6b30bcaSPeter Maydell Remove host block device. The result is that guest generated IO is no longer 196a6b30bcaSPeter Maydell submitted against the host device underlying the disk. Once a drive has 197a6b30bcaSPeter Maydell been deleted, the QEMU Block layer returns -EIO which results in IO 198a6b30bcaSPeter Maydell errors in the guest for applications that are reading/writing to the device. 199a6b30bcaSPeter Maydell These errors are always reported to the guest, regardless of the drive's error 200a6b30bcaSPeter Maydell actions (drive options rerror, werror). 201a6b30bcaSPeter MaydellERST 2029063f814SRyan Harper 2039063f814SRyan Harper { 204d7f9b689SLuiz Capitulino .name = "change", 205baead0abSMax Reitz .args_type = "device:B,target:F,arg:s?,read-only-mode:s?", 206baead0abSMax Reitz .params = "device filename [format [read-only-mode]]", 207d7f9b689SLuiz Capitulino .help = "change a removable medium, optional format", 2082b9e3576SMarc-André Lureau .cmd = hmp_change, 209d7f9b689SLuiz Capitulino }, 210d7f9b689SLuiz Capitulino 211a6b30bcaSPeter MaydellSRST 212a6b30bcaSPeter Maydell``change`` *device* *setting* 213a6b30bcaSPeter Maydell Change the configuration of a device. 214a6b30bcaSPeter Maydell 215a6b30bcaSPeter Maydell ``change`` *diskdevice* *filename* [*format* [*read-only-mode*]] 216a6b30bcaSPeter Maydell Change the medium for a removable disk device to point to *filename*. eg:: 217a6b30bcaSPeter Maydell 218a6b30bcaSPeter Maydell (qemu) change ide1-cd0 /path/to/some.iso 219a6b30bcaSPeter Maydell 220a6b30bcaSPeter Maydell *format* is optional. 221a6b30bcaSPeter Maydell 222a6b30bcaSPeter Maydell *read-only-mode* may be used to change the read-only status of the device. 223a6b30bcaSPeter Maydell It accepts the following values: 224a6b30bcaSPeter Maydell 225a6b30bcaSPeter Maydell retain 226a6b30bcaSPeter Maydell Retains the current status; this is the default. 227a6b30bcaSPeter Maydell 228a6b30bcaSPeter Maydell read-only 229a6b30bcaSPeter Maydell Makes the device read-only. 230a6b30bcaSPeter Maydell 231a6b30bcaSPeter Maydell read-write 232a6b30bcaSPeter Maydell Makes the device writable. 233a6b30bcaSPeter Maydell 234a6b30bcaSPeter Maydell ``change vnc password`` [*password*] 235a6b30bcaSPeter Maydell 236a6b30bcaSPeter Maydell Change the password associated with the VNC server. If the new password 237a6b30bcaSPeter Maydell is not supplied, the monitor will prompt for it to be entered. VNC 238a6b30bcaSPeter Maydell passwords are only significant up to 8 letters. eg:: 239a6b30bcaSPeter Maydell 240a6b30bcaSPeter Maydell (qemu) change vnc password 241a6b30bcaSPeter Maydell Password: ******** 242a6b30bcaSPeter Maydell 243a6b30bcaSPeter MaydellERST 2442313086aSBlue Swirl 245d7f9b689SLuiz Capitulino { 246d7f9b689SLuiz Capitulino .name = "screendump", 247f771c544SThomas Huth .args_type = "filename:F,device:s?,head:i?", 248f771c544SThomas Huth .params = "filename [device [head]]", 249f771c544SThomas Huth .help = "save screen from head 'head' of display device 'device' " 250f771c544SThomas Huth "into PPM image 'filename'", 2512b9e3576SMarc-André Lureau .cmd = hmp_screendump, 2520d9b90ceSMarc-André Lureau .coroutine = true, 253d7f9b689SLuiz Capitulino }, 254d7f9b689SLuiz Capitulino 255a6b30bcaSPeter MaydellSRST 256a6b30bcaSPeter Maydell``screendump`` *filename* 257a6b30bcaSPeter Maydell Save screen into PPM image *filename*. 258a6b30bcaSPeter MaydellERST 2592313086aSBlue Swirl 260d7f9b689SLuiz Capitulino { 261d7f9b689SLuiz Capitulino .name = "logfile", 262d7f9b689SLuiz Capitulino .args_type = "filename:F", 263d7f9b689SLuiz Capitulino .params = "filename", 264d7f9b689SLuiz Capitulino .help = "output logs to 'filename'", 2652b9e3576SMarc-André Lureau .cmd = hmp_logfile, 266d7f9b689SLuiz Capitulino }, 267d7f9b689SLuiz Capitulino 268a6b30bcaSPeter MaydellSRST 269a6b30bcaSPeter Maydell``logfile`` *filename* 270a6b30bcaSPeter Maydell Output logs to *filename*. 271a6b30bcaSPeter MaydellERST 2722313086aSBlue Swirl 27322890ab5SPrerna Saxena { 27422890ab5SPrerna Saxena .name = "trace-event", 27577e2b172SLluís Vilanova .args_type = "name:s,option:b,vcpu:i?", 27677e2b172SLluís Vilanova .params = "name on|off [vcpu]", 27777e2b172SLluís Vilanova .help = "changes status of a specific trace event " 27877e2b172SLluís Vilanova "(vcpu: vCPU to set, default is all)", 2792b9e3576SMarc-André Lureau .cmd = hmp_trace_event, 280987bd270SDr. David Alan Gilbert .command_completion = trace_event_completion, 28122890ab5SPrerna Saxena }, 28222890ab5SPrerna Saxena 283a6b30bcaSPeter MaydellSRST 284a6b30bcaSPeter Maydell``trace-event`` 285a6b30bcaSPeter Maydell changes status of a trace event 286a6b30bcaSPeter MaydellERST 287c5ceb523SStefan Hajnoczi 288c45a8168SMichael Roth#if defined(CONFIG_TRACE_SIMPLE) 289c5ceb523SStefan Hajnoczi { 290c5ceb523SStefan Hajnoczi .name = "trace-file", 291c5ceb523SStefan Hajnoczi .args_type = "op:s?,arg:F?", 292c5ceb523SStefan Hajnoczi .params = "on|off|flush|set [arg]", 293c5ceb523SStefan Hajnoczi .help = "open, close, or flush trace file, or set a new file name", 2942b9e3576SMarc-André Lureau .cmd = hmp_trace_file, 295c5ceb523SStefan Hajnoczi }, 296c5ceb523SStefan Hajnoczi 297a6b30bcaSPeter MaydellSRST 298a6b30bcaSPeter Maydell``trace-file on|off|flush`` 299a6b30bcaSPeter Maydell Open, close, or flush the trace file. If no argument is given, the 300a6b30bcaSPeter Maydell status of the trace file is displayed. 301a6b30bcaSPeter MaydellERST 30222890ab5SPrerna Saxena#endif 30322890ab5SPrerna Saxena 304d7f9b689SLuiz Capitulino { 305d7f9b689SLuiz Capitulino .name = "log", 306d7f9b689SLuiz Capitulino .args_type = "items:s", 307d7f9b689SLuiz Capitulino .params = "item1[,...]", 308989b697dSPeter Maydell .help = "activate logging of the specified items", 3092b9e3576SMarc-André Lureau .cmd = hmp_log, 310d7f9b689SLuiz Capitulino }, 311d7f9b689SLuiz Capitulino 312a6b30bcaSPeter MaydellSRST 313a6b30bcaSPeter Maydell``log`` *item1*\ [,...] 314a6b30bcaSPeter Maydell Activate logging of the specified items. 315a6b30bcaSPeter MaydellERST 3162313086aSBlue Swirl 317d7f9b689SLuiz Capitulino { 318d7f9b689SLuiz Capitulino .name = "savevm", 319d7f9b689SLuiz Capitulino .args_type = "name:s?", 3206ca08045SDaniel Henrique Barboza .params = "tag", 3216ca08045SDaniel Henrique Barboza .help = "save a VM snapshot. If no tag is provided, a new snapshot is created", 3222b9e3576SMarc-André Lureau .cmd = hmp_savevm, 323d7f9b689SLuiz Capitulino }, 324d7f9b689SLuiz Capitulino 325a6b30bcaSPeter MaydellSRST 326a6b30bcaSPeter Maydell``savevm`` *tag* 327a6b30bcaSPeter Maydell Create a snapshot of the whole virtual machine. If *tag* is 328a6b30bcaSPeter Maydell provided, it is used as human readable identifier. If there is already 329a6b30bcaSPeter Maydell a snapshot with the same tag, it is replaced. More info at 330a6b30bcaSPeter Maydell :ref:`vm_005fsnapshots`. 331a6b30bcaSPeter Maydell 332a6b30bcaSPeter Maydell Since 4.0, savevm stopped allowing the snapshot id to be set, accepting 333a6b30bcaSPeter Maydell only *tag* as parameter. 334a6b30bcaSPeter MaydellERST 3352313086aSBlue Swirl 336d7f9b689SLuiz Capitulino { 337d7f9b689SLuiz Capitulino .name = "loadvm", 338d7f9b689SLuiz Capitulino .args_type = "name:s", 3396ca08045SDaniel Henrique Barboza .params = "tag", 3406ca08045SDaniel Henrique Barboza .help = "restore a VM snapshot from its tag", 3412b9e3576SMarc-André Lureau .cmd = hmp_loadvm, 342b21631f3SHani Benhabiles .command_completion = loadvm_completion, 343d7f9b689SLuiz Capitulino }, 344d7f9b689SLuiz Capitulino 345a6b30bcaSPeter MaydellSRST 346a6b30bcaSPeter Maydell``loadvm`` *tag* 347a6b30bcaSPeter Maydell Set the whole virtual machine to the snapshot identified by the tag 348a6b30bcaSPeter Maydell *tag*. 349a6b30bcaSPeter Maydell 350a6b30bcaSPeter Maydell Since 4.0, loadvm stopped accepting snapshot id as parameter. 351a6b30bcaSPeter MaydellERST 3522313086aSBlue Swirl 353d7f9b689SLuiz Capitulino { 354d7f9b689SLuiz Capitulino .name = "delvm", 355d7f9b689SLuiz Capitulino .args_type = "name:s", 3566ca08045SDaniel Henrique Barboza .params = "tag", 3576ca08045SDaniel Henrique Barboza .help = "delete a VM snapshot from its tag", 3582b9e3576SMarc-André Lureau .cmd = hmp_delvm, 359b21631f3SHani Benhabiles .command_completion = delvm_completion, 360d7f9b689SLuiz Capitulino }, 361d7f9b689SLuiz Capitulino 362a6b30bcaSPeter MaydellSRST 363a6b30bcaSPeter Maydell``delvm`` *tag* 364a6b30bcaSPeter Maydell Delete the snapshot identified by *tag*. 365a6b30bcaSPeter Maydell 366a6b30bcaSPeter Maydell Since 4.0, delvm stopped deleting snapshots by snapshot id, accepting 367a6b30bcaSPeter Maydell only *tag* as parameter. 368a6b30bcaSPeter MaydellERST 3692313086aSBlue Swirl 370d7f9b689SLuiz Capitulino { 371d7f9b689SLuiz Capitulino .name = "singlestep", 372d7f9b689SLuiz Capitulino .args_type = "option:s?", 373d7f9b689SLuiz Capitulino .params = "[on|off]", 374d7f9b689SLuiz Capitulino .help = "run emulation in singlestep mode or switch to normal mode", 3752b9e3576SMarc-André Lureau .cmd = hmp_singlestep, 376d7f9b689SLuiz Capitulino }, 377d7f9b689SLuiz Capitulino 378a6b30bcaSPeter MaydellSRST 379a6b30bcaSPeter Maydell``singlestep [off]`` 380a6b30bcaSPeter Maydell Run the emulation in single step mode. 381a6b30bcaSPeter Maydell If called with option off, the emulation returns to normal mode. 382a6b30bcaSPeter MaydellERST 3832313086aSBlue Swirl 384d7f9b689SLuiz Capitulino { 385de4cf848SBALATON Zoltan .name = "stop|s", 386d7f9b689SLuiz Capitulino .args_type = "", 387d7f9b689SLuiz Capitulino .params = "", 388d7f9b689SLuiz Capitulino .help = "stop emulation", 3892b9e3576SMarc-André Lureau .cmd = hmp_stop, 390d7f9b689SLuiz Capitulino }, 391d7f9b689SLuiz Capitulino 392a6b30bcaSPeter MaydellSRST 393de4cf848SBALATON Zoltan``stop`` or ``s`` 394a6b30bcaSPeter Maydell Stop emulation. 395a6b30bcaSPeter MaydellERST 3962313086aSBlue Swirl 397d7f9b689SLuiz Capitulino { 398ff688cd2SPeter Maydell .name = "cont|c", 399d7f9b689SLuiz Capitulino .args_type = "", 400d7f9b689SLuiz Capitulino .params = "", 401d7f9b689SLuiz Capitulino .help = "resume emulation", 4022b9e3576SMarc-André Lureau .cmd = hmp_cont, 403d7f9b689SLuiz Capitulino }, 404d7f9b689SLuiz Capitulino 405a6b30bcaSPeter MaydellSRST 406ff688cd2SPeter Maydell``cont`` or ``c`` 407a6b30bcaSPeter Maydell Resume emulation. 408a6b30bcaSPeter MaydellERST 4092313086aSBlue Swirl 410d7f9b689SLuiz Capitulino { 4119b9df25aSGerd Hoffmann .name = "system_wakeup", 4129b9df25aSGerd Hoffmann .args_type = "", 4139b9df25aSGerd Hoffmann .params = "", 4149b9df25aSGerd Hoffmann .help = "wakeup guest from suspend", 4152b9e3576SMarc-André Lureau .cmd = hmp_system_wakeup, 4169b9df25aSGerd Hoffmann }, 4179b9df25aSGerd Hoffmann 418a6b30bcaSPeter MaydellSRST 419a6b30bcaSPeter Maydell``system_wakeup`` 420a6b30bcaSPeter Maydell Wakeup guest from suspend. 421a6b30bcaSPeter MaydellERST 4229b9df25aSGerd Hoffmann 4239b9df25aSGerd Hoffmann { 424d7f9b689SLuiz Capitulino .name = "gdbserver", 425d7f9b689SLuiz Capitulino .args_type = "device:s?", 426d7f9b689SLuiz Capitulino .params = "[device]", 427d7f9b689SLuiz Capitulino .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'", 4282b9e3576SMarc-André Lureau .cmd = hmp_gdbserver, 429d7f9b689SLuiz Capitulino }, 430d7f9b689SLuiz Capitulino 431a6b30bcaSPeter MaydellSRST 432a6b30bcaSPeter Maydell``gdbserver`` [*port*] 433a6b30bcaSPeter Maydell Start gdbserver session (default *port*\=1234) 434a6b30bcaSPeter MaydellERST 4352313086aSBlue Swirl 436d7f9b689SLuiz Capitulino { 437d7f9b689SLuiz Capitulino .name = "x", 438d7f9b689SLuiz Capitulino .args_type = "fmt:/,addr:l", 439d7f9b689SLuiz Capitulino .params = "/fmt addr", 440d7f9b689SLuiz Capitulino .help = "virtual memory dump starting at 'addr'", 4412b9e3576SMarc-André Lureau .cmd = hmp_memory_dump, 442d7f9b689SLuiz Capitulino }, 443d7f9b689SLuiz Capitulino 444a6b30bcaSPeter MaydellSRST 445a6b30bcaSPeter Maydell``x/``\ *fmt* *addr* 446a6b30bcaSPeter Maydell Virtual memory dump starting at *addr*. 447a6b30bcaSPeter MaydellERST 4482313086aSBlue Swirl 449d7f9b689SLuiz Capitulino { 450d7f9b689SLuiz Capitulino .name = "xp", 451d7f9b689SLuiz Capitulino .args_type = "fmt:/,addr:l", 452d7f9b689SLuiz Capitulino .params = "/fmt addr", 453d7f9b689SLuiz Capitulino .help = "physical memory dump starting at 'addr'", 4542b9e3576SMarc-André Lureau .cmd = hmp_physical_memory_dump, 455d7f9b689SLuiz Capitulino }, 456d7f9b689SLuiz Capitulino 457a6b30bcaSPeter MaydellSRST 458a6b30bcaSPeter Maydell``xp /``\ *fmt* *addr* 459a6b30bcaSPeter Maydell Physical memory dump starting at *addr*. 460a6b30bcaSPeter Maydell 461a6b30bcaSPeter Maydell *fmt* is a format which tells the command how to format the 462a6b30bcaSPeter Maydell data. Its syntax is: ``/{count}{format}{size}`` 463a6b30bcaSPeter Maydell 464a6b30bcaSPeter Maydell *count* 465a6b30bcaSPeter Maydell is the number of items to be dumped. 466a6b30bcaSPeter Maydell *format* 467a6b30bcaSPeter Maydell can be x (hex), d (signed decimal), u (unsigned decimal), o (octal), 468a6b30bcaSPeter Maydell c (char) or i (asm instruction). 469a6b30bcaSPeter Maydell *size* 470a6b30bcaSPeter Maydell can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86, 471a6b30bcaSPeter Maydell ``h`` or ``w`` can be specified with the ``i`` format to 472a6b30bcaSPeter Maydell respectively select 16 or 32 bit code instruction size. 473a6b30bcaSPeter Maydell 474a6b30bcaSPeter Maydell Examples: 475a6b30bcaSPeter Maydell 476a6b30bcaSPeter Maydell Dump 10 instructions at the current instruction pointer:: 477a6b30bcaSPeter Maydell 478a6b30bcaSPeter Maydell (qemu) x/10i $eip 479a6b30bcaSPeter Maydell 0x90107063: ret 480a6b30bcaSPeter Maydell 0x90107064: sti 481a6b30bcaSPeter Maydell 0x90107065: lea 0x0(%esi,1),%esi 482a6b30bcaSPeter Maydell 0x90107069: lea 0x0(%edi,1),%edi 483a6b30bcaSPeter Maydell 0x90107070: ret 484a6b30bcaSPeter Maydell 0x90107071: jmp 0x90107080 485a6b30bcaSPeter Maydell 0x90107073: nop 486a6b30bcaSPeter Maydell 0x90107074: nop 487a6b30bcaSPeter Maydell 0x90107075: nop 488a6b30bcaSPeter Maydell 0x90107076: nop 489a6b30bcaSPeter Maydell 490a6b30bcaSPeter Maydell Dump 80 16 bit values at the start of the video memory:: 491a6b30bcaSPeter Maydell 492a6b30bcaSPeter Maydell (qemu) xp/80hx 0xb8000 493a6b30bcaSPeter Maydell 0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42 494a6b30bcaSPeter Maydell 0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41 495a6b30bcaSPeter Maydell 0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72 496a6b30bcaSPeter Maydell 0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73 497a6b30bcaSPeter Maydell 0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20 498a6b30bcaSPeter Maydell 0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720 499a6b30bcaSPeter Maydell 0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 500a6b30bcaSPeter Maydell 0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 501a6b30bcaSPeter Maydell 0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 502a6b30bcaSPeter Maydell 0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 503a6b30bcaSPeter Maydell 504a6b30bcaSPeter MaydellERST 5052313086aSBlue Swirl 506d7f9b689SLuiz Capitulino { 507e9628441SPaolo Bonzini .name = "gpa2hva", 508e9628441SPaolo Bonzini .args_type = "addr:l", 509e9628441SPaolo Bonzini .params = "addr", 510e9628441SPaolo Bonzini .help = "print the host virtual address corresponding to a guest physical address", 511e9628441SPaolo Bonzini .cmd = hmp_gpa2hva, 512e9628441SPaolo Bonzini }, 513e9628441SPaolo Bonzini 514a6b30bcaSPeter MaydellSRST 515a6b30bcaSPeter Maydell``gpa2hva`` *addr* 516a6b30bcaSPeter Maydell Print the host virtual address at which the guest's physical address *addr* 517a6b30bcaSPeter Maydell is mapped. 518a6b30bcaSPeter MaydellERST 519e9628441SPaolo Bonzini 520e9628441SPaolo Bonzini#ifdef CONFIG_LINUX 521e9628441SPaolo Bonzini { 522e9628441SPaolo Bonzini .name = "gpa2hpa", 523e9628441SPaolo Bonzini .args_type = "addr:l", 524e9628441SPaolo Bonzini .params = "addr", 525e9628441SPaolo Bonzini .help = "print the host physical address corresponding to a guest physical address", 526e9628441SPaolo Bonzini .cmd = hmp_gpa2hpa, 527e9628441SPaolo Bonzini }, 528e9628441SPaolo Bonzini#endif 529e9628441SPaolo Bonzini 530a6b30bcaSPeter MaydellSRST 531a6b30bcaSPeter Maydell``gpa2hpa`` *addr* 532a6b30bcaSPeter Maydell Print the host physical address at which the guest's physical address *addr* 533a6b30bcaSPeter Maydell is mapped. 534a6b30bcaSPeter MaydellERST 535e9628441SPaolo Bonzini 536e9628441SPaolo Bonzini { 537574d9693SDr. David Alan Gilbert .name = "gva2gpa", 538574d9693SDr. David Alan Gilbert .args_type = "addr:l", 539574d9693SDr. David Alan Gilbert .params = "addr", 540574d9693SDr. David Alan Gilbert .help = "print the guest physical address corresponding to a guest virtual address", 541574d9693SDr. David Alan Gilbert .cmd = hmp_gva2gpa, 542574d9693SDr. David Alan Gilbert }, 543574d9693SDr. David Alan Gilbert 544a6b30bcaSPeter MaydellSRST 545a6b30bcaSPeter Maydell``gva2gpa`` *addr* 546a6b30bcaSPeter Maydell Print the guest physical address at which the guest's virtual address *addr* 547a6b30bcaSPeter Maydell is mapped based on the mapping for the current CPU. 548a6b30bcaSPeter MaydellERST 549574d9693SDr. David Alan Gilbert 550574d9693SDr. David Alan Gilbert { 551ff688cd2SPeter Maydell .name = "print|p", 552d7f9b689SLuiz Capitulino .args_type = "fmt:/,val:l", 553d7f9b689SLuiz Capitulino .params = "/fmt expr", 554d7f9b689SLuiz Capitulino .help = "print expression value (use $reg for CPU register access)", 5552b9e3576SMarc-André Lureau .cmd = do_print, 556d7f9b689SLuiz Capitulino }, 557d7f9b689SLuiz Capitulino 558a6b30bcaSPeter MaydellSRST 559ff688cd2SPeter Maydell``print`` or ``p/``\ *fmt* *expr* 560a6b30bcaSPeter Maydell Print expression value. Only the *format* part of *fmt* is 561a6b30bcaSPeter Maydell used. 562a6b30bcaSPeter MaydellERST 5632313086aSBlue Swirl 564d7f9b689SLuiz Capitulino { 565d7f9b689SLuiz Capitulino .name = "i", 566d7f9b689SLuiz Capitulino .args_type = "fmt:/,addr:i,index:i.", 567d7f9b689SLuiz Capitulino .params = "/fmt addr", 568d7f9b689SLuiz Capitulino .help = "I/O port read", 5692b9e3576SMarc-André Lureau .cmd = hmp_ioport_read, 570d7f9b689SLuiz Capitulino }, 571d7f9b689SLuiz Capitulino 572a6b30bcaSPeter MaydellSRST 573a6b30bcaSPeter Maydell``i/``\ *fmt* *addr* [.\ *index*\ ] 574a6b30bcaSPeter Maydell Read I/O port. 575a6b30bcaSPeter MaydellERST 5762313086aSBlue Swirl 577d7f9b689SLuiz Capitulino { 578d7f9b689SLuiz Capitulino .name = "o", 579d7f9b689SLuiz Capitulino .args_type = "fmt:/,addr:i,val:i", 580d7f9b689SLuiz Capitulino .params = "/fmt addr value", 581d7f9b689SLuiz Capitulino .help = "I/O port write", 5822b9e3576SMarc-André Lureau .cmd = hmp_ioport_write, 583d7f9b689SLuiz Capitulino }, 584d7f9b689SLuiz Capitulino 585a6b30bcaSPeter MaydellSRST 586a6b30bcaSPeter Maydell``o/``\ *fmt* *addr* *val* 587a6b30bcaSPeter Maydell Write to I/O port. 588a6b30bcaSPeter MaydellERST 5892313086aSBlue Swirl 590d7f9b689SLuiz Capitulino { 591d7f9b689SLuiz Capitulino .name = "sendkey", 5922ef20c15SAmos Kong .args_type = "keys:s,hold-time:i?", 593d7f9b689SLuiz Capitulino .params = "keys [hold_ms]", 594d7f9b689SLuiz Capitulino .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)", 5952b9e3576SMarc-André Lureau .cmd = hmp_sendkey, 59629136cd8SHani Benhabiles .command_completion = sendkey_completion, 597d7f9b689SLuiz Capitulino }, 598d7f9b689SLuiz Capitulino 599a6b30bcaSPeter MaydellSRST 600a6b30bcaSPeter Maydell``sendkey`` *keys* 601a6b30bcaSPeter Maydell Send *keys* to the guest. *keys* could be the name of the 602a6b30bcaSPeter Maydell key or the raw value in hexadecimal format. Use ``-`` to press 603a6b30bcaSPeter Maydell several keys simultaneously. Example:: 604a6b30bcaSPeter Maydell 605a6b30bcaSPeter Maydell sendkey ctrl-alt-f1 606a6b30bcaSPeter Maydell 607a6b30bcaSPeter Maydell This command is useful to send keys that your graphical user interface 608a6b30bcaSPeter Maydell intercepts at low level, such as ``ctrl-alt-f1`` in X Window. 609a6b30bcaSPeter MaydellERST 610dd12e1bbSEmilio G. Cota { 611dd12e1bbSEmilio G. Cota .name = "sync-profile", 612dd12e1bbSEmilio G. Cota .args_type = "op:s?", 613dd12e1bbSEmilio G. Cota .params = "[on|off|reset]", 614dd12e1bbSEmilio G. Cota .help = "enable, disable or reset synchronization profiling. " 615dd12e1bbSEmilio G. Cota "With no arguments, prints whether profiling is on or off.", 616dd12e1bbSEmilio G. Cota .cmd = hmp_sync_profile, 617dd12e1bbSEmilio G. Cota }, 618dd12e1bbSEmilio G. Cota 619a6b30bcaSPeter MaydellSRST 620a6b30bcaSPeter Maydell``sync-profile [on|off|reset]`` 621a6b30bcaSPeter Maydell Enable, disable or reset synchronization profiling. With no arguments, prints 622a6b30bcaSPeter Maydell whether profiling is on or off. 623a6b30bcaSPeter MaydellERST 6242313086aSBlue Swirl 625d7f9b689SLuiz Capitulino { 626d7f9b689SLuiz Capitulino .name = "system_reset", 627d7f9b689SLuiz Capitulino .args_type = "", 628d7f9b689SLuiz Capitulino .params = "", 629d7f9b689SLuiz Capitulino .help = "reset the system", 6302b9e3576SMarc-André Lureau .cmd = hmp_system_reset, 631d7f9b689SLuiz Capitulino }, 632d7f9b689SLuiz Capitulino 633a6b30bcaSPeter MaydellSRST 634a6b30bcaSPeter Maydell``system_reset`` 635a6b30bcaSPeter Maydell Reset the system. 636a6b30bcaSPeter MaydellERST 6372313086aSBlue Swirl 638d7f9b689SLuiz Capitulino { 639d7f9b689SLuiz Capitulino .name = "system_powerdown", 640d7f9b689SLuiz Capitulino .args_type = "", 641d7f9b689SLuiz Capitulino .params = "", 642d7f9b689SLuiz Capitulino .help = "send system power down event", 6432b9e3576SMarc-André Lureau .cmd = hmp_system_powerdown, 644d7f9b689SLuiz Capitulino }, 645d7f9b689SLuiz Capitulino 646a6b30bcaSPeter MaydellSRST 647a6b30bcaSPeter Maydell``system_powerdown`` 648a6b30bcaSPeter Maydell Power down the system (if supported). 649a6b30bcaSPeter MaydellERST 6502313086aSBlue Swirl 651d7f9b689SLuiz Capitulino { 652d7f9b689SLuiz Capitulino .name = "sum", 653d7f9b689SLuiz Capitulino .args_type = "start:i,size:i", 654d7f9b689SLuiz Capitulino .params = "addr size", 655d7f9b689SLuiz Capitulino .help = "compute the checksum of a memory region", 6562b9e3576SMarc-André Lureau .cmd = hmp_sum, 657d7f9b689SLuiz Capitulino }, 658d7f9b689SLuiz Capitulino 659a6b30bcaSPeter MaydellSRST 660a6b30bcaSPeter Maydell``sum`` *addr* *size* 661a6b30bcaSPeter Maydell Compute the checksum of a memory region. 662a6b30bcaSPeter MaydellERST 6632313086aSBlue Swirl 664d7f9b689SLuiz Capitulino { 665d7f9b689SLuiz Capitulino .name = "device_add", 666c7e4e8ceSMarkus Armbruster .args_type = "device:O", 667c7e4e8ceSMarkus Armbruster .params = "driver[,prop=value][,...]", 668d7f9b689SLuiz Capitulino .help = "add device, like -device on the command line", 6692b9e3576SMarc-André Lureau .cmd = hmp_device_add, 6702da1b3abSHani Benhabiles .command_completion = device_add_completion, 671d7f9b689SLuiz Capitulino }, 672d7f9b689SLuiz Capitulino 673a6b30bcaSPeter MaydellSRST 674a6b30bcaSPeter Maydell``device_add`` *config* 675a6b30bcaSPeter Maydell Add device. 676a6b30bcaSPeter MaydellERST 6773418bd25SGerd Hoffmann 678d7f9b689SLuiz Capitulino { 679d7f9b689SLuiz Capitulino .name = "device_del", 680d7f9b689SLuiz Capitulino .args_type = "id:s", 681d7f9b689SLuiz Capitulino .params = "device", 682d7f9b689SLuiz Capitulino .help = "remove device", 6832b9e3576SMarc-André Lureau .cmd = hmp_device_del, 6842da1b3abSHani Benhabiles .command_completion = device_del_completion, 685d7f9b689SLuiz Capitulino }, 686d7f9b689SLuiz Capitulino 687a6b30bcaSPeter MaydellSRST 688a6b30bcaSPeter Maydell``device_del`` *id* 689a6b30bcaSPeter Maydell Remove device *id*. *id* may be a short ID 690a6b30bcaSPeter Maydell or a QOM object path. 691a6b30bcaSPeter MaydellERST 6923418bd25SGerd Hoffmann 693d7f9b689SLuiz Capitulino { 694d7f9b689SLuiz Capitulino .name = "cpu", 695d7f9b689SLuiz Capitulino .args_type = "index:i", 696d7f9b689SLuiz Capitulino .params = "index", 697d7f9b689SLuiz Capitulino .help = "set the default CPU", 6982b9e3576SMarc-André Lureau .cmd = hmp_cpu, 699d7f9b689SLuiz Capitulino }, 7003418bd25SGerd Hoffmann 701a6b30bcaSPeter MaydellSRST 702a6b30bcaSPeter Maydell``cpu`` *index* 703a6b30bcaSPeter Maydell Set the default CPU. 704a6b30bcaSPeter MaydellERST 7052313086aSBlue Swirl 706d7f9b689SLuiz Capitulino { 707d7f9b689SLuiz Capitulino .name = "mouse_move", 708d7f9b689SLuiz Capitulino .args_type = "dx_str:s,dy_str:s,dz_str:s?", 709d7f9b689SLuiz Capitulino .params = "dx dy [dz]", 710d7f9b689SLuiz Capitulino .help = "send mouse move events", 7112b9e3576SMarc-André Lureau .cmd = hmp_mouse_move, 712d7f9b689SLuiz Capitulino }, 713d7f9b689SLuiz Capitulino 714a6b30bcaSPeter MaydellSRST 715a6b30bcaSPeter Maydell``mouse_move`` *dx* *dy* [*dz*] 716a6b30bcaSPeter Maydell Move the active mouse to the specified coordinates *dx* *dy* 717a6b30bcaSPeter Maydell with optional scroll axis *dz*. 718a6b30bcaSPeter MaydellERST 7192313086aSBlue Swirl 720d7f9b689SLuiz Capitulino { 721d7f9b689SLuiz Capitulino .name = "mouse_button", 722d7f9b689SLuiz Capitulino .args_type = "button_state:i", 723d7f9b689SLuiz Capitulino .params = "state", 724d7f9b689SLuiz Capitulino .help = "change mouse button state (1=L, 2=M, 4=R)", 7252b9e3576SMarc-André Lureau .cmd = hmp_mouse_button, 726d7f9b689SLuiz Capitulino }, 727d7f9b689SLuiz Capitulino 728a6b30bcaSPeter MaydellSRST 729a6b30bcaSPeter Maydell``mouse_button`` *val* 730a6b30bcaSPeter Maydell Change the active mouse button state *val* (1=L, 2=M, 4=R). 731a6b30bcaSPeter MaydellERST 7322313086aSBlue Swirl 733d7f9b689SLuiz Capitulino { 734d7f9b689SLuiz Capitulino .name = "mouse_set", 735d7f9b689SLuiz Capitulino .args_type = "index:i", 736d7f9b689SLuiz Capitulino .params = "index", 737d7f9b689SLuiz Capitulino .help = "set which mouse device receives events", 7382b9e3576SMarc-André Lureau .cmd = hmp_mouse_set, 739d7f9b689SLuiz Capitulino }, 740d7f9b689SLuiz Capitulino 741a6b30bcaSPeter MaydellSRST 742a6b30bcaSPeter Maydell``mouse_set`` *index* 743a6b30bcaSPeter Maydell Set which mouse device receives events at given *index*, index 744a6b30bcaSPeter Maydell can be obtained with:: 745a6b30bcaSPeter Maydell 746a6b30bcaSPeter Maydell info mice 747a6b30bcaSPeter Maydell 748a6b30bcaSPeter MaydellERST 7492313086aSBlue Swirl 750d7f9b689SLuiz Capitulino { 751d7f9b689SLuiz Capitulino .name = "wavcapture", 752f0b9f36dSKővágó, Zoltán .args_type = "path:F,audiodev:s,freq:i?,bits:i?,nchannels:i?", 753f0b9f36dSKővágó, Zoltán .params = "path audiodev [frequency [bits [channels]]]", 754d7f9b689SLuiz Capitulino .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)", 7552b9e3576SMarc-André Lureau .cmd = hmp_wavcapture, 756d7f9b689SLuiz Capitulino }, 757a6b30bcaSPeter MaydellSRST 758a6b30bcaSPeter Maydell``wavcapture`` *filename* *audiodev* [*frequency* [*bits* [*channels*]]] 759a6b30bcaSPeter Maydell Capture audio into *filename* from *audiodev*, using sample rate 760a6b30bcaSPeter Maydell *frequency* bits per sample *bits* and number of channels 761a6b30bcaSPeter Maydell *channels*. 762a6b30bcaSPeter Maydell 763a6b30bcaSPeter Maydell Defaults: 764a6b30bcaSPeter Maydell 765a6b30bcaSPeter Maydell - Sample rate = 44100 Hz - CD quality 766a6b30bcaSPeter Maydell - Bits = 16 767a6b30bcaSPeter Maydell - Number of channels = 2 - Stereo 768a6b30bcaSPeter MaydellERST 7692313086aSBlue Swirl 770d7f9b689SLuiz Capitulino { 771d7f9b689SLuiz Capitulino .name = "stopcapture", 772d7f9b689SLuiz Capitulino .args_type = "n:i", 773d7f9b689SLuiz Capitulino .params = "capture index", 774d7f9b689SLuiz Capitulino .help = "stop capture", 7752b9e3576SMarc-André Lureau .cmd = hmp_stopcapture, 776d7f9b689SLuiz Capitulino }, 777a6b30bcaSPeter MaydellSRST 778a6b30bcaSPeter Maydell``stopcapture`` *index* 779a6b30bcaSPeter Maydell Stop capture with a given *index*, index can be obtained with:: 780a6b30bcaSPeter Maydell 781a6b30bcaSPeter Maydell info capture 782a6b30bcaSPeter Maydell 783a6b30bcaSPeter MaydellERST 7842313086aSBlue Swirl 785d7f9b689SLuiz Capitulino { 786d7f9b689SLuiz Capitulino .name = "memsave", 787d7f9b689SLuiz Capitulino .args_type = "val:l,size:i,filename:s", 788d7f9b689SLuiz Capitulino .params = "addr size file", 789d7f9b689SLuiz Capitulino .help = "save to disk virtual memory dump starting at 'addr' of size 'size'", 7902b9e3576SMarc-André Lureau .cmd = hmp_memsave, 791d7f9b689SLuiz Capitulino }, 792d7f9b689SLuiz Capitulino 793a6b30bcaSPeter MaydellSRST 794a6b30bcaSPeter Maydell``memsave`` *addr* *size* *file* 795a6b30bcaSPeter Maydell save to disk virtual memory dump starting at *addr* of size *size*. 796a6b30bcaSPeter MaydellERST 7972313086aSBlue Swirl 798d7f9b689SLuiz Capitulino { 799d7f9b689SLuiz Capitulino .name = "pmemsave", 800d7f9b689SLuiz Capitulino .args_type = "val:l,size:i,filename:s", 801d7f9b689SLuiz Capitulino .params = "addr size file", 802d7f9b689SLuiz Capitulino .help = "save to disk physical memory dump starting at 'addr' of size 'size'", 8032b9e3576SMarc-André Lureau .cmd = hmp_pmemsave, 804d7f9b689SLuiz Capitulino }, 805d7f9b689SLuiz Capitulino 806a6b30bcaSPeter MaydellSRST 807a6b30bcaSPeter Maydell``pmemsave`` *addr* *size* *file* 808a6b30bcaSPeter Maydell save to disk physical memory dump starting at *addr* of size *size*. 809a6b30bcaSPeter MaydellERST 8102313086aSBlue Swirl 811d7f9b689SLuiz Capitulino { 812d7f9b689SLuiz Capitulino .name = "boot_set", 813d7f9b689SLuiz Capitulino .args_type = "bootdevice:s", 814d7f9b689SLuiz Capitulino .params = "bootdevice", 815d7f9b689SLuiz Capitulino .help = "define new values for the boot device list", 8162b9e3576SMarc-André Lureau .cmd = hmp_boot_set, 817d7f9b689SLuiz Capitulino }, 818d7f9b689SLuiz Capitulino 819a6b30bcaSPeter MaydellSRST 820a6b30bcaSPeter Maydell``boot_set`` *bootdevicelist* 821a6b30bcaSPeter Maydell Define new values for the boot device list. Those values will override 822a6b30bcaSPeter Maydell the values specified on the command line through the ``-boot`` option. 823a6b30bcaSPeter Maydell 824a6b30bcaSPeter Maydell The values that can be specified here depend on the machine type, but are 825a6b30bcaSPeter Maydell the same that can be specified in the ``-boot`` command line option. 826a6b30bcaSPeter MaydellERST 8272313086aSBlue Swirl 828d7f9b689SLuiz Capitulino { 829d7f9b689SLuiz Capitulino .name = "nmi", 830e9b4b432SLuiz Capitulino .args_type = "", 831e9b4b432SLuiz Capitulino .params = "", 8329cb805fdSAlexey Kardashevskiy .help = "inject an NMI", 8332b9e3576SMarc-André Lureau .cmd = hmp_nmi, 834d7f9b689SLuiz Capitulino }, 835a6b30bcaSPeter MaydellSRST 836a6b30bcaSPeter Maydell``nmi`` *cpu* 837a6b30bcaSPeter Maydell Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64). 838a6b30bcaSPeter MaydellERST 8391f590cf9SLei Li 8401f590cf9SLei Li { 8413949e594SMarkus Armbruster .name = "ringbuf_write", 8421f590cf9SLei Li .args_type = "device:s,data:s", 8431f590cf9SLei Li .params = "device data", 8443949e594SMarkus Armbruster .help = "Write to a ring buffer character device", 8452b9e3576SMarc-André Lureau .cmd = hmp_ringbuf_write, 8468e597779SHani Benhabiles .command_completion = ringbuf_write_completion, 8471f590cf9SLei Li }, 8481f590cf9SLei Li 849a6b30bcaSPeter MaydellSRST 850a6b30bcaSPeter Maydell``ringbuf_write`` *device* *data* 851a6b30bcaSPeter Maydell Write *data* to ring buffer character device *device*. 852a6b30bcaSPeter Maydell *data* must be a UTF-8 string. 853a6b30bcaSPeter MaydellERST 8542313086aSBlue Swirl 855d7f9b689SLuiz Capitulino { 8563949e594SMarkus Armbruster .name = "ringbuf_read", 85749b6d722SLei Li .args_type = "device:s,size:i", 85849b6d722SLei Li .params = "device size", 8593949e594SMarkus Armbruster .help = "Read from a ring buffer character device", 8602b9e3576SMarc-André Lureau .cmd = hmp_ringbuf_read, 8618e597779SHani Benhabiles .command_completion = ringbuf_write_completion, 86249b6d722SLei Li }, 86349b6d722SLei Li 864a6b30bcaSPeter MaydellSRST 865a6b30bcaSPeter Maydell``ringbuf_read`` *device* 866a6b30bcaSPeter Maydell Read and print up to *size* bytes from ring buffer character 867a6b30bcaSPeter Maydell device *device*. 868a6b30bcaSPeter Maydell Certain non-printable characters are printed ``\uXXXX``, where ``XXXX`` is the 869a6b30bcaSPeter Maydell character code in hexadecimal. Character ``\`` is printed ``\\``. 870a6b30bcaSPeter Maydell Bug: can screw up when the buffer contains invalid UTF-8 sequences, 871a6b30bcaSPeter Maydell NUL characters, after the ring buffer lost data, and when reading 872a6b30bcaSPeter Maydell stops because the size limit is reached. 873a6b30bcaSPeter MaydellERST 87449b6d722SLei Li 87549b6d722SLei Li { 876544f6ea3SDr. David Alan Gilbert .name = "announce_self", 877c6644548SDr. David Alan Gilbert .args_type = "interfaces:s?,id:s?", 878c6644548SDr. David Alan Gilbert .params = "[interfaces] [id]", 879544f6ea3SDr. David Alan Gilbert .help = "Trigger GARP/RARP announcements", 880544f6ea3SDr. David Alan Gilbert .cmd = hmp_announce_self, 881544f6ea3SDr. David Alan Gilbert }, 882544f6ea3SDr. David Alan Gilbert 883a6b30bcaSPeter MaydellSRST 884a6b30bcaSPeter Maydell``announce_self`` 885a6b30bcaSPeter Maydell Trigger a round of GARP/RARP broadcasts; this is useful for explicitly 886a6b30bcaSPeter Maydell updating the network infrastructure after a reconfiguration or some forms 887a6b30bcaSPeter Maydell of migration. The timings of the round are set by the migration announce 888a6b30bcaSPeter Maydell parameters. An optional comma separated *interfaces* list restricts the 889a6b30bcaSPeter Maydell announce to the named set of interfaces. An optional *id* can be used to 890a6b30bcaSPeter Maydell start a separate announce timer and to change the parameters of it later. 891a6b30bcaSPeter MaydellERST 892544f6ea3SDr. David Alan Gilbert 893544f6ea3SDr. David Alan Gilbert { 894d7f9b689SLuiz Capitulino .name = "migrate", 8957a4da28bSPeter Xu .args_type = "detach:-d,blk:-b,inc:-i,resume:-r,uri:s", 8967a4da28bSPeter Xu .params = "[-d] [-b] [-i] [-r] uri", 897fbc3d96cSlirans@il.ibm.com .help = "migrate to URI (using -d to not wait for completion)" 898fbc3d96cSlirans@il.ibm.com "\n\t\t\t -b for migration without shared storage with" 899fbc3d96cSlirans@il.ibm.com " full copy of disk\n\t\t\t -i for migration without " 900fbc3d96cSlirans@il.ibm.com "shared storage with incremental copy of disk " 9017a4da28bSPeter Xu "(base image shared between src and destination)" 9027a4da28bSPeter Xu "\n\t\t\t -r to resume a paused migration", 9032b9e3576SMarc-André Lureau .cmd = hmp_migrate, 904d7f9b689SLuiz Capitulino }, 905d7f9b689SLuiz Capitulino 906fbc3d96cSlirans@il.ibm.com 907a6b30bcaSPeter MaydellSRST 908a6b30bcaSPeter Maydell``migrate [-d] [-b] [-i]`` *uri* 909a6b30bcaSPeter Maydell Migrate to *uri* (using -d to not wait for completion). 910a6b30bcaSPeter Maydell 911a6b30bcaSPeter Maydell ``-b`` 912a6b30bcaSPeter Maydell for migration with full copy of disk 913a6b30bcaSPeter Maydell ``-i`` 914a6b30bcaSPeter Maydell for migration with incremental copy of disk (base image is shared) 915a6b30bcaSPeter MaydellERST 9162313086aSBlue Swirl 917d7f9b689SLuiz Capitulino { 918d7f9b689SLuiz Capitulino .name = "migrate_cancel", 919d7f9b689SLuiz Capitulino .args_type = "", 920d7f9b689SLuiz Capitulino .params = "", 921d7f9b689SLuiz Capitulino .help = "cancel the current VM migration", 9222b9e3576SMarc-André Lureau .cmd = hmp_migrate_cancel, 923d7f9b689SLuiz Capitulino }, 924d7f9b689SLuiz Capitulino 925a6b30bcaSPeter MaydellSRST 926a6b30bcaSPeter Maydell``migrate_cancel`` 927a6b30bcaSPeter Maydell Cancel the current VM migration. 928a6b30bcaSPeter MaydellERST 9299e1ba4ccSOrit Wasserman 93094ae12cbSDr. David Alan Gilbert { 93194ae12cbSDr. David Alan Gilbert .name = "migrate_continue", 93294ae12cbSDr. David Alan Gilbert .args_type = "state:s", 93394ae12cbSDr. David Alan Gilbert .params = "state", 93494ae12cbSDr. David Alan Gilbert .help = "Continue migration from the given paused state", 93594ae12cbSDr. David Alan Gilbert .cmd = hmp_migrate_continue, 93694ae12cbSDr. David Alan Gilbert }, 937a6b30bcaSPeter MaydellSRST 938a6b30bcaSPeter Maydell``migrate_continue`` *state* 939a6b30bcaSPeter Maydell Continue migration from the paused state *state* 940a6b30bcaSPeter MaydellERST 9419e1ba4ccSOrit Wasserman 9429e1ba4ccSOrit Wasserman { 943bf1ae1f4SDr. David Alan Gilbert .name = "migrate_incoming", 944bf1ae1f4SDr. David Alan Gilbert .args_type = "uri:s", 945bf1ae1f4SDr. David Alan Gilbert .params = "uri", 946bf1ae1f4SDr. David Alan Gilbert .help = "Continue an incoming migration from an -incoming defer", 9472b9e3576SMarc-André Lureau .cmd = hmp_migrate_incoming, 948bf1ae1f4SDr. David Alan Gilbert }, 949bf1ae1f4SDr. David Alan Gilbert 950a6b30bcaSPeter MaydellSRST 951a6b30bcaSPeter Maydell``migrate_incoming`` *uri* 952a6b30bcaSPeter Maydell Continue an incoming migration using the *uri* (that has the same syntax 953a6b30bcaSPeter Maydell as the ``-incoming`` option). 954a6b30bcaSPeter MaydellERST 955bf1ae1f4SDr. David Alan Gilbert 9563b563c4bSPeter Xu { 9573b563c4bSPeter Xu .name = "migrate_recover", 9583b563c4bSPeter Xu .args_type = "uri:s", 9593b563c4bSPeter Xu .params = "uri", 9603b563c4bSPeter Xu .help = "Continue a paused incoming postcopy migration", 9613b563c4bSPeter Xu .cmd = hmp_migrate_recover, 9623b563c4bSPeter Xu }, 9633b563c4bSPeter Xu 964a6b30bcaSPeter MaydellSRST 965a6b30bcaSPeter Maydell``migrate_recover`` *uri* 966a6b30bcaSPeter Maydell Continue a paused incoming postcopy migration using the *uri*. 967a6b30bcaSPeter MaydellERST 968bf1ae1f4SDr. David Alan Gilbert 969bf1ae1f4SDr. David Alan Gilbert { 970d37297dcSPeter Xu .name = "migrate_pause", 971d37297dcSPeter Xu .args_type = "", 972d37297dcSPeter Xu .params = "", 973d37297dcSPeter Xu .help = "Pause an ongoing migration (postcopy-only)", 974d37297dcSPeter Xu .cmd = hmp_migrate_pause, 975d37297dcSPeter Xu }, 976d37297dcSPeter Xu 977a6b30bcaSPeter MaydellSRST 978a6b30bcaSPeter Maydell``migrate_pause`` 979a6b30bcaSPeter Maydell Pause an ongoing migration. Currently it only supports postcopy. 980a6b30bcaSPeter MaydellERST 981d37297dcSPeter Xu 982d37297dcSPeter Xu { 98300458433SOrit Wasserman .name = "migrate_set_capability", 98400458433SOrit Wasserman .args_type = "capability:s,state:b", 98500458433SOrit Wasserman .params = "capability state", 98600458433SOrit Wasserman .help = "Enable/Disable the usage of a capability for migration", 9872b9e3576SMarc-André Lureau .cmd = hmp_migrate_set_capability, 988c68a0409SHani Benhabiles .command_completion = migrate_set_capability_completion, 98900458433SOrit Wasserman }, 99000458433SOrit Wasserman 991a6b30bcaSPeter MaydellSRST 992a6b30bcaSPeter Maydell``migrate_set_capability`` *capability* *state* 993a6b30bcaSPeter Maydell Enable/Disable the usage of a capability *capability* for migration. 994a6b30bcaSPeter MaydellERST 99500458433SOrit Wasserman 99600458433SOrit Wasserman { 99750e9a629SLiang Li .name = "migrate_set_parameter", 99869ef1f36SDaniel P. Berrange .args_type = "parameter:s,value:s", 99950e9a629SLiang Li .params = "parameter value", 100050e9a629SLiang Li .help = "Set the parameter for migration", 10012b9e3576SMarc-André Lureau .cmd = hmp_migrate_set_parameter, 100250e9a629SLiang Li .command_completion = migrate_set_parameter_completion, 100350e9a629SLiang Li }, 100450e9a629SLiang Li 1005a6b30bcaSPeter MaydellSRST 1006a6b30bcaSPeter Maydell``migrate_set_parameter`` *parameter* *value* 1007a6b30bcaSPeter Maydell Set the parameter *parameter* for migration. 1008a6b30bcaSPeter MaydellERST 100950e9a629SLiang Li 101050e9a629SLiang Li { 10114886a1bcSDr. David Alan Gilbert .name = "migrate_start_postcopy", 10124886a1bcSDr. David Alan Gilbert .args_type = "", 10134886a1bcSDr. David Alan Gilbert .params = "", 1014a54d340bSDr. David Alan Gilbert .help = "Followup to a migration command to switch the migration" 101532c3db5bSDr. David Alan Gilbert " to postcopy mode. The postcopy-ram capability must " 1016c2eb7f21SGreg Kurz "be set on both source and destination before the " 1017c2eb7f21SGreg Kurz "original migration command .", 10182b9e3576SMarc-André Lureau .cmd = hmp_migrate_start_postcopy, 10194886a1bcSDr. David Alan Gilbert }, 10204886a1bcSDr. David Alan Gilbert 1021a6b30bcaSPeter MaydellSRST 1022a6b30bcaSPeter Maydell``migrate_start_postcopy`` 1023a6b30bcaSPeter Maydell Switch in-progress migration to postcopy mode. Ignored after the end of 1024a6b30bcaSPeter Maydell migration (or once already in postcopy). 1025a6b30bcaSPeter MaydellERST 10264886a1bcSDr. David Alan Gilbert 10274886a1bcSDr. David Alan Gilbert { 1028d89e666eSzhanghailiang .name = "x_colo_lost_heartbeat", 1029d89e666eSzhanghailiang .args_type = "", 1030d89e666eSzhanghailiang .params = "", 1031d89e666eSzhanghailiang .help = "Tell COLO that heartbeat is lost,\n\t\t\t" 1032d89e666eSzhanghailiang "a failover or takeover is needed.", 1033d89e666eSzhanghailiang .cmd = hmp_x_colo_lost_heartbeat, 1034d89e666eSzhanghailiang }, 1035d89e666eSzhanghailiang 1036a6b30bcaSPeter MaydellSRST 1037a6b30bcaSPeter Maydell``x_colo_lost_heartbeat`` 1038a6b30bcaSPeter Maydell Tell COLO that heartbeat is lost, a failover or takeover is needed. 1039a6b30bcaSPeter MaydellERST 1040d89e666eSzhanghailiang 1041d89e666eSzhanghailiang { 10422ea720dbSJes Sorensen .name = "client_migrate_info", 10432ea720dbSJes Sorensen .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?", 10442ea720dbSJes Sorensen .params = "protocol hostname port tls-port cert-subject", 104513cadefbSMarkus Armbruster .help = "set migration information for remote display", 10462b9e3576SMarc-André Lureau .cmd = hmp_client_migrate_info, 1047f8882568SJes Sorensen }, 1048f8882568SJes Sorensen 1049a6b30bcaSPeter MaydellSRST 1050a6b30bcaSPeter Maydell``client_migrate_info`` *protocol* *hostname* *port* *tls-port* *cert-subject* 1051a6b30bcaSPeter Maydell Set migration information for remote display. This makes the server 1052a6b30bcaSPeter Maydell ask the client to automatically reconnect using the new parameters 1053a6b30bcaSPeter Maydell once migration finished successfully. Only implemented for SPICE. 1054a6b30bcaSPeter MaydellERST 1055e866e239SGerd Hoffmann 1056783e9b48SWen Congyang { 1057783e9b48SWen Congyang .name = "dump-guest-memory", 10582da91b54SViktor Prutyanov .args_type = "paging:-p,detach:-d,windmp:-w,zlib:-z,lzo:-l,snappy:-s,filename:F,begin:l?,length:l?", 10592da91b54SViktor Prutyanov .params = "[-p] [-d] [-z|-l|-s|-w] filename [begin length]", 1060c20499d9SQiao Nuohan .help = "dump guest memory into file 'filename'.\n\t\t\t" 1061c20499d9SQiao Nuohan "-p: do paging to get guest's memory mapping.\n\t\t\t" 1062228de9cfSPeter Xu "-d: return immediately (do not wait for completion).\n\t\t\t" 10631b7a0f75SQiao Nuohan "-z: dump in kdump-compressed format, with zlib compression.\n\t\t\t" 10641b7a0f75SQiao Nuohan "-l: dump in kdump-compressed format, with lzo compression.\n\t\t\t" 10651b7a0f75SQiao Nuohan "-s: dump in kdump-compressed format, with snappy compression.\n\t\t\t" 10662da91b54SViktor Prutyanov "-w: dump in Windows crashdump format (can be used instead of ELF-dump converting),\n\t\t\t" 10672da91b54SViktor Prutyanov " for Windows x64 guests with vmcoreinfo driver only.\n\t\t\t" 1068c20499d9SQiao Nuohan "begin: the starting physical address.\n\t\t\t" 1069c20499d9SQiao Nuohan "length: the memory size, in bytes.", 10702b9e3576SMarc-André Lureau .cmd = hmp_dump_guest_memory, 1071783e9b48SWen Congyang }, 1072783e9b48SWen Congyang 1073a6b30bcaSPeter MaydellSRST 1074a6b30bcaSPeter Maydell``dump-guest-memory [-p]`` *filename* *begin* *length* 1075a6b30bcaSPeter Maydell \ 1076a6b30bcaSPeter Maydell``dump-guest-memory [-z|-l|-s|-w]`` *filename* 1077a6b30bcaSPeter Maydell Dump guest memory to *protocol*. The file can be processed with crash or 1078a6b30bcaSPeter Maydell gdb. Without ``-z|-l|-s|-w``, the dump format is ELF. 1079a6b30bcaSPeter Maydell 1080a6b30bcaSPeter Maydell ``-p`` 1081a6b30bcaSPeter Maydell do paging to get guest's memory mapping. 1082a6b30bcaSPeter Maydell ``-z`` 1083a6b30bcaSPeter Maydell dump in kdump-compressed format, with zlib compression. 1084a6b30bcaSPeter Maydell ``-l`` 1085a6b30bcaSPeter Maydell dump in kdump-compressed format, with lzo compression. 1086a6b30bcaSPeter Maydell ``-s`` 1087a6b30bcaSPeter Maydell dump in kdump-compressed format, with snappy compression. 1088a6b30bcaSPeter Maydell ``-w`` 1089a6b30bcaSPeter Maydell dump in Windows crashdump format (can be used instead of ELF-dump converting), 1090a6b30bcaSPeter Maydell for Windows x64 guests with vmcoreinfo driver only 1091a6b30bcaSPeter Maydell *filename* 1092a6b30bcaSPeter Maydell dump file name. 1093a6b30bcaSPeter Maydell *begin* 1094a6b30bcaSPeter Maydell the starting physical address. It's optional, and should be 1095a6b30bcaSPeter Maydell specified together with *length*. 1096a6b30bcaSPeter Maydell *length* 1097a6b30bcaSPeter Maydell the memory size, in bytes. It's optional, and should be specified 1098a6b30bcaSPeter Maydell together with *begin*. 1099a6b30bcaSPeter Maydell 1100a6b30bcaSPeter MaydellERST 1101783e9b48SWen Congyang 1102a4538a5cSJason J. Herne#if defined(TARGET_S390X) 1103a4538a5cSJason J. Herne { 1104a4538a5cSJason J. Herne .name = "dump-skeys", 1105a4538a5cSJason J. Herne .args_type = "filename:F", 1106a4538a5cSJason J. Herne .params = "", 1107a4538a5cSJason J. Herne .help = "Save guest storage keys into file 'filename'.\n", 11082b9e3576SMarc-André Lureau .cmd = hmp_dump_skeys, 1109a4538a5cSJason J. Herne }, 1110a4538a5cSJason J. Herne#endif 1111a4538a5cSJason J. Herne 1112a6b30bcaSPeter MaydellSRST 1113a6b30bcaSPeter Maydell``dump-skeys`` *filename* 1114a6b30bcaSPeter Maydell Save guest storage keys to a file. 1115a6b30bcaSPeter MaydellERST 1116a4538a5cSJason J. Herne 1117f860d497SClaudio Imbrenda#if defined(TARGET_S390X) 1118f860d497SClaudio Imbrenda { 1119f860d497SClaudio Imbrenda .name = "migration_mode", 1120f860d497SClaudio Imbrenda .args_type = "mode:i", 1121f860d497SClaudio Imbrenda .params = "mode", 1122f860d497SClaudio Imbrenda .help = "Enables or disables migration mode\n", 1123f860d497SClaudio Imbrenda .cmd = hmp_migrationmode, 1124f860d497SClaudio Imbrenda }, 1125f860d497SClaudio Imbrenda#endif 1126f860d497SClaudio Imbrenda 1127a6b30bcaSPeter MaydellSRST 1128a6b30bcaSPeter Maydell``migration_mode`` *mode* 1129a6b30bcaSPeter Maydell Enables or disables migration mode. 1130a6b30bcaSPeter MaydellERST 1131f860d497SClaudio Imbrenda 1132e866e239SGerd Hoffmann { 11332ea720dbSJes Sorensen .name = "snapshot_blkdev", 11346cc2a415SPaolo Bonzini .args_type = "reuse:-n,device:B,snapshot-file:s?,format:s?", 11356cc2a415SPaolo Bonzini .params = "[-n] device [new-image-file] [format]", 11362ea720dbSJes Sorensen .help = "initiates a live snapshot\n\t\t\t" 11372ea720dbSJes Sorensen "of device. If a new image file is specified, the\n\t\t\t" 11382ea720dbSJes Sorensen "new image file will become the new root image.\n\t\t\t" 11392ea720dbSJes Sorensen "If format is specified, the snapshot file will\n\t\t\t" 1140775ca88eSWenchao Xia "be created in that format.\n\t\t\t" 11416cc2a415SPaolo Bonzini "The default format is qcow2. The -n flag requests QEMU\n\t\t\t" 11426cc2a415SPaolo Bonzini "to reuse the image found in new-image-file, instead of\n\t\t\t" 11436cc2a415SPaolo Bonzini "recreating it from scratch.", 11442b9e3576SMarc-André Lureau .cmd = hmp_snapshot_blkdev, 1145e866e239SGerd Hoffmann }, 1146e866e239SGerd Hoffmann 1147a6b30bcaSPeter MaydellSRST 1148a6b30bcaSPeter Maydell``snapshot_blkdev`` 1149a6b30bcaSPeter Maydell Snapshot device, using snapshot file as target if provided 1150a6b30bcaSPeter MaydellERST 1151f8882568SJes Sorensen 1152d7f9b689SLuiz Capitulino { 1153775ca88eSWenchao Xia .name = "snapshot_blkdev_internal", 1154775ca88eSWenchao Xia .args_type = "device:B,name:s", 1155775ca88eSWenchao Xia .params = "device name", 1156775ca88eSWenchao Xia .help = "take an internal snapshot of device.\n\t\t\t" 1157775ca88eSWenchao Xia "The format of the image used by device must\n\t\t\t" 1158775ca88eSWenchao Xia "support it, such as qcow2.\n\t\t\t", 11592b9e3576SMarc-André Lureau .cmd = hmp_snapshot_blkdev_internal, 1160775ca88eSWenchao Xia }, 1161775ca88eSWenchao Xia 1162a6b30bcaSPeter MaydellSRST 1163a6b30bcaSPeter Maydell``snapshot_blkdev_internal`` 1164a6b30bcaSPeter Maydell Take an internal snapshot on device if it support 1165a6b30bcaSPeter MaydellERST 1166775ca88eSWenchao Xia 1167775ca88eSWenchao Xia { 11687a4ed2eeSWenchao Xia .name = "snapshot_delete_blkdev_internal", 11697a4ed2eeSWenchao Xia .args_type = "device:B,name:s,id:s?", 11707a4ed2eeSWenchao Xia .params = "device name [id]", 11717a4ed2eeSWenchao Xia .help = "delete an internal snapshot of device.\n\t\t\t" 11727a4ed2eeSWenchao Xia "If id is specified, qemu will try delete\n\t\t\t" 11737a4ed2eeSWenchao Xia "the snapshot matching both id and name.\n\t\t\t" 11747a4ed2eeSWenchao Xia "The format of the image used by device must\n\t\t\t" 11757a4ed2eeSWenchao Xia "support it, such as qcow2.\n\t\t\t", 11762b9e3576SMarc-André Lureau .cmd = hmp_snapshot_delete_blkdev_internal, 11777a4ed2eeSWenchao Xia }, 11787a4ed2eeSWenchao Xia 1179a6b30bcaSPeter MaydellSRST 1180a6b30bcaSPeter Maydell``snapshot_delete_blkdev_internal`` 1181a6b30bcaSPeter Maydell Delete an internal snapshot on device if it support 1182a6b30bcaSPeter MaydellERST 11837a4ed2eeSWenchao Xia 11847a4ed2eeSWenchao Xia { 1185d9b902dbSPaolo Bonzini .name = "drive_mirror", 1186d9b902dbSPaolo Bonzini .args_type = "reuse:-n,full:-f,device:B,target:s,format:s?", 1187d9b902dbSPaolo Bonzini .params = "[-n] [-f] device target [format]", 1188d9b902dbSPaolo Bonzini .help = "initiates live storage\n\t\t\t" 1189d9b902dbSPaolo Bonzini "migration for a device. The device's contents are\n\t\t\t" 1190d9b902dbSPaolo Bonzini "copied to the new image file, including data that\n\t\t\t" 1191d9b902dbSPaolo Bonzini "is written after the command is started.\n\t\t\t" 1192d9b902dbSPaolo Bonzini "The -n flag requests QEMU to reuse the image found\n\t\t\t" 1193d9b902dbSPaolo Bonzini "in new-image-file, instead of recreating it from scratch.\n\t\t\t" 1194d9b902dbSPaolo Bonzini "The -f flag requests QEMU to copy the whole disk,\n\t\t\t" 1195d9b902dbSPaolo Bonzini "so that the result does not need a backing file.\n\t\t\t", 11962b9e3576SMarc-André Lureau .cmd = hmp_drive_mirror, 1197d9b902dbSPaolo Bonzini }, 1198a6b30bcaSPeter MaydellSRST 1199a6b30bcaSPeter Maydell``drive_mirror`` 1200a6b30bcaSPeter Maydell Start mirroring a block device's writes to a new destination, 1201a6b30bcaSPeter Maydell using the specified target. 1202a6b30bcaSPeter MaydellERST 1203d9b902dbSPaolo Bonzini 1204d9b902dbSPaolo Bonzini { 1205de90930aSStefan Hajnoczi .name = "drive_backup", 120613b9414bSPavel Butsykin .args_type = "reuse:-n,full:-f,compress:-c,device:B,target:s,format:s?", 120713b9414bSPavel Butsykin .params = "[-n] [-f] [-c] device target [format]", 1208de90930aSStefan Hajnoczi .help = "initiates a point-in-time\n\t\t\t" 1209de90930aSStefan Hajnoczi "copy for a device. The device's contents are\n\t\t\t" 1210de90930aSStefan Hajnoczi "copied to the new image file, excluding data that\n\t\t\t" 1211de90930aSStefan Hajnoczi "is written after the command is started.\n\t\t\t" 1212de90930aSStefan Hajnoczi "The -n flag requests QEMU to reuse the image found\n\t\t\t" 1213de90930aSStefan Hajnoczi "in new-image-file, instead of recreating it from scratch.\n\t\t\t" 1214de90930aSStefan Hajnoczi "The -f flag requests QEMU to copy the whole disk,\n\t\t\t" 121513b9414bSPavel Butsykin "so that the result does not need a backing file.\n\t\t\t" 121613b9414bSPavel Butsykin "The -c flag requests QEMU to compress backup data\n\t\t\t" 121713b9414bSPavel Butsykin "(if the target format supports it).\n\t\t\t", 12182b9e3576SMarc-André Lureau .cmd = hmp_drive_backup, 1219de90930aSStefan Hajnoczi }, 1220a6b30bcaSPeter MaydellSRST 1221a6b30bcaSPeter Maydell``drive_backup`` 1222e3a6e0daSzhaolichang Start a point-in-time copy of a block device to a specified target. 1223a6b30bcaSPeter MaydellERST 1224de90930aSStefan Hajnoczi 1225de90930aSStefan Hajnoczi { 1226d7f9b689SLuiz Capitulino .name = "drive_add", 1227abb21ac3SKevin Wolf .args_type = "node:-n,pci_addr:s,opts:s", 1228abb21ac3SKevin Wolf .params = "[-n] [[<domain>:]<bus>:]<slot>\n" 12292313086aSBlue Swirl "[file=file][,if=type][,bus=n]\n" 1230fb0490f6SStefan Hajnoczi "[,unit=m][,media=d][,index=i]\n" 1231fb0490f6SStefan Hajnoczi "[,snapshot=on|off][,cache=on|off]\n" 1232fb0490f6SStefan Hajnoczi "[,readonly=on|off][,copy-on-read=on|off]", 1233d7f9b689SLuiz Capitulino .help = "add drive to PCI storage controller", 12342b9e3576SMarc-André Lureau .cmd = hmp_drive_add, 1235d7f9b689SLuiz Capitulino }, 1236d7f9b689SLuiz Capitulino 1237a6b30bcaSPeter MaydellSRST 1238a6b30bcaSPeter Maydell``drive_add`` 1239a6b30bcaSPeter Maydell Add drive to PCI storage controller. 1240a6b30bcaSPeter MaydellERST 12412313086aSBlue Swirl 1242d7f9b689SLuiz Capitulino { 12432ae63bdaSIsaku Yamahata .name = "pcie_aer_inject_error", 12442ae63bdaSIsaku Yamahata .args_type = "advisory_non_fatal:-a,correctable:-c," 12452ae63bdaSIsaku Yamahata "id:s,error_status:s," 12462ae63bdaSIsaku Yamahata "header0:i?,header1:i?,header2:i?,header3:i?," 12472ae63bdaSIsaku Yamahata "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?", 12482ae63bdaSIsaku Yamahata .params = "[-a] [-c] id " 12492ae63bdaSIsaku Yamahata "<error_status> [<tlp header> [<tlp header prefix>]]", 12502ae63bdaSIsaku Yamahata .help = "inject pcie aer error\n\t\t\t" 12512ae63bdaSIsaku Yamahata " -a for advisory non fatal error\n\t\t\t" 12522ae63bdaSIsaku Yamahata " -c for correctable error\n\t\t\t" 12532ae63bdaSIsaku Yamahata "<id> = qdev device id\n\t\t\t" 12542ae63bdaSIsaku Yamahata "<error_status> = error string or 32bit\n\t\t\t" 12558ad4e451SZenghui Yu "<tlp header> = 32bit x 4\n\t\t\t" 12568ad4e451SZenghui Yu "<tlp header prefix> = 32bit x 4", 12572b9e3576SMarc-André Lureau .cmd = hmp_pcie_aer_inject_error, 12582ae63bdaSIsaku Yamahata }, 12592ae63bdaSIsaku Yamahata 1260a6b30bcaSPeter MaydellSRST 1261a6b30bcaSPeter Maydell``pcie_aer_inject_error`` 1262a6b30bcaSPeter Maydell Inject PCIe AER error 1263a6b30bcaSPeter MaydellERST 12642ae63bdaSIsaku Yamahata 12652ae63bdaSIsaku Yamahata { 1266ae82d324SMarkus Armbruster .name = "netdev_add", 1267ae82d324SMarkus Armbruster .args_type = "netdev:O", 126803ce5744SNikolay Nikolaev .params = "[user|tap|socket|vde|bridge|hubport|netmap|vhost-user],id=str[,prop=value][,...]", 1269ae82d324SMarkus Armbruster .help = "add host network device", 12702b9e3576SMarc-André Lureau .cmd = hmp_netdev_add, 1271b162b49aSHani Benhabiles .command_completion = netdev_add_completion, 127248f596c5SPaolo Bonzini .flags = "p", 1273ae82d324SMarkus Armbruster }, 1274ae82d324SMarkus Armbruster 1275a6b30bcaSPeter MaydellSRST 1276a6b30bcaSPeter Maydell``netdev_add`` 1277a6b30bcaSPeter Maydell Add host network device. 1278a6b30bcaSPeter MaydellERST 1279ae82d324SMarkus Armbruster 1280ae82d324SMarkus Armbruster { 1281ae82d324SMarkus Armbruster .name = "netdev_del", 1282ae82d324SMarkus Armbruster .args_type = "id:s", 1283ae82d324SMarkus Armbruster .params = "id", 1284ae82d324SMarkus Armbruster .help = "remove host network device", 12852b9e3576SMarc-André Lureau .cmd = hmp_netdev_del, 128611b389f2SHani Benhabiles .command_completion = netdev_del_completion, 128748f596c5SPaolo Bonzini .flags = "p", 1288ae82d324SMarkus Armbruster }, 1289ae82d324SMarkus Armbruster 1290a6b30bcaSPeter MaydellSRST 1291a6b30bcaSPeter Maydell``netdev_del`` 1292a6b30bcaSPeter Maydell Remove host network device. 1293a6b30bcaSPeter MaydellERST 1294ae82d324SMarkus Armbruster 1295ab2d0531SPaolo Bonzini { 1296cff8b2c6SPaolo Bonzini .name = "object_add", 1297da0a932bSKevin Wolf .args_type = "object:S", 1298cff8b2c6SPaolo Bonzini .params = "[qom-type=]type,id=str[,prop=value][,...]", 1299cff8b2c6SPaolo Bonzini .help = "create QOM object", 13002b9e3576SMarc-André Lureau .cmd = hmp_object_add, 1301bfa40f77SHani Benhabiles .command_completion = object_add_completion, 13029e33013bSPaolo Bonzini .flags = "p", 1303cff8b2c6SPaolo Bonzini }, 1304cff8b2c6SPaolo Bonzini 1305a6b30bcaSPeter MaydellSRST 1306a6b30bcaSPeter Maydell``object_add`` 1307a6b30bcaSPeter Maydell Create QOM object. 1308a6b30bcaSPeter MaydellERST 1309cff8b2c6SPaolo Bonzini 1310cff8b2c6SPaolo Bonzini { 1311ab2d0531SPaolo Bonzini .name = "object_del", 1312ab2d0531SPaolo Bonzini .args_type = "id:s", 1313ab2d0531SPaolo Bonzini .params = "id", 1314ab2d0531SPaolo Bonzini .help = "destroy QOM object", 13152b9e3576SMarc-André Lureau .cmd = hmp_object_del, 1316bfa40f77SHani Benhabiles .command_completion = object_del_completion, 13179e33013bSPaolo Bonzini .flags = "p", 1318ab2d0531SPaolo Bonzini }, 1319ab2d0531SPaolo Bonzini 1320a6b30bcaSPeter MaydellSRST 1321a6b30bcaSPeter Maydell``object_del`` 1322a6b30bcaSPeter Maydell Destroy QOM object. 1323a6b30bcaSPeter MaydellERST 1324ab2d0531SPaolo Bonzini 13252313086aSBlue Swirl#ifdef CONFIG_SLIRP 1326d7f9b689SLuiz Capitulino { 1327d7f9b689SLuiz Capitulino .name = "hostfwd_add", 1328b4983c57SThomas Huth .args_type = "arg1:s,arg2:s?", 1329b4983c57SThomas Huth .params = "[netdev_id] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport", 1330d7f9b689SLuiz Capitulino .help = "redirect TCP or UDP connections from host to guest (requires -net user)", 13312b9e3576SMarc-André Lureau .cmd = hmp_hostfwd_add, 1332d7f9b689SLuiz Capitulino }, 133321413d68SMarkus Armbruster#endif 1334a6b30bcaSPeter MaydellSRST 1335a6b30bcaSPeter Maydell``hostfwd_add`` 1336a6b30bcaSPeter Maydell Redirect TCP or UDP connections from host to guest (requires -net user). 1337a6b30bcaSPeter MaydellERST 1338d7f9b689SLuiz Capitulino 133921413d68SMarkus Armbruster#ifdef CONFIG_SLIRP 1340d7f9b689SLuiz Capitulino { 1341d7f9b689SLuiz Capitulino .name = "hostfwd_remove", 1342b4983c57SThomas Huth .args_type = "arg1:s,arg2:s?", 1343b4983c57SThomas Huth .params = "[netdev_id] [tcp|udp]:[hostaddr]:hostport", 1344d7f9b689SLuiz Capitulino .help = "remove host-to-guest TCP or UDP redirection", 13452b9e3576SMarc-André Lureau .cmd = hmp_hostfwd_remove, 1346d7f9b689SLuiz Capitulino }, 1347d7f9b689SLuiz Capitulino 13482313086aSBlue Swirl#endif 1349a6b30bcaSPeter MaydellSRST 1350a6b30bcaSPeter Maydell``hostfwd_remove`` 1351a6b30bcaSPeter Maydell Remove host-to-guest TCP or UDP redirection. 1352a6b30bcaSPeter MaydellERST 13532313086aSBlue Swirl 1354d7f9b689SLuiz Capitulino { 1355d7f9b689SLuiz Capitulino .name = "balloon", 13563b0bd6ecSLuiz Capitulino .args_type = "value:M", 1357d7f9b689SLuiz Capitulino .params = "target", 13583c05613aSRiccardo Magliocchetti .help = "request VM to change its memory allocation (in MB)", 13592b9e3576SMarc-André Lureau .cmd = hmp_balloon, 1360d7f9b689SLuiz Capitulino }, 1361d7f9b689SLuiz Capitulino 1362a6b30bcaSPeter MaydellSRST 1363a6b30bcaSPeter Maydell``balloon`` *value* 1364a6b30bcaSPeter Maydell Request VM to change its memory allocation to *value* (in MB). 1365a6b30bcaSPeter MaydellERST 13662313086aSBlue Swirl 1367d7f9b689SLuiz Capitulino { 1368d7f9b689SLuiz Capitulino .name = "set_link", 1369c9b26a4cSMarkus Armbruster .args_type = "name:s,up:b", 1370c9b26a4cSMarkus Armbruster .params = "name on|off", 1371d7f9b689SLuiz Capitulino .help = "change the link status of a network adapter", 13722b9e3576SMarc-André Lureau .cmd = hmp_set_link, 137340d19394SHani Benhabiles .command_completion = set_link_completion, 1374d7f9b689SLuiz Capitulino }, 1375d7f9b689SLuiz Capitulino 1376a6b30bcaSPeter MaydellSRST 1377a6b30bcaSPeter Maydell``set_link`` *name* ``[on|off]`` 1378a6b30bcaSPeter Maydell Switch link *name* on (i.e. up) or off (i.e. down). 1379a6b30bcaSPeter MaydellERST 13802313086aSBlue Swirl 1381d7f9b689SLuiz Capitulino { 1382d7f9b689SLuiz Capitulino .name = "watchdog_action", 1383d7f9b689SLuiz Capitulino .args_type = "action:s", 1384d7f9b689SLuiz Capitulino .params = "[reset|shutdown|poweroff|pause|debug|none]", 1385d7f9b689SLuiz Capitulino .help = "change watchdog action", 13862b9e3576SMarc-André Lureau .cmd = hmp_watchdog_action, 1387d0ece345SHani Benhabiles .command_completion = watchdog_action_completion, 1388d7f9b689SLuiz Capitulino }, 1389d7f9b689SLuiz Capitulino 1390a6b30bcaSPeter MaydellSRST 1391a6b30bcaSPeter Maydell``watchdog_action`` 1392a6b30bcaSPeter Maydell Change watchdog action. 1393a6b30bcaSPeter MaydellERST 13942313086aSBlue Swirl 1395d7f9b689SLuiz Capitulino { 13964057725fSPaolo Bonzini .name = "nbd_server_start", 13974057725fSPaolo Bonzini .args_type = "all:-a,writable:-w,uri:s", 13984057725fSPaolo Bonzini .params = "nbd_server_start [-a] [-w] host:port", 13994057725fSPaolo Bonzini .help = "serve block devices on the given host and port", 14002b9e3576SMarc-André Lureau .cmd = hmp_nbd_server_start, 14014057725fSPaolo Bonzini }, 1402a6b30bcaSPeter MaydellSRST 1403a6b30bcaSPeter Maydell``nbd_server_start`` *host*:*port* 1404a6b30bcaSPeter Maydell Start an NBD server on the given host and/or port. If the ``-a`` 1405a6b30bcaSPeter Maydell option is included, all of the virtual machine's block devices that 1406a6b30bcaSPeter Maydell have an inserted media on them are automatically exported; in this case, 1407a6b30bcaSPeter Maydell the ``-w`` option makes the devices writable too. 1408a6b30bcaSPeter MaydellERST 14094057725fSPaolo Bonzini 14104057725fSPaolo Bonzini { 14114057725fSPaolo Bonzini .name = "nbd_server_add", 1412dba49323SEric Blake .args_type = "writable:-w,device:B,name:s?", 1413dba49323SEric Blake .params = "nbd_server_add [-w] device [name]", 14144057725fSPaolo Bonzini .help = "export a block device via NBD", 14152b9e3576SMarc-André Lureau .cmd = hmp_nbd_server_add, 14164057725fSPaolo Bonzini }, 1417a6b30bcaSPeter MaydellSRST 1418a6b30bcaSPeter Maydell``nbd_server_add`` *device* [ *name* ] 1419a6b30bcaSPeter Maydell Export a block device through QEMU's NBD server, which must be started 1420a6b30bcaSPeter Maydell beforehand with ``nbd_server_start``. The ``-w`` option makes the 1421a6b30bcaSPeter Maydell exported device writable too. The export name is controlled by *name*, 1422a6b30bcaSPeter Maydell defaulting to *device*. 1423a6b30bcaSPeter MaydellERST 14244057725fSPaolo Bonzini 14254057725fSPaolo Bonzini { 142608fb10a7SEric Blake .name = "nbd_server_remove", 142708fb10a7SEric Blake .args_type = "force:-f,name:s", 142808fb10a7SEric Blake .params = "nbd_server_remove [-f] name", 142908fb10a7SEric Blake .help = "remove an export previously exposed via NBD", 143008fb10a7SEric Blake .cmd = hmp_nbd_server_remove, 143108fb10a7SEric Blake }, 1432a6b30bcaSPeter MaydellSRST 1433a6b30bcaSPeter Maydell``nbd_server_remove [-f]`` *name* 1434a6b30bcaSPeter Maydell Stop exporting a block device through QEMU's NBD server, which was 1435a6b30bcaSPeter Maydell previously started with ``nbd_server_add``. The ``-f`` 1436a6b30bcaSPeter Maydell option forces the server to drop the export immediately even if 1437a6b30bcaSPeter Maydell clients are connected; otherwise the command fails unless there are no 1438a6b30bcaSPeter Maydell clients. 1439a6b30bcaSPeter MaydellERST 144008fb10a7SEric Blake 144108fb10a7SEric Blake { 14424057725fSPaolo Bonzini .name = "nbd_server_stop", 14434057725fSPaolo Bonzini .args_type = "", 14444057725fSPaolo Bonzini .params = "nbd_server_stop", 14454057725fSPaolo Bonzini .help = "stop serving block devices using the NBD protocol", 14462b9e3576SMarc-André Lureau .cmd = hmp_nbd_server_stop, 14474057725fSPaolo Bonzini }, 1448a6b30bcaSPeter MaydellSRST 1449a6b30bcaSPeter Maydell``nbd_server_stop`` 1450a6b30bcaSPeter Maydell Stop the QEMU embedded NBD server. 1451a6b30bcaSPeter MaydellERST 14524057725fSPaolo Bonzini 14534057725fSPaolo Bonzini 145479c4f6b0SHuang Ying#if defined(TARGET_I386) 1455d7f9b689SLuiz Capitulino 1456d7f9b689SLuiz Capitulino { 1457d7f9b689SLuiz Capitulino .name = "mce", 145831ce5e0cSJin Dongming .args_type = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l", 145931ce5e0cSJin Dongming .params = "[-b] cpu bank status mcgstatus addr misc", 146031ce5e0cSJin Dongming .help = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]", 14612b9e3576SMarc-André Lureau .cmd = hmp_mce, 1462d7f9b689SLuiz Capitulino }, 1463d7f9b689SLuiz Capitulino 146479c4f6b0SHuang Ying#endif 1465a6b30bcaSPeter MaydellSRST 1466a6b30bcaSPeter Maydell``mce`` *cpu* *bank* *status* *mcgstatus* *addr* *misc* 1467a6b30bcaSPeter Maydell Inject an MCE on the given CPU (x86 only). 1468a6b30bcaSPeter MaydellERST 146979c4f6b0SHuang Ying 1470d7f9b689SLuiz Capitulino { 1471d7f9b689SLuiz Capitulino .name = "getfd", 1472d7f9b689SLuiz Capitulino .args_type = "fdname:s", 1473d7f9b689SLuiz Capitulino .params = "getfd name", 1474d7f9b689SLuiz Capitulino .help = "receive a file descriptor via SCM rights and assign it a name", 14752b9e3576SMarc-André Lureau .cmd = hmp_getfd, 1476d7f9b689SLuiz Capitulino }, 1477d7f9b689SLuiz Capitulino 1478a6b30bcaSPeter MaydellSRST 1479a6b30bcaSPeter Maydell``getfd`` *fdname* 1480a6b30bcaSPeter Maydell If a file descriptor is passed alongside this command using the SCM_RIGHTS 1481a6b30bcaSPeter Maydell mechanism on unix sockets, it is stored using the name *fdname* for 1482a6b30bcaSPeter Maydell later use by other monitor commands. 1483a6b30bcaSPeter MaydellERST 1484f07918fdSMark McLoughlin 1485d7f9b689SLuiz Capitulino { 1486d7f9b689SLuiz Capitulino .name = "closefd", 1487d7f9b689SLuiz Capitulino .args_type = "fdname:s", 1488d7f9b689SLuiz Capitulino .params = "closefd name", 1489d7f9b689SLuiz Capitulino .help = "close a file descriptor previously passed via SCM rights", 14902b9e3576SMarc-André Lureau .cmd = hmp_closefd, 1491d7f9b689SLuiz Capitulino }, 1492d7f9b689SLuiz Capitulino 1493a6b30bcaSPeter MaydellSRST 1494a6b30bcaSPeter Maydell``closefd`` *fdname* 1495a6b30bcaSPeter Maydell Close the file descriptor previously assigned to *fdname* using the 1496a6b30bcaSPeter Maydell ``getfd`` command. This is only needed if the file descriptor was never 1497a6b30bcaSPeter Maydell used by another monitor command. 1498a6b30bcaSPeter MaydellERST 1499f07918fdSMark McLoughlin 1500a3a55a2eSLuiz Capitulino { 1501727f005eSZhi Yong Wu .name = "block_set_io_throttle", 1502727f005eSZhi Yong Wu .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l", 1503727f005eSZhi Yong Wu .params = "device bps bps_rd bps_wr iops iops_rd iops_wr", 1504727f005eSZhi Yong Wu .help = "change I/O throttle limits for a block drive", 15052b9e3576SMarc-André Lureau .cmd = hmp_block_set_io_throttle, 1506727f005eSZhi Yong Wu }, 1507727f005eSZhi Yong Wu 1508a6b30bcaSPeter MaydellSRST 1509a6b30bcaSPeter Maydell``block_set_io_throttle`` *device* *bps* *bps_rd* *bps_wr* *iops* *iops_rd* *iops_wr* 1510a6b30bcaSPeter Maydell Change I/O throttle limits for a block drive to 1511a6b30bcaSPeter Maydell *bps* *bps_rd* *bps_wr* *iops* *iops_rd* *iops_wr*. 1512a6b30bcaSPeter Maydell *device* can be a block device name, a qdev ID or a QOM path. 1513a6b30bcaSPeter MaydellERST 1514b40292e7SJan Kiszka 151533572eceSJan Kiszka { 15167572150cSGerd Hoffmann .name = "set_password", 1517*675fd3c9SStefan Reiter .args_type = "protocol:s,password:s,display:-ds,connected:s?", 1518*675fd3c9SStefan Reiter .params = "protocol password [-d display] [action-if-connected]", 15197572150cSGerd Hoffmann .help = "set spice/vnc password", 15202b9e3576SMarc-André Lureau .cmd = hmp_set_password, 15217572150cSGerd Hoffmann }, 15227572150cSGerd Hoffmann 1523a6b30bcaSPeter MaydellSRST 1524*675fd3c9SStefan Reiter``set_password [ vnc | spice ] password [ -d display ] [ action-if-connected ]`` 1525*675fd3c9SStefan Reiter Change spice/vnc password. *display* can be used with 'vnc' to specify 1526*675fd3c9SStefan Reiter which display to set the password on. *action-if-connected* specifies 1527*675fd3c9SStefan Reiter what should happen in case a connection is established: *fail* makes 1528*675fd3c9SStefan Reiter the password change fail. *disconnect* changes the password and 15298982552eSMarkus Armbruster disconnects the client. *keep* changes the password and keeps the 15308982552eSMarkus Armbruster connection up. *keep* is the default. 1531a6b30bcaSPeter MaydellERST 15327572150cSGerd Hoffmann 15337572150cSGerd Hoffmann { 15347572150cSGerd Hoffmann .name = "expire_password", 1535*675fd3c9SStefan Reiter .args_type = "protocol:s,time:s,display:-ds", 1536*675fd3c9SStefan Reiter .params = "protocol time [-d display]", 15377572150cSGerd Hoffmann .help = "set spice/vnc password expire-time", 15382b9e3576SMarc-André Lureau .cmd = hmp_expire_password, 15397572150cSGerd Hoffmann }, 15407572150cSGerd Hoffmann 1541a6b30bcaSPeter MaydellSRST 1542*675fd3c9SStefan Reiter``expire_password [ vnc | spice ] expire-time [ -d display ]`` 1543*675fd3c9SStefan Reiter Specify when a password for spice/vnc becomes invalid. 1544*675fd3c9SStefan Reiter *display* behaves the same as in ``set_password``. 1545*675fd3c9SStefan Reiter *expire-time* accepts: 1546a6b30bcaSPeter Maydell 1547a6b30bcaSPeter Maydell ``now`` 1548a6b30bcaSPeter Maydell Invalidate password instantly. 1549a6b30bcaSPeter Maydell ``never`` 1550a6b30bcaSPeter Maydell Password stays valid forever. 1551a6b30bcaSPeter Maydell ``+``\ *nsec* 1552a6b30bcaSPeter Maydell Password stays valid for *nsec* seconds starting now. 1553a6b30bcaSPeter Maydell *nsec* 1554a6b30bcaSPeter Maydell Password is invalidated at the given time. *nsec* are the seconds 1555a6b30bcaSPeter Maydell passed since 1970, i.e. unix epoch. 1556a6b30bcaSPeter Maydell 1557a6b30bcaSPeter MaydellERST 15587572150cSGerd Hoffmann 155946920825SGerd Hoffmann { 156046920825SGerd Hoffmann .name = "chardev-add", 156146920825SGerd Hoffmann .args_type = "args:s", 156246920825SGerd Hoffmann .params = "args", 156346920825SGerd Hoffmann .help = "add chardev", 15642b9e3576SMarc-André Lureau .cmd = hmp_chardev_add, 156513e315daSHani Benhabiles .command_completion = chardev_add_completion, 156646920825SGerd Hoffmann }, 156746920825SGerd Hoffmann 1568a6b30bcaSPeter MaydellSRST 1569a6b30bcaSPeter Maydell``chardev-add`` *args* 1570a6b30bcaSPeter Maydell chardev-add accepts the same parameters as the -chardev command line switch. 1571a6b30bcaSPeter MaydellERST 157275b60160SAnton Nefedov 157375b60160SAnton Nefedov { 157475b60160SAnton Nefedov .name = "chardev-change", 157575b60160SAnton Nefedov .args_type = "id:s,args:s", 157675b60160SAnton Nefedov .params = "id args", 157775b60160SAnton Nefedov .help = "change chardev", 157875b60160SAnton Nefedov .cmd = hmp_chardev_change, 157975b60160SAnton Nefedov }, 158075b60160SAnton Nefedov 1581a6b30bcaSPeter MaydellSRST 1582a6b30bcaSPeter Maydell``chardev-change`` *args* 1583a6b30bcaSPeter Maydell chardev-change accepts existing chardev *id* and then the same arguments 1584a6b30bcaSPeter Maydell as the -chardev command line switch (except for "id"). 1585a6b30bcaSPeter MaydellERST 158646920825SGerd Hoffmann 158746920825SGerd Hoffmann { 158846920825SGerd Hoffmann .name = "chardev-remove", 158946920825SGerd Hoffmann .args_type = "id:s", 159046920825SGerd Hoffmann .params = "id", 159146920825SGerd Hoffmann .help = "remove chardev", 15922b9e3576SMarc-André Lureau .cmd = hmp_chardev_remove, 15936297d9a2SHani Benhabiles .command_completion = chardev_remove_completion, 159446920825SGerd Hoffmann }, 159546920825SGerd Hoffmann 1596a6b30bcaSPeter MaydellSRST 1597a6b30bcaSPeter Maydell``chardev-remove`` *id* 1598a6b30bcaSPeter Maydell Removes the chardev *id*. 1599a6b30bcaSPeter MaydellERST 1600f1088908SGerd Hoffmann 1601f1088908SGerd Hoffmann { 1602bd1d5ad9SStefan Fritsch .name = "chardev-send-break", 1603bd1d5ad9SStefan Fritsch .args_type = "id:s", 1604bd1d5ad9SStefan Fritsch .params = "id", 1605bd1d5ad9SStefan Fritsch .help = "send a break on chardev", 1606bd1d5ad9SStefan Fritsch .cmd = hmp_chardev_send_break, 1607bd1d5ad9SStefan Fritsch .command_completion = chardev_remove_completion, 1608bd1d5ad9SStefan Fritsch }, 1609bd1d5ad9SStefan Fritsch 1610a6b30bcaSPeter MaydellSRST 1611a6b30bcaSPeter Maydell``chardev-send-break`` *id* 1612a6b30bcaSPeter Maydell Send a break on the chardev *id*. 1613a6b30bcaSPeter MaydellERST 1614bd1d5ad9SStefan Fritsch 1615bd1d5ad9SStefan Fritsch { 1616587da2c3SKevin Wolf .name = "qemu-io", 161789b6fc45SKevin Wolf .args_type = "qdev:-d,device:B,command:s", 161889b6fc45SKevin Wolf .params = "[-d] [device] \"[command]\"", 161989b6fc45SKevin Wolf .help = "run a qemu-io command on a block device\n\t\t\t" 162089b6fc45SKevin Wolf "-d: [device] is a device ID rather than a " 162189b6fc45SKevin Wolf "drive ID or node name", 16222b9e3576SMarc-André Lureau .cmd = hmp_qemu_io, 1623587da2c3SKevin Wolf }, 1624587da2c3SKevin Wolf 1625a6b30bcaSPeter MaydellSRST 1626a6b30bcaSPeter Maydell``qemu-io`` *device* *command* 1627a6b30bcaSPeter Maydell Executes a qemu-io command on the given block device. 1628a6b30bcaSPeter MaydellERST 1629587da2c3SKevin Wolf 1630587da2c3SKevin Wolf { 163189d7fa9eSAndreas Färber .name = "qom-list", 163289d7fa9eSAndreas Färber .args_type = "path:s?", 163389d7fa9eSAndreas Färber .params = "path", 163489d7fa9eSAndreas Färber .help = "list QOM properties", 16352b9e3576SMarc-André Lureau .cmd = hmp_qom_list, 16368c7c7ecbSDr. David Alan Gilbert .flags = "p", 163789d7fa9eSAndreas Färber }, 163889d7fa9eSAndreas Färber 1639a6b30bcaSPeter MaydellSRST 1640a6b30bcaSPeter Maydell``qom-list`` [*path*] 1641a6b30bcaSPeter Maydell Print QOM properties of object at location *path* 1642a6b30bcaSPeter MaydellERST 164389d7fa9eSAndreas Färber 164489d7fa9eSAndreas Färber { 164589cf4fe3SDr. David Alan Gilbert .name = "qom-get", 164689cf4fe3SDr. David Alan Gilbert .args_type = "path:s,property:s", 164789cf4fe3SDr. David Alan Gilbert .params = "path property", 164889cf4fe3SDr. David Alan Gilbert .help = "print QOM property", 164989cf4fe3SDr. David Alan Gilbert .cmd = hmp_qom_get, 165089cf4fe3SDr. David Alan Gilbert .flags = "p", 165189cf4fe3SDr. David Alan Gilbert }, 165289cf4fe3SDr. David Alan Gilbert 165389cf4fe3SDr. David Alan GilbertSRST 165489cf4fe3SDr. David Alan Gilbert``qom-get`` *path* *property* 165589cf4fe3SDr. David Alan Gilbert Print QOM property *property* of object at location *path* 165689cf4fe3SDr. David Alan GilbertERST 165789cf4fe3SDr. David Alan Gilbert 165889cf4fe3SDr. David Alan Gilbert { 1659c0e6ee9eSAndreas Färber .name = "qom-set", 16602d9e3dd9SDavid Hildenbrand .args_type = "json:-j,path:s,property:s,value:S", 16612d9e3dd9SDavid Hildenbrand .params = "[-j] path property value", 16622d9e3dd9SDavid Hildenbrand .help = "set QOM property.\n\t\t\t" 16632d9e3dd9SDavid Hildenbrand "-j: the value is specified in json format.", 16642b9e3576SMarc-André Lureau .cmd = hmp_qom_set, 16658c7c7ecbSDr. David Alan Gilbert .flags = "p", 1666c0e6ee9eSAndreas Färber }, 1667c0e6ee9eSAndreas Färber 1668a6b30bcaSPeter MaydellSRST 1669a6b30bcaSPeter Maydell``qom-set`` *path* *property* *value* 1670a6b30bcaSPeter Maydell Set QOM property *property* of object at location *path* to value *value* 1671a6b30bcaSPeter MaydellERST 1672c0e6ee9eSAndreas Färber 1673c0e6ee9eSAndreas Färber { 1674e7510671SPavel Dovgalyuk .name = "replay_break", 1675ae49ce00SAlex Bennée .args_type = "icount:l", 1676e7510671SPavel Dovgalyuk .params = "icount", 1677e7510671SPavel Dovgalyuk .help = "set breakpoint at the specified instruction count", 1678e7510671SPavel Dovgalyuk .cmd = hmp_replay_break, 1679e7510671SPavel Dovgalyuk }, 1680e7510671SPavel Dovgalyuk 1681e7510671SPavel DovgalyukSRST 1682e7510671SPavel Dovgalyuk``replay_break`` *icount* 1683e7510671SPavel Dovgalyuk Set replay breakpoint at instruction count *icount*. 1684e7510671SPavel Dovgalyuk Execution stops when the specified instruction is reached. 1685e7510671SPavel Dovgalyuk There can be at most one breakpoint. When breakpoint is set, any prior 1686e7510671SPavel Dovgalyuk one is removed. The breakpoint may be set only in replay mode and only 1687e7510671SPavel Dovgalyuk "in the future", i.e. at instruction counts greater than the current one. 1688e7510671SPavel Dovgalyuk The current instruction count can be observed with ``info replay``. 1689e7510671SPavel DovgalyukERST 1690e7510671SPavel Dovgalyuk 1691e7510671SPavel Dovgalyuk { 1692e7510671SPavel Dovgalyuk .name = "replay_delete_break", 1693e7510671SPavel Dovgalyuk .args_type = "", 1694e7510671SPavel Dovgalyuk .params = "", 1695e7510671SPavel Dovgalyuk .help = "remove replay breakpoint", 1696e7510671SPavel Dovgalyuk .cmd = hmp_replay_delete_break, 1697e7510671SPavel Dovgalyuk }, 1698e7510671SPavel Dovgalyuk 1699e7510671SPavel DovgalyukSRST 1700e7510671SPavel Dovgalyuk``replay_delete_break`` 1701e7510671SPavel Dovgalyuk Remove replay breakpoint which was previously set with ``replay_break``. 1702e7510671SPavel Dovgalyuk The command is ignored when there are no replay breakpoints. 1703e7510671SPavel DovgalyukERST 1704e7510671SPavel Dovgalyuk 1705e7510671SPavel Dovgalyuk { 1706f6baed3dSPavel Dovgalyuk .name = "replay_seek", 1707ae49ce00SAlex Bennée .args_type = "icount:l", 1708f6baed3dSPavel Dovgalyuk .params = "icount", 1709f6baed3dSPavel Dovgalyuk .help = "replay execution to the specified instruction count", 1710f6baed3dSPavel Dovgalyuk .cmd = hmp_replay_seek, 1711f6baed3dSPavel Dovgalyuk }, 1712f6baed3dSPavel Dovgalyuk 1713f6baed3dSPavel DovgalyukSRST 1714f6baed3dSPavel Dovgalyuk``replay_seek`` *icount* 1715f6baed3dSPavel Dovgalyuk Automatically proceed to the instruction count *icount*, when 1716f6baed3dSPavel Dovgalyuk replaying the execution. The command automatically loads nearest 1717f6baed3dSPavel Dovgalyuk snapshot and replays the execution to find the desired instruction. 1718f6baed3dSPavel Dovgalyuk When there is no preceding snapshot or the execution is not replayed, 1719f6baed3dSPavel Dovgalyuk then the command fails. 1720f6baed3dSPavel Dovgalyuk *icount* for the reference may be observed with ``info replay`` command. 1721f6baed3dSPavel DovgalyukERST 1722f6baed3dSPavel Dovgalyuk 1723f6baed3dSPavel Dovgalyuk { 172433572eceSJan Kiszka .name = "info", 172533572eceSJan Kiszka .args_type = "item:s?", 172633572eceSJan Kiszka .params = "[subcommand]", 172733572eceSJan Kiszka .help = "show various information about the system state", 17282b9e3576SMarc-André Lureau .cmd = hmp_info_help, 1729a0cd5e1cSKevin Wolf .sub_table = hmp_info_cmds, 17308c7c7ecbSDr. David Alan Gilbert .flags = "p", 173133572eceSJan Kiszka }, 173233572eceSJan Kiszka 1733a4a571d9SPeter XuSRST 1734a4a571d9SPeter Xu``calc_dirty_rate`` *second* 1735a4a571d9SPeter Xu Start a round of dirty rate measurement with the period specified in *second*. 1736a4a571d9SPeter Xu The result of the dirty rate measurement may be observed with ``info 1737a4a571d9SPeter Xu dirty_rate`` command. 1738a4a571d9SPeter XuERST 1739a4a571d9SPeter Xu 1740a4a571d9SPeter Xu { 1741a4a571d9SPeter Xu .name = "calc_dirty_rate", 1742826b8bc8SHyman Huang(黄勇) .args_type = "dirty_ring:-r,dirty_bitmap:-b,second:l,sample_pages_per_GB:l?", 1743826b8bc8SHyman Huang(黄勇) .params = "[-r] [-b] second [sample_pages_per_GB]", 1744826b8bc8SHyman Huang(黄勇) .help = "start a round of guest dirty rate measurement (using -r to" 1745826b8bc8SHyman Huang(黄勇) "\n\t\t\t specify dirty ring as the method of calculation and" 1746826b8bc8SHyman Huang(黄勇) "\n\t\t\t -b to specify dirty bitmap as method of calculation)", 1747a4a571d9SPeter Xu .cmd = hmp_calc_dirty_rate, 1748a4a571d9SPeter Xu }, 1749