x86/cpu/intel: Clear cache self-snoop capability in CPUs with known errata
authorRicardo Neri <ricardo.neri-calderon@linux.intel.com>
Fri, 19 Jul 2019 11:50:38 +0000 (13:50 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 19 Jul 2019 11:50:38 +0000 (13:50 +0200)
commitf2663ca2e5203bfa082b1d6d2721ad369e00426a
treea35aef443115895068f5eeb1c4254967d28b504f
parent0002467f123292066a415524f0fc788818f02ace
x86/cpu/intel: Clear cache self-snoop capability in CPUs with known errata

From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>

Processors which have self-snooping capability can handle conflicting
memory type across CPUs by snooping its own cache. However, there exists
CPU models in which having conflicting memory types still leads to
unpredictable behavior, machine check errors, or hangs.

Clear this feature on affected CPUs to prevent its use.

Suggested-by: Alan Cox <alan.cox@intel.com>
Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
[Linux commit 1e03bff3600101bd9158d005e4313132e55bdec8]

Strip Yonah - as per ark.intel.com it doesn't look to be 64-bit capable.
Call the new function on the boot CPU only. Don't clear the CPU feature
flag itself, as it is exposed to guests (who could otherwise observe it
disappear after migration).

Requested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/intel.c
xen/include/asm-x86/cpufeatures.h