Re: [RFC PATCH 2/3] x86/cpufeatures: Combine word 11 and 12 into new scattered features word 11

From: Fenghua Yu
Date: Fri Jun 14 2019 - 10:40:04 EST


On Fri, Jun 14, 2019 at 04:26:11PM +0200, Borislav Petkov wrote:
> On Fri, Jun 14, 2019 at 07:15:20AM -0700, Fenghua Yu wrote:
> > Adding this small patch into patch 0002 will solve the build errors without
> > changing the build checks.
>
> There's no need for that if you remove the BUILD_BUG_ON checks first.

But without this small patch, CPUID_7_EDX is 17 instead of
NCAPINTS(19)-1=18 in patch 0002. Of course CPUID_7_EDX is 18 correctly
evetually after applying patch 0003 which add the word 12 back.

KVM reports this CPUID_7_EDX is not 18 in bisect (as Sena also pointed
out). I think even native kernel should have some check to report this
error (similar to other checks of NCAPINTS).

Thanks.

-Fenghua