hmp-commands.hx 45 KB

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