Merge remote-tracking branch 'remotes/xtensa/tags/20210403-xtensa' into staging
[qemu/ar7.git] / docs / system / deprecated.rst
blob80cae862528a3a81410c30e738e8c4e8f7f0bdc9
1 Deprecated features
2 ===================
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.
12 Prior to the 2.10.0 release there was no official policy on how
13 long features would be deprecated prior to their removal, nor
14 any documented list of which features were deprecated. Thus
15 any features deprecated prior to 2.10.0 will be treated as if
16 they were first deprecated in the 2.10.0 release.
18 What follows is a list of all features currently marked as
19 deprecated.
21 System emulator command line arguments
22 --------------------------------------
24 ``QEMU_AUDIO_`` environment variables and ``-audio-help`` (since 4.0)
25 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
27 The ``-audiodev`` argument is now the preferred way to specify audio
28 backend settings instead of environment variables.  To ease migration to
29 the new format, the ``-audiodev-help`` option can be used to convert
30 the current values of the environment variables to ``-audiodev`` options.
32 Creating sound card devices and vnc without ``audiodev=`` property (since 4.2)
33 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
35 When not using the deprecated legacy audio config, each sound card
36 should specify an ``audiodev=`` property.  Additionally, when using
37 vnc, you should specify an ``audiodev=`` property if you plan to
38 transmit audio through the VNC protocol.
40 Creating sound card devices using ``-soundhw`` (since 5.1)
41 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
43 Sound card devices should be created using ``-device`` instead.  The
44 names are the same for most devices.  The exceptions are ``hda`` which
45 needs two devices (``-device intel-hda -device hda-duplex``) and
46 ``pcspk`` which can be activated using ``-machine
47 pcspk-audiodev=<name>``.
49 ``-chardev`` backend aliases ``tty`` and ``parport`` (since 6.0)
50 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
52 ``tty`` and ``parport`` are aliases that will be removed. Instead, the
53 actual backend names ``serial`` and ``parallel`` should be used.
55 RISC-V ``-bios`` (since 5.1)
56 ''''''''''''''''''''''''''''
58 QEMU 4.1 introduced support for the -bios option in QEMU for RISC-V for the
59 RISC-V virt machine and sifive_u machine. QEMU 4.1 had no changes to the
60 default behaviour to avoid breakages.
62 QEMU 5.1 changes the default behaviour from ``-bios none`` to ``-bios default``.
64 QEMU 5.1 has three options:
65  1. ``-bios default`` - This is the current default behavior if no -bios option
66       is included. This option will load the default OpenSBI firmware automatically.
67       The firmware is included with the QEMU release and no user interaction is
68       required. All a user needs to do is specify the kernel they want to boot
69       with the -kernel option
70  2. ``-bios none`` - QEMU will not automatically load any firmware. It is up
71       to the user to load all the images they need.
72  3. ``-bios <file>`` - Tells QEMU to load the specified file as the firmwrae.
74 Short-form boolean options (since 6.0)
75 ''''''''''''''''''''''''''''''''''''''
77 Boolean options such as ``share=on``/``share=off`` could be written
78 in short form as ``share`` and ``noshare``.  This is now deprecated
79 and will cause a warning.
81 ``delay`` option for socket character devices (since 6.0)
82 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
84 The replacement for the ``nodelay`` short-form boolean option is ``nodelay=on``
85 rather than ``delay=off``.
87 ``--enable-fips`` (since 6.0)
88 '''''''''''''''''''''''''''''
90 This option restricts usage of certain cryptographic algorithms when
91 the host is operating in FIPS mode.
93 If FIPS compliance is required, QEMU should be built with the ``libgcrypt``
94 library enabled as a cryptography provider.
96 Neither the ``nettle`` library, or the built-in cryptography provider are
97 supported on FIPS enabled hosts.
99 ``-writeconfig`` (since 6.0)
100 '''''''''''''''''''''''''''''
102 The ``-writeconfig`` option is not able to serialize the entire contents
103 of the QEMU command line.  It is thus considered a failed experiment
104 and deprecated, with no current replacement.
106 Userspace local APIC with KVM (x86, since 6.0)
107 ''''''''''''''''''''''''''''''''''''''''''''''
109 Using ``-M kernel-irqchip=off`` with x86 machine types that include a local
110 APIC is deprecated.  The ``split`` setting is supported, as is using
111 ``-M kernel-irqchip=off`` with the ISA PC machine type.
113 hexadecimal sizes with scaling multipliers (since 6.0)
114 ''''''''''''''''''''''''''''''''''''''''''''''''''''''
116 Input parameters that take a size value should only use a size suffix
117 (such as 'k' or 'M') when the base is written in decimal, and not when
118 the value is hexadecimal.  That is, '0x20M' is deprecated, and should
119 be written either as '32M' or as '0x2000000'.
121 ``-spice password=string`` (since 6.0)
122 ''''''''''''''''''''''''''''''''''''''
124 This option is insecure because the SPICE password remains visible in
125 the process listing. This is replaced by the new ``password-secret``
126 option which lets the password be securely provided on the command
127 line using a ``secret`` object instance.
129 ``opened`` property of ``rng-*`` objects (since 6.0.0)
130 ''''''''''''''''''''''''''''''''''''''''''''''''''''''
132 The only effect of specifying ``opened=on`` in the command line or QMP
133 ``object-add`` is that the device is opened immediately, possibly before all
134 other options have been processed.  This will either have no effect (if
135 ``opened`` was the last option) or cause errors.  The property is therefore
136 useless and should not be specified.
138 ``loaded`` property of ``secret`` and ``secret_keyring`` objects (since 6.0.0)
139 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
141 The only effect of specifying ``loaded=on`` in the command line or QMP
142 ``object-add`` is that the secret is loaded immediately, possibly before all
143 other options have been processed.  This will either have no effect (if
144 ``loaded`` was the last option) or cause options to be effectively ignored as
145 if they were not given.  The property is therefore useless and should not be
146 specified.
149 QEMU Machine Protocol (QMP) commands
150 ------------------------------------
152 ``blockdev-open-tray``, ``blockdev-close-tray`` argument ``device`` (since 2.8.0)
153 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
155 Use argument ``id`` instead.
157 ``eject`` argument ``device`` (since 2.8.0)
158 '''''''''''''''''''''''''''''''''''''''''''
160 Use argument ``id`` instead.
162 ``blockdev-change-medium`` argument ``device`` (since 2.8.0)
163 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
165 Use argument ``id`` instead.
167 ``block_set_io_throttle`` argument ``device`` (since 2.8.0)
168 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
170 Use argument ``id`` instead.
172 ``blockdev-add`` empty string argument ``backing`` (since 2.10.0)
173 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
175 Use argument value ``null`` instead.
177 ``block-commit`` arguments ``base`` and ``top`` (since 3.1.0)
178 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
180 Use arguments ``base-node`` and ``top-node`` instead.
182 ``nbd-server-add`` and ``nbd-server-remove`` (since 5.2)
183 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
185 Use the more generic commands ``block-export-add`` and ``block-export-del``
186 instead.  As part of this deprecation, where ``nbd-server-add`` used a
187 single ``bitmap``, the new ``block-export-add`` uses a list of ``bitmaps``.
189 System accelerators
190 -------------------
192 MIPS ``Trap-and-Emul`` KVM support (since 6.0)
193 ''''''''''''''''''''''''''''''''''''''''''''''
195 The MIPS ``Trap-and-Emul`` KVM host and guest support has been removed
196 from Linux upstream kernel, declare it deprecated.
198 System emulator CPUS
199 --------------------
201 ``moxie`` CPU (since 5.2.0)
202 '''''''''''''''''''''''''''
204 The ``moxie`` guest CPU support is deprecated and will be removed in
205 a future version of QEMU. It's unclear whether anybody is still using
206 CPU emulation in QEMU, and there are no test images available to make
207 sure that the code is still working.
209 ``lm32`` CPUs (since 5.2.0)
210 '''''''''''''''''''''''''''
212 The ``lm32`` guest CPU support is deprecated and will be removed in
213 a future version of QEMU. The only public user of this architecture
214 was the milkymist project, which has been dead for years; there was
215 never an upstream Linux port.
217 ``unicore32`` CPUs (since 5.2.0)
218 ''''''''''''''''''''''''''''''''
220 The ``unicore32`` guest CPU support is deprecated and will be removed in
221 a future version of QEMU. Support for this CPU was removed from the
222 upstream Linux kernel, and there is no available upstream toolchain
223 to build binaries for it.
225 ``Icelake-Client`` CPU Model (since 5.2.0)
226 ''''''''''''''''''''''''''''''''''''''''''
228 ``Icelake-Client`` CPU Models are deprecated. Use ``Icelake-Server`` CPU
229 Models instead.
231 MIPS ``I7200`` CPU Model (since 5.2)
232 ''''''''''''''''''''''''''''''''''''
234 The ``I7200`` guest CPU relies on the nanoMIPS ISA, which is deprecated
235 (the ISA has never been upstreamed to a compiler toolchain). Therefore
236 this CPU is also deprecated.
238 System emulator machines
239 ------------------------
241 Raspberry Pi ``raspi2`` and ``raspi3`` machines (since 5.2)
242 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
244 The Raspberry Pi machines come in various models (A, A+, B, B+). To be able
245 to distinguish which model QEMU is implementing, the ``raspi2`` and ``raspi3``
246 machines have been renamed ``raspi2b`` and ``raspi3b``.
248 Device options
249 --------------
251 Emulated device options
252 '''''''''''''''''''''''
254 ``-device virtio-blk,scsi=on|off`` (since 5.0.0)
255 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
257 The virtio-blk SCSI passthrough feature is a legacy VIRTIO feature.  VIRTIO 1.0
258 and later do not support it because the virtio-scsi device was introduced for
259 full SCSI support.  Use virtio-scsi instead when SCSI passthrough is required.
261 Note this also applies to ``-device virtio-blk-pci,scsi=on|off``, which is an
262 alias.
264 Block device options
265 ''''''''''''''''''''
267 ``"backing": ""`` (since 2.12.0)
268 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
270 In order to prevent QEMU from automatically opening an image's backing
271 chain, use ``"backing": null`` instead.
273 ``rbd`` keyvalue pair encoded filenames: ``""`` (since 3.1.0)
274 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
276 Options for ``rbd`` should be specified according to its runtime options,
277 like other block drivers.  Legacy parsing of keyvalue pair encoded
278 filenames is useful to open images with the old format for backing files;
279 These image files should be updated to use the current format.
281 Example of legacy encoding::
283   json:{"file.driver":"rbd", "file.filename":"rbd:rbd/name"}
285 The above, converted to the current supported format::
287   json:{"file.driver":"rbd", "file.pool":"rbd", "file.image":"name"}
289 ``sheepdog`` driver (since 5.2.0)
290 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
292 The ``sheepdog`` block device driver is deprecated. The corresponding upstream
293 server project is no longer actively maintained. Users are recommended to switch
294 to an alternative distributed block device driver such as RBD. The
295 ``qemu-img convert`` command can be used to liberate existing data by moving
296 it out of sheepdog volumes into an alternative storage backend.
298 linux-user mode CPUs
299 --------------------
301 ``ppc64abi32`` CPUs (since 5.2.0)
302 '''''''''''''''''''''''''''''''''
304 The ``ppc64abi32`` architecture has a number of issues which regularly
305 trip up our CI testing and is suspected to be quite broken. For that
306 reason the maintainers strongly suspect no one actually uses it.
308 MIPS ``I7200`` CPU (since 5.2)
309 ''''''''''''''''''''''''''''''
311 The ``I7200`` guest CPU relies on the nanoMIPS ISA, which is deprecated
312 (the ISA has never been upstreamed to a compiler toolchain). Therefore
313 this CPU is also deprecated.
315 Related binaries
316 ----------------
318 qemu-img amend to adjust backing file (since 5.1)
319 '''''''''''''''''''''''''''''''''''''''''''''''''
321 The use of ``qemu-img amend`` to modify the name or format of a qcow2
322 backing image is deprecated; this functionality was never fully
323 documented or tested, and interferes with other amend operations that
324 need access to the original backing image (such as deciding whether a
325 v3 zero cluster may be left unallocated when converting to a v2
326 image).  Rather, any changes to the backing chain should be performed
327 with ``qemu-img rebase -u`` either before or after the remaining
328 changes being performed by amend, as appropriate.
330 qemu-img backing file without format (since 5.1)
331 ''''''''''''''''''''''''''''''''''''''''''''''''
333 The use of ``qemu-img create``, ``qemu-img rebase``, or ``qemu-img
334 convert`` to create or modify an image that depends on a backing file
335 now recommends that an explicit backing format be provided.  This is
336 for safety: if QEMU probes a different format than what you thought,
337 the data presented to the guest will be corrupt; similarly, presenting
338 a raw image to a guest allows a potential security exploit if a future
339 probe sees a non-raw image based on guest writes.
341 To avoid the warning message, or even future refusal to create an
342 unsafe image, you must pass ``-o backing_fmt=`` (or the shorthand
343 ``-F`` during create) to specify the intended backing format.  You may
344 use ``qemu-img rebase -u`` to retroactively add a backing format to an
345 existing image.  However, be aware that there are already potential
346 security risks to blindly using ``qemu-img info`` to probe the format
347 of an untrusted backing image, when deciding what format to add into
348 an existing image.
350 Backwards compatibility
351 -----------------------
353 Runnability guarantee of CPU models (since 4.1.0)
354 '''''''''''''''''''''''''''''''''''''''''''''''''
356 Previous versions of QEMU never changed existing CPU models in
357 ways that introduced additional host software or hardware
358 requirements to the VM.  This allowed management software to
359 safely change the machine type of an existing VM without
360 introducing new requirements ("runnability guarantee").  This
361 prevented CPU models from being updated to include CPU
362 vulnerability mitigations, leaving guests vulnerable in the
363 default configuration.
365 The CPU model runnability guarantee won't apply anymore to
366 existing CPU models.  Management software that needs runnability
367 guarantees must resolve the CPU model aliases using the
368 ``alias-of`` field returned by the ``query-cpu-definitions`` QMP
369 command.
371 While those guarantees are kept, the return value of
372 ``query-cpu-definitions`` will have existing CPU model aliases
373 point to a version that doesn't break runnability guarantees
374 (specifically, version 1 of those CPU models).  In future QEMU
375 versions, aliases will point to newer CPU model versions
376 depending on the machine type, so management software must
377 resolve CPU model aliases before starting a virtual machine.
379 Guest Emulator ISAs
380 -------------------
382 nanoMIPS ISA
383 ''''''''''''
385 The ``nanoMIPS`` ISA has never been upstreamed to any compiler toolchain.
386 As it is hard to generate binaries for it, declare it deprecated.