From patchwork Thu Jan 26 15:27:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 720224 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3v8Qqd4Y6Rz9tjt for ; Fri, 27 Jan 2017 02:31:09 +1100 (AEDT) Received: from localhost ([::1]:39350 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cWm0x-0000to-6A for incoming@patchwork.ozlabs.org; Thu, 26 Jan 2017 10:31:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34447) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cWlxn-0006SN-Gw for qemu-devel@nongnu.org; Thu, 26 Jan 2017 10:27:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cWlxl-00024m-MN for qemu-devel@nongnu.org; Thu, 26 Jan 2017 10:27:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34312) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cWlxb-0001x3-FN; Thu, 26 Jan 2017 10:27:39 -0500 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7B5F63DE3F; Thu, 26 Jan 2017 15:27:37 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-50.ams2.redhat.com [10.36.116.50]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0A6901FC859; Thu, 26 Jan 2017 15:27:37 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 6DC9D1138648; Thu, 26 Jan 2017 16:27:34 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Thu, 26 Jan 2017 16:27:34 +0100 Message-Id: <1485444454-30749-4-git-send-email-armbru@redhat.com> In-Reply-To: <1485444454-30749-1-git-send-email-armbru@redhat.com> References: <1485444454-30749-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.74 on 10.5.11.28 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 26 Jan 2017 15:27:37 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 3/3] hw/i386: Deprecate -drive if=scsi with PC machine types X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, pbonzini@redhat.com, mreitz@redhat.com, qemu-block@nongnu.org, peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 --- hw/i386/pc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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. + */ } }