#include <palacios/svm_handler.h>
#include <palacios/vmm.h>
#include <palacios/vm_guest_mem.h>
-#include <palacios/vmm_emulate.h>
+#include <palacios/vmm_decoder.h>
#include <palacios/vmm_ctrl_regs.h>
#include <palacios/svm_io.h>
#include <palacios/vmm_intr.h>
// Disable printing io exits due to bochs debug messages
- if (!((exit_code == VMEXIT_IOIO) && ((ushort_t)(guest_ctrl->exit_info1 >> 16) == 0x402))) {
+ //if (!((exit_code == VMEXIT_IOIO) && ((ushort_t)(guest_ctrl->exit_info1 >> 16) == 0x402))) {
- PrintDebug("SVM Returned: Exit Code: %x \t\t(tsc=%ul)\n",exit_code, (uint_t)info->time_state.guest_tsc);
- }
+ PrintDebug("SVM Returned: Exit Code: %x \t\t(tsc=%ul)\n",exit_code, (uint_t)info->time_state.guest_tsc);
+ // }
// PrintDebugVMCB((vmcb_t*)(info->vmm_data));
case EXTERNAL_IRQ:
{
uint_t irq = get_intr_number(info);
- guest_ctrl->EVENTINJ.vector = irq;
- guest_ctrl->EVENTINJ.valid = 1;
- guest_ctrl->EVENTINJ.type = SVM_INJECTION_EXTERNAL_INTR;
+ /*
+ guest_ctrl->EVENTINJ.vector = irq;
+ guest_ctrl->EVENTINJ.valid = 1;
+ guest_ctrl->EVENTINJ.type = SVM_INJECTION_EXTERNAL_INTR;
+ */
+ guest_ctrl->guest_ctrl.V_IRQ = 1;
+ guest_ctrl->guest_ctrl.V_INTR_VECTOR = irq;
+ guest_ctrl->guest_ctrl.V_IGN_TPR = 1;
+ guest_ctrl->guest_ctrl.V_INTR_PRIO = 0xf;
+
+ PrintDebug("Injecting Interrupt %d (EIP=%x)\n", guest_ctrl->guest_ctrl.V_INTR_VECTOR, info->rip);
+
injecting_intr(info, irq, EXTERNAL_IRQ);
break;
guest_ctrl->EVENTINJ.vector = excp;
+ PrintDebug("Injecting Interrupt %d (EIP=%x)\n", guest_ctrl->EVENTINJ.vector, info->rip);
injecting_intr(info, excp, EXCEPTION);
break;
}
return -1;
}
- PrintDebug("Injecting Interrupt %d (EIP=%x)\n", guest_ctrl->EVENTINJ.vector, info->rip);
}