]> git.baikalelectronics.ru Git - kernel.git/commit
x86/CPU/AMD: Disable XSAVES on AMD family 0x17
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 7 Mar 2023 17:46:43 +0000 (17:46 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2023 07:50:15 +0000 (08:50 +0100)
commit90659aaefbaf17998d1e22e7ab6caec7800fa651
treea147d317ac4cdc500f6865ebb790585db0bdefcc
parent583ca520d4e680ddca2085ab9140c1cc29da6f2e
x86/CPU/AMD: Disable XSAVES on AMD family 0x17

commit fe913192f8deeb399adbe9cde1b8f8026457dcce upstream.

AMD Erratum 1386 is summarised as:

  XSAVES Instruction May Fail to Save XMM Registers to the Provided
  State Save Area

This piece of accidental chronomancy causes the %xmm registers to
occasionally reset back to an older value.

Ignore the XSAVES feature on all AMD Zen1/2 hardware.  The XSAVEC
instruction (which works fine) is equivalent on affected parts.

  [ bp: Typos, move it into the F17h-specific function. ]

Reported-by: Tavis Ormandy <taviso@gmail.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: <stable@kernel.org>
Link: https://lore.kernel.org/r/20230307174643.1240184-1-andrew.cooper3@citrix.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/cpu/amd.c