hmp-commands.hx 52 KB

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