hmp-commands.hx 54 KB

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