Messages in this thread | | | Subject | Re: [PATCH 11/11] x86, fpu: check CPU-provided sizes against struct declarations | From | Tim Chen <> | Date | Wed, 26 Aug 2015 09:18:21 -0700 |
| |
On Tue, 2015-08-25 at 13:12 -0700, Dave Hansen wrote: > From: Dave Hansen <dave.hansen@linux.intel.com> > > We now have C structures defined for each of the XSAVE state > components that we support. This patch adds checks during our > verification pass to ensure that the CPU-provided data > enumerated in CPUID leaves matches our C structures. > > If not, we warn and dump all the XSAVE CPUID leaves. > > Note: this *actually* found an inconsistency with the MPX > 'bndcsr' state. The hardware pads it out differently from > our C structures. This patch caught it and warned. > > Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> > Cc: Ingo Molnar <mingo@redhat.com> > Cc: x86@kernel.org > Cc: Borislav Petkov <bp@alien8.de> > Cc: Fenghua Yu <fenghua.yu@intel.com> > Cc: Tim Chen <tim.c.chen@linux.intel.com> > Cc: linux-kernel@vger.kernel.org > --- > > b/appendme | 6 +++ > b/arch/x86/include/asm/fpu/types.h | 1 > b/arch/x86/kernel/fpu/xstate.c | 62 +++++++++++++++++++++++++++++++++++-- > 3 files changed, 67 insertions(+), 2 deletions(-) > > diff -puN /dev/null appendme > --- /dev/null 2015-07-13 14:24:11.435656502 -0700 > +++ b/appendme 2015-08-25 12:50:01.857661314 -0700 > @@ -0,0 +1,6 @@ > +Cc: Ingo Molnar <mingo@redhat.com> > +Cc: x86@kernel.org > +Cc: Borislav Petkov <bp@alien8.de> > +Cc: Fenghua Yu <fenghua.yu@intel.com> > +Cc: Tim Chen <tim.c.chen@linux.intel.com> > +Cc: linux-kernel@vger.kernel.org > diff -puN arch/x86/include/asm/fpu/types.h~x86-fpu-check-against-struct-declarations arch/x86/include/asm/fpu/types.h > --- a/arch/x86/include/asm/fpu/types.h~x86-fpu-check-against-struct-declarations 2015-08-25 12:50:01.853661133 -0700 > +++ b/arch/x86/include/asm/fpu/types.h 2015-08-25 12:50:01.858661359 -0700 > @@ -108,6 +108,7 @@ enum xfeature_nr { > XFEATURE_NR_OPMASK, > XFEATURE_NR_ZMM_Hi256, > XFEATURE_NR_Hi16_ZMM, > + XFEATURE_NR_PT_UNIMPLEMENTED_SO_FAR, >
Maybe move this to a separate patch with a bit more explanation of this XFEATURE?
Tim
| |