On Tue, 2015-08-25 at 13:12 -0700, Dave Hansen wrote:
> From: Dave Hansen <dave.han...@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.han...@linux.intel.com>
> Cc: Ingo Molnar <mi...@redhat.com>
> Cc: x...@kernel.org
> Cc: Borislav Petkov <b...@alien8.de>
> Cc: Fenghua Yu <fenghua...@intel.com>
> Cc: Tim Chen <tim.c.c...@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 <mi...@redhat.com>
> +Cc: x...@kernel.org
> +Cc: Borislav Petkov <b...@alien8.de>
> +Cc: Fenghua Yu <fenghua...@intel.com>
> +Cc: Tim Chen <tim.c.c...@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



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to