#include <palacios/vmm.h>
#include <palacios/vm_guest.h>
+#include <palacios/vmm_ctrl_regs.h>
#ifndef DEBUG_INTERRUPTS
#undef PrintDebug
void v3_init_interrupt_state(struct guest_info * info) {
info->intr_state.irq_pending = 0;
+ info->intr_state.irq_started = 0;
info->intr_state.irq_vector = 0;
INIT_LIST_HEAD(&(info->intr_state.controller_list));
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) {