refactor(interrupts): remove panic from interrupt inject
Replace the panic in vcpu_virt_interrupt_inject with an assert as
in production it is better to miss interrupt than cause the system
to panic.
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Change-Id: I1fdd99f185dd697d8bb1b4f7a431df120a1832da
diff --git a/src/vcpu.c b/src/vcpu.c
index d960840..4fa3765 100644
--- a/src/vcpu.c
+++ b/src/vcpu.c
@@ -605,8 +605,11 @@
/* Push to the queue and set the bitmap. */
if (!vcpu_interrupt_queue_push(vcpu_locked, vint_id)) {
- panic("Exhausted interrupt queue for vCPU %d of SP %#x\n",
- vcpu_locked.vcpu->cpu->id, vcpu_locked.vcpu->vm->id);
+ dlog_verbose(
+ "Exhausted interrupt queue for vCPU %u of SP %#x\n",
+ vcpu_index(vcpu_locked.vcpu), vcpu_locked.vcpu->vm->id);
+ assert(false);
+ return;
}
vcpu_virt_interrupt_set_pending(interrupts, vint_id);