From 2059839baa8fbc4390eddf462c601165485ffa8f Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 15 Feb 2017 11:05:40 +0100 Subject: hw: Default -drive to if=ide explicitly where it works 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 default to if=ide, even though they don't actually have an IDE controller. A future patch will change these defaults to something more sensible. To prepare for it, this patch makes default "ide" explicit for the machines that actually pick up if=ide drives: * alpha: clipper * arm/aarch64: spitz borzoi terrier tosa * i386/x86_64: generic-pc-machine (with concrete subtypes pc-q35-* pc-i440fx-* pc-* isapc xenfv) * mips64el: fulong2e * mips/mipsel/mips64el: malta mips * ppc/ppc64: mac99 g3beige prep * sh4/sh4eb: r2d * sparc64: sun4u sun4v Note that ppc64 machine powernv already sets an "ide" default explicitly. Its IDE controller isn't implemented, yet. Signed-off-by: Markus Armbruster Reviewed-by: Thomas Huth Message-Id: <1487153147-11530-2-git-send-email-armbru@redhat.com> --- hw/sparc64/sun4u.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hw/sparc64') diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index d1a6bca..d347b66 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -579,6 +579,7 @@ static void sun4u_class_init(ObjectClass *oc, void *data) mc->desc = "Sun4u platform"; mc->init = sun4u_init; + mc->block_default_type = IF_IDE; mc->max_cpus = 1; /* XXX for now */ mc->is_default = 1; mc->default_boot_order = "c"; @@ -596,6 +597,7 @@ static void sun4v_class_init(ObjectClass *oc, void *data) mc->desc = "Sun4v platform"; mc->init = sun4v_init; + mc->block_default_type = IF_IDE; mc->max_cpus = 1; /* XXX for now */ mc->default_boot_order = "c"; } -- cgit v1.1