From: "Michael S. Tsirkin" <mst@redhat.com>
To: Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] Design of the blobstore
Date: Thu, 15 Sep 2011 13:51:31 +0300 [thread overview]
Message-ID: <20110915105131.GA5504@redhat.com> (raw)
In-Reply-To: <4E71D1D7.1030109@linux.vnet.ibm.com>
On Thu, Sep 15, 2011 at 06:22:15AM -0400, Stefan Berger wrote:
> On 09/15/2011 02:57 AM, Michael S. Tsirkin wrote:
> >On Wed, Sep 14, 2011 at 05:12:48PM -0400, Stefan Berger wrote:
> >>On 09/14/2011 01:56 PM, Michael S. Tsirkin wrote:
> >>>On Wed, Sep 14, 2011 at 01:49:50PM -0400, Stefan Berger wrote:
> >>>>On 09/14/2011 01:40 PM, Michael S. Tsirkin wrote:
> >>>>>On Wed, Sep 14, 2011 at 01:05:44PM -0400, Stefan Berger wrote:
> >>>>>>qemu ... \
> >>>>>> -blobstore name=my-blobstore,drive=tpm-bs,showsize \
> >>>>>> -drive if=none,id=tpm-bs \
> >>>>>> -tpmdev libtpms,blobstore=my-blobstore,id=tpm0 \
> >>>>>> -device tpm-tis,tpmdev=tpm0
> >>>>>>
> >>>>>>which would result in QEMU printing to stdout:
> >>>>>>
> >>>>>>Blobstore tpm-store on drive with ID tpm-bs requires 83kb.
> >>>>>So you envision tools parsing this freetext then?
> >>>>>Seems like a step back, we are trying to move to QMP ...
> >>>>I extended it first for the way I typically interact with QEMU. I do
> >>>>not use the monitor much.
> >>>It will work even better if there's a tool to do the job instead of cut
> >>>and pasting stuff, won't it? And for that, we need monitor commands.
> >>>
> >>I am not so sure about the design of the QMP commands and how to
> >>break things up into individual calls. So does this sequence here
> >>and the 'query-blobstore' output look ok?
> >>
> >>{ "execute": "qmp_capabilities" }
> >>{"return": {}}
> >>{ "execute": "query-blobstore" }
> >>{"return": [{"size": 84480, "id": "tpm-bs"}]}
> >I'll let some QMP experts to comment.
> >
> >We don't strictly need the id here, right?
> >It is passed to the command.
> >
> >BTW is it [] or {}? It's the total size, right? Should it be
> >{"return": {"size": 84480}}
> >?
> The id serves to distinguish one blobstore from the other. We'll
> have any number of blobstores. Since we get rid of the -blobstore
> option they will only be identifiable via the ID of the drive they
> are using. If that's not good, please let me know. The example I had
> shown yesterday were using the name of the blobstore, rather than
> the drive ID, to connect the device to the blobstore.
> before:
>
> qemu ... \
> -blobstore name=my-blobstore,drive=tpm-bs,showsize \
> -drive if=none,id=tpm-bs \
> -tpmdev libtpms,blobstore=my-blobstore,id=tpm0 \
> -device tpm-tis,tpmdev=tpm0
>
> now:
>
> qemu ...\
> -tpmdev libtpms,blobstore=tpm-bs,id=tpm0 \
> -drive if=none,id=tpm-bs,file=$TPMSTATE \
>
>
>
> Stefan
Ah, I get it. I was confused thinking this
queries a single store.
Instead this returns info about *all* blobstores.
query-blobstores would be a better name then.
Otherwise I think it's fine.
Also, should we rename blobstore to 'nvram' or
something else that tells the user what this does?
>
> >
> >>Corresponding command line parameters are:
> >>
> >> -tpmdev libtpms,blobstore=tpm-bs,id=tpm0 \
> >> -drive if=none,id=tpm-bs,file=$TPMSTATE \
> >>
> >>Regards,
> >> Stefan
> >>
> >>
> >>>>>So with above, the raw case which we don't expect to be used often
> >>>>>is easy to use, but qcow which we expect to be the main case
> >>>>>is close to imposible, involving manual cut and paste
> >>>>>of image size.
> >>>>>
> >>>>>Formatting images seems a rare enough occasion,
> >>>>>that I think only using monitor command for that
> >>>>>would be a better idea than a ton of new command
> >>>>>line options. On top of that, let's write a
> >>>>>script that run qemu, queries image size,
> >>>>>creates a qcow2 file, run qemu again to format,
> >>>>>all this using QMP.
> >>>>Creates the qcow2 using 'qemu-img' I suppose.
> >>>>
> >>>> Stefan
> >>>Sure.
> >>>
> >>>>>WRT 'format and run in one go' I strongly disagree with it.
> >>>>>It's just too easy to shoot oneself in the foot.
next prev parent reply other threads:[~2011-09-15 10:50 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-14 17:05 [Qemu-devel] Design of the blobstore Stefan Berger
2011-09-14 17:40 ` Michael S. Tsirkin
2011-09-14 17:49 ` Stefan Berger
2011-09-14 17:56 ` Michael S. Tsirkin
2011-09-14 21:12 ` Stefan Berger
2011-09-15 6:57 ` Michael S. Tsirkin
2011-09-15 10:22 ` Stefan Berger
2011-09-15 10:51 ` Michael S. Tsirkin [this message]
2011-09-15 10:55 ` Stefan Berger
2011-09-15 5:47 ` Gleb Natapov
2011-09-15 10:18 ` Stefan Berger
2011-09-15 10:20 ` Gleb Natapov
2011-09-15 11:17 ` Stefan Hajnoczi
2011-09-15 11:35 ` Daniel P. Berrange
2011-09-15 11:40 ` Kevin Wolf
2011-09-15 11:58 ` Stefan Hajnoczi
2011-09-15 12:31 ` Michael S. Tsirkin
2011-09-16 8:46 ` Kevin Wolf
2011-09-15 14:19 ` Stefan Berger
2011-09-16 8:12 ` Kevin Wolf
2011-09-15 12:34 ` [Qemu-devel] Design of the blobstore [API of the NVRAM] Stefan Berger
2011-09-16 10:35 ` Stefan Hajnoczi
2011-09-16 11:36 ` Stefan Berger
2011-09-15 13:05 ` [Qemu-devel] Design of the blobstore Daniel P. Berrange
2011-09-15 13:13 ` Stefan Berger
2011-09-15 13:27 ` Daniel P. Berrange
2011-09-15 14:00 ` Stefan Berger
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=20110915105131.GA5504@redhat.com \
--to=mst@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanb@linux.vnet.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).