In the subsequent patches we will enable preemption in the hypervisor mode. But we don't want any preemption attempts while system is still not ready to call scheduler. So we should disable preemption during early boot stages and enable it only when we switched to idle vCPU stack.
Signed-off-by: Volodymyr Babchuk <volodymyr_babc...@epam.com> --- xen/arch/arm/setup.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 2532ec9739..15a618b87c 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -78,6 +78,9 @@ static __used void init_done(void) unregister_init_virtual_region(); free_init_memory(); + + preempt_enable(); + startup_cpu_idle_loop(); } @@ -920,6 +923,7 @@ void __init start_xen(unsigned long boot_phys_offset, setup_system_domains(); + preempt_disable(); local_irq_enable(); local_abort_enable(); -- 2.29.2