VirtualBox

Changeset 87713 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Feb 11, 2021 6:27:01 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
142757
Message:

AMD IOMMU: bugref:9654 IOTLB cache bits.

File:
1 edited

Legend:

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

    r87712 r87713  
    5353# define IOMMU_DTE_CACHE_MAX                        UINT16_MAX
    5454/** The maximum number of IOTLB entries. */
    55 # define IOMMU_IOTLBE_MAX                           128
     55# define IOMMU_IOTLBE_MAX                           96
    5656/** The mask of bits covering the domain ID in the IOTLBE key. */
    5757# define IOMMU_IOTLB_DOMAIN_ID_MASK                 UINT64_C(0xffffff0000000000)
     
    902902
    903903/**
    904  * Destroys an IOTLB entry.
    905  *
    906  * @param   pIotlbe     The IOTLB entry to destroy.
    907  * @remarks An entry must only be destroyed if it's not in the cache!
    908  */
    909 static void iommuAmdIotlbEntryDestroy(PIOTLBE pIotlbe)
    910 {
    911     /* We must not erase the LRU node connections here! */
    912     RT_ZERO(pIotlbe->Core);
    913     RT_ZERO(pIotlbe->WalkResult);
    914     pIotlbe->fEvictPending = false;
    915     Assert(pIotlbe->Core.Key == IOMMU_IOTLB_KEY_NIL);
    916 }
    917 
    918 
    919 /**
    920904 * Removes an IOTLB entry from the cache for the given key.
    921905 *
     
    932916        if (pIotlbe->fEvictPending)
    933917            STAM_COUNTER_INC(&pThis->StatIotlbeLazyEvictReuse);
    934         iommuAmdIotlbEntryDestroy(pIotlbe);
    935         Assert(!pIotlbe->fEvictPending);
     918
     919        RT_ZERO(pIotlbe->Core);
     920        RT_ZERO(pIotlbe->WalkResult);
     921        /* We must not erase the LRU node connections here! */
     922        pIotlbe->fEvictPending = false;
     923        Assert(pIotlbe->Core.Key == IOMMU_IOTLB_KEY_NIL);
     924
    936925        Assert(pThis->cCachedIotlbes > 0);
    937926        --pThis->cCachedIotlbes;
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