Fixing WFI handler to skip the WFI instruction.
Otherwise it ends up repeating it over and over.
Bug: 117271574
Change-Id: If36003bc0145a1b44b6f53f33a3c7a5b2e3f6fca
diff --git a/src/arch/aarch64/handler.c b/src/arch/aarch64/handler.c
index 39b3010..2f84a90 100644
--- a/src/arch/aarch64/handler.c
+++ b/src/arch/aarch64/handler.c
@@ -362,6 +362,8 @@
if (esr & 1) {
return NULL;
}
+ /* Skip the WFI instruction. */
+ vcpu->regs.pc += (esr & (1u << 25)) ? 4 : 2;
return api_wait_for_interrupt(current());
case 0x24: /* EC = 100100, Data abort. */