From 82981d815a12b93d83297cedbc12279542bf9d0e Mon Sep 17 00:00:00 2001 From: Ved Shanbhogue Date: Fri, 30 Aug 2024 18:25:55 -0500 Subject: [PATCH] fix lru search --- iommu_ref_model/libiommu/src/iommu_atc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/iommu_ref_model/libiommu/src/iommu_atc.c b/iommu_ref_model/libiommu/src/iommu_atc.c index f9d7cd7f..baacfcd0 100644 --- a/iommu_ref_model/libiommu/src/iommu_atc.c +++ b/iommu_ref_model/libiommu/src/iommu_atc.c @@ -27,6 +27,7 @@ cache_ioatc_dc( for ( i = 0; i < DDT_CACHE_SIZE; i++ ) { if ( ddt_cache[i].lru < lru ) { replace = i; + lru = ddt_cache[i].lru; } } } @@ -67,6 +68,7 @@ cache_ioatc_pc( for ( i = 0; i < PDT_CACHE_SIZE; i++ ) { if ( pdt_cache[i].lru < lru ) { replace = i; + lru = pdt_cache[i].lru; } } } @@ -111,6 +113,7 @@ cache_ioatc_iotlb( for ( i = 0; i < TLB_SIZE; i++ ) { if ( tlb[i].lru < lru ) { replace = i; + lru = tlb[i].lru; } } }