[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 1/2] Make default boot order machi
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 1/2] Make default boot order machine specific |
Date: |
Mon, 29 Oct 2012 11:15:11 +1100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Oct 25, 2012 at 06:01:16PM +0100, Peter Maydell wrote:
> On 25 October 2012 15:38, Avik Sil <address@hidden> 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
Re: [Qemu-ppc] [PATCH v2 0/2] Qemu boot order patch series, Alexander Graf, 2012/10/25