hmp-commands.hx 53 KB

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