From: David Gibson <david@gibson.dropbear.id.au>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] RFC: NVRAM for pseries machine
Date: Mon, 24 Sep 2012 10:31:02 +1000 [thread overview]
Message-ID: <20120924003102.GB9800@truffula.fritz.box> (raw)
In-Reply-To: <CAAu8pHvObBhJFX9E2yG6oqGMOBj_GjAeZ+-1wAvOyV03OdU+nA@mail.gmail.com>
On Sat, Sep 22, 2012 at 01:31:08PM +0000, Blue Swirl wrote:
> On Fri, Sep 21, 2012 at 3:08 AM, David Gibson
> <david@gibson.dropbear.id.au> wrote:
> > Below is a patch which implements the (PAPR mandated) NVRAM for the
> > pseries machine. It raises a couple of generic questions.
> >
> > First, this adds a new "nvram" machine option which is used to give a
> > block device id to back the NVRAM so it is persistent. Since some
> > sort of NVRAM is quite common, it seems this might be useful on other
> > machines one day, although obviously nothing else implements it yet.
>
> Yes, there have been discussions earlier since loading NVRAM contents
> from a file would be useful for many architectures too.
>
> >
> > Second, if a block device is not specified, it simply allocates a
> > block of memory to make a non-persistent NVRAM. Obviously that isn't
> > really "NV", but it's enough to make many guests happy most of the
> > time, and doesn't require setting up an image file and drive. It does
> > mean a different set of code paths in the driver though, and it will
> > need special case handling for savevm (not implemented yet). Is this
> > the right approach, or should I be creating a dummy block device for a
> > one-run NVRAM of this kind? I couldn't see an obvious way to do that,
> > but maybe I'm missing something.
>
> That was the problem earlier too, it looks like a generic way for all
> NVRAM/flash devices should be obvious but so far nobody has been able
> to propose something.
>
> What if there are two devices which could use this, for example CMOS
> and flash on x86?
>
> This should be extending -device syntax rather than adding another
> top level option. Something like
> -drive foo,file=nvram.qcow2,format=qcow2,id=main_nvram -device
> spapr-nvram,drive_id=main_nvram
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
Note that in our case the guest interface to the NVRAM precludes
having more than one instance of the device (the paravirtualized calls
to access it take no address or instance id). You can create multiple
with -device, but there will be no way to access them.
--
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-24 0:50 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 [this message]
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
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=20120924003102.GB9800@truffula.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=blauwirbel@gmail.com \
--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).