lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cbc2a728-8c4d-08f9-4524-d198aba7d369@amd.com>
Date:   Fri, 8 Oct 2021 14:56:01 -0500
From:   Tom Lendacky <thomas.lendacky@....com>
To:     Peter Gonda <pgonda@...gle.com>
Cc:     kvm list <kvm@...r.kernel.org>, Marc Orr <marcorr@...gle.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <seanjc@...gle.com>,
        David Rientjes <rientjes@...gle.com>,
        "Dr . David Alan Gilbert" <dgilbert@...hat.com>,
        Brijesh Singh <brijesh.singh@....com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Joerg Roedel <joro@...tes.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/4 V9] KVM: SEV: Add support for SEV-ES intra host
 migration

On 10/8/21 12:26 PM, Peter Gonda wrote:
> On Fri, Oct 8, 2021 at 9:38 AM Tom Lendacky <thomas.lendacky@....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

> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