2
0

hmp-commands.hx 54 KB

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