hmp-commands.hx 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779
  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 = "p|print",
  452. .args_type = "fmt:/,val:l",
  453. .params = "/fmt expr",
  454. .help = "print expression value (use $reg for CPU register access)",
  455. .cmd = do_print,
  456. },
  457. STEXI
  458. @item p or print/@var{fmt} @var{expr}
  459. @findex print
  460. Print expression value. Only the @var{format} part of @var{fmt} is
  461. used.
  462. ETEXI
  463. {
  464. .name = "i",
  465. .args_type = "fmt:/,addr:i,index:i.",
  466. .params = "/fmt addr",
  467. .help = "I/O port read",
  468. .cmd = hmp_ioport_read,
  469. },
  470. STEXI
  471. @item i/@var{fmt} @var{addr} [.@var{index}]
  472. @findex i
  473. Read I/O port.
  474. ETEXI
  475. {
  476. .name = "o",
  477. .args_type = "fmt:/,addr:i,val:i",
  478. .params = "/fmt addr value",
  479. .help = "I/O port write",
  480. .cmd = hmp_ioport_write,
  481. },
  482. STEXI
  483. @item o/@var{fmt} @var{addr} @var{val}
  484. @findex o
  485. Write to I/O port.
  486. ETEXI
  487. {
  488. .name = "sendkey",
  489. .args_type = "keys:s,hold-time:i?",
  490. .params = "keys [hold_ms]",
  491. .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
  492. .cmd = hmp_sendkey,
  493. .command_completion = sendkey_completion,
  494. },
  495. STEXI
  496. @item sendkey @var{keys}
  497. @findex sendkey
  498. Send @var{keys} to the guest. @var{keys} could be the name of the
  499. key or the raw value in hexadecimal format. Use @code{-} to press
  500. several keys simultaneously. Example:
  501. @example
  502. sendkey ctrl-alt-f1
  503. @end example
  504. This command is useful to send keys that your graphical user interface
  505. intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
  506. ETEXI
  507. {
  508. .name = "system_reset",
  509. .args_type = "",
  510. .params = "",
  511. .help = "reset the system",
  512. .cmd = hmp_system_reset,
  513. },
  514. STEXI
  515. @item system_reset
  516. @findex system_reset
  517. Reset the system.
  518. ETEXI
  519. {
  520. .name = "system_powerdown",
  521. .args_type = "",
  522. .params = "",
  523. .help = "send system power down event",
  524. .cmd = hmp_system_powerdown,
  525. },
  526. STEXI
  527. @item system_powerdown
  528. @findex system_powerdown
  529. Power down the system (if supported).
  530. ETEXI
  531. {
  532. .name = "sum",
  533. .args_type = "start:i,size:i",
  534. .params = "addr size",
  535. .help = "compute the checksum of a memory region",
  536. .cmd = hmp_sum,
  537. },
  538. STEXI
  539. @item sum @var{addr} @var{size}
  540. @findex sum
  541. Compute the checksum of a memory region.
  542. ETEXI
  543. {
  544. .name = "usb_add",
  545. .args_type = "devname:s",
  546. .params = "device",
  547. .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
  548. .cmd = hmp_usb_add,
  549. },
  550. STEXI
  551. @item usb_add @var{devname}
  552. @findex usb_add
  553. Add the USB device @var{devname}. For details of available devices see
  554. @ref{usb_devices}
  555. ETEXI
  556. {
  557. .name = "usb_del",
  558. .args_type = "devname:s",
  559. .params = "device",
  560. .help = "remove USB device 'bus.addr'",
  561. .cmd = hmp_usb_del,
  562. },
  563. STEXI
  564. @item usb_del @var{devname}
  565. @findex usb_del
  566. Remove the USB device @var{devname} from the QEMU virtual USB
  567. hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
  568. command @code{info usb} to see the devices you can remove.
  569. ETEXI
  570. {
  571. .name = "device_add",
  572. .args_type = "device:O",
  573. .params = "driver[,prop=value][,...]",
  574. .help = "add device, like -device on the command line",
  575. .cmd = hmp_device_add,
  576. .command_completion = device_add_completion,
  577. },
  578. STEXI
  579. @item device_add @var{config}
  580. @findex device_add
  581. Add device.
  582. ETEXI
  583. {
  584. .name = "device_del",
  585. .args_type = "id:s",
  586. .params = "device",
  587. .help = "remove device",
  588. .cmd = hmp_device_del,
  589. .command_completion = device_del_completion,
  590. },
  591. STEXI
  592. @item device_del @var{id}
  593. @findex device_del
  594. Remove device @var{id}. @var{id} may be a short ID
  595. or a QOM object path.
  596. ETEXI
  597. {
  598. .name = "cpu",
  599. .args_type = "index:i",
  600. .params = "index",
  601. .help = "set the default CPU",
  602. .cmd = hmp_cpu,
  603. },
  604. STEXI
  605. @item cpu @var{index}
  606. @findex cpu
  607. Set the default CPU.
  608. ETEXI
  609. {
  610. .name = "mouse_move",
  611. .args_type = "dx_str:s,dy_str:s,dz_str:s?",
  612. .params = "dx dy [dz]",
  613. .help = "send mouse move events",
  614. .cmd = hmp_mouse_move,
  615. },
  616. STEXI
  617. @item mouse_move @var{dx} @var{dy} [@var{dz}]
  618. @findex mouse_move
  619. Move the active mouse to the specified coordinates @var{dx} @var{dy}
  620. with optional scroll axis @var{dz}.
  621. ETEXI
  622. {
  623. .name = "mouse_button",
  624. .args_type = "button_state:i",
  625. .params = "state",
  626. .help = "change mouse button state (1=L, 2=M, 4=R)",
  627. .cmd = hmp_mouse_button,
  628. },
  629. STEXI
  630. @item mouse_button @var{val}
  631. @findex mouse_button
  632. Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
  633. ETEXI
  634. {
  635. .name = "mouse_set",
  636. .args_type = "index:i",
  637. .params = "index",
  638. .help = "set which mouse device receives events",
  639. .cmd = hmp_mouse_set,
  640. },
  641. STEXI
  642. @item mouse_set @var{index}
  643. @findex mouse_set
  644. Set which mouse device receives events at given @var{index}, index
  645. can be obtained with
  646. @example
  647. info mice
  648. @end example
  649. ETEXI
  650. {
  651. .name = "wavcapture",
  652. .args_type = "path:F,freq:i?,bits:i?,nchannels:i?",
  653. .params = "path [frequency [bits [channels]]]",
  654. .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
  655. .cmd = hmp_wavcapture,
  656. },
  657. STEXI
  658. @item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
  659. @findex wavcapture
  660. Capture audio into @var{filename}. Using sample rate @var{frequency}
  661. bits per sample @var{bits} and number of channels @var{channels}.
  662. Defaults:
  663. @itemize @minus
  664. @item Sample rate = 44100 Hz - CD quality
  665. @item Bits = 16
  666. @item Number of channels = 2 - Stereo
  667. @end itemize
  668. ETEXI
  669. {
  670. .name = "stopcapture",
  671. .args_type = "n:i",
  672. .params = "capture index",
  673. .help = "stop capture",
  674. .cmd = hmp_stopcapture,
  675. },
  676. STEXI
  677. @item stopcapture @var{index}
  678. @findex stopcapture
  679. Stop capture with a given @var{index}, index can be obtained with
  680. @example
  681. info capture
  682. @end example
  683. ETEXI
  684. {
  685. .name = "memsave",
  686. .args_type = "val:l,size:i,filename:s",
  687. .params = "addr size file",
  688. .help = "save to disk virtual memory dump starting at 'addr' of size 'size'",
  689. .cmd = hmp_memsave,
  690. },
  691. STEXI
  692. @item memsave @var{addr} @var{size} @var{file}
  693. @findex memsave
  694. save to disk virtual memory dump starting at @var{addr} of size @var{size}.
  695. ETEXI
  696. {
  697. .name = "pmemsave",
  698. .args_type = "val:l,size:i,filename:s",
  699. .params = "addr size file",
  700. .help = "save to disk physical memory dump starting at 'addr' of size 'size'",
  701. .cmd = hmp_pmemsave,
  702. },
  703. STEXI
  704. @item pmemsave @var{addr} @var{size} @var{file}
  705. @findex pmemsave
  706. save to disk physical memory dump starting at @var{addr} of size @var{size}.
  707. ETEXI
  708. {
  709. .name = "boot_set",
  710. .args_type = "bootdevice:s",
  711. .params = "bootdevice",
  712. .help = "define new values for the boot device list",
  713. .cmd = hmp_boot_set,
  714. },
  715. STEXI
  716. @item boot_set @var{bootdevicelist}
  717. @findex boot_set
  718. Define new values for the boot device list. Those values will override
  719. the values specified on the command line through the @code{-boot} option.
  720. The values that can be specified here depend on the machine type, but are
  721. the same that can be specified in the @code{-boot} command line option.
  722. ETEXI
  723. {
  724. .name = "nmi",
  725. .args_type = "",
  726. .params = "",
  727. .help = "inject an NMI",
  728. .cmd = hmp_nmi,
  729. },
  730. STEXI
  731. @item nmi @var{cpu}
  732. @findex nmi
  733. Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
  734. ETEXI
  735. {
  736. .name = "ringbuf_write",
  737. .args_type = "device:s,data:s",
  738. .params = "device data",
  739. .help = "Write to a ring buffer character device",
  740. .cmd = hmp_ringbuf_write,
  741. .command_completion = ringbuf_write_completion,
  742. },
  743. STEXI
  744. @item ringbuf_write @var{device} @var{data}
  745. @findex ringbuf_write
  746. Write @var{data} to ring buffer character device @var{device}.
  747. @var{data} must be a UTF-8 string.
  748. ETEXI
  749. {
  750. .name = "ringbuf_read",
  751. .args_type = "device:s,size:i",
  752. .params = "device size",
  753. .help = "Read from a ring buffer character device",
  754. .cmd = hmp_ringbuf_read,
  755. .command_completion = ringbuf_write_completion,
  756. },
  757. STEXI
  758. @item ringbuf_read @var{device}
  759. @findex ringbuf_read
  760. Read and print up to @var{size} bytes from ring buffer character
  761. device @var{device}.
  762. Certain non-printable characters are printed \uXXXX, where XXXX is the
  763. character code in hexadecimal. Character \ is printed \\.
  764. Bug: can screw up when the buffer contains invalid UTF-8 sequences,
  765. NUL characters, after the ring buffer lost data, and when reading
  766. stops because the size limit is reached.
  767. ETEXI
  768. {
  769. .name = "migrate",
  770. .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
  771. .params = "[-d] [-b] [-i] uri",
  772. .help = "migrate to URI (using -d to not wait for completion)"
  773. "\n\t\t\t -b for migration without shared storage with"
  774. " full copy of disk\n\t\t\t -i for migration without "
  775. "shared storage with incremental copy of disk "
  776. "(base image shared between src and destination)",
  777. .cmd = hmp_migrate,
  778. },
  779. STEXI
  780. @item migrate [-d] [-b] [-i] @var{uri}
  781. @findex migrate
  782. Migrate to @var{uri} (using -d to not wait for completion).
  783. -b for migration with full copy of disk
  784. -i for migration with incremental copy of disk (base image is shared)
  785. ETEXI
  786. {
  787. .name = "migrate_cancel",
  788. .args_type = "",
  789. .params = "",
  790. .help = "cancel the current VM migration",
  791. .cmd = hmp_migrate_cancel,
  792. },
  793. STEXI
  794. @item migrate_cancel
  795. @findex migrate_cancel
  796. Cancel the current VM migration.
  797. ETEXI
  798. {
  799. .name = "migrate_incoming",
  800. .args_type = "uri:s",
  801. .params = "uri",
  802. .help = "Continue an incoming migration from an -incoming defer",
  803. .cmd = hmp_migrate_incoming,
  804. },
  805. STEXI
  806. @item migrate_incoming @var{uri}
  807. @findex migrate_incoming
  808. Continue an incoming migration using the @var{uri} (that has the same syntax
  809. as the -incoming option).
  810. ETEXI
  811. {
  812. .name = "migrate_set_cache_size",
  813. .args_type = "value:o",
  814. .params = "value",
  815. .help = "set cache size (in bytes) for XBZRLE migrations,"
  816. "the cache size will be rounded down to the nearest "
  817. "power of 2.\n"
  818. "The cache size affects the number of cache misses."
  819. "In case of a high cache miss ratio you need to increase"
  820. " the cache size",
  821. .cmd = hmp_migrate_set_cache_size,
  822. },
  823. STEXI
  824. @item migrate_set_cache_size @var{value}
  825. @findex migrate_set_cache_size
  826. Set cache size to @var{value} (in bytes) for xbzrle migrations.
  827. ETEXI
  828. {
  829. .name = "migrate_set_speed",
  830. .args_type = "value:o",
  831. .params = "value",
  832. .help = "set maximum speed (in bytes) for migrations. "
  833. "Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
  834. .cmd = hmp_migrate_set_speed,
  835. },
  836. STEXI
  837. @item migrate_set_speed @var{value}
  838. @findex migrate_set_speed
  839. Set maximum speed to @var{value} (in bytes) for migrations.
  840. ETEXI
  841. {
  842. .name = "migrate_set_downtime",
  843. .args_type = "value:T",
  844. .params = "value",
  845. .help = "set maximum tolerated downtime (in seconds) for migrations",
  846. .cmd = hmp_migrate_set_downtime,
  847. },
  848. STEXI
  849. @item migrate_set_downtime @var{second}
  850. @findex migrate_set_downtime
  851. Set maximum tolerated downtime (in seconds) for migration.
  852. ETEXI
  853. {
  854. .name = "migrate_set_capability",
  855. .args_type = "capability:s,state:b",
  856. .params = "capability state",
  857. .help = "Enable/Disable the usage of a capability for migration",
  858. .cmd = hmp_migrate_set_capability,
  859. .command_completion = migrate_set_capability_completion,
  860. },
  861. STEXI
  862. @item migrate_set_capability @var{capability} @var{state}
  863. @findex migrate_set_capability
  864. Enable/Disable the usage of a capability @var{capability} for migration.
  865. ETEXI
  866. {
  867. .name = "migrate_set_parameter",
  868. .args_type = "parameter:s,value:s",
  869. .params = "parameter value",
  870. .help = "Set the parameter for migration",
  871. .cmd = hmp_migrate_set_parameter,
  872. .command_completion = migrate_set_parameter_completion,
  873. },
  874. STEXI
  875. @item migrate_set_parameter @var{parameter} @var{value}
  876. @findex migrate_set_parameter
  877. Set the parameter @var{parameter} for migration.
  878. ETEXI
  879. {
  880. .name = "migrate_start_postcopy",
  881. .args_type = "",
  882. .params = "",
  883. .help = "Followup to a migration command to switch the migration"
  884. " to postcopy mode. The postcopy-ram capability must "
  885. "be set before the original migration command.",
  886. .cmd = hmp_migrate_start_postcopy,
  887. },
  888. STEXI
  889. @item migrate_start_postcopy
  890. @findex migrate_start_postcopy
  891. Switch in-progress migration to postcopy mode. Ignored after the end of
  892. migration (or once already in postcopy).
  893. ETEXI
  894. {
  895. .name = "x_colo_lost_heartbeat",
  896. .args_type = "",
  897. .params = "",
  898. .help = "Tell COLO that heartbeat is lost,\n\t\t\t"
  899. "a failover or takeover is needed.",
  900. .cmd = hmp_x_colo_lost_heartbeat,
  901. },
  902. STEXI
  903. @item x_colo_lost_heartbeat
  904. @findex x_colo_lost_heartbeat
  905. Tell COLO that heartbeat is lost, a failover or takeover is needed.
  906. ETEXI
  907. {
  908. .name = "client_migrate_info",
  909. .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
  910. .params = "protocol hostname port tls-port cert-subject",
  911. .help = "set migration information for remote display",
  912. .cmd = hmp_client_migrate_info,
  913. },
  914. STEXI
  915. @item client_migrate_info @var{protocol} @var{hostname} @var{port} @var{tls-port} @var{cert-subject}
  916. @findex client_migrate_info
  917. Set migration information for remote display. This makes the server
  918. ask the client to automatically reconnect using the new parameters
  919. once migration finished successfully. Only implemented for SPICE.
  920. ETEXI
  921. {
  922. .name = "dump-guest-memory",
  923. .args_type = "paging:-p,detach:-d,zlib:-z,lzo:-l,snappy:-s,filename:F,begin:i?,length:i?",
  924. .params = "[-p] [-d] [-z|-l|-s] filename [begin length]",
  925. .help = "dump guest memory into file 'filename'.\n\t\t\t"
  926. "-p: do paging to get guest's memory mapping.\n\t\t\t"
  927. "-d: return immediately (do not wait for completion).\n\t\t\t"
  928. "-z: dump in kdump-compressed format, with zlib compression.\n\t\t\t"
  929. "-l: dump in kdump-compressed format, with lzo compression.\n\t\t\t"
  930. "-s: dump in kdump-compressed format, with snappy compression.\n\t\t\t"
  931. "begin: the starting physical address.\n\t\t\t"
  932. "length: the memory size, in bytes.",
  933. .cmd = hmp_dump_guest_memory,
  934. },
  935. STEXI
  936. @item dump-guest-memory [-p] @var{filename} @var{begin} @var{length}
  937. @item dump-guest-memory [-z|-l|-s] @var{filename}
  938. @findex dump-guest-memory
  939. Dump guest memory to @var{protocol}. The file can be processed with crash or
  940. gdb. Without -z|-l|-s, the dump format is ELF.
  941. -p: do paging to get guest's memory mapping.
  942. -z: dump in kdump-compressed format, with zlib compression.
  943. -l: dump in kdump-compressed format, with lzo compression.
  944. -s: dump in kdump-compressed format, with snappy compression.
  945. filename: dump file name.
  946. begin: the starting physical address. It's optional, and should be
  947. specified together with length.
  948. length: the memory size, in bytes. It's optional, and should be specified
  949. together with begin.
  950. ETEXI
  951. #if defined(TARGET_S390X)
  952. {
  953. .name = "dump-skeys",
  954. .args_type = "filename:F",
  955. .params = "",
  956. .help = "Save guest storage keys into file 'filename'.\n",
  957. .cmd = hmp_dump_skeys,
  958. },
  959. #endif
  960. STEXI
  961. @item dump-skeys @var{filename}
  962. @findex dump-skeys
  963. Save guest storage keys to a file.
  964. ETEXI
  965. {
  966. .name = "snapshot_blkdev",
  967. .args_type = "reuse:-n,device:B,snapshot-file:s?,format:s?",
  968. .params = "[-n] device [new-image-file] [format]",
  969. .help = "initiates a live snapshot\n\t\t\t"
  970. "of device. If a new image file is specified, the\n\t\t\t"
  971. "new image file will become the new root image.\n\t\t\t"
  972. "If format is specified, the snapshot file will\n\t\t\t"
  973. "be created in that format.\n\t\t\t"
  974. "The default format is qcow2. The -n flag requests QEMU\n\t\t\t"
  975. "to reuse the image found in new-image-file, instead of\n\t\t\t"
  976. "recreating it from scratch.",
  977. .cmd = hmp_snapshot_blkdev,
  978. },
  979. STEXI
  980. @item snapshot_blkdev
  981. @findex snapshot_blkdev
  982. Snapshot device, using snapshot file as target if provided
  983. ETEXI
  984. {
  985. .name = "snapshot_blkdev_internal",
  986. .args_type = "device:B,name:s",
  987. .params = "device name",
  988. .help = "take an internal snapshot of device.\n\t\t\t"
  989. "The format of the image used by device must\n\t\t\t"
  990. "support it, such as qcow2.\n\t\t\t",
  991. .cmd = hmp_snapshot_blkdev_internal,
  992. },
  993. STEXI
  994. @item snapshot_blkdev_internal
  995. @findex snapshot_blkdev_internal
  996. Take an internal snapshot on device if it support
  997. ETEXI
  998. {
  999. .name = "snapshot_delete_blkdev_internal",
  1000. .args_type = "device:B,name:s,id:s?",
  1001. .params = "device name [id]",
  1002. .help = "delete an internal snapshot of device.\n\t\t\t"
  1003. "If id is specified, qemu will try delete\n\t\t\t"
  1004. "the snapshot matching both id and name.\n\t\t\t"
  1005. "The format of the image used by device must\n\t\t\t"
  1006. "support it, such as qcow2.\n\t\t\t",
  1007. .cmd = hmp_snapshot_delete_blkdev_internal,
  1008. },
  1009. STEXI
  1010. @item snapshot_delete_blkdev_internal
  1011. @findex snapshot_delete_blkdev_internal
  1012. Delete an internal snapshot on device if it support
  1013. ETEXI
  1014. {
  1015. .name = "drive_mirror",
  1016. .args_type = "reuse:-n,full:-f,device:B,target:s,format:s?",
  1017. .params = "[-n] [-f] device target [format]",
  1018. .help = "initiates live storage\n\t\t\t"
  1019. "migration for a device. The device's contents are\n\t\t\t"
  1020. "copied to the new image file, including data that\n\t\t\t"
  1021. "is written after the command is started.\n\t\t\t"
  1022. "The -n flag requests QEMU to reuse the image found\n\t\t\t"
  1023. "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
  1024. "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
  1025. "so that the result does not need a backing file.\n\t\t\t",
  1026. .cmd = hmp_drive_mirror,
  1027. },
  1028. STEXI
  1029. @item drive_mirror
  1030. @findex drive_mirror
  1031. Start mirroring a block device's writes to a new destination,
  1032. using the specified target.
  1033. ETEXI
  1034. {
  1035. .name = "drive_backup",
  1036. .args_type = "reuse:-n,full:-f,compress:-c,device:B,target:s,format:s?",
  1037. .params = "[-n] [-f] [-c] device target [format]",
  1038. .help = "initiates a point-in-time\n\t\t\t"
  1039. "copy for a device. The device's contents are\n\t\t\t"
  1040. "copied to the new image file, excluding data that\n\t\t\t"
  1041. "is written after the command is started.\n\t\t\t"
  1042. "The -n flag requests QEMU to reuse the image found\n\t\t\t"
  1043. "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
  1044. "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
  1045. "so that the result does not need a backing file.\n\t\t\t"
  1046. "The -c flag requests QEMU to compress backup data\n\t\t\t"
  1047. "(if the target format supports it).\n\t\t\t",
  1048. .cmd = hmp_drive_backup,
  1049. },
  1050. STEXI
  1051. @item drive_backup
  1052. @findex drive_backup
  1053. Start a point-in-time copy of a block device to a specificed target.
  1054. ETEXI
  1055. {
  1056. .name = "drive_add",
  1057. .args_type = "node:-n,pci_addr:s,opts:s",
  1058. .params = "[-n] [[<domain>:]<bus>:]<slot>\n"
  1059. "[file=file][,if=type][,bus=n]\n"
  1060. "[,unit=m][,media=d][,index=i]\n"
  1061. "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
  1062. "[,snapshot=on|off][,cache=on|off]\n"
  1063. "[,readonly=on|off][,copy-on-read=on|off]",
  1064. .help = "add drive to PCI storage controller",
  1065. .cmd = hmp_drive_add,
  1066. },
  1067. STEXI
  1068. @item drive_add
  1069. @findex drive_add
  1070. Add drive to PCI storage controller.
  1071. ETEXI
  1072. {
  1073. .name = "pcie_aer_inject_error",
  1074. .args_type = "advisory_non_fatal:-a,correctable:-c,"
  1075. "id:s,error_status:s,"
  1076. "header0:i?,header1:i?,header2:i?,header3:i?,"
  1077. "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
  1078. .params = "[-a] [-c] id "
  1079. "<error_status> [<tlp header> [<tlp header prefix>]]",
  1080. .help = "inject pcie aer error\n\t\t\t"
  1081. " -a for advisory non fatal error\n\t\t\t"
  1082. " -c for correctable error\n\t\t\t"
  1083. "<id> = qdev device id\n\t\t\t"
  1084. "<error_status> = error string or 32bit\n\t\t\t"
  1085. "<tlb header> = 32bit x 4\n\t\t\t"
  1086. "<tlb header prefix> = 32bit x 4",
  1087. .cmd = hmp_pcie_aer_inject_error,
  1088. },
  1089. STEXI
  1090. @item pcie_aer_inject_error
  1091. @findex pcie_aer_inject_error
  1092. Inject PCIe AER error
  1093. ETEXI
  1094. {
  1095. .name = "host_net_add",
  1096. .args_type = "device:s,opts:s?",
  1097. .params = "tap|user|socket|vde|netmap|bridge|vhost-user|dump [options]",
  1098. .help = "add host VLAN client",
  1099. .cmd = hmp_host_net_add,
  1100. .command_completion = host_net_add_completion,
  1101. },
  1102. STEXI
  1103. @item host_net_add
  1104. @findex host_net_add
  1105. Add host VLAN client.
  1106. ETEXI
  1107. {
  1108. .name = "host_net_remove",
  1109. .args_type = "vlan_id:i,device:s",
  1110. .params = "vlan_id name",
  1111. .help = "remove host VLAN client",
  1112. .cmd = hmp_host_net_remove,
  1113. .command_completion = host_net_remove_completion,
  1114. },
  1115. STEXI
  1116. @item host_net_remove
  1117. @findex host_net_remove
  1118. Remove host VLAN client.
  1119. ETEXI
  1120. {
  1121. .name = "netdev_add",
  1122. .args_type = "netdev:O",
  1123. .params = "[user|tap|socket|vde|bridge|hubport|netmap|vhost-user],id=str[,prop=value][,...]",
  1124. .help = "add host network device",
  1125. .cmd = hmp_netdev_add,
  1126. .command_completion = netdev_add_completion,
  1127. },
  1128. STEXI
  1129. @item netdev_add
  1130. @findex netdev_add
  1131. Add host network device.
  1132. ETEXI
  1133. {
  1134. .name = "netdev_del",
  1135. .args_type = "id:s",
  1136. .params = "id",
  1137. .help = "remove host network device",
  1138. .cmd = hmp_netdev_del,
  1139. .command_completion = netdev_del_completion,
  1140. },
  1141. STEXI
  1142. @item netdev_del
  1143. @findex netdev_del
  1144. Remove host network device.
  1145. ETEXI
  1146. {
  1147. .name = "object_add",
  1148. .args_type = "object:O",
  1149. .params = "[qom-type=]type,id=str[,prop=value][,...]",
  1150. .help = "create QOM object",
  1151. .cmd = hmp_object_add,
  1152. .command_completion = object_add_completion,
  1153. },
  1154. STEXI
  1155. @item object_add
  1156. @findex object_add
  1157. Create QOM object.
  1158. ETEXI
  1159. {
  1160. .name = "object_del",
  1161. .args_type = "id:s",
  1162. .params = "id",
  1163. .help = "destroy QOM object",
  1164. .cmd = hmp_object_del,
  1165. .command_completion = object_del_completion,
  1166. },
  1167. STEXI
  1168. @item object_del
  1169. @findex object_del
  1170. Destroy QOM object.
  1171. ETEXI
  1172. #ifdef CONFIG_SLIRP
  1173. {
  1174. .name = "hostfwd_add",
  1175. .args_type = "arg1:s,arg2:s?,arg3:s?",
  1176. .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
  1177. .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
  1178. .cmd = hmp_hostfwd_add,
  1179. },
  1180. #endif
  1181. STEXI
  1182. @item hostfwd_add
  1183. @findex hostfwd_add
  1184. Redirect TCP or UDP connections from host to guest (requires -net user).
  1185. ETEXI
  1186. #ifdef CONFIG_SLIRP
  1187. {
  1188. .name = "hostfwd_remove",
  1189. .args_type = "arg1:s,arg2:s?,arg3:s?",
  1190. .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
  1191. .help = "remove host-to-guest TCP or UDP redirection",
  1192. .cmd = hmp_hostfwd_remove,
  1193. },
  1194. #endif
  1195. STEXI
  1196. @item hostfwd_remove
  1197. @findex hostfwd_remove
  1198. Remove host-to-guest TCP or UDP redirection.
  1199. ETEXI
  1200. {
  1201. .name = "balloon",
  1202. .args_type = "value:M",
  1203. .params = "target",
  1204. .help = "request VM to change its memory allocation (in MB)",
  1205. .cmd = hmp_balloon,
  1206. },
  1207. STEXI
  1208. @item balloon @var{value}
  1209. @findex balloon
  1210. Request VM to change its memory allocation to @var{value} (in MB).
  1211. ETEXI
  1212. {
  1213. .name = "set_link",
  1214. .args_type = "name:s,up:b",
  1215. .params = "name on|off",
  1216. .help = "change the link status of a network adapter",
  1217. .cmd = hmp_set_link,
  1218. .command_completion = set_link_completion,
  1219. },
  1220. STEXI
  1221. @item set_link @var{name} [on|off]
  1222. @findex set_link
  1223. Switch link @var{name} on (i.e. up) or off (i.e. down).
  1224. ETEXI
  1225. {
  1226. .name = "watchdog_action",
  1227. .args_type = "action:s",
  1228. .params = "[reset|shutdown|poweroff|pause|debug|none]",
  1229. .help = "change watchdog action",
  1230. .cmd = hmp_watchdog_action,
  1231. .command_completion = watchdog_action_completion,
  1232. },
  1233. STEXI
  1234. @item watchdog_action
  1235. @findex watchdog_action
  1236. Change watchdog action.
  1237. ETEXI
  1238. {
  1239. .name = "acl_show",
  1240. .args_type = "aclname:s",
  1241. .params = "aclname",
  1242. .help = "list rules in the access control list",
  1243. .cmd = hmp_acl_show,
  1244. },
  1245. STEXI
  1246. @item acl_show @var{aclname}
  1247. @findex acl_show
  1248. List all the matching rules in the access control list, and the default
  1249. policy. There are currently two named access control lists,
  1250. @var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
  1251. certificate distinguished name, and SASL username respectively.
  1252. ETEXI
  1253. {
  1254. .name = "acl_policy",
  1255. .args_type = "aclname:s,policy:s",
  1256. .params = "aclname allow|deny",
  1257. .help = "set default access control list policy",
  1258. .cmd = hmp_acl_policy,
  1259. },
  1260. STEXI
  1261. @item acl_policy @var{aclname} @code{allow|deny}
  1262. @findex acl_policy
  1263. Set the default access control list policy, used in the event that
  1264. none of the explicit rules match. The default policy at startup is
  1265. always @code{deny}.
  1266. ETEXI
  1267. {
  1268. .name = "acl_add",
  1269. .args_type = "aclname:s,match:s,policy:s,index:i?",
  1270. .params = "aclname match allow|deny [index]",
  1271. .help = "add a match rule to the access control list",
  1272. .cmd = hmp_acl_add,
  1273. },
  1274. STEXI
  1275. @item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
  1276. @findex acl_add
  1277. Add a match rule to the access control list, allowing or denying access.
  1278. The match will normally be an exact username or x509 distinguished name,
  1279. but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
  1280. allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
  1281. normally be appended to the end of the ACL, but can be inserted
  1282. earlier in the list if the optional @var{index} parameter is supplied.
  1283. ETEXI
  1284. {
  1285. .name = "acl_remove",
  1286. .args_type = "aclname:s,match:s",
  1287. .params = "aclname match",
  1288. .help = "remove a match rule from the access control list",
  1289. .cmd = hmp_acl_remove,
  1290. },
  1291. STEXI
  1292. @item acl_remove @var{aclname} @var{match}
  1293. @findex acl_remove
  1294. Remove the specified match rule from the access control list.
  1295. ETEXI
  1296. {
  1297. .name = "acl_reset",
  1298. .args_type = "aclname:s",
  1299. .params = "aclname",
  1300. .help = "reset the access control list",
  1301. .cmd = hmp_acl_reset,
  1302. },
  1303. STEXI
  1304. @item acl_reset @var{aclname}
  1305. @findex acl_reset
  1306. Remove all matches from the access control list, and set the default
  1307. policy back to @code{deny}.
  1308. ETEXI
  1309. {
  1310. .name = "nbd_server_start",
  1311. .args_type = "all:-a,writable:-w,uri:s",
  1312. .params = "nbd_server_start [-a] [-w] host:port",
  1313. .help = "serve block devices on the given host and port",
  1314. .cmd = hmp_nbd_server_start,
  1315. },
  1316. STEXI
  1317. @item nbd_server_start @var{host}:@var{port}
  1318. @findex nbd_server_start
  1319. Start an NBD server on the given host and/or port. If the @option{-a}
  1320. option is included, all of the virtual machine's block devices that
  1321. have an inserted media on them are automatically exported; in this case,
  1322. the @option{-w} option makes the devices writable too.
  1323. ETEXI
  1324. {
  1325. .name = "nbd_server_add",
  1326. .args_type = "writable:-w,device:B",
  1327. .params = "nbd_server_add [-w] device",
  1328. .help = "export a block device via NBD",
  1329. .cmd = hmp_nbd_server_add,
  1330. },
  1331. STEXI
  1332. @item nbd_server_add @var{device}
  1333. @findex nbd_server_add
  1334. Export a block device through QEMU's NBD server, which must be started
  1335. beforehand with @command{nbd_server_start}. The @option{-w} option makes the
  1336. exported device writable too.
  1337. ETEXI
  1338. {
  1339. .name = "nbd_server_stop",
  1340. .args_type = "",
  1341. .params = "nbd_server_stop",
  1342. .help = "stop serving block devices using the NBD protocol",
  1343. .cmd = hmp_nbd_server_stop,
  1344. },
  1345. STEXI
  1346. @item nbd_server_stop
  1347. @findex nbd_server_stop
  1348. Stop the QEMU embedded NBD server.
  1349. ETEXI
  1350. #if defined(TARGET_I386)
  1351. {
  1352. .name = "mce",
  1353. .args_type = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
  1354. .params = "[-b] cpu bank status mcgstatus addr misc",
  1355. .help = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
  1356. .cmd = hmp_mce,
  1357. },
  1358. #endif
  1359. STEXI
  1360. @item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
  1361. @findex mce (x86)
  1362. Inject an MCE on the given CPU (x86 only).
  1363. ETEXI
  1364. {
  1365. .name = "getfd",
  1366. .args_type = "fdname:s",
  1367. .params = "getfd name",
  1368. .help = "receive a file descriptor via SCM rights and assign it a name",
  1369. .cmd = hmp_getfd,
  1370. },
  1371. STEXI
  1372. @item getfd @var{fdname}
  1373. @findex getfd
  1374. If a file descriptor is passed alongside this command using the SCM_RIGHTS
  1375. mechanism on unix sockets, it is stored using the name @var{fdname} for
  1376. later use by other monitor commands.
  1377. ETEXI
  1378. {
  1379. .name = "closefd",
  1380. .args_type = "fdname:s",
  1381. .params = "closefd name",
  1382. .help = "close a file descriptor previously passed via SCM rights",
  1383. .cmd = hmp_closefd,
  1384. },
  1385. STEXI
  1386. @item closefd @var{fdname}
  1387. @findex closefd
  1388. Close the file descriptor previously assigned to @var{fdname} using the
  1389. @code{getfd} command. This is only needed if the file descriptor was never
  1390. used by another monitor command.
  1391. ETEXI
  1392. {
  1393. .name = "block_passwd",
  1394. .args_type = "device:B,password:s",
  1395. .params = "block_passwd device password",
  1396. .help = "set the password of encrypted block devices",
  1397. .cmd = hmp_block_passwd,
  1398. },
  1399. STEXI
  1400. @item block_passwd @var{device} @var{password}
  1401. @findex block_passwd
  1402. Set the encrypted device @var{device} password to @var{password}
  1403. ETEXI
  1404. {
  1405. .name = "block_set_io_throttle",
  1406. .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
  1407. .params = "device bps bps_rd bps_wr iops iops_rd iops_wr",
  1408. .help = "change I/O throttle limits for a block drive",
  1409. .cmd = hmp_block_set_io_throttle,
  1410. },
  1411. STEXI
  1412. @item block_set_io_throttle @var{device} @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}
  1413. @findex block_set_io_throttle
  1414. 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}
  1415. ETEXI
  1416. {
  1417. .name = "set_password",
  1418. .args_type = "protocol:s,password:s,connected:s?",
  1419. .params = "protocol password action-if-connected",
  1420. .help = "set spice/vnc password",
  1421. .cmd = hmp_set_password,
  1422. },
  1423. STEXI
  1424. @item set_password [ vnc | spice ] password [ action-if-connected ]
  1425. @findex set_password
  1426. Change spice/vnc password. Use zero to make the password stay valid
  1427. forever. @var{action-if-connected} specifies what should happen in
  1428. case a connection is established: @var{fail} makes the password change
  1429. fail. @var{disconnect} changes the password and disconnects the
  1430. client. @var{keep} changes the password and keeps the connection up.
  1431. @var{keep} is the default.
  1432. ETEXI
  1433. {
  1434. .name = "expire_password",
  1435. .args_type = "protocol:s,time:s",
  1436. .params = "protocol time",
  1437. .help = "set spice/vnc password expire-time",
  1438. .cmd = hmp_expire_password,
  1439. },
  1440. STEXI
  1441. @item expire_password [ vnc | spice ] expire-time
  1442. @findex expire_password
  1443. Specify when a password for spice/vnc becomes
  1444. invalid. @var{expire-time} accepts:
  1445. @table @var
  1446. @item now
  1447. Invalidate password instantly.
  1448. @item never
  1449. Password stays valid forever.
  1450. @item +nsec
  1451. Password stays valid for @var{nsec} seconds starting now.
  1452. @item nsec
  1453. Password is invalidated at the given time. @var{nsec} are the seconds
  1454. passed since 1970, i.e. unix epoch.
  1455. @end table
  1456. ETEXI
  1457. {
  1458. .name = "chardev-add",
  1459. .args_type = "args:s",
  1460. .params = "args",
  1461. .help = "add chardev",
  1462. .cmd = hmp_chardev_add,
  1463. .command_completion = chardev_add_completion,
  1464. },
  1465. STEXI
  1466. @item chardev-add args
  1467. @findex chardev-add
  1468. chardev_add accepts the same parameters as the -chardev command line switch.
  1469. ETEXI
  1470. {
  1471. .name = "chardev-remove",
  1472. .args_type = "id:s",
  1473. .params = "id",
  1474. .help = "remove chardev",
  1475. .cmd = hmp_chardev_remove,
  1476. .command_completion = chardev_remove_completion,
  1477. },
  1478. STEXI
  1479. @item chardev-remove id
  1480. @findex chardev-remove
  1481. Removes the chardev @var{id}.
  1482. ETEXI
  1483. {
  1484. .name = "qemu-io",
  1485. .args_type = "device:B,command:s",
  1486. .params = "[device] \"[command]\"",
  1487. .help = "run a qemu-io command on a block device",
  1488. .cmd = hmp_qemu_io,
  1489. },
  1490. STEXI
  1491. @item qemu-io @var{device} @var{command}
  1492. @findex qemu-io
  1493. Executes a qemu-io command on the given block device.
  1494. ETEXI
  1495. {
  1496. .name = "cpu-add",
  1497. .args_type = "id:i",
  1498. .params = "id",
  1499. .help = "add cpu",
  1500. .cmd = hmp_cpu_add,
  1501. },
  1502. STEXI
  1503. @item cpu-add @var{id}
  1504. @findex cpu-add
  1505. Add CPU with id @var{id}
  1506. ETEXI
  1507. {
  1508. .name = "qom-list",
  1509. .args_type = "path:s?",
  1510. .params = "path",
  1511. .help = "list QOM properties",
  1512. .cmd = hmp_qom_list,
  1513. },
  1514. STEXI
  1515. @item qom-list [@var{path}]
  1516. Print QOM properties of object at location @var{path}
  1517. ETEXI
  1518. {
  1519. .name = "qom-set",
  1520. .args_type = "path:s,property:s,value:s",
  1521. .params = "path property value",
  1522. .help = "set QOM property",
  1523. .cmd = hmp_qom_set,
  1524. },
  1525. STEXI
  1526. @item qom-set @var{path} @var{property} @var{value}
  1527. Set QOM property @var{property} of object at location @var{path} to value @var{value}
  1528. ETEXI
  1529. {
  1530. .name = "info",
  1531. .args_type = "item:s?",
  1532. .params = "[subcommand]",
  1533. .help = "show various information about the system state",
  1534. .cmd = hmp_info_help,
  1535. .sub_table = info_cmds,
  1536. },
  1537. STEXI
  1538. @end table
  1539. ETEXI