From patchwork Thu Jan 26 15:09:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 9539421 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 3C043601D7 for ; Thu, 26 Jan 2017 15:12:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33743205FB for ; Thu, 26 Jan 2017 15:12:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2709926861; Thu, 26 Jan 2017 15:12:43 +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 A0D13205FB for ; Thu, 26 Jan 2017 15:12:42 +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 1cWlgT-0000Fw-RY; Thu, 26 Jan 2017 15:09:57 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWlgS-0000Fq-Of for xen-devel@lists.xensource.com; Thu, 26 Jan 2017 15:09:56 +0000 Received: from [85.158.139.211] by server-17.bemta-5.messagelabs.com id E6/E7-12366-3411A885; Thu, 26 Jan 2017 15:09:55 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrLLMWRWlGSWpSXmKPExsVysWW7jK6zYFe EwcYpshb3prxnd2D02N63iz2AMYo1My8pvyKBNePCp5NsBfclKx59mcHawPhKtIuRi0NIYDeT xNffT9kgnJlMErMPbmPvYuQEcsoktp9vZQWx2QS0JQ7d3wdmiwhISvzuOs0M0sAs8JVNovvaC 7CEsECkxOV9F5hAbBYBVYk5x26D2bwCjhIdG/+B2ZwCThJPmv8wQyxwlFg3fS8LiC0BtOD5hc nsIEMlBPoYJc5se8g0gZF3ASPDKkaN4tSistQiXUMDvaSizPSMktzEzBwgz1QvN7W4ODE9NSc xqVgvOT93EyMwKBiAYAfjmqnOhxglOZiURHlvandGCPEl5adUZiQWZ8QXleakFh9ilOHgUJLg LRHoihASLEpNT61Iy8wBhidMWoKDR0mE9z8/UJq3uCAxtzgzHSJ1ilGX49SN0y+ZhFjy8vNSp cR5dUBmCIAUZZTmwY2AxcolRlkpYV5GoKOEeApSi3IzS1DlXzGKczAqCfOygEzhycwrgdv0Cu gIJqAjLjC3gxxRkoiQkmpgdFn113WJ02a3FXz+UUdEXlzuKjiw/PSsDTq38p9PClsw4eyDzHM zFwSs74leF/Zvxb03Ee6/z2nGf6/hYXDTm3m1a1PPciPevvS1+m/XBe51P/DsV3++2pznZT+T DJY1vlQS1an9c2dH3te+DamrSm4q/Z6gWev4NYZ53nT7y8se6z94H3U0epESS3FGoqEWc1FxI gA2sK/PkAIAAA== X-Env-Sender: armbru@redhat.com X-Msg-Ref: server-6.tower-206.messagelabs.com!1485443393!81707930!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.1.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 45763 invoked from network); 26 Jan 2017 15:09:55 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by server-6.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 26 Jan 2017 15:09:55 -0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 93744104CE; Thu, 26 Jan 2017 15:09:53 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-50.ams2.redhat.com [10.36.116.50]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0QF9n3x027541 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 26 Jan 2017 10:09:50 -0500 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 170B61138648; Thu, 26 Jan 2017 16:09:48 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Thu, 26 Jan 2017 16:09:43 +0100 Message-Id: <1485443388-27253-4-git-send-email-armbru@redhat.com> In-Reply-To: <1485443388-27253-1-git-send-email-armbru@redhat.com> References: <1485443388-27253-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 26 Jan 2017 15:09:54 +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 v2 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;