deprecated.rst 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  1. .. _Deprecated features:
  2. Deprecated features
  3. ===================
  4. In general features are intended to be supported indefinitely once
  5. introduced into QEMU. In the event that a feature needs to be removed,
  6. it will be listed in this section. The feature will remain functional for the
  7. release in which it was deprecated and one further release. After these two
  8. releases, the feature is liable to be removed. Deprecated features may also
  9. generate warnings on the console when QEMU starts up, or if activated via a
  10. monitor command, however, this is not a mandatory requirement.
  11. As a special exception to this general timeframe, rather than have an
  12. indefinite lifetime, versioned machine types are only intended to be
  13. supported for a period of 6 years, equivalent to 18 QEMU releases. All
  14. versioned machine types will be automatically marked deprecated after an
  15. initial 3 years (9 QEMU releases) has passed, and will then be deleted after
  16. a further 3 year period has passed. It is recommended that a deprecated
  17. machine type is only used for incoming migrations and restore of saved state,
  18. for pre-existing VM deployments. They should be scheduled for updating to a
  19. newer machine type during an appropriate service window. Newly deployed VMs
  20. should exclusively use a non-deprecated machine type, with use of the most
  21. recent version highly recommended. Non-versioned machine types follow the
  22. general feature deprecation policy.
  23. Prior to the 2.10.0 release there was no official policy on how
  24. long features would be deprecated prior to their removal, nor
  25. any documented list of which features were deprecated. Thus
  26. any features deprecated prior to 2.10.0 will be treated as if
  27. they were first deprecated in the 2.10.0 release.
  28. What follows is a list of all features currently marked as
  29. deprecated.
  30. System emulator command line arguments
  31. --------------------------------------
  32. Short-form boolean options (since 6.0)
  33. ''''''''''''''''''''''''''''''''''''''
  34. Boolean options such as ``share=on``/``share=off`` could be written
  35. in short form as ``share`` and ``noshare``. This is now deprecated
  36. and will cause a warning.
  37. ``delay`` option for socket character devices (since 6.0)
  38. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  39. The replacement for the ``nodelay`` short-form boolean option is ``nodelay=on``
  40. rather than ``delay=off``.
  41. Plugin argument passing through ``arg=<string>`` (since 6.1)
  42. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  43. Passing TCG plugins arguments through ``arg=`` is redundant is makes the
  44. command-line less readable, especially when the argument itself consist of a
  45. name and a value, e.g. ``-plugin plugin_name,arg="arg_name=arg_value"``.
  46. Therefore, the usage of ``arg`` is redundant. Single-word arguments are treated
  47. as short-form boolean values, and passed to plugins as ``arg_name=on``.
  48. However, short-form booleans are deprecated and full explicit ``arg_name=on``
  49. form is preferred.
  50. ``-smp`` (Unsupported "parameter=1" SMP configurations) (since 9.0)
  51. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  52. Specified CPU topology parameters must be supported by the machine.
  53. In the SMP configuration, users should provide the CPU topology parameters that
  54. are supported by the target machine.
  55. However, historically it was allowed for users to specify the unsupported
  56. topology parameter as "1", which is meaningless. So support for this kind of
  57. configurations (e.g. -smp drawers=1,books=1,clusters=1 for x86 PC machine) is
  58. marked deprecated since 9.0, users have to ensure that all the topology members
  59. described with -smp are supported by the target machine.
  60. ``-runas`` (since 9.1)
  61. ----------------------
  62. Use ``-run-with user=..`` instead.
  63. User-mode emulator command line arguments
  64. -----------------------------------------
  65. ``-p`` (since 9.0)
  66. ''''''''''''''''''
  67. The ``-p`` option pretends to control the host page size. However,
  68. it is not possible to change the host page size, and using the
  69. option only causes failures.
  70. QEMU Machine Protocol (QMP) commands
  71. ------------------------------------
  72. ``blockdev-open-tray``, ``blockdev-close-tray`` argument ``device`` (since 2.8)
  73. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  74. Use argument ``id`` instead.
  75. ``eject`` argument ``device`` (since 2.8)
  76. '''''''''''''''''''''''''''''''''''''''''
  77. Use argument ``id`` instead.
  78. ``blockdev-change-medium`` argument ``device`` (since 2.8)
  79. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  80. Use argument ``id`` instead.
  81. ``block_set_io_throttle`` argument ``device`` (since 2.8)
  82. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  83. Use argument ``id`` instead.
  84. ``blockdev-add`` empty string argument ``backing`` (since 2.10)
  85. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  86. Use argument value ``null`` instead.
  87. ``block-commit`` arguments ``base`` and ``top`` (since 3.1)
  88. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  89. Use arguments ``base-node`` and ``top-node`` instead.
  90. ``nbd-server-add`` and ``nbd-server-remove`` (since 5.2)
  91. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  92. Use the more generic commands ``block-export-add`` and ``block-export-del``
  93. instead. As part of this deprecation, where ``nbd-server-add`` used a
  94. single ``bitmap``, the new ``block-export-add`` uses a list of ``bitmaps``.
  95. ``query-qmp-schema`` return value member ``values`` (since 6.2)
  96. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  97. Member ``values`` in return value elements with meta-type ``enum`` is
  98. deprecated. Use ``members`` instead.
  99. ``drive-backup`` (since 6.2)
  100. ''''''''''''''''''''''''''''
  101. Use ``blockdev-backup`` in combination with ``blockdev-add`` instead.
  102. This change primarily separates the creation/opening process of the backup
  103. target with explicit, separate steps. ``blockdev-backup`` uses mostly the
  104. same arguments as ``drive-backup``, except the ``format`` and ``mode``
  105. options are removed in favor of using explicit ``blockdev-create`` and
  106. ``blockdev-add`` calls. See :doc:`/interop/live-block-operations` for
  107. details.
  108. Incorrectly typed ``device_add`` arguments (since 6.2)
  109. ''''''''''''''''''''''''''''''''''''''''''''''''''''''
  110. Due to shortcomings in the internal implementation of ``device_add``, QEMU
  111. incorrectly accepts certain invalid arguments: Any object or list arguments are
  112. silently ignored. Other argument types are not checked, but an implicit
  113. conversion happens, so that e.g. string values can be assigned to integer
  114. device properties or vice versa.
  115. This is a bug in QEMU that will be fixed in the future so that previously
  116. accepted incorrect commands will return an error. Users should make sure that
  117. all arguments passed to ``device_add`` are consistent with the documented
  118. property types.
  119. Host Architectures
  120. ------------------
  121. BE MIPS (since 7.2)
  122. '''''''''''''''''''
  123. As Debian 10 ("Buster") moved into LTS the big endian 32 bit version of
  124. MIPS moved out of support making it hard to maintain our
  125. cross-compilation CI tests of the architecture. As we no longer have
  126. CI coverage support may bitrot away before the deprecation process
  127. completes. The little endian variants of MIPS (both 32 and 64 bit) are
  128. still a supported host architecture.
  129. System emulation on 32-bit x86 hosts (since 8.0)
  130. ''''''''''''''''''''''''''''''''''''''''''''''''
  131. Support for 32-bit x86 host deployments is increasingly uncommon in mainstream
  132. OS distributions given the widespread availability of 64-bit x86 hardware.
  133. The QEMU project no longer considers 32-bit x86 support for system emulation to
  134. be an effective use of its limited resources, and thus intends to discontinue
  135. it. Since all recent x86 hardware from the past >10 years is capable of the
  136. 64-bit x86 extensions, a corresponding 64-bit OS should be used instead.
  137. TCG Plugin support not enabled by default on 32-bit hosts (since 9.2)
  138. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  139. While it is still possible to enable TCG plugin support for 32-bit
  140. hosts there are a number of potential pitfalls when instrumenting
  141. 64-bit guests. The plugin APIs typically pass most addresses as
  142. uint64_t but practices like encoding that address in a host pointer
  143. for passing as user-data will lose data. As most software analysis
  144. benefits from having plenty of host memory it seems reasonable to
  145. encourage users to use 64 bit builds of QEMU for analysis work
  146. whatever targets they are instrumenting.
  147. TCG Plugin support not enabled by default with TCI (since 9.2)
  148. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  149. While the TCG interpreter can interpret the TCG ops used by plugins it
  150. is going to be so much slower it wouldn't make sense for any serious
  151. instrumentation. Due to implementation differences there will also be
  152. anomalies in things like memory instrumentation.
  153. System emulator CPUs
  154. --------------------
  155. ``power5+`` and ``power7+`` CPU names (since 9.0)
  156. '''''''''''''''''''''''''''''''''''''''''''''''''
  157. The character "+" in device (and thus also CPU) names is not allowed
  158. in the QEMU object model anymore. ``power5+``, ``power5+_v2.1``,
  159. ``power7+`` and ``power7+_v2.1`` are currently still supported via
  160. an alias, but for consistency these will get removed in a future
  161. release, too. Use ``power5p_v2.1`` and ``power7p_v2.1`` instead.
  162. ``Sun-UltraSparc-IIIi+`` and ``Sun-UltraSparc-IV+`` CPU names (since 9.1)
  163. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  164. The character "+" in device (and thus also CPU) names is not allowed
  165. in the QEMU object model anymore. ``Sun-UltraSparc-IIIi+`` and
  166. ``Sun-UltraSparc-IV+`` are currently still supported via a workaround,
  167. but for consistency these will get removed in a future release, too.
  168. Use ``Sun-UltraSparc-IIIi-plus`` and ``Sun-UltraSparc-IV-plus`` instead.
  169. System emulator machines
  170. ------------------------
  171. Arm ``virt`` machine ``dtb-kaslr-seed`` property (since 7.1)
  172. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  173. The ``dtb-kaslr-seed`` property on the ``virt`` board has been
  174. deprecated; use the new name ``dtb-randomness`` instead. The new name
  175. better reflects the way this property affects all random data within
  176. the device tree blob, not just the ``kaslr-seed`` node.
  177. ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1)
  178. ''''''''''''''''''''''''''''''''''''''''''''''''''''''
  179. These old machine types are quite neglected nowadays and thus might have
  180. various pitfalls with regards to live migration. Use a newer machine type
  181. instead.
  182. ``pseries-2.1`` up to ``pseries-2.12`` (since 9.0)
  183. ''''''''''''''''''''''''''''''''''''''''''''''''''
  184. Older pseries machines before version 3.0 have undergone many changes
  185. to correct issues, mostly regarding migration compatibility. These are
  186. no longer maintained and removing them will make the code easier to
  187. read and maintain. Use versions 3.0 and above as a replacement.
  188. PPC 405 ``ref405ep`` machine (since 9.1)
  189. ''''''''''''''''''''''''''''''''''''''''
  190. The ``ref405ep`` machine and PPC 405 CPU have no known users, firmware
  191. images are not available, OpenWRT dropped support in 2019, U-Boot in
  192. 2017, Linux also is dropping support in 2024. It is time to let go of
  193. this ancient hardware and focus on newer CPUs and platforms.
  194. Arm ``tacoma-bmc`` machine (since 9.1)
  195. ''''''''''''''''''''''''''''''''''''''''
  196. The ``tacoma-bmc`` machine was a board including an AST2600 SoC based
  197. BMC and a witherspoon like OpenPOWER system. It was used for bring up
  198. of the AST2600 SoC in labs. It can be easily replaced by the
  199. ``rainier-bmc`` machine which is a real product.
  200. Backend options
  201. ---------------
  202. Using non-persistent backing file with pmem=on (since 6.1)
  203. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  204. This option is used when ``memory-backend-file`` is consumed by emulated NVDIMM
  205. device. However enabling ``memory-backend-file.pmem`` option, when backing file
  206. is (a) not DAX capable or (b) not on a filesystem that support direct mapping
  207. of persistent memory, is not safe and may lead to data loss or corruption in case
  208. of host crash.
  209. Options are:
  210. - modify VM configuration to set ``pmem=off`` to continue using fake NVDIMM
  211. (without persistence guaranties) with backing file on non DAX storage
  212. - move backing file to NVDIMM storage and keep ``pmem=on``
  213. (to have NVDIMM with persistence guaranties).
  214. Device options
  215. --------------
  216. Emulated device options
  217. '''''''''''''''''''''''
  218. ``-device nvme-ns,eui64-default=on|off`` (since 7.1)
  219. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  220. In QEMU versions 6.1, 6.2 and 7.0, the ``nvme-ns`` generates an EUI-64
  221. identifier that is not globally unique. If an EUI-64 identifier is required, the
  222. user must set it explicitly using the ``nvme-ns`` device parameter ``eui64``.
  223. ``-device nvme,use-intel-id=on|off`` (since 7.1)
  224. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  225. The ``nvme`` device originally used a PCI Vendor/Device Identifier combination
  226. from Intel that was not properly allocated. Since version 5.2, the controller
  227. has used a properly allocated identifier. Deprecate the ``use-intel-id``
  228. machine compatibility parameter.
  229. ``-device cxl-type3,memdev=xxxx`` (since 8.0)
  230. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  231. The ``cxl-type3`` device initially only used a single memory backend. With
  232. the addition of volatile memory support, it is now necessary to distinguish
  233. between persistent and volatile memory backends. As such, memdev is deprecated
  234. in favor of persistent-memdev.
  235. RISC-V CPU properties which start with capital 'Z' (since 8.2)
  236. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  237. All RISC-V CPU properties which start with capital 'Z' are being deprecated
  238. starting in 8.2. The reason is that they were wrongly added with capital 'Z'
  239. in the past. CPU properties were later added with lower-case names, which
  240. is the format we want to use from now on.
  241. Users which try to use these deprecated properties will receive a warning
  242. recommending to switch to their stable counterparts:
  243. - "Zifencei" should be replaced with "zifencei"
  244. - "Zicsr" should be replaced with "zicsr"
  245. - "Zihintntl" should be replaced with "zihintntl"
  246. - "Zihintpause" should be replaced with "zihintpause"
  247. - "Zawrs" should be replaced with "zawrs"
  248. - "Zfa" should be replaced with "zfa"
  249. - "Zfh" should be replaced with "zfh"
  250. - "Zfhmin" should be replaced with "zfhmin"
  251. - "Zve32f" should be replaced with "zve32f"
  252. - "Zve64f" should be replaced with "zve64f"
  253. - "Zve64d" should be replaced with "zve64d"
  254. ``-device sd-card,spec_version=1`` (since 9.1)
  255. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  256. SD physical layer specification v2.00 supersedes the v1.10 one.
  257. v2.00 is the default since QEMU 3.0.0.
  258. Block device options
  259. ''''''''''''''''''''
  260. ``"backing": ""`` (since 2.12)
  261. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  262. In order to prevent QEMU from automatically opening an image's backing
  263. chain, use ``"backing": null`` instead.
  264. ``rbd`` keyvalue pair encoded filenames: ``""`` (since 3.1)
  265. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  266. Options for ``rbd`` should be specified according to its runtime options,
  267. like other block drivers. Legacy parsing of keyvalue pair encoded
  268. filenames is useful to open images with the old format for backing files;
  269. These image files should be updated to use the current format.
  270. Example of legacy encoding::
  271. json:{"file.driver":"rbd", "file.filename":"rbd:rbd/name"}
  272. The above, converted to the current supported format::
  273. json:{"file.driver":"rbd", "file.pool":"rbd", "file.image":"name"}
  274. ``iscsi,password=xxx`` (since 8.0)
  275. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  276. Specifying the iSCSI password in plain text on the command line using the
  277. ``password`` option is insecure. The ``password-secret`` option should be
  278. used instead, to refer to a ``--object secret...`` instance that provides
  279. a password via a file, or encrypted.
  280. Character device options
  281. ''''''''''''''''''''''''
  282. Backend ``memory`` (since 9.0)
  283. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  284. ``memory`` is a deprecated synonym for ``ringbuf``.
  285. CPU device properties
  286. '''''''''''''''''''''
  287. ``pcommit`` on x86 (since 9.1)
  288. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  289. The PCOMMIT instruction was never included in any physical processor.
  290. It was implemented as a no-op instruction in TCG up to QEMU 9.0, but
  291. only with ``-cpu max`` (which does not guarantee migration compatibility
  292. across versions).
  293. ``pmu-num=n`` on RISC-V CPUs (since 8.2)
  294. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  295. In order to support more flexible counter configurations this has been replaced
  296. by a ``pmu-mask`` property. If set of counters is continuous then the mask can
  297. be calculated with ``((2 ^ n) - 1) << 3``. The least significant three bits
  298. must be left clear.
  299. Backwards compatibility
  300. -----------------------
  301. Runnability guarantee of CPU models (since 4.1)
  302. '''''''''''''''''''''''''''''''''''''''''''''''
  303. Previous versions of QEMU never changed existing CPU models in
  304. ways that introduced additional host software or hardware
  305. requirements to the VM. This allowed management software to
  306. safely change the machine type of an existing VM without
  307. introducing new requirements ("runnability guarantee"). This
  308. prevented CPU models from being updated to include CPU
  309. vulnerability mitigations, leaving guests vulnerable in the
  310. default configuration.
  311. The CPU model runnability guarantee won't apply anymore to
  312. existing CPU models. Management software that needs runnability
  313. guarantees must resolve the CPU model aliases using the
  314. ``alias-of`` field returned by the ``query-cpu-definitions`` QMP
  315. command.
  316. While those guarantees are kept, the return value of
  317. ``query-cpu-definitions`` will have existing CPU model aliases
  318. point to a version that doesn't break runnability guarantees
  319. (specifically, version 1 of those CPU models). In future QEMU
  320. versions, aliases will point to newer CPU model versions
  321. depending on the machine type, so management software must
  322. resolve CPU model aliases before starting a virtual machine.
  323. RISC-V "virt" board "riscv,delegate" DT property (since 9.1)
  324. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  325. The "riscv,delegate" DT property was added in QEMU 7.0 as part of
  326. the AIA APLIC support. The property changed name during the review
  327. process in Linux and the correct name ended up being
  328. "riscv,delegation". Changing the DT property name will break all
  329. available firmwares that are using the current (wrong) name. The
  330. property is kept as is in 9.1, together with "riscv,delegation", to
  331. give more time for firmware developers to change their code.
  332. Migration
  333. ---------
  334. ``fd:`` URI when used for file migration (since 9.1)
  335. ''''''''''''''''''''''''''''''''''''''''''''''''''''
  336. The ``fd:`` URI can currently provide a file descriptor that
  337. references either a socket or a plain file. These are two different
  338. types of migration. In order to reduce ambiguity, the ``fd:`` URI
  339. usage of providing a file descriptor to a plain file has been
  340. deprecated in favor of explicitly using the ``file:`` URI with the
  341. file descriptor being passed as an ``fdset``. Refer to the ``add-fd``
  342. command documentation for details on the ``fdset`` usage.