[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1440605901.24132.2.camel@schen9-desk2.jf.intel.com>
Date: Wed, 26 Aug 2015 09:18:21 -0700
From: Tim Chen <tim.c.chen@...ux.intel.com>
To: Dave Hansen <dave@...1.net>
Cc: dave.hansen@...ux.intel.com, mingo@...hat.com, x86@...nel.org,
bp@...en8.de, fenghua.yu@...el.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 11/11] x86, fpu: check CPU-provided sizes against struct
declarations
On Tue, 2015-08-25 at 13:12 -0700, Dave Hansen wrote:
> From: Dave Hansen <dave.hansen@...ux.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@...ux.intel.com>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: x86@...nel.org
> Cc: Borislav Petkov <bp@...en8.de>
> Cc: Fenghua Yu <fenghua.yu@...el.com>
> Cc: Tim Chen <tim.c.chen@...ux.intel.com>
> Cc: linux-kernel@...r.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@...hat.com>
> +Cc: x86@...nel.org
> +Cc: Borislav Petkov <bp@...en8.de>
> +Cc: Fenghua Yu <fenghua.yu@...el.com>
> +Cc: Tim Chen <tim.c.chen@...ux.intel.com>
> +Cc: linux-kernel@...r.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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists