[PATCH 09/14] hw/ide: remove 'ide-drive' device

Thomas Huth thuth at redhat.com
Wed Feb 24 14:19:37 UTC 2021


On 24/02/2021 14.11, Daniel P. Berrangé wrote:
> The 'ide-hd' and 'ide-cd' devices provide suitable alternatives.
> 
> Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> ---
>   docs/qdev-device-use.txt         |  2 +-
>   docs/system/deprecated.rst       |  6 -----
>   docs/system/removed-features.rst |  9 ++++++++
>   hw/i386/pc.c                     |  1 -
>   hw/ide/qdev.c                    | 38 --------------------------------
>   hw/ppc/mac_newworld.c            | 13 -----------
>   hw/ppc/mac_oldworld.c            | 13 -----------
>   hw/sparc64/sun4u.c               | 14 ------------
>   scripts/device-crash-test        |  1 -
>   softmmu/vl.c                     |  1 -
>   tests/qemu-iotests/051           |  2 --
>   tests/qemu-iotests/051.pc.out    | 10 ---------
>   12 files changed, 10 insertions(+), 100 deletions(-)
> 
> diff --git a/docs/qdev-device-use.txt b/docs/qdev-device-use.txt
> index 245cdf29c7..2408889334 100644
> --- a/docs/qdev-device-use.txt
> +++ b/docs/qdev-device-use.txt
> @@ -388,7 +388,7 @@ type.
>   some DEVNAMEs:
>   
>       default device      suppressing DEVNAMEs
> -    CD-ROM              ide-cd, ide-drive, ide-hd, scsi-cd, scsi-hd
> +    CD-ROM              ide-cd, ide-hd, scsi-cd, scsi-hd
>       floppy              floppy, isa-fdc
>       parallel            isa-parallel
>       serial              isa-serial
> diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
> index c69887dca8..f5c82a46dc 100644
> --- a/docs/system/deprecated.rst
> +++ b/docs/system/deprecated.rst
> @@ -242,12 +242,6 @@ this CPU is also deprecated.
>   System emulator devices
>   -----------------------
>   
> -``ide-drive`` (since 4.2)
> -'''''''''''''''''''''''''
> -
> -The 'ide-drive' device is deprecated. Users should use 'ide-hd' or
> -'ide-cd' as appropriate to get an IDE hard disk or CD-ROM as needed.
> -
>   ``scsi-disk`` (since 4.2)
>   '''''''''''''''''''''''''
>   
> diff --git a/docs/system/removed-features.rst b/docs/system/removed-features.rst
> index 870a222062..8fd3fafb32 100644
> --- a/docs/system/removed-features.rst
> +++ b/docs/system/removed-features.rst
> @@ -213,6 +213,15 @@ This machine has been renamed ``fuloong2e``.
>   These machine types were very old and likely could not be used for live
>   migration from old QEMU versions anymore. Use a newer machine type instead.
>   
> +System emulator devices
> +-----------------------
> +
> +``ide-drive`` (removed in 6.0)
> +''''''''''''''''''''''''''''''
> +
> +The 'ide-drive' device has been removed. Users should use 'ide-hd' or
> +'ide-cd' as appropriate to get an IDE hard disk or CD-ROM as needed.
> +
>   Related binaries
>   ----------------
>   
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 8aa85dec54..828122e21e 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -342,7 +342,6 @@ GlobalProperty pc_compat_1_4[] = {
>       { "scsi-disk", "discard_granularity", "0" },
>       { "ide-hd", "discard_granularity", "0" },
>       { "ide-cd", "discard_granularity", "0" },
> -    { "ide-drive", "discard_granularity", "0" },
>       { "virtio-blk-pci", "discard_granularity", "0" },
>       /* DEV_NVECTORS_UNSPECIFIED as a uint32_t string: */
>       { "virtio-serial-pci", "vectors", "0xFFFFFFFF" },
> diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
> index 8cd19fa5e9..e70ebc83a0 100644
> --- a/hw/ide/qdev.c
> +++ b/hw/ide/qdev.c
> @@ -283,20 +283,6 @@ static void ide_cd_realize(IDEDevice *dev, Error **errp)
>       ide_dev_initfn(dev, IDE_CD, errp);
>   }
>   
> -static void ide_drive_realize(IDEDevice *dev, Error **errp)
> -{
> -    DriveInfo *dinfo = NULL;
> -
> -    warn_report("'ide-drive' is deprecated, "
> -                "please use 'ide-hd' or 'ide-cd' instead");
> -
> -    if (dev->conf.blk) {
> -        dinfo = blk_legacy_dinfo(dev->conf.blk);
> -    }
> -
> -    ide_dev_initfn(dev, dinfo && dinfo->media_cd ? IDE_CD : IDE_HD, errp);
> -}

I wonder whether we now could also make the "media" parameter of "-drive" as 
deprecated?

Anyway, for this patch:
Reviewed-by: Thomas Huth <thuth at redhat.com>




More information about the libvir-list mailing list