hmp-commands.hx 36 KB

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