Skip to content

Commit e18c09b

Browse files
Jinqian Yangctmarinas
authored andcommitted
arm64: Add support for HIP09 Spectre-BHB mitigation
The HIP09 processor is vulnerable to the Spectre-BHB (Branch History Buffer) attack, which can be exploited to leak information through branch prediction side channels. This commit adds the MIDR of HIP09 to the list for software mitigation. Signed-off-by: Jinqian Yang <yangjinqian1@huawei.com> Link: https://lore.kernel.org/r/20250325141900.2057314-1-yangjinqian1@huawei.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent 0fff2aa commit e18c09b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

arch/arm64/include/asm/cputype.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
#define FUJITSU_CPU_PART_A64FX 0x001
133133

134134
#define HISI_CPU_PART_TSV110 0xD01
135+
#define HISI_CPU_PART_HIP09 0xD02
135136

136137
#define APPLE_CPU_PART_M1_ICESTORM 0x022
137138
#define APPLE_CPU_PART_M1_FIRESTORM 0x023
@@ -218,6 +219,7 @@
218219
#define MIDR_NVIDIA_CARMEL MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_CARMEL)
219220
#define MIDR_FUJITSU_A64FX MIDR_CPU_MODEL(ARM_CPU_IMP_FUJITSU, FUJITSU_CPU_PART_A64FX)
220221
#define MIDR_HISI_TSV110 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_TSV110)
222+
#define MIDR_HISI_HIP09 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_HIP09)
221223
#define MIDR_APPLE_M1_ICESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM)
222224
#define MIDR_APPLE_M1_FIRESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_FIRESTORM)
223225
#define MIDR_APPLE_M1_ICESTORM_PRO MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM_PRO)

arch/arm64/kernel/proton-pack.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,7 @@ static u8 spectre_bhb_loop_affected(void)
901901
MIDR_ALL_VERSIONS(MIDR_CORTEX_A77),
902902
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1),
903903
MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_GOLD),
904+
MIDR_ALL_VERSIONS(MIDR_HISI_HIP09),
904905
{},
905906
};
906907
static const struct midr_range spectre_bhb_k11_list[] = {

0 commit comments

Comments
 (0)