hmp-commands.hx 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867
  1. HXCOMM Use DEFHEADING() to define headings in both help text and rST.
  2. HXCOMM Text between SRST and ERST is copied to the rST version and
  3. HXCOMM discarded from C version.
  4. HXCOMM DEF(command, args, callback, arg_string, help) is used to construct
  5. HXCOMM monitor commands
  6. HXCOMM HXCOMM can be used for comments, discarded from both rST and C.
  7. {
  8. .name = "help|?",
  9. .args_type = "name:S?",
  10. .params = "[cmd]",
  11. .help = "show the help",
  12. .cmd = hmp_help,
  13. .flags = "p",
  14. },
  15. SRST
  16. ``help`` or ``?`` [*cmd*]
  17. Show the help for all commands or just for command *cmd*.
  18. ERST
  19. {
  20. .name = "commit",
  21. .args_type = "device:B",
  22. .params = "device|all",
  23. .help = "commit changes to the disk images (if -snapshot is used) or backing files",
  24. .cmd = hmp_commit,
  25. },
  26. SRST
  27. ``commit``
  28. Commit changes to the disk images (if -snapshot is used) or backing files.
  29. If the backing file is smaller than the snapshot, then the backing file
  30. will be resized to be the same size as the snapshot. If the snapshot is
  31. smaller than the backing file, the backing file will not be truncated.
  32. If you want the backing file to match the size of the smaller snapshot,
  33. you can safely truncate it yourself once the commit operation successfully
  34. completes.
  35. ERST
  36. {
  37. .name = "quit|q",
  38. .args_type = "",
  39. .params = "",
  40. .help = "quit the emulator",
  41. .cmd = hmp_quit,
  42. .flags = "p",
  43. },
  44. SRST
  45. ``quit`` or ``q``
  46. Quit the emulator.
  47. ERST
  48. {
  49. .name = "exit_preconfig",
  50. .args_type = "",
  51. .params = "",
  52. .help = "exit the preconfig state",
  53. .cmd = hmp_exit_preconfig,
  54. .flags = "p",
  55. },
  56. SRST
  57. ``exit_preconfig``
  58. This command makes QEMU exit the preconfig state and proceed with
  59. VM initialization using configuration data provided on the command line
  60. and via the QMP monitor during the preconfig state. The command is only
  61. available during the preconfig state (i.e. when the --preconfig command
  62. line option was in use).
  63. ERST
  64. {
  65. .name = "block_resize",
  66. .args_type = "device:B,size:o",
  67. .params = "device size",
  68. .help = "resize a block image",
  69. .cmd = hmp_block_resize,
  70. .coroutine = true,
  71. .flags = "p",
  72. },
  73. SRST
  74. ``block_resize``
  75. Resize a block image while a guest is running. Usually requires guest
  76. action to see the updated size. Resize to a lower size is supported,
  77. but should be used with extreme caution. Note that this command only
  78. resizes image files, it can not resize block devices like LVM volumes.
  79. ERST
  80. {
  81. .name = "block_stream",
  82. .args_type = "device:B,speed:o?,base:s?",
  83. .params = "device [speed [base]]",
  84. .help = "copy data from a backing file into a block device",
  85. .cmd = hmp_block_stream,
  86. .flags = "p",
  87. },
  88. SRST
  89. ``block_stream``
  90. Copy data from a backing file into a block device.
  91. ERST
  92. {
  93. .name = "block_job_set_speed",
  94. .args_type = "device:B,speed:o",
  95. .params = "device speed",
  96. .help = "set maximum speed for a background block operation",
  97. .cmd = hmp_block_job_set_speed,
  98. .flags = "p",
  99. },
  100. SRST
  101. ``block_job_set_speed``
  102. Set maximum speed for a background block operation.
  103. ERST
  104. {
  105. .name = "block_job_cancel",
  106. .args_type = "force:-f,device:B",
  107. .params = "[-f] device",
  108. .help = "stop an active background block operation (use -f"
  109. "\n\t\t\t if you want to abort the operation immediately"
  110. "\n\t\t\t instead of keep running until data is in sync)",
  111. .cmd = hmp_block_job_cancel,
  112. .flags = "p",
  113. },
  114. SRST
  115. ``block_job_cancel``
  116. Stop an active background block operation (streaming, mirroring).
  117. ERST
  118. {
  119. .name = "block_job_complete",
  120. .args_type = "device:B",
  121. .params = "device",
  122. .help = "stop an active background block operation",
  123. .cmd = hmp_block_job_complete,
  124. .flags = "p",
  125. },
  126. SRST
  127. ``block_job_complete``
  128. Manually trigger completion of an active background block operation.
  129. For mirroring, this will switch the device to the destination path.
  130. ERST
  131. {
  132. .name = "block_job_pause",
  133. .args_type = "device:B",
  134. .params = "device",
  135. .help = "pause an active background block operation",
  136. .cmd = hmp_block_job_pause,
  137. .flags = "p",
  138. },
  139. SRST
  140. ``block_job_pause``
  141. Pause an active block streaming operation.
  142. ERST
  143. {
  144. .name = "block_job_resume",
  145. .args_type = "device:B",
  146. .params = "device",
  147. .help = "resume a paused background block operation",
  148. .cmd = hmp_block_job_resume,
  149. .flags = "p",
  150. },
  151. SRST
  152. ``block_job_resume``
  153. Resume a paused block streaming operation.
  154. ERST
  155. {
  156. .name = "eject",
  157. .args_type = "force:-f,device:B",
  158. .params = "[-f] device",
  159. .help = "eject a removable medium (use -f to force it)",
  160. .cmd = hmp_eject,
  161. },
  162. SRST
  163. ``eject [-f]`` *device*
  164. Eject a removable medium (use -f to force it).
  165. ERST
  166. {
  167. .name = "drive_del",
  168. .args_type = "id:B",
  169. .params = "device",
  170. .help = "remove host block device",
  171. .cmd = hmp_drive_del,
  172. },
  173. SRST
  174. ``drive_del`` *device*
  175. Remove host block device. The result is that guest generated IO is no longer
  176. submitted against the host device underlying the disk. Once a drive has
  177. been deleted, the QEMU Block layer returns -EIO which results in IO
  178. errors in the guest for applications that are reading/writing to the device.
  179. These errors are always reported to the guest, regardless of the drive's error
  180. actions (drive options rerror, werror).
  181. ERST
  182. {
  183. .name = "change",
  184. .args_type = "device:B,force:-f,target:F,arg:s?,read-only-mode:s?",
  185. .params = "device [-f] filename [format [read-only-mode]]",
  186. .help = "change a removable medium, optional format, use -f to force the operation",
  187. .cmd = hmp_change,
  188. },
  189. SRST
  190. ``change`` *device* *setting*
  191. Change the configuration of a device.
  192. ``change`` *diskdevice* [-f] *filename* [*format* [*read-only-mode*]]
  193. Change the medium for a removable disk device to point to *filename*. eg::
  194. (qemu) change ide1-cd0 /path/to/some.iso
  195. ``-f``
  196. forces the operation even if the guest has locked the tray.
  197. *format* is optional.
  198. *read-only-mode* may be used to change the read-only status of the device.
  199. It accepts the following values:
  200. retain
  201. Retains the current status; this is the default.
  202. read-only
  203. Makes the device read-only.
  204. read-write
  205. Makes the device writable.
  206. ``change vnc password`` [*password*]
  207. Change the password associated with the VNC server. If the new password
  208. is not supplied, the monitor will prompt for it to be entered. VNC
  209. passwords are only significant up to 8 letters. eg::
  210. (qemu) change vnc password
  211. Password: ********
  212. ERST
  213. {
  214. .name = "screendump",
  215. .args_type = "filename:F,format:-fs,device:s?,head:i?",
  216. .params = "filename [-f format] [device [head]]",
  217. .help = "save screen from head 'head' of display device 'device'"
  218. "in specified format 'format' as image 'filename'."
  219. "Currently only 'png' and 'ppm' formats are supported.",
  220. .cmd = hmp_screendump,
  221. .coroutine = true,
  222. },
  223. SRST
  224. ``screendump`` *filename*
  225. Save screen into PPM image *filename*.
  226. ERST
  227. {
  228. .name = "logfile",
  229. .args_type = "filename:F",
  230. .params = "filename",
  231. .help = "output logs to 'filename'",
  232. .cmd = hmp_logfile,
  233. },
  234. SRST
  235. ``logfile`` *filename*
  236. Output logs to *filename*.
  237. ERST
  238. {
  239. .name = "trace-event",
  240. .args_type = "name:s,option:b,vcpu:i?",
  241. .params = "name on|off [vcpu]",
  242. .help = "changes status of a specific trace event "
  243. "(vcpu: vCPU to set, default is all)",
  244. .cmd = hmp_trace_event,
  245. .command_completion = trace_event_completion,
  246. },
  247. SRST
  248. ``trace-event``
  249. changes status of a trace event
  250. ERST
  251. #if defined(CONFIG_TRACE_SIMPLE)
  252. {
  253. .name = "trace-file",
  254. .args_type = "op:s?,arg:F?",
  255. .params = "on|off|flush|set [arg]",
  256. .help = "open, close, or flush trace file, or set a new file name",
  257. .cmd = hmp_trace_file,
  258. },
  259. SRST
  260. ``trace-file on|off|flush``
  261. Open, close, or flush the trace file. If no argument is given, the
  262. status of the trace file is displayed.
  263. ERST
  264. #endif
  265. {
  266. .name = "log",
  267. .args_type = "items:s",
  268. .params = "item1[,...]",
  269. .help = "activate logging of the specified items",
  270. .cmd = hmp_log,
  271. },
  272. SRST
  273. ``log`` *item1*\ [,...]
  274. Activate logging of the specified items.
  275. ERST
  276. {
  277. .name = "savevm",
  278. .args_type = "name:s?",
  279. .params = "tag",
  280. .help = "save a VM snapshot. If no tag is provided, a new snapshot is created",
  281. .cmd = hmp_savevm,
  282. },
  283. SRST
  284. ``savevm`` *tag*
  285. Create a snapshot of the whole virtual machine. If *tag* is
  286. provided, it is used as human readable identifier. If there is already
  287. a snapshot with the same tag, it is replaced. More info at
  288. :ref:`vm_005fsnapshots`.
  289. Since 4.0, savevm stopped allowing the snapshot id to be set, accepting
  290. only *tag* as parameter.
  291. ERST
  292. {
  293. .name = "loadvm",
  294. .args_type = "name:s",
  295. .params = "tag",
  296. .help = "restore a VM snapshot from its tag",
  297. .cmd = hmp_loadvm,
  298. .command_completion = loadvm_completion,
  299. },
  300. SRST
  301. ``loadvm`` *tag*
  302. Set the whole virtual machine to the snapshot identified by the tag
  303. *tag*.
  304. Since 4.0, loadvm stopped accepting snapshot id as parameter.
  305. ERST
  306. {
  307. .name = "delvm",
  308. .args_type = "name:s",
  309. .params = "tag",
  310. .help = "delete a VM snapshot from its tag",
  311. .cmd = hmp_delvm,
  312. .command_completion = delvm_completion,
  313. },
  314. SRST
  315. ``delvm`` *tag*
  316. Delete the snapshot identified by *tag*.
  317. Since 4.0, delvm stopped deleting snapshots by snapshot id, accepting
  318. only *tag* as parameter.
  319. ERST
  320. {
  321. .name = "one-insn-per-tb",
  322. .args_type = "option:s?",
  323. .params = "[on|off]",
  324. .help = "run emulation with one guest instruction per translation block",
  325. .cmd = hmp_one_insn_per_tb,
  326. },
  327. SRST
  328. ``one-insn-per-tb [off]``
  329. Run the emulation with one guest instruction per translation block.
  330. This slows down emulation a lot, but can be useful in some situations,
  331. such as when trying to analyse the logs produced by the ``-d`` option.
  332. This only has an effect when using TCG, not with KVM or other accelerators.
  333. If called with option off, the emulation returns to normal mode.
  334. ERST
  335. {
  336. .name = "singlestep",
  337. .args_type = "option:s?",
  338. .params = "[on|off]",
  339. .help = "deprecated synonym for one-insn-per-tb",
  340. .cmd = hmp_one_insn_per_tb,
  341. },
  342. SRST
  343. ``singlestep [off]``
  344. This is a deprecated synonym for the one-insn-per-tb command.
  345. ERST
  346. {
  347. .name = "stop|s",
  348. .args_type = "",
  349. .params = "",
  350. .help = "stop emulation",
  351. .cmd = hmp_stop,
  352. },
  353. SRST
  354. ``stop`` or ``s``
  355. Stop emulation.
  356. ERST
  357. {
  358. .name = "cont|c",
  359. .args_type = "",
  360. .params = "",
  361. .help = "resume emulation",
  362. .cmd = hmp_cont,
  363. },
  364. SRST
  365. ``cont`` or ``c``
  366. Resume emulation.
  367. ERST
  368. {
  369. .name = "system_wakeup",
  370. .args_type = "",
  371. .params = "",
  372. .help = "wakeup guest from suspend",
  373. .cmd = hmp_system_wakeup,
  374. },
  375. SRST
  376. ``system_wakeup``
  377. Wakeup guest from suspend.
  378. ERST
  379. {
  380. .name = "gdbserver",
  381. .args_type = "device:s?",
  382. .params = "[device]",
  383. .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
  384. .cmd = hmp_gdbserver,
  385. },
  386. SRST
  387. ``gdbserver`` [*port*]
  388. Start gdbserver session (default *port*\=1234)
  389. ERST
  390. {
  391. .name = "x",
  392. .args_type = "fmt:/,addr:l",
  393. .params = "/fmt addr",
  394. .help = "virtual memory dump starting at 'addr'",
  395. .cmd = hmp_memory_dump,
  396. },
  397. SRST
  398. ``x/``\ *fmt* *addr*
  399. Virtual memory dump starting at *addr*.
  400. ERST
  401. {
  402. .name = "xp",
  403. .args_type = "fmt:/,addr:l",
  404. .params = "/fmt addr",
  405. .help = "physical memory dump starting at 'addr'",
  406. .cmd = hmp_physical_memory_dump,
  407. },
  408. SRST
  409. ``xp /``\ *fmt* *addr*
  410. Physical memory dump starting at *addr*.
  411. *fmt* is a format which tells the command how to format the
  412. data. Its syntax is: ``/{count}{format}{size}``
  413. *count*
  414. is the number of items to be dumped.
  415. *format*
  416. can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
  417. c (char) or i (asm instruction).
  418. *size*
  419. can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
  420. ``h`` or ``w`` can be specified with the ``i`` format to
  421. respectively select 16 or 32 bit code instruction size.
  422. Examples:
  423. Dump 10 instructions at the current instruction pointer::
  424. (qemu) x/10i $eip
  425. 0x90107063: ret
  426. 0x90107064: sti
  427. 0x90107065: lea 0x0(%esi,1),%esi
  428. 0x90107069: lea 0x0(%edi,1),%edi
  429. 0x90107070: ret
  430. 0x90107071: jmp 0x90107080
  431. 0x90107073: nop
  432. 0x90107074: nop
  433. 0x90107075: nop
  434. 0x90107076: nop
  435. Dump 80 16 bit values at the start of the video memory::
  436. (qemu) xp/80hx 0xb8000
  437. 0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
  438. 0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
  439. 0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
  440. 0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
  441. 0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
  442. 0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
  443. 0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
  444. 0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
  445. 0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
  446. 0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
  447. ERST
  448. {
  449. .name = "gpa2hva",
  450. .args_type = "addr:l",
  451. .params = "addr",
  452. .help = "print the host virtual address corresponding to a guest physical address",
  453. .cmd = hmp_gpa2hva,
  454. },
  455. SRST
  456. ``gpa2hva`` *addr*
  457. Print the host virtual address at which the guest's physical address *addr*
  458. is mapped.
  459. ERST
  460. #ifdef CONFIG_LINUX
  461. {
  462. .name = "gpa2hpa",
  463. .args_type = "addr:l",
  464. .params = "addr",
  465. .help = "print the host physical address corresponding to a guest physical address",
  466. .cmd = hmp_gpa2hpa,
  467. },
  468. #endif
  469. SRST
  470. ``gpa2hpa`` *addr*
  471. Print the host physical address at which the guest's physical address *addr*
  472. is mapped.
  473. ERST
  474. {
  475. .name = "gva2gpa",
  476. .args_type = "addr:l",
  477. .params = "addr",
  478. .help = "print the guest physical address corresponding to a guest virtual address",
  479. .cmd = hmp_gva2gpa,
  480. },
  481. SRST
  482. ``gva2gpa`` *addr*
  483. Print the guest physical address at which the guest's virtual address *addr*
  484. is mapped based on the mapping for the current CPU.
  485. ERST
  486. {
  487. .name = "print|p",
  488. .args_type = "fmt:/,val:l",
  489. .params = "/fmt expr",
  490. .help = "print expression value (use $reg for CPU register access)",
  491. .cmd = hmp_print,
  492. },
  493. SRST
  494. ``print`` or ``p/``\ *fmt* *expr*
  495. Print expression value. Only the *format* part of *fmt* is
  496. used.
  497. ERST
  498. {
  499. .name = "i",
  500. .args_type = "fmt:/,addr:i,index:i.",
  501. .params = "/fmt addr",
  502. .help = "I/O port read",
  503. .cmd = hmp_ioport_read,
  504. },
  505. SRST
  506. ``i/``\ *fmt* *addr* [.\ *index*\ ]
  507. Read I/O port.
  508. ERST
  509. {
  510. .name = "o",
  511. .args_type = "fmt:/,addr:i,val:i",
  512. .params = "/fmt addr value",
  513. .help = "I/O port write",
  514. .cmd = hmp_ioport_write,
  515. },
  516. SRST
  517. ``o/``\ *fmt* *addr* *val*
  518. Write to I/O port.
  519. ERST
  520. {
  521. .name = "sendkey",
  522. .args_type = "keys:s,hold-time:i?",
  523. .params = "keys [hold_ms]",
  524. .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
  525. .cmd = hmp_sendkey,
  526. .command_completion = sendkey_completion,
  527. },
  528. SRST
  529. ``sendkey`` *keys*
  530. Send *keys* to the guest. *keys* could be the name of the
  531. key or the raw value in hexadecimal format. Use ``-`` to press
  532. several keys simultaneously. Example::
  533. sendkey ctrl-alt-f1
  534. This command is useful to send keys that your graphical user interface
  535. intercepts at low level, such as ``ctrl-alt-f1`` in X Window.
  536. ERST
  537. {
  538. .name = "sync-profile",
  539. .args_type = "op:s?",
  540. .params = "[on|off|reset]",
  541. .help = "enable, disable or reset synchronization profiling. "
  542. "With no arguments, prints whether profiling is on or off.",
  543. .cmd = hmp_sync_profile,
  544. },
  545. SRST
  546. ``sync-profile [on|off|reset]``
  547. Enable, disable or reset synchronization profiling. With no arguments, prints
  548. whether profiling is on or off.
  549. ERST
  550. {
  551. .name = "system_reset",
  552. .args_type = "",
  553. .params = "",
  554. .help = "reset the system",
  555. .cmd = hmp_system_reset,
  556. },
  557. SRST
  558. ``system_reset``
  559. Reset the system.
  560. ERST
  561. {
  562. .name = "system_powerdown",
  563. .args_type = "",
  564. .params = "",
  565. .help = "send system power down event",
  566. .cmd = hmp_system_powerdown,
  567. },
  568. SRST
  569. ``system_powerdown``
  570. Power down the system (if supported).
  571. ERST
  572. {
  573. .name = "sum",
  574. .args_type = "start:i,size:i",
  575. .params = "addr size",
  576. .help = "compute the checksum of a memory region",
  577. .cmd = hmp_sum,
  578. },
  579. SRST
  580. ``sum`` *addr* *size*
  581. Compute the checksum of a memory region.
  582. ERST
  583. {
  584. .name = "device_add",
  585. .args_type = "device:O",
  586. .params = "driver[,prop=value][,...]",
  587. .help = "add device, like -device on the command line",
  588. .cmd = hmp_device_add,
  589. .command_completion = device_add_completion,
  590. },
  591. SRST
  592. ``device_add`` *config*
  593. Add device.
  594. ERST
  595. {
  596. .name = "device_del",
  597. .args_type = "id:s",
  598. .params = "device",
  599. .help = "remove device",
  600. .cmd = hmp_device_del,
  601. .command_completion = device_del_completion,
  602. },
  603. SRST
  604. ``device_del`` *id*
  605. Remove device *id*. *id* may be a short ID
  606. or a QOM object path.
  607. ERST
  608. {
  609. .name = "cpu",
  610. .args_type = "index:i",
  611. .params = "index",
  612. .help = "set the default CPU",
  613. .cmd = hmp_cpu,
  614. },
  615. SRST
  616. ``cpu`` *index*
  617. Set the default CPU.
  618. ERST
  619. {
  620. .name = "mouse_move",
  621. .args_type = "dx_str:s,dy_str:s,dz_str:s?",
  622. .params = "dx dy [dz]",
  623. .help = "send mouse move events",
  624. .cmd = hmp_mouse_move,
  625. },
  626. SRST
  627. ``mouse_move`` *dx* *dy* [*dz*]
  628. Move the active mouse to the specified coordinates *dx* *dy*
  629. with optional scroll axis *dz*.
  630. ERST
  631. {
  632. .name = "mouse_button",
  633. .args_type = "button_state:i",
  634. .params = "state",
  635. .help = "change mouse button state (1=L, 2=M, 4=R)",
  636. .cmd = hmp_mouse_button,
  637. },
  638. SRST
  639. ``mouse_button`` *val*
  640. Change the active mouse button state *val* (1=L, 2=M, 4=R).
  641. ERST
  642. {
  643. .name = "mouse_set",
  644. .args_type = "index:i",
  645. .params = "index",
  646. .help = "set which mouse device receives events",
  647. .cmd = hmp_mouse_set,
  648. },
  649. SRST
  650. ``mouse_set`` *index*
  651. Set which mouse device receives events at given *index*, index
  652. can be obtained with::
  653. info mice
  654. ERST
  655. {
  656. .name = "wavcapture",
  657. .args_type = "path:F,audiodev:s,freq:i?,bits:i?,nchannels:i?",
  658. .params = "path audiodev [frequency [bits [channels]]]",
  659. .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
  660. .cmd = hmp_wavcapture,
  661. },
  662. SRST
  663. ``wavcapture`` *filename* *audiodev* [*frequency* [*bits* [*channels*]]]
  664. Capture audio into *filename* from *audiodev*, using sample rate
  665. *frequency* bits per sample *bits* and number of channels
  666. *channels*.
  667. Defaults:
  668. - Sample rate = 44100 Hz - CD quality
  669. - Bits = 16
  670. - Number of channels = 2 - Stereo
  671. ERST
  672. {
  673. .name = "stopcapture",
  674. .args_type = "n:i",
  675. .params = "capture index",
  676. .help = "stop capture",
  677. .cmd = hmp_stopcapture,
  678. },
  679. SRST
  680. ``stopcapture`` *index*
  681. Stop capture with a given *index*, index can be obtained with::
  682. info capture
  683. ERST
  684. {
  685. .name = "memsave",
  686. .args_type = "val:l,size:i,filename:s",
  687. .params = "addr size file",
  688. .help = "save to disk virtual memory dump starting at 'addr' of size 'size'",
  689. .cmd = hmp_memsave,
  690. },
  691. SRST
  692. ``memsave`` *addr* *size* *file*
  693. save to disk virtual memory dump starting at *addr* of size *size*.
  694. ERST
  695. {
  696. .name = "pmemsave",
  697. .args_type = "val:l,size:i,filename:s",
  698. .params = "addr size file",
  699. .help = "save to disk physical memory dump starting at 'addr' of size 'size'",
  700. .cmd = hmp_pmemsave,
  701. },
  702. SRST
  703. ``pmemsave`` *addr* *size* *file*
  704. save to disk physical memory dump starting at *addr* of size *size*.
  705. ERST
  706. {
  707. .name = "boot_set",
  708. .args_type = "bootdevice:s",
  709. .params = "bootdevice",
  710. .help = "define new values for the boot device list",
  711. .cmd = hmp_boot_set,
  712. },
  713. SRST
  714. ``boot_set`` *bootdevicelist*
  715. Define new values for the boot device list. Those values will override
  716. the values specified on the command line through the ``-boot`` option.
  717. The values that can be specified here depend on the machine type, but are
  718. the same that can be specified in the ``-boot`` command line option.
  719. ERST
  720. {
  721. .name = "nmi",
  722. .args_type = "",
  723. .params = "",
  724. .help = "inject an NMI",
  725. .cmd = hmp_nmi,
  726. },
  727. SRST
  728. ``nmi`` *cpu*
  729. Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
  730. ERST
  731. {
  732. .name = "ringbuf_write",
  733. .args_type = "device:s,data:s",
  734. .params = "device data",
  735. .help = "Write to a ring buffer character device",
  736. .cmd = hmp_ringbuf_write,
  737. .command_completion = ringbuf_write_completion,
  738. },
  739. SRST
  740. ``ringbuf_write`` *device* *data*
  741. Write *data* to ring buffer character device *device*.
  742. *data* must be a UTF-8 string.
  743. ERST
  744. {
  745. .name = "ringbuf_read",
  746. .args_type = "device:s,size:i",
  747. .params = "device size",
  748. .help = "Read from a ring buffer character device",
  749. .cmd = hmp_ringbuf_read,
  750. .command_completion = ringbuf_write_completion,
  751. },
  752. SRST
  753. ``ringbuf_read`` *device*
  754. Read and print up to *size* bytes from ring buffer character
  755. device *device*.
  756. Certain non-printable characters are printed ``\uXXXX``, where ``XXXX`` is the
  757. character code in hexadecimal. Character ``\`` is printed ``\\``.
  758. Bug: can screw up when the buffer contains invalid UTF-8 sequences,
  759. NUL characters, after the ring buffer lost data, and when reading
  760. stops because the size limit is reached.
  761. ERST
  762. {
  763. .name = "announce_self",
  764. .args_type = "interfaces:s?,id:s?",
  765. .params = "[interfaces] [id]",
  766. .help = "Trigger GARP/RARP announcements",
  767. .cmd = hmp_announce_self,
  768. },
  769. SRST
  770. ``announce_self``
  771. Trigger a round of GARP/RARP broadcasts; this is useful for explicitly
  772. updating the network infrastructure after a reconfiguration or some forms
  773. of migration. The timings of the round are set by the migration announce
  774. parameters. An optional comma separated *interfaces* list restricts the
  775. announce to the named set of interfaces. An optional *id* can be used to
  776. start a separate announce timer and to change the parameters of it later.
  777. ERST
  778. {
  779. .name = "migrate",
  780. .args_type = "detach:-d,blk:-b,inc:-i,resume:-r,uri:s",
  781. .params = "[-d] [-b] [-i] [-r] uri",
  782. .help = "migrate to URI (using -d to not wait for completion)"
  783. "\n\t\t\t -b for migration without shared storage with"
  784. " full copy of disk\n\t\t\t -i for migration without "
  785. "shared storage with incremental copy of disk "
  786. "(base image shared between src and destination)"
  787. "\n\t\t\t -r to resume a paused migration",
  788. .cmd = hmp_migrate,
  789. },
  790. SRST
  791. ``migrate [-d] [-b] [-i]`` *uri*
  792. Migrate to *uri* (using -d to not wait for completion).
  793. ``-b``
  794. for migration with full copy of disk
  795. ``-i``
  796. for migration with incremental copy of disk (base image is shared)
  797. ERST
  798. {
  799. .name = "migrate_cancel",
  800. .args_type = "",
  801. .params = "",
  802. .help = "cancel the current VM migration",
  803. .cmd = hmp_migrate_cancel,
  804. },
  805. SRST
  806. ``migrate_cancel``
  807. Cancel the current VM migration.
  808. ERST
  809. {
  810. .name = "migrate_continue",
  811. .args_type = "state:s",
  812. .params = "state",
  813. .help = "Continue migration from the given paused state",
  814. .cmd = hmp_migrate_continue,
  815. },
  816. SRST
  817. ``migrate_continue`` *state*
  818. Continue migration from the paused state *state*
  819. ERST
  820. {
  821. .name = "migrate_incoming",
  822. .args_type = "uri:s",
  823. .params = "uri",
  824. .help = "Continue an incoming migration from an -incoming defer",
  825. .cmd = hmp_migrate_incoming,
  826. },
  827. SRST
  828. ``migrate_incoming`` *uri*
  829. Continue an incoming migration using the *uri* (that has the same syntax
  830. as the ``-incoming`` option).
  831. ERST
  832. {
  833. .name = "migrate_recover",
  834. .args_type = "uri:s",
  835. .params = "uri",
  836. .help = "Continue a paused incoming postcopy migration",
  837. .cmd = hmp_migrate_recover,
  838. },
  839. SRST
  840. ``migrate_recover`` *uri*
  841. Continue a paused incoming postcopy migration using the *uri*.
  842. ERST
  843. {
  844. .name = "migrate_pause",
  845. .args_type = "",
  846. .params = "",
  847. .help = "Pause an ongoing migration (postcopy-only)",
  848. .cmd = hmp_migrate_pause,
  849. },
  850. SRST
  851. ``migrate_pause``
  852. Pause an ongoing migration. Currently it only supports postcopy.
  853. ERST
  854. {
  855. .name = "migrate_set_capability",
  856. .args_type = "capability:s,state:b",
  857. .params = "capability state",
  858. .help = "Enable/Disable the usage of a capability for migration",
  859. .cmd = hmp_migrate_set_capability,
  860. .command_completion = migrate_set_capability_completion,
  861. },
  862. SRST
  863. ``migrate_set_capability`` *capability* *state*
  864. Enable/Disable the usage of a capability *capability* for migration.
  865. ERST
  866. {
  867. .name = "migrate_set_parameter",
  868. .args_type = "parameter:s,value:s",
  869. .params = "parameter value",
  870. .help = "Set the parameter for migration",
  871. .cmd = hmp_migrate_set_parameter,
  872. .command_completion = migrate_set_parameter_completion,
  873. },
  874. SRST
  875. ``migrate_set_parameter`` *parameter* *value*
  876. Set the parameter *parameter* for migration.
  877. ERST
  878. {
  879. .name = "migrate_start_postcopy",
  880. .args_type = "",
  881. .params = "",
  882. .help = "Followup to a migration command to switch the migration"
  883. " to postcopy mode. The postcopy-ram capability must "
  884. "be set on both source and destination before the "
  885. "original migration command .",
  886. .cmd = hmp_migrate_start_postcopy,
  887. },
  888. SRST
  889. ``migrate_start_postcopy``
  890. Switch in-progress migration to postcopy mode. Ignored after the end of
  891. migration (or once already in postcopy).
  892. ERST
  893. #ifdef CONFIG_REPLICATION
  894. {
  895. .name = "x_colo_lost_heartbeat",
  896. .args_type = "",
  897. .params = "",
  898. .help = "Tell COLO that heartbeat is lost,\n\t\t\t"
  899. "a failover or takeover is needed.",
  900. .cmd = hmp_x_colo_lost_heartbeat,
  901. },
  902. #endif
  903. SRST
  904. ``x_colo_lost_heartbeat``
  905. Tell COLO that heartbeat is lost, a failover or takeover is needed.
  906. ERST
  907. {
  908. .name = "client_migrate_info",
  909. .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
  910. .params = "protocol hostname port tls-port cert-subject",
  911. .help = "set migration information for remote display",
  912. .cmd = hmp_client_migrate_info,
  913. },
  914. SRST
  915. ``client_migrate_info`` *protocol* *hostname* *port* *tls-port* *cert-subject*
  916. Set migration information for remote display. This makes the server
  917. ask the client to automatically reconnect using the new parameters
  918. once migration finished successfully. Only implemented for SPICE.
  919. ERST
  920. {
  921. .name = "dump-guest-memory",
  922. .args_type = "paging:-p,detach:-d,windmp:-w,zlib:-z,lzo:-l,snappy:-s,filename:F,begin:l?,length:l?",
  923. .params = "[-p] [-d] [-z|-l|-s|-w] filename [begin length]",
  924. .help = "dump guest memory into file 'filename'.\n\t\t\t"
  925. "-p: do paging to get guest's memory mapping.\n\t\t\t"
  926. "-d: return immediately (do not wait for completion).\n\t\t\t"
  927. "-z: dump in kdump-compressed format, with zlib compression.\n\t\t\t"
  928. "-l: dump in kdump-compressed format, with lzo compression.\n\t\t\t"
  929. "-s: dump in kdump-compressed format, with snappy compression.\n\t\t\t"
  930. "-w: dump in Windows crashdump format (can be used instead of ELF-dump converting),\n\t\t\t"
  931. " for Windows x86 and x64 guests with vmcoreinfo driver only.\n\t\t\t"
  932. "begin: the starting physical address.\n\t\t\t"
  933. "length: the memory size, in bytes.",
  934. .cmd = hmp_dump_guest_memory,
  935. },
  936. SRST
  937. ``dump-guest-memory [-p]`` *filename* *begin* *length*
  938. \
  939. ``dump-guest-memory [-z|-l|-s|-w]`` *filename*
  940. Dump guest memory to *protocol*. The file can be processed with crash or
  941. gdb. Without ``-z|-l|-s|-w``, the dump format is ELF.
  942. ``-p``
  943. do paging to get guest's memory mapping.
  944. ``-z``
  945. dump in kdump-compressed format, with zlib compression.
  946. ``-l``
  947. dump in kdump-compressed format, with lzo compression.
  948. ``-s``
  949. dump in kdump-compressed format, with snappy compression.
  950. ``-w``
  951. dump in Windows crashdump format (can be used instead of ELF-dump converting),
  952. for Windows x64 guests with vmcoreinfo driver only
  953. *filename*
  954. dump file name.
  955. *begin*
  956. the starting physical address. It's optional, and should be
  957. specified together with *length*.
  958. *length*
  959. the memory size, in bytes. It's optional, and should be specified
  960. together with *begin*.
  961. ERST
  962. #if defined(TARGET_S390X)
  963. {
  964. .name = "dump-skeys",
  965. .args_type = "filename:F",
  966. .params = "",
  967. .help = "Save guest storage keys into file 'filename'.\n",
  968. .cmd = hmp_dump_skeys,
  969. },
  970. #endif
  971. SRST
  972. ``dump-skeys`` *filename*
  973. Save guest storage keys to a file.
  974. ERST
  975. #if defined(TARGET_S390X)
  976. {
  977. .name = "migration_mode",
  978. .args_type = "mode:i",
  979. .params = "mode",
  980. .help = "Enables or disables migration mode\n",
  981. .cmd = hmp_migrationmode,
  982. },
  983. #endif
  984. SRST
  985. ``migration_mode`` *mode*
  986. Enables or disables migration mode.
  987. ERST
  988. {
  989. .name = "snapshot_blkdev",
  990. .args_type = "reuse:-n,device:B,snapshot-file:s?,format:s?",
  991. .params = "[-n] device [new-image-file] [format]",
  992. .help = "initiates a live snapshot\n\t\t\t"
  993. "of device. If a new image file is specified, the\n\t\t\t"
  994. "new image file will become the new root image.\n\t\t\t"
  995. "If format is specified, the snapshot file will\n\t\t\t"
  996. "be created in that format.\n\t\t\t"
  997. "The default format is qcow2. The -n flag requests QEMU\n\t\t\t"
  998. "to reuse the image found in new-image-file, instead of\n\t\t\t"
  999. "recreating it from scratch.",
  1000. .cmd = hmp_snapshot_blkdev,
  1001. },
  1002. SRST
  1003. ``snapshot_blkdev``
  1004. Snapshot device, using snapshot file as target if provided
  1005. ERST
  1006. {
  1007. .name = "snapshot_blkdev_internal",
  1008. .args_type = "device:B,name:s",
  1009. .params = "device name",
  1010. .help = "take an internal snapshot of device.\n\t\t\t"
  1011. "The format of the image used by device must\n\t\t\t"
  1012. "support it, such as qcow2.\n\t\t\t",
  1013. .cmd = hmp_snapshot_blkdev_internal,
  1014. },
  1015. SRST
  1016. ``snapshot_blkdev_internal``
  1017. Take an internal snapshot on device if it support
  1018. ERST
  1019. {
  1020. .name = "snapshot_delete_blkdev_internal",
  1021. .args_type = "device:B,name:s,id:s?",
  1022. .params = "device name [id]",
  1023. .help = "delete an internal snapshot of device.\n\t\t\t"
  1024. "If id is specified, qemu will try delete\n\t\t\t"
  1025. "the snapshot matching both id and name.\n\t\t\t"
  1026. "The format of the image used by device must\n\t\t\t"
  1027. "support it, such as qcow2.\n\t\t\t",
  1028. .cmd = hmp_snapshot_delete_blkdev_internal,
  1029. },
  1030. SRST
  1031. ``snapshot_delete_blkdev_internal``
  1032. Delete an internal snapshot on device if it support
  1033. ERST
  1034. {
  1035. .name = "drive_mirror",
  1036. .args_type = "reuse:-n,full:-f,device:B,target:s,format:s?",
  1037. .params = "[-n] [-f] device target [format]",
  1038. .help = "initiates live storage\n\t\t\t"
  1039. "migration for a device. The device's contents are\n\t\t\t"
  1040. "copied to the new image file, including data that\n\t\t\t"
  1041. "is written after the command is started.\n\t\t\t"
  1042. "The -n flag requests QEMU to reuse the image found\n\t\t\t"
  1043. "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
  1044. "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
  1045. "so that the result does not need a backing file.\n\t\t\t",
  1046. .cmd = hmp_drive_mirror,
  1047. },
  1048. SRST
  1049. ``drive_mirror``
  1050. Start mirroring a block device's writes to a new destination,
  1051. using the specified target.
  1052. ERST
  1053. {
  1054. .name = "drive_backup",
  1055. .args_type = "reuse:-n,full:-f,compress:-c,device:B,target:s,format:s?",
  1056. .params = "[-n] [-f] [-c] device target [format]",
  1057. .help = "initiates a point-in-time\n\t\t\t"
  1058. "copy for a device. The device's contents are\n\t\t\t"
  1059. "copied to the new image file, excluding data that\n\t\t\t"
  1060. "is written after the command is started.\n\t\t\t"
  1061. "The -n flag requests QEMU to reuse the image found\n\t\t\t"
  1062. "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
  1063. "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
  1064. "so that the result does not need a backing file.\n\t\t\t"
  1065. "The -c flag requests QEMU to compress backup data\n\t\t\t"
  1066. "(if the target format supports it).\n\t\t\t",
  1067. .cmd = hmp_drive_backup,
  1068. },
  1069. SRST
  1070. ``drive_backup``
  1071. Start a point-in-time copy of a block device to a specified target.
  1072. ERST
  1073. {
  1074. .name = "drive_add",
  1075. .args_type = "node:-n,pci_addr:s,opts:s",
  1076. .params = "[-n] [[<domain>:]<bus>:]<slot>\n"
  1077. "[file=file][,if=type][,bus=n]\n"
  1078. "[,unit=m][,media=d][,index=i]\n"
  1079. "[,snapshot=on|off][,cache=on|off]\n"
  1080. "[,readonly=on|off][,copy-on-read=on|off]",
  1081. .help = "add drive to PCI storage controller",
  1082. .cmd = hmp_drive_add,
  1083. },
  1084. SRST
  1085. ``drive_add``
  1086. Add drive to PCI storage controller.
  1087. ERST
  1088. {
  1089. .name = "pcie_aer_inject_error",
  1090. .args_type = "advisory_non_fatal:-a,correctable:-c,"
  1091. "id:s,error_status:s,"
  1092. "header0:i?,header1:i?,header2:i?,header3:i?,"
  1093. "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
  1094. .params = "[-a] [-c] id "
  1095. "<error_status> [<tlp header> [<tlp header prefix>]]",
  1096. .help = "inject pcie aer error\n\t\t\t"
  1097. " -a for advisory non fatal error\n\t\t\t"
  1098. " -c for correctable error\n\t\t\t"
  1099. "<id> = qdev device id\n\t\t\t"
  1100. "<error_status> = error string or 32bit\n\t\t\t"
  1101. "<tlp header> = 32bit x 4\n\t\t\t"
  1102. "<tlp header prefix> = 32bit x 4",
  1103. .cmd = hmp_pcie_aer_inject_error,
  1104. },
  1105. SRST
  1106. ``pcie_aer_inject_error``
  1107. Inject PCIe AER error
  1108. ERST
  1109. {
  1110. .name = "netdev_add",
  1111. .args_type = "netdev:O",
  1112. .params = "[user|tap|socket|stream|dgram|vde|bridge|hubport|netmap|vhost-user"
  1113. #ifdef CONFIG_VMNET
  1114. "|vmnet-host|vmnet-shared|vmnet-bridged"
  1115. #endif
  1116. "],id=str[,prop=value][,...]",
  1117. .help = "add host network device",
  1118. .cmd = hmp_netdev_add,
  1119. .command_completion = netdev_add_completion,
  1120. .flags = "p",
  1121. },
  1122. SRST
  1123. ``netdev_add``
  1124. Add host network device.
  1125. ERST
  1126. {
  1127. .name = "netdev_del",
  1128. .args_type = "id:s",
  1129. .params = "id",
  1130. .help = "remove host network device",
  1131. .cmd = hmp_netdev_del,
  1132. .command_completion = netdev_del_completion,
  1133. .flags = "p",
  1134. },
  1135. SRST
  1136. ``netdev_del``
  1137. Remove host network device.
  1138. ERST
  1139. {
  1140. .name = "object_add",
  1141. .args_type = "object:S",
  1142. .params = "[qom-type=]type,id=str[,prop=value][,...]",
  1143. .help = "create QOM object",
  1144. .cmd = hmp_object_add,
  1145. .command_completion = object_add_completion,
  1146. .flags = "p",
  1147. },
  1148. SRST
  1149. ``object_add``
  1150. Create QOM object.
  1151. ERST
  1152. {
  1153. .name = "object_del",
  1154. .args_type = "id:s",
  1155. .params = "id",
  1156. .help = "destroy QOM object",
  1157. .cmd = hmp_object_del,
  1158. .command_completion = object_del_completion,
  1159. .flags = "p",
  1160. },
  1161. SRST
  1162. ``object_del``
  1163. Destroy QOM object.
  1164. ERST
  1165. #ifdef CONFIG_SLIRP
  1166. {
  1167. .name = "hostfwd_add",
  1168. .args_type = "arg1:s,arg2:s?",
  1169. .params = "[netdev_id] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
  1170. .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
  1171. .cmd = hmp_hostfwd_add,
  1172. },
  1173. #endif
  1174. SRST
  1175. ``hostfwd_add``
  1176. Redirect TCP or UDP connections from host to guest (requires -net user).
  1177. ERST
  1178. #ifdef CONFIG_SLIRP
  1179. {
  1180. .name = "hostfwd_remove",
  1181. .args_type = "arg1:s,arg2:s?",
  1182. .params = "[netdev_id] [tcp|udp]:[hostaddr]:hostport",
  1183. .help = "remove host-to-guest TCP or UDP redirection",
  1184. .cmd = hmp_hostfwd_remove,
  1185. },
  1186. #endif
  1187. SRST
  1188. ``hostfwd_remove``
  1189. Remove host-to-guest TCP or UDP redirection.
  1190. ERST
  1191. {
  1192. .name = "balloon",
  1193. .args_type = "value:M",
  1194. .params = "target",
  1195. .help = "request VM to change its memory allocation (in MB)",
  1196. .cmd = hmp_balloon,
  1197. },
  1198. SRST
  1199. ``balloon`` *value*
  1200. Request VM to change its memory allocation to *value* (in MB).
  1201. ERST
  1202. {
  1203. .name = "set_link",
  1204. .args_type = "name:s,up:b",
  1205. .params = "name on|off",
  1206. .help = "change the link status of a network adapter",
  1207. .cmd = hmp_set_link,
  1208. .command_completion = set_link_completion,
  1209. },
  1210. SRST
  1211. ``set_link`` *name* ``[on|off]``
  1212. Switch link *name* on (i.e. up) or off (i.e. down).
  1213. ERST
  1214. {
  1215. .name = "watchdog_action",
  1216. .args_type = "action:s",
  1217. .params = "[reset|shutdown|poweroff|pause|debug|none]",
  1218. .help = "change watchdog action",
  1219. .cmd = hmp_watchdog_action,
  1220. .command_completion = watchdog_action_completion,
  1221. },
  1222. SRST
  1223. ``watchdog_action``
  1224. Change watchdog action.
  1225. ERST
  1226. {
  1227. .name = "nbd_server_start",
  1228. .args_type = "all:-a,writable:-w,uri:s",
  1229. .params = "nbd_server_start [-a] [-w] host:port",
  1230. .help = "serve block devices on the given host and port",
  1231. .cmd = hmp_nbd_server_start,
  1232. .flags = "p",
  1233. },
  1234. SRST
  1235. ``nbd_server_start`` *host*:*port*
  1236. Start an NBD server on the given host and/or port. If the ``-a``
  1237. option is included, all of the virtual machine's block devices that
  1238. have an inserted media on them are automatically exported; in this case,
  1239. the ``-w`` option makes the devices writable too.
  1240. ERST
  1241. {
  1242. .name = "nbd_server_add",
  1243. .args_type = "writable:-w,device:B,name:s?",
  1244. .params = "nbd_server_add [-w] device [name]",
  1245. .help = "export a block device via NBD",
  1246. .cmd = hmp_nbd_server_add,
  1247. .flags = "p",
  1248. },
  1249. SRST
  1250. ``nbd_server_add`` *device* [ *name* ]
  1251. Export a block device through QEMU's NBD server, which must be started
  1252. beforehand with ``nbd_server_start``. The ``-w`` option makes the
  1253. exported device writable too. The export name is controlled by *name*,
  1254. defaulting to *device*.
  1255. ERST
  1256. {
  1257. .name = "nbd_server_remove",
  1258. .args_type = "force:-f,name:s",
  1259. .params = "nbd_server_remove [-f] name",
  1260. .help = "remove an export previously exposed via NBD",
  1261. .cmd = hmp_nbd_server_remove,
  1262. .flags = "p",
  1263. },
  1264. SRST
  1265. ``nbd_server_remove [-f]`` *name*
  1266. Stop exporting a block device through QEMU's NBD server, which was
  1267. previously started with ``nbd_server_add``. The ``-f``
  1268. option forces the server to drop the export immediately even if
  1269. clients are connected; otherwise the command fails unless there are no
  1270. clients.
  1271. ERST
  1272. {
  1273. .name = "nbd_server_stop",
  1274. .args_type = "",
  1275. .params = "nbd_server_stop",
  1276. .help = "stop serving block devices using the NBD protocol",
  1277. .cmd = hmp_nbd_server_stop,
  1278. .flags = "p",
  1279. },
  1280. SRST
  1281. ``nbd_server_stop``
  1282. Stop the QEMU embedded NBD server.
  1283. ERST
  1284. #if defined(TARGET_I386)
  1285. {
  1286. .name = "mce",
  1287. .args_type = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
  1288. .params = "[-b] cpu bank status mcgstatus addr misc",
  1289. .help = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
  1290. .cmd = hmp_mce,
  1291. },
  1292. #endif
  1293. SRST
  1294. ``mce`` *cpu* *bank* *status* *mcgstatus* *addr* *misc*
  1295. Inject an MCE on the given CPU (x86 only).
  1296. ERST
  1297. #ifdef CONFIG_POSIX
  1298. {
  1299. .name = "getfd",
  1300. .args_type = "fdname:s",
  1301. .params = "getfd name",
  1302. .help = "receive a file descriptor via SCM rights and assign it a name",
  1303. .cmd = hmp_getfd,
  1304. .flags = "p",
  1305. },
  1306. SRST
  1307. ``getfd`` *fdname*
  1308. If a file descriptor is passed alongside this command using the SCM_RIGHTS
  1309. mechanism on unix sockets, it is stored using the name *fdname* for
  1310. later use by other monitor commands.
  1311. ERST
  1312. #endif
  1313. {
  1314. .name = "closefd",
  1315. .args_type = "fdname:s",
  1316. .params = "closefd name",
  1317. .help = "close a file descriptor previously passed via SCM rights",
  1318. .cmd = hmp_closefd,
  1319. .flags = "p",
  1320. },
  1321. SRST
  1322. ``closefd`` *fdname*
  1323. Close the file descriptor previously assigned to *fdname* using the
  1324. ``getfd`` command. This is only needed if the file descriptor was never
  1325. used by another monitor command.
  1326. ERST
  1327. {
  1328. .name = "block_set_io_throttle",
  1329. .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
  1330. .params = "device bps bps_rd bps_wr iops iops_rd iops_wr",
  1331. .help = "change I/O throttle limits for a block drive",
  1332. .cmd = hmp_block_set_io_throttle,
  1333. .flags = "p",
  1334. },
  1335. SRST
  1336. ``block_set_io_throttle`` *device* *bps* *bps_rd* *bps_wr* *iops* *iops_rd* *iops_wr*
  1337. Change I/O throttle limits for a block drive to
  1338. *bps* *bps_rd* *bps_wr* *iops* *iops_rd* *iops_wr*.
  1339. *device* can be a block device name, a qdev ID or a QOM path.
  1340. ERST
  1341. {
  1342. .name = "set_password",
  1343. .args_type = "protocol:s,password:s,display:-ds,connected:s?",
  1344. .params = "protocol password [-d display] [action-if-connected]",
  1345. .help = "set spice/vnc password",
  1346. .cmd = hmp_set_password,
  1347. },
  1348. SRST
  1349. ``set_password [ vnc | spice ] password [ -d display ] [ action-if-connected ]``
  1350. Change spice/vnc password. *display* can be used with 'vnc' to specify
  1351. which display to set the password on. *action-if-connected* specifies
  1352. what should happen in case a connection is established: *fail* makes
  1353. the password change fail. *disconnect* changes the password and
  1354. disconnects the client. *keep* changes the password and keeps the
  1355. connection up. *keep* is the default.
  1356. ERST
  1357. {
  1358. .name = "expire_password",
  1359. .args_type = "protocol:s,time:s,display:-ds",
  1360. .params = "protocol time [-d display]",
  1361. .help = "set spice/vnc password expire-time",
  1362. .cmd = hmp_expire_password,
  1363. },
  1364. SRST
  1365. ``expire_password [ vnc | spice ] expire-time [ -d display ]``
  1366. Specify when a password for spice/vnc becomes invalid.
  1367. *display* behaves the same as in ``set_password``.
  1368. *expire-time* accepts:
  1369. ``now``
  1370. Invalidate password instantly.
  1371. ``never``
  1372. Password stays valid forever.
  1373. ``+``\ *nsec*
  1374. Password stays valid for *nsec* seconds starting now.
  1375. *nsec*
  1376. Password is invalidated at the given time. *nsec* are the seconds
  1377. passed since 1970, i.e. unix epoch.
  1378. ERST
  1379. {
  1380. .name = "chardev-add",
  1381. .args_type = "args:s",
  1382. .params = "args",
  1383. .help = "add chardev",
  1384. .cmd = hmp_chardev_add,
  1385. .command_completion = chardev_add_completion,
  1386. },
  1387. SRST
  1388. ``chardev-add`` *args*
  1389. chardev-add accepts the same parameters as the -chardev command line switch.
  1390. ERST
  1391. {
  1392. .name = "chardev-change",
  1393. .args_type = "id:s,args:s",
  1394. .params = "id args",
  1395. .help = "change chardev",
  1396. .cmd = hmp_chardev_change,
  1397. },
  1398. SRST
  1399. ``chardev-change`` *args*
  1400. chardev-change accepts existing chardev *id* and then the same arguments
  1401. as the -chardev command line switch (except for "id").
  1402. ERST
  1403. {
  1404. .name = "chardev-remove",
  1405. .args_type = "id:s",
  1406. .params = "id",
  1407. .help = "remove chardev",
  1408. .cmd = hmp_chardev_remove,
  1409. .command_completion = chardev_remove_completion,
  1410. },
  1411. SRST
  1412. ``chardev-remove`` *id*
  1413. Removes the chardev *id*.
  1414. ERST
  1415. {
  1416. .name = "chardev-send-break",
  1417. .args_type = "id:s",
  1418. .params = "id",
  1419. .help = "send a break on chardev",
  1420. .cmd = hmp_chardev_send_break,
  1421. .command_completion = chardev_remove_completion,
  1422. },
  1423. SRST
  1424. ``chardev-send-break`` *id*
  1425. Send a break on the chardev *id*.
  1426. ERST
  1427. {
  1428. .name = "qemu-io",
  1429. .args_type = "qdev:-d,device:B,command:s",
  1430. .params = "[-d] [device] \"[command]\"",
  1431. .help = "run a qemu-io command on a block device\n\t\t\t"
  1432. "-d: [device] is a device ID rather than a "
  1433. "drive ID or node name",
  1434. .cmd = hmp_qemu_io,
  1435. },
  1436. SRST
  1437. ``qemu-io`` *device* *command*
  1438. Executes a qemu-io command on the given block device.
  1439. ERST
  1440. {
  1441. .name = "qom-list",
  1442. .args_type = "path:s?",
  1443. .params = "path",
  1444. .help = "list QOM properties",
  1445. .cmd = hmp_qom_list,
  1446. .flags = "p",
  1447. },
  1448. SRST
  1449. ``qom-list`` [*path*]
  1450. Print QOM properties of object at location *path*
  1451. ERST
  1452. {
  1453. .name = "qom-get",
  1454. .args_type = "path:s,property:s",
  1455. .params = "path property",
  1456. .help = "print QOM property",
  1457. .cmd = hmp_qom_get,
  1458. .flags = "p",
  1459. },
  1460. SRST
  1461. ``qom-get`` *path* *property*
  1462. Print QOM property *property* of object at location *path*
  1463. ERST
  1464. {
  1465. .name = "qom-set",
  1466. .args_type = "json:-j,path:s,property:s,value:S",
  1467. .params = "[-j] path property value",
  1468. .help = "set QOM property.\n\t\t\t"
  1469. "-j: the value is specified in json format.",
  1470. .cmd = hmp_qom_set,
  1471. .flags = "p",
  1472. },
  1473. SRST
  1474. ``qom-set`` *path* *property* *value*
  1475. Set QOM property *property* of object at location *path* to value *value*
  1476. ERST
  1477. {
  1478. .name = "replay_break",
  1479. .args_type = "icount:l",
  1480. .params = "icount",
  1481. .help = "set breakpoint at the specified instruction count",
  1482. .cmd = hmp_replay_break,
  1483. },
  1484. SRST
  1485. ``replay_break`` *icount*
  1486. Set replay breakpoint at instruction count *icount*.
  1487. Execution stops when the specified instruction is reached.
  1488. There can be at most one breakpoint. When breakpoint is set, any prior
  1489. one is removed. The breakpoint may be set only in replay mode and only
  1490. "in the future", i.e. at instruction counts greater than the current one.
  1491. The current instruction count can be observed with ``info replay``.
  1492. ERST
  1493. {
  1494. .name = "replay_delete_break",
  1495. .args_type = "",
  1496. .params = "",
  1497. .help = "remove replay breakpoint",
  1498. .cmd = hmp_replay_delete_break,
  1499. },
  1500. SRST
  1501. ``replay_delete_break``
  1502. Remove replay breakpoint which was previously set with ``replay_break``.
  1503. The command is ignored when there are no replay breakpoints.
  1504. ERST
  1505. {
  1506. .name = "replay_seek",
  1507. .args_type = "icount:l",
  1508. .params = "icount",
  1509. .help = "replay execution to the specified instruction count",
  1510. .cmd = hmp_replay_seek,
  1511. },
  1512. SRST
  1513. ``replay_seek`` *icount*
  1514. Automatically proceed to the instruction count *icount*, when
  1515. replaying the execution. The command automatically loads nearest
  1516. snapshot and replays the execution to find the desired instruction.
  1517. When there is no preceding snapshot or the execution is not replayed,
  1518. then the command fails.
  1519. *icount* for the reference may be observed with ``info replay`` command.
  1520. ERST
  1521. {
  1522. .name = "calc_dirty_rate",
  1523. .args_type = "dirty_ring:-r,dirty_bitmap:-b,second:l,sample_pages_per_GB:l?",
  1524. .params = "[-r] [-b] second [sample_pages_per_GB]",
  1525. .help = "start a round of guest dirty rate measurement (using -r to"
  1526. "\n\t\t\t specify dirty ring as the method of calculation and"
  1527. "\n\t\t\t -b to specify dirty bitmap as method of calculation)",
  1528. .cmd = hmp_calc_dirty_rate,
  1529. },
  1530. SRST
  1531. ``calc_dirty_rate`` *second*
  1532. Start a round of dirty rate measurement with the period specified in *second*.
  1533. The result of the dirty rate measurement may be observed with ``info
  1534. dirty_rate`` command.
  1535. ERST
  1536. {
  1537. .name = "set_vcpu_dirty_limit",
  1538. .args_type = "dirty_rate:l,cpu_index:l?",
  1539. .params = "dirty_rate [cpu_index]",
  1540. .help = "set dirty page rate limit, use cpu_index to set limit"
  1541. "\n\t\t\t\t\t on a specified virtual cpu",
  1542. .cmd = hmp_set_vcpu_dirty_limit,
  1543. },
  1544. SRST
  1545. ``set_vcpu_dirty_limit``
  1546. Set dirty page rate limit on virtual CPU, the information about all the
  1547. virtual CPU dirty limit status can be observed with ``info vcpu_dirty_limit``
  1548. command.
  1549. ERST
  1550. {
  1551. .name = "cancel_vcpu_dirty_limit",
  1552. .args_type = "cpu_index:l?",
  1553. .params = "[cpu_index]",
  1554. .help = "cancel dirty page rate limit, use cpu_index to cancel"
  1555. "\n\t\t\t\t\t limit on a specified virtual cpu",
  1556. .cmd = hmp_cancel_vcpu_dirty_limit,
  1557. },
  1558. SRST
  1559. ``cancel_vcpu_dirty_limit``
  1560. Cancel dirty page rate limit on virtual CPU, the information about all the
  1561. virtual CPU dirty limit status can be observed with ``info vcpu_dirty_limit``
  1562. command.
  1563. ERST
  1564. {
  1565. .name = "info",
  1566. .args_type = "item:s?",
  1567. .params = "[subcommand]",
  1568. .help = "show various information about the system state",
  1569. .cmd = hmp_info_help,
  1570. .sub_table = hmp_info_cmds,
  1571. .flags = "p",
  1572. },
  1573. #if defined(CONFIG_FDT)
  1574. {
  1575. .name = "dumpdtb",
  1576. .args_type = "filename:F",
  1577. .params = "filename",
  1578. .help = "dump the FDT in dtb format to 'filename'",
  1579. .cmd = hmp_dumpdtb,
  1580. },
  1581. SRST
  1582. ``dumpdtb`` *filename*
  1583. Dump the FDT in dtb format to *filename*.
  1584. ERST
  1585. #endif
  1586. #if defined(CONFIG_XEN_EMU)
  1587. {
  1588. .name = "xen-event-inject",
  1589. .args_type = "port:i",
  1590. .params = "port",
  1591. .help = "inject event channel",
  1592. .cmd = hmp_xen_event_inject,
  1593. },
  1594. SRST
  1595. ``xen-event-inject`` *port*
  1596. Notify guest via event channel on port *port*.
  1597. ERST
  1598. {
  1599. .name = "xen-event-list",
  1600. .args_type = "",
  1601. .params = "",
  1602. .help = "list event channel state",
  1603. .cmd = hmp_xen_event_list,
  1604. },
  1605. SRST
  1606. ``xen-event-list``
  1607. List event channels in the guest
  1608. ERST
  1609. #endif