Commit 890c306
committed
x86/bugs: Workaround for incorrectly set X86_BUG_RETBLEED under VMware
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2189577
Upstream Status: RHEL only
It is found that VMware hypervisor may incorrectly set the
ARCH_CAP_RSBA bit (RET may use alternative branch predictors) of the
MSR_IA32_ARCH_CAPABILITIES MSR on some older Intel processors like
Haswell which is not affected by RETBleed. This causes the RHEL kernel
to think that the processor is vulnerable to RETBleed and hence sets
X86_BUG_RETBLEED. This has the side effect of forcing the use of IBRS
as Spectre v2 mitigation for processors that have it which can have a
significant performance impact.
Since it is known that Intel CPUs before Skylake are not speculative
enough to be susceptible to RETBleed, we can work around this VMware
issue by putting some of the Intel CPUs before Skylake (Westmere,
SandyBridge, IvyBridge, Haswell, Broadwell) in a new whitelist and
checking that list before setting X86_BUG_RETBLEED.
For other hypervisors or bare metal that does not have the bug, the
new code will not be activated on those older Intel processors since
the ARCH_CAP_RSBA bit should not be set.
Signed-off-by: Waiman Long <longman@redhat.com>1 parent 4bf5934 commit 890c306
1 file changed
+33
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
179 | 210 | | |
180 | 211 | | |
181 | 212 | | |
| |||
1414 | 1445 | | |
1415 | 1446 | | |
1416 | 1447 | | |
1417 | | - | |
| 1448 | + | |
| 1449 | + | |
1418 | 1450 | | |
1419 | 1451 | | |
1420 | 1452 | | |
| |||
0 commit comments