From patchwork Mon Jan 23 09:48:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 9531979 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 1512860434 for ; Mon, 23 Jan 2017 09:51:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0610C27813 for ; Mon, 23 Jan 2017 09:51:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EDA6427E3E; Mon, 23 Jan 2017 09:51:35 +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 C529B27813 for ; Mon, 23 Jan 2017 09:51: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 1cVbF8-0004jR-At; Mon, 23 Jan 2017 09:48:54 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cVbF6-0004jL-Vt for xen-devel@lists.xensource.com; Mon, 23 Jan 2017 09:48:53 +0000 Received: from [85.158.137.68] by server-1.bemta-3.messagelabs.com id 1B/62-20518-481D5885; Mon, 23 Jan 2017 09:48:52 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrDLMWRWlGSWpSXmKPExsVysWW7jG7zxdY Ig7NbVS3uTXnP7sDosb1vF3sAYxRrZl5SfkUCa8a7k00sBeskKz5cmc/YwLhXtIuRi0NIYDeT xLkt59kgnJlMEq8mT2PtYuQEcsokui+9BbPZBLQlDt3fB2aLCEhK/O46zQzSwCzwiE3iTftPs ISwQJjEuaPfmEFsFgFVidY7W8FsXgFHie/TmtlBbE4BJ4kFnxvYIRY4Smx53wPWKwG04OP3Y4 wgQyUE+hglNm/YyTaBkXcBI8MqRvXi1KKy1CJdE72kosz0jJLcxMwcXUMDY73c1OLixPTUnMS kYr3k/NxNjMCQYACCHYyNX5wOMUpyMCmJ8t6Ib4kQ4kvKT6nMSCzOiC8qzUktPsQow8GhJMHL dKE1QkiwKDU9tSItMwcYnDBpCQ4eJRHedJA0b3FBYm5xZjpE6hSjLsepG6dfMgmx5OXnpUqJ8 4qBFAmAFGWU5sGNgEXKJUZZKWFeRqCjhHgKUotyM0tQ5V8xinMwKgnzmoBM4cnMK4Hb9AroCC agI2QlmkGOKElESEk1MDZW2uhMPCv/LHhj1MRE+5p9j78fnNeRIXv3m6baoSYrNtlFunO3mL2 xVbFtv3JGPz7VMHxZjtlPh7JjglnqUW8j5m+9df+rS+vZeYcK3mwSuDS1+4qMzEapZ0dvxly4 MnnuTj29ypz+VqY99y2KV/fk6V14slAh1vVjv3O1WXXNDPuCXifnCiWW4oxEQy3mouJEACd4k z2PAgAA X-Env-Sender: armbru@redhat.com X-Msg-Ref: server-11.tower-31.messagelabs.com!1485164930!50989247!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 7843 invoked from network); 23 Jan 2017 09:48:51 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by server-11.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 23 Jan 2017 09:48:51 -0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (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 1E1A961BB3; Mon, 23 Jan 2017 09:48:49 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-117-93.ams2.redhat.com [10.36.117.93]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0N9miVh004347 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 23 Jan 2017 04:48:46 -0500 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 555AD1138648; Mon, 23 Jan 2017 10:48:43 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Mon, 23 Jan 2017 10:48:40 +0100 Message-Id: <1485164923-17736-4-git-send-email-armbru@redhat.com> In-Reply-To: <1485164923-17736-1-git-send-email-armbru@redhat.com> References: <1485164923-17736-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 23 Jan 2017 09:48:50 +0000 (UTC) Cc: kwolf@redhat.com, Peter Maydell , Stefano Stabellini , Jia Liu , qemu-block@nongnu.org, Mark Cave-Ayland , Anthony Green , Magnus Damm , Laurent Vivier , Fabien Chouteau , Alexander Graf , Max Filippov , Michael Walle , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Bastian Koppelmann , Anthony Perard , "Edgar E . Iglesias" , Guan Xuetao , xen-devel@lists.xensource.com, Artyom Tarasenko Subject: [Xen-devel] [PATCH 3/6] 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 --- 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;