Skip to content

Commit 3512369

Browse files
jpoimboebp3tk0v
authored andcommitted
x86/srso: Move retbleed IBPB check into existing 'has_microcode' code block
Simplify the code flow a bit by moving the retbleed IBPB check into the existing 'has_microcode' block. Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Acked-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/0a22b86b1f6b07f9046a9ab763fc0e0d1b7a91d4.1693889988.git.jpoimboe@kernel.org
1 parent 0a0ce0d commit 3512369

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

arch/x86/kernel/cpu/bugs.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2430,10 +2430,8 @@ static void __init srso_select_mitigation(void)
24302430
setup_force_cpu_cap(X86_FEATURE_SRSO_NO);
24312431
return;
24322432
}
2433-
}
24342433

2435-
if (retbleed_mitigation == RETBLEED_MITIGATION_IBPB) {
2436-
if (has_microcode) {
2434+
if (retbleed_mitigation == RETBLEED_MITIGATION_IBPB) {
24372435
srso_mitigation = SRSO_MITIGATION_IBPB;
24382436
goto out;
24392437
}

0 commit comments

Comments
 (0)