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: [PATCH 10/14] hw/scsi: remove 'scsi-disk' device
Date: Wed, 24 Feb 2021 13:11:38 +0000 [thread overview]
Message-ID: <20210224131142.1952027-11-berrange@redhat.com> (raw)
In-Reply-To: <20210224131142.1952027-1-berrange@redhat.com>
The 'scsi-hd' and 'scsi-cd' devices provide suitable alternatives.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
docs/system/deprecated.rst | 9 -----
docs/system/removed-features.rst | 6 ++++
hw/i386/pc.c | 1 -
hw/scsi/scsi-disk.c | 62 --------------------------------
hw/sparc64/sun4u.c | 1 -
scripts/device-crash-test | 1 -
tests/qemu-iotests/051 | 2 --
tests/qemu-iotests/051.pc.out | 10 ------
8 files changed, 6 insertions(+), 86 deletions(-)
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index f5c82a46dc..cb88fea94f 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -239,15 +239,6 @@ The ``I7200`` guest CPU relies on the nanoMIPS ISA, which is deprecated
(the ISA has never been upstreamed to a compiler toolchain). Therefore
this CPU is also deprecated.
-System emulator devices
------------------------
-
-``scsi-disk`` (since 4.2)
-'''''''''''''''''''''''''
-
-The 'scsi-disk' device is deprecated. Users should use 'scsi-hd' or
-'scsi-cd' as appropriate to get a SCSI hard disk or CD-ROM as needed.
-
System emulator machines
------------------------
diff --git a/docs/system/removed-features.rst b/docs/system/removed-features.rst
index 8fd3fafb32..bb6bc8dfc8 100644
--- a/docs/system/removed-features.rst
+++ b/docs/system/removed-features.rst
@@ -222,6 +222,12 @@ System emulator devices
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.
+``scsi-disk`` (removed in 6.0)
+''''''''''''''''''''''''''''''
+
+The 'scsi-disk' device is deprecated. Users should use 'scsi-hd' or
+'scsi-cd' as appropriate to get a SCSI hard disk or CD-ROM as needed.
+
Related binaries
----------------
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 828122e21e..28a77df0d0 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -339,7 +339,6 @@ GlobalProperty pc_compat_1_4[] = {
PC_CPU_MODEL_IDS("1.4.0")
{ "scsi-hd", "discard_granularity", "0" },
{ "scsi-cd", "discard_granularity", "0" },
- { "scsi-disk", "discard_granularity", "0" },
{ "ide-hd", "discard_granularity", "0" },
{ "ide-cd", "discard_granularity", "0" },
{ "virtio-blk-pci", "discard_granularity", "0" },
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index ed52fcd49f..2c8f68d3f0 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -2490,28 +2490,6 @@ static void scsi_cd_realize(SCSIDevice *dev, Error **errp)
aio_context_release(ctx);
}
-static void scsi_disk_realize(SCSIDevice *dev, Error **errp)
-{
- DriveInfo *dinfo;
- Error *local_err = NULL;
-
- warn_report("'scsi-disk' is deprecated, "
- "please use 'scsi-hd' or 'scsi-cd' instead");
-
- if (!dev->conf.blk) {
- scsi_realize(dev, &local_err);
- assert(local_err);
- error_propagate(errp, local_err);
- return;
- }
-
- dinfo = blk_legacy_dinfo(dev->conf.blk);
- if (dinfo && dinfo->media_cd) {
- scsi_cd_realize(dev, errp);
- } else {
- scsi_hd_realize(dev, errp);
- }
-}
static const SCSIReqOps scsi_disk_emulate_reqops = {
.size = sizeof(SCSIDiskReq),
@@ -3131,45 +3109,6 @@ static const TypeInfo scsi_block_info = {
};
#endif
-static Property scsi_disk_properties[] = {
- DEFINE_SCSI_DISK_PROPERTIES(),
- DEFINE_PROP_BIT("removable", SCSIDiskState, features,
- SCSI_DISK_F_REMOVABLE, false),
- DEFINE_PROP_BIT("dpofua", SCSIDiskState, features,
- SCSI_DISK_F_DPOFUA, false),
- DEFINE_PROP_UINT64("wwn", SCSIDiskState, qdev.wwn, 0),
- DEFINE_PROP_UINT64("port_wwn", SCSIDiskState, qdev.port_wwn, 0),
- DEFINE_PROP_UINT16("port_index", SCSIDiskState, port_index, 0),
- DEFINE_PROP_UINT64("max_unmap_size", SCSIDiskState, max_unmap_size,
- DEFAULT_MAX_UNMAP_SIZE),
- DEFINE_PROP_UINT64("max_io_size", SCSIDiskState, max_io_size,
- DEFAULT_MAX_IO_SIZE),
- DEFINE_PROP_INT32("scsi_version", SCSIDiskState, qdev.default_scsi_version,
- 5),
- DEFINE_PROP_END_OF_LIST(),
-};
-
-static void scsi_disk_class_initfn(ObjectClass *klass, void *data)
-{
- DeviceClass *dc = DEVICE_CLASS(klass);
- SCSIDeviceClass *sc = SCSI_DEVICE_CLASS(klass);
-
- sc->realize = scsi_disk_realize;
- sc->alloc_req = scsi_new_request;
- sc->unit_attention_reported = scsi_disk_unit_attention_reported;
- dc->fw_name = "disk";
- dc->desc = "virtual SCSI disk or CD-ROM (legacy)";
- dc->reset = scsi_disk_reset;
- device_class_set_props(dc, scsi_disk_properties);
- dc->vmsd = &vmstate_scsi_disk_state;
-}
-
-static const TypeInfo scsi_disk_info = {
- .name = "scsi-disk",
- .parent = TYPE_SCSI_DISK_BASE,
- .class_init = scsi_disk_class_initfn,
-};
-
static void scsi_disk_register_types(void)
{
type_register_static(&scsi_disk_base_info);
@@ -3178,7 +3117,6 @@ static void scsi_disk_register_types(void)
#ifdef __linux__
type_register_static(&scsi_block_info);
#endif
- type_register_static(&scsi_disk_info);
}
type_init(scsi_disk_register_types)
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index d7c27144ba..cda7df36e3 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -749,7 +749,6 @@ static char *sun4u_fw_dev_path(FWPathProvider *p, BusState *bus,
DeviceState *dev)
{
PCIDevice *pci;
- int bus_id;
if (!strcmp(object_get_typename(OBJECT(dev)), "pbm-bridge")) {
pci = PCI_DEVICE(dev);
diff --git a/scripts/device-crash-test b/scripts/device-crash-test
index 3981209165..6d809ac711 100755
--- a/scripts/device-crash-test
+++ b/scripts/device-crash-test
@@ -93,7 +93,6 @@ ERROR_RULE_LIST = [
{'device':'pci-bridge-seat', 'expected':True}, # Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0.
{'device':'pxb', 'expected':True}, # Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0.
{'device':'scsi-block', 'expected':True}, # drive property not set
- {'device':'scsi-disk', 'expected':True}, # drive property not set
{'device':'scsi-generic', 'expected':True}, # drive property not set
{'device':'scsi-hd', 'expected':True}, # drive property not set
{'device':'spapr-pci-host-bridge', 'expected':True}, # BUID not specified for PHB
diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
index 8b334fe41d..f92161d8ef 100755
--- a/tests/qemu-iotests/051
+++ b/tests/qemu-iotests/051
@@ -186,7 +186,6 @@ case "$QEMU_DEFAULT_MACHINE" in
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-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
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-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 2e23a4caa0..845fe0149f 100644
--- a/tests/qemu-iotests/051.pc.out
+++ b/tests/qemu-iotests/051.pc.out
@@ -160,11 +160,6 @@ 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
-Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device scsi-disk,drive=disk: warning: 'scsi-disk' is deprecated, please use 'scsi-hd' or 'scsi-cd' instead
-QEMU_PROG: -device scsi-disk,drive=disk: Device needs media, but drive is empty
-
Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) QEMU_PROG: -device scsi-hd,drive=disk: Device needs media, but drive is empty
@@ -227,11 +222,6 @@ Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-hd
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) QEMU_PROG: -device ide-hd,drive=disk: Block node is read-only
-Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device scsi-disk,drive=disk: warning: 'scsi-disk' is deprecated, please use 'scsi-hd' or 'scsi-cd' instead
-quit
-
Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) quit
--
2.29.2
next prev parent reply other threads:[~2021-02-24 13:42 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-24 13:11 [PATCH 00/14] deprecations: remove many old deprecations Daniel P. Berrangé
2021-02-24 13:11 ` [PATCH 01/14] ui, monitor: remove deprecated VNC ACL option and HMP commands Daniel P. Berrangé
2021-02-24 13:36 ` Thomas Huth
2021-02-24 13:46 ` Daniel P. Berrangé
2021-02-24 13:11 ` [PATCH 02/14] monitor: raise error when 'pretty' option is used with HMP Daniel P. Berrangé
2021-02-24 13:20 ` Dr. David Alan Gilbert
2021-02-24 13:11 ` [PATCH 03/14] monitor: remove 'query-events' QMP command Daniel P. Berrangé
2021-02-24 13:47 ` Thomas Huth
2021-02-24 13:11 ` [PATCH 04/14] softmmu: remove '-usbdevice' command line option Daniel P. Berrangé
2021-02-24 13:25 ` Paolo Bonzini
2021-02-24 13:44 ` Daniel P. Berrangé
2021-02-24 13:58 ` Thomas Huth
2021-02-24 14:10 ` Daniel P. Berrangé
2021-02-25 5:34 ` Thomas Huth
2021-02-24 13:11 ` [PATCH 05/14] migrate: remove QMP/HMP commands for speed, downtime and cache size Daniel P. Berrangé
2021-03-11 11:54 ` Dr. David Alan Gilbert
2021-03-11 18:18 ` Paolo Bonzini
2021-03-11 18:33 ` Daniel P. Berrangé
2021-03-11 22:04 ` Paolo Bonzini
2021-02-24 13:11 ` [PATCH 06/14] machine: remove 'query-cpus' QMP command Daniel P. Berrangé
2021-02-25 12:32 ` Wainer dos Santos Moschetta
2021-02-24 13:11 ` [PATCH 07/14] machine: remove 'arch' field from 'query-cpus-fast' " Daniel P. Berrangé
2021-03-15 11:51 ` Daniel P. Berrangé
2021-03-15 11:54 ` Thomas Huth
2021-02-24 13:11 ` [PATCH 08/14] chardev: reject use of 'wait' flag for socket client chardevs Daniel P. Berrangé
2021-02-24 13:17 ` Marc-André Lureau
2021-02-24 13:11 ` [PATCH 09/14] hw/ide: remove 'ide-drive' device Daniel P. Berrangé
2021-02-24 14:19 ` Thomas Huth
2021-02-24 13:11 ` Daniel P. Berrangé [this message]
2021-02-24 14:26 ` [PATCH 10/14] hw/scsi: remove 'scsi-disk' device Thomas Huth
2021-03-11 10:46 ` Daniel P. Berrangé
2021-03-15 12:21 ` Thomas Huth
2021-02-24 13:11 ` [PATCH 11/14] block: remove 'encryption_key_missing' flag from QAPI Daniel P. Berrangé
2021-02-24 15:01 ` Thomas Huth
2021-02-24 13:11 ` [PATCH 12/14] block: remove dirty bitmaps 'status' field Daniel P. Berrangé
2021-02-25 15:48 ` Vladimir Sementsov-Ogievskiy
2021-02-24 13:11 ` [PATCH 13/14] block: remove 'dirty-bitmaps' field from 'BlockInfo' struct Daniel P. Berrangé
2021-02-25 15:54 ` Vladimir Sementsov-Ogievskiy
2021-02-24 13:11 ` [PATCH 14/14] block: remove support for using "file" driver with block/char devices Daniel P. Berrangé
2021-03-15 11:56 ` Daniel P. Berrangé
2021-03-15 12:04 ` Eric Blake
2021-02-24 13:26 ` [PATCH 00/14] deprecations: remove many old deprecations Paolo Bonzini
2021-02-24 14:38 ` Peter Maydell
2021-02-24 15:02 ` Daniel P. Berrangé
2021-02-24 15:21 ` Philippe Mathieu-Daudé
2021-03-08 16:42 ` Stefan Hajnoczi
2021-02-25 17:32 ` Jim Fehlig
2021-03-01 11:15 ` Kevin Wolf
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=20210224131142.1952027-11-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).