hmp-commands.hx 54 KB

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