VirtualBox

Changeset 86901 in vbox for trunk/src/VBox/Devices/PC


Ignore:
Timestamp:
Nov 17, 2020 12:28:45 PM (4 years ago)
Author:
vboxsync
Message:

AMD IOMMU: bugref:9654 Devices/PC/DevIoApic: Add stats for remapped interrupts and MSIs. Fix registering of 'aStatsVectors'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevIoApic.cpp

    r86868 r86901  
    252252    /** Number of suppressed level-triggered interrupts (by remote IRR). */
    253253    STAMCOUNTER             StatSuppressedLevelIntr;
     254    /** Number of IOMMU remapped interrupts (signaled by RTE). */
     255    STAMCOUNTER             StatIommuRemappedIntr;
    254256    /** Number of IOMMU discarded interrupts (signaled by RTE). */
    255257    STAMCOUNTER             StatIommuDiscardedIntr;
     258    /** Number of IOMMU remapped MSIs. */
     259    STAMCOUNTER             StatIommuRemappedMsi;
    256260    /** Number of IOMMU denied or failed MSIs. */
    257261    STAMCOUNTER             StatIommuDiscardedMsi;
     
    537541        if (RT_SUCCESS(rcRemap))
    538542        {
     543            STAM_COUNTER_INC(&pThis->StatIommuRemappedIntr);
    539544            ioapicGetApicIntrFromMsi(&MsiOut, &ApicIntr);
    540545            Assert(ApicIntr.u8Polarity == IOAPIC_RTE_GET_POLARITY(u64Rte)); /* Ensure polarity hasn't changed. */
     
    918923    int rcRemap = pThisCC->pIoApicHlp->pfnIommuMsiRemap(pDevIns, uBusDevFn, pMsi, &MsiOut);
    919924    if (RT_SUCCESS(rcRemap))
     925    {
     926        STAM_COUNTER_INC(&pThis->StatIommuRemappedMsi);
    920927        ioapicGetApicIntrFromMsi(&MsiOut, &ApicIntr);
     928    }
    921929    else
    922930    {
     
    14871495    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatRedundantLevelIntr,  STAMTYPE_COUNTER, "RedundantLevelIntr",  STAMUNIT_OCCURENCES, "Number of redundant level-triggered interrupts (no IRR change).");
    14881496    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatSuppressedLevelIntr, STAMTYPE_COUNTER, "SuppressedLevelIntr", STAMUNIT_OCCURENCES, "Number of suppressed level-triggered interrupts by remote IRR.");
    1489     PDMDevHlpSTAMRegister(pDevIns, &pThis->StatIommuDiscardedIntr,  STAMTYPE_COUNTER, "IommuDiscardedIntr",  STAMUNIT_OCCURENCES, "Number of interrupts discarded due to IOMMU.");
    1490     PDMDevHlpSTAMRegister(pDevIns, &pThis->StatIommuDiscardedMsi,   STAMTYPE_COUNTER, "IommuDiscardedMsi",   STAMUNIT_OCCURENCES, "Number of MSIs discarded due to IOMMU.");
     1497
     1498    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatIommuRemappedIntr,  STAMTYPE_COUNTER, "Iommu/RemappedIntr",  STAMUNIT_OCCURENCES, "Number of interrupts remapped by the IOMMU.");
     1499    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatIommuRemappedMsi,   STAMTYPE_COUNTER, "Iommu/RemappedMsi",   STAMUNIT_OCCURENCES, "Number of MSIs remapped by the IOMMU.");
     1500    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatIommuDiscardedIntr, STAMTYPE_COUNTER, "Iommu/DiscardedIntr", STAMUNIT_OCCURENCES, "Number of interrupts discarded by the IOMMU.");
     1501    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatIommuDiscardedMsi,  STAMTYPE_COUNTER, "Iommu/DiscardedMsi",  STAMUNIT_OCCURENCES, "Number of MSIs discarded by the IOMMU.");
    14911502
    14921503    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatEoiContention,    STAMTYPE_COUNTER, "CritSect/ContentionSetEoi", STAMUNIT_OCCURENCES, "Number of times the critsect is busy during EOI writes causing trips to R3.");
     
    14971508# endif
    14981509    for (size_t i = 0; i < RT_ELEMENTS(pThis->aStatVectors); i++)
    1499         PDMDevHlpSTAMRegisterF(pDevIns, &pThis->aStatVectors, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES,
     1510        PDMDevHlpSTAMRegisterF(pDevIns, &pThis->aStatVectors[i], STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES,
    15001511                               "Number of ioapicSendMsi/pfnApicBusDeliver calls for the vector.", "Vectors/%02x", i);
    15011512
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