VirtualBox

Changeset 45965 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
May 9, 2013 3:32:14 PM (12 years ago)
Author:
vboxsync
Message:

VMM: Facility for getting the highest-priority pending interrupt from the APIC device.

Location:
trunk/src/VBox/VMM
Files:
6 edited

Legend:

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

    r45798 r45965  
    15321532        {
    15331533            uint8_t u8Tpr;
    1534             int rc = PDMApicGetTPR(pVCpu, &u8Tpr, NULL /*pfPending*/);
     1534            int rc = PDMApicGetTPR(pVCpu, &u8Tpr, NULL /* pfPending */, NULL /* pu8PendingIrq */);
    15351535            if (RT_FAILURE(rc))
    15361536            {
  • trunk/src/VBox/VMM/VMMAll/PDMAll.cpp

    r44528 r45965  
    279279        Assert(pVM->pdm.s.Apic.CTX_SUFF(pfnSetTPR));
    280280        pdmLock(pVM);
    281         *pfPending = pVM->pdm.s.Apic.CTX_SUFF(pfnHasPendingIrq)(pVM->pdm.s.Apic.CTX_SUFF(pDevIns), pVCpu->idCpu);
     281        *pfPending = pVM->pdm.s.Apic.CTX_SUFF(pfnHasPendingIrq)(pVM->pdm.s.Apic.CTX_SUFF(pDevIns), pVCpu->idCpu,
     282                                                                NULL /* pu8PendingIrq */);
    282283        pdmUnlock(pVM);
    283284        return VINF_SUCCESS;
     
    316317 * @param   pu8TPR          Where to store the TRP.
    317318 * @param   pfPending       Pending interrupt state (out).
     319 * @param   pu8PendingIrq   Where to store the highest-priority pending IRQ
     320 *                          (optional, can be NULL) (out).
    318321 *
    319322 * @remarks No-long-jump zone!!!
    320323 */
    321 VMMDECL(int) PDMApicGetTPR(PVMCPU pVCpu, uint8_t *pu8TPR, bool *pfPending)
     324VMMDECL(int) PDMApicGetTPR(PVMCPU pVCpu, uint8_t *pu8TPR, bool *pfPending, uint8_t *pu8PendingIrq)
    322325{
    323326    PVM pVM = pVCpu->CTX_SUFF(pVM);
     
    332335        *pu8TPR = pVM->pdm.s.Apic.CTX_SUFF(pfnGetTPR)(pVM->pdm.s.Apic.CTX_SUFF(pDevIns), pVCpu->idCpu);
    333336        if (pfPending)
    334             *pfPending = pVM->pdm.s.Apic.CTX_SUFF(pfnHasPendingIrq)(pVM->pdm.s.Apic.CTX_SUFF(pDevIns), pVCpu->idCpu);
     337        {
     338            *pfPending = pVM->pdm.s.Apic.CTX_SUFF(pfnHasPendingIrq)(pVM->pdm.s.Apic.CTX_SUFF(pDevIns), pVCpu->idCpu,
     339                                                                    pu8PendingIrq);
     340        }
    335341        return VINF_SUCCESS;
    336342    }
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r45963 r45965  
    24872487            bool    fPendingIntr = false;
    24882488            uint8_t u8GuestTpr   = 0;
    2489             rc = PDMApicGetTPR(pVCpu, &u8GuestTpr, &fPendingIntr);
     2489            rc = PDMApicGetTPR(pVCpu, &u8GuestTpr, &fPendingIntr, NULL /* pu8PendingIntr */);
    24902490            AssertRCReturn(rc, rc);
    24912491
  • trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp

    r45957 r45965  
    14021402        /* TPR caching in CR8 */
    14031403        bool fPending;
    1404         rc2 = PDMApicGetTPR(pVCpu, &u8LastTPR, &fPending);
     1404        rc2 = PDMApicGetTPR(pVCpu, &u8LastTPR, &fPending, NULL /* pu8PendingIrq */);
    14051405        AssertRC(rc2);
    14061406
     
    28672867            case HMTPRINSTR_READ:
    28682868                /* TPR caching in CR8 */
    2869                 rc = PDMApicGetTPR(pVCpu, &u8Tpr, &fPending);
     2869                rc = PDMApicGetTPR(pVCpu, &u8Tpr, &fPending, NULL /* pu8PendingIrq */);
    28702870                AssertRC(rc);
    28712871
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r45955 r45965  
    31773177        bool    fPending;
    31783178
    3179         rc2 = PDMApicGetTPR(pVCpu, &u8LastTPR, &fPending);
     3179        rc2 = PDMApicGetTPR(pVCpu, &u8LastTPR, &fPending, NULL /* pu8PendingIrq */);
    31803180        AssertRC(rc2);
    31813181        /* The TPR can be found at offset 0x80 in the APIC mmio page. */
  • trunk/src/VBox/VMM/include/PDMInternal.h

    r45299 r45965  
    563563    DECLR3CALLBACKMEMBER(int,       pfnGetInterruptR3,(PPDMDEVINS pDevIns, VMCPUID idCpu, uint32_t *puTagSrc));
    564564    /** @copydoc PDMAPICREG::pfnHasPendingIrqR3 */
    565     DECLR3CALLBACKMEMBER(bool,      pfnHasPendingIrqR3,(PPDMDEVINS pDevIns, VMCPUID idCpu));
     565    DECLR3CALLBACKMEMBER(bool,      pfnHasPendingIrqR3,(PPDMDEVINS pDevIns, VMCPUID idCpu, uint8_t *pu8PendingIrq));
    566566    /** @copydoc PDMAPICREG::pfnSetBaseR3 */
    567567    DECLR3CALLBACKMEMBER(void,      pfnSetBaseR3,(PPDMDEVINS pDevIns, VMCPUID idCpu, uint64_t u64Base));
     
    587587    DECLR0CALLBACKMEMBER(int,       pfnGetInterruptR0,(PPDMDEVINS pDevIns, VMCPUID idCpu, uint32_t *puTagSrc));
    588588    /** @copydoc PDMAPICREG::pfnHasPendingIrqR3 */
    589     DECLR0CALLBACKMEMBER(bool,      pfnHasPendingIrqR0,(PPDMDEVINS pDevIns, VMCPUID idCpu));
     589    DECLR0CALLBACKMEMBER(bool,      pfnHasPendingIrqR0,(PPDMDEVINS pDevIns, VMCPUID idCpu, uint8_t *pu8PendingIrq));
    590590    /** @copydoc PDMAPICREG::pfnSetBaseR3 */
    591591    DECLR0CALLBACKMEMBER(void,      pfnSetBaseR0,(PPDMDEVINS pDevIns, VMCPUID idCpu, uint64_t u64Base));
     
    611611    DECLRCCALLBACKMEMBER(int,       pfnGetInterruptRC,(PPDMDEVINS pDevIns, VMCPUID idCpu, uint32_t *puTagSrc));
    612612    /** @copydoc PDMAPICREG::pfnHasPendingIrqR3 */
    613     DECLRCCALLBACKMEMBER(bool,      pfnHasPendingIrqRC,(PPDMDEVINS pDevIns, VMCPUID idCpu));
     613    DECLRCCALLBACKMEMBER(bool,      pfnHasPendingIrqRC,(PPDMDEVINS pDevIns, VMCPUID idCpu, uint8_t *pu8PendingIrq));
    614614    /** @copydoc PDMAPICREG::pfnSetBaseR3 */
    615615    DECLRCCALLBACKMEMBER(void,      pfnSetBaseRC,(PPDMDEVINS pDevIns, VMCPUID idCpu, uint64_t u64Base));
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