monitor: raise error when 'pretty' option is used with HMP
[qemu/ar7.git] / docs / system / deprecated.rst
blob8f4d756e35685b34fdefbeac31169236f9422a00
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 ``-drive file=json:{...{'driver':'file'}}`` (since 3.0)
25 '''''''''''''''''''''''''''''''''''''''''''''''''''''''
27 The 'file' driver for drives is no longer appropriate for character or host
28 devices and will only accept regular files (S_IFREG). The correct driver
29 for these file types is 'host_cdrom' or 'host_device' as appropriate.
31 ``QEMU_AUDIO_`` environment variables and ``-audio-help`` (since 4.0)
32 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
34 The ``-audiodev`` argument is now the preferred way to specify audio
35 backend settings instead of environment variables.  To ease migration to
36 the new format, the ``-audiodev-help`` option can be used to convert
37 the current values of the environment variables to ``-audiodev`` options.
39 Creating sound card devices and vnc without ``audiodev=`` property (since 4.2)
40 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
42 When not using the deprecated legacy audio config, each sound card
43 should specify an ``audiodev=`` property.  Additionally, when using
44 vnc, you should specify an ``audiodev=`` property if you plan to
45 transmit audio through the VNC protocol.
47 Creating sound card devices using ``-soundhw`` (since 5.1)
48 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
50 Sound card devices should be created using ``-device`` instead.  The
51 names are the same for most devices.  The exceptions are ``hda`` which
52 needs two devices (``-device intel-hda -device hda-duplex``) and
53 ``pcspk`` which can be activated using ``-machine
54 pcspk-audiodev=<name>``.
56 RISC-V ``-bios`` (since 5.1)
57 ''''''''''''''''''''''''''''
59 QEMU 4.1 introduced support for the -bios option in QEMU for RISC-V for the
60 RISC-V virt machine and sifive_u machine. QEMU 4.1 had no changes to the
61 default behaviour to avoid breakages.
63 QEMU 5.1 changes the default behaviour from ``-bios none`` to ``-bios default``.
65 QEMU 5.1 has three options:
66  1. ``-bios default`` - This is the current default behavior if no -bios option
67       is included. This option will load the default OpenSBI firmware automatically.
68       The firmware is included with the QEMU release and no user interaction is
69       required. All a user needs to do is specify the kernel they want to boot
70       with the -kernel option
71  2. ``-bios none`` - QEMU will not automatically load any firmware. It is up
72       to the user to load all the images they need.
73  3. ``-bios <file>`` - Tells QEMU to load the specified file as the firmwrae.
75 ``Configuring floppies with ``-global``
76 '''''''''''''''''''''''''''''''''''''''
78 Use ``-device floppy,...`` instead:
81     -global isa-fdc.driveA=...
82     -global sysbus-fdc.driveA=...
83     -global SUNW,fdtwo.drive=...
85 become
88     -device floppy,unit=0,drive=...
90 and
93     -global isa-fdc.driveB=...
94     -global sysbus-fdc.driveB=...
96 become
99     -device floppy,unit=1,drive=...
101 ``-drive`` with bogus interface type
102 ''''''''''''''''''''''''''''''''''''
104 Drives with interface types other than ``if=none`` are for onboard
105 devices.  It is possible to use drives the board doesn't pick up with
106 -device.  This usage is now deprecated.  Use ``if=none`` instead.
108 Short-form boolean options (since 6.0)
109 ''''''''''''''''''''''''''''''''''''''
111 Boolean options such as ``share=on``/``share=off`` could be written
112 in short form as ``share`` and ``noshare``.  This is now deprecated
113 and will cause a warning.
115 ``delay`` option for socket character devices (since 6.0)
116 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
118 The replacement for the ``nodelay`` short-form boolean option is ``nodelay=on``
119 rather than ``delay=off``.
121 ``--enable-fips`` (since 6.0)
122 '''''''''''''''''''''''''''''
124 This option restricts usage of certain cryptographic algorithms when
125 the host is operating in FIPS mode.
127 If FIPS compliance is required, QEMU should be built with the ``libgcrypt``
128 library enabled as a cryptography provider.
130 Neither the ``nettle`` library, or the built-in cryptography provider are
131 supported on FIPS enabled hosts.
133 ``-writeconfig`` (since 6.0)
134 '''''''''''''''''''''''''''''
136 The ``-writeconfig`` option is not able to serialize the entire contents
137 of the QEMU command line.  It is thus considered a failed experiment
138 and deprecated, with no current replacement.
140 Userspace local APIC with KVM (x86, since 6.0)
141 ''''''''''''''''''''''''''''''''''''''''''''''
143 Using ``-M kernel-irqchip=off`` with x86 machine types that include a local
144 APIC is deprecated.  The ``split`` setting is supported, as is using
145 ``-M kernel-irqchip=off`` with the ISA PC machine type.
147 hexadecimal sizes with scaling multipliers (since 6.0)
148 ''''''''''''''''''''''''''''''''''''''''''''''''''''''
150 Input parameters that take a size value should only use a size suffix
151 (such as 'k' or 'M') when the base is written in decimal, and not when
152 the value is hexadecimal.  That is, '0x20M' is deprecated, and should
153 be written either as '32M' or as '0x2000000'.
155 ``-spice password=string`` (since 6.0)
156 ''''''''''''''''''''''''''''''''''''''
158 This option is insecure because the SPICE password remains visible in
159 the process listing. This is replaced by the new ``password-secret``
160 option which lets the password be securely provided on the command
161 line using a ``secret`` object instance.
163 QEMU Machine Protocol (QMP) commands
164 ------------------------------------
166 ``blockdev-open-tray``, ``blockdev-close-tray`` argument ``device`` (since 2.8.0)
167 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
169 Use argument ``id`` instead.
171 ``eject`` argument ``device`` (since 2.8.0)
172 '''''''''''''''''''''''''''''''''''''''''''
174 Use argument ``id`` instead.
176 ``blockdev-change-medium`` argument ``device`` (since 2.8.0)
177 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
179 Use argument ``id`` instead.
181 ``block_set_io_throttle`` argument ``device`` (since 2.8.0)
182 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
184 Use argument ``id`` instead.
186 ``migrate_set_downtime`` and ``migrate_set_speed`` (since 2.8.0)
187 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
189 Use ``migrate-set-parameters`` instead.
191 ``query-named-block-nodes`` result ``encryption_key_missing`` (since 2.10.0)
192 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
194 Always false.
196 ``query-block`` result ``inserted.encryption_key_missing`` (since 2.10.0)
197 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
199 Always false.
201 ``blockdev-add`` empty string argument ``backing`` (since 2.10.0)
202 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
204 Use argument value ``null`` instead.
206 ``migrate-set-cache-size`` and ``query-migrate-cache-size`` (since 2.11.0)
207 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
209 Use ``migrate-set-parameters`` and ``query-migrate-parameters`` instead.
211 ``block-commit`` arguments ``base`` and ``top`` (since 3.1.0)
212 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
214 Use arguments ``base-node`` and ``top-node`` instead.
216 ``object-add`` option ``props`` (since 5.0)
217 '''''''''''''''''''''''''''''''''''''''''''
219 Specify the properties for the object as top-level arguments instead.
221 ``query-named-block-nodes`` and ``query-block`` result dirty-bitmaps[i].status (since 4.0)
222 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
224 The ``status`` field of the ``BlockDirtyInfo`` structure, returned by
225 these commands is deprecated. Two new boolean fields, ``recording`` and
226 ``busy`` effectively replace it.
228 ``query-block`` result field ``dirty-bitmaps`` (Since 4.2)
229 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
231 The ``dirty-bitmaps`` field of the ``BlockInfo`` structure, returned by
232 the query-block command is itself now deprecated. The ``dirty-bitmaps``
233 field of the ``BlockDeviceInfo`` struct should be used instead, which is the
234 type of the ``inserted`` field in query-block replies, as well as the
235 type of array items in query-named-block-nodes.
237 Since the ``dirty-bitmaps`` field is optionally present in both the old and
238 new locations, clients must use introspection to learn where to anticipate
239 the field if/when it does appear in command output.
241 ``query-cpus`` (since 2.12.0)
242 '''''''''''''''''''''''''''''
244 The ``query-cpus`` command is replaced by the ``query-cpus-fast`` command.
246 ``query-cpus-fast`` ``arch`` output member (since 3.0.0)
247 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
249 The ``arch`` output member of the ``query-cpus-fast`` command is
250 replaced by the ``target`` output member.
252 ``query-events`` (since 4.0)
253 ''''''''''''''''''''''''''''
255 The ``query-events`` command has been superseded by the more powerful
256 and accurate ``query-qmp-schema`` command.
258 chardev client socket with ``wait`` option (since 4.0)
259 ''''''''''''''''''''''''''''''''''''''''''''''''''''''
261 Character devices creating sockets in client mode should not specify
262 the 'wait' field, which is only applicable to sockets in server mode
264 ``nbd-server-add`` and ``nbd-server-remove`` (since 5.2)
265 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
267 Use the more generic commands ``block-export-add`` and ``block-export-del``
268 instead.  As part of this deprecation, where ``nbd-server-add`` used a
269 single ``bitmap``, the new ``block-export-add`` uses a list of ``bitmaps``.
271 System emulator CPUS
272 --------------------
274 ``moxie`` CPU (since 5.2.0)
275 '''''''''''''''''''''''''''
277 The ``moxie`` guest CPU support is deprecated and will be removed in
278 a future version of QEMU. It's unclear whether anybody is still using
279 CPU emulation in QEMU, and there are no test images available to make
280 sure that the code is still working.
282 ``lm32`` CPUs (since 5.2.0)
283 '''''''''''''''''''''''''''
285 The ``lm32`` guest CPU support is deprecated and will be removed in
286 a future version of QEMU. The only public user of this architecture
287 was the milkymist project, which has been dead for years; there was
288 never an upstream Linux port.
290 ``unicore32`` CPUs (since 5.2.0)
291 ''''''''''''''''''''''''''''''''
293 The ``unicore32`` guest CPU support is deprecated and will be removed in
294 a future version of QEMU. Support for this CPU was removed from the
295 upstream Linux kernel, and there is no available upstream toolchain
296 to build binaries for it.
298 ``Icelake-Client`` CPU Model (since 5.2.0)
299 ''''''''''''''''''''''''''''''''''''''''''
301 ``Icelake-Client`` CPU Models are deprecated. Use ``Icelake-Server`` CPU
302 Models instead.
304 MIPS ``I7200`` CPU Model (since 5.2)
305 ''''''''''''''''''''''''''''''''''''
307 The ``I7200`` guest CPU relies on the nanoMIPS ISA, which is deprecated
308 (the ISA has never been upstreamed to a compiler toolchain). Therefore
309 this CPU is also deprecated.
311 System emulator devices
312 -----------------------
314 ``ide-drive`` (since 4.2)
315 '''''''''''''''''''''''''
317 The 'ide-drive' device is deprecated. Users should use 'ide-hd' or
318 'ide-cd' as appropriate to get an IDE hard disk or CD-ROM as needed.
320 ``scsi-disk`` (since 4.2)
321 '''''''''''''''''''''''''
323 The 'scsi-disk' device is deprecated. Users should use 'scsi-hd' or
324 'scsi-cd' as appropriate to get a SCSI hard disk or CD-ROM as needed.
326 System emulator machines
327 ------------------------
329 Raspberry Pi ``raspi2`` and ``raspi3`` machines (since 5.2)
330 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
332 The Raspberry Pi machines come in various models (A, A+, B, B+). To be able
333 to distinguish which model QEMU is implementing, the ``raspi2`` and ``raspi3``
334 machines have been renamed ``raspi2b`` and ``raspi3b``.
336 Device options
337 --------------
339 Emulated device options
340 '''''''''''''''''''''''
342 ``-device virtio-blk,scsi=on|off`` (since 5.0.0)
343 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
345 The virtio-blk SCSI passthrough feature is a legacy VIRTIO feature.  VIRTIO 1.0
346 and later do not support it because the virtio-scsi device was introduced for
347 full SCSI support.  Use virtio-scsi instead when SCSI passthrough is required.
349 Note this also applies to ``-device virtio-blk-pci,scsi=on|off``, which is an
350 alias.
352 Block device options
353 ''''''''''''''''''''
355 ``"backing": ""`` (since 2.12.0)
356 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
358 In order to prevent QEMU from automatically opening an image's backing
359 chain, use ``"backing": null`` instead.
361 ``rbd`` keyvalue pair encoded filenames: ``""`` (since 3.1.0)
362 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
364 Options for ``rbd`` should be specified according to its runtime options,
365 like other block drivers.  Legacy parsing of keyvalue pair encoded
366 filenames is useful to open images with the old format for backing files;
367 These image files should be updated to use the current format.
369 Example of legacy encoding::
371   json:{"file.driver":"rbd", "file.filename":"rbd:rbd/name"}
373 The above, converted to the current supported format::
375   json:{"file.driver":"rbd", "file.pool":"rbd", "file.image":"name"}
377 ``sheepdog`` driver (since 5.2.0)
378 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
380 The ``sheepdog`` block device driver is deprecated. The corresponding upstream
381 server project is no longer actively maintained. Users are recommended to switch
382 to an alternative distributed block device driver such as RBD. The
383 ``qemu-img convert`` command can be used to liberate existing data by moving
384 it out of sheepdog volumes into an alternative storage backend.
386 linux-user mode CPUs
387 --------------------
389 ``ppc64abi32`` CPUs (since 5.2.0)
390 '''''''''''''''''''''''''''''''''
392 The ``ppc64abi32`` architecture has a number of issues which regularly
393 trip up our CI testing and is suspected to be quite broken. For that
394 reason the maintainers strongly suspect no one actually uses it.
396 MIPS ``I7200`` CPU (since 5.2)
397 ''''''''''''''''''''''''''''''
399 The ``I7200`` guest CPU relies on the nanoMIPS ISA, which is deprecated
400 (the ISA has never been upstreamed to a compiler toolchain). Therefore
401 this CPU is also deprecated.
403 Related binaries
404 ----------------
406 qemu-img amend to adjust backing file (since 5.1)
407 '''''''''''''''''''''''''''''''''''''''''''''''''
409 The use of ``qemu-img amend`` to modify the name or format of a qcow2
410 backing image is deprecated; this functionality was never fully
411 documented or tested, and interferes with other amend operations that
412 need access to the original backing image (such as deciding whether a
413 v3 zero cluster may be left unallocated when converting to a v2
414 image).  Rather, any changes to the backing chain should be performed
415 with ``qemu-img rebase -u`` either before or after the remaining
416 changes being performed by amend, as appropriate.
418 qemu-img backing file without format (since 5.1)
419 ''''''''''''''''''''''''''''''''''''''''''''''''
421 The use of ``qemu-img create``, ``qemu-img rebase``, or ``qemu-img
422 convert`` to create or modify an image that depends on a backing file
423 now recommends that an explicit backing format be provided.  This is
424 for safety: if QEMU probes a different format than what you thought,
425 the data presented to the guest will be corrupt; similarly, presenting
426 a raw image to a guest allows a potential security exploit if a future
427 probe sees a non-raw image based on guest writes.
429 To avoid the warning message, or even future refusal to create an
430 unsafe image, you must pass ``-o backing_fmt=`` (or the shorthand
431 ``-F`` during create) to specify the intended backing format.  You may
432 use ``qemu-img rebase -u`` to retroactively add a backing format to an
433 existing image.  However, be aware that there are already potential
434 security risks to blindly using ``qemu-img info`` to probe the format
435 of an untrusted backing image, when deciding what format to add into
436 an existing image.
438 Backwards compatibility
439 -----------------------
441 Runnability guarantee of CPU models (since 4.1.0)
442 '''''''''''''''''''''''''''''''''''''''''''''''''
444 Previous versions of QEMU never changed existing CPU models in
445 ways that introduced additional host software or hardware
446 requirements to the VM.  This allowed management software to
447 safely change the machine type of an existing VM without
448 introducing new requirements ("runnability guarantee").  This
449 prevented CPU models from being updated to include CPU
450 vulnerability mitigations, leaving guests vulnerable in the
451 default configuration.
453 The CPU model runnability guarantee won't apply anymore to
454 existing CPU models.  Management software that needs runnability
455 guarantees must resolve the CPU model aliases using the
456 ``alias-of`` field returned by the ``query-cpu-definitions`` QMP
457 command.
459 While those guarantees are kept, the return value of
460 ``query-cpu-definitions`` will have existing CPU model aliases
461 point to a version that doesn't break runnability guarantees
462 (specifically, version 1 of those CPU models).  In future QEMU
463 versions, aliases will point to newer CPU model versions
464 depending on the machine type, so management software must
465 resolve CPU model aliases before starting a virtual machine.
467 Guest Emulator ISAs
468 -------------------
470 nanoMIPS ISA
471 ''''''''''''
473 The ``nanoMIPS`` ISA has never been upstreamed to any compiler toolchain.
474 As it is hard to generate binaries for it, declare it deprecated.