Skip to content

Commit 82cfe1b

Browse files
joaopeixoto13josecm
authored andcommitted
fix(core/cpu): wake up secondary VM CPUs
This commit fixes issue introduced in commit 6df80f4 by ensuring the CPU jumps to the CPU message handler (if received any CPU message) after waking from power down. This allows the target CPU to update the `psci_ctx.state` field to `ON`, enabling the vCPU to resume execution. Signed-off-by: João Peixoto <[email protected]>
1 parent 3e92fac commit 82cfe1b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/arch/armv8/armv8-a/psci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static void psci_wake_from_powerdown(void)
5353

5454
vcpu_arch_reset(cpu()->vcpu, cpu()->vcpu->arch.psci_ctx.entrypoint);
5555
vcpu_writereg(cpu()->vcpu, 0, cpu()->vcpu->arch.psci_ctx.context_id);
56-
vcpu_run(cpu()->vcpu);
56+
cpu_powerdown_wakeup();
5757
}
5858

5959
void psci_wake_from_off(void);

src/core/cpu.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ void cpu_standby_wakeup(void)
127127

128128
void cpu_powerdown_wakeup(void)
129129
{
130+
if (interrupts_check(interrupts_ipi_id)) {
131+
interrupts_clear(interrupts_ipi_id);
132+
cpu_msg_handler();
133+
}
134+
130135
if (cpu()->vcpu != NULL) {
131136
vcpu_run(cpu()->vcpu);
132137
} else {

0 commit comments

Comments
 (0)