Hi,
On 20/04/18 13:25, Mirela Simonovic wrote:
Checking CPU errata should be done only when a CPU is initially booted.
It is assumed that the CPU which is hotplugged after the system/Xen boots,
was initially hotplugged during the system/Xen boot, so errata is checked
by each CPU only once, on boot.
It is a good idea to document the assumption in the code. This will help
to know what is missing for other use case.
Signed-off-by: Mirela Simonovic <mirela.simono...@aggios.com>
---
CC: Stefano Stabellini <sstabell...@kernel.org>
CC: Julien Grall <julien.gr...@arm.com>
---
xen/arch/arm/smpboot.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
index d01b51592d..5d6c6cadec 100644
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -366,8 +366,8 @@ void start_secondary(unsigned long boot_phys_offset,
if ( system_state != SYS_STATE_boot )
setup_virt_paging_secondary();
-
- check_local_cpu_errata();
+ else
+ check_local_cpu_errata();
No, check_local_cpu_errata should be called for everyone. This check
should be moved in the function with a TODO explaining what needs to be
done. Likely this will be go over the CPU errata and see if there are
any issue with the one currently selected.
Also, I just realized that any "cpu capability" (e.g spectre workaround)
that requires to be enabled will not be done on hotplugged CPU. You
likely need to implement a version of enable_errata_workaround for them.
Cheers,
printk(XENLOG_DEBUG "CPU %u booted.\n", smp_processor_id());
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel