VirtualBox

Changeset 60746 in vbox


Ignore:
Timestamp:
Apr 28, 2016 4:14:17 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
106938
Message:

VMM/APIC: Dump the PIBs in the debugger as well, comments.

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

Legend:

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

    r60741 r60746  
    23272327             */
    23282328            uint8_t const uTpr = pXApicPage->tpr.u8Tpr;
    2329             if (uTpr > 0 && XAPIC_TPR_GET_TP(uVector) <= XAPIC_TPR_GET_TP(uTpr))
     2329            if (   uTpr > 0
     2330                && XAPIC_TPR_GET_TP(uVector) <= XAPIC_TPR_GET_TP(uTpr))
    23302331            {
    23312332                Log2(("APIC%u: APICGetInterrupt: Interrupt masked. uVector=%#x uTpr=%#x SpuriousVector=%#x\n", pVCpu->idCpu,
     
    23362337
    23372338            /*
    2338              * The PPR should be up-to-date at this point and we're on EMT (so no parallel updates).
     2339             * The PPR should be up-to-date at this point through apicSetEoi().
     2340             * We're on EMT so no parallel updates possible.
    23392341             * Subject the pending vector to PPR prioritization.
    23402342             */
  • trunk/src/VBox/VMM/VMMR3/APIC.cpp

    r60731 r60746  
    355355
    356356    uint32_t cPending = 0;
    357     pHlp->pfnPrintf(pHlp, "    Pending:\n");
    358     pHlp->pfnPrintf(pHlp, "     ");
     357    pHlp->pfnPrintf(pHlp, "    Pending:");
    359358    for (ssize_t i = cFragments - 1; i >= 0; i--)
    360359    {
     
    369368
    370369                idxSetBit += (i * cBitsPerFragment);
    371                 pHlp->pfnPrintf(pHlp, " %02x", idxSetBit);
     370                pHlp->pfnPrintf(pHlp, " %#02x", idxSetBit);
    372371                ++cPending;
    373372            } while (uFragment);
     
    377376        pHlp->pfnPrintf(pHlp, " None");
    378377    pHlp->pfnPrintf(pHlp, "\n");
     378}
     379
     380
     381/**
     382 * Helper for dumping an APIC pending-interrupt bitmap.
     383 *
     384 * @param   pApicPib        The pending-interrupt bitmap.
     385 * @param   pHlp            The debug output helper.
     386 */
     387static void apicR3DbgInfoPib(PCAPICPIB pApicPib, PCDBGFINFOHLP pHlp)
     388{
     389    /* Copy the pending-interrupt bitmap as an APIC 256-bit sparse register. */
     390    XAPIC256BITREG ApicReg;
     391    RT_ZERO(ApicReg);
     392    ssize_t const cFragmentsDst = RT_ELEMENTS(ApicReg.u);
     393    ssize_t const cFragmentsSrc = RT_ELEMENTS(pApicPib->aVectorBitmap);
     394    AssertCompile(RT_ELEMENTS(ApicReg.u) == 2 * RT_ELEMENTS(pApicPib->aVectorBitmap));
     395    for (ssize_t idxPib = cFragmentsSrc - 1, idxReg = cFragmentsDst - 1; idxPib >= 0; idxPib--, idxReg -= 2)
     396    {
     397        uint64_t const uFragment   = pApicPib->aVectorBitmap[idxPib];
     398        uint32_t const uFragmentLo = RT_LO_U32(uFragment);
     399        uint32_t const uFragmentHi = RT_HI_U32(uFragment);
     400        ApicReg.u[idxReg].u32Reg     = uFragmentHi;
     401        ApicReg.u[idxReg - 1].u32Reg = uFragmentLo;
     402    }
     403
     404    /* Dump it. */
     405    apicR3DbgInfo256BitReg(&ApicReg, pHlp);
    379406}
    380407
     
    441468    pHlp->pfnPrintf(pHlp, "  IRR\n");
    442469    apicR3DbgInfo256BitReg(&pXApicPage->irr, pHlp);
     470    pHlp->pfnPrintf(pHlp, "  PIB\n");
     471    apicR3DbgInfoPib((PCAPICPIB)pApicCpu->pvApicPibR3, pHlp);
     472    pHlp->pfnPrintf(pHlp, "  Level PIB\n");
     473    apicR3DbgInfoPib(&pApicCpu->ApicPibLevel, pHlp);
    443474    pHlp->pfnPrintf(pHlp, "  ESR Internal                  = %#x\n",      pApicCpu->uEsrInternal);
    444475    pHlp->pfnPrintf(pHlp, "  ESR                           = %#x\n",      pXApicPage->esr.all.u32Errors);
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