You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

hmp-commands.hx 56KB

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