hmp-commands.hx 55 KB

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