From nobody Tue Dec 16 18:34:35 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE6A0EE49A6 for ; Fri, 25 Aug 2023 10:21:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244388AbjHYKUk (ORCPT ); Fri, 25 Aug 2023 06:20:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244404AbjHYKUK (ORCPT ); Fri, 25 Aug 2023 06:20:10 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21BD21987; Fri, 25 Aug 2023 03:19:51 -0700 (PDT) Date: Fri, 25 Aug 2023 10:19:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1692958769; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+j/7aD9ZZHPV/FxV9pF4tNpf0qsTyYJ7CBOlmHhqcVU=; b=cLq7e7KM4QkdgCSipZkLEc0t1CDdYt3bJDn6B03zVYSem76CFe65e8x/OA9GkBGQBTxEc0 whloinVzedFCRH4W8X6cpoVX//EX3Yr9+e2MSVa3dBFSonnhRpVP4l5xcNtUK4UNxe199N lpo7oRYyJpJi3eytb+q9hIcE/FPTpLaWhaqajIsDUMdcSLQMR6kI0/AQ8nj9DeQ7tTMdOx gu0CbuYXc0KCFvVE3E9TdxU52duraReU2swf1lgM7cTjYWZ9CQU+Tal6VIfaUN7lEjLSHf KAsdhxVSCPmY+bDSE702b0fDpV42Pa7+CuSj5zkidik+NDPyxMl3mKHo7met6g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1692958769; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+j/7aD9ZZHPV/FxV9pF4tNpf0qsTyYJ7CBOlmHhqcVU=; b=963MIJ5zAoKUMj8kYeyF1Iwvmu+HabmDAqg2lJwSo40i7GGK3ZB3QALPoL2AysLNtjdqHG VwFxi1v9Pgl3+fDw== From: "tip-bot2 for Josh Poimboeuf" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/bugs] x86/srso: Move retbleed IBPB check into existing 'has_microcode' code block Cc: Josh Poimboeuf , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: MIME-Version: 1.0 Message-ID: <169295876939.27769.6118442585512132661.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/bugs branch of tip: Commit-ID: a542794756c50e0b339a751635cdbbd5893f2b4e Gitweb: https://git.kernel.org/tip/a542794756c50e0b339a751635cdbbd58= 93f2b4e Author: Josh Poimboeuf AuthorDate: Fri, 25 Aug 2023 00:01:48 -07:00 Committer: Ingo Molnar CommitterDate: Fri, 25 Aug 2023 11:22:01 +02:00 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 Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/c64b84b6df4e82423abe2441a1a088a8c7f1ae14.16= 92919072.git.jpoimboe@kernel.org --- arch/x86/kernel/cpu/bugs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 0621615..b086fd4 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -2430,10 +2430,8 @@ static void __init srso_select_mitigation(void) setup_force_cpu_cap(X86_FEATURE_SRSO_NO); return; } - } =20 - if (retbleed_mitigation =3D=3D RETBLEED_MITIGATION_IBPB) { - if (has_microcode) { + if (retbleed_mitigation =3D=3D RETBLEED_MITIGATION_IBPB) { srso_mitigation =3D SRSO_MITIGATION_IBPB; goto out; }