qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi
@ 2017-02-15 12:18 Markus Armbruster
  2017-02-15 12:18 ` [Qemu-devel] [PATCH v2 1/3] hw/scsi: Concentrate -drive if=scsi auto-create in one place Markus Armbruster
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Markus Armbruster @ 2017-02-15 12:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, peter.maydell, kwolf, mreitz, qemu-block

Drives defined with if=scsi get connected to buses created with
-device, unlike other interface types.  Deprecate this usage.

There is no good default SCSI HBA for PC machines.  Deprecate if=scsi
there entirely.

Before this series, frontends for -drive if=scsi get created by SCSI
HBAs.  Frontends for other interface types get created by machine
initialization.

After this series, they get created by machine initialization, except
for deprecated cases, which get created by new function
scsi_legacy_handle_cmdline().

Based on "[PATCH v3 0/8] More sensible default for -drive interface
type".

v2:
* Trivially rebased
* PATCH 2: Suppress warning for default drives
* PATCH 3: Update user manual and qemu-iotests/051.pc.out

Markus Armbruster (3):
  hw/scsi: Concentrate -drive if=scsi auto-create in one place
  hw: Deprecate -drive if=scsi with non-onboard HBAs
  hw/i386: Deprecate -drive if=scsi with PC machine types

 hw/arm/realview.c             |  2 +-
 hw/arm/versatilepb.c          |  2 +-
 hw/i386/pc.c                  |  6 +++++
 hw/scsi/esp-pci.c             |  3 ---
 hw/scsi/esp.c                 |  6 -----
 hw/scsi/lsi53c895a.c          | 10 +++++---
 hw/scsi/megasas.c             |  4 ----
 hw/scsi/mptsas.c              |  4 ----
 hw/scsi/scsi-bus.c            | 56 +++++++++++++++++++++++++++++++++++++------
 hw/scsi/spapr_vscsi.c         |  5 ++--
 hw/scsi/virtio-scsi.c         |  8 -------
 include/hw/pci/pci.h          |  2 ++
 include/hw/scsi/scsi.h        |  3 ++-
 qemu-options.hx               |  5 ----
 tests/qemu-iotests/051.pc.out | 12 ++++++----
 vl.c                          | 10 ++++++++
 16 files changed, 88 insertions(+), 50 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH v2 1/3] hw/scsi: Concentrate -drive if=scsi auto-create in one place
  2017-02-15 12:18 [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi Markus Armbruster
@ 2017-02-15 12:18 ` Markus Armbruster
  2017-02-15 12:18 ` [Qemu-devel] [PATCH v2 2/3] hw: Deprecate -drive if=scsi with non-onboard HBAs Markus Armbruster
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Markus Armbruster @ 2017-02-15 12:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, peter.maydell, kwolf, mreitz, qemu-block

The logic to create frontends for -drive if=scsi is in SCSI HBAs.  For
all other interface types, it's in machine initialization code.

A few machine types create the SCSI HBAs necessary for that.  That's
also not done for other interface types.

I'm going to deprecate these SCSI eccentricities.  In preparation for
that, create the frontends in main() instead of the SCSI HBAs, by
calling new function scsi_legacy_handle_cmdline() there.

Note that not all SCSI HBAs create frontends.  Take care not to change
that.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/scsi/esp-pci.c      |  3 ---
 hw/scsi/esp.c          |  6 ------
 hw/scsi/lsi53c895a.c   |  3 ---
 hw/scsi/megasas.c      |  4 ----
 hw/scsi/mptsas.c       |  4 ----
 hw/scsi/scsi-bus.c     | 45 ++++++++++++++++++++++++++++++++++++++-------
 hw/scsi/spapr_vscsi.c  |  3 ---
 hw/scsi/virtio-scsi.c  |  8 --------
 include/hw/scsi/scsi.h |  3 ++-
 vl.c                   |  4 ++++
 10 files changed, 44 insertions(+), 39 deletions(-)

diff --git a/hw/scsi/esp-pci.c b/hw/scsi/esp-pci.c
index 595f88b..e295d88 100644
--- a/hw/scsi/esp-pci.c
+++ b/hw/scsi/esp-pci.c
@@ -367,9 +367,6 @@ static void esp_pci_scsi_realize(PCIDevice *dev, Error **errp)
     s->irq = pci_allocate_irq(dev);
 
     scsi_bus_new(&s->bus, sizeof(s->bus), d, &esp_pci_scsi_info, NULL);
-    if (!d->hotplugged) {
-        scsi_bus_legacy_handle_cmdline(&s->bus, errp);
-    }
 }
 
 static void esp_pci_scsi_uninit(PCIDevice *d)
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 5a5a4e9..eee831e 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -690,7 +690,6 @@ static void sysbus_esp_realize(DeviceState *dev, Error **errp)
     SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
     SysBusESPState *sysbus = ESP(dev);
     ESPState *s = &sysbus->esp;
-    Error *err = NULL;
 
     sysbus_init_irq(sbd, &s->irq);
     assert(sysbus->it_shift != -1);
@@ -703,11 +702,6 @@ static void sysbus_esp_realize(DeviceState *dev, Error **errp)
     qdev_init_gpio_in(dev, sysbus_esp_gpio_demux, 2);
 
     scsi_bus_new(&s->bus, sizeof(s->bus), dev, &esp_scsi_info, NULL);
-    scsi_bus_legacy_handle_cmdline(&s->bus, &err);
-    if (err != NULL) {
-        error_propagate(errp, err);
-        return;
-    }
 }
 
 static void sysbus_esp_hard_reset(DeviceState *dev)
diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c
index feb1191..292fa87 100644
--- a/hw/scsi/lsi53c895a.c
+++ b/hw/scsi/lsi53c895a.c
@@ -2216,9 +2216,6 @@ static void lsi_scsi_realize(PCIDevice *dev, Error **errp)
     QTAILQ_INIT(&s->queue);
 
     scsi_bus_new(&s->bus, sizeof(s->bus), d, &lsi_scsi_info, NULL);
-    if (!d->hotplugged) {
-        scsi_bus_legacy_handle_cmdline(&s->bus, errp);
-    }
 }
 
 static void lsi_scsi_unrealize(DeviceState *dev, Error **errp)
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index 1a8b04c..e3d59b7 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -2325,7 +2325,6 @@ static const struct SCSIBusInfo megasas_scsi_info = {
 
 static void megasas_scsi_realize(PCIDevice *dev, Error **errp)
 {
-    DeviceState *d = DEVICE(dev);
     MegasasState *s = MEGASAS(dev);
     MegasasBaseClass *b = MEGASAS_DEVICE_GET_CLASS(s);
     uint8_t *pci_conf;
@@ -2426,9 +2425,6 @@ static void megasas_scsi_realize(PCIDevice *dev, Error **errp)
 
     scsi_bus_new(&s->bus, sizeof(s->bus), DEVICE(dev),
                  &megasas_scsi_info, NULL);
-    if (!d->hotplugged) {
-        scsi_bus_legacy_handle_cmdline(&s->bus, errp);
-    }
 }
 
 static Property megasas_properties_gen1[] = {
diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c
index ad87e78..2e091c0 100644
--- a/hw/scsi/mptsas.c
+++ b/hw/scsi/mptsas.c
@@ -1271,7 +1271,6 @@ static const struct SCSIBusInfo mptsas_scsi_info = {
 
 static void mptsas_scsi_realize(PCIDevice *dev, Error **errp)
 {
-    DeviceState *d = DEVICE(dev);
     MPTSASState *s = MPT_SAS(dev);
     Error *err = NULL;
     int ret;
@@ -1326,9 +1325,6 @@ static void mptsas_scsi_realize(PCIDevice *dev, Error **errp)
     QTAILQ_INIT(&s->pending);
 
     scsi_bus_new(&s->bus, sizeof(s->bus), &dev->qdev, &mptsas_scsi_info, NULL);
-    if (!d->hotplugged) {
-        scsi_bus_legacy_handle_cmdline(&s->bus, errp);
-    }
 }
 
 static void mptsas_scsi_uninit(PCIDevice *dev)
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index 5940cb1..b9111ee 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -261,12 +261,11 @@ SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, BlockBackend *blk,
     return SCSI_DEVICE(dev);
 }
 
-void scsi_bus_legacy_handle_cmdline(SCSIBus *bus, Error **errp)
+void scsi_bus_legacy_handle_cmdline(SCSIBus *bus)
 {
     Location loc;
     DriveInfo *dinfo;
     int unit;
-    Error *err = NULL;
 
     loc_push_none(&loc);
     for (unit = 0; unit <= bus->info->max_target; unit++) {
@@ -276,15 +275,47 @@ void scsi_bus_legacy_handle_cmdline(SCSIBus *bus, Error **errp)
         }
         qemu_opts_loc_restore(dinfo->opts);
         scsi_bus_legacy_add_drive(bus, blk_by_legacy_dinfo(dinfo),
-                                  unit, false, -1, NULL, &err);
-        if (err != NULL) {
-            error_propagate(errp, err);
-            break;
-        }
+                                  unit, false, -1, NULL, &error_fatal);
     }
     loc_pop(&loc);
 }
 
+static bool is_scsi_hba_with_legacy_magic(Object *obj)
+{
+    static const char *magic[] = {
+        "am53c974", "dc390", "esp", "lsi53c810", "lsi53c895a",
+        "megasas", "megasas-gen2", "mptsas1068", "spapr-vscsi",
+        "virtio-scsi-device",
+        NULL
+    };
+    const char *typename = object_get_typename(obj);
+    int i;
+
+    for (i = 0; magic[i]; i++)
+        if (!strcmp(typename, magic[i])) {
+            return true;
+    }
+
+    return false;
+}
+
+static int scsi_legacy_handle_cmdline_cb(Object *obj, void *opaque)
+{
+    SCSIBus *bus = (SCSIBus *)object_dynamic_cast(obj, TYPE_SCSI_BUS);
+
+    if (bus && is_scsi_hba_with_legacy_magic(OBJECT(bus->qbus.parent))) {
+        scsi_bus_legacy_handle_cmdline(bus);
+    }
+
+    return 0;
+}
+
+void scsi_legacy_handle_cmdline(void)
+{
+    object_child_foreach_recursive(object_get_root(),
+                                   scsi_legacy_handle_cmdline_cb, NULL);
+}
+
 static int32_t scsi_invalid_field(SCSIRequest *req, uint8_t *buf)
 {
     scsi_req_build_sense(req, SENSE_CODE(INVALID_FIELD));
diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c
index 6090a20..7d44771 100644
--- a/hw/scsi/spapr_vscsi.c
+++ b/hw/scsi/spapr_vscsi.c
@@ -1206,9 +1206,6 @@ static void spapr_vscsi_realize(VIOsPAPRDevice *dev, Error **errp)
 
     scsi_bus_new(&s->bus, sizeof(s->bus), DEVICE(dev),
                  &vscsi_scsi_info, NULL);
-    if (!dev->qdev.hotplugged) {
-        scsi_bus_legacy_handle_cmdline(&s->bus, errp);
-    }
 }
 
 void spapr_vscsi_create(VIOsPAPRBus *bus)
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index ce19eff..5629f97 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -889,14 +889,6 @@ static void virtio_scsi_device_realize(DeviceState *dev, Error **errp)
     /* override default SCSI bus hotplug-handler, with virtio-scsi's one */
     qbus_set_hotplug_handler(BUS(&s->bus), dev, &error_abort);
 
-    if (!dev->hotplugged) {
-        scsi_bus_legacy_handle_cmdline(&s->bus, &err);
-        if (err != NULL) {
-            error_propagate(errp, err);
-            return;
-        }
-    }
-
     virtio_scsi_dataplane_setup(s, errp);
 }
 
diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h
index 9bad49e..eeef949 100644
--- a/include/hw/scsi/scsi.h
+++ b/include/hw/scsi/scsi.h
@@ -177,7 +177,8 @@ static inline SCSIBus *scsi_bus_from_device(SCSIDevice *d)
 SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, BlockBackend *blk,
                                       int unit, bool removable, int bootindex,
                                       const char *serial, Error **errp);
-void scsi_bus_legacy_handle_cmdline(SCSIBus *bus, Error **errp);
+void scsi_bus_legacy_handle_cmdline(SCSIBus *bus);
+void scsi_legacy_handle_cmdline(void);
 
 /*
  * Predefined sense codes
diff --git a/vl.c b/vl.c
index b4eaf03..94a34da 100644
--- a/vl.c
+++ b/vl.c
@@ -62,6 +62,7 @@ int main(int argc, char **argv)
 #include "hw/usb.h"
 #include "hw/i386/pc.h"
 #include "hw/isa/isa.h"
+#include "hw/scsi/scsi.h"
 #include "hw/bt.h"
 #include "sysemu/watchdog.h"
 #include "hw/smbios/smbios.h"
@@ -4521,6 +4522,9 @@ int main(int argc, char **argv, char **envp)
 
     rom_reset_order_override();
 
+    /* Create frontends for -drive if=scsi */
+    scsi_legacy_handle_cmdline();
+
     /* Did we create any drives that we failed to create a device for? */
     drive_check_orphaned();
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH v2 2/3] hw: Deprecate -drive if=scsi with non-onboard HBAs
  2017-02-15 12:18 [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi Markus Armbruster
  2017-02-15 12:18 ` [Qemu-devel] [PATCH v2 1/3] hw/scsi: Concentrate -drive if=scsi auto-create in one place Markus Armbruster
