hmp-commands.hx 51 KB

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