From: Jack Lange Date: Wed, 30 Apr 2008 20:20:15 +0000 (+0000) Subject: fixed bug in the interrupt handler X-Git-Tag: working-cdboot-physical-but-not-qemu~6 X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=8163b56655f024bb1e3abcdce028598554343d02 fixed bug in the interrupt handler --- diff --git a/palacios/src/geekos/vmm_stubs.c b/palacios/src/geekos/vmm_stubs.c index 22ae6ef..b2b66be 100644 --- a/palacios/src/geekos/vmm_stubs.c +++ b/palacios/src/geekos/vmm_stubs.c @@ -53,8 +53,15 @@ struct guest_info * irq_map[256]; static void pic_intr_handler(struct Interrupt_State * state) { Begin_IRQ(state); - - irq_map[state->intNum]->vm_ops.raise_irq(irq_map[state->intNum], state->intNum, state->errorCode); + struct guest_info * info = irq_map[state->intNum - 32]; + + if (info) { + info->vm_ops.raise_irq(irq_map[state->intNum], state->intNum, state->errorCode); + } else { + SerialPrint("Interrupt handler error: NULL pointer found, no action taken\n"); + End_IRQ(state); + return; + } // End_IRQ(state); }