VirtualBox

Changeset 10667 in vbox


Ignore:
Timestamp:
Jul 15, 2008 2:52:51 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
33379
Message:

Sync back TPR if necessary.

Location:
trunk/src/VBox/VMM/VMMR0
Files:
2 edited

Legend:

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

    r10661 r10667  
    778778    SVM_VMCB   *pVMCB;
    779779    bool        fGuestStateSynced = false;
     780    bool        fSyncTPR = false;
    780781    unsigned    cResume = 0;
    781782    uint8_t     u8LastVTPR;
     
    878879             */
    879880            pVMCB->ctrl.u16InterceptWrCRx &= ~RT_BIT(8);
     881
     882        fSyncTPR = !fPending;
    880883    }
    881884
     
    12101213        STAM_COUNTER_INC(&pVM->hwaccm.s.pStatExitReasonR0[exitCode & MASK_EXITREASON_STAT]);
    12111214#endif
     1215
     1216    if (fSyncTPR)
     1217    {
     1218        rc = PDMApicSetTPR(pVM, pVMCB->ctrl.IntCtrl.n.u8VTPR);
     1219        AssertRC(rc);
     1220    }
    12121221
    12131222    /* Deal with the reason of the VM-exit. */
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r10661 r10667  
    10361036    RTGCUINTPTR errCode, instrInfo, uInterruptState;
    10371037    bool        fGuestStateSynced = false;
     1038    bool        fSyncTPR = false;
    10381039    unsigned    cResume = 0;
    10391040#ifdef VBOX_STRICT
     
    11971198        rc  = VMXWriteVMCS(VMX_VMCS_CTRL_TPR_THRESHOLD, (fPending) ? u8TPR : 0);
    11981199        AssertRC(rc);
     1200
     1201        fSyncTPR = !fPending;
    11991202    }
    12001203
     
    15271530    Log2(("IntInfo = %08x\n", intInfo));
    15281531    Log2(("New EIP=%VGv\n", pCtx->rip));
     1532
     1533    if (fSyncTPR)
     1534    {
     1535        rc = PDMApicSetTPR(pVM, pVM->hwaccm.s.vmx.pAPIC[0x80]);
     1536        AssertRC(rc);
     1537    }
    15291538
    15301539    /* Some cases don't need a complete resync of the guest CPU state; handle them here. */
Note: See TracChangeset for help on using the changeset viewer.

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