2
0

hmp-commands.hx 53 KB

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