Another round of speculative-execution vulnerabilities
Another round of speculative-execution vulnerabilities
Posted Aug 15, 2023 11:01 UTC (Tue) by anton (subscriber, #25547)In reply to: Another round of speculative-execution vulnerabilities by donald.buczek
Parent article: Another round of speculative-execution vulnerabilities
What makes you think that this would mean "isn't allowed to learn"? The fact that architectural state is not changed on a misprediction does not mean that architectural state is immutable, either.
A straightforward way is to learn from completed (i.e. architectural) branches, with the advantage that you learn from the ground truth rather than speculation.
If that approach updates the branch predictor too late in your opinion (and for the return predictor that's certainly an issue), a way to get speculative branch predictions is to have an additional predictor in the speculative state, and use that in combination with the non-speculative predictor. If a prediction turns out to be correct, you can turn the part of the branch predictor state that is based in that prediction from speculative to non-speculative (like you do for architectural state); if a prediction turns out to be wrong, revert the speculative branch predictor state to its state when the branch was speculated on (just like you do with speculative architectural state).
