hmp-commands.hx 37 KB

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