Commit 6f0f2d5
KVM: x86: Mitigate the cross-thread return address predictions bug
By default, KVM/SVM will intercept attempts by the guest to transition
out of C0. However, the KVM_CAP_X86_DISABLE_EXITS capability can be used
by a VMM to change this behavior. To mitigate the cross-thread return
address predictions bug (X86_BUG_SMT_RSB), a VMM must not be allowed to
override the default behavior to intercept C0 transitions.
Use a module parameter to control the mitigation on processors that are
vulnerable to X86_BUG_SMT_RSB. If the processor is vulnerable to the
X86_BUG_SMT_RSB bug and the module parameter is set to mitigate the bug,
KVM will not allow the disabling of the HLT, MWAIT and CSTATE exits.
Signed-off-by: Tom Lendacky <[email protected]>
Message-Id: <4019348b5e07148eb4d593380a5f6713b93c9a16.1675956146.git.thomas.lendacky@amd.com>
Signed-off-by: Paolo Bonzini <[email protected]>1 parent be8de49 commit 6f0f2d5
1 file changed
+32
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
194 | 198 | | |
195 | 199 | | |
196 | 200 | | |
| |||
4448 | 4452 | | |
4449 | 4453 | | |
4450 | 4454 | | |
4451 | | - | |
4452 | | - | |
4453 | | - | |
4454 | | - | |
| 4455 | + | |
| 4456 | + | |
| 4457 | + | |
| 4458 | + | |
| 4459 | + | |
| 4460 | + | |
| 4461 | + | |
| 4462 | + | |
| 4463 | + | |
4455 | 4464 | | |
4456 | 4465 | | |
4457 | 4466 | | |
| |||
6227 | 6236 | | |
6228 | 6237 | | |
6229 | 6238 | | |
6230 | | - | |
6231 | | - | |
6232 | | - | |
6233 | | - | |
6234 | | - | |
6235 | 6239 | | |
6236 | 6240 | | |
6237 | | - | |
6238 | | - | |
| 6241 | + | |
| 6242 | + | |
| 6243 | + | |
| 6244 | + | |
| 6245 | + | |
| 6246 | + | |
| 6247 | + | |
| 6248 | + | |
| 6249 | + | |
| 6250 | + | |
| 6251 | + | |
| 6252 | + | |
| 6253 | + | |
| 6254 | + | |
| 6255 | + | |
| 6256 | + | |
| 6257 | + | |
| 6258 | + | |
6239 | 6259 | | |
6240 | 6260 | | |
6241 | 6261 | | |
| |||
13456 | 13476 | | |
13457 | 13477 | | |
13458 | 13478 | | |
| 13479 | + | |
13459 | 13480 | | |
13460 | 13481 | | |
13461 | 13482 | | |
| |||
0 commit comments