4 ms·
You appear to be confusing Meltdown and Spectre. This is about Spectre Variant 2. You're describing Meltdown. Also, the fault is queued and not discarded. If th
by lorenzhs 9y ago
You appear to be confusing Meltdown and Spectre. This is about Spectre Variant 2. You're describing Meltdown. Also, the fault is queued and not discarded. If the branch ends up being taken, you'll get a fault for accessing a forbidden part of memory. If not, the CPU "undoes" the speculatively executed part as if it never happened. The Meltdown issue is that it doesn't undo the cache effects, which nobody thought to be a big deal, and which are very hard to undo.
Also, you severely underestimate the speedups gained by a better branch predictor. There's a nice writeup at https://danluu.com/branch-prediction/ https://danluu.com/branch-prediction/ if you're interested.