hmp-commands.hx 50 KB

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