From: David Gibson <david@gibson.dropbear.id.au>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] RFC: NVRAM for pseries machine
Date: Wed, 26 Sep 2012 11:18:57 +1000 [thread overview]
Message-ID: <20120926011857.GC31993@truffula.fritz.box> (raw)
In-Reply-To: <8788F852-B6E6-4B78-96B1-572D82350F9F@suse.de>
On Wed, Sep 26, 2012 at 03:03:10AM +0200, Alexander Graf wrote:
> On 26.09.2012, at 02:27, David Gibson wrote:
> > On Mon, Sep 24, 2012 at 12:38:59PM +0200, Alexander Graf wrote:
> >> On 24.09.2012, at 02:31, David Gibson wrote:
[snip]
> >>> So, if you look at the patch there is actually a -device form within
> >>> there, the machine option is a wrapper around it. Without the machine
> >>> option, I don't see how to get the desired properties for the
> >>> configuration that is:
> >>> * NVRAM is always instantiated by default (even if it's
> >>> non-persistent)
> >>> * It's easy to set the drive for that always-present NVRAM
> >>
> >> I suppose the idea is that when creating a machine from a qtree
> >> dump, we can still recreate it. Or maybe when using -nodefaults? Not
> >> sure. But the way you do it right now is very close to how we want
> >> to model USB too, so I do like it. It's consistent.
> >
> > I really don't follow what point you're making here.
> >
> > The problem with -device syntax for my purpose is that with *no* extra
> > command line arguments we should always have some sort of NVRAM - it's
> > mandated by the platform spec, and should always be there, just like
> > the PCI bridge and VIO bridge. That means instantiating the device
> > from the machine setup code. But then, using -device will create a
> > second instance of the device, which is no good, because only one can
> > actually be used.
>
> What I'm trying to say is that the machine file should create a
> device. Always in the case of PAPR. But I suppose pseudo-code is
> easier to read:
>
> spapr.c:
>
> create_device("spapr-nvram", drive=machine_opts["nvram"]);
Ok. That's what I do now.
> spapr-nvram:
>
> if (!drive || checksum_is_bad(drive))
> autogenerate_nvram_contents();
Actually, I'm planning for the initialization of the content to be
done from the guest firmware.
> Then we can later add in vl.c:
>
> case OPTION_nvram:
> create_drive("nvram", option);
> machine_opts["nvram"] = drive["nvram"];
Ok, that all works for me.
Blue, does that seem reasonable to you?
--
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-09-26 1:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-21 3:08 [Qemu-devel] RFC: NVRAM for pseries machine David Gibson
2012-09-22 13:31 ` [Qemu-devel] [Qemu-ppc] " Blue Swirl
2012-09-22 14:16 ` Alexander Graf
2012-09-22 14:26 ` Blue Swirl
2012-09-24 0:34 ` David Gibson
2012-09-26 20:03 ` Anthony Liguori
2012-09-26 20:51 ` Alexander Graf
2012-09-29 11:46 ` Blue Swirl
2012-09-29 12:54 ` Alexander Graf
2012-09-29 14:11 ` Blue Swirl
2012-09-29 15:24 ` Alexander Graf
2012-09-24 0:31 ` David Gibson
2012-09-24 10:38 ` Alexander Graf
2012-09-26 0:27 ` David Gibson
2012-09-26 1:03 ` Alexander Graf
2012-09-26 1:18 ` David Gibson [this message]
2012-09-26 8:56 ` Alexander Graf
2012-09-26 12:08 ` Thomas Huth
2012-09-24 10:36 ` [Qemu-devel] " Alexander Graf
2012-09-24 12:25 ` [Qemu-devel] [Qemu-ppc] " David Gibson
2012-09-24 13:44 ` 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=20120926011857.GC31993@truffula.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--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).