Transactional Memory Hardware for Virtualization Emulation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current virtualization and emulation technologies face performance limitations due to concurrency synchronization and tracking self-modifying code, which slows down serial performance and incurs a substantial performance burden.

Innovation Solution

The implementation of transactional memory hardware in central processing units to facilitate private state management, visibility of memory accesses, and atomic commit support, enabling efficient emulation and virtualization by maintaining an emulated state inconsistent with the architectural state, detecting self-modifying code, and optimizing dispatch table updates and call return caches.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional virtualization and emulation software is used, then functionality is provided, but performance is limited due to concurrency synchronization overhead

Engineering Contradiction:
Improveemulation speedVSAvoidsynchronization time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent introduces transactional memory hardware as an intermediary between the emulated code and the host system. This hardware mediator handles concurrency control and synchronization automatically through atomic transactions, eliminating the software-based synchronization overhead that previously limited emulation speed. The transactional memory hardware acts as a buffer that manages state consistency without requiring frequent software intervention.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If traditional emulation techniques are used, then software can run on any processor, but tracking self-modifying code incurs substantial performance burden

Engineering Contradiction:
Improveprocessor compatibilityVSAvoidemulation speed
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent replaces the software-based tracking mechanism with hardware-based transactional memory. Instead of using software to monitor and track self-modifying code instructions (which created substantial performance burden), the transactional memory hardware automatically detects and handles modifications through its atomic transaction capabilities. This substitution of mechanical/software tracking with hardware-based transaction management maintains processor compatibility while dramatically improving emulation speed.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Measurement precision

If instruction-accurate simulation is used, then precise emulation is achieved, but performance is slow compared to chunk-accurate simulation

Engineering Contradiction:
Improveemulation accuracyVSAvoidsimulation speed
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent introduces dynamic switching between instruction-accurate and chunk-accurate simulation modes based on transactional memory boundaries. The system dynamically adjusts the simulation granularity: using chunk-accurate simulation for performance-critical paths where transactional memory can guarantee consistency, and instruction-accurate simulation when precise exception semantics are required. This dynamic approach allows the system to achieve both high performance and precise emulation where needed.

Inventive Principle:
Principle #15Dynamics

4Productivity

If private state is maintained for state isolation, then emulation efficiency is improved, but memory visibility management becomes complex

Engineering Contradiction:
Improveemulation efficiencyVSAvoidmemory management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements self-service memory visibility management through transactional memory hardware. Instead of requiring complex software protocols for managing private state visibility (which would increase device complexity), the transactional memory hardware automatically handles visibility control. When a transaction commits, the hardware automatically makes the private state visible to other processors or makes it invisible on abort, eliminating the need for manual visibility management and reducing system complexity.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS8176253B2Leveraging transactional memory hardware to accelerate virtualization and emulation
Publication Date: 2012.05.08 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8176253B2 patent drawing
  • US8176253B2 patent drawing
  • US8176253B2 patent drawing

AI summary

Various technologies and techniques are disclosed for using transactional memory hardware to accelerate virtualization or emulation. A central processing unit is provided with the transactional memory hardware. Code backpatching can be facilitated by providing transactional memory hardware that supports a facility to maintain private memory state and an atomic commit feature. Changes made to certain code are stored in the private state facility. Backpatching changes are enacted by attempting to commit all the changes to memory at once using the atomic commit feature. An efficient call return stack can be provided by using transactional memory hardware. A call return cache stored in the private state facility captures a host address to return to after execution of a guest function completes. A direct-lookup hardware-based hash table is used for the call return cache.