diff mbox series

[v4,1/5] arm64: errata: Add QCOM_KRYO_4XX_GOLD to the spectre_bhb_k24_list

Message ID 20250107120555.v4.1.Ie4ef54abe02e7eb0eee50f830575719bf23bda48@changeid (mailing list archive)
State Not Applicable, archived
Headers show
Series arm64: errata: Rework Spectre BHB mitigations to not assume "safe" | expand

Commit Message

Doug Anderson Jan. 7, 2025, 8:05 p.m. UTC
Qualcomm Kryo 400-series Gold cores have a derivative of an ARM Cortex
A76 in them. Since A76 needs Spectre mitigation via looping then the
Kyro 400-series Gold cores also need Spectre mitigation via looping.

Qualcomm has confirmed that the proper "k" value for Kryo 400-series
Gold cores is 24.

Fixes: 558c303c9734 ("arm64: Mitigate spectre style branch history side channels")
Cc: stable@vger.kernel.org
Cc: Scott Bauer <sbauer@quicinc.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

Changes in v4:
- Re-added QCOM_KRYO_4XX_GOLD k24 patch after Qualcomm confirmed.

Changes in v3:
- Removed QCOM_KRYO_4XX_GOLD k24 patch.

Changes in v2:
- Slight change to wording and notes of KRYO_4XX_GOLD patch

 arch/arm64/kernel/proton-pack.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Trilok Soni Feb. 7, 2025, 10:56 p.m. UTC | #1
On 1/7/2025 12:05 PM, Douglas Anderson wrote:
> Qualcomm Kryo 400-series Gold cores have a derivative of an ARM Cortex
> A76 in them. Since A76 needs Spectre mitigation via looping then the
> Kyro 400-series Gold cores also need Spectre mitigation via looping.
> 
> Qualcomm has confirmed that the proper "k" value for Kryo 400-series
> Gold cores is 24.
> 
> Fixes: 558c303c9734 ("arm64: Mitigate spectre style branch history side channels")
> Cc: stable@vger.kernel.org
> Cc: Scott Bauer <sbauer@quicinc.com>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> 
> Changes in v4:
> - Re-added QCOM_KRYO_4XX_GOLD k24 patch after Qualcomm confirmed.
> 
> Changes in v3:
> - Removed QCOM_KRYO_4XX_GOLD k24 patch.
> 
> Changes in v2:
> - Slight change to wording and notes of KRYO_4XX_GOLD patch
> 
>  arch/arm64/kernel/proton-pack.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c
> index da53722f95d4..e149efadff20 100644
> --- a/arch/arm64/kernel/proton-pack.c
> +++ b/arch/arm64/kernel/proton-pack.c
> @@ -866,6 +866,7 @@ u8 spectre_bhb_loop_affected(int scope)
>  			MIDR_ALL_VERSIONS(MIDR_CORTEX_A76),
>  			MIDR_ALL_VERSIONS(MIDR_CORTEX_A77),
>  			MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1),
> +			MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_GOLD),
>  			{},
>  		};
>  		static const struct midr_range spectre_bhb_k11_list[] = {

LGTM. Sorry for the delay. 

Acked-by: Trilok Soni <quic_tsoni@quicinc.com>
diff mbox series

Patch

diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c
index da53722f95d4..e149efadff20 100644
--- a/arch/arm64/kernel/proton-pack.c
+++ b/arch/arm64/kernel/proton-pack.c
@@ -866,6 +866,7 @@  u8 spectre_bhb_loop_affected(int scope)
 			MIDR_ALL_VERSIONS(MIDR_CORTEX_A76),
 			MIDR_ALL_VERSIONS(MIDR_CORTEX_A77),
 			MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1),
+			MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_GOLD),
 			{},
 		};
 		static const struct midr_range spectre_bhb_k11_list[] = {