diff --git a/src/arch/armv8/aborts.c b/src/arch/armv8/aborts.c index 2bf440c2..85739696 100644 --- a/src/arch/armv8/aborts.c +++ b/src/arch/armv8/aborts.c @@ -195,6 +195,9 @@ void aborts_sync_handler(void) abort_handler_t handler = abort_handlers[ec]; if (handler) { handler(iss, ipa_fault_addr, il, ec); + if (cpu()->vcpu->active == false) { + cpu_idle(); + } } else { ERROR("no handler for abort ec = 0x%x", ec); // unknown guest exception } diff --git a/src/arch/riscv/sync_exceptions.c b/src/arch/riscv/sync_exceptions.c index d685f349..36d8a60f 100644 --- a/src/arch/riscv/sync_exceptions.c +++ b/src/arch/riscv/sync_exceptions.c @@ -153,4 +153,7 @@ void sync_exception_handler(void) } vcpu_writepc(cpu()->vcpu, vcpu_readpc(cpu()->vcpu) + pc_step); + if (cpu()->vcpu->active == false) { + cpu_idle(); + } }