Tom Lendacky 6f0f2d5ef8 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 <thomas.lendacky@amd.com>
Message-Id: <4019348b5e07148eb4d593380a5f6713b93c9a16.1675956146.git.thomas.lendacky@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-02-10 07:27:37 -05:00
..
2022-12-13 19:29:45 -08:00
2022-12-13 19:29:45 -08:00
2023-01-27 12:49:00 -08:00
2023-01-24 17:48:09 -08:00
2022-12-19 07:51:30 -06:00
2022-12-13 19:29:45 -08:00
2022-12-13 19:29:45 -08:00
2022-12-13 19:29:45 -08:00
2022-12-13 19:29:45 -08:00
2023-01-15 07:09:41 -06:00
2023-01-27 12:52:45 -08:00
2023-01-10 05:31:42 -06:00
2022-12-13 19:29:45 -08:00
2022-12-17 14:06:53 -06:00
2022-12-16 13:46:41 -06:00