Fix the TAA state machine to do the right thing when the TAA

migitation is available in microcode and the operator has set
the sysctl to automatic mode.

Reported by:	Coverity
CID: 1408334

MFC after:	3 days
Sponsored by:	Intel
This commit is contained in:
Scott Long 2019-12-10 18:57:39 +00:00
parent 96aaefdf55
commit 0d42317659
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=355589

View File

@ -1254,8 +1254,7 @@ x86_taa_recalculate(void)
/* Check to see what mitigation options the CPU gives us */
if (cpu_ia32_arch_caps & IA32_ARCH_CAP_TAA_NO) {
/* CPU is not suseptible to TAA */
taa_need = TAA_NONE;
taa_state = TAA_TAA_UC;
taa_need = TAA_TAA_UC;
} else if (cpu_ia32_arch_caps & IA32_ARCH_CAP_TSX_CTRL) {
/*
* CPU can turn off TSX. This is the next best option