@ 2017-02-15 12:18 ` Markus Armbruster
  2017-02-15 12:18 ` [Qemu-devel] [PATCH v2 3/3] hw/i386: Deprecate -drive if=scsi with PC machine types Markus Armbruster
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Markus Armbruster @ 2017-02-15 12:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, peter.maydell, kwolf, mreitz, qemu-block

Block backends defined with "-drive if=T" with T other than "none" are
meant to be picked up by machine initialization code: a suitable
frontend gets created and wired up automatically.

Drives defined with if=scsi are also picked up by SCSI HBAs added with
-device, unlike other interface types.  Deprecate this usage, as follows.

Create the frontends for onboard HBAs in machine initialization code,
exactly like we do for if=ide and other interface types.  Change
scsi_legacy_handle_cmdline() to create a frontend only when it's still
missing, and warn that this usage is deprecated.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/arm/realview.c      |  2 +-
 hw/arm/versatilepb.c   |  2 +-
 hw/i386/pc.c           |  2 +-
 hw/scsi/lsi53c895a.c   |  7 +++++++
 hw/scsi/scsi-bus.c     | 15 +++++++++++++--
 hw/scsi/spapr_vscsi.c  |  2 ++
 include/hw/pci/pci.h   |  2 ++
 include/hw/scsi/scsi.h |  2 +-
 vl.c                   |  8 +++++++-
 9 files changed, 35 insertions(+), 7 deletions(-)

