VirtualBox

Changeset 8809 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 14, 2008 1:43:38 PM (17 years ago)
Author:
vboxsync
Message:

Proper injection of pending interrupts when IF=0, so they get dispatched as soon as the interrupt flag gets set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp

    r8808 r8809  
    358358            Log2(("Enable irq window exit!\n"));
    359359            /** @todo use virtual interrupt method to inject a pending irq; dispatched as soon as guest.IF is set. */
    360 ////            pVMCB->ctrl.u32InterceptCtrl1 |= SVM_CTRL1_INTERCEPT_VINTR;
    361 ////            AssertRC(rc);
     360            pVMCB->ctrl.u32InterceptCtrl1 |= SVM_CTRL1_INTERCEPT_VINTR;
     361            pVMCB->ctrl.IntCtrl.n.u1VIrqValid    = 1;
     362            pVMCB->ctrl.IntCtrl.n.u1IgnoreTPR    = 1; /* ignore the priority in the TPR; just deliver it */
     363            pVMCB->ctrl.IntCtrl.n.u8VIrqVector   = 0; /* don't care */
    362364        }
    363365        else
     
    11701172    }
    11711173
     1174    case SVM_EXIT_VINTR:
     1175        /* A virtual interrupt is about to be delivered, which means IF=1. */
     1176        pVMCB->ctrl.IntCtrl.n.u1VIrqValid    = 0;
     1177        pVMCB->ctrl.IntCtrl.n.u1IgnoreTPR    = 0;
     1178        pVMCB->ctrl.IntCtrl.n.u8VIrqVector   = 0;
     1179        goto ResumeExecution;
     1180
    11721181    case SVM_EXIT_FERR_FREEZE:
    11731182    case SVM_EXIT_INTR:
     
    11751184    case SVM_EXIT_SMI:
    11761185    case SVM_EXIT_INIT:
    1177     case SVM_EXIT_VINTR:
    11781186        /* External interrupt; leave to allow it to be dispatched again. */
    11791187        rc = VINF_EM_RAW_INTERRUPT;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette