Speculative Load Delay and Value Prediction for Spectre Mitigation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing solutions for hiding microarchitectural state changes during speculative execution in CPUs are inefficient, leading to significant performance and energy costs due to double memory accesses, which can be exploited for side-channel attacks like Spectre and Meltdown.

Innovation Solution

A processing system that delays speculative loads until they become non-speculative, allowing only a single memory access per load and using value prediction to minimize energy consumption and performance loss, while preventing microarchitectural changes until speculation is verified.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If speculative loads are executed immediately, then performance is improved through speculative execution, but microarchitectural state changes occur that can be exploited for side-channel attacks

Engineering Contradiction:
Improveexecution speedVSAvoidside-channel attack vulnerability
Core Design Contradiction:
ProductivityVSObject-affected harmful factors

Solution Approach 1:

The system performs preliminary actions by delaying speculative loads until they become non-speculative, preventing microarchitectural state changes during the speculative phase. This resolves the contradiction by executing the load only after speculation is verified, eliminating side-channel vulnerabilities while maintaining performance through value prediction for missed loads.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system introduces an intermediary mechanism (value prediction) that provides predicted values for speculative loads that miss in the cache. This allows the load to proceed without causing visible microarchitectural state changes, resolving the contradiction by decoupling the speculative execution from observable cache behavior.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If microarchitectural state changes are prevented during speculation, then side-channel attack resistance is improved, but performance and energy costs increase due to double memory accesses

Engineering Contradiction:
Improvesecurity against side-channel attacksVSAvoidenergy consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The system applies partial action by delaying only the microarchitectural state changes until speculation is verified, while allowing the load to proceed with value prediction. This prevents the excessive energy cost of double memory accesses while maintaining security, as the load is delayed only when necessary (on cache misses) and only for the minimal time required to verify speculation.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The system changes the timing parameter of when microarchitectural state changes occur, delaying them until after speculation verification. This resolves the contradiction by separating the load execution from the cache state update, allowing security to be maintained without the energy penalty of redundant memory accesses.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If microarchitectural state changes are delayed until speculation verification, then side-channel attack resistance is improved, but performance loss occurs due to load delays

Engineering Contradiction:
Improvesecurity against side-channel attacksVSAvoidexecution speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system introduces value prediction as an intermediary that provides immediate predicted values for speculative loads. This resolves the contradiction by allowing the load to proceed without delay while the actual cache access is delayed until speculation verification, maintaining both security and performance.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system performs preliminary value prediction before the cache access is delayed. This resolves the contradiction by providing the load value in advance through prediction, so that when the actual cache access is delayed for security verification, the execution pipeline is not stalled.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11163576B2Systems and methods for invisible speculative execution
Publication Date: 2021.11.02 ARRAY CACHE TECHNOLOGIES LLC
  • US11163576B2 patent drawing
  • US11163576B2 patent drawing
  • US11163576B2 patent drawing

AI summary

A system and method for efficiently preventing visible side-effects in the memory hierarchy during speculative execution is disclosed. Hiding the side-effects of executed instructions in the whole memory hierarchy is both expensive, in terms of performance and energy, and complicated. A system and method is disclosed to hide the side-effects of speculative loads in the cache(s) until the earliest time these speculative loads become non-speculative. A refinement is disclosed where loads that hit in the L1 cache are allowed to proceed by keeping their side-effects on the L1 cache hidden until these loads become non-speculative, and all other speculative loads that miss in the cache(s) are prevented from executing until they become non-speculative. To limit the performance deterioration caused by these delayed loads, a system and method is disclosed that augments the cache(s) with a value predictor or a re-computation engine that supplies predicted or recomputed values to the loads that missed in the cache(s).