[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 9 Sep 2021 15:22:51 +0200
From: Joerg Roedel <joro@...tes.org>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Brijesh Singh <brijesh.singh@....com>,
Tom Lendacky <thomas.lendacky@....com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-coco@...ts.linux.dev,
Joerg Roedel <jroedel@...e.de>
Subject: Re: [PATCH v2 1/4] KVM: SVM: Get rid of *ghcb_msr_bits() functions
Hi Sean,
On Wed, Sep 01, 2021 at 09:31:52PM +0000, Sean Christopherson wrote:
> On Wed, Sep 01, 2021, Sean Christopherson wrote:
> > control->ghcb_gpa = MAKE_GHCB_MSR_RESP(cpuid_reg, cpuid_value);
Made that change, but kept the set_ghcb_msr_cpuid_resp() and renamed it
to ghcb_msr_cpuid_resp(). It now returns the MSR value for the CPUID
response.
I like the keep the more complicated response setters as functions and
not macros for readability.
> case GHCB_MSR_SEV_INFO_REQ:
> control->ghcb_gpa = GHCB_MSR_SEV_INFO(GHCB_VERSION_MAX,
> GHCB_VERSION_MIN,
> sev_enc_bit));
> break;
>
> and drop set_ghcb_msr() altogether.
Makes sense, I replaced the set_ghcb_msr() calls with the above.
> Side topic, what about renaming control->ghcb_gpa => control->ghcb_msr so that
> the code for the MSR protocol is a bit more self-documenting? The APM defines
> the field as "Guest physical address of GHCB", so it's not exactly prescribing a
> specific name.
No strong opinion here, I let this up to the AMD engineers to decide. If
we change the name I can add a separate patch for this.
Regards,
Joerg
Powered by blists - more mailing lists