xen/arm: cpuerrata: Actually check errata on non-boot CPUs
PATCH 1/1 xen/arm: cpuerrata: Actually check errata on non-boot CPUs
The cpu errata framework was introduced in commit 8b01f6364f "xen/arm:
Detect silicon revision and set cap bits accordingly" and was meant to detect errata present on any CPUs (via check_local_cpu_errata). However, the function to check the MIDR (is_affected_midr_range) mistakenly always use the boot CPU MIDR.
Fix is_affected_midr_range to use the current CPU MIDR.
---
This should be backported up to Xen 4.7 as the cpu errata framework was backported for XSA-254.
--- xen/arch/arm/cpuerrata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/arm/cpuerrata.c +1 -1
@@ -230,7 +230,7 @@ static int enable_ic_inv_hardening(void *data)static bool __maybe_unused is_affected_midr_range (const struct arm_cpu_capabilities *entry) { -return MIDR_IS_CPU_MODEL_RANGE (boot_cpu_data.midr.bits, entry->midr_model, +return MIDR_IS_CPU_MODEL_RANGE (current_cpu_data.midr.bits, entry->midr_model, entry->midr_range_min, entry->midr_range_max); }
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 10 lines · Julien Grall
The cpu errata framework was introduced in commit
8b01f6364f"xen/arm:
Detect silicon revision and set cap bits accordingly" and was meant to detect errata present on any CPUs (viacheck_local_cpu_errata). However, the function to check the MIDR (is_affected_midr_range) mistakenly always use the boot CPU MIDR.Fix
is_affected_midr_rangeto use the current CPU MIDR.Reported-by Stefano Stabellini <[email protected]>Signed-off-by Julien Grall <[email protected]>
Quoted 23 lines
---
This should be backported up to Xen 4.7 as the cpu errata framework was backported for XSA-254.--- xen/arch/arm/cpuerrata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)xen/arch/arm/cpuerrata.c +1
-1@@ -230,7 +230,7 @@ static int enable_ic_inv_hardening(void *data)static bool __maybe_unused is_affected_midr_range (const struct arm_cpu_capabilities *entry) { -return MIDR_IS_CPU_MODEL_RANGE (boot_cpu_data.midr.bits, entry->midr_model, +return MIDR_IS_CPU_MODEL_RANGE (current_cpu_data.midr.bits, entry->midr_model, entry->midr_range_min, entry->midr_range_max); }Signature · 1 line
2.11.0
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel