From: Sean Christopherson <seanjc@google.com>
To: Peter Gonda <pgonda@google.com>
Cc: kvm list <kvm@vger.kernel.org>, Marc Orr <marcorr@google.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Nathan Tempelman <natet@google.com>,
Brijesh Singh <brijesh.singh@amd.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: SEV: Disable KVM_CAP_VM_COPY_ENC_CONTEXT_FROM for SEV-ES
Date: Tue, 14 Sep 2021 18:41:15 +0000 [thread overview]
Message-ID: <YUDsy4W0/FeIEJDr@google.com> (raw)
In-Reply-To: <CAMkAt6opZoFfW_DiyJUREBAtd8503C6j+ZbjS9YL3z+bhqHR8Q@mail.gmail.com>
-stable, for giggles
On Tue, Sep 14, 2021, Peter Gonda wrote:
> On Tue, Sep 14, 2021 at 11:32 AM Sean Christopherson <seanjc@google.com> wrote:
> >
> > On Tue, Sep 14, 2021, Peter Gonda wrote:
> > > Copying an ASID into new vCPUs will not work for SEV-ES since the vCPUs
> > > VMSAs need to be setup and measured before SEV_LAUNCH_FINISH. Return an
> > > error if a users tries to KVM_CAP_VM_COPY_ENC_CONTEXT_FROM from an
> > > SEV-ES guest.
> >
> > What happens if userspace does KVM_CAP_VM_COPY_ENC_CONTEXT_FROM before the source
> > has created vCPUs, i.e. before it has done SEV_LAUNCH_FINISH?
>
> That's not enough. If you wanted to be able to mirror SEV-ES you'd
> also need to call LAUNCH_UPDATE_VMSA on the mirror's vCPUs before
> SEV_LAUNCH_FINISH. That is do-able but I was writing a small change to
> fix this bug. If mirroring of SEV-ES is wanted it's a much bigger
> change.
Is it doable without KVM updates? If so, then outright rejection may not be the
correct behavior.
> > Might be worth noting that the destination cannot be an SEV guest, and therefore
> > can't be an SEV-ES guest either.
>
> sev_guest() implies sev_es_guest() so I think this case is covered.
Yes, I was suggesting calling that out in the changelog so that readers/reviewers
don't worry about that case.
> > Cc: stable@vger.kernel.org
> Oops. I'll update in the V2 if needed. Added to this thread for now.
FWIW, you don't actually need to Cc stable, just including it in the changelog is
sufficient as the script automagic will pick it up when it hits Linus' tree.
next prev parent reply other threads:[~2021-09-14 18:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-14 17:15 [PATCH] KVM: SEV: Disable KVM_CAP_VM_COPY_ENC_CONTEXT_FROM for SEV-ES Peter Gonda
2021-09-14 17:32 ` Sean Christopherson
2021-09-14 17:58 ` Peter Gonda
2021-09-14 18:41 ` Sean Christopherson [this message]
2021-09-14 18:46 ` Peter Gonda
2021-09-14 18:49 ` Sean Christopherson
2021-09-15 8:44 ` Paolo Bonzini
2021-09-15 16:10 ` Peter Gonda
2021-09-15 22:33 ` Paolo Bonzini
2021-09-16 18:08 ` Nathan Tempelman
2021-09-16 19:00 ` Nathan Tempelman
2021-09-21 15:04 ` Peter Gonda
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=YUDsy4W0/FeIEJDr@google.com \
--to=seanjc@google.com \
--cc=brijesh.singh@amd.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcorr@google.com \
--cc=natet@google.com \
--cc=pbonzini@redhat.com \
--cc=pgonda@google.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