You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

hmp-commands.hx 55KB

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