qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <dwg@au1.ibm.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: Avik Sil <aviksil@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, Alex Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] nvram and boot order
Date: Wed, 17 Oct 2012 11:58:52 +1100	[thread overview]
Message-ID: <20121017005852.GY4640@truffula.fritz.box> (raw)
In-Reply-To: <87wqyqyyxi.fsf@codemonkey.ws>

On Tue, Oct 16, 2012 at 02:55:21PM -0500, Anthony Liguori wrote:
> 
> We discussed nvram and it's interaction with boot order in today's KVM
> call.  Here's the outcome.  This list is completely incremental so it's
> fine to start with 1-4, for instance, as long as we eventually get
> to 6.

Sorry I missed the call.  I was actually awake at the time, but I was
pretty exhausted and forgot to reset my clock from my trip away.

> Today, on x86, we implement up to (5) but we don't persist NVRAM.
> 
> 1) We should modify QEMUMachine to specify that a machine does not want
>    a default boot order.  Ideally, this would be done by adding a new
>    default_boot_order that is set to "cad" explicitly in all machines
>    allowing a machine to remove that entry.  At any rate, this allows a
>    machine to receive a NULL boot order when -boot isn't used and take an
>    appropriate action accordingly.

This sounds good to me.  I'll sync with Avik and Nikunj and get onto
implementing that immediately for our case.

> 2) In the absence of a persistent NVRAM, a ephemeral NVRAM should be
>    generated with a reasonable default boot order.

This seems.. dubious to me.  It means that qemu needs to know the
firmware representation of the boot devices, which is not necessarily
easy.  And the platforms's specific NVRAM representation may not even
allow an arbitrary list.

> 3) In the absence of -boot or ,bootindex=, the system should boot from
>    order specified in NVRAM.

Sure, makes sense.

> 
> 4) If -boot is specified, the parameter should alter the contents of
>    NVRAM to change the boot order to what is specified by -boot.

That's horrible; if you use -boot just once it will clobber a
persistent NVRAM's boot order.  I see that a means of changing the
default boot order from management tools is desirable, but that
shouldn't be the normal behaviour of -boot.  And the objections to (2)
apply even more strongly - we'd need to translate arbitrary -boot
strings to NVRAM representation which may not be at all
straightforward from the information qemu has available.

> 5) If ,bootorder is specified, it should take predence over -boot.

Sure.

> 6) ,bootorder= should also alter the contents of NVRAM to determine the
>    boot order.

And, same objections as (4).


It seems to me that this spec is focussing far too much on
implementation rather than semantics.  I think that for all platforms
the outline of the boot order semantics should be the same, that is:
	if bootindex is specified:
		use the bootindex order
	else if -boot is specified:
		use the -boot order
	else:
		use platform specific default behaviour

The last option may depend on the contents of NVRAM or other platform
specific information.  More importantly though, how best to achieve
these semantics may depend on platform specifics (including how
flexible its NVRAM boot order representation is, if any).

-- 
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

  parent reply	other threads:[~2012-10-17  0:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-16 19:55 [Qemu-devel] nvram and boot order Anthony Liguori
2012-10-16 20:07 ` Benjamin Herrenschmidt
2012-10-16 20:55   ` Anthony Liguori
2012-10-26  6:27     ` David Gibson
2012-10-17 13:48   ` Gleb Natapov
2012-10-16 20:13 ` Peter Maydell
2012-10-16 23:12   ` Anthony Liguori
2012-10-17  1:01     ` David Gibson
2012-10-17  0:58 ` David Gibson [this message]
2012-10-17 18:17   ` Anthony Liguori
2012-10-18  0:09     ` David Gibson
2012-10-18  1:18       ` Benjamin Herrenschmidt
2012-10-18  6:32         ` Alexander Graf
2012-10-19  8:24           ` David Gibson
2012-10-19  8:40             ` Alexander Graf
2012-10-25  4:14               ` David Gibson
2012-10-19 14:21             ` Anthony Liguori
2012-10-19 14:36               ` Peter Maydell
2012-10-19 18:11               ` Benjamin Herrenschmidt
2012-10-19 17:29           ` Blue Swirl

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=20121017005852.GY4640@truffula.fritz.box \
    --to=dwg@au1.ibm.com \
    --cc=agraf@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=aviksil@linux.vnet.ibm.com \
    --cc=qemu-devel@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).