misc: v24.0.0.1 Hotfix release (#1425)

This commit is contained in:
Bobby R. Bruce
2024-08-08 14:15:18 -07:00
committed by GitHub
14 changed files with 38 additions and 22 deletions

View File

@@ -1,3 +1,11 @@
# Version 24.0.0.1
**[HOTFIX]** Fixes a bug affecting the use of the `IndirectMemoryPrefetcher`, `SignaturePathPrefetcher`, `SignaturePathPrefetcherV2`, `STeMSPrefetcher`, and `PIFPrefetcher` SimObjects.
Use of these resulted in gem5 crashing a gem5 crash with the error message "Need is_secure arg".
The fix to this introduced to the gem5 develop branch in the <https://github.com/gem5/gem5/pull/1374> Pull Request.
The commits in this PR were cherry-picked on the gem5 stable branch to create the v24.0.0.1 hotfix release.
# Version 24.0
gem5 Version 24.0 is the first major release of 2024.

View File

@@ -31,7 +31,7 @@ PROJECT_NAME = gem5
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = v24.0.0.0
PROJECT_NUMBER = v24.0.0.1
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.

View File

@@ -32,6 +32,6 @@ namespace gem5
/**
* @ingroup api_base_utils
*/
const char *gem5Version = "24.0.0.0";
const char *gem5Version = "24.0.0.1";
} // namespace gem5

View File

@@ -90,8 +90,6 @@ class AssociativeSet : public AssociativeCache<Entry>
using AssociativeCache<Entry>::accessEntryByAddr;
using AssociativeCache<Entry>::findEntry;
using AssociativeCache<Entry>::insertEntry;
using AssociativeCache<Entry>::getPossibleEntries;
using AssociativeCache<Entry>::replPolicy;
using AssociativeCache<Entry>::indexingPolicy;
};

View File

@@ -85,7 +85,7 @@ IndirectMemory::calculatePrefetch(const PrefetchInfo &pfi,
}
} else {
// if misses are not being tracked, attempt to detect stream accesses
PrefetchTableEntry *pt_entry = prefetchTable.findEntry(pc);
PrefetchTableEntry *pt_entry = prefetchTable.findEntry(pc, is_secure);
if (pt_entry != nullptr) {
prefetchTable.accessEntry(pt_entry);
@@ -159,7 +159,7 @@ IndirectMemory::calculatePrefetch(const PrefetchInfo &pfi,
} else {
pt_entry = prefetchTable.findVictim(pc);
assert(pt_entry != nullptr);
prefetchTable.insertEntry(pc, pt_entry);
prefetchTable.insertEntry(pc, pt_entry-> secure, pt_entry);
pt_entry->address = addr;
pt_entry->secure = is_secure;
}

View File

@@ -121,7 +121,7 @@ class IndirectMemory : public Queued
}
};
/** Prefetch table */
AssociativeCache<PrefetchTableEntry> prefetchTable;
AssociativeSet<PrefetchTableEntry> prefetchTable;
/** Indirect Pattern Detector entrt */
struct IndirectPatternDetectorEntry : public TaggedEntry

View File

