From: David Gibson <dwg@au1.ibm.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: aliguori@us.ibm.com, qemu-ppc@nongnu.org,
Avik Sil <aviksil@linux.vnet.ibm.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 1/2] Make default boot order machine specific
Date: Mon, 29 Oct 2012 11:15:11 +1100 [thread overview]
Message-ID: <20121029001511.GC27695@truffula.fritz.box> (raw)
In-Reply-To: <CAFEAcA9L9HrSo--S+uKkhJS=_g=15UmzOx4_A4Q4nc0vXQq1XA@mail.gmail.com>
On Thu, Oct 25, 2012 at 06:01:16PM +0100, Peter Maydell wrote:
> On 25 October 2012 15:38, Avik Sil <aviksil@linux.vnet.ibm.com> wrote:
> > @@ -171,6 +171,7 @@ static QEMUMachine clipper_machine = {
> > .init = clipper_init,
> > .max_cpus = 4,
> > .is_default = 1,
> > + .default_machine_opts = DEFAULT_BOOT_ORDER,
> > };
>
> > @@ -86,6 +86,7 @@ static QEMUMachine an5206_machine = {
> > .name = "an5206",
> > .desc = "Arnewsh 5206",
> > .init = an5206_init,
> > + .default_machine_opts = DEFAULT_BOOT_ORDER,
> > };
>
> > +++ b/hw/axis_dev88.c
> > @@ -355,6 +355,7 @@ static QEMUMachine axisdev88_machine = {
> > .desc = "AXIS devboard 88",
> > .init = axisdev88_init,
> > .is_default = 1,
> > + .default_machine_opts = DEFAULT_BOOT_ORDER,
> > };
>
> The thing about a default is that you shouldn't have to
> explicitly say it in every QEMUMachine struct... Please
> make the code handle a NULL in the struct in a way
> that means you don't need to touch every board.
So, simply treating NULL as equivalent to "cad" would defeat the
purpose of this patch, which is to make a distinction visible to the
machine between -boot not specified at all and -boot specified
explicitly (as "cad" or otherwise).
So that gives us a few options (Alex described 2 of these already):
* Add a DEFAULT_MACHINE_OPTS macro which does this specification.
Frankly I don't really see what that buys us above the
DEFAULT_BOOT_ORDER that is already in the patch.
* Add a 'use_default_boot_order' field to QEMUMachine. Avik actually
did that in an earlier version and I convinced him the current
approach would be better. Maybe that was a mistake.
* Don't have the machines access the machine option directly, but via
a helper macro which takes a default parameter. There's a patch from
Li Zhang in Alex Graf's tree that does a similar thing for whether USB
is enabled.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next prev parent reply other threads:[~2012-10-29 0:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-25 14:38 [Qemu-devel] [PATCH v2 0/2] Qemu boot order patch series Avik Sil
2012-10-25 14:38 ` [Qemu-devel] [PATCH v2 1/2] Make default boot order machine specific Avik Sil
2012-10-25 17:01 ` Peter Maydell
2012-10-25 20:18 ` Anthony Liguori
2012-10-25 20:50 ` Peter Maydell
2012-10-25 20:57 ` Alexander Graf
2012-10-26 11:45 ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2012-11-05 11:34 ` Avik Sil
2012-11-23 16:52 ` Alexander Graf
2012-11-27 17:24 ` Avik Sil
2012-12-05 17:05 ` Avik Sil
2012-10-29 2:41 ` David Gibson
2012-10-29 0:15 ` David Gibson [this message]
2012-10-25 14:38 ` [Qemu-devel] [PATCH v2 2/2] pseries: set no default boot order Avik Sil
2012-10-25 16:49 ` [Qemu-devel] [PATCH v2 0/2] Qemu boot order patch series Alexander Graf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121029001511.GC27695@truffula.fritz.box \
--to=dwg@au1.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=aviksil@linux.vnet.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).