X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm.c;h=75ba3a028a371f102130720254fa3d22bca4757d;hb=7f167672713c9d8e23540340ab1111ec748a7775;hp=1a1cf351fa14fe54f30abb12ff2793cee7bc7845;hpb=6b117f85ced19739c5dd0f0057a906b9cb765a16;p=palacios.git diff --git a/palacios/src/palacios/svm.c b/palacios/src/palacios/svm.c index 1a1cf35..75ba3a0 100644 --- a/palacios/src/palacios/svm.c +++ b/palacios/src/palacios/svm.c @@ -306,7 +306,7 @@ static int update_irq_exit_state(struct guest_info * info) { // Interrupt was taken fully vectored info->intr_core_state.irq_started = 0; - } else { + } else if ((info->intr_core_state.irq_started == 1) && (guest_ctrl->exit_int_info.valid == 1)) { #ifdef CONFIG_DEBUG_INTERRUPTS PrintDebug("EXIT INT INFO is set (vec=%d)\n", guest_ctrl->exit_int_info.vector); #endif @@ -319,6 +319,12 @@ static int update_irq_exit_state(struct guest_info * info) { static int update_irq_entry_state(struct guest_info * info) { vmcb_ctrl_t * guest_ctrl = GET_VMCB_CTRL_AREA((vmcb_t*)(info->vmm_data)); + + if (info->intr_core_state.irq_pending == 0) { + guest_ctrl->guest_ctrl.V_IRQ = 0; + guest_ctrl->guest_ctrl.V_INTR_VECTOR = 0; + } + if (v3_excp_pending(info)) { uint_t excp = v3_get_excp_number(info); @@ -436,7 +442,7 @@ int v3_svm_enter(struct guest_info * info) { guest_state->rsp = info->vm_regs.rsp; #ifdef CONFIG_SYMBIOTIC - if (info->vm_info->sym_state.symcalls[info->cpu_id].sym_call_active == 0) { + if (info->sym_local_state.symcall_state.sym_call_active == 0) { update_irq_entry_state(info); } #else @@ -453,7 +459,7 @@ int v3_svm_enter(struct guest_info * info) { */ #ifdef CONFIG_SYMBIOTIC - if (info->vm_info->sym_state.symcalls[info->cpu_id].sym_call_active == 1) { + if (info->sym_local_state.symcall_state.sym_call_active == 1) { if (guest_ctrl->guest_ctrl.V_IRQ == 1) { V3_Print("!!! Injecting Interrupt during Sym call !!!\n"); } @@ -512,7 +518,7 @@ int v3_svm_enter(struct guest_info * info) { #ifdef CONFIG_SYMBIOTIC - if (info->vm_info->sym_state.symcalls[info->cpu_id].sym_call_active == 0) { + if (info->sym_local_state.symcall_state.sym_call_active == 0) { update_irq_exit_state(info); } #else