diff mbox

[3/3] hw/i386: Deprecate -drive if=scsi with PC machine types

Message ID 1485444454-30749-4-git-send-email-armbru@redhat.com
State New
Headers show

Commit Message

Markus Armbruster Jan. 26, 2017, 3:27 p.m. UTC
The PC machines (pc-q35-* pc-i440fx-* pc-* isapc xenfv) automatically
create lsi53c895a SCSI HBAs and SCSI devices to honor -drive if=scsi.
For giggles, try -drive if=scsi,bus=25,media=cdrom --- this makes QEMU
create 25 of them.

lsi53c895a is thoroughly obsolete (PCI Ultra2 SCSI, ca. 2000), and
currently has no maintainer in QEMU.  megasas is a better choice,
except with old OSes that lack drivers.  virtio-scsi is a much better
choice when you have a driver, but only (newish) Linux comes with one
in the box.  There is no good default that works for all guests.

Encourage users to pick a non-obsolete SCSI HBA that works for them by
deprecating -drive if=scsi.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/i386/pc.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Markus Armbruster Jan. 27, 2017, 7:40 p.m. UTC | #1
Markus Armbruster <armbru@redhat.com> writes:

> The PC machines (pc-q35-* pc-i440fx-* pc-* isapc xenfv) automatically
> create lsi53c895a SCSI HBAs and SCSI devices to honor -drive if=scsi.
> For giggles, try -drive if=scsi,bus=25,media=cdrom --- this makes QEMU
> create 25 of them.
>
> lsi53c895a is thoroughly obsolete (PCI Ultra2 SCSI, ca. 2000), and
> currently has no maintainer in QEMU.  megasas is a better choice,
> except with old OSes that lack drivers.  virtio-scsi is a much better
> choice when you have a driver, but only (newish) Linux comes with one
> in the box.  There is no good default that works for all guests.
>
> Encourage users to pick a non-obsolete SCSI HBA that works for them by
> deprecating -drive if=scsi.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>

Missing: update doc (qemu-options.hx), and possibly qemu-iotests/051.
Will fix.
diff mbox

Patch

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index c345c04..ceb28c7 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1650,9 +1650,15 @@  void pc_pci_device_init(PCIBus *pci_bus)
     int max_bus;
     int bus;
 
+    /* Note: if=scsi is deprecated with PC machine types */
     max_bus = drive_get_max_bus(IF_SCSI);
     for (bus = 0; bus <= max_bus; bus++) {
-        lsi53c895a_create(pci_bus);
+        pci_create_simple(pci_bus, -1, "lsi53c895a");
+        /*
+         * By not creating frontends here, we make
+         * scsi_legacy_handle_cmdline() create them, and warn that
+         * this usage is deprecated.
+         */
     }
 }