• Tom Lendacky's avatar
    KVM: x86: Mitigate the cross-thread return address predictions bug · 6f0f2d5e
    Tom Lendacky authored
    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: default avatarTom Lendacky <thomas.lendacky@amd.com>
    Message-Id: <4019348b5e07148eb4d593380a5f6713b93c9a16.1675956146.git.thomas.lendacky@amd.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    6f0f2d5e
x86.c 358 KB