Re: [RFC PATCH] x86/cpufeatures: Enumerate new AVX512 bfloat16 instructions

From: Fenghua Yu
Date: Wed Jun 12 2019 - 13:18:07 EST


On Wed, Jun 12, 2019 at 07:10:49AM -0700, Sean Christopherson wrote:
> On Wed, Jun 12, 2019 at 06:02:59AM +0200, Borislav Petkov wrote:
> > On Tue, Jun 11, 2019 at 08:32:59PM -0700, Fenghua Yu wrote:
> > > Currently KVM doesn't simulate scattered features (the ones in CPUID_LNX_*
> > > in cpuid_leafs) as reverse_cpuid[] doesn't contain CPUID_LNX_*.
> >
> > 43500e6f294d ("x86/cpufeatures: Remove get_scattered_cpuid_leaf()")
> >
> > > After the X86_FEATURES_CQM_* features are changed to scattered features,
> > > they will not be simulated by KVM any more as CPUID_F_0_EDX and CPUID_F_1_EDX
> > > are removed.
> >
> > Does KVM even support resctrl? I doubt only exporting a couple of CPUID
> > bits into the guest is enough...
>
> KVM doesn't support resctrl. Moving X86_FEATURES_CQM_* to a scattered
> leaf won't affect KVM.
>
> > > Should patch #1 simulate X86_FEATURE_CQM_* in KVM? Or let KVM guys handle
> > > the scattered features?
> >
> > Right, the scattered thing was removed as KVM didn't need it,
> > apparently, see above.
>
> Let KVM people deal with it, in the unlikely event someone adds resctrl
> support to KVM.

Thank you for your insight, Boris and Sean!

-Fenghua