VirtualBox

Changeset 10661 in vbox for trunk/src/VBox/VMM/VMMAll


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

Reduce the number of world switches caused by cr8 writes by checking if we really need to be notified. (only when
an interrupt is pending and masked by the TRP value)

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/EMAll.cpp

    r10473 r10661  
    17261726    {
    17271727        val64 = 0;
    1728         rc = PDMApicGetTPR(pVM, (uint8_t *)&val64);
     1728        rc = PDMApicGetTPR(pVM, (uint8_t *)&val64, NULL);
    17291729        AssertMsgRCReturn(rc, ("PDMApicGetTPR failed\n"), VERR_EM_INTERPRETER);
    17301730    }
  • trunk/src/VBox/VMM/VMMAll/PDMAll.cpp

    r10520 r10661  
    230230
    231231/**
    232  * Get the TPR (task priority register?).
     232 * Get the TPR (task priority register).
    233233 *
    234234 * @returns The current TPR.
    235235 * @param   pVM             VM handle.
    236236 * @param   pu8TPR          Where to store the TRP.
    237  */
    238 PDMDECL(int) PDMApicGetTPR(PVM pVM, uint8_t *pu8TPR)
     237 * @param   pfPending       Pending interrupt state (out).
     238*/
     239PDMDECL(int) PDMApicGetTPR(PVM pVM, uint8_t *pu8TPR, bool *pfPending)
    239240{
    240241    if (pVM->pdm.s.Apic.CTXALLSUFF(pDevIns))
     
    243244        pdmLock(pVM);
    244245        *pu8TPR = pVM->pdm.s.Apic.CTXALLSUFF(pfnGetTPR)(pVM->pdm.s.Apic.CTXALLSUFF(pDevIns));
     246        if (pfPending)
     247            *pfPending = pVM->pdm.s.Apic.CTXALLSUFF(pfnHasPendingIrq)(pVM->pdm.s.Apic.CTXALLSUFF(pDevIns));
    245248        pdmUnlock(pVM);
    246249        return VINF_SUCCESS;
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