From: mdroth <mdroth@linux.vnet.ibm.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Stefan Berger <stefanb@linux.vnet.ibm.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
Kent E Yoder <yoder1@us.ibm.com>,
Corey Bryant <coreyb@linux.vnet.ibm.com>,
qemu-devel <qemu-devel@nongnu.org>,
Joel Schopp <jschopp@linux.vnet.ibm.com>,
Kenneth Goldman <kgoldman@us.ibm.com>,
Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] vNVRAM / blobstore design
Date: Wed, 27 Mar 2013 11:07:59 -0500 [thread overview]
Message-ID: <20130327160759.GC8146@vm> (raw)
In-Reply-To: <20130327153009.GD29249@redhat.com>
On Wed, Mar 27, 2013 at 05:30:09PM +0200, Michael S. Tsirkin wrote:
> On Wed, Mar 27, 2013 at 11:20:43AM -0400, Corey Bryant wrote:
> >
> >
> > On 03/27/2013 11:17 AM, Corey Bryant wrote:
> > >
> > >
> > >On 03/25/2013 06:20 PM, Stefan Berger wrote:
> > >>On 03/25/2013 06:05 PM, Anthony Liguori wrote:
> > >>>Stefan Berger <stefanb@linux.vnet.ibm.com> writes:
> > >>>
> > >>>>[argh, just posted this to qemu-trivial -- it's not trivial]
> > >>>>
> > >>>>
> > >>>>Hello!
> > >>>>
> > >>>>I am posting this message to revive the previous discussions about the
> > >>>>design of vNVRAM / blobstore cc'ing (at least) those that participated
> > >>>>in this discussion 'back then'.
> > >>>>
> > >>>>The first goal of the implementation is to provide an vNVRAM storage
> > >>>>for
> > >>>>a software implementation of a TPM to store its different blobs into.
> > >>>>Some of the data that the TPM writes into persistent memory needs to
> > >>>>survive a power down / power up cycle of a virtual machine, therefore
> > >>>>this type of persistent storage is needed. For the vNVRAM not to become
> > >>>>a road-block for VM migration, we would make use of block device
> > >>>>migration and layer the vNVRAM on top of the block device, therefore
> > >>>>using virtual machine images for storing the vNVRAM data.
> > >>>>
> > >>>>Besides the TPM blobs the vNVRAM should of course also be able able to
> > >>>>accommodate other use cases where persistent data is stored into
> > >>>>NVRAM,
> > >>>Well let's focus more on the "blob store". What are the semantics of
> > >>>this? Is there a max number of blobs? Are the sizes fixed or variable?
> > >>>How often are new blobs added/removed?
> > >
> > >The max number of blobs and frequency of usage depends on the usage
> > >scenario and NVRAM size. But that's probably obvious.
> > >
> > >I think we should focus on worst case scenarios where NVRAM is filled up
> > >and used frequently.
> > >
> > >One example is that an application can use TSS APIs to define, undefine,
> > >read, and write to the TPM's NVRAM storage. (The TPM owner password is
> > >required to define NVRAM data.) An application could potentially fill
> > >up NVRAM and frequently store, change, retrieve data in various places
> > >within NVRAM. And the data could have various sizes.
> > >
> > >For an example of total NVRAM size, Infineon's TPM has 16K of NVRAM.
> > >
> > >--
> > >Regards,
> > >Corey Bryant
> > >
> >
> > I just wanted to add that we could really use some direction on
> > which way the community would prefer we go with this. The 2 options
> > that are on the table at the moment for encoding/decoding the vNVRAM
> > byte stream are BER or JSON visitors.
> >
> > --
> > Regards,
> > Corey Bryant
>
> I think I like BER better. JSON seems like a bad fit for a
> bunch of binary blobs.
>
I agree, but I also think that if we use visitors it shouldn't matter
what visitor implementation we use on the backend. It might be a good
idea to build the code around a stable, existing visitor implementation
like the JSON visitors, and then plug in a BER visitor prior to merge
(or after, if the encoding is configurable/detectable).
If a BER visitor provides benefits over JSON (and I do see that being the
case here) and is general enough that it's interchangeable with a JSON
visitor, then I don't see any reason that code wouldn't stand on it's own
rather than as a prereq for vTPM/nvram.
> > >>
> > >>In case of TPM 1.2 there are 3 blobs that can be written at different
> > >>times for different reasons.
> > >>
> > >>Examples: As with a real-world TPM users loading an owner-evict key into
> > >>the TPM will cause the TPM to write that owner-evict key into is own
> > >>NVRAM. This key survives a power-off of the machine. Further, the TPM
> > >>models its own NVRAM slots. Someone writing into this type of memory
> > >>will cause data to be written into the NVRAM. There are other commands
> > >>that the TPM offers that will cause data to be written into NVRAM which
> > >>users can invoke at any time.
> > >>
> > >>The sizes of the NVRAM blobs of the TPM at least vary in size but I
> > >>handle this in the TPM emulation to pad them to fixed size. Depending on
> > >>how many such owner-evict keys are loaded into the TPM its permanent
> > >>state blob size may vary. Other devices may act differently.
> > >>
> > >>We have a-priori knowledge about the 3 different types of blobs the TPM
> > >>device produces. They are 'registered' once at the beginning (see API)
> > >>and are not 'removed' as such.
> > >>
> > >>Regards,
> > >> Stefan
> > >>
> > >
>
next prev parent reply other threads:[~2013-03-27 16:10 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-25 21:39 [Qemu-devel] vNVRAM / blobstore design Stefan Berger
2013-03-25 22:05 ` Anthony Liguori
2013-03-25 22:20 ` Stefan Berger
2013-03-27 15:17 ` Corey Bryant
2013-03-27 15:20 ` Corey Bryant
2013-03-27 15:30 ` Michael S. Tsirkin
2013-03-27 16:07 ` mdroth [this message]
2013-03-27 15:43 ` Kenneth Goldman
2013-03-27 15:53 ` Michael S. Tsirkin
2013-03-27 16:12 ` Joel Schopp
2013-03-27 16:46 ` Stefan Berger
2013-03-27 17:14 ` Anthony Liguori
2013-03-27 17:27 ` Stefan Berger
2013-03-27 18:27 ` Anthony Liguori
2013-03-27 19:12 ` Stefan Berger
2013-03-28 16:11 ` Stefan Berger
2013-03-28 16:31 ` Michael S. Tsirkin
2013-03-28 17:02 ` Stefan Berger
2013-03-28 17:27 ` Anthony Liguori
2013-03-28 17:36 ` Stefan Berger
2013-03-28 17:39 ` Michael S. Tsirkin
2013-03-29 13:55 ` Stefan Berger
2013-03-29 15:12 ` Anthony Liguori
2013-03-29 17:33 ` Kenneth Goldman
2013-03-31 8:17 ` Michael S. Tsirkin
2013-03-31 20:48 ` Kenneth Goldman
2013-04-02 12:06 ` Michael S. Tsirkin
2013-04-02 13:24 ` Kenneth Goldman
2013-04-02 13:37 ` Michael S. Tsirkin
2013-03-27 18:04 ` Michael S. Tsirkin
2013-03-27 16:20 ` Kenneth Goldman
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=20130327160759.GC8146@vm \
--to=mdroth@linux.vnet.ibm.com \
--cc=anthony@codemonkey.ws \
--cc=coreyb@linux.vnet.ibm.com \
--cc=jschopp@linux.vnet.ibm.com \
--cc=kgoldman@us.ibm.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanb@linux.vnet.ibm.com \
--cc=stefanha@gmail.com \
--cc=yoder1@us.ibm.com \
/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).