Hello, I would like to implement a speculative cache to mitigate the effects of Spectre-like attacks on In-Order processors. When the processor is speculating on a branch and wants to read or write data to the cache, the speculative cache will be accessed instead. If the speculation is determined to have been correct, the updates to the speculative cache will be brought into the real L1 caches. If the speculation is determined to have been incorrect, the speculative cache will be cleared. This ensures that the L1 cache is never updated speculatively.
We are relatively new to Gem5 so we aren't exactly sure what the best approach to implementing this would be. The way we would like this to work is that whenever we want to modify a cache line that was already in the L1, we first copy it from the L1 into the speculative cache. If the line wasn't in the L1, we bring it into the speculative cache first. After correct speculation, we want to bring the contents of the speculative cache into the L1 cache. The L1 cache state should only be modified on correct speculation. Where would you recommend we look to start implementing this? We will need some way to signal to the cache that a branch is taking place. We will likely need to modify mem/cache/cache.cc and mem/cache/base.cc but aren't sure of the best place to do our work. What would be the best way to approach this? Thanks! William
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users