X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm.c;h=824f7d20d1ca445b3dcf8a83c74e5f75c7ef39fe;hb=ff5e516d100f73849193c59c2af2cc3cd3e41f21;hp=d23c56d8610115f7ef1ec256be06f1f30eb779da;hpb=b4452c8371120e978d3b1004d60b62468c8c8115;p=palacios-OLD.git diff --git a/palacios/src/palacios/svm.c b/palacios/src/palacios/svm.c index d23c56d..824f7d2 100644 --- a/palacios/src/palacios/svm.c +++ b/palacios/src/palacios/svm.c @@ -424,8 +424,20 @@ static int update_irq_entry_state(struct guest_info * info) { guest_ctrl->EVENTINJ.type = SVM_INJECTION_NMI; break; case V3_SOFTWARE_INTR: - guest_ctrl->EVENTINJ.type = SVM_INJECTION_SOFT_INTR; - break; + guest_ctrl->EVENTINJ.type = SVM_INJECTION_SOFT_INTR; +#ifdef V3_CONFIG_EXT_SW_INTERRUPTS +#ifdef V3_CONFIG_DEBUG_EXT_SW_INTERRUPTS + PrintDebug("Caught an injected software interrupt\n"); + PrintDebug("\ttype: %d, vector: %d\n", SVM_INJECTION_SOFT_INTR, info->intr_core_state.swintr_vector); +#endif + guest_ctrl->EVENTINJ.vector = info->intr_core_state.swintr_vector; + guest_ctrl->EVENTINJ.valid = 1; + + /* reset swintr state */ + info->intr_core_state.swintr_posted = 0; + info->intr_core_state.swintr_vector = 0; +#endif + break; case V3_VIRTUAL_IRQ: guest_ctrl->EVENTINJ.type = SVM_INJECTION_IRQ; break;