diff --git a/hw/arm/realview.c b/hw/arm/realview.c
index 8c11c7a..b7d4753 100644
--- a/hw/arm/realview.c
+++ b/hw/arm/realview.c
@@ -259,7 +259,7 @@ static void realview_init(MachineState *machine,
         }
         n = drive_get_max_bus(IF_SCSI);
         while (n >= 0) {
-            pci_create_simple(pci_bus, -1, "lsi53c895a");
+            lsi53c895a_create(pci_bus);
             n--;
         }
     }
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index 7b5cb36..b0e9f5b 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
@@ -290,7 +290,7 @@ static void versatile_init(MachineState *machine, int board_id)
     }
     n = drive_get_max_bus(IF_SCSI);
     while (n >= 0) {
-        pci_create_simple(pci_bus, -1, "lsi53c895a");
+        lsi53c895a_create(pci_bus);
         n--;
     }
 
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index a555c35..c2c75e2 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1652,7 +1652,7 @@ void pc_pci_device_init(PCIBus *pci_bus)
 
     max_bus = drive_get_max_bus(IF_SCSI);
     for (bus = 0; bus <= max_bus; bus++) {
-        pci_create_simple(pci_bus, -1, "lsi53c895a");
+        lsi53c895a_create(pci_bus);
     }
 }
 
diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c
index 292fa87..595c260 100644
--- a/hw/scsi/lsi53c895a.c
+++ b/hw/scsi/lsi53c895a.c
@@ -2268,3 +2268,10 @@ static void lsi53c895a_register_types(void)
 }
 
 type_init(lsi53c895a_register_types)
+
+void lsi53c895a_create(PCIBus *bus)
+{
+    LSIState *s = LSI53C895A(pci_create_simple(bus, -1, "lsi53c895a"));
+
+    scsi_bus_legacy_handle_cmdline(&s->bus, false);
+}
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index b9111ee..8cc80bf 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -261,7 +261,7 @@ SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, BlockBackend *blk,
     return SCSI_DEVICE(dev);
 }
 
-void scsi_bus_legacy_handle_cmdline(SCSIBus *bus)
+void scsi_bus_legacy_handle_cmdline(SCSIBus *bus, bool deprecated)
 {
     Location loc;
     DriveInfo *dinfo;
@@ -274,6 +274,17 @@ void scsi_bus_legacy_handle_cmdline(SCSIBus *bus)
             continue;
         }
         qemu_opts_loc_restore(dinfo->opts);
+        if (deprecated) {
+            /* Handling -drive not claimed by machine initialization */
+            if (blk_get_attached_dev(blk_by_legacy_dinfo(dinfo))) {
+                continue;       /* claimed */
+            }
+            if (!dinfo->is_default) {
+                error_report("warning: bus=%d,unit=%d is deprecated with this"
+                             " machine type",
+                             bus->busnr, unit);
+            }
+        }
         scsi_bus_legacy_add_drive(bus, blk_by_legacy_dinfo(dinfo),
                                   unit, false, -1, NULL, &error_fatal);
     }
@@ -304,7 +315,7 @@ static int scsi_legacy_handle_cmdline_cb(Object *obj, void *opaque)
     SCSIBus *bus = (SCSIBus *)object_dynamic_cast(obj, TYPE_SCSI_BUS);
 
     if (bus && is_scsi_hba_with_legacy_magic(OBJECT(bus->qbus.parent))) {
-        scsi_bus_legacy_handle_cmdline(bus);
+        scsi_bus_legacy_handle_cmdline(bus, true);
     }
 
     return 0;
diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c
index 7d44771..55ee48c 100644
--- a/hw/scsi/spapr_vscsi.c
+++ b/hw/scsi/spapr_vscsi.c
@@ -1215,6 +1215,8 @@ void spapr_vscsi_create(VIOsPAPRBus *bus)
     dev = qdev_create(&bus->bus, "spapr-vscsi");
 
     qdev_init_nofail(dev);
+    scsi_bus_legacy_handle_cmdline(&VIO_SPAPR_VSCSI_DEVICE(dev)->bus,
+                                   false);
 }
 
 static int spapr_vscsi_devnode(VIOsPAPRDevice *dev, void *fdt, int node_off)
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index cbc1fdf..24435d7 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -687,6 +687,8 @@ PCIDevice *pci_create_simple_multifunction(PCIBus *bus, int devfn,
 PCIDevice *pci_create(PCIBus *bus, int devfn, const char *name);
 PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name);
 
+void lsi53c895a_create(PCIBus *bus);
+
 qemu_irq pci_allocate_irq(PCIDevice *pci_dev);
 void pci_set_irq(PCIDevice *pci_dev, int level);
 
diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h
index eeef949..6b85786 100644
--- a/include/hw/scsi/scsi.h
+++ b/include/hw/scsi/scsi.h
@@ -177,7 +177,7 @@ static inline SCSIBus *scsi_bus_from_device(SCSIDevice *d)
 SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, BlockBackend *blk,
                                       int unit, bool removable, int bootindex,
                                       const char *serial, Error **errp);
