All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <jejb@linux.ibm.com>
To: Connor Kuehl <ckuehl@redhat.com>, qemu-devel@nongnu.org
Cc: npmccallum@redhat.com, dgilbert@redhat.com
Subject: Re: Interactive launch over QMP socket?
Date: Wed, 10 Feb 2021 11:06:49 -0800	[thread overview]
Message-ID: <f46a24d33185b808801531da7d9ca6457d9a790e.camel@linux.ibm.com> (raw)
In-Reply-To: <ef2db65a-f9bd-5cf7-7c1a-9ba07dd4bda0@redhat.com>

On Wed, 2021-02-10 at 12:46 -0600, Connor Kuehl wrote:
> On 2/10/21 12:14 PM, James Bottomley wrote:
> > > I would like to add a message type to QMP which allows guest
> > > owners to supply this data over a socket and _not_ require these
> > > components a priori via command line arguments. In doing so, this
> > > would allow for a 100% remote attestation process over the
> > > socket. However, I'm not sure how to express this interactive
> > > "waiting" for this data to become available with internal APIs
> > > (assuming it's not supplied as a command  line argument).
> > 
> > Well, I never understood why qemu can't deduce the value of cbitpos
> > ... it even errors out if you get it wrong.  However, other things
> > like the policy and the session file have to be present at start of
> > day. They're not things that can be passed in after qemu starts
> > building the machine image because they need to be present to begin
> > building it.
> 
> Right, I didn't mean to include cbitpos in consideration for this.
> I'm only interested in supplying the session, policy, and certificate
> info over the socket.
> 
> Shouldn't the session, policy, and certificate information only be 
> required in time for the KVM_SEV_LAUNCH_START ioctl call? This is
> the place I'm interested in waiting for the relevant data.

Well, it could, but I see the session information as being the same as
the image file, which is also a command line argument, so if you can do
the image file on the command line, why not the session info as well?

The other problem is the session info is exchanged for a launch handle
in kvm_init, which is machine_init in qemu terms.  That's called
phenomenally early, so there's not much of kvm to pause before you do
that.  So either qemu has to be rewritten to pause before processing
command line arguments, and then any argument can be added over QMP, or
the handle exchange has to occur later.

James




  reply	other threads:[~2021-02-10 19:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 18:01 Interactive launch over QMP socket? Connor Kuehl
2021-02-10 18:14 ` James Bottomley
2021-02-10 18:46   ` Connor Kuehl
2021-02-10 19:06     ` James Bottomley [this message]
2021-02-10 20:39       ` Connor Kuehl
2021-02-11  9:11         ` Dr. David Alan Gilbert
2021-02-22 11:40 ` Kevin Wolf
2021-02-22 15:39   ` Daniel P. Berrangé
2021-02-22 16:23     ` Kevin Wolf
2021-02-22 12:18 ` Daniel P. Berrangé
2021-02-22 15:00   ` Connor Kuehl
2021-02-22 15:36     ` Daniel P. Berrangé

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=f46a24d33185b808801531da7d9ca6457d9a790e.camel@linux.ibm.com \
    --to=jejb@linux.ibm.com \
    --cc=ckuehl@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=npmccallum@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.