From: James Bottomley <jejb@linux.ibm.com>
To: devel@edk2.groups.io, tobin@linux.ibm.com, dgilbert@redhat.com
Cc: Laszlo Ersek <lersek@redhat.com>,
dovmurik@linux.vnet.ibm.com, Dov.Murik1@il.ibm.com,
ashish.kalra@amd.com, brijesh.singh@amd.com, tobin@ibm.com,
david.kaplan@amd.com, jon.grimm@amd.com, thomas.lendacky@amd.com,
frankeh@us.ibm.com
Subject: Re: [edk2-devel] RFC: Fast Migration for SEV and SEV-ES - blueprint and proof of concept
Date: Mon, 09 Nov 2020 15:44:04 -0800 [thread overview]
Message-ID: <e19e2e8a147ec7ea9264288aa8ff359ae531f29f.camel@linux.ibm.com> (raw)
In-Reply-To: <b37b90ad8664851244de92695a27a69d@linux.vnet.ibm.com>
On Mon, 2020-11-09 at 17:37 -0500, Tobin Feldman-Fitzthum wrote:
> On 2020-11-09 14:56, Dr. David Alan Gilbert wrote:
> > * Tobin Feldman-Fitzthum (tobin@linux.ibm.com) wrote:
[...]
> > > We're still working out some of the details in QEMU, but the
> > > basic idea of transferring memory is that each time the HV needs
> > > to send a page to the target, it will ask the Migration Handler
> > > in the guest for a version of the page that is encrypted with a
> > > transport key. Since the MH is inside the guest, it can read
> > > from any address in guest memory. The Migration Handlers on the
> > > source and the target will share a key. Once the source encrypts
> > > the requested page with the transport key, it can safely hand it
> > > off to the HV. Once the page reaches the target, the target HV
> > > will pass the page into the Migration Handler, which will decrypt
> > > using the transport key and move the page to the appropriate
> > > address.
> >
> > So somehow we have to get that transport key negotiated and into
> > the the migration-handlers.
>
> Inject-launch-secret is one of the main pieces here. James might have
> more info about this step.
So there are a couple of ways I was thinking this could work. In the
current slow migration, the PSPs on each end validate each other by
exchanging keys. We could do something similar by having the two MHs
do an ECDHE exchange to agree a trusted transfer key between them and
then having them both exchange trusted information about the SEV
environment i.e. both validating each other.
However, the alternative and simpler way is simply to have the machine
owner control everything. So encrypted boot would provision two
secrets: one for the actual encrypted root which grub needs but the
other would be what the MH needs. The MH secret would be the private
part of an ECDH key (effectively the MH identity) and the public ECDH
key of the MH source, so only the source MH would be able to make
encrypted contact for migration. On boot from image, the public key
part would be empty indicating boot should proceed normally. On
migration, we make sure we know the source public key and provision it
to the target along with a random target key. To trigger the
migration, we have to tell the source what the target's public key is
and they can now make encrypted contact in a manner that should be
cryptographically secure. The MH ECDH key would exist for the lifetime
of the VM on a SEV system and would be destroyed on either image
shutdown or successful migration.
James
prev parent reply other threads:[~2020-11-09 23:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-28 19:31 RFC: Fast Migration for SEV and SEV-ES - blueprint and proof of concept Tobin Feldman-Fitzthum
2020-10-29 17:06 ` Ashish Kalra
2020-10-29 20:36 ` tobin
2020-10-30 18:35 ` Ashish Kalra
2020-11-03 14:59 ` [edk2-devel] " Laszlo Ersek
2020-11-04 18:27 ` Tobin Feldman-Fitzthum
2020-11-06 15:45 ` Laszlo Ersek
2020-11-06 20:03 ` Tobin Feldman-Fitzthum
2020-11-06 16:38 ` Dr. David Alan Gilbert
2020-11-06 21:48 ` Tobin Feldman-Fitzthum
2020-11-06 22:17 ` Ashish Kalra
2020-11-09 20:27 ` Tobin Feldman-Fitzthum
2020-11-09 20:34 ` Kalra, Ashish
2020-11-09 19:56 ` Dr. David Alan Gilbert
2020-11-09 22:37 ` Tobin Feldman-Fitzthum
2020-11-09 23:44 ` James Bottomley [this message]
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-list 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=e19e2e8a147ec7ea9264288aa8ff359ae531f29f.camel@linux.ibm.com \
--to=devel@edk2.groups.io \
/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