VirtualBox

Changeset 89497 in vbox


Ignore:
Timestamp:
Jun 4, 2021 7:41:33 AM (3 years ago)
Author:
vboxsync
Message:

AMD IOMMU: bugref:9654 Use the common x86 page-offset macro now.

File:
1 edited

Legend:

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

    r89496 r89497  
    187187#endif  /* IOMMU_WITH_DTE_CACHE */
    188188
    189 /** Gets the page offset mask given the number of bits to shift. */
    190 #define IOMMU_GET_PAGE_OFF_MASK(a_cShift)           (~(UINT64_C(0xffffffffffffffff) << (a_cShift)))
    191 
    192189/** Acquires the PDM lock (returns a_rcBusy on contention). */
    193190#define IOMMU_LOCK_RET(a_pDevIns, a_pThisCC, a_rcBusy)  \
     
    813810    /* Paranoia: Ensure offset bits are 0. */
    814811    {
    815         uint64_t const fOffMaskPrev = IOMMU_GET_PAGE_OFF_MASK(pPageLookupPrev->cShift);
    816         uint64_t const fOffMask     = IOMMU_GET_PAGE_OFF_MASK(pPageLookup->cShift);
     812        uint64_t const fOffMaskPrev = X86_GET_PAGE_OFFSET_MASK(pPageLookupPrev->cShift);
     813        uint64_t const fOffMask     = X86_GET_PAGE_OFFSET_MASK(pPageLookup->cShift);
    817814        Assert(!(GCPhysPrev & fOffMaskPrev));
    818815        Assert(!(GCPhys     & fOffMask));
     
    38873884            if (cbRemaining == cbIova)
    38883885            {
    3889                 uint64_t const offMask = IOMMU_GET_PAGE_OFF_MASK(PageLookup.cShift);
     3886                uint64_t const offMask = X86_GET_PAGE_OFFSET_MASK(PageLookup.cShift);
    38903887                uint64_t const offSpa  = uIova & offMask;
    38913888                Assert(!(PageLookup.GCPhysSpa & offMask));
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