From nobody Sun Feb 8 06:54:24 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615830599; cv=none; d=zohomail.com; s=zohoarc; b=dIcR8zNsmyNzzjaBn+8e5EyALMwJHSjZEGOSuWe2PJVWFbBQi/SfSAn81AC1r+3bEuXnB6NeQTlqur6Sf8PNQTkjvOUJfQK10p6ZqceeON/w3kqLkJqYC3jxis5/FSfSKR0dJmH/RKBZ7sIU34xGvYGx+s33BP/S0yF4pfH7GUI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615830599; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uOv+5tRXO0cHgmS5JeQgqt4hWJ0fEsR4GdmfqxsPiZM=; b=PX4k19R4hu2e8hQR0wUuLLUu5m/MQNmER7Pf9gcc01kn9ww4/T0Im3SxcYNM8zS6NNRS3S5zSTMQx9VryC8nTgYExjBTJxJDi/GQt8kjK3l84870CBcqKIDR3JNohwuYbmMNv7jDensLTQg96oQwuySuZ6U6hjjVQSWXTpIvtPg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1615830599683567.5967709481471; Mon, 15 Mar 2021 10:49:59 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-555-aFB47u46OdilW3Gx28lxFg-1; Mon, 15 Mar 2021 13:49:56 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 137D819200C1; Mon, 15 Mar 2021 17:49:50 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DFCA266A05; Mon, 15 Mar 2021 17:49:49 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A184818155DE; Mon, 15 Mar 2021 17:49:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12FHnm2M006012 for ; Mon, 15 Mar 2021 13:49:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2CE3C1037EB9; Mon, 15 Mar 2021 17:49:48 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-81.ams2.redhat.com [10.36.115.81]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5B7A11042A66; Mon, 15 Mar 2021 17:49:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615830598; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=uOv+5tRXO0cHgmS5JeQgqt4hWJ0fEsR4GdmfqxsPiZM=; b=GEL+i37uSHOuAE3tKAXJjX2YAjMpnW3RymYIr0ccc/KpLJZhkEgmenF9vrJzpJErCLiWa9 RpaQrkZVzA9Sw8qO129YZy/ttNOgUsFOH8IXufLeQ9715CQUsldchhMczYPCNnyuJKbVuO a1e3lAF+DWUHOIzBOkU0MC/vAQnoQew= X-MC-Unique: aFB47u46OdilW3Gx28lxFg-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 08/13] hw/ide: remove 'ide-drive' device Date: Mon, 15 Mar 2021 17:45:18 +0000 Message-Id: <20210315174523.979666-9-berrange@redhat.com> In-Reply-To: <20210315174523.979666-1-berrange@redhat.com> References: <20210315174523.979666-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Fam Zheng , "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , Gerd Hoffmann , qemu-block@nongnu.org, Juan Quintela , Wainer dos Santos Moschetta , Marcel Apfelbaum , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Greg Kurz , Cleber Rosa , John Snow , David Gibson , Kevin Wolf , Vladimir Sementsov-Ogievskiy , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The 'ide-hd' and 'ide-cd' devices provide suitable alternatives. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrang=C3=A9 --- docs/qdev-device-use.txt | 2 +- docs/system/deprecated.rst | 6 ----- docs/system/removed-features.rst | 8 +++++++ 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 | 15 ------------- scripts/device-crash-test | 1 - softmmu/vl.c | 1 - tests/qemu-iotests/051 | 2 -- tests/qemu-iotests/051.pc.out | 10 --------- 12 files changed, 9 insertions(+), 101 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: =20 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 9afff39e5e..93f0d01ee3 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -279,12 +279,6 @@ this CPU is also deprecated. System emulator devices ----------------------- =20 -``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) ''''''''''''''''''''''''' =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index 9f3697afec..5707b463cd 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -217,6 +217,14 @@ the upstream Linux kernel in 2018, and it has also bee= n dropped from glibc, so there is no new Linux development taking place with this architecture. For running the old binaries, you can use older versions of QEMU. =20 +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. =20 Related binaries ---------------- diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 410db9ef96..804913bb7e 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -341,7 +341,6 @@ GlobalProperty pc_compat_1_4[] =3D { { "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 **err= p) ide_dev_initfn(dev, IDE_CD, errp); } =20 -static void ide_drive_realize(IDEDevice *dev, Error **errp) -{ - DriveInfo *dinfo =3D NULL; - - warn_report("'ide-drive' is deprecated, " - "please use 'ide-hd' or 'ide-cd' instead"); - - if (dev->conf.blk) { - dinfo =3D blk_legacy_dinfo(dev->conf.blk); - } - - ide_dev_initfn(dev, dinfo && dinfo->media_cd ? IDE_CD : IDE_HD, errp); -} - #define DEFINE_IDE_DEV_PROPERTIES() \ DEFINE_BLOCK_PROPERTIES(IDEDrive, dev.conf), \ DEFINE_BLOCK_ERROR_PROPERTIES(IDEDrive, dev.conf), \ @@ -355,29 +341,6 @@ static const TypeInfo ide_cd_info =3D { .class_init =3D ide_cd_class_init, }; =20 -static Property ide_drive_properties[] =3D { - DEFINE_IDE_DEV_PROPERTIES(), - DEFINE_PROP_END_OF_LIST(), -}; - -static void ide_drive_class_init(ObjectClass *klass, void *data) -{ - DeviceClass *dc =3D DEVICE_CLASS(klass); - IDEDeviceClass *k =3D IDE_DEVICE_CLASS(klass); - - k->realize =3D ide_drive_realize; - dc->fw_name =3D "drive"; - dc->desc =3D "virtual IDE disk or CD-ROM (legacy)"; - device_class_set_props(dc, ide_drive_properties); -} - -static const TypeInfo ide_drive_info =3D { - .name =3D "ide-drive", - .parent =3D TYPE_IDE_DEVICE, - .instance_size =3D sizeof(IDEDrive), - .class_init =3D ide_drive_class_init, -}; - static void ide_device_class_init(ObjectClass *klass, void *data) { DeviceClass *k =3D DEVICE_CLASS(klass); @@ -402,7 +365,6 @@ static void ide_register_types(void) type_register_static(&ide_bus_info); type_register_static(&ide_hd_info); type_register_static(&ide_cd_info); - type_register_static(&ide_drive_info); type_register_static(&ide_device_type_info); } =20 diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index e991db4add..2175962846 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -539,8 +539,6 @@ static char *core99_fw_dev_path(FWPathProvider *p, BusS= tate *bus, DeviceState *dev) { PCIDevice *pci; - IDEBus *ide_bus; - IDEState *ide_s; MACIOIDEState *macio_ide; =20 if (!strcmp(object_get_typename(OBJECT(dev)), "macio-newworld")) { @@ -553,17 +551,6 @@ static char *core99_fw_dev_path(FWPathProvider *p, Bus= State *bus, return g_strdup_printf("ata-3@%x", macio_ide->addr); } =20 - if (!strcmp(object_get_typename(OBJECT(dev)), "ide-drive")) { - ide_bus =3D IDE_BUS(qdev_get_parent_bus(dev)); - ide_s =3D idebus_active_if(ide_bus); - - if (ide_s->drive_kind =3D=3D IDE_CD) { - return g_strdup("cdrom"); - } - - return g_strdup("disk"); - } - if (!strcmp(object_get_typename(OBJECT(dev)), "ide-hd")) { return g_strdup("disk"); } diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 44ee99be88..963d247f5f 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -384,8 +384,6 @@ static char *heathrow_fw_dev_path(FWPathProvider *p, Bu= sState *bus, DeviceState *dev) { PCIDevice *pci; - IDEBus *ide_bus; - IDEState *ide_s; MACIOIDEState *macio_ide; =20 if (!strcmp(object_get_typename(OBJECT(dev)), "macio-oldworld")) { @@ -398,17 +396,6 @@ static char *heathrow_fw_dev_path(FWPathProvider *p, B= usState *bus, return g_strdup_printf("ata-3@%x", macio_ide->addr); } =20 - if (!strcmp(object_get_typename(OBJECT(dev)), "ide-drive")) { - ide_bus =3D IDE_BUS(qdev_get_parent_bus(dev)); - ide_s =3D idebus_active_if(ide_bus); - - if (ide_s->drive_kind =3D=3D IDE_CD) { - return g_strdup("cdrom"); - } - - return g_strdup("disk"); - } - if (!strcmp(object_get_typename(OBJECT(dev)), "ide-hd")) { return g_strdup("disk"); } diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 0fa13a7330..cda7df36e3 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -749,9 +749,6 @@ static char *sun4u_fw_dev_path(FWPathProvider *p, BusSt= ate *bus, DeviceState *dev) { PCIDevice *pci; - IDEBus *ide_bus; - IDEState *ide_s; - int bus_id; =20 if (!strcmp(object_get_typename(OBJECT(dev)), "pbm-bridge")) { pci =3D PCI_DEVICE(dev); @@ -764,18 +761,6 @@ static char *sun4u_fw_dev_path(FWPathProvider *p, BusS= tate *bus, } } =20 - if (!strcmp(object_get_typename(OBJECT(dev)), "ide-drive")) { - ide_bus =3D IDE_BUS(qdev_get_parent_bus(dev)); - ide_s =3D idebus_active_if(ide_bus); - bus_id =3D ide_bus->bus_id; - - if (ide_s->drive_kind =3D=3D IDE_CD) { - return g_strdup_printf("ide@%x/cdrom", bus_id); - } - - return g_strdup_printf("ide@%x/disk", bus_id); - } - if (!strcmp(object_get_typename(OBJECT(dev)), "ide-hd")) { return g_strdup("disk"); } diff --git a/scripts/device-crash-test b/scripts/device-crash-test index ef1412ca59..3981209165 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -76,7 +76,6 @@ ERROR_RULE_LIST =3D [ {'device':'ics', 'expected':True}, # ics_base_real= ize: required link 'xics' not found: Property '.xics' not found # "-device ide-cd" does work on more recent QEMU versions, so it doesn= 't have expected=3DTrue {'device':'ide-cd'}, # No drive specif= ied - {'device':'ide-drive', 'expected':True}, # No drive spec= ified {'device':'ide-hd', 'expected':True}, # No drive spec= ified {'device':'ipmi-bmc-extern', 'expected':True}, # IPMI external= bmc requires chardev attribute {'device':'isa-debugcon', 'expected':True}, # Can't create = serial device, empty char device diff --git a/softmmu/vl.c b/softmmu/vl.c index b7673b9613..42d8113b82 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -177,7 +177,6 @@ static struct { { .driver =3D "floppy", .flag =3D &default_floppy }, { .driver =3D "ide-cd", .flag =3D &default_cdrom }, { .driver =3D "ide-hd", .flag =3D &default_cdrom }, - { .driver =3D "ide-drive", .flag =3D &default_cdrom }, { .driver =3D "scsi-cd", .flag =3D &default_cdrom }, { .driver =3D "scsi-hd", .flag =3D &default_cdrom }, { .driver =3D "VGA", .flag =3D &default_vga }, diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index 7cbd1415ce..8b334fe41d 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -185,7 +185,6 @@ case "$QEMU_DEFAULT_MACHINE" in pc) run_qemu -drive if=3Dnone,id=3Ddisk -device ide-cd,drive=3Ddisk run_qemu -drive if=3Dnone,id=3Ddisk -device lsi53c895a -device scs= i-cd,drive=3Ddisk - run_qemu -drive if=3Dnone,id=3Ddisk -device ide-drive,drive=3Ddisk run_qemu -drive if=3Dnone,id=3Ddisk -device ide-hd,drive=3Ddisk run_qemu -drive if=3Dnone,id=3Ddisk -device lsi53c895a -device scs= i-disk,drive=3Ddisk run_qemu -drive if=3Dnone,id=3Ddisk -device lsi53c895a -device scs= i-hd,drive=3Ddisk @@ -238,7 +237,6 @@ case "$QEMU_DEFAULT_MACHINE" in pc) run_qemu -drive file=3D"$TEST_IMG",if=3Dnone,id=3Ddisk,readonly=3D= on -device ide-cd,drive=3Ddisk run_qemu -drive file=3D"$TEST_IMG",if=3Dnone,id=3Ddisk,readonly=3D= on -device lsi53c895a -device scsi-cd,drive=3Ddisk - run_qemu -drive file=3D"$TEST_IMG",if=3Dnone,id=3Ddisk,readonly=3D= on -device ide-drive,drive=3Ddisk run_qemu -drive file=3D"$TEST_IMG",if=3Dnone,id=3Ddisk,readonly=3D= on -device ide-hd,drive=3Ddisk run_qemu -drive file=3D"$TEST_IMG",if=3Dnone,id=3Ddisk,readonly=3D= on -device lsi53c895a -device scsi-disk,drive=3Ddisk run_qemu -drive file=3D"$TEST_IMG",if=3Dnone,id=3Ddisk,readonly=3D= on -device lsi53c895a -device scsi-hd,drive=3Ddisk diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out index f570610f64..29c0d698b0 100644 --- a/tests/qemu-iotests/051.pc.out +++ b/tests/qemu-iotests/051.pc.out @@ -156,11 +156,6 @@ Testing: -drive if=3Dnone,id=3Ddisk -device lsi53c895a= -device scsi-cd,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit =20 -Testing: -drive if=3Dnone,id=3Ddisk -device ide-drive,drive=3Ddisk -QEMU X.Y.Z monitor - type 'help' for more information -(qemu) QEMU_PROG: -device ide-drive,drive=3Ddisk: warning: 'ide-drive' is = deprecated, please use 'ide-hd' or 'ide-cd' instead -QEMU_PROG: -device ide-drive,drive=3Ddisk: Device needs media, but drive i= s empty - Testing: -drive if=3Dnone,id=3Ddisk -device ide-hd,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: -device ide-hd,drive=3Ddisk: Device needs media, but dri= ve is empty @@ -228,11 +223,6 @@ Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id= =3Ddisk,readonly=3Don -device lsi53c QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit =20 -Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id=3Ddisk,readonly=3Don = -device ide-drive,drive=3Ddisk -QEMU X.Y.Z monitor - type 'help' for more information -(qemu) QEMU_PROG: -device ide-drive,drive=3Ddisk: warning: 'ide-drive' is = deprecated, please use 'ide-hd' or 'ide-cd' instead -QEMU_PROG: -device ide-drive,drive=3Ddisk: Block node is read-only - Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id=3Ddisk,readonly=3Don = -device ide-hd,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: -device ide-hd,drive=3Ddisk: Block node is read-only --=20 2.30.2