Virtualized TLB System for VM Context Switching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Managing translations in computing systems with multiple different page sizes and virtualization environments is challenging due to the inefficiencies in swapping out contents of translation lookaside buffers (TLBs) when virtual machines switch execution, impacting performance.

Innovation Solution

Implementing a fully virtualized translation lookaside buffer (TLB) system that includes multiple levels of TLBs (L1 and L2) and a page table walker, where virtual-to-physical address translations are stored and looked up using virtual memory identifiers (VMIDs) and virtual function identifiers (VFIDs, with missed lookups leading to page table walks for accurate address mapping.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If TLB contents are swapped out when virtual machines switch execution, then memory management correctness is maintained, but system performance deteriorates due to frequent flushes

Engineering Contradiction:
Improvememory management correctnessVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The TLB is segmented into multiple virtual machine-specific contexts, each with its own translation cache. The virtualization hardware maintains separate TLB entries for different virtual machines, allowing simultaneous retention of translation information for multiple VMs without interference. This segmentation enables the system to maintain correctness for each VM while avoiding the performance penalty of flushing shared TLB contents.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a new dimension of virtual machine context identification alongside traditional address translation. By adding VM-specific identifiers (such as VMIDs) to the TLB entry structure, the system can distinguish between translations belonging to different virtual machines. This dimensional expansion allows multiple VMs to coexist in the same physical TLB hardware without requiring costly flush operations.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Productivity

If TLB contents are retained across virtual machine switches, then system performance improves by avoiding flushes, but translation accuracy deteriorates due to potential conflicts

Engineering Contradiction:
Improvesystem performanceVSAvoidaddress translation accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The virtualization hardware implements feedback mechanisms that track which virtual machine context is currently active. Before performing address translations, the system checks the VM context identifier against the TLB entry tags to ensure translations are retrieved from the correct virtual machine context. This feedback loop maintains translation accuracy while allowing TLB contents to be retained across VM switches.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent introduces virtual machine context identifiers as intermediary tags in the TLB structure. These intermediaries act as disambiguation markers that link physical TLB entries to their corresponding virtual machine contexts. When a translation request arrives, the intermediary VMID is checked to ensure the correct virtual address space is being translated, thereby maintaining precision without requiring frequent flushes.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Adaptability or versatility

If multiple virtual machines share physical resources, then resource utilization improves, but TLB management complexity increases due to context switching

Engineering Contradiction:
Improveresource sharing capabilityVSAvoidTLB management complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The TLB hardware is designed with universal structures that can serve multiple virtual machine contexts simultaneously. By incorporating VM-specific identifiers into the standard TLB entry format, the same physical TLB resources can be universally utilized by different virtual machines without requiring separate dedicated hardware for each VM. This multi-functionality enables efficient resource sharing while keeping management complexity manageable through hardware automation.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS10339068B2Fully virtualized TLBs
Publication Date: 2019.07.02 ADVANCED MICRO DEVICES INC
  • US10339068B2 patent drawing
  • US10339068B2 patent drawing
  • US10339068B2 patent drawing

AI summary

Systems, apparatuses, and methods for implementing a virtualized translation lookaside buffer (TLB) are disclosed herein. In one embodiment, a system includes at least an execution unit and a first TLB. The system supports the execution of a plurality of virtual machines in a virtualization environment. The system detects a translation request generated by a first virtual machine with a first virtual memory identifier (VMID). The translation request is conveyed from the execution unit to the first TLB. The first TLB performs a lookup of its cache using at least a portion of a first virtual address and the first VMID. If the lookup misses in the cache, the first TLB allocates an entry which is addressable by the first virtual address and the first VMID, and the first TLB sends the translation request with the first VMID to a second TLB.