VirtualBox

Changeset 88705 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 26, 2021 3:42:35 PM (4 years ago)
Author:
vboxsync
Message:

Intel IOMMU: bugref:9967 Queued Invalidation WIP.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/DevIommuIntel.cpp

    r88704 r88705  
    878878static bool dmarInvQueueIsEmptyEx(PCDMAR pThis, uint32_t *poffQh, uint32_t *poffQt)
    879879{
    880     /* Read only the low-32 bits of the queue head and queue tail registers as high bits are all reserved.*/
     880    /* Read only the low-32 bits of the queue head and queue tail as high bits are all RsvdZ.*/
    881881    uint32_t const uIqtReg = dmarRegReadRaw32(pThis, VTD_MMIO_OFF_IQT_REG);
    882882    uint32_t const uIqhReg = dmarRegReadRaw32(pThis, VTD_MMIO_OFF_IQH_REG);
    883883
    884     /* Don't bother masking QT, QH out of IQT_REG, IQH_REG since all other bits are RsvdZ. */
     884    /* Don't bother masking QT, QH since other bits are RsvdZ. */
    885885    Assert(!(uIqtReg & ~VTD_BF_IQT_REG_QT_MASK));
    886886    Assert(!(uIqhReg & ~VTD_BF_IQH_REG_QH_MASK));
     
    14211421            if (!fIsEmpty)
    14221422            {
    1423                 uint64_t const uIqaReg      = dmarRegRead64(pThis, VTD_MMIO_OFF_IQA_REG);
    1424                 uint8_t const  cQueuePages  = 1 << (uIqaReg & VTD_BF_IQA_REG_QS_MASK);
    1425                 uint32_t const cbQueue      = cQueuePages << X86_PAGE_SHIFT;
     1423                uint64_t const uIqaReg     = dmarRegRead64(pThis, VTD_MMIO_OFF_IQA_REG);
     1424                uint8_t const  cQueuePages = 1 << (uIqaReg & VTD_BF_IQA_REG_QS_MASK);
     1425                uint32_t const cbQueue     = cQueuePages << X86_PAGE_SHIFT;
    14261426                if (offQueueTail <= cbQueue)
    14271427                {
    1428                     uint32_t const cbDescriptors = offQueueTail - offQueueHead;
     1428                    Assert(offQueueTail > offQueueHead);
     1429                    uint32_t const cbDescriptors   = offQueueTail - offQueueHead;
    14291430                    RTGCPHYS const GCPhysQueueBase = uIqaReg & VTD_BF_IQA_REG_IQA_MASK;
    14301431
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