Hardware support for virtual machine and operating system context switching in translation lookaside buffers and virtually tagged caches

Patent No. US8522253 (titled "Hardware support for virtual machine and operating system context switching in translation lookaside buffers and virtually tagged caches") on Mar 31, 2006. The application was issued on Aug 27, 2013.

What is this patent about?

’253 is related to the field of memory management in computing systems, specifically addressing the overhead associated with context switching in virtualized environments. In traditional systems, switching between different operating systems or applications often requires flushing the Translation Lookaside Buffer (TLB) or virtually tagged caches to prevent address aliasing. This flushing process significantly degrades performance by forcing the system to reload memory mappings from slower main memory after every switch.

The underlying idea behind ’253 is to eliminate the need for frequent cache flushes by embedding multi-level ownership metadata directly into each cache or TLB entry. By tagging entries with both a specific application context ID and a broader virtual machine ID, the hardware can distinguish between memory pages that belong to a specific process and those that are shared globally across a virtual machine. This allows entries from different virtual worlds to coexist in the hardware simultaneously, maintaining isolation without sacrificing speed.

The claims of ’253 focus on a hardware matching circuit that evaluates multiple context identifiers in parallel to determine a cache hit. Specifically, the independent claims describe a mechanism where a cache entry stores at least two distinct context IDs and a selecting value or logic gate (such as an OR gate). During a search, the hardware compares the stored IDs against provided system IDs and uses the selecting logic to validate the entry based on whether it is marked as a local process-specific page or a global machine-wide page.

In practice, the invention works by extending the standard tag comparison logic with additional comparators and multiplexers. When the CPU performs a memory lookup, it doesn't just check the virtual address; it also checks the current VM ID and App Context ID against the tags in the cache. If an entry is marked as 'global' for a virtual machine, the hardware ignores the specific application ID and grants a match based on the machine ID alone. This ensures that shared kernel pages or hypervisor resources remain resident in the cache even as the system toggles between different user applications.

This approach differs from prior solutions by moving the management of 'global' status from a single bit to a flexible, hierarchical tagging system. While older systems might have a single global bit that applies to everyone, this invention allows for 'nested' global status—pages can be global to one virtual machine but invisible to another. Furthermore, by using multiplexers to switch between code and data context IDs, the architecture provides a granular way to handle different translation domains without the performance penalty of a total pipeline flush.

How does this patent fit in bigger picture?

Technical Landscape

In the mid-2000s when ’253 was filed, memory management in virtualized environments was typically implemented using software-heavy translation mechanisms that required frequent invalidation of hardware buffers. At a time when systems commonly relied on full flushes of translation lookaside buffers (TLBs) and virtually tagged caches during context or world switches, the overhead of reloading address mappings significantly degraded performance. Hardware constraints made the simultaneous tracking of multiple address spaces across different virtual machines and guest operating systems non-trivial, as existing architectures lacked the granular tagging necessary to distinguish between global pages belonging to a host versus those belonging to specific guest environments.

Prosecution Position

The disclosed invention achieves a technical advancement by integrating context identifiers and global indicators directly into the hardware entries of TLBs and caches to facilitate efficient world switching. This architectural shift enables the unique identification of memory entries across disparate virtual machines and guest operating systems, effectively overcoming the constraint of virtual address aliasing. By providing hardware-level support for distinguishing between global and process-specific pages within a shared buffer, the system eliminates the need for unnecessary cache flushes during transitions between the host and virtual machines. The resulting technical effect is a reduction in memory latency and improved throughput for virtualized workloads through persistent address translation state.

Claims

The patent contains 13 total claims, with claims 1, 3, 5, 10, and 11 serving as the independent claims. These independent claims focus on methods and circuits for managing memory structures, specifically by storing and comparing multiple context identifiers and virtual address tags within a virtually tagged cache or a translation lookaside buffer to generate match signals. The dependent claims serve to further define the operational logic, such as incorporating valid bits into the matching process and specifying the use of registers to store and select specific data or code contexts.

Key Claim Terms New

Definitions of key terms used in the patent claims.

Term (Source)Support for SpecificationInterpretation
First context ID
(Claim 1, Claim 3, Claim 5, Claim 10, Claim 11)
The TLB or cache entries each include respective context identifiers and optionally includes respective global indicators that enable a unique identification of each the entries. This unique identification prevents virtual address aliasing problems between the applications of the different operating systems of the different virtual machines, and prevents unnecessary flushes of the TLB or cache entries.A unique identifier stored within a cache or TLB entry that represents a specific execution environment, such as a particular operating system context or a virtual machine world, used to distinguish between different address spaces.
Second context ID
(Claim 1, Claim 3, Claim 5, Claim 10, Claim 11)
Embodiments of the present invention provide a method and system for implementing hardware support for virtual machine and operating system context switching in translation lookaside buffers and virtually tagged caches. Context switching is a term associated with operating systems, whereas world switching is a term associated with virtual machines.An additional unique identifier stored alongside a first context ID in a single cache or TLB entry, allowing the entry to be associated with multiple execution environments or to distinguish between nested layers of virtualization (e.g., guest vs. host).
Selecting value
(Claim 1, Claim 10)
A multiplexer [is] operable to receive the first and second match signals and operable to output a match signal dependent on a selecting value of the cache entry. The TLB or cache entries each include respective context identifiers and optionally includes respective global indicators that enable a unique identification of each the entries.A value stored within a cache entry used as a control signal to determine which of multiple context ID match signals should be utilized for a specific memory access comparison.
Virtual address tag
(Claim 1, Claim 3, Claim 5, Claim 10, Claim 11)
The TLB or cache entries each include respective context identifiers and optionally includes respective global indicators that enable a unique identification of each the entries. This unique identification prevents virtual address aliasing problems between the applications of the different operating systems.The portion of a virtual address stored in a cache or TLB entry that is compared against a provided virtual address to determine if the requested data or translation is present in that specific entry.
Virtually tagged cache
(Claim 1, Claim 3, Claim 10, Claim 11)
With both TLBs and virtually tagged caches, lookups are based on virtual addresses. With respect to TLBs and virtually tagged caches, with both context switching and world switching, the computer system needs to flush or tag the TLB/cache.A hardware cache memory where the tags used for matching are based on virtual addresses rather than physical addresses, requiring context identifiers to prevent aliasing during context or world switches.

Litigation Cases New

US Latest litigation cases involving this patent.

Case NumberFiling DateTitle
1:25-cv-00834Jun 2, 2025Intellectual Ventures I Llc V. Lenovo Group Limited

Patent Family

Patent Family

File Wrapper

The dossier documents provide a comprehensive record of the patent's prosecution history - including filings, correspondence, and decisions made by patent offices - and are crucial for understanding the patent's legal journey and any challenges it may have faced during examination.

  • Get instant alerts for new documents

US8522253

Application Number
US11394521A
Filing Date
Mar 31, 2006
Publication Date
Aug 27, 2013
External Links
Slate, USPTO , Google Patents