@@ -176,14 +176,16 @@ PIF::notifyRetiredInst(const Addr pc)
// Insert the spatial entry into the history buffer and update
// the 'iterator' table to point to the new entry
historyBuffer.push_back(spatialCompactor);
auto idx_entry = index.findEntry(spatialCompactor.trigger);
constexpr bool is_secure = false;
auto idx_entry = index.findEntry(spatialCompactor.trigger,
is_secure);
if (idx_entry != nullptr) {
index.accessEntry(idx_entry);
} else {
idx_entry = index.findVictim(spatialCompactor.trigger);
assert(idx_entry != nullptr);
index.insertEntry(spatialCompactor.trigger, idx_entry);
index.insertEntry(spatialCompactor.trigger, is_secure,
idx_entry);
}
idx_entry->historyIt =
historyBuffer.getIterator(historyBuffer.tail());
@@ -205,6 +207,7 @@ PIF::calculatePrefetch(const PrefetchInfo &pfi,
}
const Addr pc = pfi.getPC();
bool is_secure = pfi.isSecure();
// First check if the access has been prefetched, this is done by
// comparing the access against the active Stream Address Buffers
@@ -219,7 +222,7 @@ PIF::calculatePrefetch(const PrefetchInfo &pfi,
// Check if a valid entry in the 'index' table is found and allocate a new
// active prediction stream
IndexEntry *idx_entry = index.findEntry(pc);
IndexEntry *idx_entry = index.findEntry(pc, is_secure);
if (idx_entry != nullptr) {
index.accessEntry(idx_entry);

View File

@@ -143,7 +143,7 @@ class PIF : public Queued
* The index table is a small cache-like structure that facilitates
* fast search of the history buffer.
*/
AssociativeCache<IndexEntry> index;
AssociativeSet<IndexEntry> index;
/**
* A Stream Address Buffer (SAB) tracks a window of consecutive

View File

@@ -192,7 +192,8 @@ SignaturePath::getSignatureEntry(Addr ppn, bool is_secure,
SignaturePath::PatternEntry &
SignaturePath::getPatternEntry(Addr signature)
{
PatternEntry* pattern_entry = patternTable.findEntry(signature);
constexpr bool is_secure = false;
PatternEntry* pattern_entry = patternTable.findEntry(signature, is_secure);
if (pattern_entry != nullptr) {
// Signature found
patternTable.accessEntry(pattern_entry);
@@ -201,7 +202,7 @@ SignaturePath::getPatternEntry(Addr signature)
pattern_entry = patternTable.findVictim(signature);
assert(pattern_entry != nullptr);
patternTable.insertEntry(signature, pattern_entry);
patternTable.insertEntry(signature, is_secure, pattern_entry);
}
return *pattern_entry;
}
@@ -277,7 +278,7 @@ SignaturePath::calculatePrefetch(const PrefetchInfo &pfi,
// confidence, these are prefetch candidates
// - select the entry with the highest counter as the "lookahead"
PatternEntry *current_pattern_entry =
patternTable.findEntry(current_signature);
patternTable.findEntry(current_signature, is_secure);
PatternStrideEntry const *lookahead = nullptr;
if (current_pattern_entry != nullptr) {
unsigned long max_counter = 0;

View File

@@ -148,7 +148,7 @@ class SignaturePath : public Queued
};
/** Pattern table */
AssociativeCache<PatternEntry> patternTable;
AssociativeSet<PatternEntry> patternTable;
/**
* Generates a new signature from an existing one and a new stride

View File

@@ -125,7 +125,8 @@ SignaturePathV2::handlePageCrossingLookahead(signature_t signature,
GlobalHistoryEntry *gh_entry = globalHistoryRegister.findVictim(0);
assert(gh_entry != nullptr);
// Any address value works, as it is never used
globalHistoryRegister.insertEntry(0, gh_entry);
constexpr bool is_secure = false;
globalHistoryRegister.insertEntry(0, is_secure, gh_entry);
gh_entry->signature = signature;
gh_entry->lastBlock = last_offset;

View File

@@ -66,7 +66,7 @@ class SignaturePathV2 : public SignaturePath
delta(0) {}
};
/** Global History Register */
AssociativeCache<GlobalHistoryEntry> globalHistoryRegister;
AssociativeSet<GlobalHistoryEntry> globalHistoryRegister;
double calculateLookaheadConfidence(PatternEntry const &sig,
PatternStrideEntry const &lookahead) const override;

View File

@@ -92,12 +92,15 @@ STeMS::checkForActiveGenerationsEnd(const CacheAccessor &cache)
}
if (generation_ended) {
// PST is indexed using the PC (secure bit is unused)
auto pst_entry = patternSequenceTable.findEntry(pst_addr);
constexpr bool is_secure = false;
auto pst_entry = patternSequenceTable.findEntry(pst_addr,
is_secure);
if (pst_entry == nullptr) {
// Tipically an entry will not exist
pst_entry = patternSequenceTable.findVictim(pst_addr);
assert(pst_entry != nullptr);
patternSequenceTable.insertEntry(pst_addr, pst_entry);
patternSequenceTable.insertEntry(pst_addr, is_secure,
pst_entry);
} else {
patternSequenceTable.accessEntry(pst_entry);
}
@@ -219,9 +222,11 @@ STeMS::reconstructSequence(
// Now query the PST with the PC of each RMOB entry
idx = 0;
constexpr bool is_secure = false;
for (auto it = rmob_it; it != rmob.end() && (idx < reconstructionEntries);
it++) {
auto pst_entry = patternSequenceTable.findEntry(it->pstAddress);
auto pst_entry = patternSequenceTable.findEntry(it->pstAddress,
is_secure);
if (pst_entry != nullptr) {
patternSequenceTable.accessEntry(pst_entry);
for (auto &seq_entry : pst_entry->sequence) {

View File

@@ -155,7 +155,7 @@ class STeMS : public Queued
/** Active Generation Table (AGT) */
AssociativeSet<ActiveGenerationTableEntry> activeGenerationTable;
/** Pattern Sequence Table (PST) */
AssociativeCache<ActiveGenerationTableEntry> patternSequenceTable;
AssociativeSet<ActiveGenerationTableEntry> patternSequenceTable;
/** Data type of the Region Miss Order Buffer entry */
struct RegionMissOrderBufferEntry