-void scsi_bus_legacy_handle_cmdline(SCSIBus *bus);
+void scsi_bus_legacy_handle_cmdline(SCSIBus *bus, bool deprecated);
 void scsi_legacy_handle_cmdline(void);
 
 /*
diff --git a/vl.c b/vl.c
index 94a34da..449e30c 100644
--- a/vl.c
+++ b/vl.c
@@ -4522,7 +4522,13 @@ int main(int argc, char **argv, char **envp)
 
     rom_reset_order_override();
 
-    /* Create frontends for -drive if=scsi */
+    /*
+     * Create frontends for -drive if=scsi leftovers.
+     * Normally, frontends for -drive get created by machine
+     * initialization for onboard SCSI HBAs.  However, we create a few
+     * more ever since SCSI qdevification, but this is pretty much an
+     * implementation accident, and deprecated.
+     */
     scsi_legacy_handle_cmdline();
 
     /* Did we create any drives that we failed to create a device for? */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH v2 3/3] hw/i386: Deprecate -drive if=scsi with PC machine types
  2017-02-15 12:18 [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi Markus Armbruster
  2017-02-15 12:18 ` [Qemu-devel] [PATCH v2 1/3] hw/scsi: Concentrate -drive if=scsi auto-create in one place Markus Armbruster
  2017-02-15 12:18 ` [Qemu-devel] [PATCH v2 2/3] hw: Deprecate -drive if=scsi with non-onboard HBAs Markus Armbruster
@ 2017-02-15 12:18 ` Markus Armbruster
  2017-02-15 12:30 ` [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi no-reply
  2017-02-15 12:39 ` Paolo Bonzini
  4 siblings, 0 replies; 13+ messages in thread
From: Markus Armbruster @ 2017-02-15 12:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, peter.maydell, kwolf, mreitz, qemu-block

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 +++++++-
 qemu-options.hx               |  5 -----
 tests/qemu-iotests/051.pc.out | 12 ++++++++----
 3 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index c2c75e2..60b0946 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.
+         */
     }
 }
 
diff --git a/qemu-options.hx b/qemu-options.hx
index ac036b4..f41cc18 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -654,11 +654,6 @@ If you don't specify the "file=" argument, you define an empty drive:
 qemu-system-i386 -drive if=ide,index=1,media=cdrom
 @end example
 
-You can connect a SCSI disk with unit ID 6 on the bus #0:
-@example
-qemu-system-i386 -drive file=file,if=scsi,bus=0,unit=6
-@end example
-
 Instead of @option{-fda}, @option{-fdb}, you can use:
 @example
 qemu-system-i386 -drive file=file,index=0,if=floppy
diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out
index 603bb76..f8047a2 100644
--- a/tests/qemu-iotests/051.pc.out
+++ b/tests/qemu-iotests/051.pc.out
@@ -118,7 +118,8 @@ QEMU X.Y.Z monitor - type 'help' for more information
 
 Testing: -drive if=scsi,media=cdrom
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+(qemu) QEMU_PROG: -drive if=scsi,media=cdrom: warning: bus=0,unit=0 is deprecated with this machine type
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
 
 Testing: -drive if=ide
 QEMU X.Y.Z monitor - type 'help' for more information
@@ -127,7 +128,8 @@ QEMU_PROG: Initialization of device ide-hd failed: Device initialization failed.
 
 Testing: -drive if=scsi
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: Initialization of device lsi53c895a failed: Device needs media, but drive is empty
+(qemu) QEMU_PROG: -drive if=scsi: warning: bus=0,unit=0 is deprecated with this machine type
+QEMU_PROG: -drive if=scsi: Device needs media, but drive is empty
 
 Testing: -drive if=virtio
 QEMU X.Y.Z monitor - type 'help' for more information
@@ -172,7 +174,8 @@ QEMU X.Y.Z monitor - type 'help' for more information
 
 Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,media=cdrom,readonly=on
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+(qemu) QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=scsi,media=cdrom,readonly=on: warning: bus=0,unit=0 is deprecated with this machine type
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
 
 Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on
 QEMU X.Y.Z monitor - type 'help' for more information
@@ -181,7 +184,8 @@ QEMU_PROG: Initialization of device ide-hd failed: Device initialization failed.
 
 Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,readonly=on
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
+(qemu) QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=scsi,readonly=on: warning: bus=0,unit=0 is deprecated with this machine type
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
 
 Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on
 QEMU X.Y.Z monitor - type 'help' for more information
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi
  2017-02-15 12:18 [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi Markus Armbruster
                   ` (2 preceding siblings ...)
  2017-02-15 12:18 ` [Qemu-devel] [PATCH v2 3/3] hw/i386: Deprecate -drive if=scsi with PC machine types Markus Armbruster
@ 2017-02-15 12:30 ` no-reply
  2017-02-15 12:39 ` Paolo Bonzini
  4 siblings, 0 replies; 13+ messages in thread
From: no-reply @ 2017-02-15 12:30 UTC (permalink / raw)
  To: armbru; +Cc: famz, qemu-devel, kwolf, pbonzini, mreitz, qemu-block,
	peter.maydell

Hi,

Your series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi
Message-id: 1487161136-9018-1-git-send-email-armbru@redhat.com
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/1487161136-9018-1-git-send-email-armbru@redhat.com -> patchew/1487161136-9018-1-git-send-email-armbru@redhat.com
Switched to a new branch 'test'
81f37e5 hw/i386: Deprecate -drive if=scsi with PC machine types
e00ebe5 hw: Deprecate -drive if=scsi with non-onboard HBAs
ab0e183 hw/scsi: Concentrate -drive if=scsi auto-create in one place

=== OUTPUT BEGIN ===
Checking PATCH 1/3: hw/scsi: Concentrate -drive if=scsi auto-create in one place...
Checking PATCH 2/3: hw: Deprecate -drive if=scsi with non-onboard HBAs...
Checking PATCH 3/3: hw/i386: Deprecate -drive if=scsi with PC machine types...
ERROR: Invalid UTF-8, patch and commit message should be encoded in UTF-8
#70: FILE: tests/qemu-iotests/051.pc.out:122:
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
  ^

ERROR: Invalid UTF-8, patch and commit message should be encoded in UTF-8
#90: FILE: tests/qemu-iotests/051.pc.out:178:
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
  ^

ERROR: Invalid UTF-8, patch and commit message should be encoded in UTF-8
#100: FILE: tests/qemu-iotests/051.pc.out:188:
+q^[[K^[[Dqu^[[K^[[D^[[Dqui^[[K^[[D^[[D^[[Dquit^[[K
  ^

total: 3 errors, 0 warnings, 63 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi
  2017-02-15 12:18 [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi Markus Armbruster
                   ` (3 preceding siblings ...)
  2017-02-15 12:30 ` [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi no-reply
@ 2017-02-15 12:39 ` Paolo Bonzini
  2017-02-15 13:10   ` Markus Armbruster
  4 siblings, 1 reply; 13+ messages in thread
From: Paolo Bonzini @ 2017-02-15 12:39 UTC (permalink / raw)
  To: Markus Armbruster, qemu-devel; +Cc: peter.maydell, kwolf, mreitz, qemu-block



On 15/02/2017 13:18, Markus Armbruster wrote:
> Drives defined with if=scsi get connected to buses created with
> -device, unlike other interface types.  Deprecate this usage.
> 
> There is no good default SCSI HBA for PC machines.  Deprecate if=scsi
> there entirely.
> 
> Before this series, frontends for -drive if=scsi get created by SCSI
> HBAs.  Frontends for other interface types get created by machine
> initialization.
> 
> After this series, they get created by machine initialization, except
> for deprecated cases, which get created by new function
> scsi_legacy_handle_cmdline().
> 
> Based on "[PATCH v3 0/8] More sensible default for -drive interface
> type".
> 
> v2:
> * Trivially rebased
> * PATCH 2: Suppress warning for default drives
> * PATCH 3: Update user manual and qemu-iotests/051.pc.out
> 
> Markus Armbruster (3):
>   hw/scsi: Concentrate -drive if=scsi auto-create in one place
>   hw: Deprecate -drive if=scsi with non-onboard HBAs
>   hw/i386: Deprecate -drive if=scsi with PC machine types
> 
>  hw/arm/realview.c             |  2 +-
>  hw/arm/versatilepb.c          |  2 +-
>  hw/i386/pc.c                  |  6 +++++
>  hw/scsi/esp-pci.c             |  3 ---
>  hw/scsi/esp.c                 |  6 -----
>  hw/scsi/lsi53c895a.c          | 10 +++++---
>  hw/scsi/megasas.c             |  4 ----
>  hw/scsi/mptsas.c              |  4 ----
>  hw/scsi/scsi-bus.c            | 56 +++++++++++++++++++++++++++++++++++++------
>  hw/scsi/spapr_vscsi.c         |  5 ++--
>  hw/scsi/virtio-scsi.c         |  8 -------
>  include/hw/pci/pci.h          |  2 ++
>  include/hw/scsi/scsi.h        |  3 ++-
>  qemu-options.hx               |  5 ----
>  tests/qemu-iotests/051.pc.out | 12 ++++++----
>  vl.c                          | 10 ++++++++
>  16 files changed, 88 insertions(+), 50 deletions(-)
> 

Because of the ESC characters in 051.pc.out, please send the pull
request for this yourself.

Paolo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi
  2017-02-15 12:39 ` Paolo Bonzini
@ 2017-02-15 13:10   ` Markus Armbruster
  2017-02-15 13:19     ` Paolo Bonzini
  0 siblings, 1 reply; 13+ messages in thread
From: Markus Armbruster @ 2017-02-15 13:10 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, kwolf, peter.maydell, qemu-block, mreitz

Paolo Bonzini <pbonzini@redhat.com> writes:

> On 15/02/2017 13:18, Markus Armbruster wrote:
>> Drives defined with if=scsi get connected to buses created with
>> -device, unlike other interface types.  Deprecate this usage.
>> 
>> There is no good default SCSI HBA for PC machines.  Deprecate if=scsi
>> there entirely.
>> 
>> Before this series, frontends for -drive if=scsi get created by SCSI
>> HBAs.  Frontends for other interface types get created by machine
>> initialization.
>> 
>> After this series, they get created by machine initialization, except
>> for deprecated cases, which get created by new function
>> scsi_legacy_handle_cmdline().
>> 
>> Based on "[PATCH v3 0/8] More sensible default for -drive interface
>> type".
>> 
>> v2:
>> * Trivially rebased
>> * PATCH 2: Suppress warning for default drives
>> * PATCH 3: Update user manual and qemu-iotests/051.pc.out
>> 
>> Markus Armbruster (3):
>>   hw/scsi: Concentrate -drive if=scsi auto-create in one place
>>   hw: Deprecate -drive if=scsi with non-onboard HBAs
>>   hw/i386: Deprecate -drive if=scsi with PC machine types
>> 
>>  hw/arm/realview.c             |  2 +-
>>  hw/arm/versatilepb.c          |  2 +-
>>  hw/i386/pc.c                  |  6 +++++
>>  hw/scsi/esp-pci.c             |  3 ---
>>  hw/scsi/esp.c                 |  6 -----
>>  hw/scsi/lsi53c895a.c          | 10 +++++---
>>  hw/scsi/megasas.c             |  4 ----
>>  hw/scsi/mptsas.c              |  4 ----
>>  hw/scsi/scsi-bus.c            | 56 +++++++++++++++++++++++++++++++++++++------
>>  hw/scsi/spapr_vscsi.c         |  5 ++--
>>  hw/scsi/virtio-scsi.c         |  8 -------
>>  include/hw/pci/pci.h          |  2 ++
>>  include/hw/scsi/scsi.h        |  3 ++-
>>  qemu-options.hx               |  5 ----
>>  tests/qemu-iotests/051.pc.out | 12 ++++++----
>>  vl.c                          | 10 ++++++++
>>  16 files changed, 88 insertions(+), 50 deletions(-)
>> 
>
> Because of the ESC characters in 051.pc.out, please send the pull
> request for this yourself.

Is that an Acked-by?

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi
  2017-02-15 13:10   ` Markus Armbruster
@ 2017-02-15 13:19     ` Paolo Bonzini
  2017-02-20 12:07       ` Markus Armbruster
  0 siblings, 1 reply; 13+ messages in thread
From: Paolo Bonzini @ 2017-02-15 13:19 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel, kwolf, peter.maydell, qemu-block, mreitz



On 15/02/2017 14:10, Markus Armbruster wrote:
> Paolo Bonzini <pbonzini@redhat.com> writes:
> 
>> On 15/02/2017 13:18, Markus Armbruster wrote:
>>> Drives defined with if=scsi get connected to buses created with
>>> -device, unlike other interface types.  Deprecate this usage.
>>>
>>> There is no good default SCSI HBA for PC machines.  Deprecate if=scsi
>>> there entirely.
>>>
>>> Before this series, frontends for -drive if=scsi get created by SCSI
>>> HBAs.  Frontends for other interface types get created by machine
>>> initialization.
>>>
>>> After this series, they get created by machine initialization, except
>>> for deprecated cases, which get created by new function
>>> scsi_legacy_handle_cmdline().
>>>
>>> Based on "[PATCH v3 0/8] More sensible default for -drive interface
>>> type".
>>>
>>> v2:
>>> * Trivially rebased
>>> * PATCH 2: Suppress warning for default drives
>>> * PATCH 3: Update user manual and qemu-iotests/051.pc.out
>>>
>>> Markus Armbruster (3):
>>>   hw/scsi: Concentrate -drive if=scsi auto-create in one place
>>>   hw: Deprecate -drive if=scsi with non-onboard HBAs
>>>   hw/i386: Deprecate -drive if=scsi with PC machine types
>>>
>>>  hw/arm/realview.c             |  2 +-
>>>  hw/arm/versatilepb.c          |  2 +-
>>>  hw/i386/pc.c                  |  6 +++++
>>>  hw/scsi/esp-pci.c             |  3 ---
>>>  hw/scsi/esp.c                 |  6 -----
>>>  hw/scsi/lsi53c895a.c          | 10 +++++---
>>>  hw/scsi/megasas.c             |  4 ----
>>>  hw/scsi/mptsas.c              |  4 ----
>>>  hw/scsi/scsi-bus.c            | 56 +++++++++++++++++++++++++++++++++++++------
>>>  hw/scsi/spapr_vscsi.c         |  5 ++--
>>>  hw/scsi/virtio-scsi.c         |  8 -------
>>>  include/hw/pci/pci.h          |  2 ++
>>>  include/hw/scsi/scsi.h        |  3 ++-
>>>  qemu-options.hx               |  5 ----
>>>  tests/qemu-iotests/051.pc.out | 12 ++++++----
>>>  vl.c                          | 10 ++++++++
>>>  16 files changed, 88 insertions(+), 50 deletions(-)
>>>
>>
>> Because of the ESC characters in 051.pc.out, please send the pull
>> request for this yourself.
> 
> Is that an Acked-by?

Not a sufficient one because the patch touches files outside my area of
maintenance, but for hw/scsi you can treat it as one.

Paolo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi
  2017-02-15 13:19     ` Paolo Bonzini
@ 2017-02-20 12:07       ` Markus Armbruster
  2017-02-20 12:53         ` Paolo Bonzini
  0 siblings, 1 reply; 13+ messages in thread
From: Markus Armbruster @ 2017-02-20 12:07 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kwolf, peter.maydell, qemu-devel, qemu-block, mreitz

Paolo Bonzini <pbonzini@redhat.com> writes:

> On 15/02/2017 14:10, Markus Armbruster wrote:
>> Paolo Bonzini <pbonzini@redhat.com> writes:
>> 
>>> On 15/02/2017 13:18, Markus Armbruster wrote:
>>>> Drives defined with if=scsi get connected to buses created with
>>>> -device, unlike other interface types.  Deprecate this usage.
>>>>
>>>> There is no good default SCSI HBA for PC machines.  Deprecate if=scsi
>>>> there entirely.
>>>>
>>>> Before this series, frontends for -drive if=scsi get created by SCSI
>>>> HBAs.  Frontends for other interface types get created by machine
>>>> initialization.
>>>>
>>>> After this series, they get created by machine initialization, except
>>>> for deprecated cases, which get created by new function
>>>> scsi_legacy_handle_cmdline().
>>>>
>>>> Based on "[PATCH v3 0/8] More sensible default for -drive interface
>>>> type".
>>>>
>>>> v2:
>>>> * Trivially rebased
>>>> * PATCH 2: Suppress warning for default drives
>>>> * PATCH 3: Update user manual and qemu-iotests/051.pc.out
>>>>
>>>> Markus Armbruster (3):
>>>>   hw/scsi: Concentrate -drive if=scsi auto-create in one place
>>>>   hw: Deprecate -drive if=scsi with non-onboard HBAs
>>>>   hw/i386: Deprecate -drive if=scsi with PC machine types
>>>>
>>>>  hw/arm/realview.c             |  2 +-
>>>>  hw/arm/versatilepb.c          |  2 +-
>>>>  hw/i386/pc.c                  |  6 +++++
>>>>  hw/scsi/esp-pci.c             |  3 ---
>>>>  hw/scsi/esp.c                 |  6 -----
>>>>  hw/scsi/lsi53c895a.c          | 10 +++++---
>>>>  hw/scsi/megasas.c             |  4 ----
>>>>  hw/scsi/mptsas.c              |  4 ----
>>>>  hw/scsi/scsi-bus.c            | 56 +++++++++++++++++++++++++++++++++++++------
>>>>  hw/scsi/spapr_vscsi.c         |  5 ++--
>>>>  hw/scsi/virtio-scsi.c         |  8 -------
>>>>  include/hw/pci/pci.h          |  2 ++
>>>>  include/hw/scsi/scsi.h        |  3 ++-
>>>>  qemu-options.hx               |  5 ----
>>>>  tests/qemu-iotests/051.pc.out | 12 ++++++----
>>>>  vl.c                          | 10 ++++++++
>>>>  16 files changed, 88 insertions(+), 50 deletions(-)
>>>>
>>>
>>> Because of the ESC characters in 051.pc.out, please send the pull
>>> request for this yourself.
>> 
>> Is that an Acked-by?
>
> Not a sufficient one because the patch touches files outside my area of
> maintenance, but for hw/scsi you can treat it as one.

Okay, that covers PATCH 1/3.

What about PATCH 3/3?  It's actually your idea...

Message-ID: <3512807d-d04e-50fa-9fcf-d1d5ba8ac350@redhat.com>
https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg05037.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi
  2017-02-20 12:07       ` Markus Armbruster
@ 2017-02-20 12:53         ` Paolo Bonzini
  2017-02-20 13:21           ` Markus Armbruster
  0 siblings, 1 reply; 13+ messages in thread
From: Paolo Bonzini @ 2017-02-20 12:53 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: kwolf, peter.maydell, qemu-devel, qemu-block, mreitz



On 20/02/2017 13:07, Markus Armbruster wrote:
> Paolo Bonzini <pbonzini@redhat.com> writes:
> 
>> On 15/02/2017 14:10, Markus Armbruster wrote:
>>> Paolo Bonzini <pbonzini@redhat.com> writes:
>>>
>>>> On 15/02/2017 13:18, Markus Armbruster wrote:
>>>>> Drives defined with if=scsi get connected to buses created with
>>>>> -device, unlike other interface types.  Deprecate this usage.
>>>>>
>>>>> There is no good default SCSI HBA for PC machines.  Deprecate if=scsi
>>>>> there entirely.
>>>>>
>>>>> Before this series, frontends for -drive if=scsi get created by SCSI
>>>>> HBAs.  Frontends for other interface types get created by machine
>>>>> initialization.
>>>>>
>>>>> After this series, they get created by machine initialization, except
>>>>> for deprecated cases, which get created by new function
>>>>> scsi_legacy_handle_cmdline().
>>>>>
>>>>> Based on "[PATCH v3 0/8] More sensible default for -drive interface
>>>>> type".
>>>>>
>>>>> v2:
>>>>> * Trivially rebased
>>>>> * PATCH 2: Suppress warning for default drives
>>>>> * PATCH 3: Update user manual and qemu-iotests/051.pc.out
>>>>>
>>>>> Markus Armbruster (3):
>>>>>   hw/scsi: Concentrate -drive if=scsi auto-create in one place
>>>>>   hw: Deprecate -drive if=scsi with non-onboard HBAs
>>>>>   hw/i386: Deprecate -drive if=scsi with PC machine types
>>>>>
>>>>>  hw/arm/realview.c             |  2 +-
>>>>>  hw/arm/versatilepb.c          |  2 +-
>>>>>  hw/i386/pc.c                  |  6 +++++
>>>>>  hw/scsi/esp-pci.c             |  3 ---
>>>>>  hw/scsi/esp.c                 |  6 -----
>>>>>  hw/scsi/lsi53c895a.c          | 10 +++++---
>>>>>  hw/scsi/megasas.c             |  4 ----
>>>>>  hw/scsi/mptsas.c              |  4 ----
>>>>>  hw/scsi/scsi-bus.c            | 56 +++++++++++++++++++++++++++++++++++++------
>>>>>  hw/scsi/spapr_vscsi.c         |  5 ++--
>>>>>  hw/scsi/virtio-scsi.c         |  8 -------
>>>>>  include/hw/pci/pci.h          |  2 ++
>>>>>  include/hw/scsi/scsi.h        |  3 ++-
>>>>>  qemu-options.hx               |  5 ----
>>>>>  tests/qemu-iotests/051.pc.out | 12 ++++++----
>>>>>  vl.c                          | 10 ++++++++
>>>>>  16 files changed, 88 insertions(+), 50 deletions(-)
>>>>>
>>>>
>>>> Because of the ESC characters in 051.pc.out, please send the pull
>>>> request for this yourself.
>>>
>>> Is that an Acked-by?
>>
>> Not a sufficient one because the patch touches files outside my area of
>> maintenance, but for hw/scsi you can treat it as one.
> 
> Okay, that covers PATCH 1/3.
> 
> What about PATCH 3/3?  It's actually your idea...

Yep, hw/i386 too I guess.

Paolo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi
  2017-02-20 12:53         ` Paolo Bonzini
@ 2017-02-20 13:21           ` Markus Armbruster
  2017-02-20 13:23             ` Paolo Bonzini
  0 siblings, 1 reply; 13+ messages in thread
From: Markus Armbruster @ 2017-02-20 13:21 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kwolf, peter.maydell, qemu-devel, qemu-block, mreitz

Paolo Bonzini <pbonzini@redhat.com> writes:

> On 20/02/2017 13:07, Markus Armbruster wrote:
>> Paolo Bonzini <pbonzini@redhat.com> writes:
>> 
>>> On 15/02/2017 14:10, Markus Armbruster wrote:
>>>> Paolo Bonzini <pbonzini@redhat.com> writes:
>>>>
>>>>> On 15/02/2017 13:18, Markus Armbruster wrote:
>>>>>> Drives defined with if=scsi get connected to buses created with
>>>>>> -device, unlike other interface types.  Deprecate this usage.
>>>>>>
>>>>>> There is no good default SCSI HBA for PC machines.  Deprecate if=scsi
>>>>>> there entirely.
>>>>>>
>>>>>> Before this series, frontends for -drive if=scsi get created by SCSI
>>>>>> HBAs.  Frontends for other interface types get created by machine
>>>>>> initialization.
>>>>>>
>>>>>> After this series, they get created by machine initialization, except
>>>>>> for deprecated cases, which get created by new function
>>>>>> scsi_legacy_handle_cmdline().
>>>>>>
>>>>>> Based on "[PATCH v3 0/8] More sensible default for -drive interface
>>>>>> type".
>>>>>>
>>>>>> v2:
>>>>>> * Trivially rebased
>>>>>> * PATCH 2: Suppress warning for default drives
>>>>>> * PATCH 3: Update user manual and qemu-iotests/051.pc.out
>>>>>>
>>>>>> Markus Armbruster (3):
>>>>>>   hw/scsi: Concentrate -drive if=scsi auto-create in one place
>>>>>>   hw: Deprecate -drive if=scsi with non-onboard HBAs
>>>>>>   hw/i386: Deprecate -drive if=scsi with PC machine types
>>>>>>
>>>>>>  hw/arm/realview.c             |  2 +-
>>>>>>  hw/arm/versatilepb.c          |  2 +-
>>>>>>  hw/i386/pc.c                  |  6 +++++
>>>>>>  hw/scsi/esp-pci.c             |  3 ---
>>>>>>  hw/scsi/esp.c                 |  6 -----
>>>>>>  hw/scsi/lsi53c895a.c          | 10 +++++---
>>>>>>  hw/scsi/megasas.c             |  4 ----
>>>>>>  hw/scsi/mptsas.c              |  4 ----
>>>>>>  hw/scsi/scsi-bus.c            | 56 +++++++++++++++++++++++++++++++++++++------
>>>>>>  hw/scsi/spapr_vscsi.c         |  5 ++--
>>>>>>  hw/scsi/virtio-scsi.c         |  8 -------
>>>>>>  include/hw/pci/pci.h          |  2 ++
>>>>>>  include/hw/scsi/scsi.h        |  3 ++-
>>>>>>  qemu-options.hx               |  5 ----
>>>>>>  tests/qemu-iotests/051.pc.out | 12 ++++++----
>>>>>>  vl.c                          | 10 ++++++++
>>>>>>  16 files changed, 88 insertions(+), 50 deletions(-)
>>>>>>
>>>>>
>>>>> Because of the ESC characters in 051.pc.out, please send the pull
>>>>> request for this yourself.
>>>>
>>>> Is that an Acked-by?
>>>
>>> Not a sufficient one because the patch touches files outside my area of
>>> maintenance, but for hw/scsi you can treat it as one.
>> 
>> Okay, that covers PATCH 1/3.
>> 
>> What about PATCH 3/3?  It's actually your idea...
>
> Yep, hw/i386 too I guess.

Do you mean the he/i386 part of PATCH 2/3?  How would I express that?
Acked-by goes into the commit message, not individual files...

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi
  2017-02-20 13:21           ` Markus Armbruster
@ 2017-02-20 13:23             ` Paolo Bonzini
  2017-02-21 12:34               ` Markus Armbruster
  0 siblings, 1 reply; 13+ messages in thread
From: Paolo Bonzini @ 2017-02-20 13:23 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: kwolf, peter maydell, qemu-devel, qemu-block, mreitz

> >>>> Is that an Acked-by?
> >>>
> >>> Not a sufficient one because the patch touches files outside my area of
> >>> maintenance, but for hw/scsi you can treat it as one.
> >> 
> >> Okay, that covers PATCH 1/3.
> >> 
> >> What about PATCH 3/3?  It's actually your idea...
> >
> > Yep, hw/i386 too I guess.
> 
> Do you mean the he/i386 part of PATCH 2/3?  How would I express that?
> Acked-by goes into the commit message, not individual files...

I mean that you only need Peter to ack now.

Paolo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi
  2017-02-20 13:23             ` Paolo Bonzini
@ 2017-02-21 12:34               ` Markus Armbruster
  0 siblings, 0 replies; 13+ messages in thread
From: Markus Armbruster @ 2017-02-21 12:34 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kwolf, peter maydell, qemu-devel, qemu-block, mreitz

Paolo Bonzini <pbonzini@redhat.com> writes:

>> >>>> Is that an Acked-by?
>> >>>
>> >>> Not a sufficient one because the patch touches files outside my area of
>> >>> maintenance, but for hw/scsi you can treat it as one.
>> >> 
>> >> Okay, that covers PATCH 1/3.
>> >> 
>> >> What about PATCH 3/3?  It's actually your idea...
>> >
>> > Yep, hw/i386 too I guess.
>> 
>> Do you mean the he/i386 part of PATCH 2/3?  How would I express that?
>> Acked-by goes into the commit message, not individual files...
>
> I mean that you only need Peter to ack now.

I guess an easy way to ask him would be a pull request ;-P

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-02-21 12:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-15 12:18 [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi Markus Armbruster
2017-02-15 12:18 ` [Qemu-devel] [PATCH v2 1/3] hw/scsi: Concentrate -drive if=scsi auto-create in one place Markus Armbruster
2017-02-15 12:18 ` [Qemu-devel] [PATCH v2 2/3] hw: Deprecate -drive if=scsi with non-onboard HBAs Markus Armbruster
2017-02-15 12:18 ` [Qemu-devel] [PATCH v2 3/3] hw/i386: Deprecate -drive if=scsi with PC machine types Markus Armbruster
2017-02-15 12:30 ` [Qemu-devel] [PATCH v2 0/3] hw: Deprecate unwanted use -drive if=scsi no-reply
2017-02-15 12:39 ` Paolo Bonzini
2017-02-15 13:10   ` Markus Armbruster
2017-02-15 13:19     ` Paolo Bonzini
2017-02-20 12:07       ` Markus Armbruster
2017-02-20 12:53         ` Paolo Bonzini
2017-02-20 13:21           ` Markus Armbruster
2017-02-20 13:23             ` Paolo Bonzini
2017-02-21 12:34               ` Markus Armbruster

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).