diff options
author | Markus Armbruster <armbru@redhat.com> | 2017-02-15 11:05:40 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-02-21 13:10:53 +0100 |
commit | 2059839baa8fbc4390eddf462c601165485ffa8f (patch) | |
tree | fb8d01c04fe358fc4fb85807c5e3db7268a207b7 /hw/mips | |
parent | b856256179f14c33a513d0b9cc3e4be355b95f43 (diff) |
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 <armbru@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1487153147-11530-2-git-send-email-armbru@redhat.com>
Diffstat (limited to 'hw/mips')
-rw-r--r-- | hw/mips/mips_fulong2e.c | 1 | ||||
-rw-r--r-- | hw/mips/mips_malta.c | 1 | ||||
-rw-r--r-- | hw/mips/mips_r4k.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index 9a4dae42d9..e636c3abaa 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -387,6 +387,7 @@ static void mips_fulong2e_machine_init(MachineClass *mc) { mc->desc = "Fulong 2e mini pc"; mc->init = mips_fulong2e_init; + mc->block_default_type = IF_IDE; } DEFINE_MACHINE("fulong2e", mips_fulong2e_machine_init) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 75877de11c..5dd177e961 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -1264,6 +1264,7 @@ static void mips_malta_machine_init(MachineClass *mc) { mc->desc = "MIPS Malta Core LV"; mc->init = mips_malta_init; + mc->block_default_type = IF_IDE; mc->max_cpus = 16; mc->is_default = 1; } diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c index 27548c43b6..748586ed77 100644 --- a/hw/mips/mips_r4k.c +++ b/hw/mips/mips_r4k.c @@ -306,6 +306,7 @@ static void mips_machine_init(MachineClass *mc) { mc->desc = "mips r4k platform"; mc->init = mips_r4k_init; + mc->block_default_type = IF_IDE; } DEFINE_MACHINE("mips", mips_machine_init) |