From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Gibson <dwg@au1.ibm.com>
Cc: Avik Sil <aviksil@linux.vnet.ibm.com>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, Alex Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] nvram and boot order
Date: Thu, 18 Oct 2012 12:18:18 +1100 [thread overview]
Message-ID: <1350523098.4678.133.camel@pasglop> (raw)
In-Reply-To: <20121018000911.GE30304@truffula.fritz.box>
On Thu, 2012-10-18 at 11:09 +1100, David Gibson wrote:
> > > 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.
> >
> > It may not be straight forward, but it's what makes the most sense from
> > a user's PoV.
>
> Bollocks. Using -boot to override the normal boot sequence
> permanently changing the normal boot sequence absoultely does not make
> sense from a user's PoV.
I strongly agree with David here. -boot should not change the persistent
state.
In our case, the persistent state will have been carefully crafted by
complicated scripts by the distro installer, and while I may want to use
-boot to boot once off a cd image or similar, I certainly don't want
that to affect my nvram setting pointing to the right on-disk
bootloader.
Additionally I don't want qemu to have to understand all the intricacies
of expressing OFW boot path if we can avoid it.
Qemu gives as much info as it can and let the firmware itself inside the
guest figure things out.
In fact, I don't want Qemu to know anything about our internal nvram
format. This is a business between the guest FW and the guest OS. The
only thing qemu is allowed to do is wipe it out if asked to do so :-)
> Um.. as far as I can tell that's a point in favour of my position. It
> makes it impossible for qemu to correctly describe boot sequences
> using these devices in the terms firmware uses internally. On the
> other hand it certainly is possible for qemu to pass bootorder="cd"
> (or whatever) to the firmware via device tree of fw_cfg and have
> firmware locally interpret that in tersm of what it knows about
> available devices.
This is more/less what happens with -boot today. IE. If you pass "c"
SLOF looks for a bootable disk (though arguably the algorithm could be
improved), "d" for a bootable optical media etc...
We definitely want something a bit more expressive and in some case
might even be able to pass down from the command line a full path to an
actual device but we don't necessarily want qemu to understand the nvram
format of this.
Make it an expressive representation that makes sense to qemu, and let
the FW "translate" that to something it understands internally.
Cheers,
Ben.
next prev parent reply other threads:[~2012-10-18 1:18 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
2012-10-17 18:17 ` Anthony Liguori
2012-10-18 0:09 ` David Gibson
2012-10-18 1:18 ` Benjamin Herrenschmidt [this message]
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=1350523098.4678.133.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--cc=aviksil@linux.vnet.ibm.com \
--cc=dwg@au1.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).