2
0

hmp-commands.hx 48 KB

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