VirtualBox

Changeset 89727 in vbox for trunk


Ignore:
Timestamp:
Jun 16, 2021 5:43:38 AM (3 years ago)
Author:
vboxsync
Message:

Intel IOMMU: bugref:9967 Nits.

File:
1 edited

Legend:

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

    r89726 r89727  
    14091409#ifdef RT_STRICT
    14101410    {
    1411         PDMAR pThis = PDMDEVINS_2_DATA(pDevIns, PDMAR);
     1411        PCDMAR pThis = PDMDEVINS_2_DATA(pDevIns, PCDMAR);
    14121412        uint32_t const uFstsReg = dmarRegReadRaw32(pThis, VTD_MMIO_OFF_FSTS_REG);
    14131413        uint32_t const fFaultMask = VTD_BF_FSTS_REG_PPF_MASK | VTD_BF_FSTS_REG_PFO_MASK
     
    21732173    Assert(!(pMemReqAux->GCPhysSlPt & X86_PAGE_4K_OFFSET_MASK));
    21742174
    2175     /* Mask of valid paging entry bits. */
    2176     static uint64_t const s_auPtEntityRsvd[] = { VTD_SL_PTE_VALID_MASK,
    2177                                                  VTD_SL_PDE_VALID_MASK,
    2178                                                  VTD_SL_PDPE_VALID_MASK,
    2179                                                  VTD_SL_PML4E_VALID_MASK,
    2180                                                  VTD_SL_PML5E_VALID_MASK };
     2175    /* Mask of reserved paging entry bits. */
     2176    static uint64_t const s_auPtEntityInvMasks[] = { ~VTD_SL_PTE_VALID_MASK,
     2177                                                     ~VTD_SL_PDE_VALID_MASK,
     2178                                                     ~VTD_SL_PDPE_VALID_MASK,
     2179                                                     ~VTD_SL_PML4E_VALID_MASK,
     2180                                                     ~VTD_SL_PML5E_VALID_MASK };
    21812181
    21822182    /* Paranoia. */
    21832183    Assert(pMemReqAux->cPagingLevel >= 3 && pMemReqAux->cPagingLevel <= 5);
    2184     AssertCompile(RT_ELEMENTS(s_auPtEntityRsvd) == 5);
     2184    AssertCompile(RT_ELEMENTS(s_auPtEntityInvMasks) == 5);
    21852185
    21862186    /* Second-level translations restricts input address to an implementation-specific MGAW. */
     
    22422242         * Validate reserved bits of the current paging entry.
    22432243         */
    2244         if (!(uPtEntity & ~s_auPtEntityRsvd[idxLevel]))
     2244        if (!(uPtEntity & s_auPtEntityInvMasks[idxLevel]))
    22452245        { /* likely */ }
    22462246        else
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