Hardware TPDS Miss Handler for Code Modification Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Binary translation processors face substantial overhead due to software-based handling of translation protection data structure (TPDS) misses, leading to increased latency and reduced throughput, as existing designs rely on software to manage and update the TPDS, which can result in cache pollution and performance degradation when detecting self-modifying or cross-modifying code.
Innovation Solution
A hardware-based TPDS miss handler is employed to fill missing entries in the TPDS using a software-managed fingerprint data structure, allowing for lower latency and higher throughput by offloading the fill operation to hardware, enabling simultaneous multithreading and out-of-order instruction execution while handling misses, and bypassing higher-level caches to maintain high processor performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If software-based handling of TPDS misses is used, then the TPDS can detect modifications to original code, but substantial overhead is incurred leading to increased latency and reduced throughput
Solution Approach 1:
The patent replaces the software-based TPDS miss handling mechanism with a hardware-based miss handler. The hardware miss handler includes a fingerprint data structure and computation logic that operates in parallel with the processor core, eliminating the need for software intervention when TPDS misses occur. This substitution of software with hardware directly resolves the contradiction by maintaining reliable code modification detection while eliminating the substantial overhead that reduced processor throughput.
Solution Approach 2:
The patent introduces a hardware miss handler as an intermediary component between the TPDS and the processor core. This intermediary contains a fingerprint data structure and computation logic that handles miss events autonomously, preventing them from propagating to the software layer. The intermediary resolves the contradiction by providing reliable modification detection through the fingerprint comparison mechanism while isolating the processor core from the overhead of software-based handling.
2Reliability
If software-based TPDS miss handling is employed, then translation protection can be maintained, but cache pollution occurs and performance degradation results
Solution Approach 1:
The patent replaces software-based TPDS miss handling with a dedicated hardware miss handler that maintains its own fingerprint data structure in hardware. This substitution eliminates the need for software to access and manipulate cache memory during miss handling operations, thereby preventing cache pollution while maintaining translation protection. The hardware-based approach resolves the contradiction by providing reliable protection without the harmful side effect of cache contamination.
3Speed
If the TPDS has fixed capacity with eviction, then hardware can respond to incoming snoops, but page entries are evicted when capacity is exceeded
Solution Approach 1:
The patent resolves the contradiction by transitioning from a single-dimension hardware TPDS to a two-dimensional structure combining hardware TPDS with a hardware-based fingerprint data structure. The fingerprint data structure provides an extended storage dimension that holds reference information without occupying TPDS entry slots. This dimensional expansion allows the system to maintain fast hardware-based snoop response while preserving translation entries through fingerprint comparison, preventing unnecessary evictions.
Data Source
AI summary
A processor includes a memory to store original code and a fingerprint data structure, which stores, in a way thereof, an entry including a physical address for a page and a stored fingerprint generated from the page of the original code. A core includes a translation protection data structure (TPDS) to detect modification to the page, wherein the core is to, upon execution of a translation check instruction included within a translated page code corresponding to the page, transmit, to the TPDS, a modification check request having the physical address of the page in the memory and the way of the fingerprint data structure. A hardware TPDS miss handler is coupled to the core and is to process a miss request received from the TPDS responsive to the physical address not being present in the TPDS.


