[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZqlM+SpJGg11I2Ae@AUS-L1-JOHALLEN.amd.com>
Date: Tue, 30 Jul 2024 15:28:41 -0500
From: John Allen <john.allen@....com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: pbonzini@...hat.com, kvm@...r.kernel.org, thomas.lendacky@....com,
bp@...en8.de, mlevitsk@...hat.com, linux-kernel@...r.kernel.org,
x86@...nel.org, yazen.ghannam@....com
Subject: Re: [PATCH] KVM: x86: Advertise SUCCOR and OVERFLOW_RECOV cpuid bits
On Tue, Jul 30, 2024 at 01:24:49PM -0700, Sean Christopherson wrote:
> On Tue, Jul 30, 2024, John Allen wrote:
> > On Tue, Jul 30, 2024 at 11:00:57AM -0700, Sean Christopherson wrote:
> > > On Tue, Jul 30, 2024, John Allen wrote:
> > > > Handling deferred, uncorrected MCEs on AMD guests is now possible with
> > > > additional support in qemu. Ensure that the SUCCOR and OVERFLOW_RECOV
> > > > bits are advertised to the guest in KVM.
> > > >
> > > > Suggested-by: Paolo Bonzini <pbonzini@...hat.com>
> > > > Signed-off-by: John Allen <john.allen@....com>
> > > > ---
> > > > arch/x86/kvm/cpuid.c | 2 +-
> > > > arch/x86/kvm/svm/svm.c | 7 +++++++
> > > > 2 files changed, 8 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> > > > index 2617be544480..4745098416c3 100644
> > > > --- a/arch/x86/kvm/cpuid.c
> > > > +++ b/arch/x86/kvm/cpuid.c
> > > > @@ -1241,7 +1241,7 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function)
> > > >
> > > > /* mask against host */
> > > > entry->edx &= boot_cpu_data.x86_power;
> > > > - entry->eax = entry->ebx = entry->ecx = 0;
> > > > + entry->eax = entry->ecx = 0;
> > >
> > > Needs an override to prevent reporting all of EBX to userspace.
> > >
> > > cpuid_entry_override(entry, CPUID_8000_0007_EBX);
> >
> > Right, I see what you mean. We just want to expose these specific bits
> > and not all of EBX. I think with the patch as it is along with the
> > change you suggest below, this should resolve this as the above case
> > already has the cpuid_entry_override just above where it cuts off.
>
> Heh, nope, it doesn't. The existing override is for EDX, this needs one for EBX.
Ah, yes you're right. Sorry for the noise!
Powered by blists - more mailing lists