[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 10/10] xen/arm: Call check_local_cpu_errata for secondary CPU only on boot



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.simonovic@xxxxxxxxxx>

---
CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
CC: Julien Grall <julien.grall@xxxxxxx>
---
  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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.