From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: "Tom Lendacky" <thomas.lendacky@amd.com>,
"Brijesh Singh" <brijesh.singh@amd.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
kvm@vger.kernel.org, "Michael S . Tsirkin" <mst@redhat.com>,
"Connor Kuehl" <ckuehl@redhat.com>,
"Michael Roth" <michael.roth@amd.com>,
"James Bottomley" <jejb@linux.ibm.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Eric Blake" <eblake@redhat.com>,
qemu-devel@nongnu.org, "Dov Murik" <dovmurik@linux.ibm.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: [RFC PATCH v2 12/12] i386/sev: update query-sev QAPI format to handle SEV-SNP
Date: Tue, 7 Sep 2021 12:52:54 +0100 [thread overview]
Message-ID: <YTdSlg5NymDQex5T@work-vm> (raw)
In-Reply-To: <YTJGzrnqO9vzUqNq@redhat.com>
* Daniel P. Berrangé (berrange@redhat.com) wrote:
> On Wed, Sep 01, 2021 at 04:14:10PM +0200, Markus Armbruster wrote:
> > Michael Roth <michael.roth@amd.com> writes:
> >
> > > Most of the current 'query-sev' command is relevant to both legacy
> > > SEV/SEV-ES guests and SEV-SNP guests, with 2 exceptions:
> > >
> > > - 'policy' is a 64-bit field for SEV-SNP, not 32-bit, and
> > > the meaning of the bit positions has changed
> > > - 'handle' is not relevant to SEV-SNP
> > >
> > > To address this, this patch adds a new 'sev-type' field that can be
> > > used as a discriminator to select between SEV and SEV-SNP-specific
> > > fields/formats without breaking compatibility for existing management
> > > tools (so long as management tools that add support for launching
> > > SEV-SNP guest update their handling of query-sev appropriately).
> >
> > Technically a compatibility break: query-sev can now return an object
> > that whose member @policy has different meaning, and also lacks @handle.
> >
> > Matrix:
> >
> > Old mgmt app New mgmt app
> > Old QEMU, SEV/SEV-ES good good(1)
> > New QEMU, SEV/SEV-ES good(2) good
> > New QEMU, SEV-SNP bad(3) good
> >
> > Notes:
> >
> > (1) As long as the management application can cope with absent member
> > @sev-type.
> >
> > (2) As long as the management application ignores unknown member
> > @sev-type.
> >
> > (3) Management application may choke on missing member @handle, or
> > worse, misinterpret member @policy. Can only happen when something
> > other than the management application created the SEV-SNP guest (or the
> > user somehow made the management application create one even though it
> > doesn't know how, say with CLI option passthrough, but that's always
> > fragile, and I wouldn't worry about it here).
> >
> > I think (1) and (2) are reasonable. (3) is an issue for management
> > applications that support attaching to existing guests. Thoughts?
>
> IIUC you can only reach scenario (3) if you have created a guest
> using '-object sev-snp-guest', which is a new feature introduced
> in patch 2.
>
> IOW, scenario (3) old mgmt app + new QEMU + sev-snp guest does
> not exist as a combination. Thus the (bad) field is actually (n/a)
>
> So I believe this proposed change is acceptable in all scenarios
> with existing deployed usage, as well as all newly introduced
> scenarios.
I wonder if it's worth going firther and renaming 'policy' in the
SNP world to 'snppolicy' just to reduce the risk of accidentally
specifying the wrong one.
Dave
> Regards,
> Daniel
> --
> |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org -o- https://fstop138.berrange.com :|
> |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2021-09-07 11:54 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-26 22:26 [RFC PATCH v2 00/12] Add AMD Secure Nested Paging (SEV-SNP) support Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 01/12] i386/sev: introduce "sev-common" type to encapsulate common SEV state Michael Roth
2021-09-01 14:18 ` Markus Armbruster
2021-09-03 15:11 ` Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 02/12] linux-header: add the SNP specific command Michael Roth
2021-09-03 20:36 ` Dov Murik
2021-09-07 14:27 ` Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 03/12] i386/sev: introduce 'sev-snp-guest' object Michael Roth
2021-09-01 14:29 ` Markus Armbruster
2021-09-03 15:15 ` Michael Roth
2021-09-03 21:12 ` Dov Murik
2021-09-07 14:20 ` Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 04/12] i386/sev: initialize SNP context Michael Roth
2021-09-05 7:07 ` Dov Murik
2021-09-05 13:58 ` Brijesh Singh
2021-09-05 17:09 ` Dov Murik
2021-09-05 9:19 ` Dov Murik
2021-09-05 14:05 ` Brijesh Singh
2021-09-05 17:03 ` Dov Murik
2021-08-26 22:26 ` [RFC PATCH v2 05/12] i386/sev: add the SNP launch start context Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 06/12] i386/sev: add support to encrypt BIOS when SEV-SNP is enabled Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 07/12] i386/sev: populate secrets and cpuid page and finalize the SNP launch Michael Roth
2021-09-03 20:24 ` Dov Murik
2021-09-07 16:18 ` Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 08/12] target/i386: set SEV-SNP CPUID bit when SNP enabled Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 09/12] target/i386: allow versioned CPUs to specify new cache_info Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 10/12] target/i386: add new EPYC CPU versions with updated cache_info Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 11/12] i386/sev: sev-snp: add support for CPUID validation Michael Roth
2021-09-05 10:02 ` Dov Murik
2021-09-07 16:50 ` Michael Roth
2021-09-07 17:44 ` Dov Murik
2021-08-26 22:26 ` [RFC PATCH v2 12/12] i386/sev: update query-sev QAPI format to handle SEV-SNP Michael Roth
2021-09-01 14:14 ` Markus Armbruster
2021-09-03 15:13 ` Michael Roth
2021-09-03 15:30 ` Daniel P. Berrangé
2021-09-03 15:43 ` Michael Roth via
2021-09-03 15:58 ` Daniel P. Berrangé
2021-09-03 16:01 ` Daniel P. Berrangé
2021-09-04 5:41 ` Markus Armbruster
2021-09-07 11:52 ` Dr. David Alan Gilbert [this message]
2021-09-07 14:33 ` Michael Roth via
2021-09-03 15:27 ` Daniel P. Berrangé
2021-11-16 9:23 ` [RFC PATCH v2 00/12] Add AMD Secure Nested Paging (SEV-SNP) support Daniel P. Berrangé
2021-11-16 11:54 ` Brijesh Singh
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=YTdSlg5NymDQex5T@work-vm \
--to=dgilbert@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=brijesh.singh@amd.com \
--cc=ckuehl@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=dovmurik@linux.ibm.com \
--cc=eblake@redhat.com \
--cc=ehabkost@redhat.com \
--cc=jejb@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thomas.lendacky@amd.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).