misc.json 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  1. # -*- Mode: Python -*-
  2. # vim: filetype=python
  3. #
  4. ##
  5. # = Miscellanea
  6. ##
  7. { 'include': 'common.json' }
  8. ##
  9. # @add_client:
  10. #
  11. # Allow client connections for VNC, Spice and socket based
  12. # character devices to be passed in to QEMU via SCM_RIGHTS.
  13. #
  14. # @protocol: protocol name. Valid names are "vnc", "spice", "@dbus-display" or
  15. # the name of a character device (eg. from -chardev id=XXXX)
  16. #
  17. # @fdname: file descriptor name previously passed via 'getfd' command
  18. #
  19. # @skipauth: whether to skip authentication. Only applies
  20. # to "vnc" and "spice" protocols
  21. #
  22. # @tls: whether to perform TLS. Only applies to the "spice"
  23. # protocol
  24. #
  25. # Returns: nothing on success.
  26. #
  27. # Since: 0.14
  28. #
  29. # Example:
  30. #
  31. # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
  32. # "fdname": "myclient" } }
  33. # <- { "return": {} }
  34. #
  35. ##
  36. { 'command': 'add_client',
  37. 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
  38. '*tls': 'bool' } }
  39. ##
  40. # @NameInfo:
  41. #
  42. # Guest name information.
  43. #
  44. # @name: The name of the guest
  45. #
  46. # Since: 0.14
  47. ##
  48. { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
  49. ##
  50. # @query-name:
  51. #
  52. # Return the name information of a guest.
  53. #
  54. # Returns: @NameInfo of the guest
  55. #
  56. # Since: 0.14
  57. #
  58. # Example:
  59. #
  60. # -> { "execute": "query-name" }
  61. # <- { "return": { "name": "qemu-name" } }
  62. #
  63. ##
  64. { 'command': 'query-name', 'returns': 'NameInfo', 'allow-preconfig': true }
  65. ##
  66. # @IOThreadInfo:
  67. #
  68. # Information about an iothread
  69. #
  70. # @id: the identifier of the iothread
  71. #
  72. # @thread-id: ID of the underlying host thread
  73. #
  74. # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
  75. # (since 2.9)
  76. #
  77. # @poll-grow: how many ns will be added to polling time, 0 means that it's not
  78. # configured (since 2.9)
  79. #
  80. # @poll-shrink: how many ns will be removed from polling time, 0 means that
  81. # it's not configured (since 2.9)
  82. #
  83. # @aio-max-batch: maximum number of requests in a batch for the AIO engine,
  84. # 0 means that the engine will use its default (since 6.1)
  85. #
  86. # Since: 2.0
  87. ##
  88. { 'struct': 'IOThreadInfo',
  89. 'data': {'id': 'str',
  90. 'thread-id': 'int',
  91. 'poll-max-ns': 'int',
  92. 'poll-grow': 'int',
  93. 'poll-shrink': 'int',
  94. 'aio-max-batch': 'int' } }
  95. ##
  96. # @query-iothreads:
  97. #
  98. # Returns a list of information about each iothread.
  99. #
  100. # Note: this list excludes the QEMU main loop thread, which is not declared
  101. # using the -object iothread command-line option. It is always the main thread
  102. # of the process.
  103. #
  104. # Returns: a list of @IOThreadInfo for each iothread
  105. #
  106. # Since: 2.0
  107. #
  108. # Example:
  109. #
  110. # -> { "execute": "query-iothreads" }
  111. # <- { "return": [
  112. # {
  113. # "id":"iothread0",
  114. # "thread-id":3134
  115. # },
  116. # {
  117. # "id":"iothread1",
  118. # "thread-id":3135
  119. # }
  120. # ]
  121. # }
  122. #
  123. ##
  124. { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
  125. 'allow-preconfig': true }
  126. ##
  127. # @stop:
  128. #
  129. # Stop all guest VCPU execution.
  130. #
  131. # Since: 0.14
  132. #
  133. # Notes: This function will succeed even if the guest is already in the stopped
  134. # state. In "inmigrate" state, it will ensure that the guest
  135. # remains paused once migration finishes, as if the -S option was
  136. # passed on the command line.
  137. #
  138. # Example:
  139. #
  140. # -> { "execute": "stop" }
  141. # <- { "return": {} }
  142. #
  143. ##
  144. { 'command': 'stop' }
  145. ##
  146. # @cont:
  147. #
  148. # Resume guest VCPU execution.
  149. #
  150. # Since: 0.14
  151. #
  152. # Returns: If successful, nothing
  153. #
  154. # Notes: This command will succeed if the guest is currently running. It
  155. # will also succeed if the guest is in the "inmigrate" state; in
  156. # this case, the effect of the command is to make sure the guest
  157. # starts once migration finishes, removing the effect of the -S
  158. # command line option if it was passed.
  159. #
  160. # Example:
  161. #
  162. # -> { "execute": "cont" }
  163. # <- { "return": {} }
  164. #
  165. ##
  166. { 'command': 'cont' }
  167. ##
  168. # @x-exit-preconfig:
  169. #
  170. # Exit from "preconfig" state
  171. #
  172. # This command makes QEMU exit the preconfig state and proceed with
  173. # VM initialization using configuration data provided on the command line
  174. # and via the QMP monitor during the preconfig state. The command is only
  175. # available during the preconfig state (i.e. when the --preconfig command
  176. # line option was in use).
  177. #
  178. # Features:
  179. # @unstable: This command is experimental.
  180. #
  181. # Since 3.0
  182. #
  183. # Returns: nothing
  184. #
  185. # Example:
  186. #
  187. # -> { "execute": "x-exit-preconfig" }
  188. # <- { "return": {} }
  189. #
  190. ##
  191. { 'command': 'x-exit-preconfig', 'allow-preconfig': true,
  192. 'features': [ 'unstable' ] }
  193. ##
  194. # @human-monitor-command:
  195. #
  196. # Execute a command on the human monitor and return the output.
  197. #
  198. # @command-line: the command to execute in the human monitor
  199. #
  200. # @cpu-index: The CPU to use for commands that require an implicit CPU
  201. #
  202. # Features:
  203. # @savevm-monitor-nodes: If present, HMP command savevm only snapshots
  204. # monitor-owned nodes if they have no parents.
  205. # This allows the use of 'savevm' with
  206. # -blockdev. (since 4.2)
  207. #
  208. # Returns: the output of the command as a string
  209. #
  210. # Since: 0.14
  211. #
  212. # Notes: This command only exists as a stop-gap. Its use is highly
  213. # discouraged. The semantics of this command are not
  214. # guaranteed: this means that command names, arguments and
  215. # responses can change or be removed at ANY time. Applications
  216. # that rely on long term stability guarantees should NOT
  217. # use this command.
  218. #
  219. # Known limitations:
  220. #
  221. # * This command is stateless, this means that commands that depend
  222. # on state information (such as getfd) might not work
  223. #
  224. # * Commands that prompt the user for data don't currently work
  225. #
  226. # Example:
  227. #
  228. # -> { "execute": "human-monitor-command",
  229. # "arguments": { "command-line": "info kvm" } }
  230. # <- { "return": "kvm support: enabled\r\n" }
  231. #
  232. ##
  233. { 'command': 'human-monitor-command',
  234. 'data': {'command-line': 'str', '*cpu-index': 'int'},
  235. 'returns': 'str',
  236. 'features': [ 'savevm-monitor-nodes' ] }
  237. ##
  238. # @getfd:
  239. #
  240. # Receive a file descriptor via SCM rights and assign it a name
  241. #
  242. # @fdname: file descriptor name
  243. #
  244. # Returns: Nothing on success
  245. #
  246. # Since: 0.14
  247. #
  248. # Notes: If @fdname already exists, the file descriptor assigned to
  249. # it will be closed and replaced by the received file
  250. # descriptor.
  251. #
  252. # The 'closefd' command can be used to explicitly close the
  253. # file descriptor when it is no longer needed.
  254. #
  255. # Example:
  256. #
  257. # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
  258. # <- { "return": {} }
  259. #
  260. ##
  261. { 'command': 'getfd', 'data': {'fdname': 'str'} }
  262. ##
  263. # @closefd:
  264. #
  265. # Close a file descriptor previously passed via SCM rights
  266. #
  267. # @fdname: file descriptor name
  268. #
  269. # Returns: Nothing on success
  270. #
  271. # Since: 0.14
  272. #
  273. # Example:
  274. #
  275. # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
  276. # <- { "return": {} }
  277. #
  278. ##
  279. { 'command': 'closefd', 'data': {'fdname': 'str'} }
  280. ##
  281. # @AddfdInfo:
  282. #
  283. # Information about a file descriptor that was added to an fd set.
  284. #
  285. # @fdset-id: The ID of the fd set that @fd was added to.
  286. #
  287. # @fd: The file descriptor that was received via SCM rights and
  288. # added to the fd set.
  289. #
  290. # Since: 1.2
  291. ##
  292. { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
  293. ##
  294. # @add-fd:
  295. #
  296. # Add a file descriptor, that was passed via SCM rights, to an fd set.
  297. #
  298. # @fdset-id: The ID of the fd set to add the file descriptor to.
  299. #
  300. # @opaque: A free-form string that can be used to describe the fd.
  301. #
  302. # Returns: - @AddfdInfo on success
  303. # - If file descriptor was not received, FdNotSupplied
  304. # - If @fdset-id is a negative value, InvalidParameterValue
  305. #
  306. # Notes: The list of fd sets is shared by all monitor connections.
  307. #
  308. # If @fdset-id is not specified, a new fd set will be created.
  309. #
  310. # Since: 1.2
  311. #
  312. # Example:
  313. #
  314. # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
  315. # <- { "return": { "fdset-id": 1, "fd": 3 } }
  316. #
  317. ##
  318. { 'command': 'add-fd',
  319. 'data': { '*fdset-id': 'int',
  320. '*opaque': 'str' },
  321. 'returns': 'AddfdInfo' }
  322. ##
  323. # @remove-fd:
  324. #
  325. # Remove a file descriptor from an fd set.
  326. #
  327. # @fdset-id: The ID of the fd set that the file descriptor belongs to.
  328. #
  329. # @fd: The file descriptor that is to be removed.
  330. #
  331. # Returns: - Nothing on success
  332. # - If @fdset-id or @fd is not found, FdNotFound
  333. #
  334. # Since: 1.2
  335. #
  336. # Notes: The list of fd sets is shared by all monitor connections.
  337. #
  338. # If @fd is not specified, all file descriptors in @fdset-id
  339. # will be removed.
  340. #
  341. # Example:
  342. #
  343. # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
  344. # <- { "return": {} }
  345. #
  346. ##
  347. { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
  348. ##
  349. # @FdsetFdInfo:
  350. #
  351. # Information about a file descriptor that belongs to an fd set.
  352. #
  353. # @fd: The file descriptor value.
  354. #
  355. # @opaque: A free-form string that can be used to describe the fd.
  356. #
  357. # Since: 1.2
  358. ##
  359. { 'struct': 'FdsetFdInfo',
  360. 'data': {'fd': 'int', '*opaque': 'str'} }
  361. ##
  362. # @FdsetInfo:
  363. #
  364. # Information about an fd set.
  365. #
  366. # @fdset-id: The ID of the fd set.
  367. #
  368. # @fds: A list of file descriptors that belong to this fd set.
  369. #
  370. # Since: 1.2
  371. ##
  372. { 'struct': 'FdsetInfo',
  373. 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
  374. ##
  375. # @query-fdsets:
  376. #
  377. # Return information describing all fd sets.
  378. #
  379. # Returns: A list of @FdsetInfo
  380. #
  381. # Since: 1.2
  382. #
  383. # Note: The list of fd sets is shared by all monitor connections.
  384. #
  385. # Example:
  386. #
  387. # -> { "execute": "query-fdsets" }
  388. # <- { "return": [
  389. # {
  390. # "fds": [
  391. # {
  392. # "fd": 30,
  393. # "opaque": "rdonly:/path/to/file"
  394. # },
  395. # {
  396. # "fd": 24,
  397. # "opaque": "rdwr:/path/to/file"
  398. # }
  399. # ],
  400. # "fdset-id": 1
  401. # },
  402. # {
  403. # "fds": [
  404. # {
  405. # "fd": 28
  406. # },
  407. # {
  408. # "fd": 29
  409. # }
  410. # ],
  411. # "fdset-id": 0
  412. # }
  413. # ]
  414. # }
  415. #
  416. ##
  417. { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
  418. ##
  419. # @CommandLineParameterType:
  420. #
  421. # Possible types for an option parameter.
  422. #
  423. # @string: accepts a character string
  424. #
  425. # @boolean: accepts "on" or "off"
  426. #
  427. # @number: accepts a number
  428. #
  429. # @size: accepts a number followed by an optional suffix (K)ilo,
  430. # (M)ega, (G)iga, (T)era
  431. #
  432. # Since: 1.5
  433. ##
  434. { 'enum': 'CommandLineParameterType',
  435. 'data': ['string', 'boolean', 'number', 'size'] }
  436. ##
  437. # @CommandLineParameterInfo:
  438. #
  439. # Details about a single parameter of a command line option.
  440. #
  441. # @name: parameter name
  442. #
  443. # @type: parameter @CommandLineParameterType
  444. #
  445. # @help: human readable text string, not suitable for parsing.
  446. #
  447. # @default: default value string (since 2.1)
  448. #
  449. # Since: 1.5
  450. ##
  451. { 'struct': 'CommandLineParameterInfo',
  452. 'data': { 'name': 'str',
  453. 'type': 'CommandLineParameterType',
  454. '*help': 'str',
  455. '*default': 'str' } }
  456. ##
  457. # @CommandLineOptionInfo:
  458. #
  459. # Details about a command line option, including its list of parameter details
  460. #
  461. # @option: option name
  462. #
  463. # @parameters: an array of @CommandLineParameterInfo
  464. #
  465. # Since: 1.5
  466. ##
  467. { 'struct': 'CommandLineOptionInfo',
  468. 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
  469. ##
  470. # @query-command-line-options:
  471. #
  472. # Query command line option schema.
  473. #
  474. # @option: option name
  475. #
  476. # Returns: list of @CommandLineOptionInfo for all options (or for the given
  477. # @option). Returns an error if the given @option doesn't exist.
  478. #
  479. # Since: 1.5
  480. #
  481. # Example:
  482. #
  483. # -> { "execute": "query-command-line-options",
  484. # "arguments": { "option": "option-rom" } }
  485. # <- { "return": [
  486. # {
  487. # "parameters": [
  488. # {
  489. # "name": "romfile",
  490. # "type": "string"
  491. # },
  492. # {
  493. # "name": "bootindex",
  494. # "type": "number"
  495. # }
  496. # ],
  497. # "option": "option-rom"
  498. # }
  499. # ]
  500. # }
  501. #
  502. ##
  503. {'command': 'query-command-line-options',
  504. 'data': { '*option': 'str' },
  505. 'returns': ['CommandLineOptionInfo'],
  506. 'allow-preconfig': true }