From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Fam Zheng" <fam@euphon.net>,
"Michael S. Tsirkin" <mst@redhat.com>,
libvir-list@redhat.com,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Gerd Hoffmann" <kraxel@redhat.com>,
qemu-block@nongnu.org, "Juan Quintela" <quintela@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Artyom Tarasenko" <atar4qemu@gmail.com>,
"Laurent Vivier" <lvivier@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Greg Kurz" <groug@kaod.org>, "Cleber Rosa" <crosa@redhat.com>,
"John Snow" <jsnow@redhat.com>,
"David Gibson" <david@gibson.dropbear.id.au>,
"Kevin Wolf" <kwolf@redhat.com>,
"Vladimir Sementsov-Ogievskiy" <vsementsov@virtuozzo.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Max Reitz" <mreitz@redhat.com>,
qemu-ppc@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>
Subject: [PULL 08/13] hw/ide: remove 'ide-drive' device
Date: Thu, 18 Mar 2021 09:25:07 +0000 [thread overview]
Message-ID: <20210318092512.250725-9-berrange@redhat.com> (raw)
In-Reply-To: <20210318092512.250725-1-berrange@redhat.com>
The 'ide-hd' and 'ide-cd' devices provide suitable alternatives.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
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:
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 eed35fd004..f512e05734 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -278,12 +278,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 33b8c08f9b..794fc3f367 100644
--- a/docs/system/removed-features.rst
+++ b/docs/system/removed-features.rst
@@ -224,6 +224,14 @@ the upstream Linux kernel in 2018, and it has also been 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.
+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 410db9ef96..804913bb7e 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -341,7 +341,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);
-}
-
#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 = {
.class_init = ide_cd_class_init,
};
-static Property ide_drive_properties[] = {
- DEFINE_IDE_DEV_PROPERTIES(),
- DEFINE_PROP_END_OF_LIST(),
-};
-
-static void ide_drive_class_init(ObjectClass *klass, void *data)
-{
- DeviceClass *dc = DEVICE_CLASS(klass);
- IDEDeviceClass *k = IDE_DEVICE_CLASS(klass);
-
- k->realize = ide_drive_realize;
- dc->fw_name = "drive";
- dc->desc = "virtual IDE disk or CD-ROM (legacy)";
- device_class_set_props(dc, ide_drive_properties);
-}
-
-static const TypeInfo ide_drive_info = {
- .name = "ide-drive",
- .parent = TYPE_IDE_DEVICE,
- .instance_size = sizeof(IDEDrive),
- .class_init = ide_drive_class_init,
-};
-
static void ide_device_class_init(ObjectClass *klass, void *data)
{
DeviceClass *k = 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);
}
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, BusState *bus,
DeviceState *dev)
{
PCIDevice *pci;
- IDEBus *ide_bus;
- IDEState *ide_s;
MACIOIDEState *macio_ide;
if (!strcmp(object_get_typename(OBJECT(dev)), "macio-newworld")) {
@@ -553,17 +551,6 @@ static char *core99_fw_dev_path(FWPathProvider *p, BusState *bus,
return g_strdup_printf("ata-3@%x", macio_ide->addr);
}
- if (!strcmp(object_get_typename(OBJECT(dev)), "ide-drive")) {
- ide_bus = IDE_BUS(qdev_get_parent_bus(dev));
- ide_s = idebus_active_if(ide_bus);
-
- if (ide_s->drive_kind == 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, BusState *bus,
DeviceState *dev)
{
PCIDevice *pci;
- IDEBus *ide_bus;
- IDEState *ide_s;
MACIOIDEState *macio_ide;
if (!strcmp(object_get_typename(OBJECT(dev)), "macio-oldworld")) {
@@ -398,17 +396,6 @@ static char *heathrow_fw_dev_path(FWPathProvider *p, BusState *bus,
return g_strdup_printf("ata-3@%x", macio_ide->addr);
}
- if (!strcmp(object_get_typename(OBJECT(dev)), "ide-drive")) {
- ide_bus = IDE_BUS(qdev_get_parent_bus(dev));
- ide_s = idebus_active_if(ide_bus);
-
- if (ide_s->drive_kind == 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, BusState *bus,
DeviceState *dev)
{
PCIDevice *pci;
- IDEBus *ide_bus;
- IDEState *ide_s;
- int bus_id;
if (!strcmp(object_get_typename(OBJECT(dev)), "pbm-bridge")) {
pci = PCI_DEVICE(dev);
@@ -764,18 +761,6 @@ static char *sun4u_fw_dev_path(FWPathProvider *p, BusState *bus,
}
}
- if (!strcmp(object_get_typename(OBJECT(dev)), "ide-drive")) {
- ide_bus = IDE_BUS(qdev_get_parent_bus(dev));
- ide_s = idebus_active_if(ide_bus);
- bus_id = ide_bus->bus_id;
-
- if (ide_s->drive_kind == 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 = [
{'device':'ics', 'expected':True}, # ics_base_realize: 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=True
{'device':'ide-cd'}, # No drive specified
- {'device':'ide-drive', 'expected':True}, # No drive specified
{'device':'ide-hd', 'expected':True}, # No drive specified
{'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 a750dae6b1..4208f5f958 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -177,7 +177,6 @@ static struct {
{ .driver = "floppy", .flag = &default_floppy },
{ .driver = "ide-cd", .flag = &default_cdrom },
{ .driver = "ide-hd", .flag = &default_cdrom },
- { .driver = "ide-drive", .flag = &default_cdrom },
{ .driver = "scsi-cd", .flag = &default_cdrom },
{ .driver = "scsi-hd", .flag = &default_cdrom },
{ .driver = "VGA", .flag = &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=none,id=disk -device ide-cd,drive=disk
run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
- run_qemu -drive if=none,id=disk -device ide-drive,drive=disk
run_qemu -drive if=none,id=disk -device ide-hd,drive=disk
run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
@@ -238,7 +237,6 @@ case "$QEMU_DEFAULT_MACHINE" in
pc)
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-cd,drive=disk
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk
- run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-drive,drive=disk
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-hd,drive=disk
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
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=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) quit
-Testing: -drive if=none,id=disk -device ide-drive,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device ide-drive,drive=disk: warning: 'ide-drive' is deprecated, please use 'ide-hd' or 'ide-cd' instead
-QEMU_PROG: -device ide-drive,drive=disk: Device needs media, but drive is empty
-
Testing: -drive if=none,id=disk -device ide-hd,drive=disk
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) QEMU_PROG: -device ide-hd,drive=disk: Device needs media, but drive is empty
@@ -228,11 +223,6 @@ Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) quit
-Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-drive,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device ide-drive,drive=disk: warning: 'ide-drive' is deprecated, please use 'ide-hd' or 'ide-cd' instead
-QEMU_PROG: -device ide-drive,drive=disk: Block node is read-only
-
Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-hd,drive=disk
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) QEMU_PROG: -device ide-hd,drive=disk: Block node is read-only
--
2.30.2
next prev parent reply other threads:[~2021-03-18 9:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-18 9:24 [PULL v2 00/13] misc patches removing deprecated features Daniel P. Berrangé
2021-03-18 9:25 ` [PULL 01/13] ui, monitor: remove deprecated VNC ACL option and HMP commands Daniel P. Berrangé
2021-03-18 9:25 ` [PULL 02/13] monitor: raise error when 'pretty' option is used with HMP Daniel P. Berrangé
2021-03-18 9:25 ` [PULL 03/13] monitor: remove 'query-events' QMP command Daniel P. Berrangé
2021-03-18 9:25 ` [PULL 04/13] migrate: remove QMP/HMP commands for speed, downtime and cache size Daniel P. Berrangé
2021-03-18 9:25 ` [PULL 05/13] machine: remove 'query-cpus' QMP command Daniel P. Berrangé
2021-03-18 9:25 ` [PULL 06/13] machine: remove 'arch' field from 'query-cpus-fast' " Daniel P. Berrangé
2021-03-18 9:25 ` [PULL 07/13] chardev: reject use of 'wait' flag for socket client chardevs Daniel P. Berrangé
2021-03-18 9:25 ` Daniel P. Berrangé [this message]
2021-03-18 9:25 ` [PULL 09/13] hw/scsi: remove 'scsi-disk' device Daniel P. Berrangé
2021-03-18 9:25 ` [PULL 10/13] block: remove 'encryption_key_missing' flag from QAPI Daniel P. Berrangé
2021-03-18 9:25 ` [PULL 11/13] block: remove dirty bitmaps 'status' field Daniel P. Berrangé
2021-03-18 9:25 ` [PULL 12/13] block: remove 'dirty-bitmaps' field from 'BlockInfo' struct Daniel P. Berrangé
2021-03-18 9:25 ` [PULL 13/13] block: remove support for using "file" driver with block/char devices Daniel P. Berrangé
2021-03-18 19:53 ` [PULL v2 00/13] misc patches removing deprecated features Peter Maydell
2021-03-22 10:52 ` Peter Maydell
2021-03-22 10:54 ` Ian Jackson
2021-03-22 11:31 ` Daniel P. Berrangé
-- strict thread matches above, loose matches on Subject: below --
2021-03-16 16:43 [PULL " Daniel P. Berrangé
2021-03-16 16:43 ` [PULL 08/13] hw/ide: remove 'ide-drive' device Daniel P. Berrangé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210318092512.250725-9-berrange@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=atar4qemu@gmail.com \
--cc=crosa@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=dgilbert@redhat.com \
--cc=ehabkost@redhat.com \
--cc=fam@euphon.net \
--cc=groug@kaod.org \
--cc=jsnow@redhat.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=libvir-list@redhat.com \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=quintela@redhat.com \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
--cc=vsementsov@virtuozzo.com \
--cc=wainersm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).