Binary Translation Architectural Performance Counter Emulation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Binary translation systems face security risks and compatibility issues with architectural performance monitoring due to changes in code structure, leading to incompatibilities and potential malicious attacks by allowing users to monitor translation facilities.

Innovation Solution

The implementation of microarchitectural support for transparent and accurate emulation of architectural performance counter behavior, using enhanced hardware structures and hidden ISA support to faithfully emulate existing monitoring features, thereby hiding changes made by the binary translation system.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If binary translation systems transform existing code to new binary code fragments, then code compatibility and execution flexibility are improved, but architectural performance monitoring compatibility deteriorates because the translated code structure differs from the original code

Engineering Contradiction:
Improvecode execution flexibilityVSAvoidperformance monitoring compatibility
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent introduces a binary translation layer as an intermediary between the original code and the execution engine. This translator monitors and tracks execution metrics during the translation process, ensuring that performance monitoring data remains accurate and compatible with the original code's architectural expectations, thus resolving the compatibility issue while maintaining translation flexibility

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system implements feedback mechanisms where the binary translator continuously monitors execution metrics and adjusts its translation process accordingly. This feedback loop ensures that performance monitoring data reflects the actual execution behavior, maintaining reliability while allowing code transformation

Inventive Principle:
Principle #23Feedback

2Measurement precision

If binary translation systems allow users to monitor architectural performance counters, then code analysis capability is improved, but system security deteriorates due to potential malicious attacks exploiting translation cache information

Engineering Contradiction:
Improveperformance monitoring capabilityVSAvoidsecurity risk
Core Design Contradiction:
Measurement precisionVSObject-affected harmful factors

Solution Approach 1:

The patent extracts and isolates the performance monitoring functionality from the binary translation process. By separating the monitoring data collection from the translation cache operations, the system allows performance analysis while preventing attackers from using monitoring access to probe translation cache structures and exploit security vulnerabilities

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The system converts the potential security risk of performance monitoring into a benefit by implementing controlled monitoring that provides genuine performance analysis capability while inherently protecting the translation cache from exploitation. The monitoring mechanism itself becomes a security feature by preventing unauthorized access patterns

Inventive Principle:
Principle #22Blessing in disguise (Convert harm into benefit)

Data Source

PatentUS10387159B2Apparatus and method for architectural performance monitoring in binary translation systems
Publication Date: 2019.08.20 INTEL CORP
  • US10387159B2 patent drawing
  • US10387159B2 patent drawing
  • US10387159B2 patent drawing

AI summary

Methods and apparatuses relate to emulating architectural performance monitoring in a binary translation system. In one embodiment, a processor includes an architectural performance counter to maintain an architectural value associated with instruction execution, a register to store the architectural value of the architectural performance counter, binary translation logic to embed an architectural value from the architectural performance counter into a stream of translated instructions having a transactional code region and to store the architectural value into the register, and an execution unit to execute the transactional code region of the stream of translated instructions. The binary translation logic is configured to add the architectural value from the register to the architectural performance counter upon completion of the transactional code region of the stream of translated instructions. In one embodiment, a binary translation system overcomes software incompatibilities by using microarchitectural support to transparently and accurately emulate architectural performance counter behavior.