diff --git a/hypervisor/arch/x86/cpu.c b/hypervisor/arch/x86/cpu.c index 14f50ee8b..1e1c546cb 100644 --- a/hypervisor/arch/x86/cpu.c +++ b/hypervisor/arch/x86/cpu.c @@ -750,14 +750,14 @@ void cpu_dead(uint16_t pcpu_id) return; } - /* Set state to show CPU is dead */ - cpu_set_current_state(pcpu_id, CPU_STATE_DEAD); - /* clean up native stuff */ timer_cleanup(); vmx_off(pcpu_id); CACHE_FLUSH_INVALIDATE_ALL(); + /* Set state to show CPU is dead */ + cpu_set_current_state(pcpu_id, CPU_STATE_DEAD); + /* Halt the CPU */ do { asm volatile ("hlt");