X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_intr.c;h=e29285a6fb30aa4c668ac2fc5b23d11f376c6a61;hb=18cc68af5caa15264a853167e9d2d885cb79317a;hp=953df0ef97702d254a195c9a11a92e3ad5985c3b;hpb=561e89ed85d5133af211fe820476e9a6e669673f;p=palacios.git diff --git a/palacios/src/palacios/vmm_intr.c b/palacios/src/palacios/vmm_intr.c index 953df0e..e29285a 100644 --- a/palacios/src/palacios/vmm_intr.c +++ b/palacios/src/palacios/vmm_intr.c @@ -22,6 +22,7 @@ #include #include +#include #ifndef DEBUG_INTERRUPTS #undef PrintDebug @@ -175,7 +176,13 @@ int v3_raise_irq(struct guest_info * info, int irq) { int v3_intr_pending(struct guest_info * info) { struct v3_intr_state * intr_state = &(info->intr_state); struct intr_controller * ctrl = NULL; + struct rflags * flags = (struct rflags *)&(info->ctrl_regs.rflags); // PrintDebug("[intr_pending]\n"); + + // Check if the guest has interrupts enabled + if (flags->intr == 0) { + return 0; + } list_for_each_entry(ctrl, &(intr_state->controller_list), ctrl_node) { if (ctrl->ctrl_ops->intr_pending(ctrl->priv_data) == 1) {