From: Tom Lendacky <thomas.lendacky@amd.com>
To: Peter Gonda <pgonda@google.com>
Cc: kvm list <kvm@vger.kernel.org>, Marc Orr <marcorr@google.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Sean Christopherson <seanjc@google.com>,
David Rientjes <rientjes@google.com>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
Brijesh Singh <brijesh.singh@amd.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4 V9] KVM: SEV: Add support for SEV-ES intra host migration
Date: Fri, 8 Oct 2021 14:56:01 -0500 [thread overview]
Message-ID: <cbc2a728-8c4d-08f9-4524-d198aba7d369@amd.com> (raw)
In-Reply-To: <CAMkAt6oF52BDB4UX7DhVxQygYANfietT=gqJMQOvKJifHpivTQ@mail.gmail.com>
On 10/8/21 12:26 PM, Peter Gonda wrote:
> On Fri, Oct 8, 2021 at 9:38 AM Tom Lendacky <thomas.lendacky@amd.com> wrote:
>>
>> Would it make sense to have a pre-patch that puts these fields into a
>> struct? Then you can just copy the struct and zero it after. If anything
>> is ever added for any reason, then it could/should be added to the struct
>> and this code wouldn't have to change. It might be more churn than it's
>> worth, just a thought.
>>
>
> That sounds like a good idea to me. I'll add a new patch to the start
> of the series which adds in something like:
>
> struct vcpu_sev_es_state {
> /* SEV-ES support */
> struct vmcb_save_area *vmsa;
> struct ghcb *ghcb;
> struct kvm_host_map ghcb_map;
> bool received_first_sipi;
> /* SEV-ES scratch area support */
> void *ghcb_sa;
> u64 ghcb_sa_len;
> bool ghcb_sa_sync;
> bool ghcb_sa_free;
> };
>
> struct vcpu_svm {
> ...
> struct vcpu_sev_es_state sev_es_state;
> ...
> };
>
> I think that will make this less tedious / error prone code. Names
> sound OK or better suggestion?
Those names seem fine to me. If you want to shorten them, you could always
drop the "_state" portion.
Thanks,
Tom
>
next prev parent reply other threads:[~2021-10-08 19:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-05 14:13 [PATCH 0/4 V9] Add AMD SEV and SEV-ES intra host migration support Peter Gonda
2021-10-05 14:13 ` [PATCH 1/4 V9] KVM: SEV: Add support for SEV intra host migration Peter Gonda
2021-10-05 14:13 ` [PATCH 2/4 V9] KVM: SEV: Add support for SEV-ES " Peter Gonda
2021-10-08 15:38 ` Tom Lendacky
2021-10-08 17:26 ` Peter Gonda
2021-10-08 19:56 ` Tom Lendacky [this message]
2021-10-05 14:13 ` [PATCH 3/4 V9] selftest: KVM: Add open sev dev helper Peter Gonda
2021-10-05 14:13 ` [PATCH 4/4 V9] selftest: KVM: Add intra host migration tests 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=cbc2a728-8c4d-08f9-4524-d198aba7d369@amd.com \
--to=thomas.lendacky@amd.com \
--cc=bp@alien8.de \
--cc=brijesh.singh@amd.com \
--cc=dgilbert@redhat.com \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcorr@google.com \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pgonda@google.com \
--cc=rientjes@google.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.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
all inboxes | Powered by JetHome®