Branch Prediction Cache Workload Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Branch prediction circuitry can be exploited by attackers to leak sensitive information, and tagging entries with workload identifiers to prevent this increases the overhead and complexity of micro-architecture designs, making it impractical.
Innovation Solution
A branch prediction cache that stores and manages separate sets of branch prediction state data for each software workload in the memory system, allowing for accurate predictions without the need for large overhead in the branch prediction circuitry, and preventing incorrect speculation across workloads.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Area of stationary object
If branch prediction state data is shared across multiple software workloads, then the branch prediction cache size and area overhead are reduced, but security is compromised allowing attackers to exploit mispredicted branch data to leak sensitive information
Solution Approach 1:
The branch prediction cache is segmented into multiple workload-specific partitions, where each partition stores branch prediction state data for a specific software workload. This segmentation prevents attackers from one workload from accessing or exploiting branch prediction data from other workloads, thereby eliminating the security vulnerability while maintaining reasonable cache size through efficient utilization of segmented space
Solution Approach 2:
Different regions or partitions of the branch prediction cache are assigned different security properties and access controls tailored to specific workload requirements. This allows the system to maintain secure isolation for sensitive workloads while potentially allowing shared access for less sensitive workloads, optimizing both security and resource utilization
2Object-affected harmful factors
If separate branch prediction state data is maintained for each software workload, then security is improved preventing information leakage attacks, but the branch prediction cache size and area overhead increase
Solution Approach 1:
Multiple workload-specific branch prediction caches are merged into a single unified physical cache structure with shared storage resources. This merging allows the system to maintain separate logical partitions for different workloads (ensuring security isolation) while physically sharing the cache memory, thereby reducing overall area overhead compared to completely separate caches
Solution Approach 2:
The branch prediction cache is designed with multi-functionality to serve multiple software workloads simultaneously through workload identification and dynamic partitioning. The cache can adaptively allocate storage space to different workloads based on their needs, allowing a single cache structure to fulfill multiple workload-specific prediction functions without requiring dedicated cache memory for each workload
3Object-affected harmful factors
If workload identifiers are tagged in branch prediction entries to prevent cross-workload exploitation, then security is improved, but device complexity and micro-architecture design overhead increase
Solution Approach 1:
The workload identification and security control logic is extracted from the individual branch prediction entries and implemented as separate control mechanisms at the cache management level. This extraction allows branch prediction entries to remain simple without embedded workload tags, while security isolation is enforced through external partitioning and access control structures that manage which workload can access which cache partitions
4Device complexity
If a unified branch prediction cache is used for all workloads, then device complexity is reduced, but prediction accuracy deteriorates due to incorrect speculation from other workloads
Solution Approach 1:
The branch prediction cache implements dynamic partitioning where cache partitions are dynamically assigned to different workloads based on active workload identification. This dynamic approach ensures that each workload accesses only its own branch prediction data, maintaining high prediction accuracy by preventing contamination from other workloads' branch patterns, while the unified cache structure keeps overall device complexity manageable
Data Source
Figure 1
Figure 2
Figure 3~4
AI summary
An apparatus comprises: processing circuitry 18 to process instructions from a plurality of software workloads; a branch prediction cache 40-42 to cache branch prediction state data selected from a plurality of sets of branch prediction state data 60 stored in a memory system 30, 32, 34, each set of branch prediction state data corresponding to one of said plurality of software workloads; and branch prediction circuitry 4 to predict an outcome of a branch instruction of a given software workload based on branch prediction state data cached in the branch prediction cache from the set of branch prediction state data corresponding to said given software workload. This is useful for mitigating against speculation side-channel attacks which exploit branch mispredictions caused by malicious training of a branch predictor.