diff options
-rw-r--r-- | arch/arm64/kernel/cpu_errata.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c index 9af8df96ec49..a509e35132d2 100644 --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c | |||
@@ -138,6 +138,15 @@ static void __install_bp_hardening_cb(bp_hardening_cb_t fn, | |||
138 | static DEFINE_SPINLOCK(bp_lock); | 138 | static DEFINE_SPINLOCK(bp_lock); |
139 | int cpu, slot = -1; | 139 | int cpu, slot = -1; |
140 | 140 | ||
141 | /* | ||
142 | * enable_smccc_arch_workaround_1() passes NULL for the hyp_vecs | ||
143 | * start/end if we're a guest. Skip the hyp-vectors work. | ||
144 | */ | ||
145 | if (!hyp_vecs_start) { | ||
146 | __this_cpu_write(bp_hardening_data.fn, fn); | ||
147 | return; | ||
148 | } | ||
149 | |||
141 | spin_lock(&bp_lock); | 150 | spin_lock(&bp_lock); |
142 | for_each_possible_cpu(cpu) { | 151 | for_each_possible_cpu(cpu) { |
143 | if (per_cpu(bp_hardening_data.fn, cpu) == fn) { | 152 | if (per_cpu(bp_hardening_data.fn, cpu) == fn) { |