ARM64/errata: Ensure vulnerable CPUs are actually flagged on is_spectrev2_safe()
This updates logic introduced by commit 0d2ce644 to ensure affected CPUs are properly flagged as affected by Spectre BHB, either by SMCCC or PSCI methods of detection. Signed-off-by: Albert I <kras@raphielgang.org> [jjpprrrr: change !(A || B) to (!B && !A) to take advantage of short circuit when B (PSCI) is the more likely case] Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com> Change-Id: I1da47886c5e1f1331ece977813ae3ec832d13af3
This commit is contained in:
@@ -886,9 +886,9 @@ static bool is_spectrev2_safe(void)
|
||||
};
|
||||
|
||||
return !is_midr_in_range_list(read_cpuid_id(),
|
||||
arm64_bp_harden_smccc_cpus) ||
|
||||
arm64_psci_bp_harden_cpus) &&
|
||||
!is_midr_in_range_list(read_cpuid_id(),
|
||||
arm64_psci_bp_harden_cpus);
|
||||
arm64_bp_harden_smccc_cpus);
|
||||
}
|
||||
|
||||
void spectre_bhb_enable_mitigation(const struct arm64_cpu_capabilities *entry)
|
||||
|
||||
Reference in New Issue
Block a user