xen/arm: Enable errata for secondary CPU on hotplug after the boot
authorMirela Simonovic <mirela.simonovic@aggios.com>
Fri, 1 Jun 2018 13:17:50 +0000 (15:17 +0200)
committerJulien Grall <julien.grall@arm.com>
Tue, 5 Jun 2018 18:08:06 +0000 (19:08 +0100)
commit21c0b1a3c1a0483f99174b21eb5c1620d71e348c
tree24983139214f6b1000aabe2446ba51e5d5619754
parent517e58d610443c9e68ae5687b450d515b4f8c6e3
xen/arm: Enable errata for secondary CPU on hotplug after the boot

On boot, enabling errata workarounds will be triggered by the boot CPU
from start_xen(). On CPU hotplug (non-boot scenario) this would not be
done. This patch adds the code required to enable errata workarounds for
a CPU being hotplugged after the system boots. This is triggered using
a notifier. If the CPU fails to enable workarounds the notifier will
return an error and Xen will hit the BUG_ON() in notify_cpu_starting().
To avoid the BUG_ON() in an error case either enabling notifiers should
be fixed to return void (not propagate error to notify_cpu_starting())
and the errata notifier will always return success for CPU_STARTING
event, or the notify_cpu_starting() and other common code should be
fixed to expect an error at CPU_STARTING phase.

Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/cpuerrata.c
xen/arch/arm/cpufeature.c
xen/include/asm-arm/cpufeature.h