From patchwork Wed Feb 15 10:05:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 9573725 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1345460209 for ; Wed, 15 Feb 2017 10:08:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F25052846D for ; Wed, 15 Feb 2017 10:08:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E36D728473; Wed, 15 Feb 2017 10:08:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 831582846D for ; Wed, 15 Feb 2017 10:08:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdwTG-0001Z6-R9; Wed, 15 Feb 2017 10:05:58 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdwTF-0001Yx-7m for xen-devel@lists.xensource.com; Wed, 15 Feb 2017 10:05:57 +0000 Received: from [193.109.254.147] by server-6.bemta-6.messagelabs.com id 87/F3-15112-40824A85; Wed, 15 Feb 2017 10:05:56 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNLMWRWlGSWpSXmKPExsVysWW7jC6jxpI Ig87XTBb3prxnd2D02N63iz2AMYo1My8pvyKBNePEhYlsBbulKj5P3cTewLhPrIuRi0NIYDaT RMOdh0wQzjZGib3H1jB2MXICOWUSq27eZgOx2QS0JQ7d38cKYosISEr87jrNDNLALDCLTeLiz UdgRcICkRL90xcxgdgsAqoSfxvPsoPYvAKOEnvXLwUaysHBKeAkcflRBIgpBBReMqEepEICaP yx80/ZQEZKCPQxSnx5t49xAiPvAkaGVYwaxalFZalFuoaGeklFmekZJbmJmTm6hgZmermpxcW J6ak5iUnFesn5uZsYgQHBAAQ7GD8tCzjEKMnBpCTKy3ZscYQQX1J+SmVGYnFGfFFpTmrxIUYZ Dg4lCV4Z9SURQoJFqempFWmZOcDQhElLcPAoifCuVwNK8xYXJOYWZ6ZDpE4x6nKcunH6JZMQS 15+XqqUOO8XkCIBkKKM0jy4EbA4ucQoKyXMywh0lBBPQWpRbmYJqvwrRnEORiVh3ncgU3gy80 rgNr0COoIJ6AjWuIUgR5QkIqSkGhiDTxxw3v23Octg6ge1m9v9OFPvH0q+sHHPQ404f/UXvxX mT5ik/L90y9L3f3V+rXTh2P5ff9rnopk+eS1cruuUDjk+6pv1r/7rjnmc6Q45wcK8py6+M58/ rfO3hULz8oNcUplzqs+W3FLOKYg+qbnMNqTkTJ7D5z+O9xktvZ25N4Xf+nC2ZV6IEktxRqKhF nNRcSIAkkZjW44CAAA= X-Env-Sender: armbru@redhat.com X-Msg-Ref: server-5.tower-27.messagelabs.com!1487153151!81662708!1 X-Originating-IP: [209.132.183.28] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMjA5LjEzMi4xODMuMjggPT4gNTQwNjQ=\n X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 29020 invoked from network); 15 Feb 2017 10:05:52 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by server-5.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 15 Feb 2017 10:05:52 -0000 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 17FE280481; Wed, 15 Feb 2017 10:05:52 +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 9E6F17FE4F; Wed, 15 Feb 2017 10:05:50 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id DB5ED11384AF; Wed, 15 Feb 2017 11:05:47 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Wed, 15 Feb 2017 11:05:42 +0100 Message-Id: <1487153147-11530-4-git-send-email-armbru@redhat.com> In-Reply-To: <1487153147-11530-1-git-send-email-armbru@redhat.com> References: <1487153147-11530-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.28]); Wed, 15 Feb 2017 10:05:52 +0000 (UTC) Cc: Peter Maydell , Anthony Green , Mark Cave-Ayland , Max Filippov , "Edgar E . Iglesias" , Guan Xuetao , Stefano Stabellini , Jia Liu , qemu-block@nongnu.org, Magnus Damm , Alexander Graf , Anthony Perard , Artyom Tarasenko , Fabien Chouteau , qemu-arm@nongnu.org, kwolf@redhat.com, Bastian Koppelmann , Laurent Vivier , mreitz@redhat.com, Michael Walle , qemu-ppc@nongnu.org, xen-devel@lists.xensource.com Subject: [Xen-devel] [PATCH v3 3/8] hw: Default -drive to if=none instead of ide when ide cannot work X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Block backends defined with -drive if=ide are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. if=ide drives not picked up that way can still be used with -device as if they had if=none, but that's unclean and best avoided. Unused ones produce an "Orphaned drive without device" warning. -drive parameter "if" is optional, and the default depends on the machine type. If a machine type doesn't specify a default, the default is "ide". Many machine types implicitly default to if=ide that way, even though they don't actually have an IDE controller. This makes no sense. Change the implicit default to if=none. Affected machines: * all targets: none * aarch64/arm: akita ast2500 canon cheetah collie connex imx25 integratorcp kzm lm3s6965evb lm3s811evb mainstone musicpal n800 n810 netduino2 nuri palmetto realview romulus sabrelite smdkc210 sx1 sx1 verdex z2 * cris: axis-dev88 * i386/x86_64: xenpv * lm32: lm32-evr lm32-uclinux milkymist * m68k: an5206 dummy mcf5208evb * microblaze/microblazeel: petalogix-ml605 petalogix-s3adsp1800 * mips/mips64/mips64el/mipsel: mipssim * moxie: moxiesim * or32: or32-sim * ppc/ppc64/ppcemb: bamboo ref405ep taihu virtex-ml507 * ppc/ppc64: mpc8544ds ppce500 * sh4/sh4eb: shix * sparc: leon3_generic * sparc64: niagara * tricore: tricore_testboard * unicore32: puv3 * xtensa/xtensaeb: kc705 lx200 lx60 ml605 sim None of these machines have an IDE controller, let alone code to honor if=ide. Cc: Peter Maydell Cc: qemu-arm@nongnu.org Cc: Edgar E. Iglesias Cc: Stefano Stabellini Cc: Anthony Perard Cc: xen-devel@lists.xensource.com Cc: Michael Walle Cc: Laurent Vivier Cc: Anthony Green Cc: Jia Liu Cc: Alexander Graf Cc: qemu-ppc@nongnu.org Cc: Magnus Damm Cc: Fabien Chouteau Cc: Mark Cave-Ayland Cc: Artyom Tarasenko Cc: Bastian Koppelmann Cc: Guan Xuetao Cc: Max Filippov Signed-off-by: Markus Armbruster Acked-By: Artyom Tarasenko Reviewed-by: Laurent Vivier Reviewed-by: Thomas Huth --- include/sysemu/blockdev.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h index 16432f3..351a039 100644 --- a/include/sysemu/blockdev.h +++ b/include/sysemu/blockdev.h @@ -19,12 +19,11 @@ void blockdev_auto_del(BlockBackend *blk); typedef enum { IF_DEFAULT = -1, /* for use with drive_add() only */ /* - * IF_IDE must be zero, because we want MachineClass member - * block_default_type to default-initialize to IF_IDE + * IF_NONE must be zero, because we want MachineClass member + * block_default_type to default-initialize to IF_NONE */ - IF_IDE = 0, - IF_NONE, - IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO, IF_XEN, + IF_NONE = 0, + IF_IDE, IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO, IF_XEN, IF_COUNT } BlockInterfaceType;