x86/cpufeatures: Make X86_BUG_FXSAVE_LEAK detectable in CPUID on AMD
authorRudolf Marek <r.marek@assembler.cz>
Tue, 28 Nov 2017 21:01:06 +0000 (22:01 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 6 Dec 2017 11:27:13 +0000 (12:27 +0100)
commite3811a3f74bd1ad773667b78323f396166891f3a
tree42b6373d2a02fd18eb2594786d9f4dbe20c8c54a
parent55d2d0ad2fb4325f615d1950486fbc5e6fba1769
x86/cpufeatures: Make X86_BUG_FXSAVE_LEAK detectable in CPUID on AMD

The latest AMD AMD64 Architecture Programmer's Manual
adds a CPUID feature XSaveErPtr (CPUID_Fn80000008_EBX[2]).

If this feature is set, the FXSAVE, XSAVE, FXSAVEOPT, XSAVEC, XSAVES
/ FXRSTOR, XRSTOR, XRSTORS always save/restore error pointers,
thus making the X86_BUG_FXSAVE_LEAK workaround obsolete on such CPUs.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Tested-by: Borislav Petkov <bp@suse.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Link: https://lkml.kernel.org/r/bdcebe90-62c5-1f05-083c-eba7f08b2540@assembler.cz
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/cpufeatures.h
arch/x86/kernel/cpu/amd.c